opencr.constants
Physical constants (CODATA 2018, through scipy.constants) and unit helpers.
OpenCR’s units follow the max-models convention: SI everywhere, except
temperatures, given as kT in eV, and particle and level energies in eV.
Densities are in m^-3, rate coefficients of an order-k reaction in
m^(3(k-1))/s (s^-1 for spontaneous emission, m^3/s for electron impact, m^6/s
for three-body recombination), wavelengths in nm (in vacuum unless a function
says otherwise).
Attributes
| Name | Description |
|---|---|
ATOMIC_MASS | No description. |
BOHR_RADIUS | No description. |
ELECTRON_MASS | No description. |
ELEMENTARY_CHARGE | No description. |
HYDROGEN_IONIZATION_ENERGY | No description. |
PLANCK | No description. |
PROTON_MASS | No description. |
SPEED_OF_LIGHT | No description. |
VACUUM_PERMITTIVITY | No description. |
Functions
| Name | Description |
|---|---|
air_wavelength | Return the wavelength in standard air of a vacuum wavelength (both in nm). |
photon_wavelength | Return the vacuum wavelength in nm of a photon of energy eV. |
thermal_de_broglie_cubed | Return (h^2 / (2 pi m_e kT))^(3/2) in m^3, kT in eV. |
ATOMIC_MASSattributemodule attribute#
ATOMIC_MASS = _c.atomic_massBOHR_RADIUSattributemodule attribute#
BOHR_RADIUS = _c.physical_constants['Bohr radius'][0]ELECTRON_MASSattributemodule attribute#
ELECTRON_MASS = _c.m_eELEMENTARY_CHARGEattributemodule attribute#
ELEMENTARY_CHARGE = _c.eHYDROGEN_IONIZATION_ENERGYattributemodule attribute#
HYDROGEN_IONIZATION_ENERGY = 13.598434599702PLANCKattributemodule attribute#
PLANCK = _c.hPROTON_MASSattributemodule attribute#
PROTON_MASS = _c.m_pSPEED_OF_LIGHTattributemodule attribute#
SPEED_OF_LIGHT = _c.cVACUUM_PERMITTIVITYattributemodule attribute#
VACUUM_PERMITTIVITY = _c.epsilon_0air_wavelengthfunction#
def air_wavelength(vacuum_wavelength: float | np.ndarray) -> np.ndarrayReturn the wavelength in standard air of a vacuum wavelength (both in nm).
The refractive index of Edlén (1966) as revised by Birch and Downs (1994), the IAU standard used by NIST, applied above 200 nm; shorter wavelengths are returned unchanged (there is no air conversion in the vacuum UV).
Numerics
edlen
Assumptions:
- standard air, the IAU standard used by NIST; above 200 nm only (shorter wavelengths are returned unchanged)
References:
photon_wavelengthfunction#
def photon_wavelength(energy: float | np.ndarray) -> np.ndarrayReturn the vacuum wavelength in nm of a photon of energy eV.
Numerics
wavelength
Assumptions:
- in vacuum
References:
- Tiesinga et al., Rev. Mod. Phys. 93, 025010 (2021) (CODATA 2018)
thermal_de_broglie_cubedfunction#
def thermal_de_broglie_cubed(temperature: float | np.ndarray) -> np.ndarrayReturn (h^2 / (2 pi m_e kT))^(3/2) in m^3, kT in eV.
The electron’s thermal de Broglie volume, the factor of the Saha equation
n_e n_+ / n_0 = (g_e g_+ / g_0) exp(-I / kT) / lambda^3.
Numerics
volume
saha
Assumptions:
- in eV, in m