Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions multi_physics/QED/QED_tests/test_picsar_phys_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,15 @@ void test_case_const_phys()
static_cast<RealType>(1.0545718176461565e-34);
const auto exp_vacuum_permittivity =
static_cast<RealType>(8.8541878188e-12);
// NOTE This is adjusted from the CODATA 2022 value 1.25663706127e-6,
// so that the relation between exp_light_speed, exp_vacuum_permittivity,
// and exp_vacuum_permeability is exact
const auto exp_vacuum_permeability =
static_cast<RealType>(1.25663706127e-6);
static_cast<RealType>(1.2566370612685e-6);
// NOTE This is calculated from alpha = mu_0/(4*pi)*q_e*q_e*c/hbar
// and differs slightly from the CODATA 2022 value 0.0072973525643
const auto exp_fine_structure =
static_cast<RealType>(0.0072973525643);
static_cast<RealType>(0.0072973525643330135);
const auto exp_eV =
static_cast<RealType>(1.602176634e-19);
const auto exp_KeV =
Expand Down
11 changes: 8 additions & 3 deletions multi_physics/QED/include/picsar_qed/physics/phys_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ namespace picsar::multi_physics::phys
template<typename RealType = double>
constexpr auto vacuum_permittivity = RealType(8.8541878188e-12);

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

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

template<typename RealType = double>
constexpr auto eV = RealType(elementary_charge<>);
Expand All @@ -52,7 +57,7 @@ namespace picsar::multi_physics::phys
//(unfortunately, sqrt is not constexpr)
template<typename RealType = double>
constexpr auto sqrt_4_pi_fine_structure =
RealType(0.3028221207683449);
RealType(0.3028221207690299);
Comment on lines 57 to +60
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check this too, since it is hard coded.


//
template<typename RealType = double>
Expand Down
Loading