rizer.kin.extensible_rate#

Classes#

ExtensibleElectronTemperaturePlasmaRateData

Data class to hold electron temperature data for a plasma.

ExtensibleTwoTempPlasmaRateData

Data class to hold two-temperature plasma data for a plasma.

JanevDissociativeRecombinationC2Hy

Data class to hold dissociative recombination data for a C2Hy species.

DruyvesteynRate

Data class to hold Druyvesteyn rate data for a reaction.

ReverseTwoTemperaturePlasma

Data class to hold reverse two-temperature plasma data for a plasma.

JanevRadiativeRecombinationH

Radiative recombination e + H+ -> H(n) ([JanevHydrogen] Eq. 21--23).

Functions#

get_fake_reverse_reaction(→ cantera.Reaction)

Generate a fake reverse reaction for unit conversion purposes.

to_reverse_reaction_format(→ str)

to_janev_radiative_recombination_H_format(→ str)

Format a Cantera YAML snippet for janev-radiative-recombination-H.

to_janev_dissociative_recombination_C2Hy_format(→ str)

Module Contents#

class rizer.kin.extensible_rate.ExtensibleElectronTemperaturePlasmaRateData#

Bases: cantera.ExtensibleRateData

Data class to hold electron temperature data for a plasma.

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

Bases: cantera.ExtensibleRateData

Data class to hold two-temperature plasma data for a plasma.

Notes

The gas object is initialized as a copy of the plasma object. The gas object is used to compute the forward rate constants and equilibrium constants at the gas temperature and electron temperature. The gas object is used to compute the equilibrium constant for the reverse reaction. This is done since reverse reactions are not automatically created by Cantera for two-temperature plasma reactions.

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#

Update the two-temperature plasma data for a plasma.

class rizer.kin.extensible_rate.JanevDissociativeRecombinationC2Hy#

Bases: cantera.ExtensibleRate

Data class to hold dissociative recombination data for a C2Hy species.

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

Bases: cantera.ExtensibleRate

Data class to hold Druyvesteyn rate data for a reaction.

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

Data class to hold reverse two-temperature plasma data for a plasma.

forward_equation#

Forward reaction equation.

Type:

str

T#

Temperature to use for the reverse reaction. Either Te or Tg. If a reverse reaction involves electrons, use the electron temperature. Otherwise, use the gas temperature.

Type:

str

idx_forward_reaction#

Index of the forward reaction in the gas object. None at initialization. Set to the index of the forward reaction in the gas object after the first update.

Type:

int or None

Notes

The index of the forward reaction is computed only once and stored in the idx_forward_reaction attribute.

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#
class rizer.kin.extensible_rate.JanevRadiativeRecombinationH#

Bases: cantera.ExtensibleRate

Radiative recombination e + H+ -> H(n) ([JanevHydrogen] Eq. 21–23).

set_parameters(params: cantera.AnyMap, units)#
get_parameters(params: cantera.AnyMap)#
eval(data: cantera.ExtensibleRateData) float#
rizer.kin.extensible_rate.to_janev_radiative_recombination_H_format(equation: str, equation_number: str, n: int, unit: str = 'cm3/mol', Anl: float | None = None, chi_nl: float | None = None, In: float | None = None, note: str | None = None) str#

Format a Cantera YAML snippet for janev-radiative-recombination-H.

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#