opencr.core.reactions
Reactions between states.
A Reaction lists its reactant and product states (a state that
appears twice counts twice), its kind, its rate model and the provenance of
its data. Creating one checks the charge and element balance; photons are
implicit products of the radiative kinds (RADIATIVE_KINDS).
Attributes
| Name | Description |
|---|---|
RADIATIVE_KINDS | No description. |
REACTION_KINDS | No description. |
Classes
| Name | Description |
|---|---|
Reaction | One reaction. |
RADIATIVE_KINDSattributemodule attribute#
RADIATIVE_KINDS = ('spontaneous_emission', 'radiative_recombination')REACTION_KINDSattributemodule attribute#
REACTION_KINDS = (
'excitation',
'deexcitation',
'ionization',
'three_body_recombination',
'radiative_recombination',
'dielectronic_recombination',
'spontaneous_emission',
'dissociation',
'dissociative_excitation',
'dissociative_ionization',
'dissociative_recombination',
'attachment',
'dissociative_attachment',
'detachment',
'charge_exchange',
'mutual_neutralization',
'associative_detachment',
'penning_ionization',
'quenching',
'vibrational_transfer',
'proton_transfer',
'wall_loss',
'pumping',
'other'
)Reactionclassdataclass#
class Reaction(name: str, reactants: tuple[State, ...], products: tuple[State, ...], kind: str, rate: RateModel, provenance: Provenance | None = None, escape: float = 1.0)One reaction.
Attributes
| Name | Type | Description |
|---|---|---|
name | str | A unique name in its network, e.g. "exc:H(n=1)->H(n=2)". |
reactants | tuple[State, ...] | The reactant states; the electron is
ELECTRON_STATE. |
products | tuple[State, ...] | The product states. |
kind | str | One of REACTION_KINDS. |
rate | RateModel | The rate model. |
provenance | Provenance | None | The origin of the rate data. |
escape | float | For a spontaneous emission, the default escape factor of the line (1 for an optically thin plasma); conditions may override it. |
escapeattributeclass attributeinstance attribute#
escape: float = 1.0kindattributeinstance attribute#
kind: strnameattributeinstance attribute#
name: strproductsattributeinstance attribute#
products: tuple[State, ...]provenanceattributeclass attributeinstance attribute#
provenance: Provenance | None = Nonerateattributeinstance attribute#
rate: RateModelreactantsattributeinstance attribute#
reactants: tuple[State, ...]energy_changeproperty#
energy_change: floatThe internal energy of the products minus the reactants’ in eV.
equationproperty#
equation: strThe reaction as text, e.g. "e + H(n=1) -> e + H(n=2)".
is_inverseproperty#
is_inverse: boolWhether the rate is the detailed balance of another reaction.
netproperty#
net: dict[str, int]The net change of each state per reaction (products minus reactants).
orderproperty#
order: intThe number of reactant particles.
photon_energyproperty#
photon_energy: float | NoneFor a spontaneous emission, the photon energy in eV; otherwise None.
product_countsproperty#
product_counts: dict[str, int]How often each state is a product, by name.
reactant_countsproperty#
reactant_counts: dict[str, int]How often each state is a reactant, by name.