Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example notebook on confinement of cosmic rays in heliosphere & galaxy using PlasmaPy #588

Open
namurphy opened this issue Jul 31, 2023 · 0 comments

Comments

@namurphy
Copy link

namurphy commented Jul 31, 2023

PlasmaPy has a RelativisticBody class which accepts

  • A particle-like, and
  • One of velocity, momentum, total energy, kinetic energy, $\frac{v}{c}$, or Lorentz factor.

It can then convert to the others of velocity, momentum, etc. PlasmaPy also has a gyroradius function which can accept a RelativisticBody. Both of these make use of astropy.units.

With the above functionality, we can do an order of magnitude estimate of the maximum energy of cosmic rays that can be confined by the heliosphere and our galaxy. We'd take a characteristic magnetic field strength for each environment, and then find the energy of each particle corresponding to a gyroradius that's comparable to the size of the system (i.e. the radius of the heliosphere or probably the vertical scale height of the Milky Way).

This may also be a good opportunity to show the limits of numerical precision: for ultra high-energy cosmic rays, the difference between the particle velocity and $c$ is smaller than machine precision, even for NumPy long doubles.

This follows up on a conversation with @kelle, @pllim, @eteq, @hamogu. Thank you!

Corresponding issue: PlasmaPy/PlasmaPy#1538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants