rizer.kinetics.electron_reactions#
Classification of electron-impact reactions.
Also computes their inelastic energy exchange with the electron/gas energy pools.
Classes#
Electron-impact reaction energetics for a plasma mechanism. |
Functions#
|
Load curated standard enthalpies of formation at 0 K, in J/kmol. |
|
Return each species' \(H(0\,K)\) [J/kmol], for the reactions needed. |
|
Return |
|
Return the indices of the electron-impact reactions in |
|
Return the |
Module Contents#
- rizer.kinetics.electron_reactions.load_curated_formation_enthalpy_0K() dict[str, float]#
Load curated standard enthalpies of formation at 0 K, in J/kmol.
Notes
Reads
data/mechanisms/thermo/formation_enthalpy_0K.yaml, a curated, cited (ATcT/NIST) table covering the species used in this repo’s two production electron-impact mechanisms (air_plasma_Laux2000.yaml,Goutier2025/CH4_to_C2H2.yaml, including its excited-state phases), including the electron itself (on the thermal electron convention – see the file’s own description).Cached (the file is static and file-shipped): callers must not mutate the returned dict, since every caller shares the same cached object.
- rizer.kinetics.electron_reactions.species_formation_enthalpy_0K(plasma: cantera.Solution, electron_reaction_indices: numpy.ndarray) numpy.ndarray#
Return each species’ \(H(0\,K)\) [J/kmol], for the reactions needed.
- Parameters:
plasma (
cantera.Solution) – Cantera plasma object.electron_reaction_indices (
numpy.ndarray) – Indices of the electron-impact reactions inplasma.reactions()(seereaction_involves_electron()).
- Returns:
\(H(0\,K)\) [J/kmol], length
plasma.n_species.- Return type:
- Raises:
ValueError – If a heavy species with nonzero net stoichiometry in an electron-impact reaction has no entry in
load_curated_formation_enthalpy_0K().
Notes
Only species that actually participate (nonzero net stoichiometry) in at least one electron-impact reaction get a real value; every other species is left at 0, which is safe since it is always multiplied by a zero net stoichiometric coefficient wherever the result is used (the electron-impact reaction rows of the net-stoichiometry matrix). This is shared by
ElectronicReactionEnergetics(pure-Python reactor) and theReactor0D/solve_channel_transientpybind11 bindings (C++ reactor), so both compute this fixed vector from the exact same logic.
- rizer.kinetics.electron_reactions.reaction_involves_electron(reaction: cantera.Reaction, electron_name: str = 'e-') bool#
Return
Trueif the electron participates inreaction.Detection is done on the reaction equation rather than on
reaction.reactants/reaction.products(or the stoichiometric-coefficient matrices). Cantera cancels a spectator electron – one that appears on both sides with equal stoichiometry, as in the electron-impact dissociation/excitation reactionCH4 + e- => CH3 + H + e-– from those, so a membership test there misses such reactions even though they are electron-impact processes. The equation string keeps the electron as written, so it detects both spectator electrons and electrons produced/consumed net (ionization, recombination, attachment).- Parameters:
reaction (
cantera.Reaction) – Reaction to test.electron_name (
str, optional) – Name of the electron species, by default"e-".
- Returns:
Whether the electron appears in the reaction equation.
- Return type:
Notes
This is the exact Python twin of the C++
equationHasElectroninrizer/cantera_ext/models/nrp/ReactorRHS.cpp: both replace the reaction-arrow and stoichiometric-plus characters+ = < >with spaces and then look for the electron as a standalone whitespace-delimited token. The two implementations MUST stay byte-for-byte equivalent so the native C++ reactor and this Python reference select the identical set of electron-impact reactions for the inelastic electron-to-gas power; change them together.
- rizer.kinetics.electron_reactions.electron_reaction_indices(plasma: cantera.Solution) numpy.ndarray#
Return the indices of the electron-impact reactions in
plasma.reactions().- Parameters:
plasma (
cantera.Solution) – Cantera plasma object.- Returns:
Indices
iintoplasma.reactions()for whichreaction_involves_electron()is true.- Return type:
- Raises:
cantera.CanteraError – If
plasmahas no"e-"species. Without this check, a plasma missing the electron species would silently match zero reactions (equation-string matching, not a species lookup) instead of failing loudly, leaving inelastic power silently stuck at zero.
- rizer.kinetics.electron_reactions.species_h0k_for_mechanism(mech: str, phase: str, reacting: bool, plasma: cantera.Solution | None = None) numpy.ndarray#
Return the
species_h0karray to hand a native reactor’s constructor.- Parameters:
mech (
str) – Cantera mechanism (YAML) path and phase name.phase (
str) – Cantera mechanism (YAML) path and phase name.reacting (
bool) – Whether the reactor being built includes finite-rate chemistry.plasma (
cantera.Solution, optional) – Already-loaded Solution formech/phase, reused (whenreacting) instead of loading a second copy. If None, one is loaded here. Ignored ifreactingis False.
- Returns:
Per-species H(0K) [J/kmol] (see
species_formation_enthalpy_0K()), or an empty array if notreacting– epsilon_th is only ever evaluated by the C++ side when reacting, so a non-reacting run never needs curated 0K data for species it will never use it for.- Return type:
- class rizer.kinetics.electron_reactions.ElectronicReactionEnergetics(plasma: cantera.Solution)#
Electron-impact reaction energetics for a plasma mechanism.
Precomputes reaction indices and stoichiometry needed to compute the inelastic electron-to-gas power exchange.
- Parameters:
plasma (
cantera.Solution) – Cantera plasma object.
- plasma#
- plasma_reactions: list[cantera.Reaction]#
List of the reactions in the plasma object.
- plasma_power_inelastic() float#
Return the inelastic Joule heating power per unit volume of the plasma in W/m^3.
- Returns:
Inelastic Joule heating power density in W/m^3.
- Return type:
Notes
The power density is given by equation 36 of [Aurora], using each electron-impact reaction’s fixed threshold energy in place of \(\Delta H_i\):
\[P_{inel} = \sum_{i}^{I_{ei}} \varepsilon_{th,i} \cdot R_i \qquad\text{with}\qquad \varepsilon_{th,i} = \sum_k \nu_{ki}\, H_k(0\,K)\]with:
\(I_{ei}\) the number of electron-impact reactions, i.e. reactions in which the electron participates,
\(\varepsilon_{th,i}\) reaction \(i\)’s net enthalpy of formation at 0 K – a fixed threshold energy, independent of \(T_g\)/\(T_e\), precomputed once at construction (see
load_curated_formation_enthalpy_0K()),\(R_i\) the net rate of progress of reaction \(i\).
Since \(\varepsilon_{th}\) is added in the gas-energy equation and subtracted in the electron-energy equation (symmetrically, as with the elastic exchange term), combined (\(T_g\), \(T_e\)) energy conservation holds regardless of \(\varepsilon_{th}\)’s specific form: only the split of a reaction’s energy between the two pools depends on it, not the total. The heavy-species chemical term in the reactor still uses the state-dependent internal energy (each species’ partial molar internal energy at \(T_g\), summed over all reactions, not just electron-impact ones).
Electron-impact reactions are selected by testing whether the electron participates as a reactant or a product, rather than by matching a rate-type string. These are exactly the reactions that exchange energy between the electron energy pool and the internal/chemical energy of the heavy species, whatever their rate type (
two-temperature-plasma,three-body-two-temperature-plasma,reverse-two-temperature-plasma,Druyvesteyn,janev-*, …). Selecting them by type string silently dropped every channel whose type was not one of the two-temperature ones.