-
Notifications
You must be signed in to change notification settings - Fork 32
The MHD implementation utilizes the VL+CT integrator described in Stone & Gardiner 2009 with the HLLD Riemann solver from Miyoshi & Kusano 2005; details of the Cholla implementation and performance can be found in Caddy & Schneider 2024. Interface reconstruction is supported in first, second, and third order with the following methods: Piecewise Constant Method (PCM), Piecewise Linear Method with limiting in the Characteristic Variables (PLMC)(Stone et al. 2005), and Piecewise Parabolic Method in the Characteristic Variables (PPMC)(Felker & Stone 2018).
The VL+CT integrator utilizes a staggered grid with the magnetic fields centered at cell faces rather than cell centers. All magnetic fields are stored at the i+1/2 interface.
To turn on MHD, build with the MHD
flag. In addition, MHD only supports the Van Leer (VL
) integrator, the HLLD
Riemann solver, and the PCM
, PLMC
, and PPMC
reconstruction methods. We plan to support primitive variable reconstruction in the near future. If Cholla MHD is built with an unsupported configuration, then it should raise a compile time error; if it does not, please open an issue about it.
MHD only supports output with HDF5 files, so if output is enabled, the HDF5
flag must also be passed. Full grid and slice outputs are fully supported. In the case of slices, the magnetic fields are converted to cell-centered values. Projections and rotated projections also supported for outputting density, temperature, and in the case of rotated projections, velocity as well.
The initial magnetic fields can be set in the same manner as the hydro fields, see the Grid3D::Orszag_Tang_Vortex
function in initial_conditions.cpp
for an example. Note that the initial conditions must be divergence-free for the VL+CT integrator to work. The easiest way to ensure this condition for non-trivial fields is to initialize from the vector potential rather than the magnetic field directly; the mhd::utils::Init_Magnetic_Field_With_Vector_Potential
function in mhd_utilities.cu
has been provided to convert a vector potential into the magnetic field.