1 Introduction

The robustness of numerical methods for hyperbolic conservation laws of the form

$$\begin{aligned} \frac{\partial {u(x, t)} }{\partial {t}} + \frac{\partial {f\circ u (x, t)} }{\partial {x}} = 0 \quad \text {for} \quad u(x, t): \mathbb {R}\times \mathbb {R}\rightarrow \mathbb {R}^m \quad \text {with} \quad f: \mathbb {R}^m \rightarrow \mathbb {R}^m \nonumber \\ \end{aligned}$$
(1.1)

is greatly enhanced by numerical methods that do not only approximate (1.1) but also satisfy entropy inequalities

$$\begin{aligned} \frac{\partial {U \circ u} }{\partial {t}} + \frac{\partial {F \circ u} }{\partial {x}} \le 0. \end{aligned}$$
(1.2)

These are used to select one weak solution out of many possible weak solutions. One could further assume that the error for fixed grid size could be reduced by adhering to entropy inequalities. A scheme has to satisfy (1.2) in a discrete sense

$$\begin{aligned} \frac{U^{n+1}_k - U^{n}_k}{\varDelta t} + \frac{F^n_{k+ \frac{1}{2}} - F^n_{k-\frac{1}{2}}}{\varDelta x} \le 0 \end{aligned}$$

as proposed in [20, 30, 31] for all or at least one entropy pair (UF). If solutions of a scheme satisfy all of these inequalities it is called an entropy stable scheme and entropy dissipative if only one entropy inequality is satisfied. Examples of schemes constructed with the aim of being entropy dissipative are for example given in [1, 2, 4, 13, 14, 19]. While the objective of this work is also centered around entropy dissipative schemes the motivation stems from an alternative entropy criterion by Dafermos. A second distinction lies in the fact that most of the aforementioned authors construct generalizations of finite element methods while this work is based on classical finite volume methods. We will first look at some numerical artifacts that can still occur with entropy dissipative schemes. Afterwards, a scheme will be constructed that is entropy dissipative and at least approximately satisfies the entropy condition of Dafermos [5] and some numerical tests using this scheme will be carried out. Dafermos defined a different entropy criterion using the total entropy in the domain

$$\begin{aligned} E_u(t) = \int U \circ u(x, t) \mathrm {d}x. \end{aligned}$$

A Dafermos entropy solution u is a weak solution that satisfies

$$\begin{aligned} \forall t > 0: \quad \frac{ \mathrm {d}{E_u(t)} }{\mathrm {d}t} \le \frac{ \mathrm {d}{E_{{{\tilde{u}}}}(t)} }{\mathrm {d}t} \end{aligned}$$

compared to all other weak solutions \({{\tilde{u}}}\) of the conservation law (1.1). In essence entropy of the solution decreases faster than the entropy of all other solutions.

2 Comparing schemes by their entropy dissipation

Stable high order schemes are often constructed by the addition of suitable dissipation to an at least entropy conservative base scheme, e.g. [29]. The equation approximated by the resulting scheme is typically of the form

$$\begin{aligned} \frac{\partial {u} }{\partial {t}} + \frac{\partial {f(u)} }{\partial {x}} = \varepsilon \frac{\partial {^{2s} u} }{\partial {x^{2s}}}. \end{aligned}$$

The amount of dissipation \(\varepsilon \) has a strong influence on the resulting errors. To much dissipation results in a simulation of a diffusion (heat) equation while too small amounts of dissipation are responsible for oscillations and can lead to instabilities and order losses. It arises the question of why schemes with low entropy dissipation show bad behavior even if they are formally of high order and entropy dissipative, as they fulfil the entropy inequality for at least one entropy. We would like to shed some light on the connection between the correct amount of entropy dissipation defined by the Dafermos criterion using the following numerical experiments. It should be noted that the Dafermos criterion was designed for solutions to conservation laws and not their numerical approximations; this means we will look at some numerical solutions and make some assumptions about their limit solutions and their behavior.

Numerical experiment 1

(Comparing two schemes by the Dafermos criterion) A simulation of the Burgers equation

$$\begin{aligned} \frac{\partial {u} }{\partial {t}} + \frac{1}{2} \frac{\partial {u^2} }{\partial {x}} = 0 \end{aligned}$$

with \(u_0(x) = \sin (\pi x)\) was carried out on a periodic domain \( \varOmega = [0, 2)\) for \(t \in [0, 2]\). The entropy conservative flux of order 4 from [22, 32] was used with a dissipation operator due to [8] and \(\varepsilon = 0.5\) as dissipation coefficient. The numerical solution was compared to a solution calculated by a Godunov scheme. The solution and graphs of the complete entropy in the domain for the quadratic entropy can be seen in Fig. 1. Several times a new simulation was started using the solution of the entropy conservative fluxes in conjunction with dissipation as a starting point and the Godunov method as solver. The corresponding total entropy was also plotted in the total entropy diagrams. As we would like to be sure that our conclusions do not depend on the number of points in the domain the simulation was carried out once more with 3000 instead of 100 cells. We can clearly see that the entropy dissipative method produces bad results, because oscillations appear around the shock. We can also see that the Godunov scheme dissipates more entropy than the other scheme. The simulations which where carried out by the Godunov method with the solution of the high order method at different times as a starting point are especially interesting. These show a strong reduction of the total entropy until the total entropy of the solution calculated by the Godunov method from the beginning is reached. The Dafermos entropy criterion is only partially applicable in this case as the solutions are approximate solutions. It states in this case that the solution of the high order solver is not the entropy solution, although the solver is technically entropy dissipative, because the negative derivative of the total entropy can even be more negative. It should be noted that the Godunov method on the other hand dissipates entropy even for smooth solutions. This opposes the known theory of hyperbolic conservation laws, as smooth solutions satisfy an entropy equality referred to as an additional conservation law [5, 20]. The Godunov method satisfies the entropy equality only approximately as the entropy dissipation is small compared to the entropy dissipation after the onset of the shock, but not zero. The Godunov method is still the best possible three point first order method as it is the method with the least possible dissipation that converges to the entropy solution [30, 31].

Fig. 1
figure 1

Solution to \(u_0(x) = \sin (\pi x)\) for the Burgers equation with \(N = 100\) cells in the first 3 Graphs and \(N=3000\) cells in the last 3 Graphs. A simulation with the Godunov method was started with the solution of the entropy dissipative high order (EDHO) scheme as a starting point at different times.The Godunov method is the basic Godunov scheme with the exact Riemann solver for the Burgers equation and without any reconstruction. Time integration was carried out using a CFL number of \(\lambda = 0.5\) and the SSPRK104 scheme.The high order scheme is composed of an entropy stable flux and a dissipation operator. The fourth order entropy conservative flux constructed out of Tadmors entropy conservative flux [32] for the Burgers equation and the linear combination developed by LeFloch, Mercier and Rhode [22] is used. A periodic fourth order dissipation operator with the coefficients given in [8] was used as a dissipation operator with strength \(\varepsilon = 0.5\). Time integration was, as in the case before, done using the SSPRK104 method

Numerical experiment 2

(Per cell dissipation of the Godunov method) As we saw in the last example the Godunov method leads to a significantly higher total entropy reduction than our high order method, which leads to the question of where this dissipation occurs. This is why the violation of the entropy equation was plotted for the aforementioned numerical experiment for the Godunov method in Fig. 2. We can see that a small amount of entropy dissipation occurs during the simulation of a smooth solution while a much bigger amount of entropy dissipation occurs centered around a shock, if present, in compliance with the entropy inequality for shocks. This knowledge was already put to work in [34] using edge sensors.

Fig. 2
figure 2

Per cell entropy inequality for the Godunov scheme. The same Godunov method was used as in Fig. 1 with \(N=100\) cells

The last two numerical experiments lead to a new design philosophy for numerical schemes. A good numerical scheme should not only be entropy dissipative in the sense of the entropy inequality. It should also dissipate the correct amount of entropy. This can be governed by the entropy equality for smooth areas, the entropy inequality for shocks and the Dafermos entropy criterion. The Godunov method violates this philosophy by dissipating entropy in smooth areas, while the aforementioned high order method dissipates less entropy than needed and possible around shocks, which violates the Dafermos criterion. It should be noted at the same time that schemes can also dissipate too much entropy in the vicinity of a shock or a maximum. Our proposed scheme will be built out of the following components.

  • Let the scheme decide if the entropy equality or the entropy inequality holds in an area - this is equivalent to the presence of a shock.

  • Use an entropy conservative flux if the entropy equality holds.

  • Dissipate entropy with correct rate in the other case by the use of a dissipative first order flux.

Deciding which amount of entropy dissipation is the correct amount is a non-trivial sub-problem. It is not wise to aim for unconstrained maximized entropy dissipation in a numerical method as given by the Dafermos criterion. The reason for this is that the conservation law works as a constraint for the variational formulation of entropy dissipation. Numerical solvers can violate this constraint to some extent and dissipate even more entropy at the cost of higher approximation errors, as even more dissipation leads to larger approximation errors. This is why the highest amount of entropy loss that does not sacrifice low approximation errors is needed.

It is difficult to find a definition for a suitable amount of entropy loss that does not sacrifice low approximation errors. Godunov’s method dissipates the least amount of entropy possible for single conservation laws of all E-fluxes [30, 31], and is thereby a natural candidate. Especially as a high order approximation makes no sense for a region of discontinuity.

Remark 2.1

One could ask why the Godunov and not an even more dissipative flux like the local Lax-Friedrichs flux should be selected. We are interested in the highest amount of dissipation that does not lower the accuracy, in the sense of the error between numerical approximation and exact (entropy) solution for fixed grid size. While the Lax-Friedrichs method has the same formal order of accuracy the method is less accurate for a fixed grid than the Godunov method and therefore violates our additional constraint. Another perspective can be that a higher entropy dissipation rate than the Godunov method has to be also higher than the entropy rate of the exact solution as the Godunov method uses averages of exact solutions. One could conjecture that such a high dissipation is not possible for any exact weak solution. The Lax-Friedrichs method will be still used in some of the following numerical tests to avoid solving Riemann problems for the Euler equations as the error between exact solution and LF method vanishes for growing grid sizes.

The following chapter is devoted to the construction of the aforementioned solver that tries to satisfy these requirements and uses the Godunov flux as a guide for the correct amount of entropy to dissipate. For simplicity this is done by using an entropy stable first order flux in this case for the dissipation and Tadmor’s high order flux in entropy conservative areas of the domain. This scheme thereby should be a numerical scheme that at least approximately satisfies the Dafermos entropy criterion.

3 The best of both worlds

We will use entropy conservative fluxes as pioneered in [32]. A flux f will be termed entropy conservative if it satisfies a semidiscrete entropy equality

$$\begin{aligned} \frac{ \mathrm {d}{U(u_k(t))} }{\mathrm {d}t} = \frac{F(u_{k-p-1}, \dots , u_{k+p}) - F(u_{k-p}, \dots , u_{k+p+1})}{\varDelta x}. \end{aligned}$$

Definition 3.1

(Convex combination flux) We define a new numerical flux by

$$\begin{aligned} f^{GT}_\alpha \left( u_{i}, u_{i+1} \right) = \alpha f^G \left( u_i, u_{i+1} \right) + (1-\alpha ) f^T \left( u_{i}, u_{i+1} \right) \end{aligned}$$

where \(\alpha \in [0, 1] \) is a parameter controlling a convex combination between the Godunov flux presented in [11, 23] and the entropy conservative flux given in [32]. The value of

$$\begin{aligned}\alpha = \alpha (u_{i-p+1}, \dots , u_{i+p})\end{aligned}$$

will in general depend on \(u_i\) and therefore the properties of the flux will depend on the selected function \(\alpha (u_{i-p+1}, \dots , u_{i+p})\).

It should be clear that this construction does not depend on the use of the Godunov flux. In fact any other numerical flux function could be used, and we will refer to a flux constructed this way using the Lax-Friedrichs scheme as the LFT-Flux and to a flux constructed using the Godunov scheme as the GT flux. Several other entropy conservative fluxes [18, 26] have been constructed for some conservation laws and these can be also substituted for the basic Tadmor entropy conservative flux.

Lemma 3.1

The GT-Flux is a consistent and local Lipschitz continuous numerical flux.

Proof

Consistency can be proved by direct insertion.

$$\begin{aligned} f_\alpha (u, u) = \alpha f^G \left( u, u \right) + (1-\alpha ) f^T \left( u, u \right) = \alpha f(u) + (1-\alpha ) f(u) = f(u) \end{aligned}$$

We will interpret the arguments of the numerical fluxes as tuples \(a = (u_{i}, u_{i+1})\) during the rest of the proof. The Godunov and Tadmor fluxes are Lipschitz continuous with the constants \(L_G\) and \(L_T\),

$$\begin{aligned} \left| f_G(a) - f_g(b)\right|&\le L_G \left\| a-b \right\| \\ \left| f_T(a) - f_T(b)\right|&\le L_T \left\| a-b \right\| . \end{aligned}$$

We can conclude using the triangle inequality that the fluxes are also bounded for any bounded subset \(U \subset \mathbb {R}^{2p\times m}\)

$$\begin{aligned} \forall a \in U,\, \forall I \in \{ G,T\} :\quad \left| f_I(a)\right|&\le \left| f_I(a) - f_I(a_0)\right| + \left| f_I(a_0)\right| \\&\le \left| f_I(a_0)\right| + L_I \left\| a-a_0 \right\| \\&\le \left| f_I(a_0)\right| + L_IM_{a_0} = M_I, \end{aligned}$$

where \(M_{a_0} > 0\) is any bound that satisfies \(\forall a \in U: \left\| a- a_0 \right\| \le M_{a_0}\) and \(a_0 \in U\) is an arbitrary point. Another calculation shows that

$$\begin{aligned}f_\alpha (a) = F(\alpha , a) : [0, 1] \times \mathbb {R}^{2p\times m} \rightarrow \mathbb {R}^m\end{aligned}$$

is a local Lipschitz continuous function

$$\begin{aligned} \left| f_\alpha (a) - f_\beta (b)\right| =&\left| \alpha f_G(a) + (1-\alpha )f_T(a) - \beta f_G(b) - (1-\beta ) f_T(b)\right| \\ =&\left| \alpha f_G(a) - \beta f_G(b) + (1-\alpha )f_T(a) - (1-\beta ) f_T(b)\right| \\ =&\,| \alpha f_G(a) - \beta f_G(a) + \beta f_G(a) - \beta f_G(b) \\&+(1-\alpha ) f_T(a) \!-\! (1-\beta ) f_T(a) \!+\! (1-\beta )f_T(a) \!-\! (1-\beta ) f_T(b) | \\ \le&\left| \alpha - \beta \right| \left| f_G(a)\right| + \left| \beta \right| \left| f_G(a) - f_G(b)\right| \\&+\left| \beta - \alpha \right| \left| f_T(a)\right| + \left| 1- \beta \right| \left| f_T(a) - f_T(b)\right| \\ \le&\left| \alpha -\beta \right| (M_G + M_T) + \left\| a-b \right\| (L_G + L_T). \end{aligned}$$

\(\square \)

Using the previous lemma proving that \(f_{\alpha \left( u_{i-p+1}, \dots , u_{i+p} \right) } \left( u_{i}, u_{i+1} \right) \) is a local Lipschitz continuous flux boils down to proving that \(\alpha : \mathbb {R}^{2p\times m} \rightarrow [0, 1]\) is local Lipschitz continuous.

We will now prove that this new flux satisfies a semidiscrete entropy inequality at least if there is a cell boundary where \(\alpha _{k+\frac{1}{2}} \ne 0\) holds. The proof is based on cell subdivision, averaging and the convexity of the entropy as already used in [31].

Theorem 3.1

The GT flux satisfies the semidiscrete cell entropy inequality

$$\begin{aligned} \frac{ \mathrm {d}{U\circ u_k} }{\mathrm {d}t} \le \frac{ F^{GT}_{\alpha _{k-\frac{1}{2}}}(u_{k-1}, u_k) - F^{GT}_{\alpha _{k+\frac{1}{2}}}(u_{k}, u_{k+1})}{\varDelta x} \end{aligned}$$

with the numerical entropy Flux

$$\begin{aligned} F^{GT}_\alpha (u_l, u_r) = \alpha F^G(u_l, u_r) + (1-\alpha ) F^T(u_l, u_r) \end{aligned}$$

where \(F^G(u_l, u_r) = F(u_R(0, u_l, u_r))\) and

$$\begin{aligned} \begin{aligned}&F^T(u_l, u_r)\\&=\frac{\langle \frac{\partial {U} }{\partial {u}}(u_l) + \frac{\partial {U} }{\partial {u}}(u_r),f^T(u_l,u_r) \rangle + F(u_l) + F(u_r) - \langle \frac{\partial {U} }{\partial {u}}(u_l), f(u_l) \rangle - \langle \frac{\partial {U} }{\partial {u}}(u_r), f(u_r) \rangle }{2} \end{aligned} \end{aligned}$$

are the respective entropy fluxes of the Godunov [31] and Tadmor fluxes [32].

Proof

We begin our proof by deriving a semidiscrete cell entropy inequality from the discrete cell entropy inequality for the Godunov flux by going over to the limit \(\varDelta t \rightarrow 0\)

$$\begin{aligned} \begin{aligned} 0 \ge&\, \lim _{\varDelta t \rightarrow 0} \frac{U(u^{n+1}_{k}) - U(u^n_k)}{\varDelta t} - \frac{ F^{G}(u^n_{k-1}, u^n_k) - F^{G}(u^n_k, u^n_{k+1})}{\varDelta x}\\ =&\, \frac{ \mathrm {d}{U \circ u} }{\mathrm {d}t} - \frac{ F^{G}(u_{k-1}, u_k) - F^{G}(u_k, u_{k+1})}{\varDelta x}\\ =&\, \left\langle { v_k, \frac{ \mathrm {d}{u_k} }{\mathrm {d}t} } \right\rangle - \frac{ F^{G}(u_{k-1}, u_k) - F^{G}(u_k, u_{k+1})}{\varDelta x} \\ =&\, \left\langle { v_k, \frac{f^{G}(u_{k-1}, u_k) - f^{G}(u_k, u_{k+1})}{\varDelta x} } \right\rangle - \frac{F^{G}(u_{k-1}, u_{k}) - F^{G}(u_k, u_{k+1})}{\varDelta x} \end{aligned} \end{aligned}$$

The same holds in the sense of an equality also for the product of the entropy variable with the Tadmor flux. We first look at the special case \(\alpha _{k-\frac{1}{2}} = \alpha = \alpha _{k + \frac{1}{2}}\) and use the entropy variable \(v_k = \frac{\partial {U \circ u} }{\partial {u}}|_{u_k}\) to find

$$\begin{aligned} \begin{aligned} \frac{ \mathrm {d}{U\circ u_k} }{\mathrm {d}t}&= \left\langle {v_k, \frac{ \mathrm {d}{u} }{\mathrm {d}t}} \right\rangle \\&= \left\langle {v_k, \frac{\alpha f^G(u_{k-1}, u_{k}) + (1-\alpha ) f^T(u_{k-1}, u_k) - \alpha f^T(u_{k}, u_{k+1}) - (1-\alpha )f^G(u_k, u_{k+1})}{\varDelta x}} \right\rangle \\&= \alpha \left\langle { v_k, \frac{f^G(u_{k-1}, u_k) - f^G(u_k, u_{k+1})}{\varDelta x}} \right\rangle + (1-\alpha ) \left\langle {v_k, \frac{f^T(u_{k-1}, u_k) - f^T(u_k, u_{k+1})}{\varDelta x}} \right\rangle \\&\le \alpha \frac{F^G(u_{k-1}, u_k) - F^G(u_k, u_{k+1})}{\varDelta x} + (1-\alpha ) \frac{F^T(u_{k-1}, u_k) - F^T(u_k, u_{k+1})}{\varDelta x}\\&= \frac{F^{GT}_{\alpha }(u_{k-1}, u_k) - F^{GT}_{\alpha }(u_{k}, u_{k+1})}{\varDelta x}. \end{aligned} \end{aligned}$$

Furthermore, we now consider the general case \(\alpha _{k-\frac{1}{2}} \ne \alpha _{k +\frac{1}{2}}\) under usage of the first case. The derivative of the average \(u_k\) can be rewritten as the average of two schemes for the averages \(u_{k-\frac{1}{4}}\) and \(u_{k+\frac{1}{4}}\)

$$\begin{aligned}\begin{aligned} \frac{ \mathrm {d}{u_{k - \frac{1}{4}}} }{\mathrm {d}t}&= \frac{f_{\alpha _{k - \frac{1}{2}}}(u_{k-1}, u_k) - f_{\alpha _{k - \frac{1}{2}}}(u_{k}, u_k)}{\varDelta x/2} \\ \frac{ \mathrm {d}{u_{k + \frac{1}{4}}} }{\mathrm {d}t}&= \frac{f_{\alpha _{k + \frac{1}{2}}}(u_{k}, u_k) - f_{\alpha _{k + \frac{1}{2}}}(u_k, u_{k+1})}{\varDelta x/2}, \end{aligned} \end{aligned}$$

that can be thought of as the cell subdivision in Fig. 3

$$\begin{aligned} \begin{aligned} \frac{ \mathrm {d}{u_k} }{\mathrm {d}t} =&\,\frac{f_{\alpha _{k - \frac{1}{2}}}(u_{k-1}, u_k) - f_{\alpha _{k + \frac{1}{2}}}(u_k, u_{k+1})}{\varDelta x} \\ =&\,\frac{1}{2} \left( \frac{f_{\alpha _{k - \frac{1}{2}}}(u_{k-1}, u_k) - f_{\alpha _{k - \frac{1}{2}}}(u_{k}, u_k)}{\varDelta x/2} + \frac{f_{\alpha _{k + \frac{1}{2}}}(u_{k}, u_k) - f_{\alpha _{k + \frac{1}{2}}}(u_k, u_{k+1})}{\varDelta x/2} \right) \\ =&\, \frac{\frac{ \mathrm {d}{u_{k-\frac{1}{4}}} }{\mathrm {d}t} + \frac{ \mathrm {d}{u_{k+\frac{1}{4}}} }{\mathrm {d}t}}{2}. \end{aligned} \end{aligned}$$

This is the semidiscrete equivalent of the cell division usually employed to make use of the convexity of the entropy. In our case this allows us to change from \(\alpha _{k - \frac{1}{2}}\) to \(\alpha _{k + \frac{1}{2}}\) as our fluxes are consistent, namely \(f^{GT}_{\alpha _{k - \frac{1}{2}}}(u,u) = f(u) = f^{GT}_{\alpha _{k - \frac{1}{2}}}(u,u)\). This implies together with the consistency of the entropy fluxes

$$\begin{aligned} \begin{aligned} \frac{ \mathrm {d}{U \circ u_k} }{\mathrm {d}t} =&\,\left\langle {v_k, \frac{ \mathrm {d}{u_k} }{\mathrm {d}t}} \right\rangle = \frac{1}{2} \left( \left\langle {v_k, \frac{ \mathrm {d}{u_{k-\frac{1}{4}}} }{\mathrm {d}t} } \right\rangle + \left\langle {v_k, \frac{ \mathrm {d}{u_{k+\frac{1}{4}}} }{\mathrm {d}t}} \right\rangle \right) \\ \le&\, \frac{1}{2}\left( \frac{F^{GT}_{\alpha - \frac{1}{2}}(u_{k-1}, u_k) - F^{GT}_{\alpha -\frac{1}{2}}(u_{k}, u_{k})}{\varDelta x/2} + \frac{F^{GT}_{\alpha + \frac{1}{2}}(u_{k}, u_k) - F^{GT}_{\alpha + \frac{1}{2}}(u_{k}, u_{k+1})}{\varDelta x/2} \right) \\ =&\, \frac{F^{GT}_{\alpha _{k-\frac{1}{2}}}(u_{k-1}, u_k) - F^{GT}_{\alpha _{k+\frac{1}{2}}}(u_{k}, u_{k+1})}{\varDelta x} \end{aligned} \nonumber \\ \end{aligned}$$
(3.1)

and completes the Proof. \(\square \)

Fig. 3
figure 3

The subdivision of a cell in space, initialized with the mean value of the old cell

The aforementioned arguments show that our flux is entropy dissipative in the usual sense if \(\alpha \) is chosen to be nonzero.

In [22, Sect. 4.1] the entropy conservative flux of Tadmor was extended via the usage of linear combinations into an entropy conservative flux of order 2p. We will also use this idea on our flux. As we have already used \(\alpha \) as a parameter for convex combinations we will use \(c^r_p\) instead to denote the coefficients in the linear combination.

Definition 3.2

We define the high order LMRGT flux of order 2p as

$$\begin{aligned} f^{LMRGT}_{\alpha }(u_{k-p+1}, \dots , u_{k+p}) \!=\! \sum _{r=1}^p c^r_p (f^{GT}_{\alpha }(u_k, u_{k+r}) \!+\! \cdots \!+\! f^{GT}_{\alpha }(u_{k-r+1}, u_{k+1})). \end{aligned}$$

It follows from the definition that this flux is of order 2p for \(\alpha _k = 0\) i.e. when the entropy equality holds. One further deduces from

$$\begin{aligned} \begin{aligned}&f^{LMRGT}_{\alpha }(u_{k-p+1}, \dots , u_{k+p}) - f^{LMRGT}_{0}(u_{k-p+1}, \dots , u_{k+p}) \\&\quad =\alpha \sum _{r=1}^p c^r_p ((f^{G}(u_k, u_{k+r})-f^T(u_k, u_{k+r})+ \dots + f^{G}(u_{k-r+1}, u_{k+1})-f^{T}(u_{k-r+1}, u_{k+1})) \\&\quad =\alpha {{\,\mathrm{\mathcal {O}}\,}}(\varDelta x), \end{aligned} \end{aligned}$$

that the scheme is even of order 2p if the linear combination for an 2p order accurate entropy conservative flux is used in the construction and \(\alpha (u_{k-q+1}, \dots , u_{k+q}) = {{\,\mathrm{\mathcal {O}}\,}}((\varDelta x)^{2p-1})\) holds.

While one aims for a discrete entropy inequality we are at least able to proof a semidiscrete cell entropy inequality for this flux

Corollary 3.1

The semidiscrete scheme

$$\begin{aligned} \begin{aligned} \frac{ \mathrm {d}{u_k} }{\mathrm {d}t} =&\frac{f^{LMRGT}_{\alpha _{k- \frac{1}{2}}}(u_{k-p}, \dots , u_{k+p-1}) - f^{LMRGT}_{\alpha _{k + \frac{1}{2}}}(u_{k - p +1}, u_{k+p}) }{\varDelta x}\\ =&- \sum _{r=1}^p c_p^r \frac{f^{GT}_{\alpha _{k + \frac{1}{2}}}(u_{k}, u_{k+r}) - f^{GT}_{\alpha _{k - \frac{1}{2}}}(u_{k-r}, u_k)}{\varDelta x} \end{aligned} \end{aligned}$$

satisfies a semidiscrete entropy inequality

$$\begin{aligned} \frac{ \mathrm {d}{U\circ u_k} }{\mathrm {d}t} \le \frac{F^{LMRGT}_{\alpha _{k- \frac{1}{2}}}(u_{k-p},\dots , u_{k+p-1}) - F^{LMRGT}_{\alpha _{k + \frac{1}{2}}}(u_{k-p+1},\dots , u_{k+p}) }{\varDelta x} \end{aligned}$$

with an consistent numerical entropy flux given by

$$\begin{aligned} F^{LMRGT}_{\alpha }(u_{k-p+1}, \dots , u_{k+p}) \!=\! \sum _{r=1}^p c_p^r(F^{GT}_\alpha (u_{k}, u_{k+r}) + \dots + F^{GT}_\alpha (u_{k-r \!+\! 1}, u_{k+1})) \end{aligned}$$

if \(\forall k: \alpha _{k + \frac{1}{2}} \in (0,1]\) holds.

Proof

We follow the proof of the semidiscrete entropy inequality from [22, Sect. 4.1] and multiply the definition of the scheme by the entropy variable \(v_k\) to find

$$\begin{aligned} \frac{ \mathrm {d}{U\circ u_k} }{\mathrm {d}t} = \langle v_k, \frac{ \mathrm {d}{u_k} }{\mathrm {d}t}\rangle =&\left\langle {v_k, \sum _{r=1}^p c^r_p \frac{f^{GT}_{\alpha _{k-\frac{1}{2}}}(u_{k-r}, u_{k}) - f^{GT}_{\alpha _{k + \frac{1}{2}}}(u_{k}, u_{k+r})}{\varDelta x} } \right\rangle \\ =&\sum _{r=1}^p c^r_p \left\langle { v_k, \frac{f^{GT}_{\alpha _{k - \frac{1}{2}}}(u_{k-r}, u_{k}) - f^{GT}_{\alpha _{k + \frac{1}{2}}}(u_{k}, u_{k+r})}{\varDelta x} } \right\rangle \\ \overset{(3.1)}{\le }&\sum _{r=1}^p c^r_p \frac{F^{GT}_{\alpha _{k-\frac{1}{2}}}(u_{k-r}, u_{k}) - F^{GT}_{\alpha _{k + \frac{1}{2}}}(u_{k}, u_{k+r})}{\varDelta x}\\ =&\frac{F^{GTLMR}_{\alpha _{k - \frac{1}{2}}}(u_{k-p}, u_{k+p-1}) - F^{GTLMR}_{\alpha _{k + \frac{1}{2}}}(u_{k-p+1}, u_{k + p})}{\varDelta x}. \end{aligned}$$

\(\square \)

Our first numerical experiment showed that an entropy dissipative scheme alone is not enough to guarantee good approximate solutions. This is why we will now construct an algorithm to find values for \(\alpha \) to control our flux according to the Dafermos entropy criterion.

Definition 3.3

We call \(\alpha : \mathbb {R}^{2p\times m} \rightarrow [0, 1]\) an entropy inequality predictor with a (2p) point stencil if

$$\begin{aligned}&\lim _{h \rightarrow 0} \alpha (u_{i-p+1}, \dots , u_{i +p}) \\ =&{\left\{ \begin{array}{ll} 0 &{} \exists x \in [x_i -(p-1)\varDelta x, x_i + p\varDelta x]: \frac{\partial {U\circ u} }{\partial {t}} + \frac{\partial {F \circ u} }{\partial {x}} < 0\\ 1 &{} \forall x \in [x_i -(p-1)\varDelta x, x_i + p\varDelta x]:\frac{\partial {U\circ u} }{\partial {t}} + \frac{\partial {F \circ u} }{\partial {x}} = 0 \end{array}\right. } \end{aligned}$$

holds for the complete stencil. The input values \(u_{i-p+1}, \dots , u_{i+p}\) shall be the mean values of the solution in the respective cells as present in a Finite Volume solver. We will call the entropy inequality predictor slope limited if

$$\begin{aligned} \left| \alpha _i - \alpha _{i+1}\right| < M \quad \text {with} \quad \alpha _i = \alpha (u_{i-p+1}, \dots , u_{i +p})\end{aligned}$$

holds for some \(M < 1\) and all i.

The slope limiting property was inspired by the idea to limit the slope of \(\alpha \) with respect to the grid index i. This should not be mixed up with a bound on the slope of \(\alpha \) with respect to x. Such a bound would be scaling with the distance between \(x_i\) and \(x_{i+1}\) as present in the usual definition of a difference quotient. This ensures that \(\alpha \) switches between 0 and 1 over several mesh points while the size of this switch is scaled down with respect to the physical scale for a finer grid. The switch needs at least \(\lfloor 1/M \rfloor \) points.

Lemma 3.2

(Smoothstep [24]) The function

$$\begin{aligned} H_{sm}(x) = {\left\{ \begin{array}{ll} 0 &{} x \le 0 \\ 6x^5 - 15x^4+10x^3 &{} 0 \le x \le 1\\ 1 &{} 1 \le x \\ \end{array}\right. } \end{aligned}$$

is a \(\mathcal {C}^2\) function with zero first and second derivatives at \(x = 0\) and \(x = 1\).

Fig. 4
figure 4

Plot of the smooth step function

We will need some special operations on functions for the construction of our predictor which are motivated by mollification. The convolution [21, p. 216] of f and g is defined as

$$\begin{aligned} f * g(x) = \int _\varOmega f(y) g(x-y) \mathrm {d}y \end{aligned}$$

for suitable f and g. Please note that this can be interpreted as the integral of all combinations of \(f(\cdot )\) with \(g(- \cdot )\) multiplied over \(\mathbb {R}\) and indexed by their respective shift between the argument of f and g. A mollification, first defined in [9], is a convolution of a function f with a suitable g giving a smoother function as f. The result [21,  p. 216]

$$\begin{aligned} \left\| f*g \right\| _1 \le \left\| f \right\| _1 \left\| g \right\| _1, \end{aligned}$$

relates the norm of the mollified function \(f * g\) to the original function. As convolution is coupled to (Lebesgue)-integration which in turn provides the Lebesgue norms, one can ask if also an equivalent of convolution for other norms exists. We will find such an equivalent with interesting properties for our application related to the uniform norm \(\left\| \cdot \right\| _\infty \).

Definition 3.4

(Minkowsky sum and Minkowsky product) Given two sets \(A \subset \mathbb {R}\) and \(B\subset \mathbb {R}\) we define the Minkowsky sum and Minkoswky product as

$$\begin{aligned}A \oplus B = \{ a + b ~|~ a\in A, b \in B\}\end{aligned}$$

and

$$\begin{aligned}A \odot B = \{ ab ~|~ a \in A, b \in B\}.\end{aligned}$$

Lemma 3.3

(Special properties of the Minkowsky product and sum) Let \(A, B \subset \mathbb {R}\) be two sets. In this case

$$\begin{aligned} \sup (A \oplus B) = \sup A + \sup B\end{aligned}$$

holds. If additionally \(\forall a \in A: a \ge 0\) and \(\forall b \in B: b\ge 0\) hold the equality

$$\begin{aligned} \sup (A \odot B) = \sup A \cdot \sup B \end{aligned}$$

is also satisfied. In other words the supremum is additive and positively homogeneous for sets.

Definition 3.5

(Minkowsky product of functions) Let \(f, g: \mathbb {R}\rightarrow \mathbb {R}\). Their Minkowsky product is a map \(f \odot g: \mathbb {R}\rightarrow \mathbb {R}\), defined by

$$\begin{aligned} (f \odot g)(x) = \{ f(x-y)g(y) ~|~ y \in \mathbb {R}\}. \end{aligned}$$

In other words the Minkowsky product of f and g at x is the set of all values of f multiplied by g so that the argument added together gives x. Compare this to the integrand of the convolution.

Definition 3.6

Let \(f, g: \mathbb {R}\rightarrow \mathbb {R}\) be bounded real maps. The sup-mollification of f and g is defined as

$$\begin{aligned} f \circledast g (x)= \sup f \odot g(x) = \sup _{y \in \mathbb {R}}(f(x-y)g(x)). \end{aligned}$$

Please note that \(f \odot g\) is a set depending on x and the supremum is not taken over x, but over the set at the point x.

We will use the defined sup-mollification operator to ensure the slope limiting property of our entropy inequality predictor. We will now prove some useful lemmas that will also show that our entropy inequality predictor is Lipschitz continuous and keeps \(\alpha \) up at one in a region around an entropy dissipating shock.

Lemma 3.4

Let \(f, g: \mathbb {R}\rightarrow \mathbb {R}_{\ge 0}\) be bounded functions. In this case

$$\begin{aligned} \sup _x f \circledast g(x) = \sup _z f(z) \sup _z g(z) \end{aligned}$$

holds.

Proof

An easy calculation shows

$$\begin{aligned} \sup _x f\circledast g&= \sup _x \, \sup _y f(y)g(x-y) = \sup _{(x, y)\in \mathbb {R}^2} f(y) g(x-y) \\&= \sup _{(x, y)\in \mathbb {R}^2}f(y)g(x) = \sup {{\,\mathrm{ran}\,}}f \odot {{\,\mathrm{ran}\,}}g \\&= (\sup {{\,\mathrm{ran}\,}}f) \cdot (\sup {{\,\mathrm{ran}\,}}g). \end{aligned}$$

\(\square \)

Lemma 3.5

Let \(f, g: \mathbb {R}\rightarrow \mathbb {R}\) be bounded functions. Then

$$\begin{aligned} \left| \sup _x f(x) - \sup _y g(y)\right| \le \sup _x \left| f(x)-g(x)\right| \end{aligned}$$

holds.

Proof

We start by stating that

$$\begin{aligned} \sup _x f(x) = \sup _x g(x) + f(x) - g(x) \le \sup _y g(y) + \sup _x f(x)-g(x) \end{aligned}$$

holds. This can be rearranged and bounded so that

$$\begin{aligned} \sup _x f(x) - \sup _y g(y) \le \sup _x f(x)-g(x) \le \sup _x \left| f(x)-g(x)\right| \end{aligned}$$

holds. As this also holds if the roles of fg are swapped, it follows

$$\begin{aligned} \left| \sup _x f(x)- \sup _y g(y)\right| \le \sup _x \left| f(x)-g(x)\right| . \end{aligned}$$

\(\square \)

Lemma 3.6

(Sup-mollification is a Lipschitz continuous operator) For bounded \(f_1, f_2, g: \mathbb {R}\rightarrow \mathbb {R}\) it holds

$$\begin{aligned} \left\| f_1 \circledast g - f_2 \circledast g \right\| _\infty \le \left\| g \right\| _\infty \left\| f_1 - f_2 \right\| _\infty \end{aligned}$$

Proof

We use lemma 3.5 and 3.4 to prove

$$\begin{aligned} \left\| f_1 \circledast g - f_2 \circledast g \right\| _\infty&= \sup _x \, \left| \sup _y \, f_1(y)g(x-y) - \sup _y \, f_2(y)g(x-y)\right| \\&\overset{\text {lem 3.5}}{\le }\sup _x \, \sup _y \, \left| f_1(y)g(x-y) - f_2(y)g(x-y)\right| \\&= \sup _x \, \sup _y \left| f_1(y) - f_2(y)\right| \left| g(x-y)\right| \\&\overset{\text {lem 3.4}}{=} \sup _x \, \left| f_1(x)-f_2(x)\right| \sup _y\left| g(y)\right| \\&= \left\| g \right\| _\infty \left\| f_1 - f_2 \right\| _\infty . \end{aligned}$$

\(\square \)

Lemma 3.7

(Slope condition inequality) Let \(f, g: \mathbb {R}\rightarrow \mathbb {R}\) be bounded functions. If g satisfies for a fixed \(h \in \mathbb {R}\)

$$\begin{aligned} \exists M \in \mathbb {R}: \sup _{x \in \mathbb {R}} \, \left| g(x + h) - g(x)\right| \le M, \end{aligned}$$

then the sup-mollification \(f \circledast g\) full fills

$$\begin{aligned} \left| f\circledast g(x+h) - f\circledast g(x)\right| \le M \cdot \sup \, \left| f(y)\right| . \end{aligned}$$

Proof

We again use lemma 3.5 to prove

$$\begin{aligned} \left| f\circledast g(x+h) - f\circledast g(x)\right|&= \left| \sup _y f(y)g(x+h-y) - \sup f(y)g(x-y)\right| \\&\le \sup _y \left| f(y)g(x+h-y) - f(y)g(x-y)\right| \\&= \sup _y \left| f(y)\right| \left| g(x+h-y) - g(x-y)\right| \\&\le \sup _y \left| f(y)\right| \sup _y \left| g(x+h-y) - g(x-y)\right| \\&\le M \cdot \sup \left| f\right| . \end{aligned}$$

\(\square \)

Lemma 3.8

(Plateau condition inequality) Let \(f, g: \mathbb {R}\rightarrow \mathbb {R}\) be bounded, \(x_0 \in \mathbb {R}\) and \( \varepsilon > 0\). Then

$$\begin{aligned} \forall x \in [-\varepsilon , \varepsilon ]: g(x) > c \in \mathbb {R}\end{aligned}$$

implies

$$\begin{aligned} \forall x \in [x_0 - \varepsilon , x_0 + \varepsilon ]: f \circledast g(x) \ge c f(x_0). \end{aligned}$$

Proof

Let \(x \in [x_0 - \varepsilon , x_0 + \varepsilon ]\). If we set \(y = x_0\) it follows \(x-y \in [-\varepsilon , \varepsilon ]\) and

$$\begin{aligned} f(y)g(x-y) = f(x_0) g(x-y) \ge f(x_0) c \\ \implies f(x_0) c \le \sup _y f(y)g(x-y) = f \circledast g(x). \end{aligned}$$

\(\square \)

Definition 3.7

(Discrete sup-mollification) Let for \(n \in \mathbb {N}\) be the vector space of step functions on [0, 1] denoted as

$$\begin{aligned} S_n = \{ f:[0, 1] \rightarrow \mathbb {R} ~|~ \forall i = 0, \dots , n-1: f|_{[i/n, (i+1)/n]} = f_i \in \mathbb {R}\}. \end{aligned}$$

We can further define an embedding \(Z:S_n \rightarrow S\) of this space into the step functions over \(\mathbb {R}\), denoted as S, by

$$\begin{aligned} Z: S_n \rightarrow S, f \mapsto Zf, Zf(x) = {\left\{ \begin{array}{ll}f(x)&{} x \in [0, 1] \\ 0 &{} \text {else} \end{array}\right. }. \end{aligned}$$

These two definitions allow us to define the discrete sup-mollification of \(f, g \in S_n\) as

$$\begin{aligned}&(f \circledast g)|_{[i/n, (i+1) / n]}\\&\quad = (Zf \circledast Zg)|_{[i/n, (i+1) / n]} = \max _{j \in \{ 0, \dots , n-1\}} {{\tilde{f}}}_j {{\tilde{g}}}_{i-j}. \quad \text {for } i = 0, \dots , n-1. \end{aligned}$$

The values \({{\tilde{f}}}_i \in \mathbb {R}\) and \({{\tilde{g}}}_i \in \mathbb {R}\) relate to \(f_i\) and \(g_i\) as

$$\begin{aligned} {{\tilde{f}}}_i = {\left\{ \begin{array}{ll}f_i &{} i \in \{0, \dots , n-1\} \\ 0 &{} \text {else}\end{array}\right. } \quad {{\tilde{g}}}_i = {\left\{ \begin{array}{ll}g_i &{} i \in \{0, \dots , n-1\} \\ 0 &{} \text {else} \end{array}\right. }. \end{aligned}$$

The sup mollfication for step functions on the interval [ab] shall be defined using the coordinate transform \(\varphi (x) = \frac{x-a}{b-a}\) and the corresponding inverse \(\varphi ^{-1}(y) = a + y(b-a)\). Using this transform yields

$$\begin{aligned} (f \circledast g)(x) = (Z(f \circ \varphi ) \circledast Z(g \circ \varphi )) \circ \varphi ^{-1}(x). \end{aligned}$$

It is also possible to exactly sup-mollify piecewise linear functions.

Example 3.1

(The Godunov Flux entropy inequality predictor) A suitable entropy inequality predictor can be constructed from the Godunov flux by looking at it’s entropy dissipation

$$\begin{aligned} s^n_k = \frac{F(u^n_{k+1}, u^n_{k}) - F(u^n_k, u^n_{k-1})}{ \varDelta x} + \frac{U(u_k^{n+1}) - U(u^{n}_{k})}{ \varDelta t} \le 0 \end{aligned}$$

as given in [30, 31]. As the Godunov scheme is entropy stable \(s^n_k \le 0\) holds \(\forall n, k\). We can use this value to predict if the entropy equality holds - or the inequality. A problem occurs as in fact \(s^n_k <0\) is even true for smooth initial conditions like \(u_0(x) = \sin (\pi x)\) in the first time step.

Similar Problems appear in the context of edge sensors and local viscosity [3, 34] and are usually solved by a thresholding process. In our case this threshold will be carried out by the smooth step function \(H_{sm}\) from lemma 3.2 to ensure a Lipschitz-continuous transition. As there are in fact two free parameters in this approach, one for determining the lower threshold, and another to control the width of the smooth step, it is imperative to find parameters that are at least independent of the used grid. We therefore define

$$\begin{aligned} u^+ = \max _k u_k^n \quad u^- = \min _k u_k^n \end{aligned}$$

for single conservation laws and

$$\begin{aligned} u^+ = u(\arg \max _x U \circ u(x, t), t) \quad u^- = u(\arg \min _x U\circ u(x, t), t) \end{aligned}$$

as the cell values having maximum and minimum entropy in the domain for systems of conservation laws. These values can be afterwards used to construct the Riemann problem with the initial conditions

$$\begin{aligned} u_1(x, 0) = {\left\{ \begin{array}{ll}u^- \\ u^+ \end{array}\right. } \quad u_2(x, 0) = {\left\{ \begin{array}{ll}u^+ &{} x< 0\\ u^- &{} x \ge 0\end{array}\right. }. \end{aligned}$$

By looking at their entropy dissipation \(s^n_k\) when the Godunov scheme is applied one finds a reference

$$\begin{aligned} s^\text {ref} = \min \left( \min _k s^n_k(u_1(\cdot , 0)), \min _k s^n_k(u_2(\cdot , 0)) \right) \end{aligned}$$

for the entropy dissipation of a strong shock that could be present in the solution. While this approach involves a lot of hand waving the numerical results are quite satisfactory and further research could be centered around this issue. The values

$$\begin{aligned} r^n_k = H_{sm}\left( \frac{\frac{s^n_k}{s^{\text {ref}}} - a }{b} \right) \end{aligned}$$

depend smoothly on \(s^n_k\) but can still have extremely localized spikes as wide as only a few cells. The parameter \(a \in \mathbb {R}\) is a threshold under which the result of the entropy inequality predictor should be thought of as zero, while \(b \in \mathbb {R}\) corresponds to a typical amplitude of a spike in the entropy dissipation indicating a shock. Numerical tests indicate that a instantaneous switching between fluxes leads to undesired oscillations around their interface. Furthermore, the stencil of the high order Tadmor flux is wider than the stencil of the Godunov scheme and the derivation of the high order Tadmor scheme assumes an entropy conservative solution in its derivation, which will be violated by an entropy dissipating discontinuity in the solution. These two problems are considered in the definition of the entropy inequality predictor. Responsible are the slope limiting property and the definition as a scale for the violation of the entropy equality on the entire stencil of a scheme. In this case the wider stencil of the high order modified Tadmor scheme is relevant. We will satisfy these requirements using sup-mollification of \(r^n_k\), i.e. its associated piecewise constant function, and a suitable kernel. We chose the cut hat function

$$\begin{aligned} h(x) = \max (0, \min (1, 2x+2, -2x + 2)) \end{aligned}$$

in a properly rescaled fashion for this purpose. and define

$$\begin{aligned} \alpha = r \circledast h. \end{aligned}$$

Other choices are possible, and it is not clear yet if a smoother mollifier improves the scheme.

Fig. 5
figure 5

Plot of a cut hat function h(x)

Lemma 3.9

The Godunov Flux inequality predictor

$$\begin{aligned} \alpha ^n = H_{sm}\left( \frac{\frac{s^n_k}{s^{\text {ref}}} - a }{b} \right) \circledast h \end{aligned}$$

is slope limited.

Proof

This follows from the fact that

$$\begin{aligned}{{\,\mathrm{ran}\,}}H_{sm}\left( \frac{\frac{s^n_k}{s^{\text {ref}}} - a }{b} \right) \subset [0, 1]\end{aligned}$$

holds and the cut hat function has limited slope using the slope condition inequality.\(\square \)

While the aforementioned entropy inequality predictor is able to deliver satisfactory results the solution of a Riemann problem, needed to calculate the Godunov flux, is not always easily obtained. This is why two other entropy inequality predictors, one of theoretical and one also of practical value, were constructed.

Example 3.2

(The Lax-Friedrichs entropy inequality predictor) The aforementioned construction can be also applied to the Lax-Friedrichs scheme, and it’s corresponding entropy inequality and entropy flux, proved in [20, 30, 31]. The entropy flux is given by

$$\begin{aligned} F(u_l, u_r) = \frac{F(u_l) + F(u_r)}{2} + \frac{U(u_l) - U(u_r)}{2 \lambda }, \end{aligned}$$

leading to the entropy production

$$\begin{aligned} s^n_k = \frac{F(u^n_{k+1}, u^n_{k}) - F(u^n_k, u^n_{k-1})}{ \varDelta x} + \frac{U(u_k^{n+1}) - U(u^{n}_{k})}{ \varDelta t} \le 0. \end{aligned}$$

Entering these results leads to the entropy inequality predictor

$$\begin{aligned} \alpha ^n = H_{sm}\left( \frac{\frac{s^n_k}{s^{\text {ref}}} - a }{b} \right) \circledast h. \end{aligned}$$

Sadly, while this predictor has a rigorous provable background from [20], its practical use is complicated. The line between an area of entropy conservation and an entropy dissipating shock is blurred by the big amount of dissipation present in the Lax-Friedrichs scheme that also happens in smooth areas. This is why a second entropy inequality predictor was constructed with reduced dissipation. This reduction is based on linear reconstruction in an ENO type fashion [16].

Example 3.3

(The ENO2 Lax Friedrichs entropy inequality predictor) Given an piecewise constant solution \(u_k^n\) one first calculates the piecewise linear reconstructions

$$\begin{aligned} {{\tilde{u}}}_k^n(x) = {\left\{ \begin{array}{ll} u_k^n + a_l(x-x_k) &{} a_l < a_r \\ u_k^n + a_r(x-x_k) &{} a_r \ge a_l \\ \end{array}\right. } \quad a_l = \frac{u_k^n - u_{k-1}^n}{x_{k} - x_{k-1}} \quad a_r = \frac{u_{k+1}^n - u_{k}^n}{x_{k+1} - x_k}. \end{aligned}$$

Using this reconstruction directly in a finite volume entropy inequality is not possible, as the scheme

$$\begin{aligned} u_k^{n+1} = u_k^n + \lambda \left( f\left( {{\tilde{u}}}^n_{k-1}\left( x_{k- \frac{1}{2}}\right) ,{{\tilde{u}}}^n_k\left( x_{k - \frac{1}{2}}\right) \right) - f\left( {{\tilde{u}}}^n_k\left( x_{k+ \frac{1}{2}}\right) ,{{\tilde{u}}}^n_{k+1}\left( x_{k + \frac{1}{2}}\right) \right) \right) \end{aligned}$$

has to the authors knowledge no known entropy fluxes. We instead seek to calculate an approximation of the entropy dissipation of this reconstructed solution by using it as the initial condition for a first order Lax-Friedrichs solver. It is sufficient to use this solver at points of discontinuity as the entropy equality holds for the smooth areas of the solution. We therefore use the subdivision of our primary cells sketched in Fig. 6 to start the Lax-Friedrichs method. Let \(x_{k+1/2}\) be the cell boundary between the cell around \(x_k\) and \(x_{k+1}\) and \(\frac{\varDelta x}{6} \ge \varepsilon > 0\) an arbitrary parameter for a sub-cell size. We introduce new cell boundaries at

$$\begin{aligned}x_l^-=x_{k+\frac{1}{2}} - 3\varepsilon \quad x_l^+=x_m^- = x_{k+\frac{1}{2}} - \varepsilon \quad x_m^+ = x_{k + \frac{1}{2}} + \varepsilon = x_r^- \quad x_r^+ = x_{k+\frac{1}{2}} + 3 \varepsilon \end{aligned}$$

to form new cells around

$$\begin{aligned} x_l = x_{k+ \frac{1}{2}} - 2 \varepsilon \quad x_m = x_{k + \frac{1}{2}}\quad x_r = x_{k + \frac{1}{2}} + 2 \varepsilon .\end{aligned}$$

These cells are initialized with the mean values of \({{\tilde{u}}}^n(x)\) in these cells

$$\begin{aligned} v_l = \frac{1}{2 \varepsilon } \int _{x_l^-}^{x_l^+} {{\tilde{u}}}^n(x) \mathrm {d}x \quad v_m = \frac{1}{2 \varepsilon } \int _{x_m^-}^{x_m^+} {{\tilde{u}}}^n(x) \mathrm {d}x \quad v_r = \frac{1}{2 \varepsilon } \int _{x_r^-}^{x_r^+} {{\tilde{u}}}^n(x) \mathrm {d}x. \end{aligned}$$

After one step of calculations we can take the entropy dissipation of the Lax-Friedrichs Scheme in the middle cell

$$\begin{aligned} s_{k+\frac{1}{2}} = U\left( \frac{v_l + v_r}{2} + \lambda \frac{f(v_l) - f(v_r)}{2} \right) - \frac{U(v_l) + U(v_r))}{2} + \lambda \frac{F(v_l) - F(v_r)}{2} \end{aligned}$$

as an approximation of the true entropy dissipation at this edge. The value of \(\varepsilon \) is not critical in this calculation, and we can pass to the limit \(\varepsilon \rightarrow 0\) to find

$$\begin{aligned} s_{k + \frac{1}{2}} = U\left( \frac{{{\tilde{u}}}^n_{k}\left( x_{k+ \frac{1}{2}}\right) + {{\tilde{u}}}^n_{k + 1}\left( x_{k+\frac{1}{2}} \right) }{2} + \lambda \frac{f\left( {{\tilde{u}}}^n_{k}\left( x_{k+ \frac{1}{2}}\right) \right) - f\left( {{\tilde{u}}}^n_{k + 1}\left( x_{k+\frac{1}{2}} \right) \right) }{2} \right) \\ - \frac{U\left( {{\tilde{u}}}^n_{k}\left( x_{k+ \frac{1}{2}}\right) \right) + U\left( {{\tilde{u}}}^n_{k + 1}\left( x_{k+\frac{1}{2}} \right) \right) }{2} + \lambda \frac{F\left( {{\tilde{u}}}^n_{k}\left( x_{k+ \frac{1}{2}}\right) \right) - F\left( {{\tilde{u}}}^n_{k + 1}\left( x_{k+\frac{1}{2}} \right) \right) }{2} \end{aligned}$$

and proceed as before with the usual stepping and sup-mollification operators. One should note that as \(\lambda \) is constant the time step used for this calculation tends to zero and hence this entropy inequality is of no use for the ENO-LxF scheme and only gives an estimate for the entropy dissipation.

Fig. 6
figure 6

Subdivision and averaging after an ENO reconstruction

Remark 3.1

The aforementioned method is easily generalized to several space dimensions using a grid with tensor product structure and application of the presented methods in every direction, as also pointed out for correction procedure via reconstruction (CPR) Methods in their summation-by-parts (SBP) interpretation in [27].

Remark 3.2

The entropy inequality predictors are not discontinuity sensors. The function \(\alpha \) should sense positions where entropy dissipation takes place. The entropy equality dictates that there has to be in fact a discontinuity if entropy is dissipated. The opposite implication does not hold. A discontinuity can be present in the solution but still no entropy is dissipated. An example of such behavior is the contact discontinuity present in some solutions to Riemann problems for the Euler equations. Therefore, a different approach, not equivalent to sensing discontinuities, is the aim of the scheme.

4 Numerical tests

4.1 Numerical tests for the Burgers equation

Numerical tests were carried out for the new numerical flux composed of the entropy inequality predictor coupled to the convex combination flux. Sadly our scheme is not free of open parameters. The parameters ab were chosen as \(a = 1/20, b = 1/100\) after some experiments. Wrong selection of a results in a late or early detection of needed entropy dissipation. Those problems vanish for finer grids, as the entropy inequality predictor gives a refined distinction between conservation and entropy dissipation in this case. Still the optimal values for a are only distributed over one order of magnitude. To high values of b result in difficulties during time integration as this yields big Lipschitz constants for the resulting flux, while to small values result in a slow switching of the scheme between entropy conservation and extremal entropy dissipation. The values for b are not as critical as values for a and equally acceptable values span several orders of magnitude. A second decision which had to be made concerned the entropy pair. The pair \(U(u) = u^2/2, F(u) = u^3/3\) was chosen for this purpose. We compare the new scheme directly to the Godunov scheme as the new scheme uses the Godunov scheme for dissipative regions. The Burgers equation was solved for \(N = 50\) cells and periodic boundary conditions. A known good solution was calculated by a Godunov scheme with \(N_{control} = 5000\) cells. Time integration was carried out using the SSPRK104 algorithm [12].

Fig. 7
figure 7

Numerical experiment with the GT scheme. The entropy conservative flux is the eight order flux [22, 32] while the classic Godunov scheme with exact Riemann solver was used as entropy dissipative flux. Time integration was carried out using the SSPRK104 method and a CFL number of \(\lambda = 0.5\). The parameters of the Godunov entropy inequality predictor were \(a = 1/20, b=1/100\). The cutted hat function used in the sup mollification was rescaled to fit the support of the hat into a \(2p+1\) wide stencil with \(p=8\), i.e. to fit the stencil of the high order flux

Our numerical tests were carried out to test two assumptions.

  • The total entropy of the numerical solution of the GT scheme is a (good) approximation of the total entropy of the true solution.

  • The norm \(\left\| u(\cdot , t) - u_{numeric}(\cdot , t) \right\| \) is improved by our scheme over the error one gets from the Godunov scheme.

The first assumption seems to be true. By looking at Fig. 10a the entropy of the GT scheme is, by construction, constant as long as u is smooth. The behavior is also desirable for non-smooth solutions as the numerical derivative of the total entropy approximates the exact derivative quite well. Interestingly the total entropy of the less dissipative GT scheme is smaller than the total entropy of the Godunov method for large times, which is the same for the exact solution. Assumptions on the quality of the solution can be made from the solution plots in 7. The smooth solutions show good correspondence between exact solution and the GT solution. In the discontinuous case the solution at the discontinuity corresponds to the solution of the Godunov method but is still significantly more exact in smooth areas. After these qualitative assumptions some quantitative measurements were carried out in form of norms of the errors. While the \(\mathrm {L}_1\) norm of the error was reduced for smooth and non-smooth solutions the \(\mathrm {L}_2\) norm error for non-smooth solutions was only improved by a small amount as the shock is not better resolved than by the Godunov scheme. Several upwind schemes show glitches concerning rarefaction waves [35]. The scheme was tested for this deficiency using a Riemann problem with \(u_l = -1.0\) and \(u_r = 1.0\) as initial condition and the results are shown in Fig. 9. One could imagine that the sonic glitch, clearly present in the solution calculated by the Godunov method, will be also part of the solution calculated by the GT scheme. This is only partly the case. The strength of the sonic glitch is significantly reduced compared to the Godunov scheme.

Fig. 8
figure 8

Error norms over time for the solutions in Fig. 7 over time

Fig. 9
figure 9

Results for a Riemann Problem given by the initial condition \(u_l = -1.0\), \(u_r = 1.0\). A grid consisting of 50 cells was used in conjunction with a CFL number of \(\lambda = 0.5\) and the SSPRK104 time integration method [12]. Parameters where the same as in Fig. 7. The solution of the basic Godunov scheme was plotted as a reference for the possible sonic point glitch. The used GT scheme, based on the eight order entropy conservative flux, uses the same Godunov method as a low order flux. The sonic glitch is significantly reduced by the application of the GT scheme

Fig. 10
figure 10

Shu-Osher testcase at \(t = 1.8\). LMRLxFRI scheme of Order 6. The entropy conservative flux is the entropy conservative flux from [18] while the Lax-Friedrich flux was used as entropy dissipative flux. Time integration was carried out using the SSPRK104 method and a CFL number of \(\lambda = 0.1\). The parameters of the ENO2-Lax-Friedrichs entropy inequality predictor were \(a = 1/1000, b=1/1000\). The cutted hat function used in the sup mollification was rescaled to fit the support of the hat into a \(2p+1\) wide stencil with \(p=6\), i.e. to fit the stencil of the high order flux. The values of \(\alpha _{k+\frac{1}{2}}\) were also plotted

Fig. 11
figure 11

convergence analysis for the Euler equations. LMRLxFRI Scheme of order 6. The same parameters and fluxes as in Fig. 10 were used

4.2 Numerical tests for the Euler equations of gas-dynamics

After these promising results for the Burgers equation numerical tests were carried out for the Euler equations of gas dynamics

$$\begin{aligned} u =(\rho , \rho v, E) \quad f(\rho , \rho v, E) = \begin{bmatrix} \rho v \\ \rho v^2 + p\\ v(E + p) \end{bmatrix} \quad P = (\gamma - 1)\left( E - \frac{1}{2} \rho v^2 \right) \end{aligned}$$

in conjunction with the LxFRI scheme and the ENO2LxF entropy inequality predictor. The physical entropy [15, 33]

$$\begin{aligned} U(\rho , \rho v, E) = - \rho S \quad F(\rho , \rho v, E) = - \rho v S \quad S = \ln (p \rho ^{- \gamma }) \end{aligned}$$

was used in the entropy inequality predictor whereas the entropy conservative flux

$$\begin{aligned} f^R(u_l, u_r) = \begin{pmatrix}{{\hat{\rho }}} {{\hat{u}}} \\ {{\hat{\rho }}} {{\hat{u}}}^2 + {{\hat{p}}}_1 \\ {{\hat{\rho }}} {{\hat{u}}} {{\hat{H}}} \end{pmatrix} \quad z = \sqrt{\frac{\rho }{p}} \begin{pmatrix} 1 \\ u \\ p \end{pmatrix} \\ {{\hat{\rho }}} = {{\overline{z}}}_1 z_3^\text {ln} \quad {{\hat{p}}}_1 = \frac{{{\overline{z}}}_3}{{{\overline{z}}}_1} \quad {{\hat{p}}}_2 = \frac{\gamma + 1}{2 \gamma } \frac{z_3^\text {ln}}{z_1^\text {ln}} + \frac{\gamma -1}{2 \gamma }\frac{{{\overline{z}}}_3}{{{\overline{z}}}_1} \\ {{\hat{a}}} = \sqrt{\frac{\gamma {{\hat{p}}}_2}{{{\hat{\rho }}}}} \quad {{\hat{H}}} = \frac{{{\hat{a}}}^2}{\gamma - 1} + \frac{{{\hat{u}}}^2}{2} \end{aligned}$$

developed by Ismail and Roe in [18] that conserves the selected entropy was used for the entropy conservative part of the scheme. This flux was selected as it is also used in several other publications [6, 7]. Other options, including fluxes that also conserves the kinetic energy, are possible [25]. The parameters \(a = 1/1000\) and \(b = 1/1000\), that were determined experimentally as before, were used. A new set of parameters is needed as a different entropy inequality predictor is used whose typical amplitudes and offset are different. Different entropies can also influence these parameters and an analysis giving explicit formulas is planed for a future publication. Reference solutions were calculated by the LMRLxFRI scheme with \(N=1600\) points of order 6 and using SSPRK104 for time integration. First the ability of the scheme to resolve shocks was tested by the Shu-Osher test case number 6 from [28] given by the initial conditions

$$\begin{aligned} \rho _0(x, 0) = {\left\{ \begin{array}{ll}3.857153 \\ 1 + \varepsilon \sin (5 x) \end{array}\right. } \quad v_0(x, 0) = {\left\{ \begin{array}{ll} 2.629 \\ 0 \end{array}\right. } p_0(x, 0) = {\left\{ \begin{array}{ll} 10.333 &{} x < 1 \\ 1 &{} x \ge 1 \end{array}\right. } \end{aligned}$$

The results can examined in Fig. 10. A second experiment was carried out to demonstrate the ability of the scheme to achieve high order in smooth areas. The initial condition

$$\begin{aligned} \rho _0(x, 0) = 3.857153 + \varepsilon \sin (2 x) \quad v_0(x, 0) = 2.0 \quad p_0(x, 0) = 10.33333. \end{aligned}$$

is a density variation that is carried downstream to the right and the results from the convergence analysis are shown in Fig. 11.

5 Conclusion

We first looked at some numerical solutions to hyperbolic conservation laws and saw that the entropy inequality is not enough to guarantee high quality solutions. Afterwards a new philosophy for the construction of schemes was proposed as they should satisfy the Dafermos entropy criterion and the entropy equality for smooth solutions. We then constructed such a solver by the hybrid usage of entropy conservative and entropy dissipative fluxes. Numerical experiments showed that having no entropy dissipation for smooth solutions, as motivated by the entropy equality, and enough entropy dissipation in discontinuous areas by the Godunov or respective LxF scheme provides a scheme with improved accuracy in smooth areas over the Godunov scheme and an accuracy not worse than the Godunov or respective LxF scheme in non-smooth areas. This can be seen as an improvement over prior attempts of using the Dafermos criterion for numerical schemes as in [26, Chap. 9.2] where excessive dissipation in smooth areas lead to bad solutions. The primary difference being that the stencil selector proposed in [26, Chap. 9.2] also tried to dissipate the maximum amount of entropy in smooth areas while in fact the analytic theory in form of the entropy equality dictates the conservation of entropy as the maximum allowable reduction of entropy in this case. Research is ongoing concerning the improvement of stencil selection algorithms in reconstruction based methods by taking into account not only the maximum entropy dissipation but also the entropy equality for smooth areas. The methods that were constructed to calculate the coefficient \(\alpha \) could be used also in methods based on steered dissipation as for example in [10, Chap. 11]. Better \(\alpha \) distributions could on the other hand greatly enhance the abilities of the constructed schemes. An algorithm based on artificial intelligence has been tested by the author and a preprint [17] concerning several other algorithms to calculate \(\alpha \) is available. Practical applications of finite volume methods are often multidimensional problems therefore a future publication concerning this scheme will generalize the presented method to multiple space dimensions on unstructured grids.