opencr.analysis.quantities
Scalar quantities of a steady state, named by strings.
The surrogates (opencr.ml), the sensitivities and the inverse
modelling (opencr.inference) all ask a Result
for named scalars:
========================================== ===============================================
name quantity
========================================== ===============================================
population:<state> the density of a state (m^-3)
effective_rate:<source>><target> an effective rate coefficient (m^3/s), quasi-static
emissivity:<reaction> the photon emissivity of a line (photons m^-3 s^-1)
electron_cooling:<driver> the electron energy loss per electron and per
particle of a driver (eV m^3/s), quasi-static
ratio:<quantity>/<quantity> the ratio of two of the above
========================================== ===============================================
For example "effective_rate:H(n=1)>H+" is the CR ionization coefficient
of atomic hydrogen and "ratio:emissivity:A:3-2/emissivity:A:4-2" the
Balmer alpha to beta ratio.
Attributes
| Name | Description |
|---|---|
KINDS | No description. |
Functions
| Name | Description |
|---|---|
check_quantity | Raise ValueError (or KeyError) if name is not a quantity of model. |
electron_cooling | Return the electron energy loss due to driver per electron and particle (eV m^3/s). |
quantities | Return the quantities names of a steady state as an array. |
quantity | Return the quantity name of a steady state (see the module docstring). |
KINDSattributemodule attribute#
KINDS = ('population', 'effective_rate', 'emissivity', 'electron_cooling', 'ratio')check_quantityfunction#
def check_quantity(model: Any, name: str) -> NoneRaise ValueError (or KeyError) if name is not a quantity of model.
electron_coolingfunction#
def electron_cooling(result: Any, driver: str) -> floatReturn the electron energy loss due to driver per electron and particle (eV m^3/s).
The sum over the electron-impact reactions (an electron among the
reactants, not radiative) of k n_e^(a-1) c_X Delta E, where c_X is
the quasi-static population of the reaction’s heavy reactant per particle
of driver (1 for the driver itself, 0 for the other drivers) and
Delta E the energy the heavy particles gain: the excitation and
ionization energies, negative for de-excitation and three-body
recombination. Radiative recombination (the electron’s kinetic energy) is
not counted.
Numerics
cooling
Assumptions:
- over the electron-impact, non-radiative reactions with one heavy reactant
- the quasi-static population of per particle of driver (1 for itself, 0 for the other drivers)
- the internal energy the heavy particles gain: negative for de-excitation and three-body recombination; radiative recombination is not counted
Built from:
opencr.kinetics.effective.quasi_static
quantitiesfunction#
def quantities(result: Any, names: Sequence[str]) -> np.ndarrayReturn the quantities names of a steady state as an array.
quantityfunction#
def quantity(result: Any, name: str) -> floatReturn the quantity name of a steady state (see the module docstring).