betaFeedback

WorksPhysics and Astronomy

Physical Constraint Preserving Higher Order Finite Volume Schemes for Divergence-Free Astrophysical MHD and RMHD

Abstract

Higher order finite volume schemes for magnetohydrodynamics (MHD) and relativistic magnetohydrodynamics (RMHD) are very valuable because they allow us to carry out astrophysical simulations with very high accuracy. However, astrophysical problems sometimes have unusually large Mach numbers, exceptionally high Lorentz factors and very strong magnetic fields. All these effects cause higher order codes to become brittle and prone to code crashes. In this paper we document physical constraint preserving (PCP) methods for treating numerical MHD and RMHD. While unnecessary for standard problems, for stringent astrophysical problems these methods show their value. We describe higher order methods that allow divergence-free evolution of the magnetic field. We present a novel two-dimensional Riemann solver. This two-dimensional Riemann solver plays a key role in the design of PCP schemes for MHD and RMHD. We present a very simple PCP formulation and show how it is amalgamated with the evolution of face-centered magnetic fields. The methods presented here are time-explicit and do not add much to the computational cost. We show that the methods meet their design accuracies and work well on problems that would otherwise be considered too extreme for typical higher order Godunov methods of the type used in computational astrophysics.

FV_WENO_MHD_RMHD_PCP.pdf

Introduction

It is possible to claim that astrophysicists played a major role in the invention of higher order Godunov schemes [67, 35, 68]. This was done with the express intent of inventing robust and accurate schemes for astrophysical hydrodynamics. These second order accurate methods were popular because they were based on three simple algorithmic elements:- First, one had to reconstruct the primal variables of the flow in order to get second, or better, order of spatial accuracy. Second, one had to invoke a Riemann solver for which knowledge of the eigenstructure could be beneficial. Third, one used a predictor-corrector [67, 35, 36] or Runge-Kutta [62] timestepping strategy to obtain second or better order accuracy in time. This winning plan was easy to adopt, resulting in the popularity of the above-mentioned papers for astrophysical hydrodynamics.

Owing to the presence of magnetic fields in astrophysical flows, it was only natural that astrophysicists wanted to invent higher order Godunov methods for magnetohydrodynamic (MHD) flows. Initial progress on understanding the MHD eigenstructure [49, 31, 72, 59, 58] was soon followed by the development of Riemann solvers for MHD [34, 4, 5, 45, 57] (Li 2005). Inspired by the divergence-free discretizations of Yee (1966), and later on Brecht et al. (1981), DeVore (1991) and Evans and Hawley (1989), higher order Godunov schemes were designed which mimetically respected the divergence-free property of the magnetic field [37, 60, 6]. In time, higher order methods were developed for reconstructing the magnetic field in divergence-free fashion and with higher order accuracy [9, 11, 12, 13, 17, 23, 24] which allowed higher order MHD formulations to be achieved. The task of obtaining truly multidimensionally upwinded electric fields at edge centers that are needed for updating face-centered magnetic fields was also accomplished with the invention of multidimensional Riemann solvers [14, 15, 18, 19, 22]. Relativistic magnetohydrodynamics (RMHD) also plays an important role in computational astrophysics, with the result that many of these advances in MHD were paralleled in a few years by analogous advances in RMHD [52, 10, 43, 38, 66 Mignone et] al. 2006, 2009, Giacomazzo and Rezzolla 2006, Anton et al. 2010, Kim and Balsara, 2014, Balsara and Kim 2016, Cai et al. 2025) and several others.

Advances were also made in high accuracy methods (Harten et al. 1986, Shu and Osher 1988, 1989, Jiang and Shu 1996, Balsara and Shu 2000, Balsara, Garain and Shu 2016, Balsara et al. 2023, 2024a, 2024b, 2025), especially focusing on weighted essentially non-oscillatory (WENO) schemes but also including other efforts (McCorquodale and Colella 2013, Buchmüller et al. 2014). Those efforts at achieving higher order hydrodynamics also inspired an attempt to achieve higher order MHD and RMHD (Balsara 2009, Balsara et al. 2009, 2013, Seo and Ryu 2023, Balsara et al. 2025). However, astrophysical flows tend to have unusually large Mach numbers, exceptionally high Lorentz factors and very strong magnetic fields. These two effects tend to drive astrophysical flows to the point where pressures can become catastrophically negative resulting in a code crash. This has been the most pressing problem in computational astrophysics and space physics. Simply increasing the order of accuracy of an astrophysical code does not yield a solution to this problem. There were several early attempts to address this issue (Balsara and Spicer 1999b, Hu, Adams and Shu 2012, Balsara 2012b). A very early paper (Einfeldt et al. 1991) had shown that with the use of certain Riemann solvers of HLL (Harten Lax van Leer) and LLF (Local Lax Friedrich) type, positivity could be achieved in hydrodynamical simulations with first order schemes, however those results were not picked up or generalized for quite a while. In recent years, there has been an effort to generalize those results within the context of physical constraint preserving (PCP) methods (Wu and Shu 2018, 2020, Bhoriya et al. 2025, Balsara et al. 2025). Since higher order finite volume schemes which preserve the divergence of the magnetic field exactly are gaining popularity in computational astrophysics and space physics, the twin goals of this paper are:- 1) to show how one can formulate PCP schemes for divergence-free MHD and RMHD and 2) to also to show how this can be done for higher order finite volume schemes. This also provides us with an opportunity to show the simplicity of multidimensional Riemann solvers for MHD and RMHD as they have been formulated in the recent literature on finite difference schemes (Balsara et al. 2025), and how these should be extended to finite volume schemes. For the sake of completeness, it is also worth pointing out that finite difference WENO-based PCP schemes for divergence-free MHD and RMHD that go up to ninth order of accuracy have already been documented in Balsara et al. (2025). This paper, therefore, shows how those advances are to be extended to finite volume WENO-based schemes for divergence-free MHD and RMHD. This proves to be an entirely non-trivial extension because there are many design choices that apply to finite difference schemes that do not apply to finite volume schemes and vice versa.

The plan of this paper is as follows. Section 2 describes the systems of interest and their higher order spatial and temporal update. In Section 3 we provide a very brief synopsis of the recent multidimensional Riemann solver from Balsara et al. [28] which plays a key role in the design of PCP schemes. In Section 4 we describe a baseline higher order finite volume scheme. This is useful because it gives us the essential structure on which the PCP ideas can be engrafted. In Section 5 we describe a low order scheme that is PCP and we also describe how it can be non-linearly hybridized with the higher order scheme to yield a method that is always PCP. Section 6 provides a step-by-step description of the PCP method described here. Section 7 shows that our methods meet their design accuracies. Section 8 focuses on extreme test problems, i.e. the type of test problem that cannot be done by a normal higher order Godunov scheme except by use of the PCP methods described here. Section 9 offers some conclusions.

The MHD and RMHD Systems in Computational Astrophysics

In this Section we very quickly describe the MHD and RMHD systems that are of interest in computational astrophysics. While we show the equations in their 2D forms just to save space; the implementation is fully 3D.

The MHD system for an ideal fluid can be written in a conservation form as

∂∂t(ρρvxρvyρvzϵBxByBz)+∂∂x(ρvxρvx2+p+B2/8π−Bx2/4πρvxvy−BxBy/4πρvxvz−BxBz/4π(ϵ+p+B2/8π)vx−Bx(v⋅B)/4π0vxBy−vyBx−(vzBx−vxBz))+∂∂y(ρvyρvyvx−ByBx/4πρvy2+p+B2/8π−By2/4πρvyvz−ByBz/4π(ϵ+p+B2/8π)vy−By(v⋅B)/4π−(vxBy−vyBx)0vyBz−vzBy)=0(1)\frac{\partial}{\partial t} \begin{pmatrix} \rho\\ \rho v_x \\ \rho v_y \\ \rho v_z \\ \epsilon\\ B_x \\ B_y \\ B_z \end{pmatrix} + \frac{\partial}{\partial x} \begin{pmatrix} \rho v_x \\ \rho v_x^2+p+\mathbf{B}^2/8\pi-B_x^2/4\pi\\ \rho v_xv_y-B_xB_y/4\pi\\ \rho v_xv_z-B_xB_z/4\pi\\ (\epsilon+p+\mathbf{B}^2/8\pi)v_x-B_x(\mathbf{v}\cdot\mathbf{B})/4\pi\\ 0 \\ v_xB_y-v_yB_x \\ -(v_zB_x-v_xB_z) \end{pmatrix} + \frac{\partial}{\partial y} \begin{pmatrix} \rho v_y \\ \rho v_yv_x-B_yB_x/4\pi\\ \rho v_y^2+p+\mathbf{B}^2/8\pi-B_y^2/4\pi\\ \rho v_yv_z-B_yB_z/4\pi\\ (\epsilon+p+\mathbf{B}^2/8\pi)v_y-B_y(\mathbf{v}\cdot\mathbf{B})/4\pi\\ -(v_xB_y-v_yB_x) \\ 0 \\ v_yB_z-v_zB_y \end{pmatrix} =0 \tag*{(1)}

where ε=ρv2/2+p/(Γ−1)+B2/8π\varepsilon=\rho v^{2}/2+p/(\Gamma-1)+\mathbf{B}^{2}/8\pi is the total energy density. The density is denoted by ρ\rho; the pressure is written as “pp”; the velocity components are given by vxv_{x}, vyv_{y}, vzv_{z}; and the magnetic field components by BxB_{x}, ByB_{y}, BzB_{z}. “Γ\Gamma” denotes the ratio of specific heats. The vector of primitive variables that one seeks to extract from the vector of conserved variables is given by (ρ,vx,vy,vz,p,Bx,By,Bz)T(\rho,v_{x},v_{y},v_{z},p,B_{x},B_{y},B_{z})^{T}. The usual challenge in MHD simulations has been that when the velocities or magnetic fields become too large, the pressure can become zero or negative. While co-evolving an entropy evolution equation can help, it also causes a loss of conservation when it is indeed invoked in a given zone.

The RMHD system is given by

References

  1. [1]R. Abgrall, Journal of Computational Physics, 372, 640–666 (2018)
  2. [2]R. Abgrall, Journal of Computational Physics, 453, 110955 (2022)
  3. [4]D. S. Balsara, Astrophys. J. Suppl. 116, 119 (1998a)
  4. [5]D. S. Balsara, Astrophys. J. Suppl. 116, 133 (1998b)
  5. [6]D. S. Balsara and D.S. Spicer, J. Comput. Phys., 149, 270-292 (1999a)
  6. [8]D. S. Balsara and C.-W. Shu, Journal of Computational Physics, 160, 405-452 (2000)
  7. [9]D.S. Balsara, J. Comput. Phys. 174 (2001a) 614–648
  8. [10]D.S. Balsara, Astrophys. J. Suppl., 132, 83-101 (2001b)
  9. [11]D.S. Balsara, Astrophys. J. Suppl. 151 (2004) 149–184
  10. [12]D.S. Balsara, J. Comput. Phys. 228 (2009) 5040–5056
  11. [13]D.S. Balsara, T. Rumpf, M. Dumbser & C.-D. Munz, Efficient, J. Comp. Phys., 228, Pgs. 2480-2516 (2009)
  12. [14]D.S. Balsara, J. Comp. Phys., 229, 1970-1993, (2010)
  13. [15]D.S. Balsara, J. Comp. Phys., 231, 7476-7503 (2012a)
  14. [16]D.S. Balsara, J. Comp. Phys., 231, 7504-7517, (2012b)
  15. [17]D.S. Balsara, C. Meyer, M. Dumbser, H. Du and Z. Xu, J. Comp. Phys., 235, 934-969 (2013)
  16. [18]D.S. Balsara, Journal of Computational Physics, 277, 163-200 (2014)
  17. [19]D.S. Balsara, Journal of Computational Physics, 295, 1-23 (2015)
  18. [20]D.S. Balsara and J. Kim, J. Comput. Phys., Vol. 312, 357-384 (2016)
  19. [21]D.S. Balsara, S. Garain and C.-W. Shu, Journal of Computational Physics, 326, 780-804 (2016)
  20. [22]D.S. Balsara and R. Käppeli, Journal of Computational Physics, 336, 104-127 (2017) D.S. Balsara and B. Nkonga, Journal of Computational Physics, 346, 25-48 (2017)
  21. [23]D.S. Balsara, A. Taflove, S. Garain and G. Montecinos, J. Comput. Phys. 354, 613-645 (2018)
  22. [24]D.S. Balsara, S. Samantaray and S. Subramanian, Communications in Applied Mathematics and Computational Science, 5, 428–484 (2023)
  23. [28]D.S. Balsara, An Alternative Finite Difference WENO-like Scheme with Physical Constraint Preservation for Divergence-Preserving Hyperbolic Systems, submitted, Communications in Applied Mathematics and Computational Science, (2025)arxiv.org/abs/2506.22312
  24. [31]M. Brio, C. Wu, J. Comput. Phys., 75 (1988), 400–422
  25. [33]C. Cai, J. Qiu and K. Wu, Provably Convergent and Robust Newton-Raphson Method: A New Dawn in Primitive Variable Recovery for Relativistic MHD. arXiv preprint arXiv:2404.05531 (2025)arxiv.org/abs/2404.05531
  26. [34]P. Cargo, G. Gallice, J. Comput. Phys., 136 (1997), 446–466
  27. [35]P. Colella, P.R. Woodward, J. Comput. Phys. 54 (1984) 174–201
  28. [36]P. Colella, SIAM J. Sci. Statist. Comput. 6 (1985) 104
  29. [37]W. L. Dai and P. Woodward, Astrophys. J., 494, 317 (1998)
  30. [38]L.DelZanna, O.Zanotti, N.Bucciantini, P.Londrillo, Astron.Astrophys., 473, 11 (2007)
  31. [40]M. Dumbser, D.S. Balsara, J. Comput. Phys. 304, 275–319, (2016)
  32. [41]B. Einfeldt, C.-D. Munz, P. Roe, B. Sjögreen, J. Comput. Phys., 92 (1991), 273–295
  33. [43]C.F. Gammie, J.C. McKinney, G. Tóth, Astrophys. J. 589, 444 (2003)
  34. [45]K.F. Gurski, SIAM J. Sci. Comput. 25 (2004) 2165
  35. [46]A. Harten, J. Comput. Phys., 49, 357-393 (1983)
  36. [49]A. Jeffrey and A. Tanuiti, Nonlinear Wave Propagation, Academic Press, New York, (1964)
  37. [50]G.-S. Jiang and C.-W. Shu, Journal of Computational Physics, 126, 202-228 (1996)
  38. [52]S.S. Komissarov, Mon. Not. R. Astron. Soc. 303 (1999) 343.
  39. [54]McCorquodale and P. Colella. Commun. App. Math. and Comp. Sci., 6:1 {25}, 2011
  40. [57]T. Miyoshi, K. Kusano, J. Comput. Phys. 208 (2005) 315–344
  41. [58]P. L. Roe and D. S. Balsara, SIAM J. Appl. Math. 56, 57 (1996)
  42. [59]D. Ryu and T. Jones, Astrophys. J. 442, 228 (1995)
  43. [60]D. Ryu, F. Miniati, T.W. Jones, A. Frank, Astrophys. J. 509 (1998) 244–255
  44. [62]C.-W. Shu and S. Osher, J. Comput. Phys. 77, 439 (1988)
  45. [64]R.J. Spiteri and S.J. Ruuth, SIAM Journal of Numerical Analysis, 40 (2002), pp. 469–491
  46. [65]R.J. Spiteri and S.J. Ruuth, Mathematics and Computers in Simulation 62 (2003) 125-135
  47. [66]A. Tchekhovskoy, J.C. McKinney, R. Narayan, Mon. Not. R. Astron. Soc. 379, 469–497 (2007)
  48. [67]B. van Leer, J. Comput. Phys. 32 (1979) 101
  49. [68]P. Woodward, P. Colella, J. Comput. Phys. 54 (1984) 115–173
  50. [71]K. S. Yee, IEEE Trans. Antenna Propagation AP-14, 302 (1966)
  51. [72]A. L. Zachary, A. Malagoli, and P. Colella, SIAM J. Sci. Comput. 15, 263 (1994)

Paper details

vlnc:W_6bnxm63r
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents