Reaction
jaff.core.reaction.Reaction
The Reaction class represents a single chemical reaction, holding its reactants, products, symbolic rate expression, valid temperature bounds, and associated energy and radiation terms.
Constructor
Reaction(reactants, products, rate, tmin, tmax, dE, dRad_dt, original_string, index, errors=False)
Parameters
- reactants : list[Specie]
- Reactant species.
- products : list[Specie]
- Product species.
- rate : sympy.Expr
- Symbolic rate expression.
- tmin : float or None
- Minimum valid temperature in Kelvin.
- tmax : float or None
- Maximum valid temperature in Kelvin.
- dE : sympy.Basic
- SymPy expression for the internal energy released or absorbed per reaction event (erg).
- dRad : sympy.Basic
- Extra radiation energy density per unit energy (eV) that may be produced/absorbed by the reaction. The energy symbol must be
Efor the quantity to be integrated during cross-section calculation - original_string : str
- Raw reaction string from the network file.
- index : int
- Position in the network reaction list.
- errors : bool, optional
- If
True, terminate the process on mass or charge conservation violations instead of merely logging a warning. DefaultFalse.
Attributes
| Attribute | Type | Description |
|---|---|---|
reactants |
Species |
Ordered species catalogue of reactant species |
products |
Species |
Ordered species catalogue of product species |
rate |
sympy.Expr |
SymPy expression for the rate coefficient (units depend on reaction order; typically cm³ s⁻¹ for two-body reactions) |
tmin |
float or None |
Minimum gas temperature at which the rate is valid (K). None means no lower bound |
tmax |
float or None |
Maximum gas temperature at which the rate is valid (K). None means no upper bound |
dE |
sympy.Basic |
SymPy expression for the energy released per reaction event (erg) |
dRad |
sympy.Basic |
SymPy expression for the extra photon absorption/emission rate contribution to the radiation moment equations |
verbatim |
str |
Human-readable "R1 + R2 -> P1 + P2" form |
serialized |
str |
Canonical name-level form "<sorted_reactants>__<sorted_products>" |
serialized_exploded |
str |
Like serialized but built from atom-level serialized forms of each species (isomer-insensitive) |
index |
int |
Zero-based position in the parent Reactions catalogue |
metadata |
dict |
Arbitrary key/value store. metadata["type"] is populated by rtype() |
custom_rad_rate |
bool |
True when the radiation rate was supplied via a .jfunc aux function rather than computed from cross-sections |
xsecs_dict |
XsecsProps or None |
Photo cross-section data for the reaction's single decay channel. Holds units, _equations (pa photo-absorption flag and decay_type, either "ionization" or "dissociation"), photon_energy (eV), and the photo_absorption / photodecay arrays (cm², or None where absent). None for non-photo reactions |