Skip to content

Conversation

@EZoni
Copy link
Member

@EZoni EZoni commented Apr 1, 2025

Update the values of the vacuum permeability $\mu_0$ and the fine structure constant $\alpha$ to enforce consistency between constants (e.g., $c^2 = 1/(\epsilon_0 \mu_0)$, etc.), following what is done in BLAST-WarpX/warpx#5661.

I think we should merge #60 first and then rebase here.

Comment on lines 52 to +55
//(unfortunately, sqrt is not constexpr)
template<typename RealType = double>
constexpr auto sqrt_4_pi_fine_structure =
RealType(0.3028221207683449);
RealType(0.3028221207690299);
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.

@dpgrote
Copy link
Member

dpgrote commented Apr 1, 2025

Note that in WarpX, I added some comments in the code noting why the constants differ from the CODATA2022 values. Maybe do the same here.

Copy link
Member

@dpgrote dpgrote left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@lucafedeli88 lucafedeli88 left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @EZoni , for this PR (and thanks @dpgrote for having reviewed).

I approve these changes.

@lucafedeli88 lucafedeli88 merged commit 91515a5 into ECP-WarpX:development Apr 2, 2025
6 checks passed
@EZoni EZoni deleted the fix_phys_const_values branch April 2, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants