1 Introduction

The equations of relativistic hydrodynamics are used to model astrophysical flows when the fluid is moving with speed comparable to the speed of light, or the flow is under the influence of large gravitational potentials such that relativistic effects cannot be ignored. Some examples are gamma-ray burst, relativistic jets from Galactic sources, core-collapse supernovae and extragalactic jets from active Galactic nuclei (see [5, 6, 20, 27, 39]).

In this article, we consider the equations of special relativistic hydrodynamics (RHD henceforth) with the ideal equation of state. The system of equations is hyperbolic conservation laws. So, the solutions of the system can exhibit discontinuities, even for the smooth initial data (see [15]). Therefore, we consider weak solutions of the systems which are characterized by the Rankine–Hugoniot jump condition across the discontinuities. However, the weak solutions of the system can be non-unique; hence, an additional criterion in the form of entropy inequality is imposed to choose the physically appropriate solution. However, more recently, it has been shown that even the entropy-stable solutions are not unique (see [9]). Still, entropy stability is one of the few nonlinear stability estimates available for the solutions.

Due to nonlinearity in the flux, the analytic study of the equations is difficult. Hence, we rely on computational methods for various applications. The computational methods for hyperbolic conservation laws are often based on the finite volume (or finite difference) methods. These methods are based on evolving the cell averages of the state variables by approximating the numerical fluxes across the cell interfaces. Higher order is achieved by reconstructing the solution at the cell edges, using TVD-, ENO- and WENO-based approximations (see [13, 17, 19, 32]). To prove the entropy stability of these schemes is, however, highly non-trivial, especially for the higher-order schemes.

For the RHD equations, one of the first attempts to solve the system computationally was made by [35]. Using an artificial viscosity technique to capture the shock solution, the author designed a Eulerian explicit finite difference scheme. However, the approach did not capture the flows accurately in the cases where the numerical value of the Lorentz factor was larger than 2 (see [7]). Another approach based on the van Leer schemes is presented in[11]. Schemes based on the piece-wise parabolic reconstruction methods are designed in [2, 22, 26]. In [10], authors designed a numerical scheme based on the TVD reconstruction. In [25], authors have designed an HLLC solver for the equations. More recently, in [36], authors have used the WENO reconstruction to obtain a high-order accurate physical-constraints-preserving finite difference scheme for RHD. Also, in [37], a physical-constraints-preserving DG scheme is designed. A comprehensive overview of the numerical schemes for RHD equations is presented in [14].

In this article, we aim to design higher-order entropy-stable numerical schemes for the RHD equations. We proceed as follows:

  • First, we present entropy framework for the RHD equations at the continuous level.

  • Following the work of [8], we then construct a second-order entropy conservative numerical flux. This can then be made arbitrary higher even-order accurate by following [21].

  • We then design an appropriate higher-order entropy diffusion operator by following [12]. This is based on the higher-order sign-preserving reconstruction of the scaled entropy variables. The scaled entropy variables are obtained by deriving the expressions for the entropy scaled right eigenvectors (see Appendix B).

  • Combining entropy conservative flux with the entropy diffusion operator, we get entropy-stable numerical schemes for the RHD equations.

The rest of the paper is organized as follows. In Sect. 2, we introduce the relativistic hydrodynamics equations and entropy framework. In the next section (Sect. 3), we present entropy-stable numerical schemes for the RHD equations. This includes the derivation of the entropy conservative numerical flux and the construction of the entropy diffusion operator. In Sect. 4, we present numerical experiments in one and two dimensions.

2 Equations of relativistic hydrodynamics

For an ideal fluid, the special relativistic hydrodynamics equations, in the laboratory frame of reference, can be written as a system of conservation laws for mass density, momentum density and the total energy density in the following form (see [3, 20, 33]):

$$\begin{aligned} \begin{aligned}&\frac{\partial D}{\partial t} + \nabla \cdot {(D \varvec{u})} = 0,\\&\frac{\partial \varvec{m}}{\partial t} + \nabla \cdot (\varvec{m u} + p \varvec{I}) = 0,\\&\frac{\partial {E}}{\partial t} + \nabla \cdot \varvec{m} =0, \end{aligned} \end{aligned}$$
(1)

where the conserved quantities D, \(\varvec{m}\) and E are the fluid mass density, momentum density and the total energy density, respectively. The primitive quantities \(\rho \), \(\varvec{u}\) and p are the proper mass density, fluid velocity vector and isotropic gas pressure, respectively. The vector of conservative variables, \(\mathbf {U} = (D, \varvec{m}, E)\), and primitive variables, \(\mathbf {w} = (\rho , \varvec{u}, p)\), are connected via relations

$$\begin{aligned} D = \Gamma \rho , \ \varvec{m}=\rho h \Gamma ^2 \varvec{u}, \ E=\rho h \Gamma ^2 - p. \end{aligned}$$

Here, h is the special enthalpy and \(\Gamma \) is the Lorentz factor, given by,

$$\begin{aligned} \Gamma = \frac{1}{\sqrt{1-\varvec{u}^2}}, \text { with } \ |\varvec{u}| < 1. \end{aligned}$$
(2)

A key difficulty for the numerical schemes is the need to convert conservative variables to primitive variables and vice versa. In the case of RHD equations, for deriving velocity from the conservative variables, we need to solve a nonlinear equation. We describe the process in Appendix A.

In conservative variables \(\mathbf {U}\), the RHD system (1), for the two-dimensional case, can be written in the conservative form as,

$$\begin{aligned} \frac{\partial \mathbf {U}}{\partial t}+\frac{\partial \mathbf {f}^x}{\partial x} + \frac{\partial \mathbf {f}^y}{\partial y}=0. \end{aligned}$$
(3)

Here, the fluxes are given by,

$$\begin{aligned} \mathbf {f}^x=\begin{bmatrix} D u_x \\ m_x u_x+p \\ m_y u_x \\ m_z u_x \\ m_x \end{bmatrix}, \ \text { and } \mathbf {f}^y=\begin{bmatrix} D u_y \\ m_x u_y \\ m_y u_y+p \\ m_z u_y \\ m_y \end{bmatrix}. \end{aligned}$$

The system is closed using the ideal equation of state (EOS henceforth), for which the special enthalpy h is given by

$$\begin{aligned} h=1+ \frac{\gamma }{\gamma - 1} \frac{p}{\rho }, \end{aligned}$$
(4)

where \(\gamma \) is the specific heat ratio. For the solution to be physically meaningful, we need to have positive density, positive pressure and magnitude of velocity to be less than the speed of light, which is assumed to be unity. Therefore, we consider the following solution set of physical states,

$$\begin{aligned} \Omega \,=\left\{ {\mathbf {U}}=(D, \varvec{m}, {E}), \ \rho>0,\ p >0, \ |\varvec{u}| <1\right\} . \end{aligned}$$

Following [3, 29], we have the following result:

Lemma 2.1

The system (3) is hyperbolic for the states \(\mathbf {U}\) in \(\Omega \) with real eigenvalues and a complete set of eigenvectors.

The eigenvalues and a complete set of right eigenvectors are presented in Appendix B. We now introduce entropy function \(\mathcal {U}\) and associated entropy flux \(\mathcal {F}^i\) for the system (3) as follows:

$$\begin{aligned} \mathcal {U}=-\frac{\rho \Gamma s}{\gamma -1} \text { and } \mathcal {F}^i=-\frac{\rho \Gamma s u_i}{\gamma -1}, \ i=x,y; \end{aligned}$$
(5)

where \(s = \ln (p\rho ^{-\gamma })\). The pair \((\mathcal {U},\mathcal {F}^i)\), \(\mathcal {U},\mathcal {F}^i\) as in (5), is called an entropy–entropy flux pair. We now have the following result:

Proposition 2.2

The smooth solutions of (3) satisfy the entropy equality,

$$\begin{aligned} \partial _ts+u_x \partial _xs=0. \end{aligned}$$
(6)

As a corollary, for any smooth function H(s), we have,

$$\begin{aligned} \partial _t(\rho \Gamma H(s))+ \partial _x(\rho \Gamma u_x H(s))=0. \end{aligned}$$
(7)

In particular, smooth solutions will satisfy entropy equality,

$$\begin{aligned} \partial _t\mathcal {U}+ \partial _x\mathcal {F}^x=0. \end{aligned}$$
(8)

To prove Proposition 2.2, we will first prove the following two lemmas:

Lemma 2.3

The smooth solutions of (3) satisfy the identity

$$\begin{aligned} \frac{1}{\Gamma ^2} \partial _t p= \partial _t p +u_x \partial _x p +\left( \frac{\rho h}{\Gamma } \right) (\partial _t \Gamma +\partial _x {(\Gamma u_x)})- \rho h \partial _x u_x. \end{aligned}$$
(9)

Proof

For the one-dimensional case, the RHD system (3) simplifies to the following set of three equations

$$\begin{aligned}&\partial _t(\rho \Gamma ) + \partial _x (\rho \Gamma u_x) = 0, \end{aligned}$$
(10)
$$\begin{aligned}&\partial _t(\rho h \Gamma ^2 u_x) + \partial _x (\rho h \Gamma ^2 u_x^2) + \partial _x p = 0, \end{aligned}$$
(11)
$$\begin{aligned}&\partial _t (\rho h \Gamma ^2) - \partial _t (p) + \partial _x (\rho h \Gamma ^2 u_x) = 0. \end{aligned}$$
(12)

Using the product rule, Eq. (11) simplifies to

$$\begin{aligned} \partial _t(\rho h \Gamma ^2 u_x) +( \rho h \Gamma ^2 u_x) \partial _x u_x + u_x \partial _x ( \rho h \Gamma ^2 u_x) + \partial _x p = 0. \end{aligned}$$

Now, substituting the value of \(\partial _x ( \rho h \Gamma ^2 u_x)\) from Eq. (12) to get:

$$\begin{aligned} \partial _t(\rho h \Gamma ^2 u_x) +( \rho h \Gamma ^2 u_x) \partial _x u_x + u_x \partial _t p - u_x \partial _t (\rho h \Gamma ^2) + \partial _x p = 0. \end{aligned}$$

Using the product rule, this simplifies to

$$\begin{aligned} (\rho h \Gamma ^2) \partial _t u_x +( \rho h \Gamma ^2 u_x) \partial _x u_x + u_x \partial _t p + \partial _x p= 0. \end{aligned}$$

Multiplying this with \(u_x\) leads to,

$$\begin{aligned} (\rho h \Gamma ^2 u_x)(\partial _t u_x + u_x \partial _x u_x)+ u_x^2 \partial _t p + u_x \partial _x p = 0. \end{aligned}$$
(13)

Note that \(\Gamma ^2 = \frac{1}{1-u_x^2} \); thus, we get

$$\begin{aligned} \partial _t \Gamma = \Gamma ^3 u_x \partial _t u_x \text { and} \ \partial _x \Gamma = \Gamma ^3 u_x \partial _t u_x. \end{aligned}$$
(14)

Substituting (14), along with the value of \(u_x^2\) (in terms of \(\Gamma \)), in Eq. (13) results in the identity (9). \(\square \)

Lemma 2.4

The smooth solutions of the system (3) satisfy the equation

$$\begin{aligned} (\partial _t p +u_x \partial _x p )+\frac{p \gamma }{\Gamma }(\partial _t \Gamma +\partial _x {(\Gamma u_x)}) = 0. \end{aligned}$$
(15)

Proof

Applying product rule on Eq. (12), we get

$$\begin{aligned} \partial _t p = (\partial _t \Gamma +\partial _x {(\Gamma u_x)})(\rho h \Gamma ) + \Gamma \partial _t {(\rho h \Gamma )} + \Gamma u_x \partial _x {(\rho h \Gamma )}. \end{aligned}$$

Using Eq. (10), we obtain,

$$\begin{aligned} \begin{aligned} \partial _t p&= (\partial _t \Gamma +\partial _x {(\Gamma u_x)})(\rho \Gamma ) + (\partial _t \Gamma +\partial _x {(\Gamma u_x)})\frac{\gamma }{\gamma -1}p \Gamma - \Gamma \partial _x {(\rho u_x \Gamma )}\\&\quad + \Gamma \left( \frac{\gamma }{\gamma -1} \right) \partial _t {(p \Gamma )} + \Gamma u_x \partial _x {(\rho \Gamma )} + \Gamma u_x \left( \frac{\gamma }{\gamma -1} \right) \partial _x {(p \Gamma )}. \end{aligned} \end{aligned}$$

Using the product rule, we get,

$$\begin{aligned} \begin{aligned} \partial _t p =\,&(\partial _t \Gamma +\partial _x {(\Gamma u_x)})(\rho \Gamma ) + 2(\partial _t \Gamma +\partial _x {(\Gamma u_x)})\frac{\gamma }{\gamma -1}p \Gamma + \left( \frac{\gamma }{\gamma -1} \right) \Gamma ^2 \partial _t p - \rho \Gamma ^2 \partial _x u_x\\&+ \left( \frac{\gamma }{\gamma -1} \right) u_x \Gamma ^2 \partial _x p - \left( \frac{\gamma }{\gamma -1} \right) p \Gamma ^2 \partial _x u_x. \end{aligned} \end{aligned}$$
(16)

Multiplying both sides of Eq. (16) by \(\left( \frac{\gamma -1}{\Gamma ^2 \gamma } \right) \) results in,

$$\begin{aligned} \partial _t p+ u_x \partial _x p =\frac{\gamma -1}{\Gamma ^2 \gamma } \partial _t p -(\partial _t \Gamma +\partial _x {(\Gamma u_x)})\frac{\rho }{\Gamma }\frac{\gamma -1}{\gamma } -2(\partial _t \Gamma +\partial _x {(\Gamma u_x)})\frac{p}{\Gamma } + \rho \frac{\gamma -1}{\gamma } \partial _x u_x +p\partial _x u_x. \end{aligned}$$

Substituting the value of \(\frac{1}{\Gamma ^2} \partial _t p\), from Eq. (9), results in the identity

$$\begin{aligned} (\partial _t p +u_x \partial _x p ) + \frac{p \gamma }{\Gamma }(\partial _t \Gamma +\partial _x {(\Gamma u_x)})=0. \end{aligned}$$

\(\square \)

Proof of Proposition (2.2)

Recall that \(s = \ln (p\rho ^{-\gamma })\), therefore

$$\begin{aligned} \partial _t s= \frac{1}{p} \partial _t p - \frac{\gamma }{\rho } \partial _t \rho \text { and } \partial _x s= \frac{1}{p} \partial _x p - \frac{\gamma }{\rho } \partial _x \rho . \end{aligned}$$
(17)

We simplify Eq. (10) using the product rule to obtain

$$\begin{aligned} \frac{1}{\rho } (\partial _t \rho +u_x \partial _x \rho ) = -\frac{1}{\Gamma } (\partial _t \Gamma +\partial _x {(\Gamma u_x)}). \end{aligned}$$
(18)

Combining Eqs. (15) and (18), we get

$$\begin{aligned} \frac{1}{p} (\partial _t p + u_x \partial _x p) -\frac{\gamma }{\rho } (\partial _t \rho + u_x \partial _x \rho )=0, \end{aligned}$$

which further simplifies (using Eq. (17)) to \(\partial _t s +u_x \partial _x s=0\). Equation (7) follows immediately using (6). We substitute \(H(s)=\frac{-s}{\gamma -1}\) in (7) to get the equality (8). \(\square \)

Remark 2.1

The entropy equality (8) gives rise to the entropy inequality

$$\begin{aligned} \partial _t\mathcal {U}+ \partial _x\mathcal {F}^x \le 0 \end{aligned}$$
(19)

for the non-smooth solutions. Also, this estimate can be extended to the two-dimensional case.

In the next section, we will design numerical schemes which will satisfy the entropy inequality (19) at the semi-discrete level.

3 Entropy-stable numerical schemes

In this section, we present the semi-discrete schemes for the two-dimensional RHD equations. Let us consider the two-dimensional domain \(D=(x_a,x_b) \times (y_a,y_b)\), which is discretized using uniform mesh of size \(\Delta x \times \Delta y\) where \(\Delta x= x_{i+1}-x_i\) and \(\Delta y= y_{j+1}-y_j\), with \(0 \le i \le N_x\) and \(0 \le j \le N_y\). We define points \(x_i=x_a+i \Delta x \) and \(y_j=y_a+j \Delta y \). The cell centres are defined as \(x_{i+1/2}:= \frac{x_i+x_{i+1}}{2}\) and \(y_{j+1/2}:= \frac{y_j+y_{j+1}}{2}\), and the domain D is divided into cells \(I_{ij}.\) Then, a general semi-discrete finite difference scheme has the following form:

$$\begin{aligned} \frac{d }{dt}\mathbf {U}_{ij}(t) + \frac{1}{\Delta x} \left( \mathbf {F}_{i+\frac{1}{2},j}^x(t)-\mathbf {F}_{i-\frac{1}{2},j}^x(t)\right) + \frac{1}{\Delta y} \left( \mathbf {F}_{i,j+\frac{1}{2}}^y(t)-\mathbf {F}_{i,j-\frac{1}{2}}^y(t)\right) =0, \end{aligned}$$
(20)

where \(\mathbf {F}_{i+\frac{1}{2},j}^x\) and \(\mathbf {F}_{i,j+\frac{1}{2}}^y\) are the numerical fluxes consistent with the continuous fluxes \(\mathbf {f}^x\) and \(\mathbf {f}^y\), respectively. Let us introduce notation \(\llbracket {v}\rrbracket \) for the jump and \(\bar{v}\) for the arithmetic average of a scalar v over the cell boundaries of the cell \(I_{ij}\) in the following way:

$$\begin{aligned} \llbracket v\rrbracket _{i+\frac{1}{2},j}= & {} v_{i+1,j}-v_{i,j}, \ \bar{v}_{i+\frac{1}{2},j}=\frac{1}{2}(v_{i+1,j}+v_{i,j}),\\ \llbracket v\rrbracket _{i,j+\frac{1}{2}}= & {} v_{i,j+1}-v_{i,j}, \ \bar{v}_{i,j+\frac{1}{2}}=\frac{1}{2}(v_{i,j+1}+v_{i,j}). \end{aligned}$$

3.1 Entropy conservative schemes

In the first step, to obtain an entropy-stable scheme, we construct an entropy conservative scheme of arbitrary higher even-order. We say a scheme is entropy conservative scheme if the computed solution satisfies a semi-discrete entropy equality,

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} \mathcal {U}(\mathbf {U}_{ij}) +\frac{1}{\Delta x} \left( \tilde{\mathcal {F}}_{i+\frac{1}{2},j}^x - \tilde{\mathcal {F}}_{i-\frac{1}{2},j}^x\right) +\frac{1}{\Delta y}\left( \tilde{\mathcal {F}}_{i,j+\frac{1}{2}}^y - \tilde{\mathcal {F}}_{i,j-\frac{1}{2}}^y\right) = 0 \end{aligned}$$

for some numerical entropy fluxes \(\tilde{\mathcal {F}}^x\) and \(\tilde{\mathcal {F}}^y\) consistent with the fluxes \(\mathcal {F}^x\) and \({\mathcal {F}}^y\), respectively.

Let us introduce the entropy variables, \(\mathbf {v}(\mathbf {U})={\partial _{\mathbf {U}} \mathcal {U}} \), and the entropy potentials, \(\psi ^\alpha (\mathbf {U})=\mathbf {v}^\top (\mathbf {U}) \cdot \mathbf {f}^\alpha (\mathbf {U})-\mathcal {F}^\alpha (\mathbf {U}) \) for \(\alpha \in \{x,y\}\). A simple calculation results in

$$\begin{aligned} \mathbf {v}= \begin{pmatrix} \frac{\gamma - s}{\gamma -1} +\beta \\ u_x \Gamma \beta \\ u_y \Gamma \beta \\ - \Gamma \beta \end{pmatrix}, \ \text {and } {\psi }^\alpha =\rho \Gamma u_\alpha \ \text { for } \alpha \in \{x,y\}, \beta =\frac{\rho }{p}. \end{aligned}$$

We now recall the following theorem due to [34], which provides a sufficient condition for the consistent fluxes, \(\tilde{\mathbf {F}}^x\) and \(\tilde{\mathbf {F}}^y\), to be entropy conservative.

Theorem 3.1

[34] Let \(\tilde{\mathbf {F}}^x\) and \(\tilde{\mathbf {F}}^y\) be the consistent numerical fluxes, which satisfies,

$$\begin{aligned} \llbracket \mathbf {v} \rrbracket ^{T}_{i+\frac{1}{2},j}\,\tilde{\mathbf {F}}_{i+\frac{1}{2},j}^x =\llbracket \psi ^x\rrbracket _{i+\frac{1}{2},j}, \ \quad \ \llbracket \mathbf {v} \rrbracket ^{T}_{i,j+\frac{1}{2}}\, \tilde{\mathbf {F}}_{i,j+\frac{1}{2}}^y=\llbracket \psi ^y\rrbracket _{i,j+\frac{1}{2}}, \end{aligned}$$
(21)

then the scheme (20) with the numerical fluxes \(\tilde{\mathbf {F}}^x\) and \(\tilde{\mathbf {F}}^y\) is second-order accurate and entropy conservative, i.e. the computed solutions satisfy the discrete entropy equality

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} \mathcal {U}(\mathbf {U}_{ij}) +\frac{1}{\Delta x} \left( \tilde{\mathcal {F}}_{i+\frac{1}{2},j}^x - \tilde{\mathcal {F}}_{i-\frac{1}{2},j}^x\right) +\frac{1}{\Delta y}\left( \tilde{\mathcal {F}}_{i,j+\frac{1}{2}}^y - \tilde{\mathcal {F}}_{i,j-\frac{1}{2}}^y\right) = 0, \end{aligned}$$

corresponding to the numerical entropy fluxes,

$$\begin{aligned} \tilde{\mathcal {F}}_{i+\frac{1}{2},j}^x=\bar{\mathbf {v}}_{i+\frac{1}{2},j}^{T} \tilde{\mathbf {F}}_{i+\frac{1}{2},j}^x-\bar{\psi }_{i+\frac{1}{2},j}^x, \text { and } \tilde{\mathcal {F}}_{i,j+\frac{1}{2}}^y=\bar{\mathbf {v}}_{i,j +\frac{1}{2}}^{T}\tilde{\mathbf {F}}_{i,j+\frac{1}{2}}^y-\bar{\psi }_{i,j +\frac{1}{2}}^y. \end{aligned}$$

Note that Eq. (21), for the x-directional flux with two velocity components, provides a single algebraic equation in the four unknowns \(\tilde{\mathbf {F}}^x=(F^x_1,\ F^x_2,\ F^x_3,\ F^x_4)^{\top }\). For the Euler equations, in [18], authors have presented an affordable entropy conservative flux. More recently, Chandrashekar in [8] has proposed a new approach to find an entropy conservative flux for the Euler equations. Here, we follow [8], to find an entropy conservative flux.

3.1.1 Entropy conservative flux

For simplicity, we ignore the indices. Let us define \(a^{\ln }=\frac{\llbracket a\rrbracket }{\llbracket \log a\rrbracket }\) as the logarithmic average of scalar a (as in [12]). Using the jump identity \(\llbracket ab\rrbracket =\bar{a}\llbracket b\rrbracket +\bar{b}\llbracket a\rrbracket \) for Eq. (2), we obtain

$$\begin{aligned} \llbracket \Gamma \rrbracket = \frac{1}{\bar{\Gamma }} (\overline{m_x} \llbracket m_x\rrbracket + \overline{m_y} \llbracket m_y\rrbracket ), \end{aligned}$$

where, \(m_x=\Gamma u_x\) and \(m_y=\Gamma u_y\). Using this, we can write the jump in \(\mathbf {v}\) in terms of the jump in \(\rho \), \(\beta \), \(m_x\) and \(m_y\) as follows:

$$\begin{aligned} \mathbf {\llbracket \mathbf {v}\rrbracket }= \begin{pmatrix} \frac{\llbracket \rho \rrbracket }{{\rho }^{\ln }} + k_1 \llbracket \beta \rrbracket \\ \overline{m_x}\llbracket \beta \rrbracket + \bar{\beta }\llbracket m_x\rrbracket \\ \overline{m_y}\llbracket \beta \rrbracket + \bar{\beta }\llbracket m_y\rrbracket \\ -\bar{\Gamma }\llbracket \beta \rrbracket - \frac{\bar{\beta } \overline{m_x}}{\bar{\Gamma }} \llbracket m_x\rrbracket - \frac{\bar{\beta } \overline{m_y}}{\bar{\Gamma }} \llbracket m_y\rrbracket \end{pmatrix}, \end{aligned}$$

with \(k_1=\left( \frac{1}{\gamma -1} \frac{1}{{\beta }^{\ln }}+1 \right) \). Furthermore, \(\llbracket \psi ^x\rrbracket \) and \(\llbracket \psi ^x\rrbracket \) can be written as

$$\begin{aligned} \llbracket \psi ^x\rrbracket =\bar{\rho }\llbracket m_x\rrbracket +\overline{m_x} \llbracket \rho \rrbracket \ \text { and } \ \llbracket \psi ^y\rrbracket =\bar{\rho }\llbracket m_y\rrbracket +\overline{m_y} \llbracket \rho \rrbracket , \text { respectively}. \end{aligned}$$

Let \(\tilde{\mathbf {F}}^x = (F_1^x,\ F_2^x,\ F_3^x,\ F_4^x )^\top \) be an entropy conservative flux and \(\mathbf {v}= (v_1, \ v_2, \ v_3, \ v_4)^\top \), then Eq. (21) results in,

$$\begin{aligned} F_1^x\llbracket v_1 \rrbracket + F_2^x\llbracket v_2 \rrbracket + F_3^x\llbracket v_3 \rrbracket + F_4^x\llbracket v_4 \rrbracket = \llbracket \psi ^x \rrbracket , \end{aligned}$$

which simplifies to

$$\begin{aligned}&\left( \frac{F_1^x}{{\rho }^{\ln }} \right) \llbracket \rho \rrbracket +\left( \overline{\beta } F_2^x - \frac{\bar{\beta } \overline{m_x}}{\bar{\Gamma }}F_4^x \right) \llbracket m_x\rrbracket +\left( \overline{\beta } F_3^x - \frac{\bar{\beta } \overline{m_y}}{\bar{\Gamma }}F_4^x \right) \llbracket m_y\rrbracket + \bigg ( k_1 F_1^x+ \overline{m_x} F_2^x+ \overline{m_y} F_3^x-F_4^x \bar{\Gamma } \bigg )\llbracket \beta \rrbracket \\&\quad = \bar{\rho }\llbracket m_x\rrbracket +\overline{m_x} \llbracket \rho \rrbracket . \end{aligned}$$

Comparing both sides the coefficients of independent jumps, i.e. coefficient of \(\llbracket \rho \rrbracket , \ \llbracket \beta \rrbracket , \ \llbracket m_x\rrbracket \)\( \text {and} \ \llbracket m_y\rrbracket \), we obtain \(\tilde{\mathbf {F}}^x=(F^x_1, \ F^x_2, \ F^x_3, \ F^x_4)\), where the components are given by

$$\begin{aligned} \ {F}_1^x&= {\rho }^{\ln } \overline{m_x }, \\ F_2^x&= \frac{1}{\bar{\beta }} \big ( \frac{\bar{\beta } \overline{m_x}}{\bar{\Gamma }}F_4^x + \bar{\rho } \big ), \\ F_3^x&= \frac{\overline{m_y}}{\bar{\Gamma }}F_4^x , \\ F_4^x&= \frac{-\bar{\Gamma }{\big ( k_1 {\rho }^{\ln } \overline{m_x } + \frac{\overline{m_x}\bar{\rho }}{\bar{\beta }}} \big )}{\big ( \overline{m_x}^2 + \overline{m_y}^2 -{\bar{\Gamma }}^2 \big )}, \end{aligned}$$

with \( k_1=\left( \frac{1}{(\gamma -1)} \frac{1}{{\beta }^{\ln }}+1 \right) \). It is straightforward to verify that \(\tilde{{\mathbf{F}}}^x\) is consistent with the flux \(\varvec{f}_x\). Similarly, we can derive the expression for \(\tilde{\mathbf {F}}^y\) given by,

$$\begin{aligned} \tilde{\mathbf {F}}^y(\mathbf {U}_l, \mathbf {U}_r)= \begin{pmatrix} {\rho }^{\ln } \overline{m_y } \\ \frac{-\overline{m_x}{\big ( k_1 {\rho }^{\ln } \overline{m_y } + \frac{\overline{m_y}\bar{\rho }}{\bar{\beta }}} \big )}{\big (\overline{m_x}^2 + \overline{m_y}^2 -\bar{\Gamma }^2 \big )} \\ \frac{-\overline{m_y}{\big ( k_1 {\rho }^{\ln } \overline{m_y } + \frac{\overline{m_y}\bar{\rho }}{\bar{\beta }}} \big )}{\big (\overline{m_x}^2 + \overline{m_y}^2 -\bar{\Gamma }^2 \big )} + \frac{\bar{\rho }}{\bar{\beta }} \\ \frac{-\bar{\Gamma }{\big ( k_1 {\rho }^{\ln } \overline{m_y } + \frac{\overline{m_y}\bar{\rho }}{\bar{\beta }}} \big )}{\big (\overline{m_x}^2 + \overline{m_y}^2 -\bar{\Gamma }^2 \big )} \end{pmatrix}. \end{aligned}$$

3.1.2 Higher-order entropy conservative flux

The entropy conservative fluxes derived above are only second-order accurate. We can use second-order fluxes as the building blocks for the construction of 2pth-order accurate fluxes for any positive integer p. These 2pth-order fluxes consist of linear combinations of second-order accurate entropy conservative flux \(\tilde{\mathbf{F}}^x\) by following [21]:

Theorem 3.2

[21, Theorem 4.4] For p \(\in \mathbb {N}\), assume that \(\alpha _1^p,\alpha _2^p,\ldots ,\alpha _p^p\) solves the p linear equations

$$\begin{aligned} \sum _{r=1}^{p} r \alpha _r^p=1, \ \ \sum _{i=1}^{p} i^{2s-1} \alpha _i^p \ \ (s=2,3,\ldots ,p), \end{aligned}$$

and defining \(\tilde{\mathbf {{F}}}^{x,2p}_{i+\frac{1}{2},j}=\sum _{r=1}^{p} \alpha _r^p \sum _{s=0}^{r-1} \tilde{\mathbf {{F}}}^x(\mathbf {U}_{i-s,j}, \mathbf {U}_{i-s+r,j}).\) Similarly, we have the expression for \(\tilde{\mathbf {{F}}}^{y,2p}_{i,j+\frac{1}{2}}\). Then, the finite difference scheme with fluxes \(\tilde{\mathbf {{F}}}^{x,2p}\) and \(\tilde{\mathbf {{F}}}^{y,2p}\) is

  1. (i)

    2p-th-order accurate

  2. (ii)

    entropy conservative, i.e. it satisfies the discrete entropy identity

    $$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} \mathcal {U}(\mathbf {U}_{ij}) + \frac{1}{\Delta x} \left( \tilde{\mathcal {F}}^{x,2p}_{i+\frac{1}{2},j} - \tilde{\mathcal {F}}^{x,2p}_{i-\frac{1}{2},j} \right) + \frac{1}{\Delta y} \left( \tilde{\mathcal {F}}^{y,2p}_{i,j+\frac{1}{2}} - \tilde{\mathcal {F}}^{y,2p}_{i,j-\frac{1}{2}} \right) = 0 \end{aligned}$$

    corresponding to the numerical entropy fluxes,

    $$\begin{aligned} \begin{aligned} \tilde{\mathcal {F}}^{x,2p}_{i+\frac{1}{2},j}=\sum _{r=1}^{p} \alpha _r^p \sum _{s=0}^{r-1} \tilde{\mathcal {F}}_{i+\frac{1}{2},j}^x(\mathbf {U}_{i-s,j}, \mathbf {U}_{i-s+r,j}),\\ \tilde{\mathcal {F}}^{y,2p}_{i,j+\frac{1}{2}}=\sum _{r=1}^{p} \alpha _r^p \sum _{s=0}^{r-1} \tilde{\mathcal {F}}^y_{i,j+\frac{1}{2}}(\mathbf {U}_{i,j-s}, \mathbf {U}_{i,j-s+r}). \end{aligned} \end{aligned}$$

In particular, the 4th-order (\(p=2\)) x-directional entropy conservative flux is given by

$$\begin{aligned} \tilde{\mathbf {{F}}}^{x,4}_{i+\frac{1}{2},j}=\frac{4}{3}\tilde{\mathbf {{F}}}^x_{i+\frac{1}{2},j}(\mathbf {U}_{i,j},\mathbf {U}_{i+1,j})-\frac{1}{6} \bigg ( \tilde{\mathbf {{F}}}^x_{i+\frac{1}{2},j} (\mathbf {U}_{i-1,j},\mathbf {U}_{i+1,j})+ \tilde{\mathbf {{F}}}^x_{i+\frac{1}{2},j}(\mathbf {U}_{i,j},\mathbf {U}_{i+2,j}) \bigg ). \end{aligned}$$

Similar expression can be derived for the y-directional fourth order flux.

Remark 3.1

Theorem 3.2 holds only for the even positive integers. So, for qth-order (q is an odd integer) accurate scheme, we use a \((q+1)\)th-order (an even number) accurate flux.

3.2 Entropy-stable schemes

The entropy conservative schemes will produce high-frequency oscillations near the shocks as they do not dissipate entropy at the shocks. We follow [34] to introduce modified fluxes which will ensure entropy stability at the shocks. We consider

$$\begin{aligned} \begin{aligned} \mathbf {F}_{i+\frac{1}{2},j}^x&=\tilde{\mathbf {{F}}}_{i+\frac{1}{2},j}^x - \frac{1}{2} \mathbf{D} _{i+\frac{1}{2},j}^x\llbracket \mathbf {v}\rrbracket _{i+\frac{1}{2},j},\\ \mathbf {F}_{i,j+\frac{1}{2}}^y&= \tilde{\mathbf {{F}}}_{i,j+\frac{1}{2}}^y - \frac{1}{2} \mathbf{D} _{i,j+\frac{1}{2}}^y\llbracket \mathbf {v}\rrbracket _{i,j+\frac{1}{2}}, \end{aligned} \end{aligned}$$
(22)

where \(\mathbf{D} ^x_{i+\frac{1}{2},j}\) and \(\mathbf{D} ^y_{i,j+\frac{1}{2}}\) are symmetric positive definite matrices. Then, we have the following lemma:

Lemma 3.3

[34] The numerical scheme (20) with the modified numerical fluxes (22) is entropy stable, i.e. the computed solution satisfies

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} \mathcal {U}(\mathbf {U}_{ij}) +\frac{1}{\Delta x} \left( \hat{\mathcal {F}}_{i+\frac{1}{2},j}^x - \hat{\mathcal {F}}_{i-\frac{1}{2},j}^x\right) +\frac{1}{\Delta y}\left( \hat{\mathcal {F}}_{i,j+\frac{1}{2}}^y - \hat{\mathcal {F}}_{i,j-\frac{1}{2}}^y\right) \le 0 \end{aligned}$$

with the consistent numerical entropy flux functions,

$$\begin{aligned} \hat{\mathcal {F}}^{x}_{i+\frac{1}{2},j}= \tilde{\mathcal {F}}^{x}_{i+\frac{1}{2},j} + \frac{1}{2}\bar{\mathbf {v}}_{i+\frac{1}{2},j}^{\top } \mathbf {D}_{i+\frac{1}{2},j}^{x}\llbracket \mathbf {v}\rrbracket _{i+\frac{1}{2},j} \quad \text{ and } \quad \hat{\mathcal {F}}^{y}_{i,j+\frac{1}{2}}= \tilde{\mathcal {F}}^{y}_{i,j+\frac{1}{2}} + \frac{1}{2}\bar{\mathbf {v}}_{i,j+\frac{1}{2}}^{\top } \mathbf {D}_{i,j+\frac{1}{2}}^{y}\llbracket \mathbf {v}\rrbracket _{i,j+\frac{1}{2}}. \end{aligned}$$

Here, we use Rusanov’s type diffusion operators for the matrix \(\mathbf{D} \) given by,

$$\begin{aligned} \mathbf {D}_{i+\frac{1}{2},j}^x = {\mathbf {R}}_{i+\frac{1}{2},j}^x \Lambda _{i+\frac{1}{2},j}^x {\mathbf {R}}_{i+\frac{1}{2},j}^{x \top }, \text { and } \mathbf{D} _{i,j+\frac{1}{2}}^y = {\mathbf {R}}_{i,j+\frac{1}{2}}^y \Lambda _{i,j+\frac{1}{2}}^y {\mathbf {R}}_{i,j+\frac{1}{2}}^{y \top } \end{aligned}$$
(23)

where \({\mathbf {R}^i},\, i \in \{x,y\},\) are matrices of the entropy scaled right eigenvectors (see Appendix B) of the Jacobian \(\frac{\partial \mathbf {f}^i}{\partial \mathbf {U}}\), and \({\Lambda ^i},\, i \in \{x,y\},\) are \(4\times 4\) diagonal matrices of the form

$$\begin{aligned} {\Lambda ^i}=\text {diag} \left\{ \left( \max _{1 \le k \le 4} |\lambda _k^i|\right) \mathbf {I}_{4 \times 4} \right\} , \ \ \, i \in \{x,y\}, \end{aligned}$$

where \(\{\lambda _k^i: 1 \le k \le 4 \}\) is the set of eigenvalue of the Jacobian \(\frac{\partial \mathbf {f}^i}{\partial \mathbf {U}}\). We also note that, following [4], \(\mathbf {U}_{\mathbf {v}} = \mathbf{R} ^{k} (\mathbf{R} ^{k})^{\top }\) for \(k\in \{x,y\}\) and hence,

$$\begin{aligned} \mathbf{R} ^{k} \Lambda ^{k} ( \mathbf{R} ^{k} )^{(-1)} \llbracket \mathbf {U}\rrbracket \approx \mathbf{R} ^{k} \Lambda ^{k} ( \mathbf{R} ^{k} )^{(-1)} \mathbf {U}_{\mathbf {v}} \llbracket \mathbf{v} \rrbracket = \mathbf{R} ^{k} \Lambda ^{k} ( \mathbf{R} ^{k} )^{\top } \llbracket \mathbf{v} \rrbracket . \end{aligned}$$

Hence, the entropy diffusion operator used here is similar to the Roe diffusion operator, when the entropy scaled right eigenvectors are used.

With the choice of diffusion operator (23), the numerical scheme (20) with the numerical flux (22) is entropy stable. However, the scheme is only first-order accurate due to the presence of the jump terms \(\llbracket \mathbf {v}\rrbracket _{i+\frac{1}{2},j}\) and \(\llbracket \mathbf {v}\rrbracket _{i,j+\frac{1}{2}}\).

3.3 High-order diffusion operators

A straightforward way to increase the order of accuracy is to approximate the jumps using higher-order reconstruction process. However, proving the entropy stability of the resulting scheme is not possible. Instead, we follow the process prescribed in [12] and introduce the scaled entropy variables,

$$\begin{aligned} \mathbf{W} _{ij}^{x,\pm }\,=\, \mathbf{R} ^{x^{\top }}_{i\pm \frac{1}{2},j}{} \mathbf{v} _{ij}. \end{aligned}$$

If \(\tilde{\mathbf{W }}_{ij}^{x,\pm }\) denotes the k-th-order reconstructed values of \(\mathbf{W} _{i,j}^{x,\pm }\) in the x-direction, then,

$$\begin{aligned} \mathbf{p} _{ij}^{x,\pm }\,=\, \left\{ \tilde{\mathbf{R}}^{x^{\top }}_{i\pm \frac{1}{2},j}\right\} ^{(-1)}\tilde{\mathbf{W }}_{i,j}^{x,\pm }, \end{aligned}$$

are the corresponding k-th-order reconstructed values for \(\mathbf{v} _{ij}\). Hence, the modified numerical flux is given by,

$$\begin{aligned} \mathbf{F} _{i+\frac{1}{2},j}^{x,k}\,=\,\tilde{\mathbf{F }}_{i+\frac{1}{2},j}^{x,2p}\,-\,\frac{1}{2}\,\mathbf{D} _{i+\frac{1}{2},j}^x\llbracket \mathbf{P} ^x\rrbracket _{i+\frac{1}{2},j} \end{aligned}$$
(24)

where \(\llbracket \mathbf{P} ^x\rrbracket _{i+\frac{1}{2},j}\) stands for,

$$\begin{aligned} \llbracket \mathbf{P} ^x\rrbracket _{i+\frac{1}{2},j}\,=\,\mathbf{P} ^{x,-}_{i+1,j}\,-\,\mathbf{P} ^{x,+}_{ij}, \end{aligned}$$

and \(p \in \mathbb {N}\) is chosen as

  • \(p=k/2\) if k is even,

  • \(p=(k+1)/2\) if k is odd.

Following [12], a sufficient condition for the numerical flux (24) to be entropy stable is that the reconstruction process for \(\mathbf{W}\) must satisfy the sign-preserving property. For the second-order reconstruction, we use the minmod reconstruction which satisfies this property. We denote this scheme by O2-ES. For the higher-order scheme, we follow [13] and use the ENO reconstruction. We use third- and fourth-order ENO-based reconstruction and denote these schemes by O3-ES and O4-ES, respectively.

3.4 Semi-discrete entropy stability

We now have the following result:

Theorem 3.4

The semi-discrete schemes O2-ES, O3-ES and O4-ES designed above are entropy stable, i.e. they satisfy,

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} \mathcal {U}(\mathbf {U}_{ij}) +\frac{1}{\Delta x} \left( \hat{\mathcal {F}}_{i+\frac{1}{2},j}^x - \hat{\mathcal {F}}_{i-\frac{1}{2},j}^x\right) +\frac{1}{\Delta y}\left( \hat{\mathcal {F}}_{i,j+\frac{1}{2}}^y - \hat{\mathcal {F}}_{i,j-\frac{1}{2}}^y\right) \le 0 \end{aligned}$$

where \( \hat{\mathcal {F}}^x\) and \( \hat{\mathcal {F}}^y\) are the consistent numerical entropy fluxes.

3.5 Time discretization

For the time discretization, we use SSP Runge–Kutta methods [16]. The second- and third-order accurate SSP-RK methods rely on the following algorithm:

  1. 1.

    Define \(\mathbf{U} ^{0}\,=\,\mathbf{U} ^n\).

  2. 2.

    For \(m=1,\ldots ,k+1\), evaluate,

    $$\begin{aligned} \mathbf{U} _{i,j}^{(m)}\,=\,\sum _{l=0}^{m-1}\alpha _{ml}{} \mathbf{U} _{i,j}^{(l)}+\beta _{ml}\Delta t^n(\mathcal {L}_{i,j}(\mathbf{U} ^{(l)})), \end{aligned}$$

    where, \(\alpha _{ml}\) and \(\beta _{ml}\) follows from Table 1.

  3. 3.

    Set \(\mathbf{U} _{i,j}^{n+1}\,=\,\mathbf{U} _{i,j}^{(k+1)}\).

Table 1 Coefficients for Runge–Kutta time stepping

For the fourth-order accuracy, we consider the following time update:

$$\begin{aligned} \mathbf{U} ^{1}= & {} \mathbf{U} ^n + 0.39175222700392 ( \Delta t \mathcal {L}(\mathbf{U} ^n)), \\ \mathbf{U} ^{2}= & {} 0.44437049406734 (\mathbf{U} ^n) + 0.55562950593266 (\mathbf{U} ^{1}) +0.36841059262959 (\Delta t \mathcal {L}(\mathbf{U} ^1)), \\ \mathbf{U} ^{3}= & {} 0.62010185138540 (\mathbf{U} ^n) + 0.37989814861460 (\mathbf{U} ^{2}) +0.25189177424738 (\Delta t \mathcal {L}(\mathbf{U }^2)), \\ \mathbf{U} ^{4}= & {} 0.17807995410773 (\mathbf{U} ^n) + 0.82192004589227 (\mathbf{U} ^{3}) + 0.54497475021237 ( \Delta t \mathcal {L}(\mathbf{U }^3)), \end{aligned}$$

and finally,

$$\begin{aligned} \mathbf{U} ^{n+1}= & {} 0.00683325884039 (\mathbf{U} ^n) + 0.51723167208978 (\mathbf{U} ^{2}) + 0.12759831133288 (\mathbf{U} ^{3}) \\&+ 0.34833675773694 (\mathbf{U} ^{4}) + 0.08460416338212 ( \Delta t \mathcal {L}(\mathbf{U }^3))+ 0.22600748319395 (\Delta t \mathcal {L}(\mathbf{U }^4)). \end{aligned}$$

4 Numerical results

We will now present numerical test cases for the above schemes. We present both one- and two-dimensional test cases and compute several Riemann problems. We use CFL number 0.2 for all the presented test cases.

4.1 One-dimensional test cases

4.1.1 Accuracy test

To test the accuracy of the proposed schemes, we first consider a problem which has smooth solution. We consider the computational domain [0, 1] with periodic boundary conditions. The initial density profile is assumed to be \(\rho (x,0)=2+\sin (2\pi x)\), which is then advected with the velocity \(\varvec{u}=(0.5,0)^{\top }\). The pressure is assumed to be constant with \(p=1.0\). The exact solution is transportation of the density profile in x-direction, i.e. \(\rho (x,t) = 2 + \sin (2\pi (x-t))\), while the other variables remain unchanged. We use the adiabatic index, \(\gamma =\frac{5}{3}\). The simulations are performed till time \(t=2.0\).

Table 2 Accuracy test: rate of convergence of second-order (O2-ES), third-order (O3-ES) and fourth-order (O4-ES) entropy-stable schemes

We present \(L^{1}\)-errors of the density profile for the O2-ES, O3-ES, and O4-ES schemes at 100, 200, 400, 800 and 1600 cells in Table 2. We note that all the schemes preserve the predicted order of accuracy.

4.1.2 Isentropic smooth flows

In this test case, we consider a one-dimensional isentropic smooth pulse in a fixed reference state, \(\mathbf {w}_{ref} = (\rho _{ref}, \varvec{u}_{ref}, p_{ref})\). A detailed illustration of the problem is given in [23] and [40]. We set \(\rho _{ref}=1, \ \varvec{u}_{ref}=\mathbf 0 , \ p_{ref}=100\). For the initial pulse we consider \(\alpha =1\) and \(L=0.3\) and then set the density profile as,

$$\begin{aligned} \rho _0(x)=\rho _{ref}[1+\alpha f(x)], \end{aligned}$$

where f is given by

$$\begin{aligned} f(x)= {\left\{ \begin{array}{ll} \left[ \left( \frac{x}{L} \right) ^2 - 1 \right] ^4, &{} \text {if} \ |x|<L \\ 0, &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

The initial pressure profile is given by \(p=K \rho ^\gamma \), where K is a constant. Throughout the domain, we assume a constant value to the Riemann invariant J, to obtain the initial velocity inside the pulse. Here, J is given by

$$\begin{aligned} J= \frac{1}{2} \ln \left( \frac{1+u_x}{1-u_x}\right) - \frac{1}{\sqrt{\gamma -1}} \ln \left( \frac{\sqrt{\gamma -1}+c}{\sqrt{\gamma -1}-c} \right) , \end{aligned}$$

where c is the sound speed. We consider the periodic boundary condition for the test case. The adiabatic index is set to \(\gamma =\frac{5}{3}\). We present the numerical results using 80 cells on the domain \([-0.35,1]\). The computations are performed till time \(t=0.8\). The numerical results for the proposed schemes are presented in Fig. 1. The exact solution is using the characteristic analysis [40].

Fig. 1
figure 1

Isentropic smooth flows: plots of density, velocity, pressure and total entropy evolution at 100 cells for O2-ES, O3-ES and O4-ES schemes

Table 3 Isentropic smooth flows: rate of convergence of second (O2-ES), third (O3-ES) and fourth-order (O4-ES) entropy-stable schemes

We observe that all schemes can capture the waves profile even at the coarse mesh of 80 cells. The second-order scheme O2-ES is most diffusive when compared to third- and fourth-order schemes. In Fig. 1d, we plot the evolution of the total entropy with time. We observe that entropy remains almost conserved. Also, for the third- and fourth-order schemes we observe almost same entropy profile.

In Table 3, we have presented the \(L^{1}\)-errors and order of convergence for the density at various resolutions. We note that the second-order schemes converge with the predicted rate of convergence; however, third- and fourth-order schemes do not converge with the desired accuracy. This is similar to the case in [40], where other higher-order schemes also have low accuracy, except WENO-based schemes.

4.1.3 Riemann problem 1

In this test case, we consider a Riemann problem from [25]. We take computational domain of [0, 1] with the initial discontinuity centred at \(x=0.5\) with initial data:

$$\begin{aligned} (\rho ,\varvec{u},p) = {\left\{ \begin{array}{ll} \big (1,\ -0.6,\ 0, \ 10\big ) &{} \text {if } x < 0.5 \\ \big (10,\ 0.5,\ 0. \ 20\big ) &{} \text {if } x > 0.5. \end{array}\right. } \end{aligned}$$

We assume outflow boundary conditions at the boundary and consider adiabatic index, \(\gamma =\frac{5}{3}\). The exact solution of the problem contains two rarefactions waves moving in the opposite direction separated by a contact wave.

Fig. 2
figure 2

Riemann problem 1: Plots of density, velocity, pressure and total entropy evolution at 100 and 500 cells for O2-ES, O3-ES and O4-ES schemes

The numerical results are presented in Fig. 2 for the O2-ES, O3-ES and O4-ES schemes using 100 and 500 cells. We have plotted density, velocity and pressure profile at time \(t=0.4\). We compare the obtained results with the exact solution achieved using [24]. We observe that at the resolution of 100 cells, O4-ES is more accurate than the O3-ES scheme, which further is more accurate than the O2-ES, as expected. At the refined mesh with 500 cells, all the schemes are relatively close to each other and resolve both rarefaction and the contact.

In Fig. 2d, we have plotted the evolution of total entropy with time. We note that at 100 cells O4-ES is least diffusive followed by O3-ES with O2-ES being most diffusive. At 500 cells, the entropy decay of the schemes is much closer to each other.

4.1.4 Riemann problem 2

In this test case, we consider a shock tube like test case from [24]. The problem will test wave capturing ability of the proposed schemes as all kinds of waves are present in the solution. Similar to previous Riemann problem, we consider the computational domain of [0, 1] with outflow boundary conditions, and with initial discontinuity at \(x=0.5\) separating the states given as:

$$\begin{aligned} (\rho ,\varvec{u},p) = {\left\{ \begin{array}{ll} \big (1,\ \mathbf 0 , 10^3\big ) &{} \text {if } x < 0.5 \\ \big (1,\ \mathbf 0 , 10^{-2}\big ) &{} \text {if } x > 0.5 \end{array}\right. } \end{aligned}$$

In Fig. 3, we present the results at 100 and 500 cells for time \(t=0.4\) for O2-ES, O3-ES and O4-ES with \(\gamma =\frac{5}{3}\). We have plotted density, velocity and pressure profiles. We observe that the second-order scheme O2-ES at 100 cells completely fails to capture the waves, while O3-ES and O4-ES perform better. However, at 500 cells all the schemes are able to capture the waves with O4-ES being most accurate. We have followed [24] to obtain the exact solution of Riemann Problem 2.

Fig. 3
figure 3

Riemann problem 2: Plots of density, velocity, pressure and total entropy evolution at 100 and 500 cells for O2-ES, O3-ES and O4-ES schemes

In Fig. 3d, we plot evolution of total entropy with time. At 100 cells, O2-ES scheme is most diffusive followed by O3-ES scheme. The fourth-order scheme O4-ES is most accurate. At the finer mesh of 500 cells, we have a similar performance of the schemes, with much closer decay rates.

4.1.5 Riemann problem 3

In this test case, we consider a Riemann problem which is similar to a test case in [25]. The computational domain of [0, 1] contains an initial discontinuity separating the states:

$$\begin{aligned} (\rho ,\ \varvec{u}, \ p) = {\left\{ \begin{array}{ll} \big (10,\ \mathbf 0 ,\ \frac{40}{3} \big ) &{} \text {if } x < 0.5, \\ \big (1,\ \mathbf 0 , \ \frac{2}{3}\times 10^{-5}\big ) &{} \text {if } x > 0.5. \end{array}\right. } \end{aligned}$$

The problem is similar to the shock tube test case for Euler equation of compressible fluids. However, here the right state contains very low pressure, which will test robustness of the schemes. The numerical results are presented in Fig. 4 at time \(t=0.4\). We use adiabatic index, \(\gamma =\frac{5}{3}\). We proceed as in [24] to obtain the exact solution of Riemann Problem 3. Similar to test case above, at 100 cells, no scheme is able to capture the shock wave efficiently. However, at 500 cells, all the schemes resolve the shock wave with accuracy. For the entropy evolution, we observe that at 500 cells all the scheme have similar decay rate, whereas for the 100 cells, O3-ES and O4-ES are slightly better than the O2-ES.

Fig. 4
figure 4

Riemann problem 3: plots of density, velocity, pressure and total entropy evolution at 100 and 500 cells for O2-ES, O3-ES and O4-ES schemes

4.1.6 Density perturbation test case

For this test case, we consider the test problem from [38]. We consider the computational domain of [0, 1] with outflow boundary conditions. We assume adiabatic index to be \(\gamma =\frac{5}{3}\). The initial conditions are given by,

$$\begin{aligned} (\rho ,\varvec{u},p) = {\left\{ \begin{array}{ll} \big (5, \mathbf 0 , 50\big ) &{} \text {if } x < 0.5 \\ \big (2 + 0.3\sin (50x), \mathbf 0 , \ 5\big ) &{} \text {if } x > 0.5. \end{array}\right. } \end{aligned}$$

The solution is computed till time \(t=0.35\). The exact solution of the problem contains oscillatory density profile with both shocks and rarefaction waves. Hence, the problem will test accuracy of the schemes in capturing these oscillations and other waves.

Fig. 5
figure 5

Density perturbation test case: plots of density, velocity, pressure and total entropy evolution at 100 and 500 cells for O2-ES, O3-ES and O4-ES schemes

Fig. 6
figure 6

Blast waves test case: plots of density, velocity, pressure and total entropy evolution with 5000 cells for O2-ES, O3-ES and O4-ES schemes

We have plotted the numerical results for density, velocity and pressure in Fig. 5 for 100 and 500 cells using O2-ES, O3-ES, and O4-ES schemes. At coarse mesh of 100 cells, we again observe that the fourth-order scheme O4-ES is much more accurate than the third-order scheme O3-ES. The second-order scheme is the least accurate. For the fine mesh of 500 cells, O2-ES still fails to capture the peaks; however, O3-ES and O4-ES perform almost identically. This can be further observed from the entropy decay plot in Fig. 5d. We observe that the O3-ES and O4-ES schemes are much closer for 500 cells with O2-ES being more diffusive.

4.1.7 Blast waves test case

In this test case, we consider the blast wave interaction problem from [22]. The initial computational domain is considered to be [0, 1] with outflow boundary conditions. The initial conditions in the domain are given by,

$$\begin{aligned} (\rho ,\ \varvec{u},\ p) = {\left\{ \begin{array}{ll} \big (1,\ \mathbf 0 ,\ 1000 \big ) &{} \text {if } x< 0.1,\\ \big (1,\ \mathbf 0 , \ 0.01\big ) &{} \text {if } 0.1<x <0.9,\\ \big (1,\ \mathbf 0 , \ 100 \big ) &{} \text {if } x > 0.9, \end{array}\right. } \end{aligned}$$

with adiabatic index \(\gamma =1.4\). We compute the solutions till time \(t=0.43\). As the test case is fairly extreme, to capture the waves, we use 5000 cells.

Fig. 7
figure 7

Two-dimensional Riemann problem 1: plots for \(\ln {\rho }\) and \(\ln {p}\) for O3-ES and O4-ES using 25 contours

Numerical results for O2-ES, O3-ES and O4-ES schemes are plotted in Fig. 6. To show the results with more details, we plotted the variables in the interval (0.50, 0.53). We again observe that O4-ES captures the waves more accurately, and O2-ES is most diffusive. We have also plotted the entropy evolution with time for these schemes.

4.2 Two-dimensional test cases

For the two-dimensional test cases, we consider various two-dimensional Riemann problems. We assume a computational domain \([0, 1] \times [0, 1]\) which is divided into four parts with initial discontinuities along the lines \(x=0.5\) and \(y=0.5\). We use mesh of \(400\times 400\) cells and take \(\gamma = \frac{5}{3}\). Outflow boundary conditions are used in all the test cases. To simplify the presentation, we present the numerical results for O3-ES and O4-ES schemes only, as O2-ES numerical results are more diffusion compare to O3-ES and O4-ES schemes.

Fig. 8
figure 8

Two-dimensional Riemann problem 2: plots for \(\ln {\rho }\) and \(\ln {p}\) for O3-ES and O4-ES using 25 contours

4.2.1 Two-dimensional Riemann problem 1

In this test case, we consider the Riemann problem from [38]. The domain is filled with four constant states given by,

$$\begin{aligned} (\rho ,u_x,u_y,p) = {\left\{ \begin{array}{ll} \big (0.1,\ 0,\ 0, \ 0.01 \big ), &{} \text {for } \quad x,y> 0.5, \\ \big (0.1,\ 0.99,\ 0, \ 1.0 \big ), &{} \text {for } \quad x<0.5,\ y> 0.5, \\ \big (0.5,\ 0,\ 0, \ 1.0 \big ), &{} \text {for } \quad x,y< 0.5, \\ \big (0.1,\ 0,\ 0.99, \ 1.0 \big ), &{} \text {for } \quad x>0.5,\ y < 0.5. \\ \end{array}\right. } \end{aligned}$$

Numerical results for O3-ES and O4-ES schemes are presented in Fig. 7 at time \(t=0.4\). We have plotted 25 contours of \(\ln {\rho }\) and \(\ln {p}\). We note that both the schemes captures all the waves and have comparable accuracy with O4-ES being slightly more accurate.

Fig. 9
figure 9

Two-dimensional Riemann problem 3: plots for \(\ln {\rho }\) and \(\ln {p}\) for O3-ES and O4-ES using 25 contours

4.2.2 Two-dimensional Riemann problem 2

For this test case, we consider a Riemann problem used in [28]. The four initial states are given by,

$$\begin{aligned} (\rho ,\varvec{u},p) = {\left\{ \begin{array}{ll} \big (0.5,\ 0.5,\ -0.5, \ 5 \big ), &{} \text {if } x,y> 0.5, \\ \big (1,\ 0.5,\ 0.5, \ 5 \big ), &{} \text {if } x<0.5, \ y> 0.5, \\ \big (3,\ -0.5,\ 0.5, \ 5 \big ), &{} \text {if } x,y< 0.5, \\ \big (1.5,\ -0.5,\ -0.5, \ 5 \big ), &{} \text {if } x>0.5, \ y < 0.5. \end{array}\right. } \end{aligned}$$

In Fig. 8, we have plotted \(\ln {\rho }\) and \(\ln {p}\) using 25 contours at \(t=0.4\) for O3-ES and O4-ES schemes. We again observe that both the schemes accurately capture all the waves in the vortex. Also, O4-ES produces more details compared to O3-ES.

Fig. 10
figure 10

Two-dimensional Riemann problem 4: plots for \(\ln {\rho }\) and \(\ln {p}\) for O3-ES and O4-ES using 25 contours

Fig. 11
figure 11

Two-dimensional Riemann problem 5: plots for \(\ln {\rho }\) and \(\ln {p}\) for O3-ES and O4-ES using 25 contours

4.2.3 Two-dimensional Riemann problem 3

We consider another Riemann problem from [28]. The initial four states are given as follows:

$$\begin{aligned} (\rho ,\varvec{u},p) = {\left\{ \begin{array}{ll} \big (1,\ 0,\ 0, \ 1 \big ) &{} \text {if } x,y> 0.5, \\ \big (0.5771,\ -0.3529,\ 0, \ 0.4 \big ) &{} \text {if } x<0.5, \ y> 0.5, \\ \big (1,\ -0.3529,\ -0.3529, \ 1 \big ) &{} \text {if } x,y< 0.5, \\ \big (0.5771,\ 0,\ -0.3529, \ 0.4 \big ) &{} \text {if } x>0.5, \ y < 0.5. \end{array}\right. } \end{aligned}$$

The exact solution involves interactions of the planar rarefaction waves, which generates two symmetric shock waves. We present the numerical results using 25 contours for \(\ln {\rho }\) and \(\ln {p}\) at \(t=0.4\) in Fig. 9. We observe that both the schemes, O3-ES and O4-ES, capture both rarefaction and shock waves accurately and have similar performance.

4.2.4 Two-dimensional Riemann problem 4

We consider another test case from [28], for which initial states are given by,

$$\begin{aligned} (\rho ,\varvec{u},p) = {\left\{ \begin{array}{ll} \big (0.035145216124503,\ 0,\ 0, \ 0.162931056509027 \big ), &{} \text {if } x,y> 0.5, \\ \big (0.1,\ 0.7,\ 0, \ 1 \big ), &{} \text {if } x<0.5,\ y> 0.5, \\ \big (0.5,\ 0,\ 0, \ 1 \big ), &{} \text {if } x,y< 0.5, \\ \big (0.1,\ 0,\ 0.7, \ 1 \big ), &{} \text {if } x>0.5,\ y < 0.5. \end{array}\right. } \end{aligned}$$

In this test case, initial membranes break and two contact discontinuities appear on the left and bottom of the domain. Finally, we obtain two curved front shocks.

We have plotted \(\ln {\rho }\) and \(\ln {p}\) using 25 contours for O3-ES and O4-ES schemes at time \(t=0.4\) in Fig. 10. Both of the schemes resolve curved shocks and contact waves accurately.

4.2.5 Two-dimensional Riemann problem 5

In this test case from [37], the initial four states are given by,

$$\begin{aligned} (\rho ,v,p) = {\left\{ \begin{array}{ll} \big (0.1,\ 0,\ 0, \ 20 \big ) &{} \text {if } x,y> 0.5, \\ \big (0.00414329639576,\ 0.99,\ 0, \ 0.05 \big ) &{} \text {if } x<0.5,\ y> 0.5, \\ \big (0.01,\ 0,\ 0, \ 0.05 \big ) &{} \text {if } x,y< 0.5, \\ \big (0.00414329639576,\ 0,\ 0.99, \ 0.05 \big ) &{} \text {if } x>0.5,\ y < 0.5. \end{array}\right. } \end{aligned}$$

Here, the four initial discontinuities interact to give the distortion of initial shocks with a left-bottom going mushroom cloud, starting from the centre. The numerical results for O3-ES and O4-ES at time \(t=0.4\) are presented in Fig. 11. We use 25 contours to plot \(\ln {\rho }\) and \(\ln {p}\). We observe that both schemes resolve cloud accurately.

5 Conclusion

In this work, we consider the system of relativistic hydrodynamics. First, we discuss the entropy estimate for the continuous model. We then design second-, third- and fourth-order entropy-stable finite difference schemes. The schemes involve combining higher-order entropy conservative schemes with higher-order entropy diffusion operator. The design of higher-order diffusion operator is based on the entropic scaled eigenvectors and sign-preserving property of minmod and ENO reconstruction process. The resulting schemes are then tested on a variety of test cases, involving one- and two-dimensional Riemann problems. The schemes are shown to be stable and accurate in capturing various waves. We also quantify the total entropy decay for various test cases. Furthermore, using the component presented here, we can design arbitrary higher-order entropy-stable schemes for relativistic fluid flows.