Computational magnetohydrodynamics

Computational magnetohydrodynamics (CMHD) is a rapidly developing branch of magnetohydrodynamics that uses numerical methods and algorithms to solve problems that involve electrically conducting fluids. Most of the methods used in CMHD are used in computational fluid dynamics . The complexity is arises from the presence of a magnetic field and its coupling with the fluid. One of the important issues is to numerically maintain the = 0(conservation of magnetic flux ) condition, from Maxwell’s equations , to avoid any unphysical effects.

Open-source MHD codes

  • Pencil
    Compressive Resistive Code MHD, intrinsically divergence free, embedded particles module, finite-difference explicit scheme, high-order derivatives, Fortran95 and C, parallelized up to hundreds of thousands cores. Source code is available.
    RAMSES is an open source code to model astrophysical systems, featuring self-gravitating, magnetized, compressible, radiative fluid flows. It is based on the Adaptive Mesh Refinement (AMR) technique we have fully threaded graded octree. RAMSES is written in FORTRAN 90 and is making intensive use of the Message Passing Interface (MPI) library. [1] [2] Source code is available.
  • RamsesGPU
    RamsesGPU is a MHD Code written in C ++, based on the original RAMSES but only for regular grid ( AMR ). The solution is designed to run on large clusters of GPUs ( NVIDIA graphics processors), parallelization links to MPI for distributed memory processing, and CUDA for efficient use of GPU resources. Static Gravity Fields are supported. Different finite volume methods are implemented. Source code is available.
  • Athena
    Athena is a grid-based code for astrophysical magnetohydrodynamics (MHD). It was developed primarily for interstellar medium studies, star formation, and accretion flows. [3] Source code is available.

Commercial MHD codes

  • USIM
  • MACH2

See also

  • Magnetohydrodynamic turbulence
  • Magnetic flow meter
  • Plasma modeling


  1. Jump up^ Teyssier, R. “Cosmological hydrodynamics with adaptive mesh refinement.” A new high resolution code called RAMSES ” . Astronomy and Astrophics . 385 : 337-364. arXiv : astro-ph / 0111367  . Bibcode : 2002A & A … 385..337T . doi : 10.1051 / 0004-6361: 20011817 . Retrieved 13 July 2016 .
  2. Jump up^ Gheller, C; Wang, P; Vazza, F; Teyssier, R (28 September 2015). “Numerical cosmology on the GPU with Enzo and Ramses” . Journal of Physics: Conference Series . 640 : 012058. arXiv : 1412.0934  . doi : 10.1088 / 1742-6596 / 640/1/012058 . Retrieved 1 July 2016 .
  3. Jump up^ Stone, James M .; Gardiner, Thomas A .; Teuben, Peter; Hawley, John F .; Simon, Jacob B. (September 2008). “Athena: A New Code for Astrophysical MHD”. The Astrophysical Journal Supplementary Series . 178 (1): 137-177. arXiv :0804.0402  . Bibcode : 2008ApJS..178..137S . doi : 10.1086 / 588755 .
  • Brio, M., Wu, CC (1988), “An upwind differencing scheme for the equations of ideal magnetohydrodynamics”, Journal of Computational Physics , 75 , 400-422.
  • Henri-Marie Damevin and Klaus A. Hoffmann (2002), “Development of a Runge-Kutta Scheme with TVD for Magnetogasdynamics”, Journal of Spacecraft and Rockets , 34 , No.4, 624-632.
  • Robert W. MacCormack (1999), “An upwind conservation method for ideal magnetohydrodynamics equations”, AIAA-99-3609 .
  • Robert W. MacCormack (2001), “A conservation form method for magneto-fluid dynamics”, AIAA-2001-0195 .