Skip to content

Cosmic Ray Transport

yanfeij edited this page Apr 15, 2023 · 8 revisions

Governing equations

The cosmic ray module solves the two moment equations for cosmic ray transport including both diffusion and streaming as described by Jiang & Oh (2018, ApJ, 854, 5). Anisotropic diffusion with respect to the direction of magnetic field is also allowed.

Configuration

  • use -cr to turn on the cosmic ray transport module

Input File

All the parameters for the cosmic ray module are set in the <cr> block. The reduced speed of light, which is the maximum speed cosmic rays are allowed to travel needs to be set.

    <cr>
    vmax            = 1000      # maximum speed of cosmic rays in the same unit as flow velocity

User defined Opacity

All the absorption and scattering opacities can be calculated based on local gas quantities. This is done with a user defined opacity function, which can be enrolled using the function EnrollOpacityFunction provided by the radiation class. Opacities in the ghost cells also need to be calculated in this function.

Clone this wiki locally