WarpX
Loading...
Searching...
No Matches
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.8541878188e-12_rt;
50 static constexpr auto mu0 = 1.2566370612685e-06_rt;
52 static constexpr auto q_e = 1.602176634e-19_rt;
54 static constexpr auto m_e = 9.1093837139e-31_rt;
56 static constexpr auto m_p = 1.67262192595e-27_rt;
58 static constexpr auto m_u = 1.66053906892e-27_rt;
59
61 static constexpr auto hbar = 1.0545718176461565e-34_rt;
65 static constexpr auto alpha = 0.0072973525643330135_rt;
67 static constexpr auto r_e = 2.8179403205e-15_rt;
69 static constexpr double xi = 1.3050122383827227e-52;
71 static constexpr auto xi_c2 = 1.1728865075613984e-35_rt;
72
74 static constexpr auto kb = 1.380649e-23_rt;
75
77 static constexpr auto eV = q_e;
79 static constexpr auto MeV = q_e * 1e6_rt;
81 static constexpr auto eV_invc = eV / c;
83 static constexpr auto MeV_invc = MeV / c;
85 static constexpr auto eV_invc2 = eV / (c * c);
87 static constexpr auto MeV_invc2 = MeV / (c * c);
88 } // namespace SI
89} // namespace ablastr::constant
90
91#endif // ABLASTR_CONSTANT_H_
Definition constant.H:40
static constexpr auto r_e
classical electron radius = 1./(4*pi*ep0) * q_e*q_e/(m_e*c*c) [m]
Definition constant.H:67
static constexpr auto alpha
Definition constant.H:65
static constexpr auto MeV
1 MeV in [J]
Definition constant.H:79
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:71
static constexpr auto MeV_invc
1 MeV/c in [kg*m/s]
Definition constant.H:83
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:81
static constexpr auto MeV_invc2
1 MeV/c^2 in [kg]
Definition constant.H:87
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:77
static constexpr auto m_p
proton mass [kg]
Definition constant.H:56
static constexpr auto kb
Boltzmann constant (exact) [J/K].
Definition constant.H:74
static constexpr auto mu0
Definition constant.H:50
static constexpr auto hbar
reduced Planck Constant = h / tau [J*s]
Definition constant.H:61
static constexpr auto m_e
electron mass [kg]
Definition constant.H:54
static constexpr auto eV_invc2
1 eV/c^2 in [kg]
Definition constant.H:85
static constexpr double xi
xi: nonlinearity parameter of Heisenberg-Euler effective theory = (2.*alpha*alpha*ep0*ep0*hbar*hbar*h...
Definition constant.H:69
static constexpr auto m_u
dalton: unified atomic mass unit [kg]
Definition constant.H:58
static constexpr auto q_e
elementary charge [C]
Definition constant.H:52
Definition constant.H:19
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