Entropy stable numerical approximations for the isothermal and polytropic Euler equations

In this work we analyze the entropic properties of the Euler equations when the system is closed with the assumption of a polytropic gas. In this case, the pressure solely depends upon the density of the fluid and the energy equation is not necessary anymore as the mass conservation and momentum conservation then form a closed system. Further, the total energy acts as a convex mathematical entropy function for the polytropic Euler equations. The polytropic equation of state gives the pressure as a scaled power law of the density in terms of the adiabatic index $\gamma$. As such, there are important limiting cases contained within the polytropic model like the isothermal Euler equations ($\gamma=1$) and the shallow water equations ($\gamma=2$). We first mimic the continuous entropy analysis on the discrete level in a finite volume context to get special numerical flux functions. Next, these numerical fluxes are incorporated into a particular discontinuous Galerkin (DG) spectral element framework where derivatives are approximated with summation-by-parts operators. This guarantees a high-order accurate DG numerical approximation to the polytropic Euler equations that is also consistent to its auxiliary total energy behavior. Numerical examples are provided to verify the theoretical derivations, i.e., the entropic properties of the high order DG scheme.


Introduction
The compressible Euler equations of gas dynamics are a system of partial differential equations (PDEs) where the conserved quantities are the mass , the momenta → v, and the total energy E = 2 → v 2 + e. This is an archetypical system of non-linear hyperbolic conservation laws that have far reaching applications in engineering and natural sciences, e.g. [29,32,44]. In three spatial dimensions, this system has five equations but six unknowns: the density ∈ R + , the velocity components Some examples include an ideal gas where p ≡ p( , e) or polytropic processes where p ≡ p( ) [29].
The connection between the equation of state, the fluid, and other thermodynamic properties is of particular relevance when examining the physical realizability of flow configurations. In particular, the entropy plays a crucial role to separate possible flow states from the impossible [6]. There is a long history investigating the thermodynamic properties of the compressible Euler equations through the use of mathematical entropy analysis for adiabatic processes [25,34,42] as well as polytropic processes [9,36]. In this analysis the mathematical entropy is modeled by a strongly convex function s( , e). There exist associated entropy fluxes, → f s , such that the entropy function satisfies an additional conservation law for smooth solutions that becomes an inequality in the presence of discontinuous solutions, e.g. shocks. Note, we have adopted the convention common in mathematics that entropy is a decreasing quantity, e.g. [42].
For numerical methods, discretely mimicking this thermodynamic behavior leads to schemes that are entropy conservative (or entropy stable) depending on the solutions smoothness [25,42]. Additionally, numerical approximations, especially schemes with higher order accuracy and low inbuilt numerical dissipation, that are thermodynamically consistent have a marked increase in their robustness [7,24,30,48]. Thus, the design and application of entropy stable approximations, particularly for the compressible Euler equations, have been the subject of ongoing research for the past 50 years, e.g. [4,7,8,10,12,15,16,24,25,27,35,42]. A major breakthrough came with the seminal work of Tadmor [40] wherein he developed a general condition for a finite volume numerical flux function to remain entropy conservative. It was then possible to selectively add dissipation to the baseline numerical approximation and guarantee entropy stability.
Many authors expanded on the entropy stability work of Tadmor, developing higher order spatial approximations through the use of WENO reconstructions [18,19,31], summation-byparts (SBP) finite difference approximations [12,15,16], or the discontinuous Galerkin spectral element method (DGSEM) also with the SBP property [4,7,10,24,23]. The latter two numerical schemes both utilize the SBP property that discretely mimics integration-by-parts. This allows a direct translation of the continuous analysis and entropy stability proofs onto the discrete level, see [22,39] for details. However, the design of these entropy stable approximations (low-order or high-order) has focused on adiabatic processes for the compressible Euler equations.
So, the main focus in this work is to design entropy conservative and entropy stable numerical methods for the polytropic Euler equations. As such, the mathematical entropy analysis is reinvestigated on the continuous level due to the selection of a different equation of state. This analysis also provides a roadmap to discrete entropy stability. We will show that isothermal limit (γ = 1) requires special considerations. The first contribution comes with the derivation of entropy conservative/stable numerical flux functions from Tadmor's finite volume condition. This includes a computationally affordable definition of the baseline entropy conservative numerical flux as well as an explicit definition of the average states where the dissipation terms should be evaluated. In particular, a special mean operator, which is a generalization of the logarithmic mean [37], is introduced. The second contribution takes the finite volume derivations and builds them into a high-order DGSEM framework that remains consistent to the laws of thermodynamics. Complete details on the entropy aware DGSEM are given by Gassner et al. [24].
The paper is organized as follows: Sect. 2 presents the polytropic Euler system and performs the continuous mathematical entropy analysis. The derivations are kept general as the isothermal Euler equations are a special case of the polytropic system. The finite volume discretization and entropy stable numerical flux derivations are given in Sect. 3. In Sect. 4, a generalization of the entropy stable polytropic Euler method into a high-order DGSEM framework is provided. Numerical investigations in Sect. 5 verify the high-order nature of the approximations as well as the entropic properties. Concluding remarks are given in the final section.

Polytropic Euler equations
We first introduce notation that simplifies the continuous and discrete entropy analysis of the governing equations in this work. The state vector of conserved quantities is u and the Cartesian fluxes are denoted by f 1 , f 2 , f 3 . As in [2,23], we define block vector notation with a double arrow The dot product of a spatial vector with a block vector results in a state vector

Thus, the divergence of a block vector is
This allows a compact presentation for systems of hyperbolic conservation laws on a domain Ω ⊂ R 3 .
2.1. Governing equations. The polytropic Euler equations are a simplified version of the compressible Euler equations (1.1) which explicitly conserves the mass and momenta. In the equation of state for polytropic fluids the pressure depends solely on the fluid density and the total energy conservation law becomes redundant [9]. The simplified system takes the form of non-linear conservation laws (2.1) with where I is a 3 × 3 identity matrix. We close the system with the polytropic or the isothermal gas assumption, which relate density and pressure: For a polytropic gas γ > 1 is the adiabatic coefficient and κ > 0 is some scaling factor depending on the fluid, e.g. for the shallow water equations with κ = g/2 (gravitational acceleration) and γ = 2 [17]. For the isothermal case γ = 1 and c > 0 is the speed of sound [9]. To keep the analysis of the polytropic Euler equations general, we will only specify which equation of state is used when necessary. Further, in barotropic models the internal energy, e( ), and the pressure form an admissible pair provided the ordinary differential equation is satisfied [9]. For the equations of state (2.2) the corresponding internal energies are (2.4) polytropic case: e( ) = κ γ−1 γ − 1 , isothermal case: e( ) = c 2 ln( ).

2.2.
Continuous entropy analysis. We define the necessary components to discuss the thermodynamic properties of (2.1) from a mathematical perspective. To do so, we utilize welldeveloped entropy analysis tools, e.g. [25,34,41]. First, we introduce an entropy function used to define an injective mapping between state space and entropy space [25,34]. For the polytropic Euler equations, a suitable mathematical entropy function is the total energy of the system [9] (2.5) with the internal energy taken from (2.4). Note that the entropy function s(u) is strongly convex under the physical assumption that > 0. From the entropy function we find the entropy variables to be where we use the relation (2.3) to simplify the first entropy variable. The mapping between state space and entropy space is equipped with symmetric positive definite (s.p.d) entropy Jacobian matrices, e.g., [41] H −1 = ∂w ∂u , where we introduce a general notation for the sound speed We note that this statement of H is general for either equation of state from (2.2). The entropy fluxes, → f s , associated with the entropy function (2.5) are Finally, we compute the entropy flux potential that is needed later in Sect. 3.2 for the construction of entropy conservative numerical flux functions To examine the mathematical entropy conservation we contract the system of conservation laws (2.1) from the left with the entropy variables (2.6). By construction, and assuming continuity, the time derivative term becomes The contracted flux terms, after many algebraic manipulations, yield Therefore, for smooth solutions contracting (2.1) into entropy space yields an additional conservation law for the total energy Generally, discontinuous solutions can develop for non-linear hyperbolic systems, regardless of their initial smoothness. In the presence of discontinuities, the mathematical entropy conservation law (2.10) becomes the entropy inequality [41] Note, due to the form of the entropy fluxes (2.8) the mathematical entropy conservation law (2.10) has an identical form to the conservation of total energy from the adiabatic compressible Euler equations (1.1). This reinforces that the total energy becomes an auxiliary conserved quantity for polytropic gases.
2.3. Eigenstructure of the polytropic Euler equations. To close this section we investigate the eigenstructure of the polytropic Euler equations. We do so to demonstrate the hyperbolic character of the governing equations. Additionally, a detailed description of the eigenvalues and eigenvectors is needed to select a stable explicit time step [11] as well as design operators that selectively add dissipation to the different propagating waves in the system, e.g. [46].
To simplify the eigenstructure discussion of the polytropic Euler system, we limit the investigation to one spatial dimension. This restriction simplifies the analysis and is done without loss of generality, because the spatial directions are decoupled and the polytropic Euler equations are rotationally invariant. To begin we state the one-dimensional form of (2.1) We find the flux Jacobian matrix to be The eigenvalues, {λ i } 4 i=1 , of (2.11) are all real (2.12) The eigenvalues are associated with a full set of right eigenvectors. A matrix of right eigenvectors is From the work of Barth [1], there exists a positive diagonal scaling matrix Z that relates the right eigenvector matrix (2.13) to the entropy Jacobian matrix (2.7) (2.14) For the polytropic Euler equations this diagonal scaling matrix is We will revisit the eigenstructure of the polytropic Euler equations and this eigenvector scaling in Sect. 3.3 in order to derive an entropy stable numerical dissipation term.

Discrete entropy analysis, finite volume, and numerical fluxes
In this section we derive entropy conservative and entropy stable numerical flux functions for the polytropic Euler equations. This discrete analysis is performed in the context of finite volume schemes and follows closely the work of Tadmor [42]. The derivations for entropy conservative numerical flux functions and appropriate dissipation terms are straightforward, albeit algebraically involved. Therefore, we restrict the discussion to the one dimensional version of the model for the sake of simplicity. As such, we suppress the subscript on the physical flux and simply state f .
where → n is the outward pointing normal vector. In one spatial dimension we divide the interval into non-overlapping cells , and the integral equation contributes d dt on each cell. The solution approximation is assumed to be a constant value within the volume.
Then we determine the cell average value with, for example, a midpoint quadrature of the solution integral Due to the integral form of the finite volume scheme the solution is allowed to be discontinuous at the boundaries of the cells. To resolve this, we introduce a numerical flux, f * (u L , u R ) [32,43] which is a function of two solution states at a cell interface and returns a single flux value. For consistency, we require that such that the numerical flux is equivalent to the physical flux when evaluated at two identical states.
The resulting finite volume spatial approximation takes the general form This results in a set of temporal ordinary differential equations that can be integrated with an appropriate ODE solver, e.g., explicit Runge-Kutta methods.
To complete the spatial approximation (3.2) requires a suitable numerical flux function f * . Next, following the work of Tadmor, we will develop entropy conservative and entropy stable numerical fluxes for the polytropic Euler equations.
3.2. Entropy conservative numerical flux. First, we develop the entropy conservative flux function f * ,EC that is valid for smooth solutions and acts as the baseline for the entropy stable numerical approximation. We assume left and right cell averages, denoted by L and R, on uniform cells of size ∆x separated by a common interface. We discretize the one-dimensional system semi-discretely and derive an approximation for the fluxes at the interface between the two cells, i.e., at the i + 1/2 interface: where the adjacent states feature the physical fluxes f L,R and the numerical interface flux f * . We define the jump in a quantity across an interface by Next, we contract (3.3) into entropy space to obtain the semi-discrete entropy update in each cell where we assume continuity in time such that s t = w T u t . Next, we add the contributions from each side of the interface in (3.4) to obtain the total entropy update To ensure that the finite volume update satisfies the discrete entropy conservation law, the entropy flux of the finite volume discretization must coincide with the discrete entropy flux f s , i.e., We use the linearity of the jump operator and rearrange to obtain the general entropy conservation condition of Tadmor [41] (3.6) where we apply the definition of the entropy flux potential (2.9). The discrete entropy conservation condition (3.6) is a single constraint for a vector quantity. Thus, the form of the entropy conservative numerical flux is not unique. However, the resulting numerical flux form (3.6) must remain consistent (3.1).
To derive an entropy conservative flux we note the properties of the jump operator where we introduce notation for the arithmetic mean For the numerical flux to remain applicable to either equation of state (2.2) we require a generalized average operator for the fluid density.
Definition 1 (γ-mean). Assuming that L = R , a special average of the fluid density is We examine the evaluation of the average (3.8) for three cases substituting the appropriate forms of the pressure (2.2) and internal energy (2.4): (1) Polytropic (γ > 1) yields (2) Isothermal (γ = 1) where the special average becomes the logarithmic mean which also arises in the construction of entropy conservative fluxes for the adiabatic Euler equations [8,27] (3.10) (3) Shallow water (γ = 2) for which the special average reduces to the arithmetic mean Remark 1. The γ-mean (3.9) is a special case of the weighted Stolarsky mean, which serves as a generalization of the logarithmic mean [37]. It remains consistent when the left and right states are identical. Also, assuming without loss of generality that Remark 2. In practice, when the left and right fluid density values are close, there are numerical stability issues because the γ-mean (3.8) tends to a 0/0 form. Therefore, we provide a numerically stable procedure to compute (3.8) in Appendix A.1.
With Def. 1 and the discrete entropy conservation condition (3.6) we are equipped to derive an entropy conservative numerical flux function.
Theorem 1 (Entropy conservative flux). From the discrete entropy conservation condition condition (3.6) we find a consistent, entropy conservative numerical flux Proof. We first expand the right-hand-side of the entropy conservation condition (3.6) where we use the jump properties (3.7). Next, we expand the jump in the entropy variables. To do so, we revisit the form of the entropy variable w 1 as it changes depending on the equation of state Taking the jump of the variable (3.13) we obtain (3.14) because the values of γ and c are constant. Note that in the isothermal case γ = 1, so the jump of w 1 (3.14) has the same form regardless of the equation of state. Therefore, the total jump in the entropy variables is We combine the expanded condition (3.12), the jump in the entropy variables (3.15), and rearrange terms to find To determine the first flux component we find from the γ-mean in Def. 1. The expanded flux condition (3.16) is rewritten into linear jump components. We gather the like terms of each jump component to facilitate the construction of the remaining flux components: If we assume the left and right states are identical in (3.17) and (3.19) it is straightforward to verify that the numerical flux is consistent from its form and the properties of the γ-mean. (1) Isothermal case (γ = 1): The numerical flux becomes where the fluid density is computed with the logarithmic mean (3.10) just as in the adiabatic case [8,27].
(2) Shallow water case (γ = 2): Here the numerical flux simplifies to become where the velocity component in the z direction is ignored due to the assumptions of the shallow water equations [44]. If we let the fluid density be denoted as the water height, → h, and take κ = g/2 where g is the gravitational constant, then we recover the entropy conservative numerical flux function originally developed for the shallow water equations by Fjordholm et al. [17].
Remark 4 (Multi-dimensional entropy conservative fluxes). The derivation of entropy conservative numerical fluxes in the other spatial directions is very similar to that shown in Thm. 1. So, we present the three-dimensional entropy conservative fluxes in the y and z directions in Appendix B.
3.3. Entropy stable numerical flux. As previously mentioned, the solution of hyperbolic conservation laws can contain or develop discontinuities regardless of the smoothness of the initial conditions [14]. In this case, a numerical approximation that is entropy conservative is no longer physical and should account for the dissipation of entropy near discontinuities. Such a numerical method is deemed entropy stable, e.g., [16,41]. To create an entropy stable numerical flux function we begin with a general form where D is a symmetric positive definite dissipation matrix. An immediate issue arises when we contract the entropy stable flux (3.20) into entropy space. We must guarantee that the dissipation term possesses the correct sign [47]; however, contracting (3.20) with the jump in entropy variables gives So, there is a mixture of entropy and conservative variable jumps in the dissipation term that must be guaranteed positive to ensure that entropy is dissipated correctly. In general, it is unclear how to guarantee positivity of the dissipation term in (3.21) as required for entropy stability [1].
To remedy this issue we rewrite u in terms of w . This is possible due to the one-to-one variable mapping between conservative and entropy space as we know that ∂u ∂x = H ∂w ∂x .
For the discrete case we wish to recover a particular average evaluation of the entropy Jacobian (2.7) at a cell interface such that To generate a discrete entropy Jacobian that satisfies (3.22) we need a specially designed average for the square of the sound speed.
Definition 2 (Average square sound speed). A special average for the sound speed squared is (3.23) a 2 = p .
Remark 5. The average (3.23) is consistent. To demonstrate this, consider the polytropic equation of state from (2.2) and take R = + and L = so that Remark 6. Again examining the special values of γ we find: (1) Isothermal (γ = 1) gives as c 2 is a constant. (2) Shallow water (γ = 2) yields where, again, we take κ = g/2 and apply a property of the jump operator (3.7). Denoting the fluid density as the water height, → h, we recover an average of the wave celerity for the shallow water model [17].
Remark 7. Just as with the γ-mean, the sound speed average (3.23) exhibits numerical stability issues for the polytropic case γ > 1 when the fluid density values are close. Therefore, we present a numerically stable procedure to evaluate (3.23) in Appendix A.2.
Lemma 1 (Discrete entropy Jacobian evaluation). If the entropy Jacobian is evaluated with the average states (3.24) then it is possible to relate the jump in conservative variables in terms of the jump in entropy variables by Proof. We demonstrate how to obtain the first row of the discrete matrixĤ. From the condition (3.22) we see that To determine the first entry of the matrix we apply the definition of the γ-mean (3.8) and the sound speed average (3.23) to obtain The remaining components in the first row ofĤ from (3.26) arê Repeating this process we obtain the remaining unknown components in the relation (3.22) and arrive at the discrete entropy Jacobian (3.24).
Next, we select the dissipation matrix D to be a discrete evaluation of the eigendecomposition of the flux Jacobian (2.11) where R is the matrix of right eigenvectors (2.13) and Λ is a diagonal matrix containing the eigenvalues (2.12). From the discrete entropy Jacobian (3.24), we seek a right eigenvector and diagonal scaling matrixẐ such that a discrete version of the eigenvector scaling (2.14) holds whenever possible.
Lemma 2 (Discrete eigenvector and scaling matrices). If we evaluate the right eigenvector and diagonal scaling matrices as then we obtain the relation where equality holds everywhere except for the second, third, and fourth diagonal entries.
Proof. The procedure to determine the discrete evaluation of the matricesR andẐ is similar to that taken by Winters et al. [46]. We relate the individual entries ofĤ to those inRẐR T and determine the 16 individual components of the matrices. We explicitly demonstrate two computations to outline the general technique and qualify the average states inserted in the final form.
We begin by computing the first entry of the first row of the system that should satisfŷ

11
. This leads to two entries of the diagonal scaling matrix The second computation is to determine the second entry of the second row of the system given byĤ It is clear that we must selectv 1 = { {v 1 } } andâ = a 2 in the second row of the right eigenvector matrixR. Unfortunately, just as in the ideal MHD case, we cannot enforce strict equality between the continuous and the discrete entropy scaling analysis [13,46] and find We apply this same process to the remaining unknown portions from the condition (3.28) and, after many algebraic manipulations, determine a unique averaging procedure for the discrete eigenvector and scaling matrices (3.29). The derivations were aided and verified using the symbolic algebra software Maxima [33].
Remark 8. In a similar fashion from [46] we determine the discrete diagonal matrix of eigenvalueŝ Now, we have a complete discrete description of the entropy stable numerical flux function from (3.20) This leads to the main result of this section.
Theorem 2 (Entropy stable flux). If we select the numerical flux function in the discrete entropy update (3.5) then the method is guaranteed to dissipate entropy with the correct sign.
Proof. To begin we restate the discrete evolution of the entropy at a single interface where we insert the newly derived entropy stable flux (3.31) From the construction of the entropy conservative flux function from Thm. 1 we know that because the matrices |Λ| andẐ are symmetric positive definite, the dissipation term is a quadratic form in entropy space and guarantees a negative contribution.

Extension of ES scheme to discontinuous Galerkin numerical approximation
In this section, we extend the entropy conservative/stable finite volume numerical fluxes to higher spatial order by building them into a nodal discontinuous Galerkin (DG) spectral element method. We provide an abbreviated presentation of the entropy stable DG framework, but complete details can be found in [24]. For simplicity we restrict the discussion to uniform Cartesian elements; however, the extension to curvilinear elements is straightforward [24,Appendix B].
First, we subdivide the physical domain Ω into N el non-overlapping Cartesian elements {E ν } N el ν=1 . Each element is then transformed with a linear mapping, [24]. As we restrict to Cartesian meshes, the Jacobian and metric terms are simply with element side lengths ∆x, ∆y, and ∆z. For each element, we approximate the components of the state vector, the flux vectors, etc. with polynomials of degree N in each spatial direction. The polynomial approximations are denoted with capital letters, e.g. U ∈ P N (E). Here we consider the construction of a nodal discontinuous Galerkin spectral element method (DGSEM), in which the polynomials are written in terms of Lagrange basis functions, e.g. i (ξ) with i = 0, . . . , N , that interpolate at the Lengendre-Gauss-Lobatto (LGL) nodes [28].
The DG method is built from the weak form of the conservation law (2.1) where we multiply by a test function ϕ ∈ P N and integrate of the reference element (4.1) where derivatives are now taken in the reference coordinates and we introduce the contravariant fluxes Note, that there is no continuity of the approximate solution or ϕ assumed between elements boundaries.
We select the test function to be the tensor product basis ϕ = i (ξ) j (η) k (ζ) for i, j, k = 0, . . . , N . The integrals in (4.1) are approximated with LGL quadrature and we collocate the quadrature nodes with the interpolation nodes. This exploits that the Lagrange basis functions are discretely orthogonal and simplifies the nodal DG approximation [28]. The integral approximations introduce the mass matrix The SBP property is a discrete equivalent of integration-by-parts that is a crucial component to develop high-order entropy conservative/stable numerical approximations, e.g. [15,16] We apply the SBP property once to generate boundary contributions in the approximation of (4.1). Just like in the finite volume method, we resolve the discontinuity across element boundaries with a numerical surface flux function, e.g. F * 1 (−1, η j , ζ k ;n) where j, k = 0, . . . , N andn is the normal vector in reference space. We apply the SBP property again to move discrete derivatives back onto the fluxes inside the volume. Further, if we introduce a two-point numerical volume flux, e.g. F # 1 (U ijk , U mjk ), that is consistent (3.1) and symmetric with respect to its arguments, e.g. [24]. These steps produce a semi-discrete split form DG approximation (4.3) for i, j, k = 0, . . . , N .
To create an entropy aware high-order DG approximation we select the numerical surface and volume numerical fluxes to be those from the finite volume context [4,24].
Two variants of the split form DG scheme (4.3) are of interest for the polytropic Euler equations: (1) Entropy conservative DG approximation: Select F # and F * to be the entropy conserving fluxes developed in Sect. 3.2. (2) Entropy stable DG approximation: Take F # to be the entropy conserving fluxes from Sect. 3.2 and F * to be the entropy stable fluxes from Sect. 3.3.

Numerical results
We present numerical tests to validate the theoretical findings of the previous sections for an entropy conservative/stable DG spectral element approximation. To do so, we perform the numerical tests in the two dimensional domain Ω = [0, 1] 2 . We subdivide the domain into K non-overlapping, uniform Cartesian elements such that the DG approximation takes the form presented in Sect. 4. The semi-discrete scheme (4.3) is integrated in time with the explicit fivestate, fourth order low storage Runge-Kutta method of Carpenter and Kennedy [5]. A stable time step is computed according to an adjustable coefficient CF L ∈ (0, 1], the local maximum wave speed, and the relative grid size, e.g. [21]. For uniform Cartesian meshes the explicit time step is selected by ∆t := CF L ∆x λ max (2N + 1) .
First, we will verify the high-order spatial accuracy for the DG scheme with the method of manufactured solutions. For this we assume the solution to polytropic Euler equations takes the form with h(x, y, t) = 8 + cos(2πx) sin(2πy) cos(2πt).
This introduces an additional residual term on the right hand side of (2.1) that reads Note that the residual term (5.2) is γ dependent.
The second test will demonstrate the entropic properties of the DG approximation. To do so, we use a discontinuous initial condition To measure the discrete entropy conservation of the DG approximation we examine the entropy residual of the numerical scheme [20]. To compute the discrete entropy growth, (4.3) is rewritten to be where i, j = 0, . . . , N and (5.5) The growth in discrete entropy is computed by contracting (5.4) with the entropy variables (2.6) where we apply the definition of the entropy variables to obtain the temporal derivative, (S t ) ij , at each LGL node. The DG approximation is entropy conservative when the two-point finite volume flux from Theorem 1 is taken to be the interface flux, i.e.F # =F * =F EC , in (5.5). This means that should hold for all time. We numerically verify this property by computing the integrated residual over the domain Ω and demonstrate that (5.6) is on the order of machine precision for the discontinuous initial condition (5.3). If interface dissipation is included, like that described in Sect. 3.3, the DG approximation is entropy stable and (5.6) becomes We consider two particular values of γ in these numerical studies: Sect. 5.1 presents results for the isothermal Euler equations where γ = 1 and Sect. 5.2 contains results for the polytropic Euler equations where γ = 1.4. We forgo presenting entropy conservative/stable DG numerical results for the shallow water variant (γ = 2) as they can be found elsewhere in the literature, e.g. [45].

Isothermal flow.
Here we take γ = 1 and the speed of sound to be c = 1. 5.1.1. Convergence. We use the manufactured solution (5.1) and additional residual (5.2) to investigate the accuracy of the DG approximation for two polynomial orders N = 3 and N = 4. Further, we examine the convergence rates of the entropy conservative DGSEM where F # = F * = F EC (the flux from Theorem 1) as well as the entropy stable DGSEM where F # = F EC (the flux from Theorem 1) and F * = F ES (the flux from Theorem 2). We run the solution up to a final time of T = 1.0 We compute the L 2 error in the density between the approximation and the manufactured solution of different mesh resolution for each polynomial order. In Table 1 we present the experimental order of convergence (EOC) for the entropy conservative DGSEM. We observe an odd/even effect, that is an EOC of N for odd polynomial orders and N + 1 for even polynomial orders, which has been previously observed, e.g. [22,26]. This is particularly noticeable for higher resolution numerical tests. Table 2 gives the EOC results for the entropy stable DGSEM where there is no longer an odd/even effect and the convergence rate is N + 1, as expected for a nodal DG scheme, e.g. [3,26]. Table 1. Experimental order of convergence (EOC) for the entropy conservative DG approximation of the isothermal Euler with c = 1. The L 2 error in the density is computed against the manufactured solution (5.1) for different mesh resolutions. We run to a final time of T = 1.0 with CF L = 1. The convergence results for N = 3 are given on the left and N = 4 on the right.  For this test we compute the entropy residual (5.5) for two polynomial orders, N = 3 and N = 4, and different mesh resolutions. We select the volume and surface fluxes to be F # = F * = F EC (the flux from Theorem 1). We see in Table 3 that the magnitude of the entropy residual is on the order of machine precision for the discontinuous initial condition (5.3) for all resolution configurations.

Polytropic flow.
Here we take γ = 1.4 and the scaling factor to be κ = 0.5. We run the solution up to a final time of T = 1.0 and compute the L 2 error in the density. Table  4 gives the EOC for the entropy conservative DGSEM where we observe an odd/even effect with respect to the polynomial order of the approximation. The entropy stable EOC results in Table  5, again, show optimal convergence order of N + 1 and no such odd/even effect. for two polynomial orders, N = 3 and N = 4, and different mesh resolutions. The volume and surface fluxes are both taken to be the entropy conservative flux from Theorem 1. Table 6 shows that the entropy residual for the polytropic test is on the order of machine precision for the discontinuous initial condition (5.3) and all resolution configurations. Table 5. Experimental order of convergence (EOC) for the entropy stable DG approximation of the polytropic Euler with κ = 0.5. The L 2 error in the density is computed against the manufactured solution (5.1) for different mesh resolutions. We run to a final time of T = 1.0 with CF L = 1. The convergence results for N = 3 are given on the left and N = 4 on the right.

Conclusions
In this work we developed entropy conservative (and entropy stable) numerical approximations for the Euler equations with an equation of state that models a polytropic gas. For this case the pressure is determined from a scaled γ-power law of the fluid density. In turn, the total energy conservation equation became redundant and it was removed from the polytropic Euler system. In fact, the total energy acted as a mathematical entropy function for the polytropic Euler equations where its conservation (or decay) became an auxiliary condition not explicitly modeled by the PDEs.
We analyzed the continuous entropic properties of the polytropic Euler equations. This provided guidance for the semi-discrete entropy analysis. Next, we derived entropy conservative numerical flux functions in the finite volume context that required the introduction of a special γ-mean, which is a generalization of the logarithmic mean present in the adiabatic Euler case. Dissipation matrices were then designed and incorporated to guarantee the finite volume fluxes obeyed the entropy inequality discretely. We also investigated two special cases of the polytropic system that can be used to model isothermal gases (γ = 1) or the shallow water equations (γ = 2). The finite volume scheme was extended to high-order spatial accuracy through a specific discontinuous Galerkin spectral element framework. We then validated the theoretical analysis with several numerical results. In particular, we demonstrated the high-order spatial accuracy and entropy conservative/stable properties of the novel numerical fluxes for the polytropic Euler equations. γ γ−1 .
To develop a numerically stable approach when R ≈ L we first rewrite the left and right states to be To simplify the discussion we introduce an auxiliary variable Then, we rewrite the γ-mean in the form