rizer.kin.extensible_rate#

Classes#

Functions#

get_fake_reverse_reaction(→ cantera.Reaction)

Generate a fake reverse reaction for unit conversion purposes.

to_reverse_reaction_format(→ str)

to_janev_dissociative_recombination_C2Hy_format(→ str)

Module Contents#

class rizer.kin.extensible_rate.ExtensibleElectronTemperaturePlasmaRateData#

Bases: cantera.ExtensibleRateData

Te: float | None = None#
update(plasma: cantera.Solution) bool#
class rizer.kin.extensible_rate.ExtensibleTwoTempPlasmaRateData#

Bases: cantera.ExtensibleRateData

Tg: float | None = None#
Te: float | None = None#
kf_Tg: numpy.ndarray#
kf_Te: numpy.ndarray#
K_eq_Tg: numpy.ndarray#
K_eq_Te: numpy.ndarray#
gas: cantera.Solution | None = None#
update(plasma: cantera.Solution) bool#
class rizer.kin.extensible_rate.JanevDissociativeRecombinationC2Hy#

Bases: cantera.ExtensibleRate

set_parameters(params: cantera.AnyMap, units)#
get_parameters(params: cantera.AnyMap)#
validate(equation, soln)#
eval(data: cantera.ExtensibleRateData) float#
class rizer.kin.extensible_rate.ReverseTwoTemperaturePlasma#

Bases: cantera.ExtensibleRate

set_parameters(params: cantera.AnyMap, units)#
get_parameters(params: cantera.AnyMap)#
validate(equation: str, plasma: cantera.Solution)#
eval(data: cantera.ExtensibleRateData) float#
rizer.kin.extensible_rate.get_fake_reverse_reaction(reaction: cantera.Reaction, gas: cantera.Solution) cantera.Reaction#

Generate a fake reverse reaction for unit conversion purposes.

For non-reversible reactions, Cantera does not automatically create reverse reactions. This function generates a synthetic reverse reaction to allow proper unit conversion of the preexponential factor A using Cantera’s rate_coeff_units method.

Parameters:
  • reaction (cantera.Reaction) – Cantera reaction object (can be forward or reversible).

  • gas (cantera.Solution) – Cantera gas object containing the reaction mechanism.

Returns:

A synthetic reverse reaction with flipped reactants and products.

Return type:

cantera.Reaction

Notes

This function creates a thermodynamically meaningless reaction (reactants and products are swapped) purely for determining the correct units of the rate constant for the reverse direction. The fake reaction is not intended for any thermodynamic calculations.

Examples

>>> import cantera as ct
>>> gas = ct.Solution("gri30.yaml")
>>> reaction = gas.reactions()[0]  # 2 O + M <=> O2 + M
>>> fake_rev = get_fake_reverse_reaction(reaction, gas)
>>> print(fake_rev.equation)
O2 + M <=> 2 O + M
rizer.kin.extensible_rate.to_reverse_reaction_format(forward_reaction: cantera.Reaction, gas: cantera.Solution, note: str) str#
rizer.kin.extensible_rate.to_janev_dissociative_recombination_C2Hy_format(equation: str, A: float, unit: str, note: str | None = None, source: str | None = None) str#