Source-linked AI summary
MPI-AMRVAC for Solar and Astrophysics
O. Porth, C. Xia, T. Hendrix, S. P. Moschou, R. Keppens
TL;DR
MPI-AMRVAC addresses the need for documented, high-order and newly extended capabilities in solar and non-relativistic astrophysical magneto-fluid simulations. It updates the toolkit with conservative physics and discretization developments, while retaining broad parallel, block-AMR applicability.
Problem
MPI-AMRVAC needed documented algorithmic and application-driven extensions for solar and astrophysical simulations beyond typically second-order discretizations.
Method
The paper combines new dust-fluid and conservative Hall-MHD modules with high-order finite differences, strong-stability-preserving Runge-Kutta steppers, and active/passive grid-cell handling.
Results
The update provides high-order finite-difference schemes and time steppers across physics modules, with representative tests including dusty-wave, Hall-MHD, and astrophysical applications.
Takeaways & Limitations
MPI-AMRVAC offers a broad open-source framework for gas-dynamical and plasma-physical applications inspired by astrophysical and solar observations.
Takeaways & Limitations
For contacts and viscous boundary layers, MPI-AMRVAC recommends Riemann-problem-based solvers because many non-Riemann schemes exhibit a general flaw.
Abstract
from arXiv · showhide
In this paper we present an update on the open source MPI-AMRVAC simulation toolkit where we focus on solar- and non-relativistic astrophysical magneto-fluid dynamics. We highlight recent developments in terms of physics modules such as hydrodynamics with dust coupling and the conservative implementation of Hall magnetohydrodynamics. A simple conservative high-order finite difference scheme that works in combination with all available physics modules is introduced and demonstrated at the example of monotonicity preserving fifth order reconstruction. Strong stability preserving high order Runge-Kutta time steppers are used to obtain stable evolutions in multidimensional applications realizing up to fourth order accuracy in space and time. With the new distinction between active and passive grid cells, MPI-AMRVAC is ideally suited to simulate evolutions where parts of the solution are controlled analytically, or have a tendency to progress into or out of a stationary state. Typical test problems and representative applications are discussed, with an outlook to follow-up research. Finally, we discuss the parallel scaling of the code and demonstrate excellent weak scaling up to 30 000 processors allowing to exploit modern petascale infrastructure.
1. INTRODUCTION
MPI-AMRVAC is an open-source, community-driven toolkit for solar and non-relativistic astrophysical magneto-fluid dynamics. This update surveys new algorithmic capabilities and physics modules, including higher-order discretizations and gas–dust dynamics.
- The toolkit targets Newtonian applications inspired by astrophysical and solar phenomena.
- The update reviews algorithmic and application-driven developments not documented in earlier presentations.
- Higher-than-second-order accurate space–time discretizations are added alongside existing shock-capturing schemes such as TVDLF, HLL, HLLC, and Roe.
- The gas–dust module dynamically follows an arbitrary number of dust species with size-dependent, drag-modulated evolution through a compressible gas.
2. HIGH ORDER METHODS
The paper introduces high-order finite-difference methods for smooth magneto-fluid problems while retaining finite-volume options for discontinuous flows. Flux splitting, MP5 reconstruction, and SSP Runge–Kutta schemes provide a general implementation with theoretical fourth-order space–time accuracy, but global Lax–Friedrichs splitting can diffuse contacts and tangential discontinuities.
- Motivation: Smooth applications such as wave propagation, resolved magnetic reconnection, and magneto-convection motivate high-order finite-difference methods.
- Finite-volume methods: Finite-volume discretization remains appropriate for discontinuous flows, with MPI-AMRVAC offering TVD and Riemann-solver-based schemes adapted to different governing equations.
- Conservative finite differences: The finite-difference method applies finite-volume reconstruction formulas to pointwise fluxes and forms a directionally unsplit ODE update at each grid point.
- Applied flux splitting: Global Lax–Friedrichs flux vector splitting supplies upwinding without solving a Riemann problem, using the grid-global maximal characteristic velocity.
- Method limitations: Global Lax–Friedrichs splitting introduces excessive numerical diffusion at contact and tangential discontinuities, so Riemann-based solvers are recommended when those structures matter.
- High-order time stepping: The SSP schemes provide explicit stable time integration, with the cited schemes allowing CFL numbers of 2 and 1.50818004975927.
- High-order time stepping: Fourth-order accuracy in space and time is theoretically available by combining finite differences, MP5 reconstruction, and the latter SSP Runge–Kutta scheme.
3. ASTROPHYSICAL GAS AND DUST DYNAMICS
MPI-AMRVAC extends gas dynamics with flexible dust, tracer, source-term, closure, and energy-equation options, then validates these capabilities on standard coupled gas–dust tests.
- Module formulation: The momentum equation accommodates gravity, viscosity, dust friction, user-defined forces, and mass source terms through a combined momentum source.The viscous force uses a traceless tensor, while dust coupling depends on gas and dust densities and velocity differences.
- Module formulation: Users can add tracer quantities, whose conserved densities are divided by gas density to recover values obeying an advection equation.Tracer quantities are optional and each adds a simple evolution equation.
- Closure and energy equation: Pressure-density closures can eliminate the energy equation, whereas the ideal-gas option evolves conserved total energy combining internal and kinetic components.The ideal-gas formulation includes thermal conduction, radiative losses, and user-specified internal-energy sources or sinks.
- Module formulation: The dusty hydrodynamics module supports an arbitrary number of pressureless dust fluids, each with configurable particle size and grain density.Dust fluids interact with the gas through drag, while dust–dust interactions are not included.
- Dustybox: A 40-cell dustybox simulation with four dust species achieved a perfect fit to the semi-analytical solution, with smaller particles decelerating faster.The setup used uniform densities, periodic boundaries, physical drag, and a 100:1 gas-to-dust mass ratio.
- Dustywave: Errors were typically below 0.5% across dustywave tests spanning drag coefficients K = 0.01 to K = 100, with all cases agreeing well with analytic results.Intermediate coupling produced out-of-phase gas and dust velocities and strong damping at K = 1 and K = 10.
- Sedov blast wave with dust species: At t = 10 years, the Sedov simulation reproduced the predicted shock radius of 0.483 pc even with dust mass fraction δ = 0.01.Dust coupling varied with particle size: the smallest species formed a density peak near the shock, while larger species developed separated peaks.
- Cloud shock in gas-dust settings: In the cloud-shock simulation, gas and dust exhibited bow-shock, Richtmyer–Meshkov, and Rayleigh–Taylor structures, while dust species two remained tightly coupled to cloud dynamics.The setup used two dust species with δ = 0.01 and a Mach number of 10.
4. MODULES FOR SOLAR APPLICATIONS
MPI-AMRVAC’s MHD module provides configurable options for modeling magnetically dominated solar dynamics, including multiple MHD regimes and physical sources and sinks.
- The MHD module offers configurable options for zero-beta, isothermal finite-beta, ideal, visco-resistive, and Hall-MHD simulations.Its pre-compilation settings determine the selected combination of physics options.
- The module includes sources and sinks relevant to radiative plasma conditions in the solar corona.
- The paper first reviews the implemented equations and then demonstrates the module through selected applications.
4.1. Magnetohydrodynamics: Maxwell’s equations and Ohms law
The MHD formulation supports background-field splitting and generalized Ohm’s-law physics, with ideal, resistive, and Hall terms incorporated into the magnetic-field evolution and numerical flux treatment.
- Maxwell’s equations and Ohm’s law: MPI-AMRVAC can split off a time-invariant potential magnetic field from the evolving magnetic field.The split fields satisfy separate solenoidal conditions in the formulation.
- Maxwell’s equations and Ohm’s law: The generalized Ohm’s law combines ideal, Hall, and resistive contributions to the electric field.The Hall term distinguishes ions and electrons within a single-fluid plasma description.
- Maxwell’s equations and Ohm’s law: Ideal MHD sets ηh = 0 = η, resistive MHD sets ηh = 0 at finite resistivity, and Hall MHD uses finite values of both parameters.
- Maxwell’s equations and Ohm’s law: The magnetic-field evolution obtained from the electric-field expression treats bracketed terms as fluxes and resistivity as a source.
- Maxwell’s equations and Ohm’s law: Hall-MHD calculations require additional reconstructed layers or a wider finite-difference stencil because the Hall current enters directly into the flux.Currents are computed with second- or fourth-order central differencing.
4.2. ∇· B treatments
MPI-AMRVAC offers several approaches for controlling numerical magnetic monopole errors, including source-based, diffusive, and GLM treatments with alternative ψ updates.
- ∇· B treatments: Shock-capturing discretizations can control magnetic solenoidality through source terms, additional monopole equations, or diffusive approaches.These strategies address monopole errors arising from large gradients and nonlinear limited reconstructions.
- ∇· B treatments: Dimensionless resistivity and Hall parameters are defined using reference density, length, magnetic-field strength, Alfvén speed, and ion gyrofrequency.
- ∇· B treatments: The GLM formulation introduces an additional evolution equation for the generalized Lagrangian multiplier ψ.
- ∇· B treatments: MPI-AMRVAC implements three GLM variants, with glm3 omitting divergence- and ψ-related source terms from induction, energy, and momentum equations.The paper describes glm3 as a simpler scheme that adopts the reconstruction procedure’s spatial order.
- ∇· B treatments: The ψ source update can use either an exact solution or an implicit update and is handled with operator splitting.
4.3. Momentum equation, closure and energy equation
The MHD momentum and energy formulations incorporate magnetic forces through divergence identities, support multiple closures, and account for field splitting, resistivity, conduction, and monopole-control terms.
- Momentum equation: The Lorentz force J × B is implemented through a divergence-form magnetic-stress expression, with an additional monopole term in the Powell approach.
- Closure: MPI-AMRVAC offers isothermal or isentropic closures, with zero-beta conditions obtained when cad = 0.
- Energy equation: A second closure option evolves the partial energy density in addition to the other MHD variables.
- Energy equation: Without field splitting, the evolved energy is total energy; with splitting, total energy is recovered by adding the split-field magnetic contribution.
- Energy equation: The split-field energy equation combines internal-energy, velocity, and induction equations, including Ohmic heating from resistivity.
- Energy equation: Field-aligned heat conduction, monopole-control terms, and compact-stencil resistive-source evaluation are included according to the selected formulation.
4.4. Conservative Hall MHD
MPI-AMRVAC implements conservative Hall MHD for both finite-volume and finite-difference schemes, accounting for current-dependent fluxes and whistler-wave stability constraints. The implementation uses reconstructed magnetic fields or cell-centered currents, with HLL-type and TVDLF options, while explicit time stepping becomes increasingly restrictive at fine resolution.
- Hall MHD formulation: Hall MHD adds terms proportional to η_h to the induction and partial-energy fluxes, with the current J = ∇×B entering the fluxes.This produces a non-hyperbolic PDE system requiring dedicated implementation details.
- Finite-volume implementation: Finite-volume schemes compute interface currents from reconstructed magnetic-field values using left- and right-biased stencils.The resulting currents are combined with reconstructed variables for TVDLF updates or HLL-type Riemann solvers.
- Finite-difference implementation: Finite-difference schemes compute cell-centered currents by central differencing before reconstructing the fluxes.The finite-difference procedure maps interface indexing to cell-centered indexing for current evaluation.
- Wave speeds and stability: The Hall-MHD wave-speed estimate takes the maximum of the ordinary MHD fast speed and the fastest grid-resolved whistler speed.The maximum wavenumber is k_max = max_d(π/∆x_d), although it can often be reduced by a factor of two without seriously affecting stability.
- Wave speeds and stability: Explicit integration imposes a time step that scales as ∆x^2 for sufficiently small grid spacing, potentially becoming prohibitively small.High-order finite differencing can partly mitigate this restriction by achieving higher accuracy at moderate resolution.
4.5. Selected tests and applications
The tests assess MPI-AMRVAC’s high-order finite-difference schemes across smooth MHD waves, shocks, discontinuities, Hall reconnection, and solar magnetic-field applications. They show high-order convergence and low diffusion in smooth problems, while documenting oscillations and diffusion near discontinuities.
- The test suite covers 3D ideal-MHD waves, shock tubes, Hall-MHD waves and reconnection, plus potential-field splitting for solar applications.
- 3D Circular Alfvén wave: Fourth- and fifth-order convergence is obtained for the circularly polarised Alfvén-wave test with high-order reconstruction and Runge-Kutta integration.MP5 achieves fifth-order convergence despite the SSPRK(5,4) integrator’s formal fourth-order accuracy; magnetic-divergence errors decrease with the reconstruction order minus one.
- Shocks, discontinuities and high-order FD schemes: All conservative shock-tube schemes reproduce the general shock structure, but SSPRK(5,4)-MP5-FD produces a +2.7% contact-density overshoot and stronger oscillations than characteristic reconstruction.
- Shocks, discontinuities and high-order FD schemes: The finite-difference shock-tube implementation is 1.6 times faster than the HLLC-based finite-volume counterpart because it does not solve Riemann problems.Relative execution times are 1 : 2.2 : 3.5 for RK3-LIM03-FD : SSPRK(5,4)-MP5-FD : SSPRK(5,4)-MP5-FV.
- Shocks, discontinuities and high-order FD schemes: At maximal SSP Courant numbers, the fifth-order scheme maintains oscillations comparable to its CFL 0.4 case, and those oscillations decrease during long-term evolution.The displayed cases use Courant numbers of 2.0 for SSPRK(4,3)-LIM03-FD and 1.5 for SSPRK(5,4)-MP5-FD.
- Applications: The finite-difference scheme is more diffusive for advected and stationary contact discontinuities than the compared HLL/HLLC methods, while Hall-MHD simulations develop rapid X-point reconnection.The FD diffusion is comparable to second-order HLLC with Koren reconstruction; the Hall case reaches equipartition near t ≈80 and has a reconnection-rate advantage over resistive MHD.
4.5.8. PFSS extrapolation for Carrington Rotation CR2029
The CR2029 study evaluates PFSS extrapolations with varying spherical-harmonic resolution and compares global spherical with local Cartesian potential-field models. Increasing lmax reduces ringing and brings radial-field variation toward the reference, while both approaches produce qualitatively similar field structures with geometry-dependent differences.
- Study design: MDI magnetograms for CR2029 provide the input for comparing global PFSS and local Cartesian extrapolations around active regions AR10759 and AR10756.The study also examines how increasing the maximum spherical-harmonic degree affects the extrapolation.
- Study design: The PFSS comparison uses fixed resolution 150 × 180 × 360 while varying lmax from 90 to 720 against the lmax = 720 reference.The models therefore isolate spherical-harmonic truncation effects at constant grid resolution.
- Spherical-harmonic resolution: As lmax increases, ringing near AR10756 decreases and the radial-field magnitude and variation approach the reference case.The trend is visible across lmax = 90, 270, and 720.
- Error localization: The two error norms differ by about 4 orders of magnitude, indicating that dominant errors arise in localized active regions.These regions contain sharp magnetic-field increases that disproportionately affect the error.
- Global versus local extrapolation: The local Cartesian method avoids spherical-harmonic truncation through an exact Green-function solution, whereas global PFSS uses spherical geometry and a source surface.The local approach can also generate linear force-free fields for nonzero α; α = 0 gives the potential solution.
- Global versus local extrapolation: Global and local extrapolations show similar field-line structure, but the local model has more open field lines because it lacks a source surface.Remaining differences reflect finite curvature effects, and agreement with the EIT observation is qualitative.
5. SCALING EXPERIMENTS
MPI-AMRVAC scaling experiments assess weak and strong scaling across supercomputers, including adaptive-mesh and uniform-grid workloads. The code maintains excellent weak scaling and high strong-scaling efficiency, with AMR delivering substantial speedup in the tested case.
- Experimental setups: The scaling experiments evaluate MPI-AMRVAC on multiple supercomputing platforms using weak scaling, strong scaling with AMR, and strong scaling without AMR.The tests cover MHD, relativistic jet, and dusty cloud-shock workloads.
- Strong scaling with AMR: AMR produces a 2.8× speedup for the 40M case at 256 processors, close to the expected 3.1× space-filling advantage, with approximately 10% overhead.The comparison uses an all-highest-level restart as the uniform-refinement reference.
- Weak scaling: Better than 99% efficiency is maintained from 1024 to 31,250 CPUs in the Fermi weak-scaling 3D MHD experiment.The workload maintains a fixed computational load per processor while increasing processor count.
- Strong scaling with AMR: Approximately 85% strong-scaling efficiency is sustained for both 160 × 10^6-cell five-level and 40 × 10^6-cell four-level AMR cases while using at least 150,000 cells per processor.The large-domain case still reaches approximately 70% efficiency at 2048 processors.
- Strong scaling without AMR: The 110M-cell uniform-grid cloud-shock test shows efficiency increasing through 2048 processors because boundary-communication time decreases with the machine’s network configuration.Beyond 2048 cores, latency limits efficiency; nevertheless, 8192 cores retain 96% efficiency relative to 1024 cores.
6. SUMMARY AND OUTLOOK
The paper presents MPI-AMRVAC as a parallel, block-AMR open-source framework for astrophysical and solar gas-dynamical and plasma applications. It highlights broadly reusable high-order methods and active/passive grid capabilities, while identifying future extensions for stellar-wind and solar-prominence studies.
- Summary: MPI-AMRVAC is updated as a fully parallel, block-AMR open-source framework supporting gas-dynamical and plasma-physical applications.The update emphasizes new non-relativistic physics modules and repository additions.
- Summary: High-order finite-difference schemes and time steppers are available across physics modules, including relativistic hydrodynamics and magnetohydrodynamics.The paper presents these capabilities alongside the newer non-relativistic modules.
- Summary: Distinguishing active from passive grid blocks and producing AMR-respecting sliced or collapsed views are presented as generic benefits for adaptive parallel software.These features support analytically controlled or near-stationary parts of simulations.
- Outlook: Future work includes binary stellar-wind interactions with radiative effects, dust creation, and dust redistribution across shocked wind zones.The planned extensions build on earlier circumstellar-wind studies.
- Outlook: Future solar applications include prominence formation in realistic flux-rope configurations.The passage identifies this as a continuation of the authors’ solar research program.
APPENDIX SLICING A MORTON ORDER AMR GRID
MPI-AMRVAC can extract runtime slices from adaptive grids while preserving their tree structure and ordering. The recursive algorithm selects intersected blocks, fills sub-dimensional solution blocks, and supports AMR-consistent inspection or restart workflows.
- Purpose: Runtime slicing reduces multidimensional datasets to coordinate-aligned N − 1-dimensional views for quick inspection.MPI-AMRVAC applies the procedure to grids of arbitrary dimensionality.
- Algorithm: The algorithm first identifies the grid index intersected by the requested slice at each AMR level using the perpendicular direction and coordinate value.The index depends on block extent and the minimum domain boundary.
- Algorithm: It recursively descends through children transverse to the slicing direction and fills a sub-dimensional solution block when a leaf is encountered.Child indices distinguish left and right branches during traversal.
- Output: The output blocks are emitted in encounter order, producing a sub-dimensional grid that retains the original adaptive-mesh tree structure.This preserves AMR information for data inspection.
- Illustration: The slicing procedure is illustrated on a three-level 2D grid intersected at grid indices 5 and 10 for the second and third levels.The example uses slicing direction d = 1.
- Output: Morton ordering of the resulting sub-dimensional space-filling curve allows an AMR run to restart in N − 1 dimensions without further modifications.The correspondence between data structures implies ∂d = 0 for the reduced dimension.
COLLAPSING A MORTON ORDER AMR GRID
The runtime collapsing algorithm integrates quantities along a chosen coordinate direction onto a target AMR level, projects indices, assembles global arrays, and writes the reduced data.
- Algorithm overview: The algorithm collapses grid data along a specified direction onto a target level, producing reduced-dimensional quantities such as surface densities.It exploits the underlying AMR data structure during runtime.
- Block-wise reduction: Each block first sums the quantity q along the selected integration direction.
- Index projection: Orthogonal projection removes the integration direction from the index arrays while preserving the order of the remaining directions.After this elemental collapse, the algorithm operates in the reduced index space.
- Global assembly: Processors allocate collapsed global arrays whose dimensions follow the target-level block counts and cells per block.
- Global assembly: Collapsed blocks are placed into the correct global bins using block indices, levels, ghost-cell offsets, and local-to-global index translation.
- Output: Higher-level data are averaged to the target level, after which processor-local arrays are combined and written as CSV or binary VTK data.
DYNAMIC GRID ACTIVATION
MPI-AMRVAC dynamically separates active and passive AMR blocks so analytic or stationary regions need not be advanced, while safety blocks and weighted load balancing preserve robust evolution. In a pulsar-wind example, activation responds to shock motion, and the main speedup comes from a larger global CFL time step.
- Motivation: Passive regions represent analytic or stationary parts of simulations, including unshocked winds, settled jets, and unaffected static configurations.
- Activation strategy: The grid-activation scheme deactivates blocks by user-defined criteria and is compatible with all available physics modules because it operates only on grid structure.
- Activation strategy: Candidate passive blocks are reactivated when an active neighbour is detected, after which final active and passive block lists are created.The safety-block procedure can be repeated and works across AMR level changes.
- Time integration: Only active blocks are advanced during time integration, while passive blocks may follow analytic evolution or a separate physics module.
- Load balancing: Active and passive blocks receive different weights to balance computational load while limiting memory imbalance during space-filling-curve partitioning.
- Load balancing: A permitted memory imbalance of 2–3 is typically adopted because it gives the best results for the problems and hardware considered.
- Example application: In the pulsar-wind simulation, yellow unshocked-wind cells remain passive until shock motion requires automatic activation, with refinement reaching level 20 near the origin.