OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Physics.h
Go to the documentation of this file.
1 //
2 // Class Physics
3 // A namespace defining various mathematical and physical constants.
4 //
5 // Copyright (c) 2015-2021, Christof Metzger-Kraus, Helmholtz-Zentrum Berlin
6 // Pedro Calvo, CIEMAT, Spain
7 // All rights reserved
8 //
9 // Implemented as part of the PhD thesis
10 // "Optimizing the radioisotope production of the novel AMIT
11 // superconducting weak focusing cyclotron"
12 //
13 // This file is part of OPAL.
14 //
15 // OPAL is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
22 //
23 #ifndef CLASSIC_Physics_HH
24 #define CLASSIC_Physics_HH
25 
26 
27 namespace Physics {
28 
30  constexpr double pi = 3.14159265358979323846;
31 
33  constexpr double two_pi = 2 * pi;
34 
36  constexpr double u_two_pi = 1.0 / two_pi;
37 
39  constexpr double e = 2.7182818284590452354;
40 
42  constexpr double log10e = 0.43429448190325182765;
43 
45  constexpr double rad2deg = 180.0 / pi;
46 
48  constexpr double deg2rad = 1.0 / rad2deg;
49 
51  constexpr double c = 299792458.0;
52 
54  constexpr double mu_0 = 1.25663706212e-06;
55 
57  constexpr double epsilon_0 = 8.8541878128e-12;
58 
60  constexpr double h_bar = 6.582119569e-25;
61 
63  constexpr double Avo = 6.02214076e23;
64 
66  constexpr double kB = 8.617333262e-5;
67 
69  constexpr double E_ryd = 13.605693122994e-9;
70 
72  constexpr double a0 = 5.29177210903e-11;
73 
75  constexpr double q_e = 1.602176634e-19;
76 
78  constexpr double alpha = 7.2973525693e-03;
79 
81  constexpr double amu = 0.93149410242;
82 
84  constexpr double m_e = 0.51099895000e-03;
85 
87  constexpr double r_e = 2.8179403262e-15;
88 
90  constexpr double lamda_e = 3.8615926796e-13;
91 
93  constexpr double a_e = 1.15965218128e-03;
94 
96  constexpr double m_p = 0.93827208816e+00;
97 
99  constexpr double r_p = 1.53469857e-18;
100 
102  constexpr double lamda_p = 2.10308910336e-16;
103 
105  constexpr double a_p = 1.792847386e+00;
106 
108  constexpr double z_p = 1;
109 
111  constexpr double m_c = 12 * amu;
112 
114  constexpr double m_hm = 1.00837 * amu;
115 
117  constexpr double m_u = 238.050787 * amu;
118 
120  constexpr double m_mu = 0.1056583755;
121 
123  constexpr double m_d = 2.013553212745 * amu;
124 
126  constexpr double m_xe = 124 * amu;
127 
129  constexpr double m_alpha = 4.001506179127 * amu;
130 
132  constexpr double m_h = 1.00782503224 * amu;
133 
135  constexpr double m_h2p = 2.01510 * amu;
136 
138  constexpr double m_h3p = 3.02293 * amu;
139 
140  constexpr double PMASS = 1.67262192369e-27; // kg
141 
142  constexpr double EMASS = 9.1093837015e-31; // kg
143 
144  constexpr double PCHARGE = 1.602176634e-19; // C
145 
146  // alfven current
147  constexpr double Ia = 17.045148e+03;
148  // e/m - electron charge to mass quotient
149  constexpr double e0m = 1.75882001076e+11;
150  // e/mc
151  constexpr double e0mc = e0m / c;
152 };
153 
154 #endif // CLASSIC_Physics_HH
Definition: Air.h:27
constexpr double e0m
Definition: Physics.h:149
constexpr double lamda_e
The reduced Compton wave length for electrons in m.
Definition: Physics.h:90
constexpr double Ia
Definition: Physics.h:147
constexpr double u_two_pi
The value of.
Definition: Physics.h:36
constexpr double m_xe
The xenon rest mass in GeV.
Definition: Physics.h:126
constexpr double kB
Boltzman's constant in eV/K.
Definition: Physics.h:66
constexpr double m_alpha
The alpha particle rest mass in GeV.
Definition: Physics.h:129
constexpr double m_u
The uranium rest mass in GeV.
Definition: Physics.h:117
constexpr double e0mc
Definition: Physics.h:151
constexpr double amu
The atomic mass unit energy equivalent in GeV.
Definition: Physics.h:81
constexpr double two_pi
The value of.
Definition: Physics.h:33
constexpr double lamda_p
The reduced Compton wave length for protons in m.
Definition: Physics.h:102
constexpr double deg2rad
The conversion factor from degrees to radians.
Definition: Physics.h:48
constexpr double a_p
The magnetic momentum anomaly for protons, no dimension.
Definition: Physics.h:105
constexpr double a0
Bohr radius in m.
Definition: Physics.h:72
constexpr double h_bar
The reduced Planck constant in GeVs.
Definition: Physics.h:60
constexpr double epsilon_0
The permittivity of vacuum in As/Vm.
Definition: Physics.h:57
constexpr double EMASS
Definition: Physics.h:142
constexpr double Avo
The Avogadro's number.
Definition: Physics.h:63
constexpr double PMASS
Definition: Physics.h:140
constexpr double m_p
The proton rest mass in GeV.
Definition: Physics.h:96
constexpr double m_h3p
The H3+ rest mass in GeV.
Definition: Physics.h:138
constexpr double PCHARGE
Definition: Physics.h:144
constexpr double m_h2p
The H2+ rest mass in GeV.
Definition: Physics.h:135
constexpr double z_p
The charge of proton.
Definition: Physics.h:108
constexpr double alpha
The fine structure constant, no dimension.
Definition: Physics.h:78
constexpr double q_e
The elementary charge in As.
Definition: Physics.h:75
constexpr double a_e
The magnetic momentum anomaly for electrons, no dimension.
Definition: Physics.h:93
constexpr double m_e
The electron rest mass in GeV.
Definition: Physics.h:84
constexpr double m_hm
The H- rest mass in GeV.
Definition: Physics.h:114
constexpr double E_ryd
Rydberg's energy (Rydberg's constant times hc) in GeV.
Definition: Physics.h:69
constexpr double m_h
The hydrogen atom rest mass in GeV.
Definition: Physics.h:132
constexpr double m_mu
The muon rest mass in GeV.
Definition: Physics.h:120
constexpr double e
The value of.
Definition: Physics.h:39
constexpr double mu_0
The permeability of vacuum in Vs/Am.
Definition: Physics.h:54
constexpr double c
The velocity of light in m/s.
Definition: Physics.h:51
constexpr double m_c
The carbon rest mass in GeV.
Definition: Physics.h:111
constexpr double r_p
The classical proton radius in m.
Definition: Physics.h:99
constexpr double m_d
The deuteron rest mass in GeV.
Definition: Physics.h:123
constexpr double pi
The value of.
Definition: Physics.h:30
constexpr double r_e
The classical electron radius in m.
Definition: Physics.h:87
constexpr double log10e
The logarithm of $e$ to the base 10.
Definition: Physics.h:42
constexpr double rad2deg
The conversion factor from radians to degrees.
Definition: Physics.h:45