Skip to content
Projects

opencr.core

Model definitions independent of any array backend.

Species, states, rate models, reactions, reaction networks and plasma conditions, as plain Python objects.

Attributes

NameDescription
ELECTRONNo description.
ELECTRON_STATENo description.
RADIATIVE_KINDSNo description.
REACTION_KINDSNo description.

Classes

NameDescription
Arrheniusk = a T^b exp(-c / T) with T in eV and k in SI.
ConditionsPlasma conditions, SI with temperatures in eV.
ConstantA rate coefficient independent of temperature, e.g. an Einstein A in s^-1.
CrossSectionRateA rate from a cross section averaged over a velocity distribution.
DetailedBalanceThe inverse of another reaction of the network, by detailed balance.
Functionk(T) from a Python function of the temperature in eV (array in, array out).
NetworkErrorA reaction network is inconsistent; problems lists every problem found.
RadiationTrappingThe escape-factor configuration of a solve (see opencr.kinetics.radiation).
RateModelBase class of the rate models; kind names the model in files.
ReactionOne reaction.
ReactionNetworkStates and reactions, with the model's assumptions.
SpeciesA particle kind.
StateOne resolved state of a species.
Tabulatedk(T) from a table, interpolated linearly in log k against log T.

Functions

NameDescription
species_from_formulaReturn the species of a simple formula such as "H", "H2+", "Ar" or "H-".

Modules

  • conditionsThe plasma conditions of a solve.
  • networkA reaction network: the states, the reactions between them and what is assumed.
  • ratesHow the rate coefficient of a reaction is given.
  • reactionsReactions between states.
  • speciesSpecies and their quantum states.

ELECTRONattributemodule attribute#

ELECTRON = Species('e', -1, ELECTRON_MASS, {})

ELECTRON_STATEattributemodule attribute#

ELECTRON_STATE = State(ELECTRON, weight=2.0)

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'
)

Arrheniusclassdataclass#

class Arrhenius(depends_on: str = 'electron', a: float = 0.0, b: float = 0.0, c: float = unit_field('eV', 0.0))

Bases: RateModel

k = a T^b exp(-c / T) with T in eV and k in SI.

Attributes

NameTypeDescription
afloatThe prefactor in the SI unit of the reaction’s order.
bfloatThe temperature exponent.
cfloatThe activation energy in eV.

Numerics

arrhenius

k=a Tb e−c/Tk = a\,T^b\,e^{-c/T}

Assumptions:

  • TT in eV, kk in the SI unit of the reaction’s order; cc is the threshold taken out before evaluation

aattributeclass attributeinstance attribute#

a: float = 0.0

battributeclass attributeinstance attribute#

b: float = 0.0

cattributeclass attributeinstance attribute#

c: float = unit_field('eV', 0.0)

kindattributeclass attribute#

kind: str = 'arrhenius'

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the three parameters.

Inherited from opencr.core.rates.RateModel

depends_onattributeclass attributeinstance attribute#

depends_on: str = 'electron'

Conditionsclassdataclass#

class Conditions(electron_temperature: float = unit_field('eV'), electron_density: float | None = unit_field('m-3', None), eedf: Any = None, densities: Mapping[str, float] = unit_field('m-3', default_factory=dict), totals: Mapping[str, float] = unit_field('m-3', default_factory=dict), ion_temperature: float | None = unit_field('eV', None), gas_temperature: float = unit_field('eV', 0.026), escape: Mapping[str, float] = dict(), trapping: RadiationTrapping | None = None)

Plasma conditions, SI with temperatures in eV.

The temperatures and densities take quantities (see the module docstring): Conditions("300 K", 1e12 * u.cm**-3).

Attributes

NameTypeDescription
electron_temperaturefloatkT_e in eV. With a non-Maxwellian eedf it is the temperature of the rates that are not cross sections and of detailed balance; from_eedf sets it to 2/3 <eps>.
electron_densityfloat | Nonen_e in m^-3, or None for quasi-neutrality, n_e = sum z_i n_i over every charged state (evolving and prescribed).
eedfAnyThe electron energy distribution (an opencr.kinetics.eedf.EEDF), or None for a Maxwellian at electron_temperature.
densitiesMapping[str, float]Densities in m^-3 of the prescribed states, by name: the drivers of a quasi-static solve (e.g. H(n=1) and H+) and fixed backgrounds (e.g. H2 in an atomic model).
totalsMapping[str, float]For a closed steady state, the total density of each element in m^-3 over the evolving states, e.g. {"H": 1e19}.
ion_temperaturefloat | NonekT_i in eV; the gas temperature if None.
gas_temperaturefloatkT of the neutral gas in eV (0.026 eV is 300 K).
escapeMapping[str, float]Escape factors in [0, 1] by reaction name, overriding the reactions’ own and anything trapping computes.
trappingRadiationTrapping | NoneCompute the escape factors of the lines self-consistently from the populations (opencr.kinetics.radiation); None for an optically thin plasma (apart from escape).

densitiesattributeclass attributeinstance attribute#

densities: Mapping[str, float] = unit_field('m-3', default_factory=dict)

eedfattributeclass attributeinstance attribute#

eedf: Any = None

electron_densityattributeclass attributeinstance attribute#

electron_density: float | None = unit_field('m-3', None)

electron_temperatureattributeclass attributeinstance attribute#

electron_temperature: float = unit_field('eV')

escapeattributeclass attributeinstance attribute#

escape: Mapping[str, float] = field(default_factory=dict)

gas_temperatureattributeclass attributeinstance attribute#

gas_temperature: float = unit_field('eV', 0.026)

ion_temperatureattributeclass attributeinstance attribute#

ion_temperature: float | None = unit_field('eV', None)

totalsattributeclass attributeinstance attribute#

totals: Mapping[str, float] = unit_field('m-3', default_factory=dict)

trappingattributeclass attributeinstance attribute#

trapping: RadiationTrapping | None = None

heavy_temperatureproperty#

heavy_temperature: dict[str, float]

The temperature of each kind of rate dependence (see opencr.core.rates).

quasi_neutralproperty#

quasi_neutral: bool

Whether n_e follows from quasi-neutrality.

from_eedfmethodclassmethod#

def from_eedf(eedf: Any, **kwargs: Any) -> Conditions

Return conditions with eedf and its effective temperature 2/3 <eps>.

replacemethod#

def replace(**changes: Any) -> Conditions

Return a copy with changes applied.

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the conditions as plain data (the EEDF by its description).

Constantclassdataclass#

class Constant(depends_on: str = 'none', value: float = 0.0)

Bases: RateModel

A rate coefficient independent of temperature, e.g. an Einstein A in s^-1.

Attributes

NameTypeDescription
valuefloatk in the SI unit of the reaction’s order.

Numerics

constant

k=const,e.g. k=g Aul for a line with escape factor gk = \mathrm{const}, \qquad \text{e.g. } k = g\,A_{ul} \text{ for a line with escape factor } g

Assumptions:

  • no temperature (depends_on is none): Einstein coefficients, wall losses, pumping

depends_onattributeclass attributeinstance attribute#

depends_on: str = 'none'

kindattributeclass attribute#

kind: str = 'constant'

valueattributeclass attributeinstance attribute#

value: float = 0.0

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the value.

CrossSectionRateclassdataclass#

class CrossSectionRate(depends_on: str = 'electron', cross_section: CrossSection | None = None, mass: float = unit_field('kg', ELECTRON_MASS), incident_mass: float | None = unit_field('kg', None))

Bases: RateModel

A rate from a cross section averaged over a velocity distribution.

For electrons (depends_on="electron") the average is over the electron energy distribution of the conditions (Maxwellian by default); otherwise over a Maxwellian of relative velocities at the ion or gas temperature.

Attributes

NameTypeDescription
cross_sectionCrossSection | NoneThe cross section (m^2) against energy (eV).
massfloatThe reduced mass in kg of the colliding pair.
incident_massfloat | NoneFor a table against the incident particle’s energy with the target at rest (the lab frame), the incident mass in kg; the table is looked up at E incident_mass / mass. None for a table in the centre-of-mass frame. For electrons both agree.

Numerics

maxwellian

k(T)=8πμ (kT)−3/2∫Eth∞σ(E) E e−E/kT dEk(T) = \sqrt{\frac{8}{\pi\mu}}\,(kT)^{-3/2} \int_{E_{\mathrm{th}}}^\infty \sigma(E)\,E\,e^{-E/kT}\,dE

lab frame

Elab=E mincμE_{\mathrm{lab}} = E\,\frac{m_{\mathrm{inc}}}{\mu}

eedf

k=2eme∫0∞ε σ(ε) F0(ε) dεk = \sqrt{\frac{2e}{m_e}} \int_0^\infty \varepsilon\,\sigma(\varepsilon)\,F_0(\varepsilon)\,d\varepsilon

Assumptions:

  • σ\sigma a plasmacoll CrossSection: linear between the table points, held at the last value above, zero below the threshold
  • a Maxwellian of the reduced mass μ\mu at TeT_e, TiT_i or TgasT_{\mathrm{gas}} (depends_on); for electrons the conditions’ EEDF when it is not Maxwellian
  • a lab-frame table (target at rest) is read at ElabE_{\mathrm{lab}}; a centre-of-mass table at EE

References:

Built from:

  • opencr.kinetics.rates.MaxwellianIntegral
  • opencr.kinetics.eedf.EEDF

cross_sectionattributeclass attributeinstance attribute#

cross_section: CrossSection | None = None

incident_massattributeclass attributeinstance attribute#

incident_mass: float | None = unit_field('kg', None)

kindattributeclass attribute#

kind: str = 'cross_section'

massattributeclass attributeinstance attribute#

mass: float = unit_field('kg', ELECTRON_MASS)

tableproperty#

table: CrossSection

The cross section (never None after construction).

thresholdproperty#

threshold: float

The threshold of the cross section in eV (in its own frame).

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the table, threshold and masses.

Inherited from opencr.core.rates.RateModel

depends_onattributeclass attributeinstance attribute#

depends_on: str = 'electron'

DetailedBalanceclassdataclass#

class DetailedBalance(depends_on: str = 'electron', forward: str = '')

Bases: RateModel

The inverse of another reaction of the network, by detailed balance.

De-excitation from excitation, three-body recombination from ionization, and any other inverse whose forward reaction has the products as reactants and an electron on both sides or one more on the forward product side. The evaluation (opencr.kinetics.rates) uses the state energies and weights: the Klein-Rosseland inverse cross section for an electron-impact excitation (valid for any energy distribution), and the Maxwellian relation (Boltzmann, Saha) otherwise.

Attributes

NameTypeDescription
forwardstrThe name of the forward reaction.

Numerics

inverse

kinv(T)=kfwd(T) gingout eΔE/T (Λ3)Δe,Λ3=(h22πmekT)3/2k_{\mathrm{inv}}(T) = k_{\mathrm{fwd}}(T)\,\frac{g_{\mathrm{in}}}{g_{\mathrm{out}}}\, e^{\Delta E/T}\,\big(\Lambda^3\big)^{\Delta e}, \qquad \Lambda^3 = \left(\frac{h^2}{2\pi m_e kT}\right)^{3/2}

klein rosseland

σul(ε)=glgu ε+ΔEε σlu(ε+ΔE)\sigma_{ul}(\varepsilon) = \frac{g_l}{g_u}\,\frac{\varepsilon + \Delta E}{\varepsilon}\,\sigma_{lu}(\varepsilon + \Delta E)

Assumptions:

  • gin,goutg_{\mathrm{in}}, g_{\mathrm{out}} the products of the weights of the forward reactants and products (ge=2g_e = 2), ΔE\Delta E the forward energy change from the state energies
  • the same number of heavy particles on both sides of the forward reaction and Δe≥0\Delta e \ge 0 extra electrons among its products: Boltzmann (Δe=0\Delta e = 0) or Saha (Δe=1\Delta e = 1)
  • with a non-Maxwellian EEDF an electron-impact excitation is inverted by its Klein-Rosseland cross section; a Saha inverse uses the Maxwellian forward rate at TeffT_{\mathrm{eff}}

References:

Built from:

  • opencr.kinetics.rates.RateEvaluator.coefficients
  • opencr.kinetics.rates.inverse_cross_section

forwardattributeclass attributeinstance attribute#

forward: str = ''

kindattributeclass attribute#

kind: str = 'detailed_balance'

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the forward reaction’s name.

Inherited from opencr.core.rates.RateModel

depends_onattributeclass attributeinstance attribute#

depends_on: str = 'electron'

Functionclassdataclass#

class Function(depends_on: str = 'electron', function: Callable[[np.ndarray], np.ndarray] | None = None, label: str = '', threshold: float = unit_field('eV', 0.0), file_temperatures: tuple[float, ...] = unit_field('eV', default_factory=lambda : tuple(np.geomspace(0.01, 10000.0, 241).tolist())))

Bases: RateModel

k(T) from a Python function of the temperature in eV (array in, array out).

Written to files as a table on file_temperatures.

Attributes

NameTypeDescription
functionCallable[[np.ndarray], np.ndarray] | Nonek in SI as a function of T in eV.
labelstrWhat the function is, e.g. "Kramers radiative recombination".
thresholdfloatAs for Tabulated, used when the function is tabulated.
file_temperaturestuple[float, ...]The temperatures (eV) of the table written to files.

Numerics

function

k=f(T)k = f(T)

tabulation

Ti=10−2+6i/240 eV,i=0,…,240,then as TabulatedT_i = 10^{-2 + 6 i / 240}\ \mathrm{eV}, \quad i = 0, \dots, 240, \qquad \text{then as } \texttt{Tabulated}

Assumptions:

  • ff is host Python code; files and the JAX backend use its table
  • kk itself is returned, so the threshold scaling does not protect it: kk underflows to zero once Eth/T≳708E_{\mathrm{th}}/T \gtrsim 708, and so does an inverse of it

Built from:

  • opencr.core.rates.Tabulated

file_temperaturesattributeclass attributeinstance attribute#

file_temperatures: tuple[float, ...] = unit_field('eV', default_factory=lambda : tuple(np.geomspace(0.01, 10000.0, 241).tolist()))

functionattributeclass attributeinstance attribute#

function: Callable[[np.ndarray], np.ndarray] | None = None

kindattributeclass attribute#

kind: str = 'function'

labelattributeclass attributeinstance attribute#

label: str = ''

thresholdattributeclass attributeinstance attribute#

threshold: float = unit_field('eV', 0.0)

tabulatemethod#

def tabulate() -> Tabulated

Return the function as a Tabulated model on file_temperatures.

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the function tabulated (see tabulate).

Inherited from opencr.core.rates.RateModel

depends_onattributeclass attributeinstance attribute#

depends_on: str = 'electron'

NetworkErrorclass#

class NetworkError(problems: Sequence[str])

Bases: ValueError

A reaction network is inconsistent; problems lists every problem found.

problemsattributeinstance attribute#

problems = list(problems)

RadiationTrappingclassdataclass#

class RadiationTrapping(length: float = unit_field('m'), model: str = 'mewe', lines: tuple[str, ...] | None = None, tolerance: float = 1e-06, max_iterations: int = 100)

The escape-factor configuration of a solve (see opencr.kinetics.radiation).

The length takes a quantity (see the module docstring).

Attributes

NameTypeDescription
lengthfloatThe absorption length L in m (the distance to the wall).
modelstrOne of ESCAPE_MODELS.
linestuple[str, ...] | NoneThe names of the spontaneous_emission reactions to trap, or None for all of them.
tolerancefloatThe self-consistent iteration stops when no escape factor changes by more than this.
max_iterationsintThe limit of that iteration.

lengthattributeclass attributeinstance attribute#

length: float = unit_field('m')

linesattributeclass attributeinstance attribute#

lines: tuple[str, ...] | None = None

max_iterationsattributeclass attributeinstance attribute#

max_iterations: int = 100

modelattributeclass attributeinstance attribute#

model: str = 'mewe'

toleranceattributeclass attributeinstance attribute#

tolerance: float = 1e-06

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the configuration as plain data.

RateModelclassdataclass#

class RateModel(depends_on: str = 'electron')

Base class of the rate models; kind names the model in files.

depends_onattributeclass attributeinstance attribute#

depends_on: str = 'electron'

kindattributeclass attribute#

kind: str = ''

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the model as plain data (see opencr.data.native).

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

NameTypeDescription
namestrA unique name in its network, e.g. "exc:H(n=1)->H(n=2)".
reactantstuple[State, ...]The reactant states; the electron is ELECTRON_STATE.
productstuple[State, ...]The product states.
kindstrOne of REACTION_KINDS.
rateRateModelThe rate model.
provenanceProvenance | NoneThe origin of the rate data.
escapefloatFor 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.0

kindattributeinstance attribute#

kind: str

nameattributeinstance attribute#

name: str

productsattributeinstance attribute#

products: tuple[State, ...]

provenanceattributeclass attributeinstance attribute#

provenance: Provenance | None = None

rateattributeinstance attribute#

rate: RateModel

reactantsattributeinstance attribute#

reactants: tuple[State, ...]

energy_changeproperty#

energy_change: float

The internal energy of the products minus the reactants’ in eV.

equationproperty#

equation: str

The reaction as text, e.g. "e + H(n=1) -> e + H(n=2)".

is_inverseproperty#

is_inverse: bool

Whether 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: int

The number of reactant particles.

photon_energyproperty#

photon_energy: float | None

For 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.

inverse_ofmethod#

def inverse_of(forward: Reaction) -> bool

Return whether this reaction is forward run backwards.

ReactionNetworkclass#

class ReactionNetwork(states: Iterable[State], reactions: Iterable[Reaction], name: str = '', assumptions: Iterable[str] = (), check: bool = True)

States and reactions, with the model’s assumptions.

Parameters

NameTypeDefaultDescription
statesIterable[State]requiredThe states (the electron is implicit and must not be listed).
reactionsIterable[Reaction]requiredThe reactions; every state they use must be in states.
namestr''The name of the network, e.g. "hydrogen/atomic/basic".
assumptionsIterable[str]()The model’s assumptions and omissions, one sentence each.
checkboolTrueRaise NetworkError if problems finds any.

assumptionsattributeinstance attribute#

assumptions: tuple[str, ...] = tuple(assumptions)

nameattributeinstance attribute#

name = name

reactionsattributeinstance attribute#

reactions: tuple[Reaction, ...] = tuple(reactions)

statesattributeinstance attribute#

states: tuple[State, ...] = tuple(states)

speciesproperty#

species: tuple[Species, ...]

The species of the states, each once, in order of appearance.

state_namesproperty#

state_names: tuple[str, ...]

The names of the states, in order.

conservationmethod#

def conservation() -> _Conservation

Return the conserved quantities over the states: the elements and the charge.

The matrix has one row per quantity and one column per state: the number of atoms of the element in the state, or its charge. Electrons are not states, so charge is conserved only together with them.

manifestmethod#

def manifest() -> dict[str, Any]

Return the states, reactions, sources and assumptions as plain data.

mergemethod#

def merge(other: ReactionNetwork, name: str = '') -> ReactionNetwork

Return the union of two networks; shared states must be identical.

problemsmethod#

def problems() -> list[str]

Return every inconsistency found, as sentences; empty if none.

reactionmethod#

def reaction(name: str) -> Reaction

Return the reaction called name.

reactions_ofmethod#

def reactions_of(state: str) -> tuple[Reaction, ...]

Return the reactions that change the population of state.

statemethod#

def state(name: str) -> State

Return the state called name.

state_indexmethod#

def state_index(name: str) -> int

Return the position of the state called name.

subsetmethod#

def subset(keep: Iterable[str], name: str | None = None) -> ReactionNetwork

Return the network of the states keep and the reactions among them only.

Speciesclassdataclass#

class Species(name: str, charge: int, mass: float = unit_field('kg'), composition: Mapping[str, int] = dict())

A particle kind.

Attributes

NameTypeDescription
namestrThe formula, e.g. "H2+".
chargeintThe charge in units of e.
massfloatThe mass in kg.
compositionMapping[str, int]The number of atoms of each element, e.g. {"H": 2}; empty for the electron.

chargeattributeinstance attribute#

charge: int

compositionattributeclass attributeinstance attribute#

composition: Mapping[str, int] = field(default_factory=dict)

massattributeclass attributeinstance attribute#

mass: float = unit_field('kg')

nameattributeinstance attribute#

name: str

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the species as plain data.

Stateclassdataclass#

class State(species: Species, label: str = '', energy: float = unit_field('eV', 0.0), weight: float = 1.0, quantum_numbers: Mapping[str, Any] = dict())

One resolved state of a species.

Attributes

NameTypeDescription
speciesSpeciesThe species.
labelstrThe quantum label, e.g. "n=2" or "X,v=3"; empty when the species is not resolved further.
energyfloatThe energy in eV on the common scale of the element (see the module docstring).
weightfloatThe statistical weight g.
quantum_numbersMapping[str, Any]The quantum numbers by name, e.g. {"n": 2}, {"n": 2, "l": 1} or {"electronic": "X", "v": 3}.

energyattributeclass attributeinstance attribute#

energy: float = unit_field('eV', 0.0)

labelattributeclass attributeinstance attribute#

label: str = ''

quantum_numbersattributeclass attributeinstance attribute#

quantum_numbers: Mapping[str, Any] = field(default_factory=dict)

speciesattributeinstance attribute#

species: Species

weightattributeclass attributeinstance attribute#

weight: float = 1.0

chargeproperty#

charge: int

The charge in units of e.

nameproperty#

name: str

The state’s name, "H(n=2)", or the species’ name when unresolved.

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the state as plain data (the species by name).

Tabulatedclassdataclass#

class Tabulated(depends_on: str = 'electron', temperatures: tuple[float, ...] = unit_field('eV', ()), values: tuple[float, ...] = (), threshold: float = unit_field('eV', 0.0))

Bases: RateModel

k(T) from a table, interpolated linearly in log k against log T.

A threshold (eV) removes the Boltzmann factor before interpolating, log(k exp(threshold / T)), which keeps the interpolation accurate at temperatures far below a threshold. Outside the table this scaled quantity holds its end value, so k = k_end exp(threshold / T_end - threshold / T) there.

Attributes

NameTypeDescription
temperaturestuple[float, ...]The table temperatures in eV, increasing.
valuestuple[float, ...]k in SI at temperatures, non-negative.
thresholdfloatThe energy in eV of the Boltzmann factor to remove.

Numerics

interpolation

ln⁡ ⁣(k eEth/T) linear in ln⁡T between the table points\ln\!\big(k\, e^{E_{\mathrm{th}}/T}\big) \text{ linear in } \ln T \text{ between the table points}

extrapolation

k(T)=kend eEth/Tend−Eth/Toutside the table (ln⁡T clipped)k(T) = k_{\mathrm{end}}\, e^{E_{\mathrm{th}}/T_{\mathrm{end}} - E_{\mathrm{th}}/T} \quad \text{outside the table } (\ln T \text{ clipped})

Order of accuracy: 2.

Assumptions:

  • the order is in the table spacing in ln⁡T\ln T, for a smooth ln⁡(k eEth/T)\ln(k\,e^{E_{\mathrm{th}}/T})
  • outside the table the scaled quantity k eEth/Tk\,e^{E_{\mathrm{th}}/T} holds its end value, not kk itself

kindattributeclass attribute#

kind: str = 'tabulated'

temperaturesattributeclass attributeinstance attribute#

temperatures: tuple[float, ...] = unit_field('eV', ())

thresholdattributeclass attributeinstance attribute#

threshold: float = unit_field('eV', 0.0)

valuesattributeclass attributeinstance attribute#

values: tuple[float, ...] = ()

to_dictmethod#

def to_dict() -> dict[str, Any]

Return the table.

Inherited from opencr.core.rates.RateModel

depends_onattributeclass attributeinstance attribute#

depends_on: str = 'electron'

species_from_formulafunction#

def species_from_formula(formula: str) -> Species

Return the species of a simple formula such as "H", "H2+", "Ar" or "H-".

The formula is one element symbol, an optional atom count and the charge as repeated signs ("H2+", "H-", "Ar++"). The mass is the sum of the atomic masses minus the missing electrons (plus the extra ones of a negative ion).