Skip to content

Commit 18b9c75

Browse files
committed
update physical constants to CODATA 2022
1 parent 47b3939 commit 18b9c75

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

multi_physics/QED/QED_tests/test_picsar_phys_constants.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,25 @@ T constexpr tolerance()
3535

3636
// ------------- Tests --------------
3737

38-
// ***Test physical constants
38+
// ***Test physical constants (CODATA 2022)
3939

4040
template<typename RealType>
4141
void test_case_const_phys()
4242
{
4343
const auto exp_electron_mass =
44-
static_cast<RealType>(9.1093837015e-31);
44+
static_cast<RealType>(9.1093837139e-31);
4545
const auto exp_elementary_charge =
4646
static_cast<RealType>(1.602176634e-19);
4747
const auto exp_light_speed =
4848
static_cast<RealType>(299792458.);
4949
const auto exp_reduced_plank =
5050
static_cast<RealType>(1.054571817e-34);
5151
const auto exp_vacuum_permittivity =
52-
static_cast<RealType>(8.8541878128e-12);
52+
static_cast<RealType>(8.8541878188e-12);
5353
const auto exp_vacuum_permeability =
54-
static_cast<RealType>(1.25663706212e-6);
54+
static_cast<RealType>(1.25663706127e-6);
5555
const auto exp_fine_structure =
56-
static_cast<RealType>(0.0072973525693);
56+
static_cast<RealType>(0.0072973525643);
5757
const auto exp_eV =
5858
static_cast<RealType>(1.602176634e-19);
5959
const auto exp_KeV =
@@ -66,11 +66,11 @@ void test_case_const_phys()
6666
static_cast<RealType>(sqrt(
6767
4.0*pi<double>*fine_structure<double>));
6868
const auto exp_classical_electron_radius =
69-
static_cast<RealType>(2.81794032620493e-15);
69+
static_cast<RealType>(2.8179403205e-15);
7070
const auto exp_schwinger_field =
71-
static_cast<RealType>(1.32328547494817e18);
71+
static_cast<RealType>(1.323285478550767e18);
7272
const auto exp_tau_e =
73-
static_cast<RealType>(9.39963715232933e-24);
73+
static_cast<RealType>(9.39963713329973e-24);
7474

7575
BOOST_CHECK_SMALL(
7676
(electron_mass<RealType>-exp_electron_mass)/exp_electron_mass,

multi_physics/QED/include/picsar_qed/physics/phys_constants.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
namespace picsar::multi_physics::phys
1111
{
12-
13-
// Some useful physical constants in SI units
12+
// Some useful physical constants in SI units (CODATA 2022)
1413
template<typename RealType = double>
15-
constexpr auto electron_mass = RealType(9.1093837015e-31);
14+
constexpr auto electron_mass = RealType(9.1093837139e-31);
1615

1716
template<typename RealType = double>
1817
constexpr auto elementary_charge = RealType(1.602176634e-19);
@@ -24,31 +23,31 @@ namespace picsar::multi_physics::phys
2423
constexpr auto reduced_plank = RealType(1.054571817e-34);
2524

2625
template<typename RealType = double>
27-
constexpr auto vacuum_permittivity = RealType(8.8541878128e-12);
26+
constexpr auto vacuum_permittivity = RealType(8.8541878188e-12);
2827

2928
template<typename RealType = double>
30-
constexpr auto vacuum_permeability = RealType(1.25663706212e-6);
29+
constexpr auto vacuum_permeability = RealType(1.25663706127e-6);
3130

3231
template<typename RealType = double>
33-
constexpr auto fine_structure = RealType(0.0072973525693);
32+
constexpr auto fine_structure = RealType(0.0072973525643);
3433

3534
template<typename RealType = double>
36-
constexpr auto eV = RealType(1.602176634e-19);
35+
constexpr auto eV = RealType(elementary_charge);
3736

3837
template<typename RealType = double>
39-
constexpr auto KeV = RealType(1.602176634e-16);
38+
constexpr auto KeV = RealType(elementary_charge*1e3);
4039

4140
template<typename RealType = double>
42-
constexpr auto MeV = RealType(1.602176634e-13);
41+
constexpr auto MeV = RealType(elementary_charge*1e6);
4342

4443
template<typename RealType = double>
45-
constexpr auto GeV = RealType(1.602176634e-10);
44+
constexpr auto GeV = RealType(elementary_charge*1e9);
4645

4746
//This constant is used for the Heaviside Lorentz unit system
4847
//(unfortunately, sqrt is not constexpr)
4948
template<typename RealType = double>
5049
constexpr auto sqrt_4_pi_fine_structure =
51-
RealType(0.302822120872089);
50+
RealType(0.3028221207683449);
5251

5352
//Intermediate calculations of the following quantities are performed with
5453
//double precision to avoid numerical issues

0 commit comments

Comments
 (0)