Galactic Cosmic Rays
Propagation of Galactic cosmic rays can be done with the single-particle approach (solving the equation of motion) or with an ensemble averaged ansatz (solving the transport equation for a particle distribution). The latter one is explained in section “Diffusion of Cosmic Rays”. The single-particle approach is demonstrated in the following example.
Diffusion of Cosmic Rays
Diffusion of cosmic rays can be modeled in an ensemble averaged way using transport equations. In CRPropa this is done based on stochastic differential equations (SDEs) which are mathematically equivalent to the more familar transport equations.
The first notebooks give an overview how to set up a simulation using a user-defined diffusion coefficient.
- Diffusion Validation I
- This notebook simulates a diffusion process in a homogeneous background magnetic field. The diffusion tensor is anisotropic, meaning the parallel component is larger than the perpendicular component (\(\kappa_\parallel = 10\cdot\kappa_\perp\)).
- Distribution in x, y and z
- Use the absolute distance from origin \(|x|, |y|, |z|\) and compare to analytical expectations.
- Calculate the pValue of the \(\chi^2\)-test to prove the visual statement from above.
- Diffusion Validation II
- This notebbok simulates a diffusion process in a homogenous background magnetic field. The diffusion tensor is anisotropic, meaning the parallel component is larger than the perpendicular component (\(\kappa_\parallel = 10\cdot\kappa_\perp\)). Additionally, a wind in a perpendicular direction is included.
- Anderson Darling Test
- Calculate the mean and variance
Advection and Adiabatic Energy Changes
Advection in non-divergence-free velocity fields causes adiabatic energy changes, which can be modeled following the next examples.
Diffusive Shock Acceleration
Diffusive shock acceleration or first order Fermi acceleration can be modeled in the diffusive picture as an interplay between diffusion, advection and adiabatic cooling. Simple shock configurations are shown in the following example notebook.
Momentum Diffusion
Momentum diffusion or second order Fermi acceleration is explained in the following example notebook.
Example of diffusion in the Milky way
Gas Densities
The last two examples show how to use the gas density fields. They can be used to, e.g., model the CR source distribution and will later be used as target fields for hadron-hadron interation.