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

New advection fields #441

Closed sophieaerdker closed 9 months ago

sophieaerdker commented 9 months ago

This PR adds new shock profiles for simulating diffusive shock acceleration to the AdvectionField module. In the 2023 ICRC proceedings the advection field OneDimensionalAdvectionShock was used to obtain the time-dependent spectra at a 1D cartesian shock. Additional shock profiles allow for oblique shocks and 1D radial shocks.

JulienDoerner commented 9 months ago

The new module has some set-function for the parameters. For consistency also get-functions would be good.

And for the functionality it would be good if the position of the shocks could also be shifted, to allow more customized simulations.

sophieaerdker commented 9 months ago

I added the get-functions and changed the name of OneDimensionalAdvectionShock to OneDimensionalCartesianShock to set apart from OneDimensionalSphericalShock.

I think the change of the shock position is not necessary for the 1D cartesian case, since it's only for testing purposes and basically all other (analytical) works have the 1D shock at x=0. You can simply set your environment around it and it's not suitable for more complex scenarios anyways.