Papers
Topics
Authors
Recent
Search
2000 character limit reached

MPI-AMRVAC: Adaptive Mesh Simulation

Updated 14 July 2026
  • MPI-AMRVAC is an open-source framework that uses adaptive mesh refinement and MPI parallelism to solve diverse partial differential equations.
  • It employs block-structured grids, advanced Riemann solvers, and modular physics modules to accurately simulate phenomena in various geometries.
  • The toolkit supports extensive physics models including MHD, radiation, and two-fluid dynamics, validated through large-scale, high-efficiency simulations.

MPI-AMRVAC, the Adaptive Mesh Refinement Versatile Advection Code, is an open-source, parallel, grid-adaptive simulation framework for hydrodynamics, magnetohydrodynamics, and broader nonlinear PDE systems. Across its major descriptions, it is characterized as a general toolkit for especially hyperbolic/parabolic partial differential equations, built on block-structured adaptive meshes, MPI domain decomposition, and modular physics interfaces that allow applications in 1D, 1.5D, 2D, 2.5D, and 3D, in Cartesian, cylindrical, or spherical geometries (Keppens et al., 2020, Porth et al., 2014, Keppens et al., 2023). Although it emerged from solar and astrophysical magneto-fluid dynamics, later work explicitly demonstrated shallow-water, Korteweg–de Vries, reaction–diffusion, radiation-hydrodynamics, radiation-magnetohydrodynamics, frozen-field hydrodynamics, and plasma–neutral two-fluid formulations within the same framework (Keppens et al., 2020, Moens et al., 2021, Braileanu et al., 2022, Narechania et al., 4 Mar 2025).

1. Architecture, scope, and code organization

MPI-AMRVAC is organized around physics “modules,” each written in conservative form,

tU+ ⁣F(U)=S(U),\partial_t \mathbf{U} + \nabla\!\cdot\mathbf{F}(\mathbf{U}) = \mathbf{S}(\mathbf{U}) ,

with module-specific state vectors, fluxes, wave speeds, and source terms (Porth et al., 2014, Keppens et al., 2020, Keppens et al., 2023). The code architecture separates the PDE system from mesh management, parallelization, and high-resolution update routines, so that new equation sets can be introduced by providing flux, source, primitive-to-conserved, conserved-to-primitive, and timestep-related callbacks (Keppens et al., 2020).

A recurring theme in the code lineage is expansion rather than replacement. MPI-AMRVAC 2.0 emphasized radial grid stretching, generic splitting of any background magnetic field, anisotropic thermal conduction in multi-dimensional MHD, modernization into a library, automatic regression tests, inline/online Doxygen documentation, and a future-proof restart format (Xia et al., 2017). MPI-AMRVAC 3.0 then added equation sets and analysis tools that include magnetofrictional evolution, the Regularized-Biot-Savart-Law approach for flux-rope insertion, synthetic observations, particle modules, and generic fieldline tracing compatible with hierarchical meshes (Keppens et al., 2023).

A concise view of representative capabilities is given below.

Capability Description Representative source
hd, mhd, rhd, mf, twofl, rd, ard, nonlinear Equation modules in MPI-AMRVAC 3.0 (Keppens et al., 2023)
Frozen-field HD Field-aligned HD on a prescribed static magnetic field (Zhou et al., 2024)
Two-fluid plasma–neutral model Charged and neutral fluids coupled by collisions with IMEX stepping (Braileanu et al., 2022)
FLD radiation modules Radiation-hydrodynamics and radiation-magnetohydrodynamics (Moens et al., 2021, Narechania et al., 4 Mar 2025)

A common misconception is that MPI-AMRVAC is restricted to Newtonian MHD. The 2020 toolkit paper explicitly presents applications “covering any-dimensional scalar to system PDEs,” including Korteweg–de Vries, shallow water, and reaction–diffusion systems, while later papers add radiation transport, frozen-field HD, and plasma–neutral two-fluid dynamics (Keppens et al., 2020, Moens et al., 2021, Braileanu et al., 2022).

2. Adaptive mesh refinement, discretization, and parallel execution

MPI-AMRVAC uses a purely block-based quadtree (in 2D) or octree (in 3D) hierarchy, with each block a small uniform grid plus ghost layers, and with refinement by a factor two into 4 children in 2D or 8 children in 3D (Keppens et al., 2020, Xia et al., 2017). Blocks are assigned to MPI ranks via a space-filling ordering, specifically a Morton/Z-curve in the 2020 description, to preserve locality, and ghost-cell exchanges between neighbor blocks use nonblocking MPI communication (Keppens et al., 2020). The framework therefore combines local mesh adaptivity with distributed-memory parallelism as a native rather than auxiliary feature.

Refinement control is based on user-selectable criteria. The 2017 release highlights a Löhner-type error estimator with separate refinement and coarsening thresholds, while later papers describe refinement on gradients or on problem-specific indicators such as neutral-density perturbations, drift velocities, temperature gradients, radiation energy, or wave-energy gradients (Xia et al., 2017, Braileanu et al., 2022, Narechania et al., 4 Mar 2025, McMurdo et al., 31 Oct 2025). The 2014 paper additionally introduced a distinction between active and passive blocks, allowing regions controlled analytically or remaining stationary to be excluded from the fluid update while maintaining a safety belt of active patches around them (Porth et al., 2014).

Spatial discretization is predominantly finite-volume and cell-centered, using approximate Riemann solvers such as TVDLF, HLL, HLLC, HLLD, and Roe, combined with reconstructions ranging from second-order TVD limiters to MP5, WENO3, WENO5, WENO7, and TENO-type options (Keppens et al., 2020, Keppens et al., 2023). Time integration includes strong-stability-preserving Runge–Kutta schemes up to fourth order, source splitting, Super-Time-Stepping for selected parabolic terms, and multiple IMEX Runge–Kutta schemes for stiff source couplings (Porth et al., 2014, Keppens et al., 2023).

Parallel performance is a persistent design target. The 2014 “magnetic island” weak-scaling study on IBM BG/Q reported >99%>99\% weak-scaling efficiency from 1,024 to 31,250 cores (Porth et al., 2014). MPI-AMRVAC 2.0 reported satisfactory strong scaling up to 2000 cores for 3D AMR simulations of solar coronal rain (Xia et al., 2017). The geometric multigrid library coupled to MPI-AMRVAC presented strong-scaling results up to 1792 cores (Teunissen et al., 2019). Later module papers give additional pointwise performance figures, such as >75%>75\% efficiency on 512 cores for 1×1061\times10^6 cells in the 1D UAWSoM study (McMurdo et al., 31 Oct 2025).

3. Divergence control, multigrid, and stiff operators

For MHD, MPI-AMRVAC supports multiple strategies for controlling  ⁣B\nabla\!\cdot\mathbf{B}, including Powell-source, Janhunen, Dedner-GLM, parabolic diffusion, multigrid-based elliptic projection, and constrained transport (Keppens et al., 2023, Teunissen et al., 2019). This multiplicity is technically important because later benchmark papers emphasize that different flavors of spatio-temporal schemes and magnetic monopole control can produce consistent MHD results in combination with adaptive meshes (Keppens et al., 2023).

The multigrid component became a major architectural extension. The library described in “A geometric multigrid library for quadtree/octree AMR grids coupled to MPI-AMRVAC” supports 2D quadtree and 3D octree grids, Cartesian 2D/3D and cylindrical 2D geometries, standard second-order 5-point or 7-point discretizations, periodic/Dirichlet/Neumann boundaries, and free-space boundary conditions for 3D Poisson problems via an FFT-based coarse-grid solver (Teunissen et al., 2019). It is coupled to the AMR hierarchy through mirrored block indexing and pointer-based data attachment, and it was demonstrated in elliptic projection for magnetic divergence cleaning (Teunissen et al., 2019).

The same infrastructure underlies later radiation modules. The FLD radiation-hydrodynamics implementation advances gas variables with explicit HD solvers plus explicit radiation sources, while the radiation energy equation is solved in an IMEX split between advection-plus-explicit terms and an implicit diffusion/heat–cool step, with the diffusion solve performed by a geometric multigrid solver (Moens et al., 2021). The radiation-magnetohydrodynamics extension adopts the same FLD closure and similarly treats  ⁣(DE)\nabla\!\cdot(D\nabla E) implicitly with octree-mg, while hyperbolic MHD terms remain explicit (Narechania et al., 4 Mar 2025).

Stiff source handling also appears in non-radiative modules. The two-fluid implementation uses a third-order ARS3 IMEX scheme for collisional coupling between charged and neutral fluids, because an explicit timestep would otherwise scale as the inverse collision frequency in the strongly collisional lower chromosphere (Braileanu et al., 2022). MPI-AMRVAC 3.0 also documents STS strategies for ambipolar diffusion and other parabolic terms, with example speed-ups relative to purely explicit stepping (Keppens et al., 2023). This suggests that MPI-AMRVAC’s numerical identity is not only shock-capturing AMR, but also the systematic accommodation of elliptic and stiff subsystems within the same block-adaptive framework.

4. Major physics modules and specialized formulations

The “classical” MPI-AMRVAC physics base comprises hydrodynamics and Newtonian MHD in ideal, resistive, Hall, isothermal, and full-energy formulations, with additional support for dust-fluid coupling, gravity, radiative cooling, viscosity, and thermal conduction (Porth et al., 2014, Keppens et al., 2023). The 2017 release added generic magnetic field splitting,

B=B0+B1,tB0=0,B0=0,\mathbf{B}=\mathbf{B}_0+\mathbf{B}_1,\qquad \partial_t\mathbf{B}_0=0,\quad \nabla\cdot\mathbf{B}_0=0,

to improve robustness in extremely low-β\beta plasmas by evolving only the perturbation field and incorporating the background field through source terms (Xia et al., 2017). The same release also generalized slope-limited symmetric anisotropic thermal conduction from 2D to 3D (Xia et al., 2017).

Later versions substantially broadened the module set. MPI-AMRVAC 3.0 lists mf for magnetofrictional evolution, twofl for plasma–neutral two-fluid systems, and rhd for radiation hydrodynamics via FLD, while also documenting gas–dust coupling, synthetic thermal emission, particle tracing, and magnetic field-line tracing (Keppens et al., 2023). The magnetofrictional module solves

v=ν1J×B,\mathbf{v}=\nu^{-1}\,\mathbf{J}\times\mathbf{B},

with a staggered constrained-transport implementation for force-free relaxation and data-driven evolution (Keppens et al., 2023). The Regularized-Biot-Savart-Law approach computes embedded flux-rope fields through line-integral vector potentials, providing a practical bridge between analytic insertion and full MHD evolution (Keppens et al., 2023).

The frozen-field hydrodynamic module constitutes a different type of extension. In this formulation, tB=0\partial_t \mathbf{B}=0 and >99%>99\%0, so that the induction equation is dropped and mass, momentum, and energy are projected along a prescribed static field (Zhou et al., 2024). The governing conservative equations are

>99%>99\%1

>99%>99\%2

with the non-adiabatic energy equation including Spitzer conduction, optically thin cooling, and heating (Zhou et al., 2024). The follow-up optimization paper adds hyperbolic thermal conduction and block-based TRAC to the ffHD model for 3D prominence formation (Zhou et al., 2024).

The most recent solar-coronal extension in the provided corpus is UAWSoM, the “Uniturbulence and Alfvén Wave Solar Model,” which extends the existing MHD physics module by adding four new scalar fields, >99%>99\%3 and >99%>99\%4, representing outward/inward Alfvén and kink wave energy densities, together with wave pressures, dissipation and reflection source terms, radiative cooling, and field-aligned thermal conduction (McMurdo et al., 31 Oct 2025). In that formulation the total energy includes >99%>99\%5, and the module modifies both source terms and fluxes in the MHD update (McMurdo et al., 31 Oct 2025).

5. Solar and astrophysical applications

MPI-AMRVAC has been used for a wide range of solar and non-solar applications. The 2014 and 2017 overview papers discuss Bondi accretion, Bondi–Hoyle–Lyttleton flow, clumpy wind accretion in supergiant X-ray binaries, global spherical PFSS extrapolations, magneto-convection, Hall-MHD reconnection, current-sheet diffusion, and ideal-MHD solar wind calculations (Porth et al., 2014, Xia et al., 2017). The 2021 FLD paper demonstrates a preliminary scientific application to spherically symmetric, radiation-driven, optically thick supersonic outflows from massive Wolf–Rayet stars (Moens et al., 2021). The 2025 RMHD paper then adds benchmark cases for steady radiative MHD shocks, radiation-damped linear MHD waves, radiation-modified Riemann problems, and 2D radiative magnetoconvection (Narechania et al., 4 Mar 2025).

Solar applications form a particularly dense branch of MPI-AMRVAC development. The self-consistent 2.5D flare setup solves resistive MHD with gravity, anisotropic heat conduction, optically thin radiation, background coronal heating, and beam-electron source and sink terms, while tracing field lines to map non-local thick-target beam heating back onto the AMR grid (Druett et al., 2023). The prominence and coronal-rain review describes how MPI-AMRVAC is used for thermal-instability-driven condensations in 1D loops, 2.5D arcades, and full 3D flux ropes, together with synthetic EUV and spectral diagnostics (Liakh et al., 5 Oct 2025).

The frozen-field HD studies are positioned between full MHD and 1D field-line hydrodynamics. In the 2D evaporation–condensation benchmark, “Overall, the performance of 2D ffHD is close to that of 2D MHD and pseudo-2D HD,” while full MHD lags slightly because of field deformation in the transition region (Zhou et al., 2024). The 3D optimization paper then reports a prominence embedded in a magnetic flux rope that develops into a stable slab-like filament, with synthetic SDO/AIA and H>99%>99\%6 observables generated from the simulation output (Zhou et al., 2024).

The UAWSoM study exemplifies MPI-AMRVAC’s use as a platform for new coronal-heating closures. It compares kink-wave-driven and Alfvén-wave-driven heating in a solar-atmosphere model and reports that kink-wave-driven models “are able to sustain a stable atmosphere without requiring any artificial background heating terms,” whereas pure Alfvén-only runs in the parameter study collapse through radiative losses without a background heater (McMurdo et al., 31 Oct 2025). The same study validates MPI-AMRVAC against a FiPy-based Python implementation, with temperature profiles agreeing to within >99%>99\%7–>99%>99\%8 and wave-dissipation lengths differing by less than >99%>99\%9 Mm (McMurdo et al., 31 Oct 2025).

6. Limitations, assumptions, and interpretive context

Several MPI-AMRVAC modules are defined by deliberate asymptotic or closure assumptions rather than by an attempt at universal completeness. The frozen-field HD model assumes >75%>75\%0 static and strong everywhere; the paper states that it fails near nulls or >75%>75\%1 regions and cannot capture Alfvén or fast-mode waves, magnetic reconnection, or field-line deformation (Zhou et al., 2024). The ffHD optimization paper further treats heat transport through hyperbolic thermal conduction and TRAC as performance-oriented approximations to classical parabolic conduction and transition-region resolution (Zhou et al., 2024).

The radiation modules adopt flux-limited diffusion. In the 2021 radiation-hydrodynamics paper, the new module is presented as a convenient and versatile tool for optically thick environments, while the 2025 RMHD paper formulates shocks and waves explicitly in the diffusion limit and adds a radiative diffusion mode to the classical MHD wave structure (Moens et al., 2021, Narechania et al., 4 Mar 2025). A plausible implication is that FLD in MPI-AMRVAC is best understood as a controlled approximation with a well-defined validity envelope, not as a substitute for multi-frequency angle-dependent radiative transfer. This interpretation is consistent with the prominence-and-rain review, which notes that radiation is “only approximate or post-processed” and identifies future coupling to external NLTE radiative-transfer tools as an extension path (Liakh et al., 5 Oct 2025).

The two-fluid plasma–neutral implementation also exposes the distinction between infrastructure and physical model choice. The paper states that a temperature- and density-dependent collisional parameter is implemented, but all tests use a constant, uniform >75%>75\%2 “for easier comparison to analytic results” (Braileanu et al., 2022). Likewise, the UAWSoM study sets >75%>75\%3 in the present investigation and focuses on parameter scans in the Alfvén reflection coefficient >75%>75\%4 and in the partition of injected Alfvén and kink energy, with the additional finding that high >75%>75\%5 leads to wave-pressure overloading and catastrophic cooling (McMurdo et al., 31 Oct 2025).

Taken together, these studies present MPI-AMRVAC less as a single fixed solver than as a block-adaptive research framework in which physically distinct reduced models, full MHD systems, and operator-split stiff couplings can be implemented, compared, and validated under a common AMR/MPI infrastructure (Keppens et al., 2020, Keppens et al., 2023).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to MPI-AMRVAC.