Abstract
In this paper, a high order free-stream preserving finite difference weighted essentially non-oscillatory (WENO) scheme is developed for the ideal magnetohydrodynamic (MHD) equations on curvilinear meshes. Under the constrained transport framework, magnetic potential evolved by a Hamilton–Jacobi (H–J) equation is introduced to control the divergence error. In this work, we use the alternative formulation of WENO scheme (Christlieb et al. in SIAM J Sci Comput 40(4):A2631–A2666, 2018) for the nonlinear hyperbolic conservation law, and design a novel method to solve the magnetic potential. Theoretical derivation and numerical results show that the scheme can preserve free-stream solutions of MHD equations, and reduce error more effectively than the standard finite difference WENO schemes for such problems.
Similar content being viewed by others
References
Abgrall, R.: Numerical discretization of the first-order Hamilton–Jacobi equation on triangular meshes. Commun. Pure Appl. Math. 49(12), 1339–1373 (1996)
Balsara, D.S.: Second-order-accurate schemes for magnetohydrodynamics with divergence-free reconstruction. Astrophys. J. Suppl. Ser. 151(1), 149 (2004)
Balsara, D.S.: Divergence-free reconstruction of magnetic fields and WENO schemes for magnetohydrodynamics. J. Comput. Phys. 228(14), 5040–5056 (2009)
Balsara, D.S., Meyer, C., Dumbser, M., Du, H., Xu, Z.: Efficient implementation of ADER schemes for Euler and magnetohydrodynamical flows on structured meshes—speed comparisons with Runge–Kutta methods. J. Comput. Phys. 235(4), 934–969 (2013)
Balsara, D.S., Rumpf, T., Dumbser, M., Munz, C.-D.: Efficient, high accuracy ADER-WENO schemes for hydrodynamics and divergence-free magnetohydrodynamics. J. Comput. Phys. 228(7), 2480–2516 (2009)
Balsara, D.S., Shu, C.-W.: Monotonicity preserving weighted essentially non-oscillatory schemes with increasingly high order of accuracy. J. Comput. Phys. 160(2), 405–452 (2000)
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(2), 270–292 (1999)
Brackbill, J.U., Barnes, D.C.: The effect of nonzero \(\nabla \cdot B\) on the numerical solution of the magnetohydrodynamic equations. J. Comput. Phys. 35(3), 426–430 (1980)
Cai, X., Ladeinde, F.: Performance of WENO scheme in generalized curvilinear coordinate systems. In 46th AIAA Aerospace Sciences Meeting and Exhibit, p. 36 (2008)
Christlieb, A.J., Feng, X., Jiang, Y., Tang, Q.: A high-order finite difference WENO scheme for ideal magnetohydrodynamics on curvilinear meshes. SIAM J. Sci. Comput. 40(4), A2631–A2666 (2018)
Christlieb, A.J., Feng, X., Seal, D.C., Tang, Q.: A high-order positivity-preserving single-stage single-step method for the ideal magnetohydrodynamic equations. J. Comput. Phys. 316(C), 218–242 (2016)
Christlieb, A.J., Rossmanith, J.A., Tang, Q.: Finite difference weighted essentially non-oscillatory schemes with constrained transport for ideal magnetohydrodynamics. J. Comput. Phys. 268, 302–325 (2014)
Dai, W., Woodward, P.R.: On the divergence-free condition and conservation laws in numerical simulations for supersonic magnetohydrodynamical flows. Astrophys. J. 494(1), 317 (1998)
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(2), 645–673 (2002)
Evans, C.R., Hawley, J.F.: Simulation of magnetohydrodynamic flows—a constrained transport method. Astrophys. J. 332, 659–677 (1988)
Fey, M., Torrilhon, M.: A constrained transport upwind scheme for divergence-free advection. In: Hyperbolic Problems: Theory, Numerics, Applications, pp. 529–538. Springer (2003)
Gardiner, T.A., Stone, J.M.: An unsplit Godunov method for ideal MHD via constrained transport. J. Comput. Phys. 205(2), 509–539 (2005)
Gombosi, T.I., Powell, K.G., De Zeeuw, D.L.: Axisymmetric modeling of cometary mass loading on an adaptively refined grid: MHD results. J. Geophys. Res. Space Phys. 99(A11), 21525–21539 (1994)
Helzel, C., Rossmanith, J.A., Taetz, B.: An unstaggered constrained transport method for the 3D ideal magnetohydrodynamic equations. J. Comput. Phys. 230(10), 3803–3829 (2011)
Helzel, C., Rossmanith, J.A., Taetz, B.: A high-order unstaggered constrained-transport method for the three-dimensional ideal magnetohydrodynamic equations based on the method of lines. SIAM J. Sci. Comput. 35(2), A623–A651 (2013)
Jiang, G.-S., Peng, D.: Weighted ENO schemes for Hamilton–Jacobi equations. SIAM J. Sci. Comput. 21(6), 2126–2143 (2000)
Jiang, G.-S., Shu, C.-W.: Efficient implementation of weighted ENO schemes. J. Comput. Phys. 126(1), 202–228 (1996)
Jiang, G.-S., Wu, C.: A high-order WENO finite difference scheme for the equations of ideal magnetohydrodynamics. J. Comput. Phys. 150(2), 561–594 (1999)
Jiang, Y., Shu, C.-W., Zhang, M.: An alternative formulation of finite difference weighted ENO schemes with Lax–Wendroff time discretization for conservation laws. SIAM J. Sci. Comput. 35(2), A1137–A1160 (2013)
Jiang, Y., Shu, C.-W., Zhang, M.: Free-stream preserving finite difference schemes on curvilinear meshes. Methods Appl. Anal. 21(1), 1–30 (2014)
Nonomura, T., Iizuka, N., Fujii, K.: Freestream and vortex preservation properties of high-order WENO and WCNS on curvilinear grids. Comput. Fluids 39(2), 197–214 (2010)
Osher, S., Shu, C.-W.: High-order essentially nonoscillatory schemes for Hamilton–Jacobi equations. SIAM J. Numer. Anal. 28(4), 907–922 (1991)
Rossmanith, J.A.: An unstaggered, high-resolution constrained transport method for magnetohydrodynamic flows. SIAM J. Sci. Comput. 28(5), 1766–1797 (2006)
Shen, Y., Zha, G., Huerta, M.A.: E-CUSP scheme for the equations of ideal magnetohydrodynamics with high order WENO scheme. J. Comput. Phys. 231(19), 6233–6247 (2012)
Shu, C.-W.: High order weighted essentially nonoscillatory schemes for convection dominated problems. SIAM Rev. 51(1), 82–126 (2009)
Shu, C.-W., Osher, S.: Efficient implementation of essentially non-oscillatory shock-capturing schemes. J. Comput. Phys. 77(2), 439–471 (1988)
Tóth, G.: The \(\nabla \cdot B=0\) constraint in shock-capturing magnetohydrodynamics codes. J. Comput. Phys. 161(2), 605–652 (2000)
Visbal, M.R., Gaitonde, D.V.: On the use of higher-order finite-difference schemes on curvilinear and deforming meshes. J. Comput. Phys. 181(1), 155–185 (2002)
Zhang, Y.-T., Shu, C.-W.: High-order WENO schemes for Hamilton–Jacobi equations on triangular meshes. SIAM J. Sci. Comput. 24(3), 1005–1030 (2003)
Acknowledgements
Y. Jiang: Research supported by NSFC Grant 11901555. M. Zhang: Research supported by NSFC Grant 11871448.
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.
Appendix: WENO method
Appendix: WENO method
For the sake of completeness, we give the formula of WENO interpolation for a hyperbolic system and WENO approximation for a H–J equation. Here, we only show the 1D case with fifth order accuracy. For 2D case, it can be obtained in a dimension-by-dimension fashion, in which we fix one index and do the process in the other direction.
1.1 WENO Interpolation for a System
Given the point values \(\{{\mathbf{q }}_i\}\), we will approximate the values at half points \({\mathbf{q }}_{i+1/2}^{\pm }\) :
- 1.
Compute an average state \({\mathbf{q }}_{i+1/2}\), using either the simple arithmetic mean or a Roe average. Construct the right and left eigenvectors of the Jacobian \(\partial \widetilde{{\mathbf{f }}} / \partial {\mathbf{q }}\), and denote their matrices by
$$\begin{aligned} R_{i+1/2}=R\left( {\mathbf{q }}_{i+1/2}\right) ,\quad R^{-1}_{i+1/2}=R^{-1}\left( {\mathbf{q }}_{i+1/2}\right) . \end{aligned}$$ - 2.
Project the conserved quantities \({\mathbf{q }}\) to the local characteristic variables \({\mathbf{v }}\),
$$\begin{aligned} {\mathbf{v }}_{j} = R^{-1}_{i+1/2} {\mathbf{q }}_{j}, \quad {\text {for}} j = i-2, \ldots , i+3. \end{aligned}$$ - 3.
Perform a scalar WENO interpolation on each component of the characteristic variable \({\mathbf{v }}_{j}\) to obtain the corresponding component of \({\mathbf{v }}_{i+1/2}^{\pm }\). Here, the procedure of a fifth-order WENO interpolation to obtain the k-th component \(v^{-}_{k,i+1/2}\) is described:
- (a)
Choose one big stencil as \(S = \{x_{i-2},\ldots ,x_{i+2}\}\), and three small stencils as \(S^{(r)} _{i}= \{x_{i-r},\ldots , x_{i-r+2}\}\), \(r=0,1,2\). On each small stencil, the standard interpolation gives
$$\begin{aligned} v^{(0)}_{k,i+1/2}&= \frac{3}{8}v_{k,i} +\frac{3}{4}v_{k,i+1} -\frac{1}{8}v_{k,i+2},\\ v^{(1)}_{k,i+1/2}&= -\frac{1}{8}v_{k,i-1} +\frac{3}{4}v_{k,i} +\frac{3}{8}v_{k,i+1},\\ v^{(2)}_{k,i+1/2}&= \frac{3}{8}v_{k,i-2} -\frac{5}{4}v_{k,i-1} +\frac{15}{8}v_{k,i}, \\ v^{\text {big}}_{k,i+1/2}&= d_{0} v^{(0)}_{k,i+1/2} +d_{1} v^{(1)}_{k,i+1/2} +d_{2} v^{(2)}_{k,i+1/2}, \end{aligned}$$with the linear weights being \(d_{0}={5}/{16}\), \(d_{1}={5}/{8}\) and \(d_{2}={1}/{16}\).
- (b)
Compute nonlinear weights \(\omega _r\) from the linear weights \(d_r\),
$$\begin{aligned} \omega _{r}=\frac{\alpha _{r}}{\alpha _{0}+\alpha _{1}+\alpha _{2}}, \quad \alpha _{r}=\frac{d_{r}}{(IS_{r}+\epsilon )^2}, \quad r=0,1,2, \end{aligned}$$where \(\epsilon = 10^{-6}\) is used to avoid division by zero, and the smoothness indicators are given by
$$\begin{aligned} IS_{0}&= \frac{13}{12}\left( v_{k,i}-2v_{k,i+1}+v_{k,i+2}\right) ^2 +\frac{1}{4}\left( 3v_{k,i}-4v_{k,i+1}+v_{k,i+2}\right) ^2,\\ IS_{1}&= \frac{13}{12}\left( v_{k,i-1}-2v_{k,i}+v_{k,i+1}\right) ^2 +\frac{1}{4}\left( v_{k,i}-v_{k,i+1}\right) ^2,\\ IS_{2}&= \frac{13}{12}\left( v_{k,i-2}-2v_{k,i-1}+v_{k,i}\right) ^2 +\frac{1}{4}\left( v_{k,i-2}-4v_{k,i-1}+3v_{k,i}\right) ^2. \end{aligned}$$ - (c)
The WENO interpolation is defined by
$$\begin{aligned} v^{-}_{k,i+1/2}=\sum _{r=0}^{2}\omega _{r}v^{(r)}_{k,i+1/2}. \end{aligned}$$
- (a)
- 4.
Finally, project \({\mathbf{v }}_{i+1/2}^{\pm }\) back to the conserved quantities,
$$\begin{aligned} {\mathbf{q }}_{i+1/2}^{\pm } = R_{i+1/2} {\mathbf{v }}_{i+1/2}^{\pm }. \end{aligned}$$
Note that the process to obtain \({\mathbf{v }}^{+}_{i+1/2}\) is mirror-symmetric to the procedure described above, with respect to the target point \(x_{i+1/2}\).
1.2 WENO Approximation for H–J Equations
Given th point values \(\{\phi _i\}\), we want to approximate the derivative \(\partial _{\xi }\phi \) at \(\xi = \xi _{i}\). Introduce \(\Delta ^{+} \phi _{k}=\phi _{k+1}-\phi _{k}\) and \(\Delta ^{-} \phi _{k}=\phi _{k}-\phi _{k-1}\). Then, the fifth order approximation of \(\partial _{\xi }\phi ^{+}_{i}\) can be obtained as follows.
- 1.
There are three small stencils \(S^{(r)}_{i}=\{\xi _{i-2+r},\ldots ,\xi _{i+1+r}\}\), \(r=0,1,2\). On each stencil, we can obtain the approximation to \(\partial _\xi \phi _{i}\).
$$\begin{aligned} \partial _\xi \phi _{i}^{(0)}&= \frac{1}{\Delta \xi } \left( \frac{1}{6}\phi _{i-2}-\phi _{i-1}+\frac{1}{2}\phi _{i}+\frac{1}{3}\phi _{i+1} \right) ,\\ \partial _\xi \phi _{i}^{(1)}&= \frac{1}{\Delta \xi } \left( -\frac{1}{3}\phi _{i-1}-\frac{1}{2}\phi _{i}+\phi _{i+1}-\frac{1}{6}\phi _{i+2} \right) ,\\ \partial _\xi \phi _{i}^{(2)}&= \frac{1}{\Delta \xi } \left( -\frac{11}{6}\phi _{i}+3\phi _{i+1}-\frac{3}{2}\phi _{i+2}+\frac{1}{3}\phi _{i+3} \right) , \\ \partial _\xi \phi _{i} ^{big}&= d_0 \partial _\xi \phi _{i}^{(0)} + d_1 \partial _\xi \phi _{i}^{(1)} + d_2 \partial _\xi \phi _{i}^{(2)} , \end{aligned}$$with linear weights \(d_0=3/10\), \(d_1=6/10\) and \(d_2=1/10\).
- 2.
Get the nonlinear weights
$$\begin{aligned} \omega _{r}=\frac{\alpha _{r}}{\alpha _{0}+\alpha _{1}+\alpha _{2}}, \quad \alpha _{r}=\frac{d_r}{\left( \epsilon +IS_{r}\right) ^{2}}, \quad r=0,1,2. \end{aligned}$$Here, we take \(\epsilon =10^{-6}\). And the smoothness indicators \(IS_{r}\) are defined by
$$\begin{aligned} IS_{0}&=13(b-a)^{2}+3(3b- a)^{2}, \\ IS_{1}&=13(c-b)^{2}+3( c+ b)^{2}, \\ IS_{2}&=13(d-c)^{2}+3( d-3c)^{2} , \end{aligned}$$and the parameters have form as
$$\begin{aligned} a&=\frac{1}{ \Delta \xi } \Delta ^+ \Delta ^- \phi _{i-1}, \quad b =\frac{1}{ \Delta \xi } \Delta ^+ \Delta ^- \phi _{i }, \\ c&=\frac{1}{ \Delta \xi } \Delta ^+ \Delta ^- \phi _{i+1}, \quad d =\frac{1}{ \Delta \xi } \Delta ^+ \Delta ^- \phi _{i+2}. \end{aligned}$$ - 3.
Finally, we can obtain the WENO approximation
$$\begin{aligned} \partial _\xi \phi ^+_{i}=\sum ^2_{r=0}\omega _{r} {\partial _\xi \phi _{i}}^{(r)}. \end{aligned}$$
The process to obtain \(\partial _{\xi }\phi ^{-}_{i}\) is mirror-symmetric to that for \(\partial _{\xi }\phi ^{+}_{i}\) with respect to the target point \(\xi _{i}\).
Rights and permissions
About this article
Cite this article
Yu, Y., Jiang, Y. & Zhang, M. Free-Stream Preserving Finite Difference Schemes for Ideal Magnetohydrodynamics on Curvilinear Meshes. J Sci Comput 82, 23 (2020). https://doi.org/10.1007/s10915-020-01125-z
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10915-020-01125-z