OPAL (Object Oriented Parallel Accelerator Library) 2022.1
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
27namespace 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 c = 299792458.0;
46
48 constexpr double mu_0 = 1.25663706212e-06;
49
51 constexpr double epsilon_0 = 8.8541878128e-12;
52
54 constexpr double h_bar = 6.582119569e-25;
55
57 constexpr double Avo = 6.02214076e23;
58
60 constexpr double kB = 8.617333262e-5;
61
63 constexpr double E_ryd = 13.605693122994e-9;
64
66 constexpr double a0 = 5.29177210903e-11;
67
69 constexpr double q_e = 1.602176634e-19;
70
72 constexpr double alpha = 7.2973525693e-03;
73
75 constexpr double amu = 0.93149410242;
76
78 constexpr double m_e = 0.51099895000e-03;
79
81 constexpr double r_e = 2.8179403262e-15;
82
84 constexpr double lamda_e = 3.8615926796e-13;
85
87 constexpr double a_e = 1.15965218128e-03;
88
90 constexpr double m_p = 0.93827208816e+00;
91
93 constexpr double r_p = 1.53469857e-18;
94
96 constexpr double lamda_p = 2.10308910336e-16;
97
99 constexpr double a_p = 1.792847386e+00;
100
102 constexpr double z_p = 1;
103
105 constexpr double m_c = 11.9967074146787 * amu;
106
108 constexpr double m_hm = 1.00837 * amu;
109
111 constexpr double m_u = 237.999501 * amu;
112
114 constexpr double m_mu = 0.1056583755;
115
117 constexpr double m_d = 2.013553212745 * amu;
118
120 constexpr double m_xe = 128.87494026 * amu;
121
123 constexpr double m_alpha = 4.001506179127 * amu;
124
126 constexpr double m_h = 1.00782503224 * amu;
127
129 constexpr double m_h2p = 2.01510 * amu;
130
132 constexpr double m_h3p = 3.02293 * amu;
133
134 constexpr double PMASS = 1.67262192369e-27; // kg
135
136 constexpr double EMASS = 9.1093837015e-31; // kg
137
138 constexpr double PCHARGE = 1.602176634e-19; // C
139
140 // alfven current
141 constexpr double Ia = 17.045148e+03;
142 // e/m - electron charge to mass quotient
143 constexpr double e0m = 1.75882001076e+11;
144 // e/mc
145 constexpr double e0mc = e0m / c;
146};
147
148#endif // CLASSIC_Physics_HH
Definition: Air.h:27
constexpr double e0m
Definition: Physics.h:143
constexpr double lamda_e
The reduced Compton wave length for electrons in m.
Definition: Physics.h:84
constexpr double Ia
Definition: Physics.h:141
constexpr double u_two_pi
The value of.
Definition: Physics.h:36
constexpr double m_xe
The xenon-129 (fully-stripped) rest mass in GeV.
Definition: Physics.h:120
constexpr double kB
Boltzman's constant in eV/K.
Definition: Physics.h:60
constexpr double m_alpha
The alpha particle rest mass in GeV.
Definition: Physics.h:123
constexpr double m_u
The uranium-238 (fully-stripped) rest mass in GeV.
Definition: Physics.h:111
constexpr double e0mc
Definition: Physics.h:145
constexpr double amu
The atomic mass unit energy equivalent in GeV.
Definition: Physics.h:75
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:96
constexpr double a_p
The magnetic momentum anomaly for protons, no dimension.
Definition: Physics.h:99
constexpr double a0
Bohr radius in m.
Definition: Physics.h:66
constexpr double h_bar
The reduced Planck constant in GeVs.
Definition: Physics.h:54
constexpr double epsilon_0
The permittivity of vacuum in As/Vm.
Definition: Physics.h:51
constexpr double EMASS
Definition: Physics.h:136
constexpr double Avo
The Avogadro's number.
Definition: Physics.h:57
constexpr double PMASS
Definition: Physics.h:134
constexpr double m_p
The proton rest mass in GeV.
Definition: Physics.h:90
constexpr double m_h3p
The H3+ rest mass in GeV.
Definition: Physics.h:132
constexpr double PCHARGE
Definition: Physics.h:138
constexpr double m_h2p
The H2+ rest mass in GeV.
Definition: Physics.h:129
constexpr double z_p
The charge of proton.
Definition: Physics.h:102
constexpr double alpha
The fine structure constant, no dimension.
Definition: Physics.h:72
constexpr double q_e
The elementary charge in As.
Definition: Physics.h:69
constexpr double a_e
The magnetic momentum anomaly for electrons, no dimension.
Definition: Physics.h:87
constexpr double m_e
The electron rest mass in GeV.
Definition: Physics.h:78
constexpr double m_hm
The H- rest mass in GeV.
Definition: Physics.h:108
constexpr double E_ryd
Rydberg's energy (Rydberg's constant times hc) in GeV.
Definition: Physics.h:63
constexpr double m_h
The hydrogen atom rest mass in GeV.
Definition: Physics.h:126
constexpr double m_mu
The muon rest mass in GeV.
Definition: Physics.h:114
constexpr double e
The value of.
Definition: Physics.h:39
constexpr double mu_0
The permeability of vacuum in Vs/Am.
Definition: Physics.h:48
constexpr double c
The velocity of light in m/s.
Definition: Physics.h:45
constexpr double m_c
The carbon-12 (fully-stripped) rest mass in GeV.
Definition: Physics.h:105
constexpr double r_p
The classical proton radius in m.
Definition: Physics.h:93
constexpr double m_d
The deuteron rest mass in GeV.
Definition: Physics.h:117
constexpr double pi
The value of.
Definition: Physics.h:30
constexpr double r_e
The classical electron radius in m.
Definition: Physics.h:81
constexpr double log10e
The logarithm of $e$ to the base 10.
Definition: Physics.h:42