An MPI code for astrophysical MHD


Zeus-TW, written in idiomatic modern Fortran, is an MPI code for astrophysical MHD simulations. It is a member of the Zeus family of MHD codes, derived from Zeus-3D LCA version 3.4.2, enhanced by its efficient MPI-parallelization by domain decomposition and the implementation of the three non-ideal MHD processes at ASIAA: Ohmic resistivity, Hall effect, and ambipolar diffusion (AD). The algorithms used for non-ideal MHD are all explicit, and the time steps are subcycled for the Hall and Ohmic terms in order to avoid too much reduction of the dt below that given by the CFL condition of ideal MHD.

Using modern Fortran, a small memory pool is utilized to flexibly treat the temporary field arrays needed by the ideal and non-ideal MHD algorithms.

Summary of Zeus-TW’s Approach:
  • Eulerian nonconservative code based on Zeus-3D LCA version 3.4.2,
    • Flexible grid: Cartesian, cylindrical, or spherical, in 1, 2, or 3D, and independently either uniform or non-uniform in any of its coordinate axes.
  • Efficient MPI-parallelization by domain decomposition
  • Three non-ideal MHD processes
  • Ohmic resistivity: explicit algorithm based on Fleming, Stone, & Hawley (2000). Subcycled tymestep.
  • Hall effect, Explicit method based on Sano & Stone (2002) and Huba (2003). Second-order in time, reducing numerical instability. Further stability control by a small (subcycled) timestep, and by Ohmic and numerical diffusivity.
  • Ambipolar diffusion Explicit one-fluid method of Mac Low et al. (1995), adding the AD ion–neutral drift velocity in the induction equation for magnetic field evolution.
  • Arbitrary number of tracer fields
  • Various equations of state: isothermal, adiabatic, adiabatic with cooling (already present in Zeus-3D 3.4.2). Additions: polytropic, logatropic, combinations of isothermal and polytropic, and locally isothermal based on a tracer field.
  • Poisson solver for self-gravity in spherical coordinates, and viscosity (algorithms based on Zeus-3D 3.6)
  • Central sink particle in spherical coordinates
Application of the code: