Skip to content
Projects

opencr.kinetics.radiation

Radiation trapping as an escape-factor approximation.

An optically thick line u -> l is re-absorbed on its way out of the plasma, so only a fraction of the spontaneous emission leaves: the effective transition probability is g A_ul with the escape factor g in [0, 1]. OpenCR applies escape factors to the spontaneous_emission reactions, from the conditions (Conditions.escape, per line) or computed here from the line-centre optical depth of a Doppler-broadened line over a length L,

τ0=κ0L,κ0=λ038π3/2 gugl Aul nlvD,\tau_0 = \kappa_0 L, \qquad \kappa_0 = \frac{\lambda_0^3}{8\pi^{3/2}}\,\frac{g_u}{g_l}\,\frac{A_{ul}\, n_l}{v_D},

with v_D = (2 kT / m)^(1/2) the emitters’ thermal speed at the gas temperature (Mihalas 1978, eq. 9-6 with a Doppler profile). The escape factor is then one of the usual approximations (ESCAPE_MODELS):

  • "mewe" (default): g = (2 - exp(-tau_0 / 1000)) / (1 + tau_0) (Mewe 1967, Brit. J. Appl. Phys. 18, 107), an interpolation that is right in both limits and is what most CR codes use (Yacora, Behringer’s models);
  • "holstein-slab": Holstein’s asymptotic result for a Doppler profile, g = 1 / (tau_0 (pi ln tau_0)^(1/2)), for an infinite slab of half-thickness L (Holstein 1947, Phys. Rev. 72, 1212);
  • "holstein-cylinder": the same for an infinite cylinder of radius L, g = 1.60 / (tau_0 (pi ln tau_0)^(1/2)).

Holstein’s forms hold for tau_0 >> 1; below tau_0 = e they are set to 1. L is the characteristic absorption length (the distance to the wall, not the full plasma size), to be chosen by the user; this is a zero-dimensional approximation of a transport problem and is explicit about it: no escape factor is applied unless a RadiationTrapping is given.

A self-consistent solve iterates: the escape factors depend on the lower populations, which depend on the escape factors (opencr.model.Model.solve_steady_state).

Attributes

NameDescription
ESCAPE_MODELSNo description.

Classes

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

Functions

NameDescription
escape_factorReturn the escape factor g(tau_0) of one of ESCAPE_MODELS.
escape_factorsReturn the escape factor of every trapped line, by reaction name.
line_centre_optical_depthReturn tau_0 of a Doppler-broadened line over length.

ESCAPE_MODELSattributemodule attribute#

ESCAPE_MODELS = ('mewe', 'holstein-slab', 'holstein-cylinder')

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.

escape_factorfunction#

def escape_factor(optical_depth: float | np.ndarray, model: str = 'mewe') -> np.ndarray

Return the escape factor g(tau_0) of one of ESCAPE_MODELS.

Numerics

mewe

gmewe=2−e−τ0/10001+τ0g_{\mathrm{mewe}} = \frac{2 - e^{-\tau_0/1000}}{1 + \tau_0}

holstein slab

gslab=1τ0πln⁡τ0(τ0>e),1 belowg_{\mathrm{slab}} = \frac{1}{\tau_0\sqrt{\pi\ln\tau_0}} \quad (\tau_0 > e), \qquad 1 \ \text{below}

holstein cylinder

gcyl=1.60τ0πln⁡τ0(τ0>e),1 belowg_{\mathrm{cyl}} = \frac{1.60}{\tau_0\sqrt{\pi\ln\tau_0}} \quad (\tau_0 > e), \qquad 1 \ \text{below}

Assumptions:

  • Mewe (the default): 1 at τ0=0\tau_0 = 0, about 1/τ01/\tau_0 for 1≪τ0≪10001 \ll \tau_0 \ll 1000, 2/τ02/\tau_0 for τ0≫1000\tau_0 \gg 1000
  • Holstein: asymptotic forms for τ0≫1\tau_0 \gg 1, an infinite slab of half-thickness LL or a cylinder of radius LL; at τ0=e\tau_0 = e they jump from 1 to 0.207 (slab) and 0.332 (cylinder)

References:

escape_factorsfunction#

def escape_factors(network: ReactionNetwork, populations: Mapping[str, float], trapping: RadiationTrapping, temperature: float) -> dict[str, float]

Return the escape factor of every trapped line, by reaction name.

Parameters

NameTypeDescription
networkReactionNetworkThe network.
populationsMapping[str, float]The density of every state in m^-3.
trappingRadiationTrappingThe configuration.
temperaturefloatThe gas (emitter) temperature in eV.

Numerics

line

λ0=hcEu−El,g=g(τ0),τ0=τ0(λ0,Aul,gu/gl,nl,L,Tgas,m)\lambda_0 = \frac{hc}{E_u - E_l}, \qquad g = g(\tau_0), \qquad \tau_0 = \tau_0(\lambda_0, A_{ul}, g_u/g_l, n_l, L, T_{\mathrm{gas}}, m)

Assumptions:

  • every spontaneous_emission of RadiationTrapping.lines (all by default)
  • AulA_{ul} the untrapped Constant coefficient (another rate model raises); mm the emitter’s mass

Built from:

  • opencr.kinetics.radiation.line_centre_optical_depth
  • opencr.kinetics.radiation.escape_factor

line_centre_optical_depthfunction#

def line_centre_optical_depth(wavelength: float | np.ndarray, einstein_a: float | np.ndarray, weight_ratio: float | np.ndarray, lower_density: float | np.ndarray, length: float, temperature: float, mass: float) -> np.ndarray

Return tau_0 of a Doppler-broadened line over length.

Parameters

NameTypeDescription
wavelengthfloat | np.ndarrayThe line’s vacuum wavelength in nm.
einstein_afloat | np.ndarrayA_ul in s^-1 (without any escape factor).
weight_ratiofloat | np.ndarrayg_u / g_l.
lower_densityfloat | np.ndarrayn_l in m^-3.
lengthfloatThe absorption length L in m.
temperaturefloatThe emitters’ kT in eV.
massfloatThe emitters’ mass in kg.

Numerics

optical depth

τ0=κ0L,κ0=λ038π3/2 gugl Aul nlvD,vD=2kTm\tau_0 = \kappa_0 L, \qquad \kappa_0 = \frac{\lambda_0^3}{8\pi^{3/2}}\,\frac{g_u}{g_l}\,\frac{A_{ul}\, n_l}{v_D}, \qquad v_D = \sqrt{\frac{2kT}{m}}

cross section

κ0=λ028π gugl Aul⏟integrated absorption λ0π vD⏟ϕ(0) nl\kappa_0 = \underbrace{\frac{\lambda_0^2}{8\pi}\,\frac{g_u}{g_l}\,A_{ul}}_{\text{integrated absorption}}\ \underbrace{\frac{\lambda_0}{\sqrt\pi\,v_D}}_{\phi(0)}\ n_l

Assumptions:

  • a Doppler-broadened line at the emitters’ temperature; no stimulated emission
  • LL the absorption length (the distance to the wall), chosen by the user

References:

  • D. Mihalas, Stellar Atmospheres, 2nd ed., W. H. Freeman (1978), eq. 9-6