Source-linked AI summary

PLUTO: a Numerical Code for Computational Astrophysics

A. Mignone, G. Bodo, S. Massaglia, T. Matsakos, O. Tesileanu, C. Zanni, A. Ferrari

arXiv:astro-ph/0701854v2astro-ph

TL;DR

Astrophysical hypersonic flows with discontinuities require robust numerical methods across multiple physical regimes. PLUTO addresses this need with a modular Godunov-type framework built around reconstruction, Riemann solving, and time evolution, and validates the code on multidimensional benchmarks. The results show that solver and algorithm choices affect accuracy and efficiency, while PLUTO supports combinations of physics modules and numerical methods.

  • Problem

    Astrophysical simulations need accurate and robust methods for strongly supersonic flows with discontinuities across Newtonian, relativistic, hydrodynamic, and MHD regimes.

  • Method

    PLUTO integrates conservation laws using a modular finite-volume shock-capturing framework with reconstruction, interface Riemann problems, and time evolution.

  • Results

    PLUTO was validated against standard benchmarks, with HLLD and Roe producing comparable highest-resolution errors of 9.53 · 10^-4 and 9.36 · 10^-4, respectively.

  • Takeaways & Limitations

    PLUTO provides a flexible environment combining four physical modules with gravity, cooling, resistivity, multidimensional geometries, and equations of state where required.

  • Takeaways & Limitations

    Performance comparisons depend on the particular algorithm combinations and can reverse when interpolation variables change.

Abstract

from arXiv · show

We present a new numerical code, PLUTO, for the solution of hypersonic flows in 1, 2 and 3 spatial dimensions and different systems of coordinates. The code provides a multi-physics, multi-algorithm modular environment particularly oriented towards the treatment of astrophysical flows in presence of discontinuities. Different hydrodynamic modules and algorithms may be independently selected to properly describe Newtonian, relativistic, MHD or relativistic MHD fluids. The modular structure exploits a general framework for integrating a system of conservation laws, built on modern Godunov-type shock-capturing schemes. Although a plethora of numerical methods has been successfully developed over the past two decades, the vast majority shares a common discretization recipe, involving three general steps: a piecewise polynomial reconstruction followed by the solution of Riemann problems at zone interfaces and a final evolution stage. We have checked and validated the code against several benchmarks available in literature. Test problems in 1, 2 and 3 dimensions are discussed.

1. Introduction

The introduction motivates high-resolution shock-capturing methods for astrophysical flows and presents PLUTO as a modular code built around a general reconstruct-solve-average framework.

  • High-resolution shock-capturing schemes gained importance because they combine accuracy and robustness for strongly supersonic, nonlinear flows.Earlier finite-difference codes lacked upwinding and conservation properties, prompting attention toward more accurate methods.
  • PLUTO uses the reconstruct-solve-average strategy, reconstructing cell averages, solving interface Riemann problems, and evolving the solution in time.This sequence provides a general framework for systems of conservation laws.
  • The code supports time-dependent explicit computations of highly supersonic flows with strong discontinuities across classical, relativistic, unmagnetized, and magnetized regimes.
  • PLUTO’s modular structure allows new physics modules and algorithms to be incorporated independently as computational fluid dynamics methods continue to develop.
  • The paper describes code design, physics modules, source terms and non-hyperbolicity, and validation against standard benchmarks.

2. Code Design

PLUTO integrates conservation laws through a modular finite-volume framework that separates general numerical steps from physics-specific modules and user-selected algorithms. Its design supports curvilinear grids, parallelization, adaptive meshes, reconstruction, and Riemann-solver choices.

  • Framework: PLUTO integrates conservation laws with a finite-volume sequence of interpolation, interface Riemann problems, and time evolution.Volume averages evolve in time, while primitive variables are used for flux calculations and reconstruction.
  • Modularity: The code separates a physics-independent integration framework from modules defining variables, source terms, mappings, fluxes, and Riemann solvers.Users select dimensions, geometry, physics module, reconstruction method, and time integration through a Python interface.
  • Grid design: PLUTO supports logically rectangular meshes in orthogonal curvilinear coordinates with uniform, geometrically stretched, or logarithmically stretched spacing.The coordinate system uses direction-dependent zones, interface areas, and cell volumes.
  • Parallelization and adaptivity: Parallelization uses MPI domain decomposition, while a one-dimensional Berger–Colella adaptive mesh-refinement module is distributed with multidimensional extension under development.Subdomains are assigned equal point counts by default, with runtime control over subdivision strategy.
  • Riemann solvers and time integration: Interface fluxes are obtained from one-dimensional Riemann problems using selectable solvers, but highly accurate solvers can introduce insufficient dissipation and numerical pathologies.Dimensionally split single-step methods reduce computational cost and storage relative to unsplit alternatives.
  • Reconstruction: Reconstruction produces piecewise-polynomial primitive-variable states at zone edges, using monotonicity constraints and selectable slope limiters to control discontinuities and steep gradients.Characteristic-variable limiting is also available when eigenvectors and eigenvalues can be computed.

3. Physics Modules

PLUTO provides independent HD, MHD, RHD, and RMHD physics modules, each combining conservation-law formulations with selectable equations of state and Riemann solvers. The modules also include treatments for magnetic divergence control and relativistic variable transformations.

  • Module overview: PLUTO distributes four independent modules for hydrodynamic, magnetohydrodynamic, relativistic, and relativistic magnetohydrodynamic regimes.They solve the Euler, ideal or resistive MHD, special-relativistic perfect-gas, and relativistic magnetized-fluid equations, respectively.
  • HD module: The classical hydrodynamics module uses ideal-gas equations and offers nonlinear two-shock, Roe, AUSM+, HLL, HLLC, and Lax-Friedrichs Riemann solvers.Its primitive variables are density, velocity, and thermal pressure.
  • MHD module: The MHD module supports ideal and resistive equations, multiple equations of state, and Roe, HLL, HLLC, HLLD, and Lax-Friedrichs solvers.The total pressure combines thermal and magnetic contributions, while resistivity adds parabolic terms to the induction and energy equations.
  • MHD module: MHD evolution enforces the solenoidal constraint ∇·B = 0 using either the eight-wave formulation or constrained transport.The eight-wave approach uses cell-centered fields and source terms, whereas constrained transport integrates the induction equation with staggered magnetic fields.
  • Relativistic modules: The relativistic modules use nonlinear mappings between primitive and conserved variables, with inverse transformations requiring nonlinear equation solves.Relativistic hydrodynamics includes two equations of state, while RMHD uses Lax-Friedrichs, HLL, or HLLC solvers and reuses MHD divergence-control methods.

4. Source Terms and non-Hyperbolicity

PLUTO incorporates local, geometrical, radiative, resistive, and conductive source terms into its conservation-law integration. Explicit diffusion can be accelerated with super time stepping, while geometrical formulations can preserve angular momentum in suitable tensor cases.

  • Source terms: Local source terms depend on the variables rather than their derivatives and include coordinate forces, gravity, and optically thin radiative losses.They are included during advection or through operator splitting.
  • Geometrical source terms: Curvilinear coordinates introduce geometrical source terms because coordinate unit vectors vary in space, breaking the homogeneous form of the conservation laws.For symmetric or antisymmetric tensors, derivative rearrangements can instead ensure angular-momentum conservation.
  • Geometrical source terms: The momentum flux tensor is symmetric, and pressure-gradient terms are handled separately so they do not contribute to geometrical source terms.This structure supports the angular-momentum-conserving formulation in polar and spherical geometries.
  • Radiative processes: Radiative losses are modeled as local source terms depending on temperature, density, and advected ion fractions subject to ionization, recombination, and charge exchange.The cooling module uses 28 ions and covers approximately 2000 ≲ T ≲ 2 · 10^5 K for densities up to 10^5.
  • Parabolic terms: Parabolic effects such as resistivity and thermal conduction impose a timestep Δt = min(Δtad, Δtpar), with explicit diffusion suitable when advection dominates.For diffusion-dominated problems, super time stepping evolves diffusion over a larger super-timestep composed of smaller stable substeps.
  • Parabolic terms: Super time stepping can make diffusion integration almost N times faster than standard explicit stepping and has been validated against analytical linear diffusion solutions.The resistivity tests confirmed the efficiency and accuracy of the approach, while nonlinear applications remained future work.

5. Code Verification

PLUTO is verified across benchmark problems spanning strong shocks, jets, MHD flows, relativistic flows, geometries, and parallel execution. The tests show that algorithm choices affect resolved structure, accuracy, computational cost, and stability, while several results agree with reference or empirical solutions.

  • Scope: The verification suite covers multidimensional hydrodynamic, MHD, relativistic, geometric, and parallel-computing problems.Tests include double Mach reflection, under-expanded jets, rotated MHD shock tubes, fast rotors, accretion tori, relativistic shock tubes, and scaling tests.
  • Hydrodynamic tests: High-order interpolation and contact-resolving Riemann solvers recover more small-scale structure but can substantially increase computational cost.PPM and WENO expose Kelvin–Helmholtz rolls in the double Mach reflection, while HLL is more diffusive; WENO costs more than a factor of 8 relative to simple HLL in the reported comparison.
  • Hydrodynamic tests: The under-expanded jet profiles agree excellently with the empirical relation, while the second-order AUSM+ scheme is about 1.6 times faster than the RK3-HLL-CENO3 scheme.The Mach-disk position oscillates by a few percent around the experimental value.
  • MHD tests: For the rotated MHD shock tube, HLLD and Roe achieve comparable highest-resolution L1 errors, while HLL errors are about 22% larger and HLLD offers the best accuracy-efficiency trade-off.The reported errors are 9.53 · 10^-4 for HLLD and 9.36 · 10^-4 for Roe at the highest resolution.
  • MHD tests: The MHD rotor calculations agree across Cartesian and polar geometries and between CT and Powell schemes, but polar-grid computations are about 5 times slower.The CT/Powell computational-cost ratio is approximately 1.05, while the polar-grid slowdown follows from the stricter inner-boundary time-step limitation.
  • Relativistic tests: Relativistic tests show that the equation of state changes wave morphology and density structure, while the TM equation of state adds about 25–30% computational cost.The cheaper scheme requires almost twice the resolution for comparable accuracy, whereas PPM is almost twice as slow as MH/HLL in the reported comparison.

6. Conclusions

PLUTO combines modular physics and numerical algorithms for astrophysical flows, with tested schemes, portability, adaptivity, parallel execution, and a user-friendly interface. The code is freely distributed with documentation.

  • PLUTO’s modular structure combines different algorithms and physics, including hydrodynamics, magnetic fields, gravity, cooling, resistivity, geometries, and equations of state.
  • The code provides tested numerical schemes whose choices can be adjusted for the problem’s efficiency and robustness requirements.
  • PLUTO runs on multiple Unix-based systems and supports serial, single-processor, and parallel machines.
  • PLUTO includes one-dimensional adaptive mesh refinement, while multidimensional extensions were under development for future versions.
  • A Python-based interface simplifies physical-problem setup and minimizes user coding, while the code and documentation are freely distributed.
Loading astro-ph/0701854v2…