Skip to content
Projects

The CR model

This page fixes the physics every OpenCR model shares: the equations, which densities are inputs and which are unknowns, how a steady state is closed, and the units. The API follows from it.

A model is a set of states ii (levels, ions, molecules) and reactions rr. Reaction rr has reactant multiplicities aria_{ri}, net stoichiometry νir\nu_{ir} (products minus reactants) and a rate coefficient krk_r, so its rate per volume is

wr=kr neare∏iniari,w_r = k_r\, n_e^{a_{re}} \prod_i n_i^{a_{ri}},

where area_{re} counts the electrons among the reactants. The populations obey

dnidt=Ri(n)=∑rνirwr(n).\frac{d n_i}{dt} = R_i(\mathbf n) = \sum_r \nu_{ir} w_r(\mathbf n).

krk_r depends on the plasma conditions θ\boldsymbol\theta: the electron temperature or energy distribution, the ion and gas temperatures, the escape factors of the lines. The electron is never a state: nen_e is either given or follows from quasi-neutrality, ne=∑izinin_e = \sum_i z_i n_i.

Reactions are elementary: each has its own data and provenance. Effective rates (such as the collisional-radiative ionization coefficient) are derived from them by eliminating states (below); OpenCR never mixes the two in one network.

A solve splits the states into

  • prescribed states, whose densities are inputs (Conditions.densities): the drivers of a quasi-static solve (for atomic hydrogen the ground state H(1)H(1) and the proton) and fixed backgrounds (H₂ in an atomic model);
  • evolving states, the unknowns.

TeT_e (or the energy distribution), nen_e or quasi-neutrality, TiT_i, TgasT_\mathrm{gas} and the escape factors are always inputs. OpenCR does not solve an energy equation, and it does not compute the energy distribution; plasmacoll’s Boltzmann solver can (EEDF.from_boltzmann).

Quasi-static (CR) solve — Model.solve_steady_state(conditions), the default. The excited states relax much faster than the drivers change (the usual CR assumption: AA and electron-collision times of ns against µs–ms for transport and ionization), so they are in steady state for given driver densities. With PP the drivers and QQ the rest, and all reactions linear in the evolving states,

0=MQQ nQ+MQP nP  ⇒  nQ=−MQQ−1MQP nP.0 = M_{QQ}\, n_Q + M_{QP}\, n_P \;\Rightarrow\; n_Q = -M_{QQ}^{-1} M_{QP}\, n_P .

Each excited population is a sum of contributions from the drivers (for hydrogen an excitation part ∝nenH(1)\propto n_e n_{H(1)} and a recombination part ∝nenH+\propto n_e n_{H^+}). Eliminating QQ leaves the effective rate matrix of the drivers,

Meff=MPP−MPQMQQ−1MQP,M^\mathrm{eff} = M_{PP} - M_{PQ} M_{QQ}^{-1} M_{QP},

whose off-diagonal entries divided by nen_e are the effective (collisional-radiative) coefficients: ionization SCRS_\mathrm{CR} from H(1)H(1) to H+H^+, recombination αCR\alpha_\mathrm{CR} back. Line emission is split the same way into photon emissivity coefficients per driver. This is the generalised CR picture of ADAS (Summers et al. 2006).

Closed steady state — Model.solve_steady_state(conditions, mode="full"). Every state evolves. The equations are then singular: ∑iceiRi=0\sum_i c_{ei} R_i = 0 for each conserved element ee (ceic_{ei} atoms of ee in state ii). One equation per conserved element is replaced by its total, ∑iceini=Ne\sum_i c_{ei} n_i = N_e, given in Conditions.totals. Without a total for a conserved element the system is underdetermined and the solve stops with an error that says which total is missing. The result is the ionization balance at the given nen_e (or self-consistently with quasi-neutrality, which makes the system nonlinear).

Time-dependent — Model.solve_transient(conditions, initial, times). Every evolving state follows its equation from initial densities; the prescribed states stay prescribed (constant, or following conditions(t) when a function of time is given). The system is stiff (rates from 10−310^{-3} to 109 s−110^{9}\,\mathrm{s^{-1}}), so the integrators are implicit (BDF by default, or Radau) with the analytic sparse Jacobian. The report gives the drift of every element total the evolving states conserve; nen_e is given or quasi-neutral at every moment, as in the steady solves. Any output time can be read like a steady state (history.at(index)): fluxes, dominant processes and emission at that moment, and the residual that says how far from steady state the populations are.

Nonlinear reactions (two evolving reactants, such as H⁺ + H⁻ mutual neutralization, or nen_e from quasi-neutrality) are allowed in the closed solve; the quasi-static solve needs the excited states to enter linearly and says so otherwise.

Populations are absolute densities in m⁻³. A quasi-static result also gives the reduced populations nq/(nend)n_q/(n_e n_d) per driver dd (the population coefficients, in m³), and a closed steady state the fractions ni/Nen_i/N_e.

A model is zero-dimensional. Transport enters only as explicit reactions: a loss wall_loss with a given rate (for example 1/τ1/\tau with a confinement time), or a pumping source. Nothing is added behind the user’s back. Radiation is optically thin unless escape factors are set (below).

The atomic hydrogen model resolves the principal quantum number only (the ll sub-states statistically populated, which needs fast ll-mixing), truncates at a highest level nmaxn_\mathrm{max} without continuum lowering, and omits heavy-particle collisions with the excited states; its manifest lists every assumption.

An optically thick line is re-absorbed before it leaves the plasma, so only a fraction gg of its spontaneous emission escapes: the model uses gAulg A_{ul} in place of AulA_{ul} (and the emissivities follow). OpenCR applies escape factors in two explicit ways, and never otherwise:

  • Conditions.escape: a factor per line, given by the user (for example from a radiation transport calculation);

  • Conditions.trapping = RadiationTrapping(length, model): the factors are computed from the line-centre optical depth of each Doppler-broadened line over the absorption length LL,

    τ0=λ038π3/2 gugl Aul nlvD L,vD=2kTgas/m,\tau_0 = \frac{\lambda_0^3}{8\pi^{3/2}}\,\frac{g_u}{g_l}\,\frac{A_{ul}\, n_l}{v_D}\, L, \qquad v_D = \sqrt{2kT_\mathrm{gas}/m},

    with the approximation model: "mewe" (default), g=(2−e−τ0/1000)/(1+τ0)g = (2 - e^{-\tau_0/1000})/(1 + \tau_0) (Mewe 1967), or Holstein’s asymptotic forms for a slab or a cylinder ("holstein-slab", "holstein-cylinder"). The factors depend on the lower populations, which depend on the factors, so the solve iterates to self-consistency; the result’s conditions.escape holds the final factors and its report the iterations. Factors given in Conditions.escape override the computed ones line by line.

LL is the distance the photons travel to the wall (a slab’s half-thickness, a cylinder’s radius), a parameter of this zero-dimensional approximation and not something OpenCR can know. The formulas are in opencr.kinetics.radiation.

SI throughout, except temperatures (as kTkT) and energies, in eV. Densities in m⁻³, rate coefficients in s⁻¹ (one reactant), m³/s (two) and m⁶/s (three), wavelengths in nm in vacuum (air_wavelength converts above 200 nm).