Skip to content

Commit 91515a5

Browse files
authored
Update mu_0, alpha to enforce consistency between constants (#59)
* Update mu_0, alpha to enforce consistency between constants * Add comments to note differences from CODATA 2022
1 parent d9ac4a8 commit 91515a5

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

multi_physics/QED/QED_tests/test_picsar_phys_constants.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ void test_case_const_phys()
5050
static_cast<RealType>(1.0545718176461565e-34);
5151
const auto exp_vacuum_permittivity =
5252
static_cast<RealType>(8.8541878188e-12);
53+
// NOTE This is adjusted from the CODATA 2022 value 1.25663706127e-6,
54+
// so that the relation between exp_light_speed, exp_vacuum_permittivity,
55+
// and exp_vacuum_permeability is exact
5356
const auto exp_vacuum_permeability =
54-
static_cast<RealType>(1.25663706127e-6);
57+
static_cast<RealType>(1.2566370612685e-6);
58+
// NOTE This is calculated from alpha = mu_0/(4*pi)*q_e*q_e*c/hbar
59+
// and differs slightly from the CODATA 2022 value 0.0072973525643
5560
const auto exp_fine_structure =
56-
static_cast<RealType>(0.0072973525643);
61+
static_cast<RealType>(0.0072973525643330135);
5762
const auto exp_eV =
5863
static_cast<RealType>(1.602176634e-19);
5964
const auto exp_KeV =

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ namespace picsar::multi_physics::phys
2727
template<typename RealType = double>
2828
constexpr auto vacuum_permittivity = RealType(8.8541878188e-12);
2929

30+
// NOTE This is adjusted from the CODATA 2022 value 1.25663706127e-6,
31+
// so that the relation between exp_light_speed, exp_vacuum_permittivity,
32+
// and exp_vacuum_permeability is exact
3033
template<typename RealType = double>
31-
constexpr auto vacuum_permeability = RealType(1.25663706127e-6);
34+
constexpr auto vacuum_permeability = RealType(1.2566370612685e-6);
3235

36+
// NOTE This is calculated from alpha = mu_0/(4*pi)*q_e*q_e*c/hbar
37+
// and differs slightly from the CODATA 2022 value 0.0072973525643
3338
template<typename RealType = double>
34-
constexpr auto fine_structure = RealType(0.0072973525643);
39+
constexpr auto fine_structure = RealType(0.0072973525643330135);
3540

3641
template<typename RealType = double>
3742
constexpr auto eV = RealType(elementary_charge<>);
@@ -52,7 +57,7 @@ namespace picsar::multi_physics::phys
5257
//(unfortunately, sqrt is not constexpr)
5358
template<typename RealType = double>
5459
constexpr auto sqrt_4_pi_fine_structure =
55-
RealType(0.3028221207683449);
60+
RealType(0.3028221207690299);
5661

5762
//
5863
template<typename RealType = double>

0 commit comments

Comments
 (0)