1 Introduction

Consider the 1-D system of conservation laws

$$\begin{aligned} u_t(x,t)+f(u(x,t))_x=0 \end{aligned}$$
(1.1)

and the related convection-diffusion problem

$$\begin{aligned} u_t(x,t)+f(u(x,t))_x=\epsilon (Q(u)u_x(x,t))_x \end{aligned}$$
(1.2)

on the domain is \((0,1)\). \(u\) denotes the solution vector and \(f\) the flux vector. The conservation law is augmented with bounded compactly supported initial data, \(u^0(x)\), and appropriate boundary conditions. We will generically express the boundary conditions using boundary operators \(L_{\{0,1\}}(u(\{0,1\},t),\mathfrak{ g }_{\{l,r\}})=0\). \(\mathfrak{ g }_{\{l,r\}}\) are known boundary data at the left and right boundaries and we assume that \(\mathfrak{ g }_{\{l,r\}}\in L^{\infty }\). We will return to their specific form of the boundary conditions below. Furthermore, we assume that boundary and initial data are not violating any physical admissibility conditions of the conservation law. (For instance, we require that \(\rho \) is bounded away from 0 for the Euler equations.) Solutions to (1.1) may develop discontinuities in finite time (shock waves) and are therefore interpreted in a weak sense.

Definition 1.1

A locally integrable function \({u}\) is defined as a weak solution to (1.1) if it satisfies the following integral identity for all \({ \varphi } \in C^{\infty }([0,1] \times \mathbb R _+)\),

$$\begin{aligned}&\int \limits _\mathbb{R _+}\int \limits _{0}^1{u}\cdot {\varphi }_t + {f(u)}\cdot { \varphi }_x dx dt + \int \limits _{0}^1 { u^0}(x)\cdot { \varphi }(x,0) dx \nonumber \\&= -\int \limits _\mathbb{R _+}\varphi (0,t)(f(u(0,t))-L_0(u(0,t),\mathfrak{ g }_l(t))\,dt\nonumber \\&\quad +\int \limits _\mathbb{R _+}\varphi (1,t)(f(u(1,t))-L_1(u(1,t),\mathfrak{ g }_r(t))\,dt. \end{aligned}$$
(1.3)

Weak solutions are not unique and an extra entropy condition is needed. (Although, we emphasize that it is not clear if this is sufficient for uniqueness in the case of a system of conservation laws.) We will use the following form of the entropy condition.

Definition 1.2

Let \((U,F)\) be any pair of smooth functions such that \(U\) is strictly convex and \(F_u^T = U_u^T f_u\). Such a pair of functions is defined as an entropy-entropy flux pair. Then, \({u} \in L^{1}_\mathrm{{loc}}((0,1)\times \mathbb R _+)\) is an entropy solution of (1.1) if for all entropy-entropy flux pairs, \((U,F)\), and for all \(0 \le \varphi \in C^{\infty }_{0} ((0,1)\times \mathbb R _+)\), the following inequality holds,

$$\begin{aligned} \int \limits _{R_+}\int \limits _{0}^1 U({u})\varphi _t + F({u})\varphi _x dx dt \ge 0. \end{aligned}$$
(1.4)

Given an entropy pair \((U,F)\) the entropy variables are defined as \(w=U_u\). It was observed by Mock [12] that by rewriting the flux using the entropy variables, i.e. by defining \(g(w)=f(u)\), the system is symmetric in the sense that \(g_w=g_w^T\).

The rationale for Definition 1.2 is: if \(U_{uu}Q(u)>0\) and upon convergence of (1.2) as \(\epsilon \rightarrow 0\), the limiting solution will satisfy the entropy inequality (1.4). [Hence, the entropy condition is intended to single out the limiting solution of (1.2).] If the entropy variables symmetrize \(Q\), then the condition \(U_{uu}Q(u)>0\) is satisfied. By symmetrizing it is meant that \(Q(u)u_x=\tilde{Q}(w)w_x\) and \(\tilde{Q}=\tilde{Q}^T\ge 0\).

The prototype for (1.1) is the Euler equations of gas dynamics and for (1.2) the Navier–Stokes equations. The Euler equations are given as

$$\begin{aligned} u_t+f^I_x=0, \quad 0<x<1, \quad 0<t<T \end{aligned}$$
(1.5)

where \(u=(\rho ,\rho q, \mathcal{E }); \rho \) is the density of the fluid; \(q\) is the velocity; \(\mathcal{E }=\frac{\rho q^2}{2}+\frac{p}{\gamma -1}\) is the energy; \(p\) is the static pressure. Furthermore, \(f^I=(\rho q , \rho q^2+p, q(\mathcal{E }+p))\) is the flux function. \(\theta (x,t)>0\) denotes the absolute temperature and \(C_v\rho \theta =e\) where \(e=\mathcal{E }-\frac{m^2}{2\rho }\) is the internal energy. \(C_v>0\) is the specific heat at constant volume. The static pressure can be expressed as, \(p=(\gamma -1)e\) where \(\gamma \) is the specific heat ratio.

A richness of entropy functions is valuable for theoretical developments but for systems of conservation laws (1.1) entropy functions are scarce. Even more so if their related convection-diffusion form (1.2) is to be symmetrized by the entropy function. In particular, while there are a number of entropies that symmetrize the Euler equations, there is only one that symmetrizes the Navier–Stokes. (See [8]). Namely, it is the physical entropy function \(U=-\rho S\) where \(S\) is the thermodynamic entropy (usually referred to as “entropy” by physicists). We will adopt the convention to use entropy for any \(U\) and thermodynamic entropy for \(S\). In this work, we will focus on the Euler equations. However, we stress that this study is a stepping stone towards entropy stable schemes for the initial-boundary-value Navier–Stokes equations and for this reason we will solely use the physical entropy \(U=-\rho S\). The extension to Navier–Stokes equations is the topic of a forthcoming article.

Although, general results for existence and uniqueness for (1.1) and (1.2) are evasive, there has been progress towards proving a priori estimates of solutions and stability of numerical approximations of solutions. The theory of entropy stable numerical schemes was reviewed in [21]. A bound on the entropy can in turn be translated to \(L^2\) estimates of the independent variables \(u\) (see [2]). This is not enough to prove convergence to weak entropic solutions, but it is nevertheless a step towards that end.

Our main interest is the much less studied problems on bounded domains and we will discuss some previous results before stating our objectives. In [3] a boundary entropy inequality

$$\begin{aligned} F(u_0)-F(\mathfrak{ g }_l)-w^T(\mathfrak{ g }_l)(f(u_0)-f(\mathfrak{ g }_l))\le 0 \end{aligned}$$
(1.6)

was derived from the viscous limit of (1.2) assuming that the diffusion matrix \(Q\) is non-singular (and that the solution is stable in a sufficiently strong sense). (See also [1, 11].) We remark that their analysis does not immediately hold for the Navier–Stokes equations since \(Q\) is singular. Hence, we will not require that our scheme satisfies (1.6). We also refer to [13] where the effect on the solution due to the choice of the \(Q\) matrix is discussed.

In [17] the question of stability of conservation laws on bounded domain was studied and an entropy stable numerical scheme proposed. The key to this result was the use of a specific entropy that made the flux, expressed in entropy variables homogeneous. (See [7] for the original proof. We will refer to this entropy as “homogeneous”.) A drawback of this technique is that this entropy does not symmetrize the Navier–Stokes equations. (See [8].) Should that have been the case, the extension to the Navier–Stokes equations would have been easier.

In this study, we specifically aim to derive schemes for the Euler equations that satisfy the following criteria:

  1. 1.

    The numerical solution satisfies a local entropy inequality...

  2. 2.

    ...and a global entropy estimate.

  3. 3.

    The correct number of boundary conditions are enforced.

As already mentioned, we must use the entropy \(U=-\rho S\) and its corresponding entropy flux \(F=qU=-\rho q S\) as this is the only choice that symmetrizes the Navier–Stokes equations. This entropy poses a challenge when deriving suitable boundary conditions. The difficulty appears already in the 1-D Euler equations. To see this, we multiply the Euler equations (1.5) (perturbed by a vanishing parabolic diffusion) by \(U_u=w\), which yields the local entropy inequality

$$\begin{aligned} U_t+F_x\le 0. \end{aligned}$$

Integrating in space gives

$$\begin{aligned} \int \limits _0^{\infty }U_tdx-F(w(0,t))\le 0. \end{aligned}$$
(1.7)

We wish to limit the growth of \(U\) to infer stability on \(u\). Hence, we must bound \(F(w(0,t))\) by using appropriate boundary conditions. Let us consider supersonic outflow, when no boundary conditions should be supplied. If the flow is well into the supersonic region then in a neighborhood of the boundary all characteristics will point out of the domain and specifying no boundary condition appears reasonable in accordance with linear theory. However, the sign of \(F=-q\rho S\) is undetermined. We know that \(q<0\) and \(\rho >0\) but \(S\) can take both positive and negative values and \(\int U_t dx\) may be unbounded.

This problem was recognized by Dutt in [4]. To fix this problem he scaled the entropy \(\tilde{U}(u)=U(u)+U_u(\bar{u})(u-\bar{u})\). This is a standard transformation and it is easy to see that if \(\bar{u}\) is a constant state, then \(\tilde{U}\) satisfies an entropy inequality if \(U\) does. The corresponding entropy flux is given by \(\tilde{F}=F(u)+U_u(\bar{u})(f(u)-f(\bar{u}))\). Dutt carefully chooses a reference state so that \(\tilde{F}\) changes sign at the boundary corresponding to inflow and outflow and thereby solves the problem described above. To obtain an estimate Dutt has to assume that there are positive and minimal states of \(\rho , p\) and \(T\). These are fairly standard assumptions (we tacitly make the same assumption) and required for \(U\) to be convex. However, he also assumes that \(\rho <\rho _{max}\) which is difficult to justify a priori although sensible from a physical point of view. The approach in this paper will bound the numerical counterpart of \(F(w(0,t))\) from above. (Its sign will remain indefinite, but the bound ensures a bounded growth.)

The paper is organized as follows: In Sect. 2 we will begin with a review of entropy-stable schemes for initial-value problems. We will develop the scheme in a second-order framework to keep notation to a minimum. In Sect. 2.1 we turn to the initial-boundary-value conservation law and propose a set of far-field conditions. We prove that the scheme is globally stable. In the subsequent Sect. 2.2, we apply the theory to Burgers equation. In Sect. 2.3, we derive expressions for far-field boundary conditions for the Euler equations. We derive stable implementations of wall boundary conditions in Sect. 2.3.1 and interface conditions between two connected grid domains in Sect. 2.4. In Sect. 3, we will briefly outline the generalization to a high-order scheme. Furthermore, we present numerical computations, both for a second- and a fourth-order scheme (see [20]). Finally, we give some concluding remarks in Sect. 4.

2 Entropy Stability

In the subsequent analysis, we will consider the following generic 1-D system of conservation laws,

$$\begin{aligned} u_t+f(u)_x=0, \quad x\in \Omega \quad t>0, \end{aligned}$$
(2.1)

subject to the initial conditions \(u(x,0)=u^0(x)\), where as usual \(u\) is the solution vector and \(f\) the, generally non-linear, flux function. We will begin by reviewing the theory for the Cauchy problem where \(\Omega =(-\infty ,\infty )\). (See [21].)

To this end, let \(x_i=ih\) is the set of discrete points in space at which we seek approximate solutions. \(h\) denotes the grid spacing and \(i=0,\pm 1,\pm 2,\ldots \). Furthermore, \(u_i(t)\) will be the discrete solution vector at \(x_i\). We will also use \(f_i=f(u_i)\) and \(g_{i+1/2}\) will denote the flux approximation at \(x_{i+1/2}=(x_i+x_{i+1})/2\). Moreover, \((U,F)\) will denote the entropy pair and \(U_i=U(u_i)\), \(F_i=F(u_i)\). Numerical entropy-flux approximations will be defined below and denoted \(F_{i+1/2}\) at \(x_{i+1/2}\). The entropy variables are \(U_u=w\) and we use \(w_i=w(u_i)=U_u(u_i)\). The entropy potential \(\Psi =w^Tf-F\) is similarly discretized as \(\Psi _i=\Psi (u_i)\). At this point, we define the numerical scheme,

$$\begin{aligned} (u_i)_t+\frac{g_{i+1/2}-g_{i-1/2}}{h}=0, \quad i=0,\pm 1,\pm 2,\pm 3,\ldots \end{aligned}$$
(2.2)

where

$$\begin{aligned} g_{i+1/2}=\frac{f_{i+1}+f_i-Q_{i+1/2}(w_{i+1}-w_i)}{2} \end{aligned}$$
(2.3)

and \(Q_{i+1/2}\) is a diffusion matrix.

Definition 2.1

[21] The scheme (2.2) is entropy stable if

$$\begin{aligned} \frac{1}{2} (w_{i+1}-w_{i})^Tg_{i+1/2}-\frac{1}{2}(\Psi _{i+1}-\Psi _i)\le 0 \end{aligned}$$

and termed entropy conservative in the case of equality.

Definition 2.2

A scheme is globally entropy stable, if its solution satisfies a global entropy estimate/bound

$$\begin{aligned} \sum _{i\in \mathcal I } hp_i(U(u_i(t)))\le C, \end{aligned}$$
(2.4)

where \(p_i\) are bounded positive weights and \(\mathcal I \) the set of all grid points. \(C\) is a constant depending only on the initial conditions (and for initial-boundary-value problems also the boundary data).

The following theorem summarizes some key results from [21] for the Cauchy problem.

Theorem 2.3

Let \(g_{i+1/2}\) be an entropy stable flux and define,

$$\begin{aligned} F_{i+1/2}= \frac{1}{2}(w_i+w_{i+1})^Tg_{i+1/2} - \frac{1}{2}(\Psi _{i+1}+\Psi _i). \end{aligned}$$
(2.5)

Then the solution of the numerical scheme (2.2) satisfies:

$$\begin{aligned} (U_i)_t+\frac{F_{i+1/2}-F_{i-1/2}}{h}\le 0 \end{aligned}$$
(2.6)

and the global estimate

$$\begin{aligned} \sum _{i\in \mathcal I } h(U(u_i(t)))\le \sum _{i\in \mathcal I } hU(u_i(0)), \end{aligned}$$
(2.7)

i.e. the solution is globally entropy stable. Furthermore, if \(U\) is strictly convex, \(u\in L^2_{loc}\)

Proof

Multiply (2.2) by \(w_i^T\).

$$\begin{aligned} w_i^T(u_i)_t+w_i^T\frac{g_{i+1/2}-g_{i-1/2}}{h}=0. \end{aligned}$$

Add and subtract suitable terms.

$$\begin{aligned} h(U_i)_t+\frac{1}{2}(w_i+w_{i+1})^Tg_{i+1/2}+\frac{1}{2} (w_i-w_{i+1})^Tg_{i+1/2}&\nonumber \\ -\frac{1}{2}(w_i+w_{i-1})^Tg_{i-1/2}-\frac{1}{2}(w_i-w_{i-1})^Tg_{i-1/2}&=0. \end{aligned}$$
(2.8)

Use (2.5) in (2.8) to obtain

$$\begin{aligned} h(U_i)_t+F_{i+1/2}+\frac{1}{2} (w_i-w_{i+1})^Tg_{i+1/2}+\frac{1}{2}(\Psi _{i+1}+\Psi _i)&\\ -F_{i-1/2}-\frac{1}{2}(w_i-w_{i-1})^Tg_{i-1/2}-\frac{1}{2}(\Psi _{i}+\Psi _{i-1})&=0. \end{aligned}$$

or

$$\begin{aligned} h(U_i)_t+F_{i+1/2}-F_{i-1/2}=&\frac{1}{2} (w_{i+1}-w_{i})^Tg_{i+1/2}-\frac{1}{2}(\Psi _{i+1}-\Psi _i)\\&+\frac{1}{2}(w_i-w_{i-1})^Tg_{i-1/2}-\frac{1}{2}(\Psi _{i}-\Psi _{i-1}) \end{aligned}$$

Using that \(g_{i+1/2}\) is entropy stable, we obtain (2.6). Summing by parts and integrating in time give the global estimate (2.7) with \(p_i=1\). Thanks to strict convexity of \(U\), the estimate (2.7) can be translated to \(L^2_{loc}\) estimates of the conservative variables \(u\) by an argument due to Dafermos [2]. (On a bounded domain, one gets \(u\in L^2\).) \(\square \)

It is clear that global entropy stability follows directly from entropy stability in Cauchy case (Definition 2.1) and in [21] the notion of a global entropy bound is therefore never introduced. However, when boundary conditions are added the implication from entropy stability (in the sense of Definition 2.1) to a global bound is in general not true. Finally, we remark that an entropy stable flux (2.3) is one where \(Q_{i+1/2}\) is sufficiently large and many examples of such schemes can be found in [21]. They include entropy-fixed Roe and the Rusanov flux. See also [22] and [6] for more examples.

2.1 Boundary Schemes

We will now turn our attention to the boundaries. Hence, we consider (2.1) with \(\Omega =(0,\infty )\). Furthermore, we will enforce an appropriate subset of a Dirichlet type boundary condition, \(u(0,t)=\mathfrak{ g }(t)\), in a weak sense. \(\mathfrak{ g }(t)\) is the data vector and we will use a notational convention and sometimes write \(w_{\mathfrak{ g }}=w(\mathfrak{ g })\) and \(u_{\mathfrak{ g }}=u(\mathfrak{ g })=\mathfrak{ g }(t)\).

The discretization of the x-axis is \(x_i=ih\) with \(i=0,1,2,\ldots \). The scheme (2.2) is used for \(i>0\), i.e.,

$$\begin{aligned} (u_i)_t+\frac{g_{i+1/2}-g_{i-1/2}}{h}=0, \quad i=1,2,3,\ldots \end{aligned}$$
(2.9)

and at the boundary we will use the scheme

$$\begin{aligned} (u_0)_t+\frac{g_{1/2}-\tilde{g}_{0}}{h/2}=0. \end{aligned}$$
(2.10)

Here, \(\tilde{g}_0\) denotes the approximation at \(x_0\) (not necessarily equal to \(f_0=f(u_0)=g(w_0)=g_0\)). For the moment, we leave \(\tilde{g}_0\) undefined.

Lemma 2.4

Let (2.9) and (2.10) be a consistent approximation of (2.1) on \(\Omega = (0,\infty )\) and assume that \(g_{i+1/2}\), \(i\ge 0\), are entropy stable numerical fluxes. Then (2.6) holds with the numerical entropy flux (2.5) and at the boundary

$$\begin{aligned} (U_0)_t+\frac{F_{1/2}-\tilde{F}_0}{h/2}\le 0 \end{aligned}$$
(2.11)

where \(\tilde{F}_0=w_0^T\tilde{g}_0-\Psi _0\). Furthermore,

$$\begin{aligned} \frac{h}{2}(U_0)_t+\sum _{i>0} (U_i)_th \le \tilde{F}_0=w_0^T\tilde{g}_0-\Psi _0. \end{aligned}$$
(2.12)

Proof

Since \(g_{i+1/2}, i\ge 0\) are entropy stable fluxes, (2.6) holds. Next, we will derive the corresponding relation for the boundary scheme. Multiply (2.10) by \(w_0^T\) to obtain,

$$\begin{aligned} w_0^T(u_0)_t+w_0^T\frac{g_{1/2}-\tilde{g}_{0}}{h/2}=0. \end{aligned}$$

Adding and subtracting terms

$$\begin{aligned} \frac{h}{2}(U_0)_t+F_{1/2}+\frac{1}{2} (w_0-w_{1})^Tg_{1/2}+\frac{1}{2}(\Psi _{1}+\Psi _0)-w_0^T\tilde{g}_0=0 \end{aligned}$$

Introduce

$$\begin{aligned} \tilde{F}_0 = w_0^T\tilde{g}_0-\Psi _0 \end{aligned}$$
(2.13)

and obtain

$$\begin{aligned} \frac{h}{2}(U_0)_t+F_{1/2}-\tilde{F}_0+\frac{1}{2} (w_0-w_{1})^Tg_{1/2}+\frac{1}{2}(\Psi _{1}-\Psi _0)=0 \end{aligned}$$

since \(g_{1/2}\) is an entropy stable/conservative flux. We get the desired entropy inequality (2.11) at the boundary.

We multiply (2.6) by \(h\) and (2.11) by \(h/2\) and sum

$$\begin{aligned} \frac{h}{2}(U_0)_t+\sum _{i>0} (U_i)_th \le \tilde{F}_0=w_0^T\tilde{g}_0-\Psi _0. \end{aligned}$$

\(\square \)

Generally, for approximations of (1.1), we want \(\tilde{g}_0\) to satisfy the following conditions:

  1. 1.

    \(\tilde{g}_0\) is a consistent approximation of \(f(u_0)\), i.e., \(\tilde{g}_0(\ldots ,u,\ldots )=f(u)\).

  2. 2.

    It yields a global entropy estimate, i.e., bounds \(\tilde{F}_0\).

  3. 3.

    It enforces the correct number of boundary conditions.

In analogy with Definition 2.1, we introduce:

Definition 2.5

A boundary flux \(g_{boundary}\) is termed entropy conservative if

$$\begin{aligned} (w_0-w(\mathfrak{ g }))^T g_{boundary} = \Psi _0-\Psi (\mathfrak{ g }). \end{aligned}$$
(2.14)

We will now define \(\tilde{g}_0\). Let \(\hat{g}_0\) denote an entropy conservative flux that satisfies (2.14). We note that entropy conservative fluxes are not unique. Obviously, they depend on the choice of entropy but even for a given entropy there are numerous choices of \(\hat{g}_0\). (See [21, 22].)

Next, we define Roe averages. In [15] an averaged Jacobian matrix, \(\tilde{A}_{j+1/2}\) for the Euler equations was constructed that satisfies,

$$\begin{aligned} f(u_{j+1})-f(u_j)=\tilde{A}_{j+1/2}(u_{j+1}-u_j). \end{aligned}$$

It was shown in [9] that such a matrix exists in the general case and it is given by

$$\begin{aligned} \tilde{A}_{j+1/2}=\int \limits _{-1/2}^{1/2}g_w(w_{j+1/2}(\xi ))\,d\xi \left( \int \limits _{-1/2}^{1/2}(u_w(w_{j+1/2}(\xi )))\,d\xi \right) ^{-1} \end{aligned}$$
(2.15)

where \(w_{j+1/2}(\xi ) = \frac{1}{2}(w_{j+1}+w_j)+\xi \Delta w_{j+1/2}\) and \(\Delta w_{j+1/2}=w_{j+1}-w_j\). Furthermore, we can write

$$\begin{aligned} (u_{j+1}-u_j)=\int \limits _{-1/2}^{1/2} \frac{d}{d\xi }u(w_{j+1/2}(\xi ))\,d\xi = \int \limits _{-1/2}^{1/2} (u_w(w_{j+1/2}(\xi )))\,d\xi \cdot (w_{j+1}-w_j). \end{aligned}$$
(2.16)

Hence, there is a Roe-average matrix expressed in \(w\) such that

$$\begin{aligned} g(w_{j+1})-g(w_j)= f(u_{j+1})-f(u_j) = \tilde{A}_{j+1/2}(u_{j+1}-u_j) = \tilde{B}_{j+1/2}(w_{j+1}-w_j) \end{aligned}$$

hold, where

$$\begin{aligned} \tilde{B}_{j+1/2}=\int \limits _{-1/2}^{1/2}g_w(w_{j+1/2}(\xi ))\,d\xi . \end{aligned}$$
(2.17)

Since \(g_w\) is symmetric we can diagonalize \(\tilde{B}_{j+1/2}\) as

$$\begin{aligned} \tilde{B}_{j+1/2}=\tilde{R}_{j+1/2} \tilde{\Lambda }_{j+1/2} \tilde{R}^T_{j+1/2}, \end{aligned}$$
(2.18)

where \(\tilde{R}^T\tilde{R}=I\). (\(I\) is the identity matrix of the same size.) Specifically, we will denote the Roe-average between the boundary point and data as \(\tilde{B}_0\) which satisfies \(g(w_0)-g(w_{\mathfrak{ g }}) = \tilde{B}_{0}(w_{0}-w_{\mathfrak{ g }})\).

The entropy conservative flux \(\hat{g}_0\) can be viewed as an averaged flux between the two states \(w_0\) and \(w_{\mathfrak{ g }}\). If \(w_0\ne w_{\mathfrak{ g }}\), \(\hat{g}_0\) will differ from the arithmetic average and the difference will depend on the distance \(w_0-w_{\mathfrak{ g }}\). Assume that \(u,w\) and \(f,g\) have \(N\) components. We will try to find \(\hat{g}_0\) on the form

$$\begin{aligned} \hat{g}_0&=\frac{g(w_0)+g(w_{\mathfrak{ g }})}{2}-\frac{\hat{D}_0}{2}(w_0-w_{\mathfrak{ g }}) \end{aligned}$$
(2.19)

where \(\hat{D}_0\) is an unknown symmetric matrix. It is non-unique since it has \(N^2/2+N/2\) components while (2.19) only makes \(N\) equations. For instance, we can choose \(\hat{D}_0\) to act along the eigenvectors of the Roe matrix by setting \(\hat{D}_0=\tilde{R}_0\hat{\Lambda }_0 \tilde{R}_0^T\). Consequently,

$$\begin{aligned} \tilde{R}_0^T\left( \hat{g}_0-\frac{g(w_0)+g(w_{\mathfrak{ g }})}{2}\right) = -\frac{\hat{\Lambda }_0}{2}\tilde{R}_0^T(w_0-w_{\mathfrak{ g }}). \end{aligned}$$
(2.20)

\(\hat{\Lambda }_0\) is a diagonal matrix and its entries can be obtained from the \(N\) uncoupled equations (2.20). Hence, \(\hat{\Lambda }_0\) are the diffusion coefficients (positive or negative) of the entropy conservative scheme in the directions of the Roe eigenvectors. We will also use the notation \(\hat{D}^+_0=\frac{\hat{D}_0+|\hat{D}_0|}{2}=\tilde{R}_0\hat{\Lambda }^+_0\tilde{R}^T_0\) where \(\hat{\Lambda }^+_0\) contains the positive entries of \(\hat{\Lambda }_0\).

Remark

We use the word “diffusion coefficient” to describe \(\hat{D}_0\) as it resembles \(Q_{i+1/2}\) in (2.3). However, it should be kept in mind that the entropy conservative flux is non-diffusive and \(\hat{D}_0\sim |w_0-w_{\mathfrak{ g }}|\).

At this point we define the boundary flux in (2.10)

$$\begin{aligned} \tilde{g}_0=\frac{g(w_0)+g(w_{\mathfrak{ g }})}{2}-\frac{Q_0}{2}(w_0-w_{\mathfrak{ g }}) \end{aligned}$$
(2.21)

where

$$\begin{aligned} Q_0=|\tilde{B}_0| + \hat{D}_0+|\hat{D}_0|. \end{aligned}$$

Theorem 2.6

Let \(g_{i+1/2}\), \(i\ge 0\) be consistent entropy-stable fluxes. Then the solution of (2.9), (2.10) and (2.21) is globally entropy stable, i.e., it satisfies

$$\begin{aligned} \frac{h}{2}(U_{0})_t+h\sum _{i> 0} (U_i)_t \le C \end{aligned}$$

and \(\Vert u\Vert _2\le K\), where \(C,K\) are two constants.

Proof

First, we note that \(g_{i+1/2}\) is consistent by assumption. Furthermore, \(\tilde{g}_0\) defined in (2.21) is clearly consistent as well.

The assumption of entropy stable fluxes in the interior allows us to use Lemma 2.4 and specifically (2.12) holds. To obtain the global bound we must show that the right-hand side of (2.12) is bounded. The argument is the same as in [17].

Using the definition of the entropy flux in \(\tilde{F}_0\),

$$\begin{aligned} \tilde{F}_0&=w_0^T \tilde{g}_0-\Psi _0+F(\mathfrak{ g })-F(\mathfrak{ g }) \\&= w_0^T \tilde{g}_0-\Psi _0-w_{\mathfrak{ g }}^Tf(\mathfrak{ g })+\Psi _{\mathfrak{ g }}+F(\mathfrak{ g }) \\&= (w_0-w_{\mathfrak{ g }})^T \tilde{g}_0+w_{\mathfrak{ g }}^T(\tilde{g}_0 - f(\mathfrak{ g }))-(\Psi _0-\Psi _{\mathfrak{ g }})+F(\mathfrak{ g }) \end{aligned}$$

Inserting \(\tilde{g}_0\) in the expression for \(\tilde{F}_0\) yields,

$$\begin{aligned} \tilde{F}_0 =&w(\mathfrak{ g })^T(\tilde{g}_0-f(\mathfrak{ g }))+F(\mathfrak{ g }) -(\Psi _0-\Psi _{\mathfrak{ g }})\nonumber \\&+(w_0-w_{\mathfrak{ g }})^T(\hat{g}_0 -\frac{|\tilde{B}_0|+|\hat{D}_0|}{2}(w_0-w_{\mathfrak{ g }}))\nonumber \\ =&w(\mathfrak{ g })^T(\tilde{g}_0-f(\mathfrak{ g }))+F(\mathfrak{ g }) -(w_0-w_{\mathfrak{ g }})^T\frac{|\tilde{B}_0|+|\hat{D}_0|}{2}(w_0-w_{\mathfrak{ g }})\nonumber \\ =&w(\mathfrak{ g })^T(\tilde{B}_0^--\hat{D}^+_0)(w_0-w_{\mathfrak{ g }})+F(\mathfrak{ g }) \nonumber \\&-\frac{1}{2}(w_0-w_{\mathfrak{ g }})^T(|\tilde{B}_0|+|\hat{D}_0|)(w_0-w_{\mathfrak{ g }}). \end{aligned}$$
(2.22)

Let \(r_i\) denote the \(i\)th eigenvector of \(\tilde{B}_0\), i.e., the \(i\)th column of \(\tilde{R}_0\). Define \(w_{\mathfrak{ g }}^i=r^T_iw_{\mathfrak{ g }}\) and \(w_{0\mathfrak{ g }}^i=r_i^T(w_0-w_{\mathfrak{ g }})\). We also denote the number of components of \(w\) by \(N\). Then

$$\begin{aligned} \tilde{F}_0=F(\mathfrak{ g })+\sum _{i=1}^N w_{\mathfrak{ g }}^i((\tilde{\lambda }^i)^--(\hat{\lambda }^i)^+)w_{0\mathfrak{ g }}^i -\frac{1}{2}w_{0\mathfrak{ g }}^i(|\tilde{\lambda }^i|+|\hat{\lambda }^i|)w_{0\mathfrak{ g }}^i \end{aligned}$$
(2.23)

where \((\tilde{\lambda }^i)^-=\min (\tilde{\lambda }^i,0)\) and it is an eigenvalue of \(\tilde{B}^-_0\). \(w^i_{\mathfrak{ g }}\) is bounded since \(r^i\) is of unit length. Furthermore, \((\tilde{\lambda }^i)^--(\hat{\lambda }^i)^+\le |\tilde{\lambda }^i|+|\hat{\lambda }^i|\) and since \(|\tilde{\lambda }^i|+|\hat{\lambda }^i|\ge 0\), the last term in (2.23) must be non-positive.

To simplify notation, we will continue the argument for the \(\hat{\lambda }\) contribution only. We can make the same argument independently for \(\tilde{\lambda }\) in exactly the same way and eventually conclude that \(\tilde{F}_0\) is bounded. Hence, we write,

$$\begin{aligned} \tilde{F}_0=F(\mathfrak{ g })+\sum _{i=1}^N -w_{\mathfrak{ g }}^i(\hat{\lambda }^i)^+w_{0\mathfrak{ g }}^i -\frac{1}{2}w_{0\mathfrak{ g }}^i|\hat{\lambda }^i|w_{0\mathfrak{ g }}^i +BT_{\tilde{\lambda }}. \end{aligned}$$

where \(BT_{\tilde{\lambda }}\) represents the \(\tilde{\lambda }\) contribution. Moreover, we rewrite the expression as,

$$\begin{aligned} \tilde{F}_0&=F(\mathfrak{ g })+BT_1+BT_{2N} +BT_{\tilde{\lambda }}. \nonumber \\ BT_{1}&= -w_{\mathfrak{ g }}^1(\hat{\lambda }^1)^+w_{0\mathfrak{ g }}^1 -\frac{1}{2}w_{0\mathfrak{ g }}^1|\hat{\lambda }^1|w_{0\mathfrak{ g }}^1 \\ BT_{2N}&=\sum _{i=2}^N -w_{\mathfrak{ g }}^i(\hat{\lambda }^i)^+w_{0\mathfrak{ g }}^i -\frac{1}{2}w_{0\mathfrak{ g }}^i|\hat{\lambda }^i|w_{0\mathfrak{ g }}^i\nonumber \end{aligned}$$
(2.24)

To simplify notation further and since the argument is independent for each direction, we assume without loss of generality that the contribution from the \(\hat{\lambda }_{2,\ldots N}\) terms, i.e., \(BT_{2N}\) are bounded and consider \(BT_1\). We recall that \(w_{\mathfrak{ g }}^1\) is bounded since it is obtained from data and a unit length eigenvector.

First consider the case when \(\hat{\lambda }^1\) is bounded. If \(w_{0\mathfrak{ g }}^1\) is bounded, then \(BT_1\) is bounded from below and from above and if \(w_{0\mathfrak{ g }}^1\) grows then the last term in \(BT_1\) will dominate and \(BT_1\) is bounded from above.

Next, we allow that \(|\hat{\lambda }^1|\) grows, possibly unboundedly. From (2.24), we see that if \(|w_{0\mathfrak{ g }}^1|\ge 2|w_{\mathfrak{ g }}^1|\) then \(BT_1\le 0\) independently of \(|\hat{\lambda }^1|\). Hence, we have an upper bound in this case.

However, if \(|w_{0\mathfrak{ g }}^1|< 2|w_{\mathfrak{ g }}^1|\) then \(BT_1>0\). If \(\hat{\lambda }^1\) grows unboundedly, it would appear that \(BT_1\) can grow arbitrarily large and hence \(\tilde{F}_0\) is not bounded. However, this can not occur for a conservation law equipped with an entropy. (One could possibly construct some other PDE where it might occur.) The reason is that \(\hat{\lambda }^1\) is not independent of \(w\) and, vice versa, a growth in \(|\hat{\lambda }^1|\) can not leave \(w_{0\mathfrak{ g }}^1\) unaffected. To demonstrate this we write the conservation law, e.g. (2.1), as

$$\begin{aligned} u_t+f_x=0; \quad u_ww_t + g_ww_x=0 \end{aligned}$$
(2.25)

Since \(u_w\) is positive definite a growth of the eigenvalue \(\hat{\lambda }^1\) will affect the eigendirection \(r_1\) (and possibly the other directions as well). Locally in time and space, this is easily seen from the linearized equation where \(u_w\) and \(g_w\) are frozen. (Denoted with a bar.)

$$\begin{aligned} \bar{u}_w w_t + \bar{g}_ww_x=0.\nonumber \\ \bar{R}^T \bar{u}_w \bar{R}(\bar{R}^T w)_t + \bar{\Lambda }(\bar{R}^Tw)_x=0. \end{aligned}$$
(2.26)

Since \(\bar{R}^T\bar{u}_w \bar{R}>0 \) is bounded away from 0, the conclusion follows.

In conclusion, for entropy conservation laws where the coupling between variables is strong, \(w_{0\mathfrak{ g }}^1\) can not remain unaffected and small if the corresponding eigenvalue grows. Hence, \(|w_{0\mathfrak{ g }}^1|\) will grow and \(BT_1\) will become negative. (We remark that for the Euler equations \(u_w\ge constant >0\) holds under the standard positivity assumptions, \(\rho ,p\ge \delta >0\).)

Hence, we have proved that the scheme satisfies a global bound. The \(L^2\) bound on the conservative variables follows from convexity of \(U\) [2]. (Some further explanations of this proof are found in “Appendix”.) \(\square \)

Remark

We used the property that \(u_w>0\) above to exclude the pathological growth case. We note that other properties could be used to the same end. For instance, if \(|w_{0\mathfrak{ g }}^1|\) is small such that \(BT_1>0\), the growth would be proportional to \(\lambda ^1\). Furthermore, the growth of \(\lambda ^1\) has to affect \(w_{0\mathfrak{ g }}^{2,\ldots N}\) (but maybe not \(\lambda ^{2,\ldots N}\)). This means that \(BT_{2N}\) would grow negative at a rate of \((w_{0\mathfrak{ g }}^{2,\ldots N})^2\) which in most cases would be a faster growth than \(\lambda ^1\) and hence bound \(\tilde{F}_0\). However, such a condition might be difficult to check for a particular conservation law.

Proposition 2.7

The number of boundary conditions imposed by \(\tilde{g}_0\) is consistent with linear theory and \(\tilde{g}_0\) enforce data on the characteristic variables corresponding to in-going waves.

Proof

Linearization of the scheme (2.9) and (2.10) around a smooth solution results in a scheme of the same form but

$$\begin{aligned} g_{i+1/2}=\frac{L_{i+1}+L_i-Q^L_{i+1/2}(y_{i+1}-y_i)}{2} \end{aligned}$$
(2.27)

where \(L\) is the linear flux \(A(x,t)y\), \(A\) is a bounded matrix and \(y\) the linearized variables. \(Q^L\) is the linear diffusion coefficient. (If we employ the entropy conservative scheme for the conservation law, \(Q^L_{i+1/2}=0\). This choice is not important for the boundary conditions.) In particular at the boundary \(Q_0^L=|A(0,t)|\). This corresponds to \(|\tilde{B}_0|\) in (2.21) (\(\hat{D}_0=0\) for the linearized scheme), such that

$$\begin{aligned} \tilde{g}_0=A(x_0,t)y_0-A^+(x_0,t)(y_0-y_{\mathfrak{ g }}). \end{aligned}$$
(2.28)

where \(y_{\mathfrak{ g }}\) is the boundary data for the linearized scheme. (In fact, \(y_{\mathfrak{ g }}=0\) but we keep \(y_{\mathfrak{ g }}\) for consistency with previous notation.) As usual, \(A^+\) denotes the positive part of the matrix. From (2.28) we see that the in-going characteristic variables are enforced by shifting in data in the flux. This automatically implies the correct number of boundary conditions.

Remark

We note that the boundary scheme (2.10) reduces to

$$\begin{aligned} (u_0)_t=-\frac{g_{1/2}-\tilde{g}_0}{h/2}=-\frac{A(x_{1},t)y_{1}-A(x_0,t)y_0}{h/2}-\frac{A^+(x_0,t)}{h/2}(y_0-y_{\mathfrak{ g }}) \end{aligned}$$
(2.29)

and the interior scheme is simply the second-order central scheme. Hence, the scheme is the second-order Summation-by-parts/Simultaneous Approximation Term scheme (SBP-SAT). (See e.g. [14, 16] and references therein for more details on SBP-SAT.)

Finally, we show that the scheme is conservative by proving that it approximates a weak solution.

Proposition 2.8

Let \(\{u^h_i\}\) be a solution generated by (2.9), (2.10) and (2.21) with grid size \(h\). Assume that \(u^h_i\in L^{\infty }\) and converges almost everywhere as \(h\rightarrow 0\). Furthermore, assume that \(u_0^h\) converges as \(h\rightarrow 0\). Then \(\{u^h_i\}\) converges to a weak solution (1.3).

Proof

By observing that the boundary flux can be written as (2.28) the proof is very similar to the corresponding theorem in [20]. In short, introduce a smooth test function \(\phi \) and project onto grid as \(\phi (x_i)=\phi _i\). Multiply the scheme by \(\phi _ih\) and the boundary scheme by \(\phi _0h/2\), sum by parts and integrate in time. The result is,

$$\begin{aligned}&\int \limits _\mathbb{R ^+}\left( \frac{1}{2}u^h_0(\phi _0)_t+\sum _{i>0}(\phi _i)_tu^h_i +\sum _{i>0}hf_i\frac{\phi _{i+1}-\phi _i}{h}+ \frac{1}{2}u^0(x_0)\phi _0+\sum _{i>0}\phi _iu^0(x_i) \right) dt \nonumber \\&\quad =-\int \limits _\mathbb{R ^+}\phi (0,t)(f_0+(\tilde{B}_0^++\hat{D}_0^+)(w^h_0-w^h_{\mathfrak{ g }}) )dt.&\end{aligned}$$
(2.30)

Using (2.16) in the last term, we obtain the same form as (1.3). \(\square \)

2.2 The Inviscid Burgers Equation

We will briefly exemplify the boundary flux for the inviscid Burgers equation

$$\begin{aligned} u_t+\left( \frac{u^2}{2}\right) _x=0,\quad 0<x<\infty . \end{aligned}$$

The scheme is augmented with the boundary condition \(u(0,t)=\mathfrak{ g }(t)\). We consider the semi-discretization for \(x_i=ih\)

$$\begin{aligned} (u_i)_t+\frac{g_{i+1/2}-g_{i-1/2}}{h}&=0 \quad i>0\\ (u_0)_t+\frac{g_{1/2}-\tilde{g}_{0}}{h/2}&=0. \end{aligned}$$

The flux

$$\begin{aligned} \hat{g}_{i+1/2}=\frac{f_{i+1}+f_{i}}{2}-\frac{1}{12}(u_{i+1}-u_i)^2 \end{aligned}$$

where \(f_i=u_i^2/2\) is entropy conservative with respect to \(U=u^2\). (See [21].) Furthermore, we have the Roe-flux

$$\begin{aligned} g^{Roe}_{i+1/2}=\frac{f_{i+1}+f_{i}}{2}-\frac{|u_{i+1}+u_i|}{4}(u_{i+1}-u_i). \end{aligned}$$

Based on these two fluxes it is straightforward, following the recipe above, to write down the boundary flux:

$$\begin{aligned} \tilde{g}_{0}=\frac{f_{0}+f_{\mathfrak{ g }}}{2}- \left( \frac{|u_{0}+u_{\mathfrak{ g }}|}{4}+\frac{1}{12}(u_{0}-\mathfrak{ g })^+\right) (u_{0}-\mathfrak{ g }). \end{aligned}$$

2.3 The Euler Equations

The Euler equations were given in the introduction but we restate them here for convenience.

$$\begin{aligned} u_t+f^I_x=0, \quad 0<x<\infty , \quad 0<t<T \end{aligned}$$
(2.31)

where \(u=(\rho ,\rho q, \mathcal{E })\) and the flux \(f^I=(\rho q , \rho q^2+p, q(\mathcal{E }+p))\). \(\rho ,q,\mathcal{E },p\) are density, velocity, energy and pressure. Also, \(e=\mathcal{E }-\frac{m^2}{2\rho }\) and \(p=(\gamma -1)e\) where \(\gamma \) is the specific heat ratio.

To define the flux (2.21), we need an entropy conservative flux and the Roe matrices. There are various different ways of defining entropy conservative numerical fluxes (see [6, 10, 22]). We will use the entropy conservative flux proposed in [10]. To define their numerical flux we need

$$\begin{aligned} (\Delta a)_{j+1/2}&=a_{j+1}-a_j \\ \bar{a}_{j+1/2}&=\frac{1}{2}(a_j+a_{j+1}) \end{aligned}$$

and the logarithmic mean

$$\begin{aligned} a^{ln}_{j+1/2} = \frac{(\Delta a)_{j+1/2}}{(\Delta \log (a))_{j+1/2}}. \end{aligned}$$

The numerical flux is conservative with respect to the (physical) entropy pair:

$$\begin{aligned} U=-\frac{\rho S}{\gamma -1},\quad F=-\frac{\rho q S}{\gamma -1} \end{aligned}$$

where the thermodynamic entropy \(S=\log (p)-\gamma \log (\rho )\). The entropy variables are

$$\begin{aligned} w^T=\left( \frac{\gamma -S}{\gamma -1}-\frac{\rho q^2}{2p}, \frac{\rho q}{p}, -\frac{\rho }{p} \right) . \end{aligned}$$
(2.32)

Then the entropy conservative flux given in [10] is

$$\begin{aligned} \hat{g}_{j+1/2}=&\,(g^1_{j+1/2}, g_{j+1/2}^2,g_{j+1/2}^3)^T,\nonumber \\ g^1_{j+1/2}=&\,\overline{z_2}_{j+1/2}(z_3)^{ln}_{j+1/2}\nonumber \\ g^2_{j+1/2}=&\,\frac{\overline{z_3}_{j+1/2}}{ \overline{z_1}_{j+1/2} }+\frac{\overline{z_2}_{j+1/2}}{ \overline{z_1}_{j+1/2} }g^1_{j+1/2}\\ g^3_{j+1/2}=&\,\frac{1}{2}\frac{\overline{z_2}_{j+1/2}}{ \overline{z_1}_{j+1/2} }\left( \frac{\gamma +1}{\gamma -1} \frac{(z_3)^{ln}_{j+1/2}}{(z_1)^{ln}_{j+1/2}} +g^2_{j+1/2}\right) \nonumber \end{aligned}$$
(2.33)

where

$$\begin{aligned} z=(z_1,z_2,z_3)^T=\sqrt{\frac{\rho }{p}}(1,q,p)^T. \end{aligned}$$

The boundary scheme also requires that \(\hat{\Lambda }_0\) in (2.20) is computed, which in turn requires the Roe averaged eigenvectors of \(\tilde{g}_w=\tilde{B}\) [denoted \(\tilde{R}\) and defined in (2.18)]. However, it is the Roe-averaged eigenvectors of \(\tilde{f}_u=\tilde{A}\) that are well-known with closed form expressions. We denote the eigenvector matrix of \(\tilde{A}\) by \(\tilde{X}\) such that \(\tilde{X}\tilde{\Gamma }\tilde{X}^{-1}=\tilde{A}\) where \(\tilde{\Gamma }\) is the (diagonal) eigenvalue matrix and \(\tilde{A}_0(u_0-u_{\mathfrak{ g }})=f(u_0)-f(\mathfrak{ g })\). (The tilde on a matrix signifies that the matrix is evaluated at a Roe-averaged state.)

It would be convenient if one could use the conservative variables instead of the entropy variables when the boundary flux is computed. In the next proposition, we will show that this can be done and the boundary flux can be calculated as

$$\begin{aligned} \tilde{g}_0=\frac{f(u_0)+f(\mathfrak{ g })}{2}-\frac{|\tilde{A}_0|+|\hat{M}_0|+\hat{M}_0}{2}(u_0-u_{\mathfrak{ g }}) \end{aligned}$$
(2.34)

where

$$\begin{aligned} \hat{M}_0=\tilde{X}_0\hat{\Gamma }_0 \tilde{X}_0^{-1} \end{aligned}$$
(2.35)

and

$$\begin{aligned} \tilde{X}_0^{-1}\left( \hat{g}_0-\frac{f(u_0)+f(u_{\mathfrak{ g }})}{2}\right)&=-\frac{\hat{\Gamma }_0 \tilde{X}_0^{-1} }{2}(u_0-u_{\mathfrak{ g }}). \end{aligned}$$

Proposition 2.9

For the Euler equations (2.31), the boundary flux (2.21) can be expressed as (2.34) where \(\hat{M}_0\) is given in (2.35).

Proof

We begin by stating a few relations. We recall the Roe averaged Jacobian (2.17):

$$\begin{aligned} \tilde{B}_0=\int \limits _{-1/2}^{1/2}g_w(w_{-1/2}(\xi ))\,d\xi \end{aligned}$$

where \(w_{-1/2}(\xi ) = \frac{1}{2}(w_{0}+w_{\mathfrak{ g }})+\xi \Delta w_{-1/2}\) and \(\Delta w_{-1/2}=w_{0}-w_{\mathfrak{ g }}\). Furthermore,

$$\begin{aligned} \tilde{H}_0=\int \limits _{-1/2}^{1/2}u_w(w_{-1/2}(\xi ))\,d\xi . \end{aligned}$$

It should be noted that \(\tilde{B}_0\) is symmetric and \(\tilde{H}_0\) is symmetric positive definite for strictly convex entropies. (Convexity in turn requires \(\rho ,p>0\) in the case of the Euler equations.) Furthermore,

$$\begin{aligned} \tilde{H}_0(w_0-w_{\mathfrak{ g }})=(u_0-u_{\mathfrak{ g }}) \end{aligned}$$

and the following relation holds, \(\tilde{A}_0=\tilde{B}_0\cdot \tilde{H}_0^{-1}\). Multiplying from left by \(\tilde{H}_0^{-1/2}\) and right by \(\tilde{H}_0^{1/2}\) yields

$$\begin{aligned} \tilde{H}_0^{-1/2}\tilde{A}_0\tilde{H}_0^{1/2}=\tilde{H}_0^{-1/2}\tilde{B}_0\tilde{H}_0^{-1/2} \end{aligned}$$

and after diagonalization

$$\begin{aligned} \tilde{H}_0^{-1/2}\tilde{X}_0\tilde{\Gamma }_0 \tilde{X}_0^{-1} \tilde{H}_0^{1/2}=\tilde{H}_0^{-1/2}\tilde{R}_0 \tilde{\Lambda }_0 \tilde{R}_0^T \tilde{H}_0^{-1/2}. \end{aligned}$$

Hence, we have that

$$\begin{aligned} \tilde{H}_0^{-1/2}\tilde{X}_0|\tilde{\Gamma }_0| \tilde{X}_0^{-1} \tilde{H}_0^{1/2}=\tilde{H}_0^{-1/2}\tilde{R}_0 |\tilde{\Lambda }_0| \tilde{R}_0^T \tilde{H}_0^{-1/2}. \end{aligned}$$

such that \(|\tilde{A}_0|=|\tilde{B}_0|\tilde{H}^{-1}_0\). Consequently,

$$\begin{aligned} |\tilde{B}_0|(w_0-w_{\mathfrak{ g }})=|\tilde{B}_0|\tilde{H}_0^{-1}\tilde{H}_0(w_0-w_{\mathfrak{ g }})=|\tilde{A}_0|(u_0-u_{\mathfrak{ g }}). \end{aligned}$$
(2.36)

By a similar argument, we can replace (2.20) by

$$\begin{aligned} \tilde{X}_0^{-1}\left( \hat{g}_0-\frac{g(w_0)+g(w_{\mathfrak{ g }})}{2}\right)&=-\frac{\hat{\Gamma }_0 \tilde{X}_0^{-1} }{2}(u_0-u_{\mathfrak{ g }}) \end{aligned}$$

where the standard Roe averaged eigenvectors are used. In conclusion, we may equivalently compute the boundary flux (2.20) using only the Roe eigenvectors

$$\begin{aligned} \tilde{g}_0=\frac{f(u_0)+f(u_{\mathfrak{ g }})}{2}-\frac{|\tilde{A}_0|+|\hat{M}_0|+\hat{M}_0}{2}(u_0-u_{\mathfrak{ g }}). \end{aligned}$$

\(\square \)

We remark that the boundary flux as defined in (2.21) can be readily used as well by computing the necessary matrices numerically. Proposition 2.9 offers a way to calculate the flux, \(\tilde{g}_0\), directly in conservative variables and with the closed form expressions for the eigensystem of \(\tilde{A}=\tilde{f}_u\).

The boundary conditions proposed in (2.21) and Proposition 2.9 are usually referred to, and used as, far-field (or open) boundary conditions in aerodynamics. However, objects immersed in a fluid interact with the fluid via different boundary conditions. Hence, there is a need to specifically study such boundary conditions and derive bounds on the solution. That is the topic of the next section for the Euler equations.

2.3.1 No-Penetration Wall Boundary Condition

The conventional boundary condition for an Euler wall enforces “no penetration”, i.e., the normal velocity on the wall is set to 0. Here, we study the 1-D Euler equations (2.31) and this condition would amount to setting \(q=0\) at \(x=0\). However, we will not set \(q=0\) in the data vector but instead “mirror” the velocity (which is a fairly standard technique).

Throughout this section we will only consider the solution at the boundary point and therefore suppress the \(0\) index on its components. That is, we write

$$\begin{aligned} u_0=(\rho , \rho q, \mathcal{E })^T. \end{aligned}$$
(2.37)

Since we use weak imposition of the boundary condition, \(q\) need not be 0 and with this notation we define the data vector as

$$\begin{aligned} u_{-q}=(\rho , -\rho q, \mathcal{E })^T. \end{aligned}$$
(2.38)

Note that \(q\) enters the energy \(\mathcal{E }\) as a square and does not affect its sign. Furthermore, the boundary condition \(u_0=u_{-q}\) constitutes a condition on the velocity alone since it is only satisfied if \(q=0\). Hence, this is a consistent way of enforcing the no-penetration condition. Here, we will use the entropy variables as given in [10] in the calculations below. These are derived from the physical entropy \(U=-\rho S / (\gamma -1)\) which yields \(\Psi =m=\rho q\).

Proposition 2.10

Let \(g_{i+1/2}, i>0\) be entropy stable fluxes and and let \(\tilde{g}_0\) be defined as in Proposition 2.9 using the two states \(u_0\) and \(u_{-q}=u_{\mathfrak{ g }}\) given in (2.37) and (2.38). Then (2.9), (2.10) and (2.34) is a consistent discretization of the Euler equations (2.31) subject to a no-penetration boundary condition at the left boundary. Furthermore, the solution is globally entropy stable.

Remark

Note that we define \(\tilde{g}_0\) by using \(u_{-q}\) as \(u_{\mathfrak{ g }}\) in (2.34). We emphasize that in Proposition 2.9 and Theorem 2.6, \(u_{\mathfrak{ g }},w_{\mathfrak{ g }}\) are bounded vectors. Here, \(u_{-q}\) is not a bounded vector and we can not use the previous results.

Proof

The statement of consistency is true by construction since by inserting \(u_0=u_{-q}\) we get \(\tilde{g}_0=f(u_0)\). Furthermore, \(u_0=u_{-q}\) is a statement of \(q=0\) as discussed above.

The non-trivial statement is the global entropy bound. Since \(u_{-q}\) is not a bounded data vector, Theorem 2.6 is not applicable. We must check global stability directly for this case by computing \(\tilde{F}_0\) as defined in (2.13). To this end, we need the entropy variables for the physical entropy given by

$$\begin{aligned} w_0=\left( \frac{\gamma -S}{\gamma -1}-\frac{\rho q^2}{2p}, \frac{\rho q}{p}, -\frac{\rho }{p}\right) ^T. \end{aligned}$$

(See [10]). We calculate

$$\begin{aligned}&\frac{g(w_0)+g(w_{-q})}{2}=\frac{f(u_0)+f(u_{-q})}{2}\\&\quad =\frac{(m,qm+p, q(\mathcal{E }+p))^T+(-m,qm+p, -q(\mathcal{E }+p))^T}{2}=(0,qm+p, 0)^T \end{aligned}$$

where we have used the notation \(m=\rho q\). Next, we compute the entropy conservative flux between the two states using (2.33). For that, we need the arithmetic average, \(\bar{z}\) between the two states \(u_0,u_{\mathfrak{ g }}\). A direct calculation gives:

$$\begin{aligned} \bar{z}=\sqrt{\frac{\rho }{p}}(1,0,p)^T. \end{aligned}$$

Since the second component is 0, we obtain

$$\begin{aligned} \hat{g}_0=(0,p,0)^T. \end{aligned}$$

Next, we calculate \(\hat{M}_0\) as,

$$\begin{aligned} \hat{g}_0-\frac{g(w_0)+g(w_{-q})}{2}=-\frac{\hat{M}_0}{2}(u_0-u_{-q}). \end{aligned}$$

Inserting the particular vectors

$$\begin{aligned} (0,p,0)^T-(0,qm+p, 0)^T=-\frac{\hat{M}_0}{2}(0,2m, 0)^T. \end{aligned}$$

We see immediately that

$$\begin{aligned} \hat{M}_0=\text{ diag }(0,q,0). \end{aligned}$$

However, to compute the \(|\tilde{A}_0|\) matrix, we need the Roe averaged diagonalization matrices. Hence, we need the Roe averaged variables that arise in this particular case. They are:

$$\begin{aligned} \tilde{\rho }= \rho , \quad \tilde{q}=0, \quad \tilde{h}=h \end{aligned}$$

where \(h=\frac{\mathcal{E }+p}{\rho }\) is the enthalpy. The eigenvector matrices are given e.g. in [10]:

$$\begin{aligned} \tilde{X}_0^{-1}&= \left( \begin{array}{ccc} 0 &{} -\frac{1}{2c} &{} -\frac{1}{2h} \\ 1 &{} 0 &{} -\frac{1}{h} \\ 0 &{} \frac{1}{2c} &{} \frac{1}{2h} \end{array} \right) \nonumber \\ \tilde{X}_0&=\left( \begin{array}{ccc} 1 &{} 1&{} 1 \\ -c &{} 0 &{} c \\ h &{} 0 &{} h \end{array}\right) . \end{aligned}$$

Furthermore, \(\tilde{\Gamma }_0=\text{ diag }(-c, 0, c) \) and \(c=\sqrt{\frac{\gamma p}{\rho }}\) is the speed of sound. From this we obtain

$$\begin{aligned} |\tilde{A}_0|=\tilde{X}_0|\tilde{\Gamma }_0|X_0^{-1}= \left( \begin{array}{ccc} 0 &{} 0 &{} 0 \\ 0 &{} c &{} \frac{c^2}{h} \\ 0 &{} 0 &{} 0 \end{array}\right) . \end{aligned}$$

Using these results in (2.34) give

$$\begin{aligned} \tilde{g}_0&=\frac{g(w_0)+g(w_{-q})}{2}-\frac{|\tilde{A}_0|+2\hat{M}_0^+}{2}(u_0-u_{-q}) \\&=(0,qm+p, 0)^T-(0,2q^+m, 0)^T-(0,cm, 0)^T \\&=(0,(q-2q^+)m-cm+p, 0)^T.&\end{aligned}$$

Finally, with \(\Psi _0=\rho q = m\), we calculate

$$\begin{aligned} \tilde{F}_0&=w_0^T\tilde{g}_0-\Psi _0=\frac{m}{p}((q-2q^+)m-cm+p)-m \\&=\frac{m^2}{p} \left( (q-2q^+) - c\right) \le 0. \end{aligned}$$

\(\square \)

Remark

Note, we only use one boundary condition irrespective of inflow, outflow or sub- or supersonic flow and still we are able to bound the entropy. This may seem counter intuitive but is a consequence of our choice of \(u_{-q}\) not being a priori bounded.

2.4 Grid Interfaces

In this section, we derive a stable procedure to link two domains via an interface. We consider, for simplicity, the whole \(x\)-axis and assume that there is a grid interface at \(x=0\). We denote the left and right grid spacing by \(h_L\) and \(h_R\). \(u_i\) with positive/negative indices correspond to approximations in the right/left domain. We introduce \(g^{L,R}_0\) and \(u^{L,R}_0\) as the numerical fluxes and numerical solutions at \(x=0\). (The left and right discretization scheme will have their own approximation at \(x=0\).) The numerical scheme is defined as:

$$\begin{aligned} (u_i)_t+\frac{g_{i+1/2}-g_{i-1/2}}{h_R}&=0, \quad i=1,2,3,\ldots \nonumber \\ (u_0^R)_t+\frac{g_{1/2}-g^R_{0}}{h_R/2}&=0, \\ (u_0^L)_t+\frac{g^L_0-g_{-1/2}}{h_L/2}&=0, \nonumber \\ (u_i)_t+\frac{g_{i+1/2}-g_{i-1/2}}{h_L}&=0, \quad i=-1,-2-,3,\ldots \nonumber \end{aligned}$$
(2.39)

As always, we assume that \(g_{i+1/2}, i\ne 0\) is entropy stable in the sense of Definition 2.1. We multiply the equations in (2.39) respectively by \(h_Rw_i^T\), \(h_R(w_0^R)^T/2\), \(h_L(w_0^L)^T/2\) and \(h_Lw_i^T\), and sum to obtain

$$\begin{aligned}&\sum _{i<0} h_L (U_i)_t+\sum _{i>0} h_R (U_i)_t + \frac{h_L}{2}(U^L_0)_t +\frac{h_R}{2}(U^R_0)_t \\&\quad \le (w^R_0)^Tg^R_0-\Psi ^R_0 -(w^L_0)^Tg^L_0+\Psi ^L_0 =BT. \end{aligned}$$

We require that the numerical fluxes are consistent and for stability that \(BT\) is bounded.

We will need a generalization of Definition 2.1: A numerical flux approximation \(\hat{g}_0(w_1,w_2)\) between any two states, is said to be entropy conservative if \((w_1-w_2)^T\hat{g}_0(w_1,w_2)= \Psi (w_1)-\Psi (w_2)\).

Definition 2.11

The grid interface at \(x=0\) in the scheme (2.39) is said to be entropy stable, if

$$\begin{aligned} (w^R_0)^Tg^R_0-\Psi ^R_0 -(w^L_0)^Tg^L_0+\Psi ^L_0\le 0. \end{aligned}$$
(2.40)

In the case of equality, we say that it is entropy conservative.

Proposition 2.12

Let \(B_0\) be a symmetric positive semi-definite matrix and \(\hat{g}_0(w^L_0,w^R_0)\) denote an entropy conservative flux. Then the scheme (2.39) with

$$\begin{aligned} g^L_0&=\hat{g}_0(w^L_0,w^R_0) +\frac{B_0}{2}(w_0^L-w^R_0)\nonumber \\ g^R_0&=\hat{g}_0(w^L_0,w^R_0) -\frac{B_0}{2}(w_0^R-w_0^L) \end{aligned}$$
(2.41)

is globally entropy stable and with \(B_0=0\), the interface is entropy conservative.

Proof

We begin by checking the statement for \(B_0=0\). Using \(\hat{g}_0=g_0^R=g_0^L\) in \(BT\), we obtain

$$\begin{aligned} BT&=(w^R_0-w_0^L)^T\hat{g}_0 -(\Psi _0^R-\Psi _0^L)=0. \end{aligned}$$
(2.42)

With the additional diffusion and (2.42), we have

$$\begin{aligned} BT&=(w^R_0)^T \left( -\frac{B_0}{2}(w_0^R-w_0^L) \right) -(w^L_0)^T \left( \frac{B_0}{2}(w_0^L-w_0^R)\right) \\&=-(w^R_0-w_0^L)^T \frac{B_0}{2}(w_0^R-w_0^L) \le 0. \end{aligned}$$

\(\square \)

Just as for the interior scheme, the entropy conservative flux is the marginal case for stability. For further damping, which may be necessary if a non-linear wave is crossing the interface, some more diffusion can be added. For instance, one may set \(B_0=|\tilde{B}_0|\) and obtain the Roe scheme. Furthermore, in the linear case \(f=Au\) this choice reduces to the second-order SBP scheme, see [14].

Remark

In [5] grid interfaces for entropy stable WENO schemes are studied and similar interface fluxes are proposed.

Next, we prove that the interface treatment is conservative in the sense of Lax–Wendroff. For this we use the notation \(h=\max (h_L,h_R)\).

Proposition 2.13

Let \(\{u^h_i\}\) be a solution generated by (2.39) and (2.41) with grid sizes \(h_L,h_R\). Assume that \(u^h_i\in L^{\infty }\) and converges almost everywhere as \(h\rightarrow 0\). Then \(\{u^h_i\}\) converges to a weak solution (1.3).

Proof

Let \(\Phi (x)\) be a test function with compact support in space and inject it onto the grid as \(\Phi (x_i,t)=\Phi _i(t)\). Then

$$\begin{aligned} \Phi _i\left( (u_i)_t+\frac{g_{i+1/2}-g_{i-1/2}}{h_R}\right)&=0, \quad i=1,2,3,\ldots \nonumber \\ \frac{1}{2}\Phi _0\left( (u_0^R)_t+\frac{g_{1/2}-g^R_{0}}{h_R/2}\right)&=0,\\ \frac{1}{2}\Phi _0\left( (u_0^L)_t+\frac{g^L_0-g_{-1/2}}{h_L/2}\right)&=0, \nonumber \\ \Phi _i\left( (u_i)_t+\frac{g_{i+1/2}-g_{i-1/2}}{h_L}\right)&=0, \quad i=-1,-2-,3,\ldots \nonumber \end{aligned}$$
(2.43)

Sum all rows

$$\begin{aligned}&\int \limits _0^T \left( \sum _{i\ne 0}\Phi _i(u_i)_t+\frac{1}{2}\Phi _0((u_0^L)_t+(u_0^R)_t)\right. \nonumber \\&\quad - \sum _{i<0} \frac{\Phi _{i+1}-\Phi _i}{h_L}g^L_{i+1/2}- \left. \sum _{i>0} \frac{\Phi _{i+1}-\Phi _i}{h_R}g^R_{i+1/2}+\Phi _0g_{0}^L -\Phi _0g_{0}^R\right) dt=0.\nonumber \end{aligned}$$

From (2.41) we have \(g_0^R=g^L_0\). Let \(u_0(t)=\frac{u^L_0(t)+u^R_0(t)}{2}\). We obtain

$$\begin{aligned}&\sum _i\Phi (0)u_i(0) \\&\quad +\int \limits _0^T\left( -\sum _{i}(\Phi _i)_tu_i- \sum _{i<0} \frac{\Phi _{i+1}-\Phi _i}{h_L}g^L_{i+1/2}+ \sum _{i>0} \frac{\Phi _{i+1}-\Phi _i}{h_R}g^R_{i+1/2}\right) dt=0. \end{aligned}$$

With the assumption of convergence this expression tends to

$$\begin{aligned} \int \limits _{-\infty }^{\infty }\Phi (x,0)u(x,0)\,dx -\int \limits _0^T\int \limits _{-\infty }^{\infty }(\Phi _tu+\Phi _xf)=0. \end{aligned}$$
(2.44)

\(\square \)

3 Numerical Simulations

To demonstrate the robustness of the proposed boundary schemes, we have run a number of test cases for the Euler equations. We have used the version of the scheme enforcing the boundary conditions using conservative variables and standard expressions for the Roe-averaged Jacobian, i.e., (2.9), (2.10), (2.34) with the straightforward extension to allow a boundary on the right. The scheme is discretized with the standard 4th-order Runge-Kutta scheme in time, so as to reduce the errors from time integration and highlight the properties of the spatial discretization.

Up until now we have mainly discussed the boundary schemes and assumed that an entropy stable flux is used in (2.9). To carry out the computations we must choose a suitable flux. The least diffusive choice would be an entropy conservative scheme such as (2.33). However, an entropy conservative scheme will lead to large oscillations around shocks [22]. Hence, we will add more diffusion where necessary and use the following numerical flux,

$$\begin{aligned} g_{i+1/2}=\hat{g}_{i+1/2}-\frac{\kappa _{i+1/2}|\tilde{A}_{i+1/2}|}{2}(u_{i+1}-u_i) \end{aligned}$$
(3.1)

where \(\hat{g}_{i+1/2}\) is calculated using (2.33). The extra diffusion, \(|\tilde{A}_{i+1/2}|\), is the standard Roe diffusion (without entropy fix since that is redundant with the use of \(\hat{g}_{i+1/2}\)). However, in smooth regions it is unnecessary to add the Roe diffusion and the scalar grid function \(\kappa _{i+1/2}\in [0,1]\) will localize the addition of diffusion to regions with entropy production. \(\kappa _{i+1/2}\) is obtained as follows. Consider the entropy stability condition

$$\begin{aligned} (w_{i+1}-w_i)^Tg_{i+1/2}\le (\Psi _{i+1}-\Psi _i). \end{aligned}$$
(3.2)

If we plug in (3.1) it will be satisfied even if \(|\tilde{A}_0|\equiv 0\) so it will not tell us where entropy might be produced. However, we can equivalently write the flux (3.1) as

$$\begin{aligned} g_{i+1/2}=\frac{f_{i+1}+f_i}{2}-\frac{\hat{M}_{i+1/2}+\kappa _{i+1/2}|\tilde{A}_{i+1/2}|}{2}(u_{i+1}-u_i). \end{aligned}$$
(3.3)

By setting the last term in (3.3) to 0 we can monitor the entropy production of the non-diffusive central scheme. We calculate

$$\begin{aligned} \xi _{i+1/2}=(w_{i+1}-w_i)^T\left( \frac{f_{i+1}+f_i}{2}\right) - (\Psi _{i+1}-\Psi _i) \end{aligned}$$
(3.4)
$$\begin{aligned} \text{ If } \quad \xi _{i+1/2}>0\quad \text{ then } \quad \eta _{i+1/2}=1\quad \text{ else }\quad \eta _{i+1/2}=0. \end{aligned}$$

The value of \(\eta \) is binary and we will smoothen the behavior somewhat by a simple averaging.

$$\begin{aligned} \text{ If } \quad \eta _{i+1/2}=0, \quad \text{ then } \quad \kappa _{i+1/2}=\frac{\eta _{i+3/2}+\eta _{i-1/2}}{2}, \quad \text{ else }\quad \kappa _{i+1/2}=\eta _{i+1/2}. \end{aligned}$$
(3.5)

(At the boundary points we use one-sided averages.) Again, we stress that none of these choices affect the stability proofs. Furthermore, we refer [20] for a proof that (3.1) generates a second-order scheme for smooth solutions.

For all the three boundary cases, far-field, wall and interface, the boundary flux is computed in exactly the same way. The only difference is the data vector that is fed to the routine. Either it is given as a bounded vector function (we use \(\mathfrak{ g }_{l,r}(t)=u^0(x_{l,r})\)), or it is the solution vector with a negative velocity, or it is the solution vector at the corresponding block in the neighboring grid block.

3.1 Shock Entropy Wave Interaction

The first example was proposed in [18]. It is an entropy wave interacting with a strong shock. The domain is \(-5 \le x \le 5\) and the initial conditions given by

$$\begin{aligned} (\rho , q, P)&= (3.857143, 2.629369, 10.33333) \quad \text{ for } \quad x < -4,\nonumber \\ (\rho ,q,P)&=(1+\epsilon \sin (5x),0,1) \quad \text{ for } \quad x\ge -4, \end{aligned}$$
(3.6)

with \(\epsilon = 0.2\). Here, we use \(\mathfrak{ g }_{l}(t)=u^0(-5)\) and \(\mathfrak{ g }_{r}(t)=u^0(5)\). In the literature, the solution at \(T=1.8\) is usually reported and we display that case in Fig. 1 with \(800\) and \(3000\) grid points in space. The performance of the first/second-order scheme is as expected and comparable with similar schemes.

Fig. 1
figure 1

Plots of \(\rho \) approximation at \(T=1.8\). a 800 grid points, b 3000 grid points

In this work we are interested in the performance of the boundary schemes and therefore we run the scheme with \(400\) grid points beyond \(T=1.8\) until the strong shock wave reaches and passes through the boundary. In Fig. 2 the \(\rho \)-solution is depicted at \(T=2.5\), just before the shock reaches the boundary, and at \(T=2.8\) when the shock has passed through the boundary. The scheme is stable just as predicted by the analysis.

3.2 Sod’s Shock Tube

The next set of initial conditions was proposed in [19] and is given by

$$\begin{aligned} (\rho ,q,P)&= (1,0,1)&x \le 0, \\ (\rho ,q,P)&= (0.125,0,0.1)&x \ge 0, \end{aligned}$$

on the domain \(-5 \le x \le 5\). The initial jump will develop into a rarefaction wave, a shock and a contact discontinuity. This example is often presented at \(T=2.0\) which is included in Figs. 3 and 4 computed with 100 and 200 grid points, respectively. Furthermore, we continue the simulations and show solutions at \(T=4.0\) and note that the shock has passed through the boundary without any stability problems.

Fig. 2
figure 2

Plots of \(\rho \) approximation with \(400\) grid points. a \(T = 1.8\), b \(T = 2.5\), c \(T = 2.8\)

Fig. 3
figure 3

Plots of \(\rho \) approximation with \(100\) grid points. a \(\rho \) at \(T = 2.0\), b \(\rho \) at \(T = 4.0\)

Fig. 4
figure 4

Plots of \(\rho \) approximation with \(200\) grid points. a \(\rho \) at \(T = 2.0\), b \(\rho \) at \(T = 4.0\)

3.3 Shock Interacting with Wall

This test case can be found in [23] and it is stated on the domain \(-5 \le x \le 5\). It is originally a test case for the interaction of strong shock waves but we use it since it is defined with wall boundary conditions with which strong shocks will interact. The initial data are given by:

$$\begin{aligned} (\rho ,q,P)&= (1,0,1000)&0 < x < 0.1,\\ (\rho ,q,P)&= (1,0,0.01)&0.1 < x < 0.9,\\ (\rho ,q,P)&= (1,0,100)&0.9 < x < 1.0. \end{aligned}$$

The data vectors at the walls are constructed as described in Sect. 2.3.1 by mirroring the velocity. The case is run with \(400\) grid points in space and the momentum, \(\rho q\) is depicted at \(T=0.05\), \(T=0.38\), \(T=0.5\) and \(T=0.6\) in Figs. 5 and 6. At \(T=0.5\) the shock wave has just bounced off the right boundary and is moving to the left. This is a severe test for stability and the scheme copes with the wall-shock interaction without any difficulties.

Fig. 5
figure 5

Plots of \(\rho q\) approximation with \(400\) grid points. a \(\rho q\) at \(T = 0.05\), b \(\rho q\) at \(T = 0.38\)

Fig. 6
figure 6

Plots of \(\rho q\) approximation with \(400\) grid points. a \(\rho q\) at \(T = 0.5\), b \(\rho q\) at \(T = 0.6\)

3.4 Shock Passing a Grid Interface

In this section, we will demonstrate the robustness of the interface treatment. We will limit ourselves to the shock-entropy wave test case. In Fig. 7, two computations, at time \(T=1.8\), with different grid sizes in the left and right domain are displayed. (Denoted as L and R in the captions.) The computations are stable, despite very different grid sizes. The scheme is more diffusive in the less resolved region, which is expected.

Fig. 7
figure 7

Plots of \(\rho \) approximation at \(T=1.8\). a L: 200 R: 80 (grid points), b L: 80 R: 200 (grid points)

Next, we will take a closer look at the effect of the interface. We compute the solution with 200 grid points in both the left and right domain and compare it with the corresponding 399-point solution without an interface. We plot the solution and the pointwise difference in the \(\rho \) variable, Fig. 8. We see that there is a significant difference between the 1 and 2 domain solutions. The peak in the figure, indicates a one cell difference in the shock position compared with the non-interface computation. However, we stress that both approximations are conservative in the sense of Lax–Wendroff and upon convergence, they both will approximate a weak solution. This does not mean that the pointwise difference will vanish as \(h\rightarrow 0\) since convergence can not be expected in \(L^{\infty }\).

Fig. 8
figure 8

Plots of \(\rho \) approximation at \(T=1.8\). a L: 200 R: 200 (grid points), b pointwise difference

3.5 A Fourth-Order Scheme

In [20] an entropy stable fourth-order scheme was developed. As in [17] it was done for a homogeneous entropy and not the physical entropy (used in this article). However, with minor changes it can be made entropy stable, in the interior and at the boundaries, with respect to the physical entropy. There are two modifications that need to be done to make it formally entropy stable. The first is to change the boundary flux to the one derived in this article. The second is to change the shock locator. In [20], the shock locator is a refined version of the one described above, but based on the homogeneous entropy. To be formally entropy stable, we would need to change that to monitor the physical entropy. However, the focus in this paper is boundary conditions and deriving a new shock locator is beyond our scope. We will postpone that to a future article and consequently, we will not make that modification but use the same shock locator as in [20] and only demonstrate the robustness of the boundary conditions.

Remark

If we add diffusion everywhere, i.e., not use a shock limiter, we obtain a scheme that is formally entropy stable. However, it would be very diffusive which is why we keep the shock locator. Less diffusion makes a more severe test of the boundary conditions. We merely state that the more diffusive approach also works and is, of course, very robust.

Before presenting the computational results, we will briefly outline how to adapt the scheme in [20] to use the boundary procedures in developed in this article. The scheme (termed dual-diffusion in [20] due to the two diffusion coefficients) is defined (for notational convenience stated with only one boundary) as

$$\begin{aligned} (u_0)_t+\frac{g_{1/2}^{4th}-\tilde{g}_0^{4th}}{p_0h}&= \mathbb{S }\\ (u_j)_t+\frac{g_{j+1/2}^{4th}-g_{j-1/2}^{4th}}{p_jh}&= 0\nonumber \end{aligned}$$
(3.7)

where

$$\begin{aligned} g^{4th}_{j+1/2}&=-\frac{1}{12}(f_{j+2}+f_j+Q_{j+1}(w_{j+2}-w_j)) \\&\quad +\frac{8}{12}(f_{j+1}+f_j)-Q_{j+1/2}(w_{j+1}-w_j)\nonumber \\&\quad -\frac{1}{12}(f_{j+1}+f_{j-1}+Q_j(w_{j+1}-w_{j-1}))\nonumber \end{aligned}$$
(3.8)

and \(p_i>0\) are weights associated with the discrete norm. Close to the boundary (3.8) is changed to one sided approximations (details found in [20]). The boundary flux is \(\tilde{g}_0^{4th}=f_0\) and \(\mathbb{S }=\frac{-1}{p_0h}\mathbf{A}_0^+(w_0-w_{\mathfrak{ g }})\) where \(\mathbf{A}_0\) is the flux Jacobian at \(w_0\) (i.e., not the Roe average.) Here we make the modification of the scheme. We define

$$\begin{aligned} \mathbb{S }= \frac{-1}{p_0h}(\tilde{B}_0^++\hat{D}_0+|\hat{D}_0|)(w_0-w_{\mathfrak{ g }}) \end{aligned}$$
(3.9)

where \(\tilde{B}_0\) is, as before, the Roe averaged Jacobian between the states \(w_0\) and \(w_{\mathfrak{ g }}\). With this modification we can rewrite (3.7) as

$$\begin{aligned} (u_0)_t+\frac{g_{1/2}^{4th}-\tilde{g}_0^{4th}}{p_0h}&=0\nonumber \\ \tilde{g}_0^{4th}&= \frac{f_0+f_{\mathfrak{ g }}}{2}-\frac{1}{2}(|\tilde{B}_0|+\hat{D}_0+|\hat{D}_0|)(w_0-w_{\mathfrak{ g }}). \end{aligned}$$
(3.10)

In [20] (where definitions of the numerical entropy fluxes can be found), it was proven that if the diffusion coefficients \(Q_{j},Q_{j+1/2}\) are chosen to be larger than the entropy conservative coefficient, then the scheme satisfies the following inequalities

$$\begin{aligned} hp_0(U_0)_t+F_{1/2}^{4th}-F_0^{4th}&\le hp_0w_0^T\mathbb{S }\\ hp_j(U_j)_t+F_{j+1/2}^{4th}-F_{j-1/2}^{4th}&\le 0. \end{aligned}$$

Summing over \(j\) yields \(\sum _{j\ge 0 }hp_j(U_j)_t-F_0^{4th}\le hp_0w_0^T\mathbb{S }\) where \(F_0^{4th}=w_0^Tf_0-\Psi _0\). Using (3.10) and (3.9), it is straightforward to show that

$$\begin{aligned} F_0^{4th}+ hp_0w_0^T\mathbb{S }=w_0\tilde{g}_0^{4th}-\Psi _0 \end{aligned}$$
(3.11)

which has been proven to have an upper bound earlier in this paper. Hence, the fourth-order scheme with \(\mathbb{S }\) given by (3.9) is globally entropy stable. Using this scheme, we have computed the shock-entropy wave example. The results are shown in Fig. 9. The solution at \(T=1.8\) shows that this scheme is far superior its second-order counter part in resolving the rapid oscillations trailing the shock. Furthermore, it lets the shock through the boundary without any stability issues.

Fig. 9
figure 9

Plots of \(\rho \) approximation with \(200\) grid points. a T = 1.8, b T = 2.8

4 Concluding Remarks

In this article, we have derived entropy stable boundary schemes for the Euler equations. The boundary schemes are consistent with characteristic far-field conditions and we also propose a way to enforce the no-penetration wall boundary condition. Furthermore, we have derived schemes for connecting two grid domains in a conservative and entropy stable manner.

Numerical computations with a second-order scheme show that the boundary schemes are robust even when shocks impinge on the boundaries. Furthermore, we briefly outline how to modify a fourth-order entropy stable scheme found in [20] to use the boundary schemes proposed in this article. With these changes, we demonstrate the robustness of the fourth-order scheme for the shock-entropy wave example.

Throughout this article, we have considered entropy stability with respect to the physical entropy. Because of this, the boundary conditions proposed here are very different from the boundary conditions proposed in [17]. In the latter, the matrix \(\mathbf{A_0}\) used in (3.7) is a function of \(w_0\), i.e., the notion of inflow and outflow is determined by the interior solution and not data. Here, on the other hand, we use the Roe-average and hence, data affects the defn of in- and outflow. Which one, if any of the two, that is correct is unclear since existence and uniqueness results are lacking. If entropy arguments are to be used to obtain estimates for the Navier–Stokes equations, it appears that we must use the physical entropy as in the current paper. However, the derivation and further discussion of boundary conditions for the Navier–Stokes equations will be the topic of a forthcoming paper.