Abstract
We propose a constraint preserving discontinuous Galerkin method for ideal compressible MHD in two dimensions and using Cartesian grids, which automatically maintains the global divergence-free property. The approximation of the magnetic field is achieved using Raviart–Thomas polynomials and the DG scheme is based on evolving certain moments of these polynomials which automatically guarantees divergence-free property. We also develop HLL-type multi-dimensional Riemann solvers to estimate the electric field at vertices which are consistent with the 1-D Riemann solvers. When limiters are used, the divergence-free property may be lost and it is recovered by a divergence-free reconstruction step. We show the performance of the method on a range of test cases up to fourth order of accuracy.
Similar content being viewed by others
Notes
Here the indices i, j denote the solution modes and not the cell indices.
Code taken from https://github.com/PrincetonUniversity/athena-public-version at git version 273e451e16d3a5af594dd0a.
References
Balsara, D.S.: Divergence-free adaptive mesh refinement for magnetohydrodynamics. J. Comput. Phys. 174, 614–648 (2001)
Balsara, D.S.: Second-order-accurate schemes for magnetohydrodynamics with divergence-free reconstruction. Astrophys. J. Suppl. Ser. 151, 149–184 (2004)
Balsara, D.S.: Divergence-free reconstruction of magnetic fields and WENO schemes for magnetohydrodynamics. J. Comput. Phys. 228, 5040–5056 (2009)
Balsara, D.S.: Multidimensional HLLE Riemann solver: application to Euler and magnetohydrodynamic flows. J. Comput. Phys. 229, 1970–1993 (2010)
Balsara, D.S.: Multidimensional Riemann problem with self-similar internal structure. Part I—application to hyperbolic conservation laws on structured meshes. J. Comput. Phys. 277, 163–200 (2014)
Balsara, D.S., Käppeli, R.: Von Neumann stability analysis of globally divergence-free RKDG schemes for the induction equation using multidimensional Riemann solvers. J. Comput. Phys. 336, 104–127 (2017)
Balsara, D.S., Spicer, D.S.: A staggered mesh algorithm using high order Godunov fluxes to ensure solenoidal magnetic fields in magnetohydrodynamic simulations. J. Comput. Phys. 149, 270–292 (1999)
Batten, P., Clarke, N., Lambert, C., Causon, D.M.: On the choice of wavespeeds for the HLLC Riemann solver. SIAM J. Sci. Comput. 18, 1553–1570 (1997)
Bohm, M., Winters, A.R., Gassner, G.J., Derigs, D., Hindenlang, F., Saur, J.: An entropy stable nodal discontinuous Galerkin method for the resistive MHD equations. Part I: theory and numerical verification. J. Comput. Phys. 108076 (2018). https://doi.org/10.1016/j.jcp.2018.06.027
Bouchut, F., Klingenberg, C., Waagan, K.: A multiwave approximate Riemann solver for ideal MHD based on relaxation. I: Theoretical framework. Numer. Math. 108, 7–42 (2007)
Brackbill, J., Barnes, D.: The effect of nonzero \(\nabla \)\(\cdot \) B on the numerical solution of the magnetohydrodynamic equations. J. Comput. Phys. 35, 426–430 (1980)
Brezzi, F., Fortin, M.: Mixed and Hybrid Finite Element Methods. Springer Series in Computational Mathematics, vol. 15. Springer, New York (1991)
Brio, M., Wu, C.: An upwind differencing scheme for the equations of ideal magnetohydrodynamics. J. Comput. Phys. 75, 400–422 (1988)
Chandrashekar, P.: A Global Divergence Conforming DG Method for Hyperbolic Conservation laws with divergence constraint. J. Sci. Comput. 79, 79–102 (2019)
Chandrashekar, P., Klingenberg, C.: Entropy stable finite volume scheme for ideal compressible MHD on 2-D Cartesian meshes. SIAM J. Numer. Anal. 54, 1313–1340 (2016)
Cheng, Y., Li, F., Qiu, J., Xu, L.: Positivity-preserving DG and central DG methods for ideal MHD equations. J. Comput. Phys. 238, 255–280 (2013)
Cockburn, B., Hou, S., Shu, C.-W.: The Runge–Kutta local projection discontinuous Galerkin finite element method for conservation laws. IV: the multidimensional case. Math. Comput. 54, 545 (1990)
Cockburn, B., Li, F., Shu, C.-W.: Locally divergence-free discontinuous Galerkin methods for the Maxwell equations. J. Comput. Phys. 194, 588–610 (2004)
Cockburn, B., Lin, S.-Y., Shu, C.-W.: TVB Runge–Kutta local projection discontinuous Galerkin finite element method for conservation laws III: one-dimensional systems. J. Comput. Phys. 84, 90–113 (1989)
Dedner, A., Kemm, F., Kröner, D., Munz, C.-D., Schnitzer, T., Wesenberg, M.: Hyperbolic divergence cleaning for the MHD equations. J. Comput. Phys. 175, 645–673 (2002)
Derigs, D., Winters, A.R., Gassner, G.J., Walch, S., Bohm, M.: Ideal GLM-MHD: about the entropy consistent nine-wave magnetic field divergence diminishing ideal magnetohydrodynamics equations. J. Comput. Phys. 364, 420–467 (2018)
Evans, C.R., Hawley, J.F.: Simulation of magnetohydrodynamic flows—a constrained transport method. Astrophys. J. 332, 659 (1988)
Fu, G., Shu, C.-W.: A new troubled-cell indicator for discontinuous Galerkin methods for hyperbolic conservation laws. J. Comput. Phys. 347, 305–327 (2017)
Fu, P., Li, F., Xu, Y.: Globally divergence-free discontinuous Galerkin methods for ideal magnetohydrodynamic equations. J. Sci. Comput. 77, 1621–1659 (2018)
Gardiner, T.A., Stone, J.M.: An unsplit Godunov method for ideal MHD via constrained transport. J. Comput. Phys. 205, 509–539 (2005)
Godunov, S.: Symmetric form of the magnetohydrodynamic equation. Chislennye Metody Mekh. Sploshnoi Sredy 3, 26–34 (1972)
Guillet, T., Pakmor, R., Springel, V., Chandrashekar, P., Klingenberg, C.: High-order magnetohydrodynamics for astrophysics with an adaptive mesh refinement discontinuous Galerkin scheme. Mon. Not. R. Astron. Soc. 485, 4209–4246 (2019)
Gurski, K.F.: An HLLC-type approximate Riemann solver for ideal magnetohydrodynamics. SIAM J. Sci. Comput. 25, 2165–2187 (2004)
Harten, A., Lax, P.D., van Leer, B.: On Upstream Differencing and Godunov-Type Schemes for Hyperbolic conservation laws. SIAM Rev. 25, 35–61 (1983)
Hazra, A., Chandrashekar, P., Balsara, D.S.: Globally constraint-preserving FR/DG scheme for Maxwell’s equations at all orders. J. Comput. Phys. 394, 298–328 (2019)
Janhunen, P.: A positive conservative method for magnetohydrodynamics based on HLL and Roe methods. J. Comput. Phys. 160, 649–661 (2000)
Kraaijevanger, J.F.B.M.: Contractivity of Runge–Kutta methods. BIT Numer. Math. 31, 482–528 (1991)
Li, F., Shu, C.-W.: Locally divergence-free discontinuous Galerkin methods for MHD equations. J. Sci. Comput. 22–23, 413–442 (2005)
Li, F., Xu, L.: Arbitrary order exactly divergence-free central discontinuous Galerkin methods for ideal MHD equations. J. Comput. Phys. 231, 2655–2675 (2012)
Li, F., Xu, L., Yakovlev, S.: Central discontinuous Galerkin methods for ideal MHD equations with the exactly divergence-free magnetic field. J. Comput. Phys. 230, 4828–4847 (2011)
Li, S.: An HLLC Riemann solver for magneto-hydrodynamics. J. Comput. Phys. 203, 344–357 (2005)
Liu, Y., Shu, C.-W., Zhang, M.: Entropy stable high order discontinuous Galerkin methods for ideal compressible MHD on structured meshes. J. Comput. Phys. 354, 163–178 (2018)
Orszag, S.A., Tang, C.-M.: Small-scale structure of two-dimensional magnetohydrodynamic turbulence. J. Fluid Mech. 90, 129 (1979)
Powell, K.G., Roe, P.L., Linde, T.J., Gombosi, T.I., De Zeeuw, D.L.: A solution-adaptive upwind scheme for ideal magnetohydrodynamics. J. Comput. Phys. 154, 284–309 (1999)
Raviart, P.A., Thomas, J.M.: A mixed finite element method for 2-nd order elliptic problems. In: Galligani, I., Magenes, E. (eds.) Mathematical Aspects of Finite Element Methods, vol. 606, pp. 292–315. Springer, Berlin (1977)
Rusanov, V.: The calculation of the interaction of non-stationary shock waves and obstacles. USSR Comput. Math. Math. Phys. 1, 304–320 (1962)
Shu, C.-W., Osher, S.: Efficient implementation of essentially non-oscillatory shock-capturing schemes. J. Comput. Phys. 77, 439–471 (1988)
Spiteri, R.J., Ruuth, S.J.: A New Class of Optimal High-Order Strong-Stability-Preserving Time Discretization methods. SIAM J. Numer. Anal. 40, 469–491 (2002)
Toro, E.F.: Riemann Solvers and Numerical Methods for Fluid Dynamics. Springer, Berlin (2009)
Toro, E.F., Spruce, M., Speares, W.: Restoration of the contact surface in the HLL-Riemann solver. Shock Waves 4, 25–34 (1994)
Tóth, G.: The \(\nabla \)\(\cdot \) B constraint in shock-capturing magnetohydrodynamics codes. J. Comput. Phys. 161, 605–652 (2000)
Vides, J., Nkonga, B., Audit, E.: A simple two-dimensional extension of the HLL Riemann solver for hyperbolic systems of conservation laws. J. Comput. Phys. 280, 643–675 (2015)
Winters, A.R., Gassner, G.J.: Affordable, entropy conserving and entropy stable flux functions for the ideal MHD equations. J. Comput. Phys. 304, 72–108 (2016)
Wu, K.: Positivity-preserving analysis of numerical schemes for ideal magnetohydrodynamics. SIAM J. Numer. Anal. 56, 2124–2147 (2018)
Wu, K., Shu, C.-W.: A Provably Positive Discontinuous Galerkin Method for Multidimensional ideal magnetohydrodynamics. SIAM J. Sci. Comput. 40, B1302–B1329 (2018)
Zhang, X., Shu, C.-W.: On maximum-principle-satisfying high order schemes for scalar conservation laws. J. Comput. Phys. 229, 3091–3120 (2010)
Zhang, X., Shu, C.-W.: On positivity-preserving high order discontinuous Galerkin schemes for compressible Euler equations on rectangular meshes. J. Comput. Phys. 229, 8918–8934 (2010)
Acknowledgements
Praveen Chandrashekar would like to acknowledge support from SERB-DST, India, under the MATRICS grant (MTR/2018/000006) and Department of Atomic Energy, Government of India, under project no. 12-R&D-TFR-5.01-0520. Rakesh Kumar would like to acknowledge funding support from the National Post-doctoral Fellowship (PDF/2018/002621) administered by SERB-DST, India.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
A Limiting and Divergence-Free Reconstruction
When the solution on the faces \(b_x\), \(b_y\) is limited as explained in Sect. 7, we lose the divergence-free property of the magnetic field. To recover this property, we have to perform a divergence-free reconstruction step. We explain this reconstruction process for second, third and fourth order accuracy. The fifth order version is given in [30] together with more details on the reconstruction idea. The resulting polynomial has the structure of the BDM polynomial on rectangles, see [12], Equation (3.29). Here we explain how the RT polynomial can be modified to recover divergence-free property. In two dimensions, the BDM polynomial has \((k+1)(k+2)+2\) degrees of freedom while its divergence has \({\frac{1}{2}}k(k+1)\) coefficients. Up to third order accuracy, the reconstruction can be performed using only the solution on the faces \((b_x, b_y)\), but at fourth order and higher, we need additional information which is supplied in the form of the curl of the magnetic field. This additional information is available to us via the cell moments \(\alpha , \beta \).
For example, at fourth order, the BDM polynomial has \((3+1)(3+2)+2 =22\) degrees of freedom, while the face solution \((b_x,b_y)\), which are polynomials of degree 3, provide \((4+4+4+4)-1=15\) degrees of freedom, where one piece of information is redundant since the face solution satisfies \(\int _{\partial K} \varvec{B}\cdot \varvec{n}\text{ d }s = 0\) on each cell K. The divergence-free condition on the BDM polynomial yields \({\frac{1}{2}}(3)(3+1)=6\) conditions. So we have a total of \(15+6 = 21\) equations but 22 coefficients to be determined. Hence we need to supply one additional piece of information to completely determine the BDM polynomial.
We have the following inclusions \(\mathbb {P}_k^2 \subset \text {BDM}(k) \subset \text {RT}(k)\) and the RT polynomial has many more basis functions than the BDM polynomial. In the reconstruction process, we set some of the coefficients \(\{a,b\}\) in the RT polynomial to zero but this does not affect the accuracy since only coefficients \(a_{ij}, b_{ij}\) with \(i+j > k\) are set to zero, and we retain the \(\mathbb {P}_k\) part of the solution.
1.1 A.1 Degree \(k=1\)
The divergence of the vector field \(\varvec{B}\in \text {RT}(1)\) is given by
The coefficients \(a_{ij}, b_{ij}\) are related to the face solution and cell moments according to Table 1. The constant term is already zero. The linear terms can be made zero by setting
This will however destroy the conservation property since \(\alpha _{00}\), \(\beta _{00}\) are cell averages of \(B_x\), \(B_y\) respectively. The bilinear term can be made zero by individually setting \(a_{21} = b_{12} = 0\) which yields
By this process we would have modified all the cell moments and the resulting reconstruction coincides with that of Balsara.
1.2 A.2 Degree \(k=2\)
The divergence of the vector field \(\varvec{B}\in \text {RT}(2)\) is given by
The constant term is already zero. The linear terms can be made zero by setting
The quadratic terms are zero by choosing
and also setting \(a_{21} = b_{12} = 0\) which yields
In the cubic terms, we set each coefficient to zero, \(a_{22} = a_{31} = a_{32} = b_{22} = b_{13} = b_{23} = 0\), which yields
Finally, in the biquadratic term, we set \(a_{32} = b_{23} = 0\) to obtain
1.3 A.3 Degree \(k=3\)
The divergence of the vector field \(\varvec{B}\in \text {RT}(3)\) is given by
The constant term is already zero. The linear terms can be made zero by setting
The quadratic terms which are coefficients of \(\phi _2(\xi )\), \(\phi _2(\eta )\) become zero by choosing
The coefficient of \(\phi _1(\xi )\phi _1(\eta )\) gives only one equation but there are two unknowns; adding an extra equation \(\omega = \beta _{10}-\alpha _{01}\), we can solve for the two coefficients
where \(r_1={\frac{1}{2}}(a_1^{-}+a_1^{+})\) and \(r_2={\frac{1}{2}}(b_1^{-}+b_1^{+})\). The cubic terms are zeros by choosing
and setting \(2 a_{22}+\frac{6}{35}a_{42} = 2b_{22}+\frac{6}{35}b_{24} = a_{31} = b_{13} = 0\), which yields
In the higher order term greater then three, we set each coefficient to zero, \(a_{32}=b_{23} = 2a_{23}+\frac{6}{35}a_{43} = b_{14}=a_{41} = 2b_{32}+\frac{6}{35}b_{34} = a_{33}=b_{24}=a_{42}=b_{33}=a_{43}=b_{34}=0\), which yields
We see that at fourth order, we need an extra information which we took in the form of the quantity \(\omega \) in order to complete the divergence-free reconstruction. Note \(\omega \) gives us information about the curl of the magnetic field.
B Setting the Initial Condition
Let \(\psi _h \in \mathbb {Q}_{k+1,k+1}\) be a continuous interpolation of the magnetic potential \(\psi \) which can be achieved using \((k+2)\times (k+2)\) GLL nodes. Then we can set the magnetic field as \(B_x = \frac{\partial \psi _h}{\partial y}\), \(B_y = -\frac{\partial \psi _h}{\partial x}\) which will be exactly divergence-free. But in our work, we want to set the initial condition in terms of the polynomials \(b_x,b_y\) and the moments \(\alpha ,\beta \). We can perform an \(L^2\) projection of \(\nabla \times (\psi _h e_z)\) to initialize \(b_x,b_y\) which will be exact, and the moments can be computed using the same GLL nodes for quadrature as are used to define \(\psi _h\). Let \(\xi _i, i=1,2,\ldots ,k+2\) denote the GLL nodes and let \(\ell _i(\xi ), i=1,2,\ldots ,k+2\) be the Lagrange polynomials. Define the barycentric weights
Then the derivatives of Lagrange polynomials at the GLL nodes are given by
The derivatives of the potential at the GLL nodes are given by
The cell moments are initialized as \(\alpha = \alpha ^h(\partial _y \psi _h)\) and \(\beta = \beta ^h(-\partial _x\psi _h)\) where the superscript h denotes that we compute the integrals using \((k+2)^2\)-point GLL quadrature which is exact for the integrands involved in the cell moments.
Rights and permissions
About this article
Cite this article
Chandrashekar, P., Kumar, R. Constraint Preserving Discontinuous Galerkin Method for Ideal Compressible MHD on 2-D Cartesian Grids. J Sci Comput 84, 39 (2020). https://doi.org/10.1007/s10915-020-01289-8
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10915-020-01289-8