The Mezcal MHD Code

Code description

The code solves the ideal magnetohydrodynamics (MHD) equations in one, two (cylindrical and cartesian) and three dimensions (cartesian). The code uses several different algorithms: a linear Riemann solver, the MUSTA method, a HLLE algorithm, and different versions of the Lax-Friedrichs and the Lax-Wendroff algorithms. Finally, an AMR version of the code is currently in progress. The code includes additional physics modules, as the presence of gravity, the effect due to the thermal conduction, a limited study of the radiative emission and the temporal and dynamical evolution of the hydrogen ionization fraction. The inclusion of resistyivity and special relativity are in process.

Code characteristics:

  • Equation of state: ideal/isothermal/adiabatic gas
  • Non-ideal terms: external gravity, thermal conduction (isotropic+anisotropic), heating and cooling (from a simple table to a chemistry network)
  • Geometry: 1/2/3 D cartesian; 1/2 D cylindrical.
  • Time integration: II order Runge-Kutta.
  • Space reconstruction: II order (except in shocks)
  • Slope limiters: ``Van Leer'', ``Van Albada'', ``Minmod'', ``UMIST'', ``Woodward'', ``Superbee'',... (always on the primitive variables);
  • flux integration: Lax-Friedrichs modified method, Lax-Wendroff, HLLE, HLLD, MUSTA method, ``Riemann Solver'';
  • source terms: fractional step method; some cooling functions integrated semi-implicitly;
  • Artificial viscosity: ``Lapidus viscosity''.
  • Div B mantained close to zero by constrained trasnport method (with or without staggered mesh)
  • Grid: uniform or AMR
  • Parallelized (with MPI) both in the uniform and AMR version
  • Tests

    The code was tested with 1D shock tube tests, with 2D cylindrical and cartesian tests and with jet and blast waves propagation in three dimensions, comparing the results obtained with the different algorithms. ...

    Code distribution

    ...