# Interpolation of turbulent magnetic fields and its consequences on   diffusive cosmic ray propagation

**Authors:** L. Schlegel, A. Frie, B. Eichmann, P. Reichherzer, J. Becker Tjus

arXiv: 1907.09934 · 2021-07-14

## TL;DR

This paper compares interpolation methods for turbulent magnetic fields in cosmic ray simulations, finding nearest neighbor interpolation most efficient and demonstrating a grid-less magnetic field generation method with high accuracy for large particle numbers.

## Contribution

It evaluates different interpolation routines and introduces an optimized grid-less magnetic field generation method for improved cosmic ray propagation simulations.

## Key findings

- Nearest neighbor interpolation is fastest and most accurate among tested methods.
- The grid-less magnetic field generation method is over ten times faster with high accuracy.
- Using more than 100 wave-modes yields diffusion coefficient errors below a few percent.

## Abstract

Numerical simulations of the propagation of charged particles through magnetic fields solving the equation of motion often leads to the usage of an interpolation in case of discretely defined magnetic fields, typically given on a homogeneous grid structure. However, the interpolation method influences the magnetic field properties on the scales of the grid spacing and the choice of interpolation routine can therefore change the result. At the same time, it provides an impact, i.e.\ error, on the spatial particle distribution. We compare three different interpolation routines -- trilinear, tricubic and nearest neighbor interpolation -- in the case of turbulent magnetic fields and show that there is no benefit in using trilinear interpolation. We show that in comparison, the nearest neighbor interpolation provides the best performance, i.e.\ requires least CPU time and results in the smallest error. In addition, we optimize the performance of an algorithm that generates a continuous grid-less turbulent magnetic field by more than an order of magnitude. This continuous method becomes practicable for the simulation of large particle numbers and its accuracy is only limited by the used number of wave-modes. We show that by using more than 100 wave-modes the diffusive behavior of the spatial particle distribution in form of the diffusion coefficient is determined with an error less than a few percentage.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1907.09934/full.md

## Figures

21 figures with captions in the complete paper: https://tomesphere.com/paper/1907.09934/full.md

## References

30 references — full list in the complete paper: https://tomesphere.com/paper/1907.09934/full.md

---
Source: https://tomesphere.com/paper/1907.09934