Abstract
In this work, we design an entropy stable, finite volume approximation for the shallow water magnetohydrodynamics (SWMHD) equations. The method is novel as we design an affordable analytical expression of the numerical interface flux function that exactly preserves the entropy, which is also the total energy for the SWMHD equations. To guarantee the discrete conservation of entropy requires a special treatment of a consistent source term for the SWMHD equations. With the goal of solving problems that may develop shocks, we determine a dissipation term to guarantee entropy stability for the numerical scheme. Numerical tests are performed to demonstrate the theoretical findings of entropy conservation and robustness.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Systems of conservation laws that model a physical system or process often possess an additional conserved quantity, the entropy, which is conserved for smooth solutions but increases (or decreases according to the sign convention adopted) in the presence of shocks. A method is said to be entropy conservative if the local changes of entropy are the same as predicted by the entropy conservation law. The approximation is said to be entropy stable if it produces more entropy than an entropy conservative scheme.
We introduce the important distinction between entropy conservation and stability because there is a problem with entropy conservative formulations. They may suffer breakdown if used without dissipation to capture shocks. Physically, entropy must be dissipated at a shock. However, an isentropic algorithm does not allow the capture of this physical process, which generates large amplitude oscillations around the shock [3]. A more dire issue is that entropy conservative formulations can not converge to the weak solution as there is no mechanism to admit the dissipation physically required at the shock.
Tadmor [25, 26] was the first to introduce the idea of entropy conservation to design stable numerical approximations of nonlinear hyperbolic conservation laws. At a semi-discrete level the principle is that the discrete flux function satisfies discrete conservation laws of the conservative variables as well as the scalar conservation law for entropy in a discrete sense. Tadmor’s flux function performs well for smooth data but can be made stable for shock problems [27]. But, Tadmor’s flux function, which involves an integral in phase space, is numerically expensive. For large scale simulations we want a more practical, computationally tractable, entropy conserving flux.
Thus, in this paper, it is our goal to develop affordable, entropy stable methods for the shallow water magnetohydrodynamic (SWMHD) model. There is recent work for optimal, entropy stable approximations for the Euler equations from Ismail and Roe [15] which was extended to arbitrary order with a discontinuous Galerkin (DG) spectral element formulation by Carpenter et al. [3]. Also, there is recent work on entropy-stable, high-order, and well-balanced approximations for the shallow water equations [11, 12, 29].
The remainder of this paper is organized as follows: Sect. 2 provides an introduction to the SWMHD equations. In Sect. 3 we briefly describe the finite volume discretization used. Section 4 defines the necessary variables and analytical tools to discuss the entropy in a mathematically rigorous way. We derive an entropy conserving numerical flux in Sect. 5.1 and discuss the stabilized flux in Sect. 5.2. Numerical results are presented in Sect. 6, where we verify theoretical predictions. Section 7 presents concluding remarks. Finally, in the Appendix we provide entropy stable fluxes that can be used for two dimensional computations.
2 The Shallow Water Magnetohydrodynamic Model
The shallow water magnetohydrodynamics (SWMHD) equations were first proposed by Gilman as a model for phenomena in the solar tachocline [13], which is the thin layer in a star between the outer turbulent convection zone, and the quiescent interior where heat transfer is predominantly radiative. The tachocline has many interesting physical applications such as the formation of sunspots [5]. Tachoclines can also serve as a useful model of solar dynamo action [7, 8, 13].
As was first shown by Gilman [13] with complete details presented by Rossmanith [24] the SWMHD equations are derived from the ideal MHD equations by integrating in the z-direction under the assumption of incompressibility, a two dimensional variation of the flow variables, and magnetohydrostatic equilibrium in the z-direction:
Under these assumptions and the divergence-free constraint \(\nabla \cdot (h\varvec{B})\) the SWMHD equations can be cast into the form of a system of conservation laws [5, 24]. The one dimensional SWMHD equations comprise a hyperbolic system written in the conservative form
where the final equation is the one dimensional involution condition on the magnetic field \(\varvec{B}\). The variables \(v_1\), \(v_2\), and \(\varvec{B}\) in (2.2) are the horizontal components of the fluid velocity and magnetic field, h is the fluid layer depth, and g is the constant gravitational acceleration.
Hyperbolic systems, like the SWMHD equations, are typically solved numerically with Godunov-type methods [20]. These methods require the solution of a Riemann problem at element interfaces. Unfortunately, the one-dimensional SWMHD equations are degenerate [5], just like the ideal MHD equations [22, 23], due to the involution, \(\nabla \cdot (h\varvec{B}) = 0\). For example, if we consider the one dimensional problem we see from (2.2) that \(\partial _t(hB_1) = 0\). Thus, there is no propagating Riemann wave associated with the conservative variable \(hB_1\). To alleviate such degeneracies we are interested in relaxing the involution \(\nabla \cdot (h\varvec{B}) = 0\) such that a conventional Riemann solver based method may be used for the approximation of the SWMHD system.
To accomplish this we weaken the divergence condition to require that \(\nabla \cdot (hB)\approx 0,\) i.e., the divergence condition is to be maintained up to finite precision error. Dellar [6] showed that for the relaxed assumption of the divergence condition we obtain a forced version of the SWMHD model
where the source term is proportional to the divergence condition. Importantly, the source term in (2.3) alters the system to make \(hB_1\) an advected scalar while maintaining the conservation of mass and momentum. The forced equations (2.3) can be derived from a Hamiltonian approach [6], so the system (2.3) conserves the total energy. The conservation of total energy is important when we develop the entropy conserving flux in Sect. 5.1. Also, the source term serves to restore Galilean invariance when \(\nabla \cdot (h\varvec{B})\ne 0\) [6]. Finally, the source term in (2.3) is analogous to the Janhunen source term for the ideal MHD equations [16].
It is important to note that the source term in (2.3) preserves the conservation of the momentum and energy, while enforcing the involution condition on \(h\varvec{B}\). Preserving the conservative properties of the fluid equations removes a significant drawback of the other common proposed Powell type source term for the SWMHD equations. The Powell source term renders the equations of momentum and energy for SWMHD non-conservative [6]. However, according to the Lax-Wendroff theorem [19] only conservative schemes can be expected to compute the correct jump conditions and propagation speed for a discontinuous solution. Difficulties of the non-conservative formulation obtaining the correct weak solution has been documented in the literature for the ideal MHD equations [28].
3 Finite Volume Discretization
The finite volume (FV) method is a discretization technique for partial differential equations especially useful for the approximation of systems of conservations laws. The finite volume method is designed to approximate conservation laws in their original form, e.g.,
For instance, in one spatial dimension we break the interval into non-overlapping intervals (the “volumes”)
and the integral equation of a balance law, with a source term, becomes
At this point, we make approximations. A common approximation is to assume that the solution and the source term are constant within the volume. Then we determine, for example, what is analogous to a midpoint quadrature approximation of the solution integral
Note that the solution is typically discontinuous at the boundaries of the volumes. To resolve this, we introduce the idea of a “numerical flux,” \(\varvec{f}^*(\varvec{u}^L,\varvec{u}^R)\), often derived from the (approximate) solution of a Riemann problem. That is, \(\varvec{f}^*\) is a function that takes the two states of the solution at an element interface and returns a single flux value. For consistency, we require that
that is, the numerical flux is equivalent to the physical flux if the states on each side of the interface are identical. A significant portion of this paper is devoted to the derivation of a numerical flux that conserves the discrete entropy of the system for the shallow water MHD equations. So we defer the discussion of the numerical flux to Sect. 5.
We must also address how to discretize the source term \(\varvec{s}\) in (3.3). There is a significant amount of freedom in the source term discretization. But, previous work by Fjordholm et al. [9] demonstrated that designing entropy stable methods for the shallow water equations with discontinuous bottom topography required a special treatment of the source term. In the later derivations a consistent source term discretization necessary for entropy conservation will reveal itself. Thus, we also defer the discussion of the discrete treatment of the source term to Sect. 5.1.
4 Entropy Analysis
In this section we define the entropy variables and entropy Jacobian necessary to develop an entropy stable approximation for the SWMHD equations. We note that one can find a fully general and detailed description of entropy stability theory in, for example, [2, 10].
For the SWMHD equations the total energy acts as an entropy function, [6],
where \(\varvec{u}\) is the vector of conserved variables. From the total entropy (4.1) we define the set of entropy variables
The entropy variables (4.2) are equipped with the symmetric positive definite (s.p.d) Jacobian matrices
and
where \(c^2 = gh\) is the standard wave speed for the shallow water equations. The fact that the matrices \(\mathbf H \) and \(\mathbf H ^{-1}\) are s.p.d. is a direct consequence that the entropy function (4.1) is a strongly convex, injective mapping [6]. For the derivations that follow we also require the flux Jacobian in the x-direction:
Because it will be of use in later derivations we also compute the entropy potential
where F is the entropy flux derived from the identity \(U_{\varvec{u}}\mathbf A = F_{\varvec{u}}\), [9],
4.1 Discrete Entropy Conservation for the 1D SWMHD Equations
We introduce the concept of discrete entropy conservation. Let’s assume that we have two adjacent states (L, R) with cell areas \((\varDelta x_L,\varDelta x_R)\). We discretize the SWMHD equations semi-discretely and examine the approximation at the \(i+\tfrac{1}{2}\) interface. We suppress the interface index unless it is necessary for clarity.
We interpret the update (4.8) as a finite volume scheme where we have left and right cell-averaged values separated by a common flux interface.
We premultiply the expressions (4.8) by the entropy variables to convert to entropy space. From the chain rule we know that \(U_t = \varvec{q}^T\varvec{u}_t\), hence a semi-discrete entropy update is
If we denote the jump in a state as \(\llbracket \cdot \rrbracket = (\cdot )_R - (\cdot )_L\) and the average of a state as , then we find the total element update to the entropy is
We want the discrete entropy update to satisfy the discrete entropy conservation law. To achieve this, we require
We combine the known entropy potential \(\psi \) in (4.6) and the linearity of the jump operator to rewrite the entropy conservation condition (4.11) as
We denote the constraint (4.12) as the discrete entropy conserving condition. However, this is a single condition on the vector \(\varvec{f}^*\), so there are many potential solutions for the entropy conserving flux. However, we have the additional requirement that the numerical flux must be consistent (3.5). We develop an affordable entropy conserving flux function in Sect. 5. We also defer the discretization of the source term \({\varvec{s}_{i+1/2}}\) to to the next section because special care must be taken to guarantee that (4.12) is satisfied.
5 Derivation of an Entropy Stable Numerical Flux
With the necessary entropy variable and Jacobian definitions as well as the formulation of the discrete entropy conserving condition (4.12) we are ready to derive an affordable entropy conserving numerical flux in Sect. 5.1. As we previously noted, entropy conserving methods may suffer breakdown in the presence of shocks [3]. Thus, in Sect. 5.2, we will design an entropy stable Riemann solver that uses the entropy conserving flux as a base and incorporates a dissipation term required for stability.
5.1 Entropy Conserving Numerical Flux for 1D SWMHD
In this section we define an affordable, entropy conserving numerical flux for the one dimensional SWMHD equations.
Theorem 1
(Entropy Conserving Numerical Flux) If we discretize the source term in the finite volume method to contribute to each element as
then we can determine a discrete, entropy conservative flux to be
Proof
To derive an affordable entropy conservative flux for the one dimensional SWMHD equations we first expand the discrete entropy conserving condition (4.12) componentwise to find
To determine the unknown flux components of \(\varvec{f}^*\) we use (5.3) to obtain a system of equations for each of the linear jump terms. For this expansion step we make repeated use of the linear jump operator properties:
We expand the terms of (5.3) to linear jump terms of the primitive variables h, \(v_1\), \(v_2\), \(B_1\), and \(B_2\). This is straightforward in all but the last two terms on the right hand side
Care must be taken when we expand the the second term on the right hand side of the entropy condition (5.5). If we naively split the jump terms all the way to individual linear jump terms it will introduce averages of the magnetic field variables \(\varvec{B}\) on the jump in fluid height h. However, the continuity equation in the SWMHD model contains no influence from the magnetic field. Therefore, it would be impossible for the resulting numerical flux to be consistent with the physical flux.
To remove this inconsistency we split the magnetic field jumps on the right hand side of (5.5) in such a way that cancellation with the source term is possible. Thus, rather than fully expanding each jump term down to the primitive variable level, it is useful to leave the product \(hB_1\) term as a jump. This choice is motivated by the structure of the source term because
We expand the second term on the right hand side of (5.5) as follows:
We substitute (5.7) into the expanded entropy constraint (5.5) to obtain
From the structure of the expanded entropy conserving constraint (5.8) we are prepared to select a discretization of the source term at the interface. The goal is to cancel the jump in \(hB_1\) term. We choose that the source term discretization on cell i will contribute to the interfaces \(i+\tfrac{1}{2}\) and \(i-\tfrac{1}{2}\). In exact arithmetic the dot product of the entropy variables with the source term is
From (5.9) we see that it will be possible to create a consistent discretization to cancel the \(\llbracket hB_1 \rrbracket \) term that remains in (5.8). To do so we require the source term discretization
The source term discretization (5.10) is consistent to the source term in (2.3). For example, on a regular grid where \(\varDelta x_L = \varDelta x_R\) we have for \(\varvec{s}_{i+1/2}\)
where consistency is easily checked. We note that there may be computational issues if either \(B_1\) or \(B_2\) is zero. However, if \(B_2=0\) (for example), then the contribution to the entropy conservation constraint is also zero. Now it is possible to use the source term discretization (5.10) to see the explicit cancellation of the problematic \(\llbracket hB_1 \rrbracket \) term at the \(i+\tfrac{1}{2}\) interface:
With the remaining \(\llbracket hB_1 \rrbracket \) term is removed from (5.8) we are left with the constraint on the numerical flux that only depends on the linear jump in each primitive variable
We collect the like terms and determine a set of equations for the unknown components of the entropy conserving numerical flux \(\varvec{f}^{*,ec}\):
The equations (5.14) are easily solved to determine the form of the entropy conserving flux to be
Interestingly, to guarantee the conservation of entropy we had to relax the divergence-free condition to \(\partial _x(hB_1)\approx 0\). This assumption manifests itself in the fourth component of \(\varvec{f}^{*,ec}\), which is nonzero. Essentially the fourth term in \(\varvec{f}^{*,ec}\) is the commutator of multiplication and averaging of \(hB_1\). \(\square \)
Remark 1
If the flow occurs without the presence of a magnetic field then the SWMHD model becomes the traditional shallow water (SW) equations. The structure of \(\varvec{f}^{*,ec}\) (5.15) can be separated into a shallow water component and magnetic field component, i.e.,
Thus, if the magnetic field is zero we find
and \(\varvec{f}^{*,ec}\) becomes the appropriate entropy conserving flux for the SW equations described in [9, 12].
Remark 2
We have considered a computational problem with a flat bottom topography. So it is a natural question for a shallow water type model if the approximation remains well-balanced, i.e., recovers a constant fluid height solution in the presence of a non-constant bottom topography [29]. Previous work by Fjordholm et al. [9] provides a consistent, well-balanced, and entropy conserving treatment of a non-constant (and even discontinuous) bottom topography b. For example in the x-direction
In the presence of a non-constant bottom topography one would add the discretized source term (5.18) to the x component of the momentum equation of the SWMHD model. Note that the treatment of the bottom topography source term by Fjordholm et al. in (5.18) is analogous to our treatment of the Janhunen source term for SWMHD (5.10).
5.2 Dissipation Terms for an Entropy Stable Flux
To create an entropy stable numerical flux function we use the entropy conserving flux (5.15) as a base and subtract some form of numerical dissipation, e.g.,
where \(\mathbf D \) is a dissipation matrix.
Our goal to guarantee the entropy stability of the approximation is to reformulate the dissipation term (5.19) such that it is guaranteed to be positive. To do so we will consider the eigenstructure of the flux Jacobian \(\mathbf A \) altered by the Powell source term
It is important to note that we use the Janhunen source term (2.3) to derive an entropy conservative numerical flux function in Sect. 5.1. However, to design an entropy stable approximation we require that the eigendecomposition of the flux Jacobian matrix can be related to the entropy Jacobian (4.4). This particular scaling, first examined by Merriam [21] and explored more thoroughly by Barth [2], requires that the PDE system is symmetrizable. Previous analysis of the SWMHD system by Dellar [6] and ideal MHD equations [2, 14] have demonstrated that the Powell source term is necessary to restore a symmetric MHD system. We reiterate that the altered flux Jacobian is used only to derive the dissipation term. Just as Lax-Friedrichs differs from Roe in the construction of a dissipation term, we use the Powell source term only to build our dissipation term. Thus, we do not introduce any inconsistency in the previous entropy conserving flux derivations. We demonstrate with numerical tests in Sect. 6.4 that the newly developed entropy stable flux functions are competitive with the well known Roe flux.
We denote the flux Jacobian modified with the Powell source term (5.20) as
equipped with a full set of eigenvalues
and right eigenvectors
where \(c_g^2 = gh+B_1^2\) is the magnetogravity wave speed.
Now that we have a symmetrizable matrix \(\widehat{\mathbf{A }}\) we utilize a previous result from Barth [2] which provides a systematic approach to restructure a general eigenvalue problem to a symmetric eigenvalue problem. To do so we rescale the right eigenvectors of an eigendecomposition with respect to a right symmetrizer matrix in the following way:
Lemma 1
(Eigenvector Scaling) Let \(\mathbf A \in \mathbb {R}^{n\times n}\) be an arbitrary diagonalizable matrix and S the set of all right symmetrizers:
Further, let \(\mathbf R \in \mathbb {R}^{n\times n}\) denote the right eigenvector matrix which diagonalizes \(\mathbf A \), i.e., \(\mathbf A =\mathbf R {\varvec{\varLambda }}\mathbf R ^{-1}\), with r distinct eigenvalues. Then for each \(\mathbf B \in S\) there exists a symmetric block diagonal matrix \(\mathbf T \) that block scales columns of \(\mathbf R \), \(\widetilde{\mathbf{R }} = \mathbf RT \), such that
which implies
Proof
The proof of the eigenvector scaling lemma is given in [2]. \(\square \)
Theorem 2
(Entropy Stable 1 (ES1)) If we apply the diagonal scaling matrix
to the matrix of right eigenvectors \(\widehat{\mathbf{R }}\) (5.23), then we obtain the Merriam identity [21] (Eq. 7.3.1 pg. 77)
that relates the right eigenvectors of \(\widehat{\mathbf{A }}\) to the entropy Jacobian matrix (4.4). For convenience, we introduce the diagonal scaling matrix \(\mathbf S =\mathbf T \,^2\) in (5.28). We then have the guaranteed entropy stable flux interface contribution
Proof
We define the dissipation term in the numerical flux (5.19) to be
where the eigendecomposition of \(\widehat{\mathbf{A }} = \widehat{\mathbf{R }}\widehat{{\varvec{\varLambda }}}\widehat{\mathbf{L }}\) is given by (5.22) and (5.23). We define entropy stability to mean the approximation guarantees that the entropy within the system is a decreasing function, satisfying the following inequality
From the previously computed discrete entropy update (4.10) the total entropy within an element (now including the dissipative term (5.30)) is
from the design of the entropy conserving flux \(\varvec{f}^{*,ec}\). To ensure entropy stability, we must guarantee that the RHS term in (5.32) is non-positive. Unfortunately, it was shown by Barth [2] that the term
may become positive in the presence of very strong shocks. However, we know from entropy symmetrization theory, e.g., [2, 21], that the entropy Jacobian \(\mathbf H \), given by (4.4), is a right symmetrizer for the flux Jacobian that incorporates the Powell source term \(\widehat{\mathbf{A }}\). Therefore, with the proper scaling matrix \(\mathbf T \) we acquire the Merriam identity
The rescaling of the right eigenvectors of \(\widehat{\mathbf{A }}\) to satisfy the Merriam identity (5.28) is sufficient to guarantee the negativity of (5.33). We see from (5.33) and (5.34)
where we used that \(\widehat{\mathbf{L }}=\widehat{\mathbf{R }}^{-1}\). So with the appropriate diagonal scaling matrix \(\mathbf S \) we have shown that (5.35) is guaranteed negative because the product is a quadratic form scaled by a negative. We use the right eigenvectors from (5.23), the constraint (5.28), and straightforward algebraic manipulation to determine the diagonal scaling matrix
where \(c^2 = gh\) and \(c_g^2 = gh+B_1^2\) are the wave speed and magnetogravity wave speed respectively. \(\square \)
Remark 3
There are other possible, negativity guaranteeing (but more dissipative) choices for the dissipation term (5.19). For example, if we make the simple choice of dissipation matrix to be
where \(\lambda _{max}\) is the largest eigenvalue of the system from (5.22) and \(\mathbf I \) is the identity matrix, then we obtain a local Lax-Friedrichs type interface stabilization
where, again, we use the Merriam identity (5.28) for the entropy Jacobian \(\mathbf H \).
6 Numerical Results
In this section, we numerically verify the theoretical findings for the entropy conserving and entropy stable approximations for the SWMHD equations. To integrate the semi-discrete formulation in time we use a low storage five-stage, fourth-order accurate Runge-Kutta time integrator of Carpenter and Kennedy [4]. First, in Sect. 6.1, we consider a test problem with a known analytical solution to demonstrate the accuracy of the entropy conserving method as well as the optimal and Lax-Friedrichs stabilized formulations. Next, Sect. 6.2 demonstrates the entropy conservation of the approximation for a strong Riemann problem. In Sect. 6.3 we demonstrate the computed solution of a strong Riemann problem for the entropy conserving method. This solution will exhibit significant oscillations in shocked regions. Finally, in Sect. 6.4 we compare the two entropy stable approximations (5.29) and (5.38) against a high-resolution approximation comparable to that presented in the literature [5, 24].
6.1 Convergence
For the convergence test, we switch to the manufactured solution technique and generate a smooth and periodic solution
with an additional analytic source term on the right hand side
on the domain \(\varOmega =[-1,1]\) with periodic boundary conditions and final time \(T=2\). We select the time step for the RK method small enough such that the error in the approximation is dominated by the error in the spatial discretizations. For all computations, a regular grid is chosen according to the number of grid cells listed in the tables below. Except for the entropy conserving scheme, where we also test a stretched mesh with a fixed ratio of
First, we test the entropy conserving scheme on a regular grid. The \(L_2\)-errors for all conserved quantities are shown in Table 1. It is interesting to note, that for the specific regular grid used in the numerical experiment, the entropy conserving scheme achieves second order accuracy. We note that the average accuracy is hovering around 1.7, however looking closely at the finest grid results, it is clear that the experimental order of convergence is close to 2. However, the higher order convergence for the finite volume scheme is an effect of approximating the solution on a regular grid. The scheme drops to first order accuracy when an irregular grid is chosen as shown in Table 2, where we stretch the grid with a constant factor of (6.3).
Next, we demonstrate the convergence of the two entropy stable finite volume schemes. The convergence results for the ES1 method are shown for the regular grid test in Table 3 and the irregular grid test in Table 4, where we see the average experimental convergence rate for either the regular or irregular grids are both first order accurate. The convergence behavior for the ES2 scheme on both grids fluctuates. Thus, we decided to run more tests on even finer grids to demonstrate that, again, the experimental order of convergence for regular or irregular grids is in the range of 0.7–1.36 (Tables 5, 6).
6.2 Mass, Momentum, and Entropy Conservation
By design we know the finite volume scheme for the SWMHD equations with the Janhunen source term (2.3) will conserve mass and momentum. From the derivations in 5.1 we know that the scheme also exactly preserves the entropy on a general grid, if we use the newly designed flux \(\varvec{f}^{*,ec}\) (5.15). We measure the change in any of the conservative variables with
where, for example, \(e_{int}\) is the entropy function
integrated with a Gauss–Lobatto quadrature rule over the whole domain.
To demonstrate the conservative properties we consider the one dimensional strong Riemann problem taken from [5] with the initial condition
on the domain \(\varOmega = [-1,1]\) and periodic boundary conditions. We compute the error in the change of each conservative variable for three values of the Courant–Friedrichs–Lewy (CFL) number: 1.0, 0.1, and 0.01. For each simulation the entropy conserving finite volume scheme used 100 regular grid cells for the results in Table 7 and 100 irregular grid cells in Table 8. The final time of each simulation was \(T=0.4\).
We see that for each value of the CFL number we obtain errors in the mass and momentum on the order of machine precision. Also, as expected, the addition of the Janhunen source term to enforce the divergence condition causes us to lose conservation of the quantities \(h\varvec{B}\). Interestingly, in the error for the change in entropy we see the dissipative influence of the time integrator. The dissipation introduced by the temporal discretization can be significantly reduced if we shrink the time step. We see that the error of the entropy can be lowered to single or double machine precision by decreasing the CFL number, and hence the time step.
It is also possible to see the temporal accuracy in Table 7 and Table 8. If we shrink the time step by a factor ten we see that the error in the entropy shrinks by a little over a factor of \(10^4\), as we expect for a fourth order time integrator.
6.3 Entropy Conserving Riemann Problem
We now apply the entropy conserving (EC) scheme to the strong Riemann problem (6.6), except we choose inflow/outflow type boundary conditions. The computation is performed on 100 regular grid cells with CFL number 0.1 up to a final time of \(T=0.4\). To create a reference solution we use the ES1 scheme on 5000 grid cells. We present the solution computed with the EC finite volume method against the reference solution in Fig. 1.
The results for the computed fluid height h, velocities \(v_1\), \(v_2\), and magnetic field \(B_1\), \(B_2\) respectively in Fig. 1 show that the EC scheme computes the rarefactions and the shocks in the solution quite accurately, but at the expense of large post-shock oscillations. These oscillations are expected as energy must be dissipated across the shock but the EC scheme is basically dissipation free except for the influence of the time integrator (as we previously noted in Sect. 6.2).
6.4 Entropy Stable Riemann Problem
Next, we use the ES1 and ES2 schemes to compute the solution of (6.6) with inflow/outflow type boundary conditions. Again, the computation is performed on 100 regular grid cells with CFL number 0.1 up to a final time of \(T=0.4\) with a reference solution created using a high-resolution run of the ES1 scheme on 5000 grid cells. We note that the same reference solution could be obtained from a high-resolution computation of the ES2 scheme. We present the solution computed with the entropy stable methods against the reference solution in Fig. 2.
Our computed results for the computed fluid height h, velocities \(v_1\), \(v_2\), and magnetic field \(B_1\), \(B_2\) shown in Fig. 2 compare well to the literature [5, 24]. We see that, as was discussed in Sect. 5.2, the Lax-Friedrichs type stabilization introduces more dissipation into the approximation.
As a final test we compare the ES1 scheme to a standard Roe scheme. The development of Roe type schemes for the SWMHD equations has been considered by several authors and complete details can be found in [5, 17, 24]. The comparative computation used 100 regular grid cells with a CFL number of 0.1 up integrated to \(T=0.4\). A reference solution was created from a high-resolution run of the ES1 scheme on 5000 grid cells. The computed results of the schemes are presented in Fig. 3. We see that for the same number of degrees of freedom the ES1 scheme is less dissipative than the Roe scheme. This is particularly evident in the approximation of quantities in the tangential direction, \(v_2\) and \(B_2\). We also note that the Roe scheme is more dissipative than the ES2 Lax-Friedrichs type entropy stable approximation which can be seen from a comparison of the results in Figs. 2 and 3.
7 Concluding Remarks
In this work we present a novel, affordable, entropy stable flux for the shallow water MHD equations. The derivations required us to relax the involution condition such that \(\partial _x(hB_1)\approx 0\) within finite precision error. Under this less restrictive assumption we were able to derive an entropy conserving flux, denoted \(\varvec{f}^{*,ec}\). Special care had to be taken for the discretization of the source term in order to guarantee discrete entropy conservation. Because entropy conserving approximations can suffer breakdown at shocks we extended our analysis and derived two stabilizing dissipation terms that we apply to the entropy conserving flux. We finally used a variety of numerical test examples to demonstrate and underline the theoretical findings.
The derivation of the entropy conserving and entropy stable numerical fluxes in this paper focused on the one-dimensional SWMHD equations. The restriction to one spatial dimension was because the analysis proved to be quite involved. However, the discussion was general, so the derivations in this paper readily extend to provably entropy conserving and entropy stable approximations of the SWMHD equations on multi-dimensional Cartesian grids. In the Appendix we provide details on the multidimensional flux functions.
It is well known that the issue of divergence-free constraint and the accuracy of an approximation is more serious in two dimensions. As was discussed in Sect. 2 the Janhunen source term acts, analogously, to a hyperbolic divergence cleaning method where the error in the involution term is radiated out of the computational domain. To verify the utility of our method we consider a two dimensional example similar to the “rotor problem” of Balsara and Spicer [1] and considered by Tóth [28] for the ideal MHD equations. The computational domain is \(\varOmega = [-1,1]\times [-1,1]\) with initial data
integrated up to the final time \(T=0.2\). The computational results of the two dimensional ES1 scheme with 200 regular grid cells in each direction are presented in Fig. 4. We note that the computed fluid height h and velocity components \(v_1\) and \(v_2\) compare well with previous results found in the literature [18]. As we expect, because we use a different divergence cleaning procedure, our results for the \(B_1\) and \(B_2\) magnetic fields differ slightly from those computed in [18].
In this paper we have demonstrated that the entropy stable approximations for the SWMHD equations are competitive with existing solvers. We also showed that the methods readily extend to multiple dimensions because the source term we need for entropy conservation also acts as a divergence cleaning technique.
References
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)
Barth, T.J.: Numerical methods for gasdynamic systems on unstructured meshes. In: Kröner, D., Ohlberger, M., Rohde, C. (eds.) An Introduction to Recent Developments in Theory and Numerics for Conservation Laws vol. 5 of Lecture Notes in Computational Science and Engineering, pp. 195–285. Springer, Berlin (1999)
Carpenter, M., Fisher, T., Nielsen, E., Frankel, S.: Entropy stable spectral collocation schemes for the Navier–Stokes equations: discontinuous interfaces. SIAM J. Sci. Comput. 36, B835–B867 (2014)
Carpenter, M., Kennedy, C.: Fourth-order 2N-storage Runge–Kutta schemes. Tech. Rep. NASA TM 109111, NASA Langley Research Center (1994)
de Sterck, H.: Hyperbolic theory of the shallow water magnetohydrodynamics equations. Phys. Plasmas 8, 3293–3304 (2001)
Dellar, P.J.: Hamiltonian and symmetric hyperbolic structures of shallow water magnetohydrodynamics. Phys. Plamas 9, 1130–1136 (2002)
Dikpati, M., Gilman, P.A.: Flux-transport dynamos with \(\alpha \)-effect from global instability of tachocline differential rotation: a solution for magnetic parity selection in the Sun. Astrophys. J. 559, 428–442 (2001)
Dikpati, M., Gilman, P.A.: Prolateness of the solar tachocline inferred from latitudinal force balance in a magnetohydrodynamic shallow-water model. Astrophys. J. 552, 348–353 (2001)
Fjordholm, U.S., Mishra, S., Tadmor, E.: Well-balanced and energy stable schemes for the shallow water equations with discontinuous topography. J. Comput. Phys. 230, 5587–5609 (2011)
Fjordholm, U.S., Mishra, S., Tadmor, E.: Arbitrarily high-order accurate entropy stable essentially nonoscillatory schemes for systems of conservation laws. SIAM J. Numer. Anal. 50, 544–573 (2012)
Gassner, G.: A skew-symmetric discontinuous Galerkin spectral element discretization and its relation to SBP-SAT finite difference methods. SIAM J. Sci. Comput. 35, A1233–A1253 (2013)
Gassner, G.J., Winters, A.R., Kopriva, D.A.: A well balanced and entropy conservative discontinuous Galerkin spectral element method for the shallow water equations. Appl. Math. Comput. (2014). doi:10.1016/j.amc.2015.07.014
Gilman, P.A.: Magnetohydrodynamic “shallow water” equations for the solar tachocline. Astrophys. J. 544, L79–L82 (2000)
Godunov, S.K.: The symmetric form of magnetohydrodynamics equation. Numer. Methods Mech. Contin. Media 1, 26–34 (1972)
Ismail, F., Roe, P.L.: Affordable, entropy-consistent Euler flux functions II: entropy production at shocks. J. Comput. Phys. 228, 5410–5436 (2009)
Janhunen, P.: A positive conservative method for magnetohydrodynamics based on HLL and Roe methods. J. Comput. Phys. 160, 649–661 (2000)
Kemm, F.: Roe-type schemes for shallow water magnetohydrodynamics with hyperbolic divergence cleaning (2014). arXiv:1410.1427
Kröger, T., Lukáčová-Medvid’ová, M.: An evolution Galerkin scheme for the shallow water magnetohydrodynamic equations in two space dimensions. J. Comput. Phys. 206, 122–149 (2005)
Lax, P.D., Wendroff, B.: Systems of conservation laws. Commun. Pure Appl. Math. 13, 263–283 (1960)
LeVeque, R.J.: Finite Volume Methods for Hyperbolic Problems, vol. 31. Cambridge University Press, Cambridge (2002)
Merriam, M.L.: An entropy-based approach to nonlinear stability. NASA Tech. Memo. 101086, 1–154 (1989)
Powell, K.G.: An Approximate Riemann Solver for Magnetohydrodynamics (That Works More than One Dimension). Tech. rep., DTIC Document (1994)
Roe, P.L., Balsara, D.S.: Notes on the eigensystem of magnetohydrodynamics. SIAM J. Appl. Math. 56, 57–67 (1996)
Rossmanith, J.A.: A Wave Propagation Method with Constrained Transport for Ideal and Shallow Water Magnetohydrodynamics. PhD thesis, University of Washington (2002)
Tadmor, E.: Numerical viscosity and the entropy condition for conservative difference schemes. Math. Comput. 43, 369–381 (1984)
Tadmor, E.: The numerical viscosity of entropy stable schems for systems of conservation laws I. Math. Comput. 49, 91–103 (1987)
Tadmor, E.: Entropy stability theory for difference approximations of nonlinear conservation laws and related time-dependent problems. Acta Numer. 12, 451–512 (2003)
Tóth, G.: The \(\nabla \cdot {B}=0\) constraint in shock-capturing magnetohydrodynamics codes. J. Comput. Phys. 161, 605–652 (2000)
Winters, A.R., Gassner, G.J.: A comparison of two entropy stable discontinuous Galerkin spectral element approximations for the shallow water equations with non-constant topography. J. Comput. Phys. (2014, under review)
Author information
Authors and Affiliations
Corresponding author
Appendix: Flux Functions in Two Spatial Dimensions
Appendix: Flux Functions in Two Spatial Dimensions
We note that, for the discussion of the two dimension fluxes we suppress the i index on the multidimensional approximation for the purpose of clarity.
1.1 Entropy Conservative Flux
To develop the entropy conservative flux in the y-direction we first note that the entropy potential
where we have the entropy flux in the y-direction
Note that the discrete entropy conservation condition (4.11) has the same structure in each Cartesian direction. Lastly, the source term contributes symmetrically to each direction. With a proof analogous of that for \(\varvec{f}^{*,ec}\) in Sect. 5 we present the entropy conserving numerical flux for the y-direction.
Corollary 1
(Entropy Conserving Numerical Flux: y-direction) If we discretize the source term in the finite volume method to contribute to each element as
then we can determine a discrete, entropy conservative flux of the form
1.2 Entropy Stable Fluxes
Just as was done in Sect. 5.2 we can create 2D entropy stable flux functions. We, again, use the flux Jacobian altered by the Powell source term to create the dissipation term:
equipped with a full set of eigenvalues
and right eigenvectors
where \(c_g^2 = gh+B_2^2\) is the magnetogravity wave speed.
Corollary 2
(Entropy Stable 1 (ES1): y-direction) If we apply the diagonal scaling matrix
to the matrix of right eigenvectors \(\widehat{\mathbf{R }}_y\) (7.8), then we obtain the Merriam identity [21] (Eq. 7.3.1 pg. 77)
that relates the right eigenvectors of \(\widehat{\mathbf{B }}\) to the entropy Jacobian matrix (4.4). For convenience, we introduce the diagonal scaling matrix \(\mathbf S _y=\mathbf T \,^2\!\!\!\!_y\) in (7.10). We then have the guaranteed entropy stable flux interface contribution
Remark 4
(Entropy Stable 2 (ES2): y-direction) If we choose the dissipation matrix to be
where \(\lambda _{max}\) is the largest eigenvalue of the system from \(\widehat{\mathbf{B }}\) and \(\mathbf I \) is the identity matrix, then we obtain a local Lax-Friedrichs type interface stabilization
Rights and permissions
About this article
Cite this article
Winters, A.R., Gassner, G.J. An Entropy Stable Finite Volume Scheme for the Equations of Shallow Water Magnetohydrodynamics. J Sci Comput 67, 514–539 (2016). https://doi.org/10.1007/s10915-015-0092-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10915-015-0092-6