High-order accurate entropy stable finite difference schemes for the shallow water magnetohydrodynamics
Abstract
This paper develops the high-order accurate entropy stable (ES) finite difference schemes for the shallow water magnetohydrodynamic (SWMHD) equations. They are built on the numerical approximation of the modified SWMHD equations with the Janhunen source term. First, the second-order accurate well-balanced semi-discrete entropy conservative (EC) schemes are constructed, satisfying the entropy identity for the given convex entropy function and preserving the steady states of the lake at rest (with zero magnetic field). The key is to match both discretizations for the fluxes and the non-flat river bed bottom and Janhunen source terms, and to find the affordable EC fluxes of the second-order EC schemes. Next, by using the second-order EC schemes as building block, high-order accurate well-balanced semi-discrete EC schemes are proposed. Then, the high-order accurate well-balanced semi-discrete ES schemes are derived by adding a suitable dissipation term to the EC scheme with the WENO reconstruction of the scaled entropy variables in order to suppress the numerical oscillations of the EC schemes. After that, the semi-discrete schemes are integrated in time by using the high-order strong stability preserving explicit Runge-Kutta schemes to obtain the fully-discrete high-order well-balanced schemes. The ES property of the Lax-Friedrichs flux is also proved and then the positivity-preserving ES schemes are studied by using the positivity-preserving flux limiter. Finally, extensive numerical tests are conducted to validate the accuracy, the well-balanced, ES and positivity-preserving properties, and the ability to capture discontinuities of our schemes.
keywords:
Entropy conservative scheme, entropy stable scheme, high-order accuracy , positivity preserving , finite difference scheme, shallow water magnetohydrodynamics1 Introduction
The shallow water equations are widely used in atmospheric flows, tides, storm surges, river and coastal flows, lake flows, tsunamis, etc. They describe the flow with free surface under the influence of gravity and the bottom topology, where the vertical dimension is much smaller than any typical horizontal scale. Numerical simulation is an effective tool to solve them and a great variety of numerical methods are available in the literature, e.g. [4, 31, 37, 47, 48, 52, 53, 54] and the references therein.
Here we are concerned with numerical methods for the shallow water magnetohydrodynamic (SWMHD) equations, which take into account the effect of the magnetic field, originally proposed in [23] for studying the global dynamics of the solar tachocline. The two-dimensional (2D) SWMHD equations with non-flat bottom topography [23, 43] read the following quasi-linear hyperbolic balance laws
(1.1) |
with the divergence-free condition
(1.2) |
where is the conservative variables vector, and and are respectively the flux vectors along the - and directions and defined by
(1.3) |
with the height of conducting fluid , the fluid velocity vector , the magnetic field vector , the gravitational acceleration constant , the bottom topography , and denotes the th column of the unit matrix.
Existing numerical studies for the SWMHD equations include the evolution Galerkin scheme [30], space-time conservation element solution element (CESE) method [42], central-upwind schemes [56], Roe-type schemes [29], second-order entropy stable (ES) finite volume scheme (satisfying the semi-discrete entropy inequality) [50], high-order CESE scheme up to 4th-order [1], etc. Some have dealt with the non-flat topography [50, 56], and are well-balanced in the sense that the schemes can preserve the lake at rest. For the numerical solutions of the SWMHD equations, we need to deal carefully with the divergence-free constraint (1.2). In the ideal magnetohydrodynamic (MHD) case, many works have focused on this issue, for example, the projection method [8], the constrained transport method and its variants [2, 17, 36, 44], the eight-wave formulation of the MHD equations [41], the hyperbolic divergence cleaning method [13], the locally divergence-free DG method [34], the “exactly” divergence-free central DG method [35], and so on.
For the quasi-linear hyperbolic conservation laws or balance laws, it may be the case that no classical solution exists so that the weak solution should be defined in the sense of distributions. Unfortunately, such weak solutions might be non-unique. The entropy condition plays an essential role in choosing the physically relevant solution from the collection of all possible week solutions.
Definition 1 (Entropy function).
For the smooth solutions of (1.1)-(1.3) with the entropy pair , multiplying (1.1) by gives the entropy identity
(1.5) |
However, if the solutions contain discontinuities, then the above identity does not hold.
Definition 2 (Entropy solution).
A weak solution of (1.1) is called an entropy solution or a physically relevant solution if for all entropy pairs , the entropy inequality or condition
(1.6) |
holds in the sense of distributions.
The entropy conditions are of great importance in the well-posedness of hyperbolic conservation laws or balance laws, e.g. (1.1), and may improve the robustness of the numerical schemes, thus it is meaningful to seek their numerical schemes satisfying the discrete entropy inequality. For the scalar conservation laws, the conservative monotone schemes are nonlinearly stable and satisfy the discrete entropy conditions so that their solutions can converge to the entropy solution [11, 24]; the E-schemes satisfy the semi-discrete entropy condition for any convex entropy [39, 40]. However, those schemes are only first-order accurate. Generally, it is very hard to prove that the high-order accurate schemes of the scalar conservation laws and the schemes for the system of hyperbolic conservation laws satisfy the entropy inequality for any convex entropy function. Two relative works are presented in [7] and [27]. The former is second-order accurate and not in the standard finite volume form, while the latter approximates the entropy variables and needs solving nonlinear equations at each time step. In view of this, the researchers usually try to study the high-order accurate entropy conservative (EC) (resp. entropy stable (ES)) schemes, which satisfy the discrete entropy identity (resp. inequality) for a given entropy pair. The second-order EC schemes were built in [45, 46], and their higher-order extension was studied in [32]. It is known that EC schemes may become oscillatory near the shock waves, thus additional dissipation terms have to be added into the EC schemes to obtain the ES schemes. Combining the EC flux of the EC schemes with the “sign” property of the ENO reconstructions, the‘ arbitrary high-order ES schemes were constructed by using high-order dissipation terms [20]. Some ES schemes based on the discontinuous Galerkin (DG) framework were also studied, e.g. the ES space-time DG formulation [3, 25] and the ES nodal DG schemes using suitable quadrature rules [10]. The ES schemes based on summation-by-parts (SBP) operators were developed for the Navier-Stokes equations [18]. As a base of those works, the construction of the affordable two-point EC flux is one of the key parts, and has been extended to the shallow water equations [19, 22], the MHD equations [9, 49], the relativistic (magneto-)hydrodynamic equations [16, 15, 51], and so on. Those ES MHD schemes are built on the modified MHD equations with the non-conservative source terms, e.g. the Powell source terms [9, 14, 41] or the Janhunen source terms [28, 49]. The Powell source term can be used to obtain the symmetrizable MHD equations, but the solution to the Riemann problem of Powell’s MHD equations with initial positive gas pressures may contain a nonphysical negative gas pressure [28], while the Janhunen source term can preserve the conservation of the momentum and energy and be used to restore the positivity of gas pressure. Due to the adding source terms, the sufficient condition proposed in [45] for a finite difference scheme satisfying an entropy identity should be modified, see [9]. One should also take care of the discretization of the source terms, to match it to the discretization of the flux gradients and ensure that the final schemes satisfy the semi-discrete entropy inequality.
The paper aims at constructing the high-order accurate ES finite difference schemes for the SWMHD equations (1.1) for a given entropy pair. With suitable discretization of the non-flat bottom topography and Janhunen source terms in the modified SWMHD equations, a two-point EC flux is derived for constructing the semi-discrete second-order accurate well-balanced EC schemes satisfying the entropy identity. Our discretization of the source terms is essential to achieve both high-order accuracy and well-balance, and does not meet the computational issue in [50] when the magnetic field is zero. The high-order well-balanced EC schemes are constructed by using the above two-point EC schemes as building blocks. In order to avoid the numerical oscillation produced by the EC schemes around the discontinuities, some suitable dissipation terms utilizing the weighted essentially non-oscillatory (WENO) reconstruction in the scaled entropy variables are added to the EC fluxes to get the high-order accurate well-balanced ES schemes satisfying the semi-discrete entropy inequality. The above semi-discrete EC and ES schemes are integrated in time by using the high-order accurate explicit strong-stability preserving Runge-Kutta schemes to obtain the fully-discrete high-order accurate well-balanced schemes. The ES property of the Lax-Friedrichs flux is also proved and then the positivity-preserving ES schemes are developed by using the positivity-preserving flux limiter.
The rest of the paper is organized as follows. Section 2 presents the modified SWMHD equations, the entropy pair and necessary notations. Section 3 constructs the affordable two-point EC flux and the semi-discrete EC and ES schemes for the 1D SWMHD equations, and proves the well-balanced properties of the EC and ES schemes. The positivity-preserving ES scheme is also studied. Section 4 gives the 2D well-balanced EC and ES schemes. Extensive numerical tests are conducted in Section 5 to validate the effectiveness and performance of our schemes. Section 6 gives some conclusions.
2 Modified SWMHD equations
This section gives an entropy analysis of the SWMHD equations with the non-flat bottom topography.
If the solutions are smooth, then the SWMHD equations (1.1)-(1.3) can be equivalently cast into the primitive variable form
(2.1) | ||||
Defining the mathematical entropy as the total energy [19, 50]
(2.2) |
and using (2.1) gives
which means that under the constraint , the following quantities
(2.3) |
satisfy an additional conservation law. However, unfortunately, the pair defined in (2.2)-(2.3) does not satisfy (1.4), since
where the vector is explicitly given by
It is not difficult to verify that the matrix is symmetric and positive definite.
Similar to the Janhunen source term for the ideal MHD equations [28], one needs to add some non-conservative source terms to get a modified SWMHD system for (1.1)-(1.3) as follows
(2.4) |
where
and satisfies . Note that the modified SWMHD equations without bottom topography have been discussed in the literature, see e.g. [50].
Taking the dot product of with (2.4) yields
i.e.
(2.5) |
where we have used the identity
Notice that the identity (2.5) is obtained without using the divergence-free condition, and will be useful in constructing an entropy stable (ES) scheme because the numerical divergence of may not be zero. Moreover, we define the “entropy potential” from the given by
which makes the following identity true
The “entropy potential” plays an important role in obtaining the sufficient condition for the two-point entropy conservative (EC) fluxes.
Remark 2.1.
3 One-dimensional schemes
This section constructs the high-order accurate well-balanced EC and ES schemes for the -split system of (2.4), i.e.,
(3.1) |
where .
3.1 Second-order EC schemes
Let us consider a uniform mesh in : , with the spatial step size and the semi-discrete conservative finite difference scheme for (3.1) as follows
(3.2) |
where denotes the mean value of at , i.e., , and approximate the point values of , respectively, is the numerical flux approximating at , and the second-order central difference is used to approximate and in the source terms.
Definition 3 (Entropy conservative scheme).
The following lemma gives a sufficient condition for the semi-discrete scheme (3.2) to be EC, with the discretization of the source terms.
Lemma 3.1.
Proof.
Left multiplying (3.2) by and using gives
The right-hand side term can be further rearranged as follows
where and have been used in the first equality, the condition (3.4) has been used in the second equality, and has been used in the third equality. Thus the scheme (3.2) with is EC in the sense of
The discretization of the source terms is second-order accurate since the second-order central difference is used, and the results in [45] show that the discretization of the flux gradient is second-order accurate, therefore the the scheme (3.2) with is second-order accurate. ∎
Remark 3.1.
Since the central difference is used for approximating the non-flat river bed bottom and Janhunen source terms, the sufficient condition (3.4) is different from that in [19, 50]. Moreover, such discretization of the source terms is essential to achieve high-order accuracy and well-balance, see the subsection 3.2.
Below we present such EC flux satisfying (3.4).
Theorem 3.2.
Proof.
The key is to use the identity
(3.7) |
and rewrite the jumps of the entropy variables , the potential , , and as some linear combinations of the jumps of a specially chosen parameter vector. For simplicity in derivation, the parameter vector is chosen as , then
Substituting them into (3.4), and equating the coefficients of the same jump terms gives the numerical flux in (3.6).
If letting , it is easy to see the consistency of the numerical flux in (3.6). ∎
Remark 3.2.
Remark 3.3.
Remark 3.4.
If the magnetic field , then the SWMHD equations reduce to the shallow water equations (SWEs) and the above SWMHD scheme (3.2) with defined in (3.6) reduces to the well-balanced EC scheme for the SWEs with the EC flux
which is the same as the EC flux in [19], except for the second component due to the different approximation of the source terms.
Lemma 3.1 and Theorem 3.2 tell us that the SWMHD scheme (3.2) for (3.1) with defined in (3.6) is second-order accurate and EC. Moreover, we can show that it is well-balanced.
Theorem 3.3.
Proof.
3.2 High-order EC schemes
To develop the high-order well-balanced EC schemes, our task is to get the high-order numerical fluxes and conduct the matched high-order discretization of the source term related to the non-flat river bed bottom and the Janhunen source term in (3.1).
Following the way in [32], the EC flux of the th-order () accurate scheme can be obtained by using the linear combinations of the “second-order accurate” EC flux (3.6) as follows
(3.8) |
which satisfies
The readers are referred to [20, 32] for more details on constructing the “high-order accurate” EC flux.
To make the resulting schemes high-order accurate, well-balanced and EC, it is essential that the high-order finite difference approximations of the spatial derivatives and in the source terms should match the “high-order accurate” EC flux (3.8). To this end, based on the observation that the second-order central differences for the source terms
used in the second-order EC scheme (3.2), have the same form as the discretization of the flux gradient, using those second-order central differences as a building block can obtain the high-order approximations of the source terms as follows
where the linear combination coefficients are the same as those in the “high-order accurate EC flux” (3.8). Similarly, it is not difficult to verify
Such treatment can also be found in [14].
In summary, by approximating (3.1), we obtain the following th order semi-discrete EC scheme
(3.9) |
which satisfies the entropy identity (3.3) with the numerical entropy flux
It is a linear combination of the two-point numerical entropy flux (3.5). For example, when , the expression of the “th-order accurate” EC flux is explicitly given as follows
(3.10) |
It can also be verified that the scheme (3.9) is well-balanced in the sense of Theorem 3.3, since the numerical fluxes and the numerical source terms in (3.9) are formed by the linear combinations of the fluxes and the source terms in the second-order scheme (3.2) with the same coefficients, specifically, the second equation in (3.9) is written as follows
For the 1D moving equilibrium states discussed in Remark 3.5, one needs to impose very restrictive conditions
3.3 ES schemes
It is known that for the quasi-linear hyperbolic conservation laws or balance laws, the entropy identity is available only if the solution is smooth. In other words, the entropy is not conserved if the discontinuities such as the shock waves appear in the solution. Moreover, the EC scheme may produce serious unphysical oscillations near the discontinuities. Those motivate us to develop the ES scheme in this section by adding a suitable dissipation term to the EC scheme to avoid the unphysical oscillations produced by the EC scheme and to satisfy the entropy inequality for the given entropy pair.
Following [45], adding a dissipation term to the EC flux gives the ES flux
(3.11) |
satisfying
(3.12) |
where is a symmetric positive semi-definite matrix. It is easy to prove that the scheme (3.2) or (3.9) with the numerical flux (3.11) is ES, i.e, satisfying the semi-discrete entropy inequality
for some numerical entropy flux function consistent with the physical entropy flux .
Motivated by the Cholesky decomposition and the dissipation term in the (local) Lax-Friedrichs flux
the matrix in (3.11) can be chosen as
Here and is the Cholesky decomposition of the matrix with
and and are calculated by using the arithmetic mean values , , and .
To obtain the arbitrary high-order accurate ES scheme, the dissipation term in (3.11) has to be improved. For example, it can be done by using the ENO reconstruction of the scaled entropy variables [20]. More specifically, use the th order accurate ENO reconstruction of to obtain the left and right limit values at , denoted by and , and then define
Combining such reconstructed jump with the “th-order EC flux” and the th-order discretization of the source terms gives the th order ES scheme as follows
(3.13) |
where for even and for odd , and
(3.14) |
The semi-discrete numerical schemes (3.13) is ES if the reconstruction satisfies the “sign” property [20]
which does hold for the ENO reconstructions [21].
Moreover, one can also obtain higher-order accurate ES scheme with the WENO reconstruction instead of the ENO reconstruction, if the same number of candidate points values are used. In view of that a general WENO reconstruction may not satisfy the “sign” property, following [5], the dissipation term in (3.11) may be modified as follows
(3.15) |
where is a switch function defined by
here the superscript denotes the th entry of the diagonal matrix or the th component of the jump of . One can verify that the adding dissipation term becomes zero when the WENO reconstruction does not satisfy the “sign” property, and thus the semi-discrete numerical scheme with the flux (3.15) is ES.
Remark 3.6.
At the steady state, the entropy variables become , so that the low-order dissipation term with and the high-order dissipation term with all vanish. Thus the constructed ES schemes are well-balanced.
3.4 Time discretization
3.5 Positivity-preserving ES schemes
This section restricts to the flat bottom topography. Generally, the high-order ES scheme (3.13) integrated with the RK3 (3.16) may numerically produce the negative water height so that the numerical simulation fails. This section develops a high-order positivity-preserving ES scheme based on (3.13), satisfying , if for a small positive number (usually taken as in numerical tests), which means there is no dry area in the solutions. Since the RK3 (3.16) is a convex combination of the forward Euler time discretization, it only needs to consider the first component of the semi-discrete scheme (3.13) with the forward Euler time discretization, that is
(3.17) |
where denotes the first component of the vector .
Before that, we first prove that the scheme (3.2) with the local Lax-Friedrichs flux is positivity-preserving.
Lemma 3.4.
The semi-discrete scheme (3.2) discretized with the forward Euler time discretization and with the local Lax-Friedrichs flux
(3.18) |
is positivity-preserving under the CFL condition
(3.19) |
Proof.
The first component of the Lax-Friedrichs scheme can be split as
so it holds
Thus under the CFL condition (3.19), and then . ∎
The following lemma shows that the Lax-Friedrichs flux (3.18) is ES even if or is not constant. Its proof is direct without the assumption that the 1D exact Riemann solution of -split system is ES. In fact, when there are jumps in or at the cell interface in the 2D case, whether such assumption is available needs further investigation.
Lemma 3.5.
The Lax-Friedrichs flux is ES when the bottom topography is flat.
Proof.
Substituting the Lax-Friedrichs flux into the inequality (3.12) and using identity (3.7) gives
It can be further simplified by using the identity as follows
where
Since , , it is easy to obtain
then .
If , then , because
and
otherwise, it still holds that , because
and
Similarly, . Therefore the Lax-Friedrichs flux is ES. ∎
Based on those discussions, the high-order positivity-preserving ES schemes can be constructed by using the Lax-Friedrichs flux and the positivity-preserving limiter [26]. The limited numerical flux is given by
where is the scaling factor corresponding to the two neighboring grid points, which share the same flux , and
It is worth noting that the discretization of the source terms should also be replaced by the corresponding convex combinations as follows
It is easy to verify that the water height updated by the high-order positivity-preserving ES schemes satisfies
and the limited flux is consistent and ES since it is a convex combination of the high-order ES flux and the ES Lax-Friedrichs flux, and does not destroy the high-order accuracy
with [26].
4 Two-dimensional schemes
This section extends the 1D high-order EC and ES schemes developed in Section 3 to the 2D SWMHD system (1.1). For convenience, the notation is replaced with . Our attention is limited to a uniform Cartesian mesh with the spatial step sizes so that the extension of the 1D schemes to (1.1) can be done by approximating (2.4) in a dimension by dimension fashion. To avoid repetition, the detailed extension is not described below.
At each grid point , the 2D SWMHD system (1.1) can be approximated by the following second-order accurate well-balanced semi-discrete EC scheme
(4.1) |
where , and and are the - and -directional EC fluxes, respectively.
Similarly, using the EC scheme (4) as building block can give a th-order well-balanced semi-discrete EC scheme for the 2D SWMHD system (1.1) as follows
(4.2) |
where
Then adding a suitable dissipation term to (4) gives a th-order well-balanced semi-discrete ES scheme for the 2D SWMHD system (1.1) as follows
(4.3) |
where for even and for odd ,
the jumps are respectively obtained by using the WENO reconstruction in the - and -directions, and the viscosities and are respectively chosen in - and -directions.
For the time discretization, the third-order Runge-Kutta scheme (3.16) is used. The analysis of the EC, ES, and well-balanced properties of the above 2D EC and ES schemes is similar to the 1D case, so that it is omitted here. Moreover, the ES property of the Lax-Friedrichs flux can also be used to develop the 2D positivity-preserving ES schemes by using the positivity-preserving flux limiter.
5 Numerical results
This section conducts some numerical experiments to validate the performance of our EC and ES schemes for the SWMHD equations (1.1) and its -split system. Unless otherwise stated, all computations take the CFL number as , and the 5th-order schemes with the fifth-order WENO reconstruction in [6]. For the accuracy tests, the time stepsize is taken as (resp. ) for the th order EC schemes (resp. the th order ES schemes) to make the spatial error dominant.
5.1 One-dimensional case
Example 5.1 (Accuracy test).
This example is used to verify the accuracy. The computational domain is with periodic boundary conditions, and . The constructed exact solution is given as follows
Table 5.1 lists the errors and the orders of convergence in at obtained by using our EC and ES schemes. It is seen that these schemes get the sixth-order and the fifth-order accuracy as expected.
EC scheme | ES scheme | |||||||
---|---|---|---|---|---|---|---|---|
error | order | error | order | error | order | error | order | |
10 | 1.575e-04 | - | 2.433e-04 | - | 1.126e-03 | - | 1.605e-03 | - |
20 | 2.706e-06 | 5.86 | 4.181e-06 | 5.86 | 3.015e-05 | 5.22 | 5.303e-05 | 4.92 |
40 | 4.276e-08 | 5.98 | 6.690e-08 | 5.97 | 9.048e-07 | 5.06 | 1.486e-06 | 5.16 |
80 | 6.700e-10 | 6.00 | 1.051e-09 | 5.99 | 2.830e-08 | 5.00 | 4.492e-08 | 5.05 |
160 | 1.050e-11 | 6.00 | 1.650e-11 | 5.99 | 8.852e-10 | 5.00 | 1.393e-09 | 5.01 |
Example 5.2 (Well-balanced test [56]).
It is used to verify the well-balanced property of our EC and ES schemes. The bottom topography is taken as a smooth function
(5.1) |
or a discontinuous function
(5.2) |
and then the initial data are specified as , , and . The computational domain is , and the problem is numerically solved until with and .
The surface level and the bottom are shown in Figure 5.1, and the errors in and are given in Table 5.2. It can be seen that the errors are at the level of round-off errors for the double precision, and the well-balanced property is verified.
EC scheme | ES scheme | ||||
---|---|---|---|---|---|
error | error | error | error | ||
(5.1) | 9.825e-16 | 2.554e-15 | 1.035e-15 | 2.554e-15 | |
5.463e-16 | 1.636e-15 | 5.902e-16 | 1.638e-15 | ||
(5.2) | 2.484e-16 | 1.776e-15 | 2.262e-16 | 8.882e-16 | |
2.445e-16 | 2.046e-15 | 2.309e-16 | 1.617e-15 |
Example 5.3 (Steady state problem with wavy bottom [56]).
This example is adapted from the problem in [55] and used to check the dissipative and dispersive errors in the ES scheme. The computational domain and the bottom topography are the same as the last problem, , and the initial data are
The results obtained by using the ES scheme with are shown in Figure 5.2, and the reference solutions are obtained by using the ES scheme with . We can see that the accurate solutions can be obtained even with the coarse mesh .


Example 5.4 (Small perturbation of a steady state).
To examine the ability of capturing small perturbation of a steady state, consider two quasi-stationary problems. The first problem is considered in [33, 54]. The bottom topography consists of one hump
and the initial data are
with zero velocity and zero magnetic field. The second quasi-stationary problem takes into account the magnetic field such that . Those problems are solved until with the computational domain , , and .
The results with zero magnetic field are shown in Figure 5.3, while those with non-zero magnetic field are shown in Figure 5.4. The solutions obtained by using the ES scheme with are compared to the reference solutions obtained by using the ES scheme with a fine mesh of . It can be seen that the structures in the solutions are well captured with no spurious oscillations, and the results with zero magnetic field are well comparable to those in [54].








Example 5.5 (Riemann problem [12]).
The initial data are
The initial discontinuity will be decomposed into two magnetogravity waves and two Alfvén waves propagating away in two directions as the time increases. The problem is solved until with .
Figure 5.5 presents the solutions at obtained by the ES schemes with . One can see that our numerical solutions are in good agreement with the reference solutions, and the discontinuities are well captured without obvious oscillations.





5.2 Two-dimensional case
Example 5.6 (Vortex).
This genuine 2D vortex problem is designed to test the accuracy and the positivity-preserving property of our schemes. With the aid of the SWMHD equations in the polar coordinates given in A, a steady vortex is constructed as follows
with . Using the Galilean transformation can give a time-dependent exact solution
which describes a vortex moving with a constant speed .
The computational domain is with periodic boundary conditions, , , and the output time is so that the vortex travels and returns to the original position after a period. Table 5.3 lists the errors in and corresponding orders of convergence. The results show that our EC and ES schemes achieve the optimal convergence order. Figure 5.6 plots the contours of and the magnitude of the magnetic field with equally spaced contour lines. It can be seen that our schemes can preserve the shape of the vortex well after a whole period.
To check the positivity-preserving property, let us do a test with
which implies that the lowest water height is . The errors and orders of convergence obtained by using the ES scheme with or without the positivity-preserving (PP) limiter are listed in Table 5.4. One can see that the ES scheme fails with and without the positivity-preserving limiter, and the positivity-preserving limiter does not destroy the high-order accuracy.
EC scheme | ES scheme | |||||||
---|---|---|---|---|---|---|---|---|
error | order | error | order | error | order | error | order | |
20 | 4.079e-05 | - | 1.787e-02 | - | 3.756e-05 | - | 2.446e-02 | - |
40 | 7.025e-07 | 5.86 | 1.543e-03 | 3.53 | 4.082e-06 | 3.20 | 1.012e-02 | 1.27 |
80 | 6.401e-09 | 6.78 | 3.028e-05 | 5.67 | 1.015e-07 | 5.33 | 7.531e-04 | 3.75 |
160 | 5.244e-11 | 6.93 | 4.994e-07 | 5.92 | 1.582e-09 | 6.00 | 2.340e-05 | 5.01 |
320 | 4.143e-13 | 6.98 | 7.904e-09 | 5.98 | 2.453e-11 | 6.01 | 7.205e-07 | 5.02 |


Without PP limiter | With PP limiter | |||||||
---|---|---|---|---|---|---|---|---|
error | order | error | order | error | order | error | order | |
20 | - | - | - | - | 4.007e-05 | - | 2.680e-02 | - |
40 | - | - | - | - | 3.426e-06 | 3.55 | 7.087e-03 | 1.92 |
80 | 1.109e-07 | - | 2.284e-03 | - | 1.209e-07 | 4.82 | 2.657e-03 | 1.42 |
160 | 6.357e-09 | 4.25 | 1.000e-03 | 1.41 | 5.520e-09 | 4.45 | 9.224e-04 | 1.53 |
320 | 3.094e-11 | 7.68 | 1.703e-05 | 5.88 | 3.089e-11 | 7.48 | 1.703e-05 | 5.76 |
Example 5.7 (Well-balanced test [33]).
It is used to validate the well-balanced property of our EC and ES schemes. The bottom topography is taken as
(5.3) |
or
(5.4) |
The computational domain is , , and the initial data are with zero velocity and magnetic field.
The problem is solved until with . The errors in are listed in Table 5.5. Similar to Example 5.2, one can see that the well-balanced property of the 2D schemes has been verified in the sense that the errors are at the level of round-off errors for the double precision.
EC scheme | ES scheme | ||||
---|---|---|---|---|---|
error | error | error | error | ||
(5.3) | 4.943e-15 | 3.886e-14 | 2.293e-15 | 1.077e-14 | |
5.091e-15 | 4.091e-14 | 2.577e-15 | 1.010e-14 | ||
3.766e-15 | 3.168e-14 | 1.887e-15 | 9.742e-15 | ||
(5.4) | 8.437e-16 | 5.329e-15 | 8.102e-16 | 4.663e-15 | |
5.720e-16 | 4.585e-15 | 5.731e-16 | 3.792e-15 | ||
1.385e-15 | 7.659e-15 | 1.367e-15 | 6.306e-15 |
Example 5.8 (Small perturbation of a steady state (without magnetic field) [33]).
This problem is used to check the capability of the ES schemes for the perturbation of the steady state. The computational domain and the bottom topography are the same as the last test, and the initial data are
with zero velocity and magnetic field. Outflow boundary conditions are used and the problem is solved until with .
Figure 5.7 shows the contours of the surface level (40 equally spaced contour lines) at obtained by using the ES scheme with , which describe a right-going disturbance as it propagates past the hump. It can be seen that the complex small features are well captured without any spurious oscillations, and the results are comparable to those in [54].





Example 5.9 (Orszag-Tang like problem [56]).
It is similar to the Orszag-Tang problem for the ideal MHD equations [38]. The computational domain is with periodic boundary conditions and . The initial data are
The solution of this problem is smooth initially, but the complicated pattern will arise as the time increases and it has the turbulence behavior. Figure 5.8 presents the results obtained by using the ES scheme with at and . The solutions are in good agreement with those in [56]. The left plot in Figure 5.10 shows the time evolution of the discrete total entropy with three spatial resolutions , 200 and 400. The total entropy is conserved when the solutions are smooth during an initial period, but it decays when discontinuities arise.




Example 5.10 (Rotor like problem [30]).
It is an extension of the classical ideal MHD rotor test problem [30]. The computational domain is with outflow conditions with . Initially and , and there is a disk of radius centered at , where fluid with large is rotating in the anti-clockwise direction. The ambient fluid is homogeneous for , where . Specifically, the initial data are
This problem is solved until .
Figure 5.9 shows the height , the velocity , and the magnetic field obtained by using the ES scheme with . The ES scheme gets the high resolution results without obvious spurious oscillations comparable to those in [30]. The right plot of Figure 5.10 displays the time evolution of the discrete total entropy with three spatial resolutions , 200 and 400. The results show that the total entropy decays as expected, and the fully discrete scheme is also ES.





6 Conclusion
The paper proposed the high-order accurate entropy stable (ES) finite difference schemes for the one- and two-dimensional shallow water magnetohydrodynamic (SWMHD) equations with non-flat bottom topography. The Janhunen source term was added to the conservative SWMHD equations. For the modified SWMHD equations, the second-order accurate well-balanced semi-discrete entropy conservative (EC) finite difference scheme was first constructed, in the sense that it satisfied the semi-discrete entropy identity for the given entropy pair (the total energy served as the mathematical entropy) and preserved the steady state of lake at rest (with zero magnetic field). The key was to match both discretizations for the fluxes and the source term related to the non-flat river bed bottom and the Janhunen source term, and to find the affordable EC fluxes of the second-order EC schemes. Next, the high-order accurate well-balanced EC schemes were obtained by using the second-order accurate EC schemes as building block. In view of that the EC schemes might become oscillatory near the discontinuities, the appropriate dissipation terms were added to the EC fluxes to develop the semi-discrete well-balanced ES schemes satisfying the semi-discrete entropy inequality. The WENO reconstruction of the scaled entropy variables and the high-order explicit Runge-Kutta time discretization were implemented to obtain the fully-discrete high-order schemes. The ES and positivity-preserving properties of the Lax-Friedrichs scheme were also proved without the assumption that the 1D exact Riemann solution of -split system was ES, and then the high-order positivity-preserving ES schemes were developed by using the positivity-preserving flux limiter. Extensive numerical tests showed that our schemes could achieve the designed accuracy, were well-balanced or positivity-preserving, and could well capture the discontinuities.
Appendix A SWMHD in polar coordinates
In the polar coordinate system , the modified SWMHD equations (2.4) without the bottom topography become
(A.1) | ||||
where
(A.2) |
and are the radius and azimuth components of the vector , respectively.
Acknowledgments
The authors would like to thank the discussion of Dr. Kailiang Wu at The Ohio State University and Mr. Caiyou Yuan at Peking University. The work was partially supported by the Special Project on High-performance Computing under the National Key R&D Program (No. 2016YFB0200603), Science Challenge Project (No. TZ2016002), the National Natural Science Foundation of China (Nos. 91630310 & 11421101), and High-performance Computing Platform of Peking University.
References
- [1] S. Ahmed and S. Zia, The higher-order CESE method for two-dimensional shallow water magnetohydrodynamics equations, Eur. J. Pure Appl. Math., 12 (2019), pp. 1464–1482.
- [2] D. S. Balsara, Divergence-free reconstruction of magnetic fields and WENO schemes for magnetohydrodynamics, J. Comput. Phys., 228 (2009), pp. 5040–5056.
- [3] T. J. Barth, Numerical methods for gasdynamic systems on unstructured meshes, in An Introduction to Recent Developments in Theory and Numerics for Conservation Laws, D. Kroner, M. Ohlberger, and C. Rohde, eds., Springer, 1999, pp. 195–285.
- [4] A. Bermudez and M. E. Vazquez, Upwind methods for hyperbolic conservation laws with source terms, Comput. & Fluids, 23 (1994), pp. 1049–1071.
- [5] B. Biswas and R. K. Dubey, Low dissipative entropy stable schemes using third order WENO and TVD reconstructions, Adv. Comput. Math., 44 (2018), pp. 1153–1181.
- [6] R. Borges, M. Carmona, B. Costa, and W. S. Don, An improved weighted essentially non-oscillatory scheme for hyperbolic conservation laws, J. Comput. Phys., 227 (2008), pp. 3191–3211.
- [7] F. Bouchut, C. Bourdarias, and B. Perthame, A muscl method satisfying all the numerical entropy inequalities, Math. Comp., 65 (1996), pp. 1439–1461.
- [8] J. U. Brackbill and D. C. Barnes, The effect of nonzero on the numerical solution of the magnetohydrodynamic equations, J. Comput. Phys., 35 (1980), pp. 426–430.
- [9] P. Chandrashekar and C. Klingenberg, Entropy stable finite volume scheme for ideal compressible MHD on 2D Cartesian meshes, SIAM J. Numer. Anal., 54 (2016), pp. 1313–1340.
- [10] T. Chen and C.-w. Shu, Entropy stable high order discontinuous Galerkin methods with suitable quadrature rules for hyperbolic conservation, J. Comput. Phys., 345 (2017), pp. 427–461.
- [11] M. G. Crandall and A. Majda, Monotone difference approximations for scalar conservation laws, Math. Comp., 34 (1980), pp. 1–21.
- [12] H. De Sterck, Hyperbolic theory of the “shallow water” magnetohydrodynamics equations, Phys. Plasmas, 8 (2001), pp. 3293–3304.
- [13] A. Dedner, F. Kemm, D. Kröner, C. D. Munz, T. Schnitzer, and M. Wesenberg, Hyperbolic divergence cleaning for the MHD equations, J. Comput. Phys., 175 (2002), pp. 645–673.
- [14] D. Derigs, A. R. Winters, G. J. Gassner, S. Walch, and M. Bohm, Ideal GLM-MHD: About the entropy consistent nine-wave magnetic field divergence diminishing ideal magnetohydrodynamics equations, J. Comput. Phys., 364 (2018), pp. 420–467.
- [15] J. Duan and H. Tang, High-order accurate entropy stable nodal discontinuous galerkin schemes for the ideal special relativistic magnetohydrodynamics, arXiv:1911.03825, (2019).
- [16] , High-order accurate entropy stable finite difference schemes for one- and two-dimensional special relativistic hydrodynamics, Adv. Appl. Math. Mech., 12 (2020), pp. 1–29.
- [17] C. R. Evans and J. F. Hawley, Simulation of magnetohydrodynamic flows-a constrained transport method, Astrophys. J., 332 (1988), pp. 659–677.
- [18] T. C. Fisher and M. H. Carpenter, High-order entropy stable finite difference schemes for nonlinear conservation laws: Finite domains, J. Comput. Phys., 252 (2013), pp. 518–557.
- [19] U. S. Fjordholm, S. Mishra, and E. Tadmor, Well-balanced and energy stable schemes for the shallow water equations with discontinuous topography, J. Comput. Phys., 230 (2011), pp. 5587–5609.
- [20] , Arbitrarily high-order accurate entropy stable essentially non-oscillatory schemes for systems of conservation laws, SIAM J. Numer. Anal., 50 (2012), pp. 544–573.
- [21] , ENO reconstruction and ENO interpolation are stable, Found. Comput. Math., 13 (2013), pp. 139–159.
- [22] G. J. Gassner, A. R. Winters, and D. A. Kopriva, A well balanced and entropy conservative discontinuous Galerkin spectral element method for the shallow water equations, Appl. Math. Comput., 272 (2016), pp. 291–308.
- [23] P. A. Gilman, Magnetohydrodynamic “shallow water” equations for the solar tachocline, Astrophys. J., 544 (2000), pp. L79–L82.
- [24] A. Harten, On the symmetric form of systems of conservation laws with entropy, J. Comput. Phys., 49 (1983), pp. 151–164.
- [25] A. Hiltebrand and S. Mishra, Entropy stable shock capturing space – time discontinuous Galerkin schemes for systems of conservation laws, Numer. Math., 126 (2014), pp. 103–151.
- [26] X. Y. Hu, N. A. Adams, and C. W. Shu, Positivity-preserving method for high-order conservative schemes solving compressible Euler equations, J. Comput. Phys., 242 (2013), pp. 169–180.
- [27] T. J. Hughes, L. Franca, and M. Mallet, A new finite element formulation for computational fluid dynamics: I. symmetric forms of the compressible euler and navier-stokes equations and the second law of thermodynamics, Comput. Methods Appl. Mech. Engrg., 54 (1986), pp. 223–234.
- [28] P. Janhunen, A positive conservative method for magnetohydrodynamics based on HLL and Roe methods, J. Comput. Phys., 160 (2000), pp. 649–661.
- [29] F. Kemm, Roe-type schemes for shallow water magnetohydrodynamics with hyperbolic divergence cleaning, Appl. Math. Comput., 272 (2016), pp. 385–402.
- [30] T. Kröger and M. Lukáčová-Medvid’ová, An evolution Galerkin scheme for the shallow water magnetohydrodynamic equations in two space dimensions, J. Comput. Phys., 206 (2005), pp. 122–149.
- [31] Y. Kuang, K. Wu, and H. Tang, Runge-Kutta discontinuous local evolution Galerkin methods for the shallow water equations on the cubed-sphere grid, Numer. Math. Theor. Meth. Appl., 10 (2017), pp. 373–419.
- [32] P. G. Lefloch, J. M. Mercier, and C. Rohde, Fully discrete entropy conservative schemes of arbitraty order, SIAM J. Numer. Anal., 40 (2002), pp. 1968–1992.
- [33] R. J. LeVeque, Balancing source terms and flux gradients in high-resolution Godunov methods: the quasi-steady wave-propagation algorithm, J. Comput. Phys., 146 (1998), pp. 346–365.
- [34] F. Li and C. W. Shu, Locally divergence-free discontinuous Galerkin methods for MHD equations, J. Sci. Comput., 22 (2005), pp. 413–442.
- [35] F. Li and L. Xu, Arbitrary order exactly divergence-free central discontinuous Galerkin methods for ideal MHD equations, J. Comput. Phys., 231 (2011), pp. 2655–2675.
- [36] P. Londrillo and L. Del Zanna, On the divergence-free condition in Godunov-type schemes for ideal magnetohydrodynamics: the upwind constrained transport method, J. Comput. Phys., 195 (2004), pp. 17–48.
- [37] S. Noelle, Y. Xing, and C.-W. Shu, High-order well-balanced finite volume WENO schemes for shallow water equation with moving water, J. Comput. Phys., 226 (2007), pp. 29–58.
- [38] S. A. Orszag and C. M. Tang, Small-scale structure of two-dimensional magnetohydrodynamic turbulence, J. Fluid Mech., 90 (1979), pp. 129–143.
- [39] S. Osher, Riemann solvers, the entropy condition, and difference, SIAM J. Numer. Anal., 21 (1984), pp. 217–235.
- [40] S. Osher and E. Tadmor, On the convergence of difference approximations to scalar conservation laws, Math. Comp., 50 (1988), pp. 19–51.
- [41] K. G. Powell, An approximate riemann solver for magnetohydrodynamics (that works in more than one dimension), ICASE 94-24, (1994).
- [42] S. Qamar and G. Warnecke, Application of space-time CE/SE method to shallow water magnetohydrodynamic equations, J. Comput. Appl. Math., 196 (2006), pp. 132–149.
- [43] J. A. Rossmanith, A constrained transport method for the shallow water mhd equations, in Hyperbolic Problems: Theory, Numerics, Applications, T. Hou and E. Tadmor, eds., Springer, 2003, pp. 851–860.
- [44] J. A. Rossmanith, An unstaggered, high-resolution constrained transport method for magnetohydrodynamic flows, SIAM J. Sci. Comput., 28 (2006), pp. 1766–1797.
- [45] E. Tadmor, The numerical viscosity of entropy stable schemes for systems of conservation laws. I, Math. Comput., 49 (1987), pp. 91–103.
- [46] , Entropy stability theory for difference approximations of nonlinear conservation laws and related time-dependent problems, Acta Numer., 12 (2003), pp. 451–512.
- [47] H. Tang, Solution of the shallow-water equations using an adaptive moving mesh method, Internat. J. Numer. Methods Fluids, 44 (2004), pp. 789–810.
- [48] H. Tang, T. Tang, and K. Xu, A gas-kinetic scheme for shallow-water equations with source terms, Z. Angew. Math. Phys., 55 (2004), pp. 365–382.
- [49] A. R. Winters and G. J. Gassner, Affordable, entropy conserving and entropy stable flux functions for the ideal MHD equations, J. Comput. Phys., 304 (2016), pp. 72–108.
- [50] , An entropy stable finite volume scheme for the equations of shallow water magnetohydrodynamics, J. Sci. Comput., 67 (2016), pp. 514–539.
- [51] K. Wu and C.-W. Shu, Entropy symmetrization and high-order accurate entropy stable numerical schemes for relativistic MHD equations, arXiv:1907.07467, (2019).
- [52] K. Wu and H. Tang, A Newton multigrid method for steady-state shallow water equations with topography and dry areas, Appl. Math. Mech., 37 (2016), pp. 1441–1466.
- [53] Y. Xing, Numerical methods for the nonlinear shallow water equations, vol. 18, Elsevier, 2017, ch. Handbook of Numerical Analysis, pp. 361–384.
- [54] Y. Xing and C. W. Shu, High order finite difference WENO schemes with the exact conservation property for the shallow water equations, J. Comput. Phys., 208 (2005), pp. 206–227.
- [55] K. Xu, A well-balanced gas-kinetic scheme for the shallow-water equations with source terms, J. Comput. Phys., 178 (2002), pp. 533–562.
- [56] S. Zia, M. Ahmed, and S. Qamar, Numerical solution of shallow water magnetohydrodynamic equations with non-flat bottom topography, Int. J. Comut. Fluid Dyn., 28 (2014), pp. 56–75.