WarpX
Loading...
Searching...
No Matches
ablastr::constant::SI Namespace Reference

Variables

template<typename T>
constexpr auto c_v = static_cast<T>(299'792'458)
 vacuum speed of light [m/s] (variable template)
 
template<typename T>
constexpr auto epsilon_0_v = static_cast<T>(8.8541878188e-12)
 vacuum permittivity: dielectric permittivity of vacuum [F/m] (variable template)
 
template<typename T>
constexpr auto mu0_v = static_cast<T>(1.2566370612685e-06)
 
template<typename T>
constexpr auto q_e_v = static_cast<T>(1.602176634e-19)
 elementary charge [C] (variable template)
 
template<typename T>
constexpr auto m_e_v = static_cast<T>(9.1093837139e-31)
 electron mass [kg] (variable template)
 
template<typename T>
constexpr auto m_p_v = static_cast<T>(1.67262192595e-27)
 proton mass [kg] (variable template)
 
template<typename T>
constexpr auto m_u_v = static_cast<T>(1.66053906892e-27)
 dalton: unified atomic mass unit [kg] (variable template)
 
template<typename T>
constexpr auto hbar_v = static_cast<T>(1.0545718176461565e-34)
 reduced Planck Constant = h / tau [J*s] (variable template)
 
template<typename T>
constexpr auto alpha_v = static_cast<T>(0.0072973525643330135)
 
template<typename T>
constexpr auto r_e_v = static_cast<T>(2.8179403205e-15)
 classical electron radius = 1./(4*pi*epsilon_0) * q_e*q_e/(m_e*c*c) [m] (variable template)
 
template<typename T>
constexpr auto xi_c2_v = static_cast<T>(1.1728865075613984e-35)
 xi times c2 = xi*c*c. This should be usable for single precision instead of xi; very close to smallest float32 number possible (1.2e-38) (variable template)
 
template<typename T>
constexpr auto schwinger_field_v
 Schwinger electric field [V/m] (variable template)
 
template<typename T>
constexpr auto kb_v = static_cast<T>(1.380649e-23)
 Boltzmann constant (exact) [J/K] (variable template)
 
template<typename T>
constexpr auto eV_v = q_e_v<T>
 1 eV in [J] (variable template)
 
template<typename T>
constexpr auto MeV_v = static_cast<T>(q_e_v<double> * 1e6)
 1 MeV in [J] (variable template)
 
template<typename T>
constexpr auto eV_inv_c_v = static_cast<T>(eV_v<double> / c_v<double>)
 1 eV/c in [kg*m/s] (variable template)
 
template<typename T>
constexpr auto MeV_inv_c_v = static_cast<T>(MeV_v<double> / c_v<double>)
 1 MeV/c in [kg*m/s] (variable template)
 
template<typename T>
constexpr auto eV_inv_c2_v = static_cast<T>(eV_v<double> / (c_v<double> * c_v<double>))
 1 eV/c^2 in [kg] (variable template)
 
template<typename T>
constexpr auto MeV_inv_c2_v = static_cast<T>(MeV_v<double> / (c_v<double> * c_v<double>))
 1 MeV/c^2 in [kg] (variable template)
 
template<typename T>
constexpr auto sqrt_4_pi_fine_structure_v = static_cast<T>(0.3028221207690299)
 sqrt(4*pi*alpha) is a constant used for the Heaviside Lorentz unit system (variable template)
 
template<typename T>
constexpr auto c2_v = static_cast<T>(c_v<double>*c_v<double>)
 square of the vacuum speed of light [m^2/s^2] (variable template)
 
template<typename T>
constexpr auto inv_c_v = static_cast<T>(1.0/c_v<double>)
 inverse of the vacuum speed of light [s/m] (variable template)
 
template<typename T>
constexpr auto inv_c2_v = static_cast<T>(1.0/c2_v<double>)
 inverse of the square of the vacuum speed of light [s^2/m^2] (variable template)
 
constexpr auto c = c_v<amrex::Real>
 vacuum speed of light [m/s]
 
constexpr auto epsilon_0 = epsilon_0_v<amrex::Real>
 vacuum permittivity: dielectric permittivity of vacuum [F/m]
 
constexpr auto mu0 = mu0_v<amrex::Real>
 vacuum permeability: magnetic permeability of vacuum = 4.0e-7 * pi [H/m]
 
constexpr auto q_e = q_e_v<amrex::Real>
 elementary charge [C]
 
constexpr auto m_e = m_e_v<amrex::Real>
 electron mass [kg]
 
constexpr auto m_p = m_p_v<amrex::Real>
 proton mass [kg]
 
constexpr auto m_u = m_u_v<amrex::Real>
 dalton: unified atomic mass unit [kg]
 
constexpr auto hbar = hbar_v<amrex::Real>
 reduced Planck Constant = h / tau [J*s]
 
constexpr auto alpha = alpha_v<amrex::Real>
 fine-structure constant = mu0/(4*pi)*q_e*q_e*c/hbar [dimensionless]
 
constexpr auto r_e = r_e_v<amrex::Real>
 classical electron radius = 1./(4*pi*epsilon_0) * q_e*q_e/(m_e*c*c) [m]
 
constexpr double xi = 1.3050122383827227e-52
 xi: nonlinearity parameter of Heisenberg-Euler effective theory = (2.*alpha**2*epsilon_0**2*hbar**3)/(45.*m_e**4*c**5)
 
constexpr auto xi_c2 = xi_c2_v<amrex::Real>
 xi times c2 = xi*c*c. This should be usable for single precision instead of xi; very close to smallest float32 number possible (1.2e-38)
 
template<typename T>
constexpr auto schwinger_field = schwinger_field_v<amrex::Real>
 Schwinger electric field [V/m].
 
constexpr auto kb = kb_v<amrex::Real>
 Boltzmann constant (exact) [J/K].
 
constexpr auto eV = eV_v<amrex::Real>
 1 eV in [J]
 
constexpr auto MeV = MeV_v<amrex::Real>
 1 MeV in [J]
 
constexpr auto eV_inv_c = eV_inv_c_v<amrex::Real>
 1 eV/c in [kg*m/s]
 
constexpr auto MeV_inv_c = MeV_inv_c_v<amrex::Real>
 1 MeV/c in [kg*m/s]
 
constexpr auto eV_inv_c2 = eV_inv_c2_v<amrex::Real>
 1 eV/c^2 in [kg]
 
constexpr auto MeV_inv_c2 = MeV_inv_c2_v<amrex::Real>
 1 MeV/c^2 in [kg]
 
constexpr auto c2 = c2_v<amrex::Real>
 square of the vacuum speed of light [m^2/s^2]
 
constexpr auto inv_c = inv_c_v<amrex::Real>
 inverse of the vacuum speed of light [s/m]
 
constexpr auto inv_c2 = inv_c2_v<amrex::Real>
 inverse of the square of the vacuum speed of light [s^2/m^2]
 

Detailed Description

Physical constants

Values are the 2022 CODATA recommended values https://physics.nist.gov/cuu/Constants/index.html

New additions here should also be considered for addition to warpx_constants in WarpXUtil.cpp's makeParser, so that they're available in parsing and evaluation of PICMI expressions, as well as the corresponding Python definitions.

Note: _v suffix is used for variable templates (as in C++ 20's numbers library)

Variable Documentation

◆ alpha

auto ablastr::constant::SI::alpha = alpha_v<amrex::Real>
constexpr

fine-structure constant = mu0/(4*pi)*q_e*q_e*c/hbar [dimensionless]

◆ alpha_v

template<typename T>
auto ablastr::constant::SI::alpha_v = static_cast<T>(0.0072973525643330135)
constexpr

fine-structure constant = mu0/(4*pi)*q_e*q_e*c/hbar [dimensionless] (variable template) The value is calculated from the expression. This differs slightly from the CODATA2022 value 0.0072973525643.

◆ c

auto ablastr::constant::SI::c = c_v<amrex::Real>
constexpr

vacuum speed of light [m/s]

◆ c2

auto ablastr::constant::SI::c2 = c2_v<amrex::Real>
constexpr

square of the vacuum speed of light [m^2/s^2]

◆ c2_v

template<typename T>
auto ablastr::constant::SI::c2_v = static_cast<T>(c_v<double>*c_v<double>)
constexpr

square of the vacuum speed of light [m^2/s^2] (variable template)

◆ c_v

template<typename T>
auto ablastr::constant::SI::c_v = static_cast<T>(299'792'458)
constexpr

vacuum speed of light [m/s] (variable template)

◆ epsilon_0

auto ablastr::constant::SI::epsilon_0 = epsilon_0_v<amrex::Real>
constexpr

vacuum permittivity: dielectric permittivity of vacuum [F/m]

◆ epsilon_0_v

template<typename T>
auto ablastr::constant::SI::epsilon_0_v = static_cast<T>(8.8541878188e-12)
constexpr

vacuum permittivity: dielectric permittivity of vacuum [F/m] (variable template)

◆ eV

auto ablastr::constant::SI::eV = eV_v<amrex::Real>
constexpr

1 eV in [J]

◆ eV_inv_c

auto ablastr::constant::SI::eV_inv_c = eV_inv_c_v<amrex::Real>
constexpr

1 eV/c in [kg*m/s]

◆ eV_inv_c2

auto ablastr::constant::SI::eV_inv_c2 = eV_inv_c2_v<amrex::Real>
constexpr

1 eV/c^2 in [kg]

◆ eV_inv_c2_v

template<typename T>
auto ablastr::constant::SI::eV_inv_c2_v = static_cast<T>(eV_v<double> / (c_v<double> * c_v<double>))
constexpr

1 eV/c^2 in [kg] (variable template)

◆ eV_inv_c_v

template<typename T>
auto ablastr::constant::SI::eV_inv_c_v = static_cast<T>(eV_v<double> / c_v<double>)
constexpr

1 eV/c in [kg*m/s] (variable template)

◆ eV_v

template<typename T>
auto ablastr::constant::SI::eV_v = q_e_v<T>
constexpr

1 eV in [J] (variable template)

◆ hbar

auto ablastr::constant::SI::hbar = hbar_v<amrex::Real>
constexpr

reduced Planck Constant = h / tau [J*s]

◆ hbar_v

template<typename T>
auto ablastr::constant::SI::hbar_v = static_cast<T>(1.0545718176461565e-34)
constexpr

reduced Planck Constant = h / tau [J*s] (variable template)

◆ inv_c

auto ablastr::constant::SI::inv_c = inv_c_v<amrex::Real>
constexpr

inverse of the vacuum speed of light [s/m]

◆ inv_c2

auto ablastr::constant::SI::inv_c2 = inv_c2_v<amrex::Real>
constexpr

inverse of the square of the vacuum speed of light [s^2/m^2]

◆ inv_c2_v

template<typename T>
auto ablastr::constant::SI::inv_c2_v = static_cast<T>(1.0/c2_v<double>)
constexpr

inverse of the square of the vacuum speed of light [s^2/m^2] (variable template)

◆ inv_c_v

template<typename T>
auto ablastr::constant::SI::inv_c_v = static_cast<T>(1.0/c_v<double>)
constexpr

inverse of the vacuum speed of light [s/m] (variable template)

◆ kb

auto ablastr::constant::SI::kb = kb_v<amrex::Real>
constexpr

Boltzmann constant (exact) [J/K].

◆ kb_v

template<typename T>
auto ablastr::constant::SI::kb_v = static_cast<T>(1.380649e-23)
constexpr

Boltzmann constant (exact) [J/K] (variable template)

◆ m_e

auto ablastr::constant::SI::m_e = m_e_v<amrex::Real>
constexpr

electron mass [kg]

◆ m_e_v

template<typename T>
auto ablastr::constant::SI::m_e_v = static_cast<T>(9.1093837139e-31)
constexpr

electron mass [kg] (variable template)

◆ m_p

auto ablastr::constant::SI::m_p = m_p_v<amrex::Real>
constexpr

proton mass [kg]

◆ m_p_v

template<typename T>
auto ablastr::constant::SI::m_p_v = static_cast<T>(1.67262192595e-27)
constexpr

proton mass [kg] (variable template)

◆ m_u

auto ablastr::constant::SI::m_u = m_u_v<amrex::Real>
constexpr

dalton: unified atomic mass unit [kg]

◆ m_u_v

template<typename T>
auto ablastr::constant::SI::m_u_v = static_cast<T>(1.66053906892e-27)
constexpr

dalton: unified atomic mass unit [kg] (variable template)

◆ MeV

auto ablastr::constant::SI::MeV = MeV_v<amrex::Real>
constexpr

1 MeV in [J]

◆ MeV_inv_c

auto ablastr::constant::SI::MeV_inv_c = MeV_inv_c_v<amrex::Real>
constexpr

1 MeV/c in [kg*m/s]

◆ MeV_inv_c2

auto ablastr::constant::SI::MeV_inv_c2 = MeV_inv_c2_v<amrex::Real>
constexpr

1 MeV/c^2 in [kg]

◆ MeV_inv_c2_v

template<typename T>
auto ablastr::constant::SI::MeV_inv_c2_v = static_cast<T>(MeV_v<double> / (c_v<double> * c_v<double>))
constexpr

1 MeV/c^2 in [kg] (variable template)

◆ MeV_inv_c_v

template<typename T>
auto ablastr::constant::SI::MeV_inv_c_v = static_cast<T>(MeV_v<double> / c_v<double>)
constexpr

1 MeV/c in [kg*m/s] (variable template)

◆ MeV_v

template<typename T>
auto ablastr::constant::SI::MeV_v = static_cast<T>(q_e_v<double> * 1e6)
constexpr

1 MeV in [J] (variable template)

◆ mu0

auto ablastr::constant::SI::mu0 = mu0_v<amrex::Real>
constexpr

vacuum permeability: magnetic permeability of vacuum = 4.0e-7 * pi [H/m]

◆ mu0_v

template<typename T>
auto ablastr::constant::SI::mu0_v = static_cast<T>(1.2566370612685e-06)
constexpr

vacuum permeability: magnetic permeability of vacuum = 4.0e-7 * pi [H/m] (variable template) Note that this is adjusted from the CODATA2022 value, 1.25663706127e-06 So that the relation between mu0, epsilon_0, and c is exact

◆ q_e

auto ablastr::constant::SI::q_e = q_e_v<amrex::Real>
constexpr

elementary charge [C]

◆ q_e_v

template<typename T>
auto ablastr::constant::SI::q_e_v = static_cast<T>(1.602176634e-19)
constexpr

elementary charge [C] (variable template)

◆ r_e

auto ablastr::constant::SI::r_e = r_e_v<amrex::Real>
constexpr

classical electron radius = 1./(4*pi*epsilon_0) * q_e*q_e/(m_e*c*c) [m]

◆ r_e_v

template<typename T>
auto ablastr::constant::SI::r_e_v = static_cast<T>(2.8179403205e-15)
constexpr

classical electron radius = 1./(4*pi*epsilon_0) * q_e*q_e/(m_e*c*c) [m] (variable template)

◆ schwinger_field

template<typename T>
auto ablastr::constant::SI::schwinger_field = schwinger_field_v<amrex::Real>
constexpr

Schwinger electric field [V/m].

◆ schwinger_field_v

template<typename T>
auto ablastr::constant::SI::schwinger_field_v
constexpr
Initial value:
= static_cast<T>(
constexpr auto q_e_v
elementary charge [C] (variable template)
Definition constant.H:67
constexpr auto m_e_v
electron mass [kg] (variable template)
Definition constant.H:71
constexpr auto hbar_v
reduced Planck Constant = h / tau [J*s] (variable template)
Definition constant.H:83
constexpr auto c_v
vacuum speed of light [m/s] (variable template)
Definition constant.H:53

Schwinger electric field [V/m] (variable template)

◆ sqrt_4_pi_fine_structure_v

template<typename T>
auto ablastr::constant::SI::sqrt_4_pi_fine_structure_v = static_cast<T>(0.3028221207690299)
constexpr

sqrt(4*pi*alpha) is a constant used for the Heaviside Lorentz unit system (variable template)

◆ xi

double ablastr::constant::SI::xi = 1.3050122383827227e-52
constexpr

xi: nonlinearity parameter of Heisenberg-Euler effective theory = (2.*alpha**2*epsilon_0**2*hbar**3)/(45.*m_e**4*c**5)

◆ xi_c2

auto ablastr::constant::SI::xi_c2 = xi_c2_v<amrex::Real>
constexpr

xi times c2 = xi*c*c. This should be usable for single precision instead of xi; very close to smallest float32 number possible (1.2e-38)

◆ xi_c2_v

template<typename T>
auto ablastr::constant::SI::xi_c2_v = static_cast<T>(1.1728865075613984e-35)
constexpr

xi times c2 = xi*c*c. This should be usable for single precision instead of xi; very close to smallest float32 number possible (1.2e-38) (variable template)