CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
65 stars 66 forks source link

Different magnetic fields models #409

Closed cainaoliveira closed 1 year ago

cainaoliveira commented 1 year ago

Hi, I would like to know if it is possible to include different magnetic field models in the simulations in a simple way. For example, sinusoidal magnetic fields (in space).

Thank you very much in advance, Cainã

LeanderSchlegel commented 1 year ago

Hi Cainã, thank you for your question, yes that is possible, the most generic way to use new magnetic fields could be to load a discretized version of that field from a file onto the 3d vector grid Grid3f that CRPropa offers, in that case you could sample the desired field e.g. with python and save it into a txt file, that can afterwards be loaded into CRPropa. Another possibility would be to write a new magnetic field module, that could then be included into the simulation like the existing magnetic field modules provided. Cheers, Leander