opencr.kinetics.eedf
Electron energy distribution functions.
An EEDF is given as the energy probability function F0(eps) in eV^-3/2,
normalised by int eps^1/2 F0 deps = 1 (the convention of BOLSIG+ and of
plasmacoll.solve_eedf), so that eps^1/2 F0 is the probability
density of the energy. Rate coefficients are
k = (2 e / m_e)^1/2 int eps sigma F0 deps.
Maxwellian:F0 = 2 / sqrt(pi) T^-3/2 exp(-eps / T).Generalized:F0 ~ exp(-(eps / eps0)^x), Maxwellian forx = 1and Druyvesteyn forx = 2, at a given mean energy.TabulatedEEDF: any distribution on an energy grid, for example from a probe or from plasmacoll’s two-term Boltzmann solver (TabulatedEEDF.from_boltzmann).
OpenCR does not compute EEDFs; they are inputs (see the guide “The CR model”).
Their energies and temperatures take an astropy Quantity or a string such as
"3 eV" or "30000 K" as well as a number in eV (see plasmacoll.units).
Classes
| Name | Description |
|---|---|
EEDF | Base class: a normalised electron energy probability function. |
Generalized | F0 = c exp(-(eps / eps0)^shape) with the given mean energy. |
Maxwellian | A Maxwellian at temperature (kT in eV, or a quantity). |
TabulatedEEDF | A distribution tabulated on an energy grid, normalised on construction. |
EEDFclass#
class EEDFBase class: a normalised electron energy probability function.
Numerics
normalisation
mean
rate
grid
Assumptions:
- the EEDF is an input: OpenCR does not compute it
- the rate integral is
plasmacoll.eedf_rate_coefficient: trapezoid on the union of the EEDF grid, the table energies and the threshold, each interval refined 4 times, linear between points, beyond the grid - only the electron cross-section rates (and their Klein-Rosseland inverses) see a non-Maxwellian EEDF; every other rate uses
References:
effective_temperatureproperty#
effective_temperature: float2/3 <eps> in eV, the temperature of a Maxwellian of the same mean energy.
is_maxwellianproperty#
is_maxwellian: boolWhether the distribution is exactly Maxwellian.
mean_energyproperty#
mean_energy: float<eps> = int eps^3/2 F0 deps in eV.
eepfmethod#
def eepf(energy: np.ndarray) -> np.ndarrayReturn F0 in eV^-3/2 at energy (eV).
gridmethod#
def grid(num: int = 2000) -> np.ndarrayReturn an energy grid (eV) that resolves the distribution and its tail.
tabulatemethod#
def tabulate(num: int = 2000) -> TabulatedEEDFReturn the distribution on grid.
Generalizedclassdataclass#
class Generalized(mean: float = unit_field('eV'), shape: float = 2.0)Bases: EEDF
F0 = c exp(-(eps / eps0)^shape) with the given mean energy.
shape = 1 is a Maxwellian, shape = 2 a Druyvesteyn distribution
(elastic collisions with a constant cross section in a field). With
eps0 = <eps> Gamma(3/(2x)) / Gamma(5/(2x)) and
c = x / (eps0^3/2 Gamma(3/(2x))). The mean energy is in eV (or a
quantity).
Numerics
eepf
grid
Assumptions:
- Maxwellian, Druyvesteyn (elastic collisions with a constant cross section in a field)
- normalised with the mean given
meanattributeclass attributeinstance attribute#
mean: float = unit_field('eV')shapeattributeclass attributeinstance attribute#
shape: float = 2.0is_maxwellianproperty#
is_maxwellian: boolWhether shape is 1.
mean_energyproperty#
mean_energy: floatThe mean energy.
eepfmethod#
def eepf(energy: np.ndarray) -> np.ndarrayReturn F0 at energy.
gridmethod#
def grid(num: int = 2000) -> np.ndarrayA grid to where (eps/eps0)^x reaches 60.
Inherited from opencr.kinetics.eedf.EEDF
effective_temperatureproperty#
opencr.kinetics.eedf.EEDFView sourceeffective_temperature: float2/3 <eps> in eV, the temperature of a Maxwellian of the same mean energy.
tabulatemethod#
opencr.kinetics.eedf.EEDFView sourcedef tabulate(num: int = 2000) -> TabulatedEEDFReturn the distribution on grid.
Maxwellianclassdataclass#
class Maxwellian(temperature: float = unit_field('eV'))Bases: EEDF
A Maxwellian at temperature (kT in eV, or a quantity).
Numerics
eepf
mean
Assumptions:
- detected by
is_maxwellian: the rates then take the closed-form Maxwellian path
temperatureattributeclass attributeinstance attribute#
temperature: float = unit_field('eV')eepfmethod#
def eepf(energy: np.ndarray) -> np.ndarrayReturn 2 / sqrt(pi) T^-3/2 exp(-eps / T).
Inherited from opencr.kinetics.eedf.EEDF
effective_temperatureproperty#
opencr.kinetics.eedf.EEDFView sourceeffective_temperature: float2/3 <eps> in eV, the temperature of a Maxwellian of the same mean energy.
gridmethod#
opencr.kinetics.eedf.EEDFView sourcedef grid(num: int = 2000) -> np.ndarrayReturn an energy grid (eV) that resolves the distribution and its tail.
tabulatemethod#
opencr.kinetics.eedf.EEDFView sourcedef tabulate(num: int = 2000) -> TabulatedEEDFReturn the distribution on grid.
TabulatedEEDFclass#
class TabulatedEEDF(energy: np.ndarray, eepf: np.ndarray)Bases: EEDF
A distribution tabulated on an energy grid, normalised on construction.
Between the points log F0 is interpolated linearly (F0 where it is
zero); beyond the last point F0 is zero.
Parameters
| Name | Type | Description |
|---|---|---|
energy | np.ndarray | The grid in eV (or a quantity), increasing, >= 0. |
eepf | np.ndarray | F0 at energy, non-negative, in any normalisation. |
Numerics
normalisation
interpolation
mean
Assumptions:
- any distribution on an energy grid: a probe, or plasmacoll’s two-term Boltzmann solver
- normalised by the trapezoidal rule on construction
energyattributeinstance attribute#
energy = energyvaluesattributeinstance attribute#
values = eepf / normeepfmethod#
def eepf(energy: np.ndarray) -> np.ndarrayReturn F0 at energy, interpolated.
from_boltzmannmethodclassmethod#
def from_boltzmann(solution: Any) -> TabulatedEEDFReturn the distribution of a plasmacoll.BoltzmannSolution.
gridmethod#
def grid(num: int = 2000) -> np.ndarrayThe table’s own grid.
tabulatemethod#
def tabulate(num: int = 2000) -> TabulatedEEDFItself.
Inherited from opencr.kinetics.eedf.EEDF
effective_temperatureproperty#
opencr.kinetics.eedf.EEDFView sourceeffective_temperature: float2/3 <eps> in eV, the temperature of a Maxwellian of the same mean energy.
is_maxwellianproperty#
opencr.kinetics.eedf.EEDFView sourceis_maxwellian: boolWhether the distribution is exactly Maxwellian.