# Computational magnetohydrodynamics

Computational magnetohydrodynamics (CMHD) is a rapidly developing branch of magnetohydrodynamics that uses numerical methods and algorithms to solve and analyze problems that involve electrically conducting fluids. Most of the methods used in CMHD are borrowed from the well established techniques employed in Computational fluid dynamics. The complexity mainly arises due to the presence of a magnetic field and its coupling with the fluid. One of the important issues is to numerically maintain the $\nabla \cdot {\mathbf B} = 0$ (conservation of magnetic flux) condition, from Maxwell's equations, to avoid any unphysical effects.

## Open-source MHD codes

• Pencil Code
Compressible resistive MHD, intrinsically divergence free, embedded particles module, finite-difference explicit scheme, high-order derivatives, Fortran95 and C, parallelized up to hundreds of thousands cores.