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:
and the drivers then change at the effective rates
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
| Name | Description |
|---|---|
QuasiStatic | The quasi-static reduction of a network at fixed conditions. |
SingularSystemError | The quasi-static system has no unique solution; the message says which states. |
Functions
| Name | Description |
|---|---|
quasi_static | Return 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
| Name | Type | Description |
|---|---|---|
drivers | tuple[str, ...] | The names of the prescribed states P. |
excited | tuple[str, ...] | The names of the quasi-static states Q. |
coefficients | np.ndarray | C with shape (len(excited), len(drivers)),
dimensionless: n_Q = C n_P. |
effective | np.ndarray | M_eff with shape (len(drivers), len(drivers)) in s^-1. |
electron_density | float | n_e in m^-3. |
coefficientsattributeinstance attribute#
coefficients: np.ndarraydriversattributeinstance attribute#
drivers: tuple[str, ...]effectiveattributeinstance attribute#
effective: np.ndarrayelectron_densityattributeinstance attribute#
electron_density: floatexcitedattributeinstance attribute#
excited: tuple[str, ...]effective_ratemethod#
def effective_rate(source: str, target: str) -> floatReturn 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
hydrogen
Assumptions:
- the diagonal () is minus the driver’s total effective loss coefficient
- three-body recombination enters with , so depends on
- effective rates are results, never reactions of a network
References:
population_coefficientmethod#
def population_coefficient(state: str, driver: str) -> floatReturn n_state / (n_e n_driver) in m^3.
Numerics
coefficient
populationsmethod#
def populations(densities: dict[str, float]) -> np.ndarrayReturn 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) -> QuasiStaticReturn the quasi-static reduction with the drivers conditions.densities.
Raises
ValueError- If
n_eis not given or a reaction has two quasi-static reactants (reactions with driver partners are linear in the rest). SingularSystemError- If
M_QQis singular (a state without losses, or a group of states without a path out).
Numerics
matrix
reduction
effective
solve
Assumptions:
- drivers : the states with a density in the conditions; 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 (a quasi-neutral one is refused)
- sparse LU (
splu) with one step of iterative refinement; a zero diagonal of (a state without losses) or a singular factorisation raisesSingularSystemError
References:
- Summers et al., Plasma Phys. Control. Fusion 48, 263 (2006)
- Virtanen et al., Nat. Methods 17, 261 (2020) (
splu)
Built from:
opencr.kinetics.effective.QuasiStatic.population_coefficientopencr.kinetics.effective.QuasiStatic.effective_rate