WarpX
constant.H
Go to the documentation of this file.
1 /* Copyright 2019-2022 Andrew Myers, Luca Fedeli, Maxence Thevenet,
2  * Weiqun Zhang, Axel Huebl
3  *
4  * This file is part of WarpX.
5  *
6  * License: BSD-3-Clause-LBNL
7  */
8 #ifndef ABLASTR_CONSTANT_H_
9 #define ABLASTR_CONSTANT_H_
10 
11 #include <AMReX_REAL.H>
12 
13 
16 {
18  namespace math
19  {
20  using namespace amrex::literals;
21 
23  static constexpr amrex::Real pi = 3.14159265358979323846_rt;
24 
26  static constexpr amrex::Real tau = 2.0_rt * pi;
27  } // namespace math
28 
39  namespace SI
40  {
41  using namespace amrex::literals;
42 
44  static constexpr auto c = 299'792'458._rt;
46  static constexpr auto ep0 = 8.8541878128e-12_rt;
48  static constexpr auto mu0 = 1.25663706212e-06_rt;
50  static constexpr auto q_e = 1.602176634e-19_rt;
52  static constexpr auto m_e = 9.1093837015e-31_rt;
54  static constexpr auto m_p = 1.67262192369e-27_rt;
56  static constexpr auto m_u = 1.66053906660e-27_rt;
57 
59  static constexpr auto hbar = 1.054571817e-34_rt;
61  static constexpr auto alpha = 0.007297352573748943_rt;
63  static constexpr auto r_e = 2.817940326204929e-15_rt;
65  static constexpr double xi = 1.3050122447005176e-52;
67  static constexpr auto xi_c2 = 1.1728865132395492e-35_rt;
68 
70  static constexpr auto kb = 1.380649e-23_rt;
71 
73  static constexpr auto eV = q_e;
75  static constexpr auto MeV = q_e * 1e6_rt;
77  static constexpr auto eV_invc = eV / c;
79  static constexpr auto MeV_invc = MeV / c;
81  static constexpr auto eV_invc2 = eV / (c * c);
83  static constexpr auto MeV_invc2 = MeV / (c * c);
84  } // namespace SI
85 } // namespace ablastr::constant
86 
87 #endif // ABLASTR_CONSTANT_H_
static constexpr auto r_e
classical electron radius = 1./(4*pi*ep0) * q_e*q_e/(m_e*c*c) [m]
Definition: constant.H:63
static constexpr auto alpha
fine-structure constant = mu0/(4*pi)*q_e*q_e*c/hbar [dimensionless]
Definition: constant.H:61
static constexpr auto MeV
1 MeV in [J]
Definition: constant.H:75
static constexpr auto xi_c2
xi times c2 = xi*c*c. This should be usable for single precision instead of xi; very close to smalles...
Definition: constant.H:67
static constexpr auto MeV_invc
1 MeV/c in [kg*m/s]
Definition: constant.H:79
static constexpr auto c
vacuum speed of light [m/s]
Definition: constant.H:44
static constexpr auto eV_invc
1 eV/c in [kg*m/s]
Definition: constant.H:77
static constexpr auto MeV_invc2
1 MeV/c^2 in [kg]
Definition: constant.H:83
static constexpr auto ep0
vacuum permittivity: dielectric permittivity of vacuum [F/m]
Definition: constant.H:46
static constexpr auto eV
1 eV in [J]
Definition: constant.H:73
static constexpr auto m_p
proton mass [kg]
Definition: constant.H:54
static constexpr auto kb
Boltzmann constant (exact) [J/K].
Definition: constant.H:70
static constexpr auto mu0
vacuum permeability: magnetic permeability of vacuum = 4.0e-7 * pi [H/m]
Definition: constant.H:48
static constexpr auto hbar
reduced Planck Constant = h / tau [J*s]
Definition: constant.H:59
static constexpr auto m_e
electron mass [kg]
Definition: constant.H:52
static constexpr auto eV_invc2
1 eV/c^2 in [kg]
Definition: constant.H:81
static constexpr double xi
xi: nonlinearity parameter of Heisenberg-Euler effective theory = (2.*alpha*alpha*ep0*ep0*hbar*hbar*h...
Definition: constant.H:65
static constexpr auto m_u
dalton: unified atomic mass unit [kg]
Definition: constant.H:56
static constexpr auto q_e
elementary charge [C]
Definition: constant.H:50
static constexpr amrex::Real tau
https://tauday.com/tau-manifesto
Definition: constant.H:26
static constexpr amrex::Real pi
ratio of a circle's circumference to its diameter
Definition: constant.H:23
Definition: constant.H:16