Skip to content
Projects

opencr.kinetics.effective

Elimination of quasi-static states: population coefficients and effective rates.

Split the states into the prescribed drivers P (the states with a density in the conditions) and the rest Q. With all reactions linear in the states and n_e given, dn/dt = M n and the quasi-static Q follow from M_QQ n_Q + M_QP n_P = 0:

nQ=C nP,C=−MQQ−1MQP,\mathbf n_Q = C\,\mathbf n_P, \qquad C = -M_{QQ}^{-1} M_{QP},

and the drivers then change at the effective rates

dnPdt=MeffnP,Meff=MPP+MPQC.\frac{d\mathbf n_P}{dt} = M^{\mathrm{eff}} \mathbf n_P, \qquad M^{\mathrm{eff}} = M_{PP} + M_{PQ} C.

C / n_e are the population coefficients (m^3) and M_eff / n_e the effective rate coefficients (m^3/s): for atomic hydrogen M_eff[H+, H(1)] / n_e is the collisional-radiative ionization coefficient and M_eff[H(1), H+] / n_e the recombination coefficient. The elementary reactions stay in the network; the effective ones are a result, never mixed with them.

Classes

NameDescription
QuasiStaticThe quasi-static reduction of a network at fixed conditions.
SingularSystemErrorThe quasi-static system has no unique solution; the message says which states.

Functions

NameDescription
quasi_staticReturn the quasi-static reduction with the drivers conditions.densities.

QuasiStaticclassdataclass#

class QuasiStatic(drivers: tuple[str, ...], excited: tuple[str, ...], coefficients: np.ndarray, effective: np.ndarray, electron_density: float)

The quasi-static reduction of a network at fixed conditions.

Attributes

NameTypeDescription
driverstuple[str, ...]The names of the prescribed states P.
excitedtuple[str, ...]The names of the quasi-static states Q.
coefficientsnp.ndarrayC with shape (len(excited), len(drivers)), dimensionless: n_Q = C n_P.
effectivenp.ndarrayM_eff with shape (len(drivers), len(drivers)) in s^-1.
electron_densityfloatn_e in m^-3.

coefficientsattributeinstance attribute#

coefficients: np.ndarray

driversattributeinstance attribute#

drivers: tuple[str, ...]

effectiveattributeinstance attribute#

effective: np.ndarray

electron_densityattributeinstance attribute#

electron_density: float

excitedattributeinstance attribute#

excited: tuple[str, ...]

effective_ratemethod#

def effective_rate(source: str, target: str) -> float

Return the effective rate coefficient from source to target in m^3/s.

M_eff[target, source] / n_e: the rate at which target is created per electron and per particle of source (source != target), or for source == target minus the total loss rate coefficient.

Numerics

effective rate

Ksource→target=Mtarget,sourceeffne[m3/s]K_{\mathrm{source}\to\mathrm{target}} = \frac{M^{\mathrm{eff}}_{\mathrm{target},\mathrm{source}}}{n_e} \quad [\mathrm{m^3/s}]

hydrogen

SCR=MH+,H(1)effne,αCR=MH(1),H+effneS_{\mathrm{CR}} = \frac{M^{\mathrm{eff}}_{\mathrm{H^+},\mathrm{H}(1)}}{n_e}, \qquad \alpha_{\mathrm{CR}} = \frac{M^{\mathrm{eff}}_{\mathrm{H}(1),\mathrm{H^+}}}{n_e}

Assumptions:

  • the diagonal (source=target\mathrm{source} = \mathrm{target}) is minus the driver’s total effective loss coefficient
  • three-body recombination enters M⋅,H+M_{\cdot,\mathrm{H^+}} with k ne2k\,n_e^2, so αCR\alpha_{\mathrm{CR}} depends on nen_e
  • effective rates are results, never reactions of a network

References:

population_coefficientmethod#

def population_coefficient(state: str, driver: str) -> float

Return n_state / (n_e n_driver) in m^3.

Numerics

coefficient

nqne nd=Cqdne[m3]\frac{n_q}{n_e\, n_d} = \frac{C_{qd}}{n_e} \quad [\mathrm{m^3}]

populationsmethod#

def populations(densities: dict[str, float]) -> np.ndarray

Return n_Q for the driver densities densities.

SingularSystemErrorclass#

class SingularSystemError(ValueError)

Bases: ValueError

The quasi-static system has no unique solution; the message says which states.

quasi_staticfunction#

def quasi_static(network: ReactionNetwork, rates: np.ndarray, conditions: Conditions) -> QuasiStatic

Return the quasi-static reduction with the drivers conditions.densities.

Raises

ValueError
If n_e is not given or a reaction has two quasi-static reactants (reactions with driver partners are linear in the rest).
SingularSystemError
If M_QQ is singular (a state without losses, or a group of states without a path out).

Numerics

matrix

Mij=∑r: j is the quasi-static reactant of rνir kr neare∏p∈P, p≠jnparpM_{ij} = \sum_{r:\ j \text{ is the quasi-static reactant of } r} \nu_{ir}\, k_r\, n_e^{a_{re}} \prod_{p \in P,\, p \ne j} n_p^{a_{rp}}

reduction

dnQdt=MQQnQ+MQPnP=0⇒nQ=C nP,C=−MQQ−1MQP\frac{d\mathbf n_Q}{dt} = M_{QQ}\mathbf n_Q + M_{QP}\mathbf n_P = 0 \quad\Rightarrow\quad \mathbf n_Q = C\,\mathbf n_P, \qquad C = -M_{QQ}^{-1} M_{QP}

effective

dnPdt=MeffnP,Meff=MPP+MPQC\frac{d\mathbf n_P}{dt} = M^{\mathrm{eff}} \mathbf n_P, \qquad M^{\mathrm{eff}} = M_{PP} + M_{PQ} C

solve

MQQ=LU,X0=U−1L−1MQP,X=X0+U−1L−1(MQP−MQQX0)M_{QQ} = LU, \qquad X_0 = U^{-1}L^{-1} M_{QP}, \qquad X = X_0 + U^{-1}L^{-1}\left(M_{QP} - M_{QQ} X_0\right)

Assumptions:

  • drivers PP: the states with a density in the conditions; QQ the rest
  • every reaction linear in its one quasi-static reactant (two are refused); a reaction among drivers only goes on the column of its first heavy reactant
  • a given nen_e (a quasi-neutral one is refused)
  • sparse LU (splu) with one step of iterative refinement; a zero diagonal of MQQM_{QQ} (a state without losses) or a singular factorisation raises SingularSystemError

References:

Built from:

  • opencr.kinetics.effective.QuasiStatic.population_coefficient
  • opencr.kinetics.effective.QuasiStatic.effective_rate