Modeling Cosmic-Ray Transport: A CRPropa based stochastic differential equation solver

Lukas Merten,Sophie Aerdker
2024-10-02
Abstract:We present a new code that significantly extends CRPropa's capabilities to model the ensemble averaged transport of charged cosmic rays in arbitrary turbulent magnetic fields. The software is based on solving a set of stochastic differential equations (SDEs). In this work we give detailed instructions to transform a transport equation, usually given as a partial differential equation, into a Fokker-Planck equation and further into the corresponding set of SDEs. Furthermore, detailed tests of the algorithms are done and different sources of uncertainties are compared to each other. So to some extend, this work serves as a technical reference for existing and upcoming work using the new generalized SDE solver based on the CRPropa framework. On the other hand, the new flexibility allowed us to implement first test cases on continuous particle injection and focused pitch angle diffusion. For the latter one we show that focused pitch angle diffusion leads to a drift velocity along the field lines that is defined by the fixed points of the pitch angle diffusion equation.
High Energy Astrophysical Phenomena
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to model the ensemble - average transport of charged cosmic rays in an arbitrary turbulent magnetic field. Specifically, the authors have developed a new code, which significantly extends the capabilities of CRPropa for simulating the propagation behavior of high - energy cosmic rays in complex background magnetic fields. By solving a set of stochastic differential equations (SDEs), this code can more flexibly handle issues such as continuous particle injection and focused pitch - angle diffusion. In addition, the paper also details how to convert the transport equation into the Fokker - Planck equation and further into the corresponding SDEs, and conducts detailed tests on the algorithm, comparing different sources of uncertainty. Therefore, this work not only provides a technical reference for existing and future research using the new generalized SDE solver based on the CRPropa framework, but also presents preliminary test cases of new features, such as continuous particle injection and focused pitch - angle diffusion, especially the latter, which causes the drift velocity along the magnetic field line to be defined by the fixed point of the pitch - angle diffusion equation. ### Main problems solved: 1. **Extension of CRPropa's functions**: Develop a new code based on a stochastic differential equation solver to better simulate the transport of charged cosmic rays in complex magnetic fields. 2. **Handling of continuous particle injection and focused pitch - angle diffusion**: By introducing a new SDE solver, these complex phenomena can be handled more flexibly. 3. **Technical reference**: Provide detailed algorithm tests and uncertainty analysis to provide technical support for subsequent research. ### Specific methods: - **Conversion from transport equation to SDE**: Describe in detail how to convert the transport equation into the Fokker - Planck equation and further into the stochastic differential equation. - **Algorithm testing**: Conduct detailed tests on the algorithm and compare uncertainties from different sources. - **Preliminary test cases**: Present the preliminary test results of continuous particle injection and focused pitch - angle diffusion, especially the drift velocity caused by the latter. ### Application areas: - **Astrophysics**: Propagation of high - energy cosmic rays. - **Other fields**: From biology to neural computing, any field involving diffusive transport or stochastic differential equations. ### Key formulas: 1. **Focused pitch - angle transport equation**: \[ \frac{\partial f}{\partial t}=\frac{\partial}{\partial \mu}\left(D_{\mu\mu}\frac{\partial f}{\partial \mu}\right)-\frac{\partial}{\partial \mu}\left((1 - \mu^{2})\frac{v}{2L(s)}f\right)-\frac{\partial}{\partial s}(\mu v f)+S \] where \(f\) is the distribution function, \(\mu\) is the cosine of the pitch - angle, \(v\) is the particle velocity, \(D_{\mu\mu}\) is the pitch - angle diffusion coefficient, \(L(s)\) is the focusing length, \(S\) is the source/sink term, and \(s\) is the parameterization parameter of the magnetic field line. 2. **Transport equation for spatial and momentum diffusion**: \[ \frac{\partial f}{\partial t}=\nabla\cdot(\hat{\kappa}\nabla f - v f)-\mathbf{w}\cdot\nabla f+\frac{p}{3}\nabla\cdot\mathbf{w}\frac{\partial f}{\partial p}+\frac{1}{p^{2}}\frac{\partial}{\partial p}\left(p^{2}D_{pp}\frac{\partial f}{\partial p}\right)-L f+S \] where \(\hat{\kappa}\) is the space