1 Introduction

The classical compressible Navier–Stokes (CNS) equations can be derived based on the material (Lagrangian) derivative formulation [29]. In the Lagrangian sense, diffusion between gas pockets is non-existent, and thus, the continuity equation is hyperbolic. On the other hand, in the Eulerian model of Svärd [32], air molecules diffuse into other parts of the domain, and thus, the continuity equation is modeled as a parabolic equation.

Generally speaking, entropy conservation and entropy stability are used to preserve the second law of thermodynamics in the mathematical sense, i.e., the mathematical entropy function, S, decreases monotonically outside the equilibrium. This yields entropy estimates and bounds on S, which can be translated into bounds on the conservative variables, q, of the underlying model [12, 31]. In this work, nonlinear entropy stability and the summation-by-parts (SBP) framework are used to derive entropy stable wall boundary conditions for the Eulerian model for the viscous and heat-conducting compressible flows proposed by Svärd [32] and their semidiscrete counterpart. As done in [25] for the classical CNS equations, a semidiscrete entropy estimate for the entire domain is achieved when the new boundary conditions are coupled with an entropy stable discrete interior operator. The data at the boundary are weakly imposed using a penalty flux approach and a simultaneous-approximation-term (SAT) penalty technique. At the semidiscrete level, the work in [25] was sharpened in [13] by first constructing entropy conservative wall boundary conditions and then adding a precise interior penalty term. Here, we follow the semidiscrete analysis and derivation presented in [13, 25] by using a collocated discontinuous Galerkin framework based on SBP operators constructed at the Legendre–Gauss–Lobatto (LGL) points. We verify the entropy conservation property of the baseline boundary conditions by simulating the flow around a rotating sphere placed in a cubic domain. In addition, to verify the accuracy of the proposed boundary condition implementation, we present the convergence study for a three-dimensional test case constructed using the method of manufactured solutions.

In Svärd [32], Dolejší and Svärd [15], numerical simulations were presented to highlight the difference between the classical CNS equations and the Eulerian model. Here, we also use a set of test cases of increasing complexity simulated using both the CNS and Eulerian models. We use the hp, fully-discrete entropy stable SSDC solver described, validated, and verified in [26]. The numerical results of the two models in regions near solid walls are compared, and differences and similarities are then highlighted.

The paper is organized as follows. In Sect. 2, we present the Eulerian model in a general form, and we show its entropy stability analysis. Then, in Sect. 3, we derive the wall boundary conditions at the continuous. Later, in Sect. 4, we discretize the system using SBP-SAT operators and present a discrete entropy analysis of the Eulerian model. The latter step sets the context for the construction of discrete entropy conservative and entropy stable wall boundary conditions. Furthermore, in Sect. 5, a common SAT procedure is presented to allow the use of a single subroutine for imposing interface coupling and wall boundary conditions. In Sect. 6, we present a set of numerical results that demonstrate the efficacy and accuracy of the new boundary conditions. In addition, we present a few more test cases that highlight similarities and differences between the two models slightly away from solid walls. Finally, conclusions are drawn in Sect. 7.

2 Entropy analysis of the Eulerian model

To analyze the Eulerian model, we begin by presenting its general form and then, using the global entropy, its entropy analysis. The latter step will set the context for deriving solid wall boundary conditions that preserve the nonlinear entropy stability.

2.1 General form of the Eulerian model

Svärd [32] arrives at the following form of the Eulerian model for viscous and heat conducting compressible flows:

$$\begin{aligned} \frac{\partial \rho }{\partial t} +\frac{\partial \rho {\mathcal {U}}_j}{\partial x_j}&=\frac{\partial }{\partial x_j}\left( \nu \frac{\partial \rho }{\partial x_j}\right) , \end{aligned}$$
(1a)
$$\begin{aligned} \frac{\partial \rho {\mathcal {U}}_i}{\partial t} +\frac{\partial \rho {\mathcal {U}}_i {\mathcal {U}}_j}{\partial x_j} +\frac{\partial p}{\partial x_i}&=\frac{\partial }{\partial x_j}\left( \nu \frac{\partial \rho {\mathcal {U}}_i}{\partial x_j}\right) , \end{aligned}$$
(1b)
$$\begin{aligned} \frac{\partial \rho {\mathcal {E}}}{\partial t} +\frac{\partial \rho {\mathcal {E}} {\mathcal {U}}_j}{\partial x_j} +\frac{\partial p {\mathcal {U}}_j}{\partial x_j}&=\frac{\partial }{\partial x_j}\left( \nu \frac{\partial \rho {\mathcal {E}}}{\partial x_j}\right) , \end{aligned}$$
(1c)

where \(i,j=1:N_\text {DIM}\) (in MATLAB notation), and \(\rho \), \({\mathcal {U}}_i\), p, and \({\mathcal {E}}\) are the density, the velocity component in the \(x_i\) direction, the thermodynamic pressure and the specific total energy, respectively.

In what follows, we assume thermodynamically perfect (or ideal) gas. Thus, the thermodynamic pressure, p, is given by

$$\begin{aligned} p=\rho R{\mathcal {T}}, \end{aligned}$$
(2)

where R is the gas constant. The specific total energy, \({\mathcal {E}}\), is given by the following equation

$$\begin{aligned} {\mathcal {E}}=c_v{\mathcal {T}}+\frac{1}{2} {\mathcal {U}}_i{\mathcal {U}}_i, \end{aligned}$$
(3)

where \(c_v\) is the heat capacity at constant volume and T is the temperature. The heat capacity at constant pressure, \(c_p\), is related to \(c_v\) through the gas constant, i.e., \(R=c_p-c_v\). Furthermore, the generalized form of the kinematic viscosity, \(\nu \), is given by

$$\begin{aligned} \nu =\frac{\alpha \mu }{\rho (\mathbf{x },t)}+\beta (\rho ,{\mathcal {T}}), \end{aligned}$$
(4)

where \(\mu \) is the dynamic viscosity, \(\alpha \in [1,\frac{4}{3}]\), and \(\beta \) is an additional diffusion coefficient. Finally, the speed of sound, c, is defined as

$$\begin{aligned} c=\sqrt{\gamma R{\mathcal {T}}}, \end{aligned}$$
(5)

where \(\gamma =\frac{c_p}{c_v}\).

Remark 1

Equation (4) is the most general expression of the kinematic viscosity of the Eulerian model. However, in practice, Svärd [32] chooses \(\beta =0\) and thus, Eq. (4) reduces to a scaled kinematic viscosity coefficient

$$\begin{aligned} \nu =\frac{\alpha \mu }{\rho (\mathbf{x },t)}. \end{aligned}$$
(6)

2.2 Entropy analysis

We cover the entropy analysis of the Eulerian model (1) by rewriting it using the following compact form,

$$\begin{aligned} \frac{\partial {q}}{\partial t} +\frac{\partial {f}^{(I)}_i}{\partial x_i} =\frac{\partial {f}^{(V)}_i}{\partial x_i}, \end{aligned}$$
(7)

where \({f}^{(I)}_i\) and \(f^{(V)}_i\) are the inviscid and viscous fluxes in the \(x_i\) direction, respectively.

The next theorem ensures that the Eulerian model is entropy stable.

Theorem 1

The following boundary integral

$$\begin{aligned} \int _\varGamma \left( {w}^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} -{\mathcal {F}}_i\right) \ d\varGamma \end{aligned}$$
(8)

bounds the time derivative of the entropy function,  S,  of the Eulerian model (1).

Proof

Given an entropy pair \(({\mathcal {S}},{\mathcal {F}}_i)\) that symmetrizes the Eulerian model (see [32]), we define the entropy variable \(w^\top =\frac{dS}{dq}\). Then, using the matrix \(\frac{d{q}}{d{w}}\), we change the variables of system (1) to \(q:=q(w)\). These steps yield the symmetric form

$$\begin{aligned} \frac{d{q}}{d{w}} \frac{\partial {w}}{\partial t} +\frac{\partial {{g}}^{(I)}_i}{\partial x_i} =\frac{\partial {{g}}^{(V)}_i}{\partial x_i}, \end{aligned}$$
(9)

where \({g}^{(I)}_i\), and \({g}^{(V)}_i\) are the symmetrized inviscid and viscous fluxes, respectively. Next, we multiply the symmetric system (9) from the left by the entropy variables. Thus, using the chain rule, the term associated with the time derivative reads

$$\begin{aligned} {w}^\top \frac{d{q}}{d{w}} \frac{\partial {w}}{\partial t} = \frac{d {\mathcal {S}}}{d{q}} \frac{d{q}}{d{w}} \frac{\partial {w}}{\partial t} =\frac{\partial {\mathcal {S}}}{\partial t}. \end{aligned}$$
(10)

Further, as shown by Tadmor [35], the contribution of the symmetrized inviscid flux term yields

$$\begin{aligned} {w}^\top \frac{\partial {{g}}^{(I)}_i}{\partial x_i} =\frac{\partial {\mathcal {F}}_i}{\partial x_i}, \end{aligned}$$
(11)

i.e., the divergence of the entropy flux. Lastly, the viscous term contribution can be manipulated to obtain the following expression:

$$\begin{aligned} w^\top \frac{\partial {{g}}^{(V)}_i}{\partial x_i} =w^\top \frac{\partial }{\partial x_i} \left( \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} \right) . \end{aligned}$$
(12)

Therefore, using Eqs. (10)–(12), the scalar partial differential equation for the entropy function, \({\mathcal {S}}\), integrated over a generic domain \(\varOmega \) with boundary \(\varGamma \) reads

$$\begin{aligned} \int _\varOmega \frac{\partial {\mathcal {S}}}{\partial t} +\frac{\partial {\mathcal {F}}_i}{\partial x_i}\ dx =\int _\varOmega w^\top \frac{\partial }{\partial x_i} \left( \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} \right) \ dx. \end{aligned}$$
(13)

Now, using the fundamental theorem of calculus on \(\frac{\partial {\mathcal {F}}_i}{\partial x_i}\), and the integration-by-parts rule on gives

$$\begin{aligned} \int _\varOmega \frac{\partial {\mathcal {S}}}{\partial t} =\int _\varGamma \left( w^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} -{\mathcal {F}}_i \right) \ d\varGamma -DT, \end{aligned}$$
(14)

where

$$\begin{aligned} DT=\int _\varOmega \frac{\partial w^\top }{\partial x_i} \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} dx. \end{aligned}$$
(15)

Because the kinematic viscosity, \(\nu \), is positive and the matrix \(\frac{dq}{dw}\) is symmetric positive-definite, the product \(\left( \nu \frac{dq}{dw}\right) \) is also a positive-definite matrix. Thus, DT is positive and appropriately bounded (see [31]). We obtain the following expression

$$\begin{aligned} \int _\varOmega \frac{\partial {\mathcal {S}}}{\partial t} \ dx \le \int _\varGamma \left( w^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} -{\mathcal {F}}_i \right) \ d\varGamma \end{aligned}$$
(16)

which completes the proof.

In the next section, we derive solid wall boundary conditions such that the boundary integral on the left-hand side of (16) is bounded by data.

3 Entropy stable wall boundary condition

In this section, we derive the boundary conditions for preserving the entropy stability of the system (1) for a solid wall. The analysis presented next closely follows the works of [13, 25].

The entropy–entropy flux pair \(({\mathcal {S}},{\mathcal {F}}_i) =(-\rho s,-\rho {\mathcal {U}}_i s)\), used in [13, 25], is the only pair that admits a diffusive entropy flux for the CNS model [32]. Therefore, it is the only suitable pair for a comparison between the CNS and Eulerian systems of equations. This pair is also used in this work. Thus, the entropy variables are computed as [9, 17]

$$\begin{aligned} w=\left( \frac{h}{{\mathcal {T}}}-s-\frac{{\mathcal {U}}_i{\mathcal {U}}_i}{2{\mathcal {T}}}, -\frac{{\mathcal {U}}_1}{{\mathcal {T}}}, -\frac{{\mathcal {U}}_2}{{\mathcal {T}}}, -\frac{{\mathcal {U}}_3}{{\mathcal {T}}}, -\frac{1}{{\mathcal {T}}}\right) ^\top , \end{aligned}$$
(17)

where \(h=c_{pr}{\mathcal {T}}\) is the enthalpy.

Remark 2

The entropy–entropy flux pair for the Eulerian model is not necessarily restricted to \(({\mathcal {S}},{\mathcal {F}}_i)=(-\rho s,-\rho {\mathcal {U}}_i s)\). Svärd [32] mentions that the Eulerian model admits a diffusive entropy flux for all Harten’s generalized entropies.

To simplify, we rewrite the Eulerian form (7) as

$$\begin{aligned} \frac{\partial {q}}{\partial t} +\frac{\partial {f}^{(I)}_i}{\partial x_i} =\frac{\partial }{\partial x_i} \left( \nu \frac{\partial {q}}{\partial x_i}\right) . \end{aligned}$$
(18)

From the proof of Theorem 1, we arrive at

$$\begin{aligned} \frac{\partial {\mathcal {S}}}{\partial t} +\frac{\partial {\mathcal {F}}_i}{\partial x_i} ={w}^\top \frac{\partial }{\partial x_i} \left( \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i}\right) . \end{aligned}$$
(19)

Integrating the previous expression over a cubical domain, \(\varOmega =(0,1)\times (0,1)\times (0,1)\), and, without loss of generality, considering a solid wall located at \(x_i=0\), we get the following contributions [25]

$$\begin{aligned} \int _\varOmega \frac{\partial {\mathcal {S}}}{\partial t}\ dx =-\int _{x_i=0}\left[ {w}^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i}-{\mathcal {F}}_i\right] dx_{j}dx_{k} -DT, \end{aligned}$$
(20)

where \(j,k\ne i\). From the proof of Theorem 1, \(DT\ge 0\). Thus, we get the bound

$$\begin{aligned} \int _\varOmega \frac{\partial {\mathcal {S}}}{\partial t} \ dx \le -\int _{x_i=0}\left[ {w}^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i}-{\mathcal {F}}_i\right] dx_{j}dx_{k}. \end{aligned}$$
(21)

To bound the time derivative of the entropy, the right-hand-side of (21) requires boundary data. For a solid viscous wall, assuming linear analysis, five independent boundary conditions are required [32]. Four boundary conditions are the three no-slip boundary conditions, as the CNS case, and one on the density flux presented below. The fifth condition is the gradient of the temperature normal to the wall (Neumann boundary condition; e.g., the adiabatic wall), or the temperature of the wall (the Dirichlet or isothermal wall boundary condition), or a mixture of Dirichlet and Neumann conditions (the Robin boundary condition). The last condition is the same as for the CNS model [3, 32, 33]. These five boundary conditions lead to linear stability of both the CNS and Eulerian model [3, 32, 33]. In the remainder of this section, we will show the type and the form of the wall boundary conditions that have to be imposed to bound the estimate (21) and, hence, to attain entropy stability.

3.1 Inviscid contribution

The inviscid contribution to the time rate of change of the entropy function,

$$\begin{aligned} \int _{x_i=0}{\mathcal {F}}_i\ dx_{j}dx_{k}, \end{aligned}$$
(22)

appearing on the RHS of (21), is treated as in [13, Theorem 2.2]. However, for clarity of presentation and completeness, we report it here.

Theorem 2

The no-slip boundary conditions \({\mathcal {U}}_i=0\) and \({\mathcal {U}}_j={\mathcal {U}}_j^{\text {wall}},\) where \(j\ne i,\) bound the inviscid contribution of the time derivative of the entropy function,  i.e.

$$\begin{aligned} {\mathcal {F}}_i=0, \end{aligned}$$
(23)

for an inviscid solid wall with an outfacing normal vector pointing in the \(x_i\) direction.

Proof

The proof of this theorem can be found in [13, Theorem 2.2].

3.2 Viscous contribution

In this subsection, we derive the viscous boundary conditions for a no-slip wall associated to the first term of the RHS of (21), i.e.,

$$\begin{aligned} -\int _{x_i=0} {w}^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i}\ dx_{j}dx_{k}. \end{aligned}$$
(24)

The main result is provided in the following theorem.

Theorem 3

The boundary conditions

$$\begin{aligned} g(t)=\mu \frac{1}{{\mathcal {T}}}\frac{\partial {\mathcal {T}}}{\partial x_i}, \quad {\text {and}} \quad \frac{1}{\rho }\frac{\partial \rho }{\partial x_i}=0, \end{aligned}$$
(25)

bound the viscous contribution to the time derivative of the entropy function for a no-slip solid wall with an outfacing normal vector pointing in the \(x_i\) direction.

Proof

The explicit evaluation of the viscous contribution gives

$$\begin{aligned} -{w}^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} =\mu \frac{1}{{\mathcal {T}}}\frac{\partial {\mathcal {T}}}{\partial x_i} -\mu (s+(\gamma -1))\frac{1}{\rho }\frac{\partial \rho }{\partial x_i} \end{aligned}$$
(26)

that contributes positively to the time derivative of the entropy function. Then, setting \(\frac{1}{\rho }\frac{\partial \rho }{\partial x_i}=0\) yields the boundary condition

$$\begin{aligned} -{w}^\top \left( \nu \frac{dq}{dw}\right) \frac{\partial {w}}{\partial x_i} =\mu \frac{1}{{\mathcal {T}}}\frac{\partial T}{\partial x_i}=g(t) \end{aligned}$$
(27)

which completes the proof.

For the CNS model, the viscous contribution to the time derivative of the entropy function can be bounded by only setting \(\kappa \frac{1}{{\mathcal {T}}}\frac{\partial T}{\partial x_i}\) [25]. However, for the Eulerian model, we require the imposition of two boundary conditions, i.e. \(g(t) = \mu \frac{1}{{\mathcal {T}}}\frac{\partial {\mathcal {T}}}{\partial x_i}\) and \(\frac{1}{\rho }\frac{\partial \rho }{\partial x_i}=0\).

In practice with the above boundary conditions, the time derivative of the entropy function satisfies the following relation

$$\begin{aligned} \int _\varOmega \frac{\partial {\mathcal {S}}}{\partial t}\ dx \le \mu \frac{1}{{\mathcal {T}}}\frac{\partial {\mathcal {T}}}{\partial x_i} = g(t) = \text {DATA}. \end{aligned}$$
(28)

Bound (28) can be translated into a bound for the conserved quantities [12, 31], and hence, for the primitive variables.

4 Semidiscrete entropy stable framework

Herein, using summation-by-parts (SBP) operators [34] and the simultaneous-approximation-technique (SAT) [8, 22], we provide an entropy stable framework of any order for the semidiscretization of the Eulerian model (1) using unstructured grids.

4.1 SBP operators

The one-dimensional SBP operator for the first derivative in the direction \(x_i\) is defined as the following.

Definition 1

Summation-by-parts (SBP) operator for the first derivative: A matrix operator with constant coefficients, \({\mathcal {D}} \in {\mathbb {R}}^{N \times N}\), is a linear SBP operator of degree p approximating the derivative \(\frac{\partial }{\partial x_i}\) on the domain \(x_i \in \left[ a,b\right] \) with nodal distribution x having N nodes, if

  1. 1.

    \({\mathcal {D}}x_i^j=jx_i^{j-1}\), \(j = 0,1,\ldots ,p; \)

  2. 2.

    \({\mathcal {D}} = {\mathcal {P}}^{-1}{\mathcal {Q}}\), where the norm matrix \({\mathcal {P}}_{}\) is symmetric positive-definite;

  3. 3.

    \({\mathcal {Q}}+{\mathcal {Q}}^{\top }={\mathcal {B}}\), where \({\mathcal {B}}={\mathrm {diag}}\left[ -1,0,\ldots ,0,1\right] \).

In other words, an SBP operator of degree p is one that exactly differentiates monomials up to degree p.

In this work, a collocated discontinuous Galerkin approach is used. Specifically, diagonal norm SBP operators are constructed on the LGL nodes. The one-dimensional SBP operators used in this work are explicitly constructed in [10] with \(N = p + 1\). Their extension to two- and three-dimensions is achieved using tensor product operations [10, 25]:

$$\begin{aligned} \begin{gathered} {\mathcal {D}}_{x_1}={\mathcal {D}}_N\otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_5, \quad \cdots \quad {\mathcal {D}}_{x_3}= {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {D}}_N\otimes {\mathcal {I}}_5, \\ {\mathcal {Q}}_{x_1}={\mathcal {Q}}_N\otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_5, \quad \cdots \quad {\mathcal {Q}}_{x_3}= {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {Q}}_N\otimes {\mathcal {I}}_5,\\ {\mathcal {B}}_{x_1}={\mathcal {B}}_N\otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_5, \quad \cdots \quad {\mathcal {B}}_{x_3}= {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {B}}_N\otimes {\mathcal {I}}_5,\\ \varDelta _{x_1}=\varDelta _N\otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_5, \quad \cdots \quad \varDelta _{x_3}= {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes \varDelta _N\otimes {\mathcal {I}}_5,\\ {\mathcal {P}}_{x_1}={\mathcal {P}}_N\otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_5, \quad \cdots \quad {\mathcal {P}}_{x_3}= {\mathcal {I}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {P}}_N\otimes {\mathcal {I}}_5,\\ {\mathcal {P}}_{x_1,x_2}={\mathcal {P}}_N\otimes {\mathcal {P}}_N \otimes {\mathcal {I}}_N \otimes {\mathcal {I}}_,5 \quad \cdots \quad {\mathcal {P}}_{x_2,x_3}= {\mathcal {I}}_N \otimes {\mathcal {P}}_N \otimes {\mathcal {P}}_N\otimes {\mathcal {I}}_5,\\ {\mathcal {P}}_{x_1,x_2,x_3}= {\mathcal {P}}_N \otimes {\mathcal {P}}_N \otimes {\mathcal {P}}_N\otimes {\mathcal {I}}_5, \end{gathered} \end{aligned}$$
(29)

where \({\mathcal {D}}_N\), \({\mathcal {Q}}_N\), \({\mathcal {B}}_N\), \(\varDelta _N\) and \({\mathcal {P}}_N\) are the one-dimensional SBP operators, and \({\mathcal {I}}_N\) is the identity operator.Footnote 1 In this context, we choose a diagonal \({\mathcal {P}}_N\). By the definition of SBP operators \({\mathcal {D}}_N={\mathcal {P}}_N^{-1}{\mathcal {Q}}_N\) and \({\mathcal {B}}_N={\mathcal {Q}}_N^\top +{\mathcal {Q}}_N\). The matrices \({\mathcal {B}}_{(\cdot )}\) pick off the interface terms in the respective directions. For the spectral element discretization considered in this paper, the \({\mathcal {B}}_{(\cdot )}\) matrices take on a particularly simple form. For example the matrix \({\mathcal {B}}_{x_1}\) reads

$$\begin{aligned} \begin{gathered} {\mathcal {B}}_{x_1} = {\mathcal {B}}_{x_{1}}^{+}-{\mathcal {B}}_{x_{1}}^{-},\\ {\mathcal {B}}_{x_1}^{-}={{\,\mathrm{diag}\,}}\left( 1,0,\dots ,0\right) \otimes {\mathcal {I}}_{N}\otimes {\mathcal {I}}_{N}\otimes {\mathcal {I}}_{5},\\ {\mathcal {B}}_{x_1}^{+}={{\,\mathrm{diag}\,}}\left( 0,\dots ,0,1\right) \otimes {\mathcal {I}}_{N}\otimes {\mathcal {I}}_{N}\otimes {\mathcal {I}}_{5}. \end{gathered} \end{aligned}$$

For a high-order accurate scheme constructed on tensor product cell, these matrices pick off the values of the vector they act on (typically the solution or the flux vectors) at the nodes of the two opposite faces multiplied by the orthogonal component of the unit normal.

When applying any of the operators (29) to the scalar entropy equation in space, a hat will be used to differentiate the scalar operator from the full vector operator, e.g.

$$\begin{aligned} \widehat{{\mathcal {P}}} = \left( {\mathcal {P}}_N \otimes {\mathcal {P}}_N \otimes {\mathcal {P}}_N \right) . \end{aligned}$$

We finally note that in the present work, the quadrature nodes and solution nodes are collocated.

4.2 Semidiscretization of the Eulerian model

Using the operators shown in (29), we can write the semidiscretization of (1) as

$$\begin{aligned} \frac{\partial {\mathbf {q}}_i}{\partial t}={\mathcal {D}}_{x_i} \left( {\mathbf {f}}^{(V)}_i-{\mathbf {f}}^{(I)}_i\right) +{\mathcal {P}}^{-1}_{x_i}\left( {\mathbf {g}}^{(b)}_{x_i} +{\mathbf {g}}^{(In)}_{x_i}\right) , \end{aligned}$$
(30)

where vectors \({\mathbf {g}}^{(b)}_{x_i}\) enforce the boundary conditions, while \({\mathbf {g}}^{(In)}_{x_i}\) patches interfaces together using a SAT approach [25]. Boldface letters represent quantities, \({\mathbf {q}}\), and functions, \({\mathbf {f}}\) and \({\mathbf {g}}\) for all nodes in an element. Note that the definition \({\mathbf {g}}_{x_i}\) involves the use of operators \({\mathcal {B}}^{-}\) or \({\mathcal {B}}^{+}\) (see the following section), which nonzero out only the contribution of the nodes located at the interfaces.

Following [9, 17], we use the telescoping property of an SBP operator,

$$\begin{aligned} {\mathcal {D}}_{x_i}{\mathbf {f}}^{(I)}_i ={\mathcal {P}}^{-1}_{x_i}{\mathcal {Q}}_{x_i}{\mathbf {f}}^{(I)}_i ={\mathcal {P}}^{-1}_{x_i}\varDelta _{x_i}{\mathcal {I}}_{StoF}{\mathbf {f}}^{(I)}_i ={\mathcal {P}}^{-1}_{x_i}\varDelta _{x_i}\bar{{\mathbf {f}}}^{(I)}_i, \end{aligned}$$
(31)

to re-write (30) as

$$\begin{aligned} \frac{\partial {\mathbf {q}}}{\partial t}= \left( {\mathcal {D}}_{x_i}{\mathbf {f}}^{(V)}_i -{\mathcal {P}}^{-1}_{x_i}\varDelta _{x_i}\bar{{\mathbf {f}}}^{(I)}_i\right) +{\mathcal {P}}^{-1}_{x_i}\left( {\mathbf {g}}^{(b)}_{x_i} +{\mathbf {g}}^{(In)}_{x_i}\right) . \end{aligned}$$
(32)

The vector \(\bar{{\mathbf {f}}}^{(I)}_i\) is defined as \(\bar{{\mathbf {f}}}^{(I)}_i={\mathcal {I}}_{StoF}{\mathbf {f}}^{(I)}_i\) and the one-dimensional telescoping operator, \(\varDelta _{N}\), is given by

$$\begin{aligned} \varDelta _N = \left( \begin{array}{cccccc} -1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} -1 &{} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} \ddots &{} \ddots &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} -1 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} -1 &{} 1 \end{array} \right) . \end{aligned}$$

The operator \({\mathcal {I}}_{StoF}\) interpolates the value at the solution nodes to the interfaces between nodes as shown in Fig. 1.

Additionally, we define \(\left[ \frac{dq}{dw}\right] \) as a block diagonal matrix applied to all LGL points in an element. The kinematic viscosity \(\nu \) is a scalar and we can bring it inside the matrix \(\left[ \frac{dq}{dw}\right] \), i.e., \(\left[ \nu \frac{dq}{dw}\right] \).

Fig. 1
figure 1

Reprinted from [9] with permission

One dimensional discretization using LGL points of order \(p=4\). \(\cdot \) and \(\times \) denote solution and flux points, respectively

Using the procedure based on local discontinuous Galerkin (LDG) and interior penalty (IP) approach described in [13, 25], the semidiscretization (32) can be recast as

$$\begin{aligned}&\frac{\partial {\mathbf {q}}_i}{\partial t} +{\mathcal {P}}^{-1}_{x_i}\varDelta _{x_i}\bar{{\mathbf {f}}}^{(I)}_{i,sc} -{\mathcal {D}}_{x_i}\left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_i} ={\mathcal {P}}^{-1}_{x_i} \left( {\mathbf {g}}^{(b),q}_{x_i} +{\mathbf {g}}^{(In),q}_{x_i}\right) , \end{aligned}$$
(33a)
$$\begin{aligned}&{\varvec{\Theta }}_{x_i}-{\mathcal {D}}_{x_i}{\mathbf {w}} ={\mathcal {P}}^{-1}_{x_i}\left( {\mathbf {g}}^{(b),\varTheta }_{x_i} +{\mathbf {g}}^{(In),\varTheta }_{x_i}\right) , \end{aligned}$$
(33b)

where the symbol \({\varvec{\Theta }}_{x_i}\) is the penalized gradient of the entropy variables in the \(x_i\) direction [25]. The terms \({\mathbf {g}}^{(b),q}_{x_i}\), \({\mathbf {g}}^{(In),q}_{x_i}\), and \({\mathbf {g}}^{(b),\varTheta }_{x_i}\), \({\mathbf {g}}^{(In),\varTheta }\) are the SAT penalty boundary (b) and interface (In) terms on the conservative variables, q, and the gradient of the entropy variables, \(\varTheta \), respectively. The contributions of the interface penalty terms are non-zero only for the interface nodes in the normal direction to the interface.

Remark 3

To build a high-order entropy conservative semidiscretization, the linear interpolation operator \({\mathcal {I}}_{StoF}\) is replaced with a nonlinear interpolation operator [9, 17, 25]. Thus, the operator \({\mathcal {P}}^{-1}_{x_i}\varDelta _{x_i}\bar{{\mathbf {f}}}^{(I)}_{i,sc}\) is a nonlinear operator that is a discrete counterpart to the term that appears in Theorem 2. Thus, we arrive at the following relation

$$\begin{aligned} {\mathbf {1}}^\top {\mathcal {P}}{\mathcal {P}}^{-1}_{x_i} \varDelta _{x_i}\bar{{\mathbf {f}}}^{(I)}_{i,sc} ={\mathbf {1}}^\top \widehat{{\mathcal {P}}}_{x_j,x_k} \widehat{{\mathcal {B}}}_{x_i}{\mathbf {F}}_{x_i} \simeq \int _{x_i=1}{\mathcal {F}}_i\ dx_jdx_k -\int _{x_i=0}{\mathcal {F}}_i\ dx_jdx_k. \end{aligned}$$
(34)

The flux vector \(\bar{{\mathbf {f}}}^{(I)}_{i,sc}\) is constructed using an entropy conservative two-point flux [35], and therefore, it satisfies the relation (11). In the case of an entropy stable flux, \(\bar{{\mathbf {f}}}^{(I)}_{i,ss}\), the resulting term is entropy dissipative [13].

4.3 Time derivative of entropy function

Following the entropy analysis detailed in [9, 24, 25], the semidiscretization (33) yields the following expression for the time derivative of the entropy function, \({\mathcal {S}}\):

(35)

where

$$\begin{aligned} {\mathbf {DT}} =\left\| \left[ \nu \frac{dq}{dw}\right] ^{\frac{1}{2}} {\varvec{\Theta }}_{x_i}\right\| ^2_{\mathcal {P}}, \end{aligned}$$
(36)

and

$$\begin{aligned} \begin{aligned} {\varvec{\Xi }}&=-{\mathbf {1}}^\top \widehat{{\mathcal {P}}}_{x_j,x_k} \widehat{{\mathcal {B}}}_{x_i}{\mathbf {F}}_{x_i}\\&\quad +{\mathbf {w}}^\top {\mathcal {P}}_{x_j,x_k}{\mathcal {B}}_{x_i} \left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_i}\\&\quad +{\mathbf {w}}^\top {\mathcal {P}}_{x_j,x_k} \left( {\mathbf {g}}^{(b),q}_{x_i} +{\mathbf {g}}^{(In),q}_{x_i}\right) \\&\quad +\left( \left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_i} \right) ^\top {\mathcal {P}}_{x_j,x_k}\left( {\mathbf {g}}^{(b),\varTheta }_{x_i} +{\mathbf {g}}^{(In),\varTheta }_{x_i}\right) . \end{aligned} \end{aligned}$$
(37)

The full derivation of (35) is detailed in Appendix A.

Now, consider a cubic element of length 1 with a solid wall with a normal vector in the \(x_i\) direction, we have that the interface penalty terms are zero, i.e., \({\mathbf {g}}^{(In),q}_{x_i}={\mathbf {g}}^{(In),\varTheta }_{x_i}=0\). Therefore, Eq. (37) reduces to

$$\begin{aligned} \begin{aligned} {\varvec{\Xi }}&=-{\mathbf {1}}^\top \widehat{{\mathcal {P}}}_{x_j,x_k} \widehat{{\mathcal {B}}}_{x_i}{\mathbf {F}}_{x_i}\\&\quad +{\mathbf {w}}^\top {\mathcal {P}}_{x_j,x_k}{\mathcal {B}}_{x_i} \left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_i}\\&\quad +{\mathbf {w}}^\top {\mathcal {P}}_{x_j,x_k} {\mathbf {g}}^{(b),q}_{x_i}\\&\quad +\left( \left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_i} \right) ^\top {\mathcal {P}}_{x_j,x_k}{\mathbf {g}}^{(b),\varTheta }_{x_i}. \end{aligned} \end{aligned}$$
(38)

4.4 Entropy stable wall boundary conditions for the semidiscrete system

The boundary condition penalty term with respect to the conservative variables is split into three design-order terms plus one source boundary term:

(39)

The first component of each term is computed from the numerical solution, and the second component is constructed from a combination of the numerical solution and five independent boundary data, as done in [25]. Without loss of generality, in this section, we assume a wall at \(x_i=0\); thus, we use the operator \({\mathcal {B}}^{-}\) to single out the contribution of the cell nodes to the wall nodes.

In the following, we define the inviscid, \({\mathbf {g}}^{(b,I),q}_{x_i}\), and viscous, \({\mathbf {g}}^{(b,V),q}_{x_i}\) and \({\mathbf {g}}^{(b,V),\varTheta }_{x_i}\), contributions in cell notation. Then, we use the point-wise notation to define the remaining terms, and , which are only applied to the boundary interface nodes using the operators \({\mathcal {B}}^{-}\), or \({\mathcal {B}}^{+}\), i.e.,

(40)

and

(41)

The first term enforces Euler no-penetration wall

$$\begin{aligned} {\mathbf {g}}^{(b,I),q}_{x_i}=-\frac{1}{2}{\mathcal {B}}^-_{x_i} \left( {\mathbf {f}}^{(I)}_i -{\mathbf {f}}^{(b,I)}_{i,sc}(v^{(E)},v^{(b,I)})\right) , \end{aligned}$$
(42)

where \({\mathbf {f}}^{(b,I)}_{i,sc}\) is the entropy conservative flux and v represent the primitive variables. The manufactured inviscid states are defined as in [25] for \(i=1\), without loss of generality,

$$\begin{aligned} v^{(E)}={{\,\mathrm{diag}\,}}([1,-1,1,1,1]), \quad \text {and} \quad v^{(b,I)}=\left( \rho ,-{\mathcal {U}}_1,{\mathcal {U}}_2, {\mathcal {U}}_3,{\mathcal {T}}\right) ^\top . \end{aligned}$$
(43)

The viscous boundary term is given as

$$\begin{aligned} {\mathbf {g}}^{(b,V),q}_{x_i}=\frac{1}{2}{\mathcal {B}}^-_{x_i} \left( \left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_i}-{\mathbf {f}}^{(b,V)}_i\right) , \end{aligned}$$
(44)

where \({\mathbf {f}}^{(b,V)}_i\) will be defined later in this section. Together with (44), the following term

$$\begin{aligned} {\mathbf {g}}^{(b,V),\varTheta }_{x_i}=\frac{1}{2}{\mathcal {B}}^-_{x_i} \left( {\mathbf {w}}-{\mathbf {w}}^{(b,V)}\right) , \end{aligned}$$
(45)

enforce the no-slip boundary condition weakly. The analysis of the previous viscous terms match the analysis described by [13, 25] since the entropy variables are the same, and the matrix \(\left[ \nu \frac{dq}{dw}\right] \) is symmetric positive-definite.

The remaining terms are defined in point-wise notation, and thus the bold notation is dropped. The analysis of their contributions is summarized next.

  • The manufactured viscous flux is defined as

    $$\begin{aligned} f^{(b,V)}_i =\left( \nu \frac{dq}{dw}\left( v^{(b,V)}\right) \right) \widetilde{\varTheta }_{x_i}, \end{aligned}$$
    (46)

    where the manufactured viscous boundary primitive variables, \(v^{(b,V)}\), is defined, as in [13], by

    $$\begin{aligned} v^{(b,V)}=\left( \rho , -{\mathcal {U}}_1+2{\mathcal {U}}_1^{\text {wall}}, -{\mathcal {U}}_2+2{\mathcal {U}}_2^{\text {wall}}, -{\mathcal {U}}_3+2{\mathcal {U}}_3^{\text {wall}},{\mathcal {T}}\right) ^\top . \end{aligned}$$
    (47)

    The change of variables matrix, \(\frac{dq}{dw}(v)\), as a function of the primitive variables, v, is defined in Appendix B. The term \(\widetilde{\varTheta }_{x_i}\) is the manufactured gradient of the entropy variables. The construction of \(\widetilde{\varTheta }_{x_i}\) is summarized in Appendix C.

  • The dissipative IP term is an averaged state of the viscous flux evaluated at the primitive state, v, and the manufactured primitive state, \(v^{(b,V)}\),

    $$\begin{aligned} {\mathcal {M}}^{(b,V)}=-\beta \frac{f^{(V)}(v)+f^{(V)}(v^{(b,V)})}{2}, \end{aligned}$$
    (48)

    where \(\beta \) is a positive constant that is scaled with the inverse of the element length in the normal direction, controlling the strength of the penalty term [13].

  • The source term

    $$\begin{aligned} {\mathcal {L}}^{(b,V)}=-\left( 0,0,0,0,1\right) ^\top g(t), \end{aligned}$$
    (49)

    imposes the heat flux boundary condition, as done in [25].

We summarize the results for the RHS of (35) in the following three theorems. The first theorem is a result from [25] and is reprinted here for completeness

Theorem 4

The penalty inviscid flux contribution,  \({\mathbf {g}}^{(b,I),q},\) is entropy conservative if the vector \(v^{(b,I)}\) is defined as in (43).

Proof

The proof of this theorem can be found in [25, Theorem 5.1].

Theorem 5

The penalty terms for the viscous flux in the conserved variables,  \({\mathbf {g}}^{(b,V),q},\) and the gradient of entropy variables,  \({\mathbf {g}}^{(b,V),\varTheta },\) are

  • entropy conservative if the wall is adiabatic,  i.e. \(g(t)=0,\)

  • entropy stable in the presence of a heatflux,  \(g(t)\ne 0,\) where g(t) is a given \(L^2\) function.

Proof

Substituting the expressions for \({\mathbf {g}}^{(b,V),q}\), and, \({\mathbf {g}}^{(b,V),\varTheta }\) into (38), yields

(50)

The function g(t) for an adiabatic wall is \(g(t)=0\). Thus the RHS is zero, and the scheme is entropy conservative. Otherwise, the term g(t) is bounded by data. Hence, the RHS is bounded, completing the proof.

The full details on the computation of (50) are reported in Appendix C.

Theorem 6

The IP term,  added to (39) is entropy dissipative.

Proof

By expanding the penalty terms with respect to the conservative variables, \(g^{(b,V),q}\), and focusing only on the dissipative IP term, \({\mathcal {M}}^{(b,V)}\), in (35), we arrive at

$$\begin{aligned} w^\top {\mathcal {M}}^{(b,V)} =-\frac{2\beta \alpha \mu }{R{\mathcal {T}}^2}\Vert \varDelta {\mathcal {U}}\Vert ^2 \left( \Vert \varDelta {\mathcal {U}}\Vert ^2+R{\mathcal {T}}\right) . \end{aligned}$$
(51)

Thus, \({\mathcal {M}}^{(b,V)}\) is entropy dissipative because all the parameters and variables appearing on the RHS of (51) are positive. This completes the proof.

The full details on the computation of (51) are reported in Appendix D.

5 A common SAT procedure for the imposition of wall boundary conditions and interior interface coupling

The proposed approach for imposing the solid wall boundary conditions allow for a SAT implementation that is identical to the interface treatment shown in [24]. We can use a single subroutine with different inputs corresponding to the imposition of the interior interface couplings, or the adiabatic solid wall, or the wall with a prescribed heat entropy flow. In fact, the interior interface coupling can be written as (see equations (16a–16d) in [24])

$$\begin{aligned}&\frac{\partial {\mathbf {q}}_l}{\partial t} +\left( {\mathcal {P}}^{-1}_{x_{i,l}}\varDelta _{x_{i,l}}\bar{{\mathbf {f}}}^{(I)}_{i,l,sc} -{\mathcal {D}}_{x_{i,l}} \left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_{i,l}} \right) ={\mathcal {P}}^{-1}_{x_{i,l}}{\mathbf {g}}_{x_{i,l}}^{(In),q}, \end{aligned}$$
(52a)
$$\begin{aligned}&{\varvec{\Theta }}_{x_{i,l}} -{\mathcal {D}}_{x_{i,l}}{\mathbf {w}} ={\mathcal {P}}^{-1}_{x_{i,l}}{\mathbf {g}}_{x_{i,l}}^{(In),\varTheta }, \end{aligned}$$
(52b)
$$\begin{aligned}&\frac{\partial {\mathbf {q}}_r}{\partial t} + \left( {\mathcal {P}}^{-1}_{x_{i,r}} \varDelta _{x_{i,r}} \bar{{\mathbf {f}}}^{(I)}_{i,r,sc} -{\mathcal {D}}_{x_{i,r}}\left[ \nu \frac{dq}{dw}\right] {\varvec{\Theta }}_{x_{i,r}} \right) ={\mathcal {P}}^{-1}_{x_{i,r}}{\mathbf {g}}_{x_{i,r}}^{(In),q}, \end{aligned}$$
(52c)
$$\begin{aligned}&{\varvec{\Theta }}_{x_{i,r}} -{\mathcal {D}}_{x_{i,r}}{\mathbf {w}} ={\mathcal {P}}^{-1}_{x_{i,r}}{\mathbf {g}}_{x_i,r}^{(In),\varTheta }. \end{aligned}$$
(52d)

The above equations have exactly the same structure as the LDG-IP approach used for the imposition of the solid wall boundary conditions except for the boundary penalty interface terms, \({\mathbf {g}}_{x_{i,r}}^{(b),\cdot }\) in Eq. (33), which are replaced by the interior penalty interface coupling terms, \({\mathbf {g}}_{x_{i,r}}^{(In),\cdot }\) in Eqs. (52).

6 Numerical results

In this section, we numerically investigate the proposed entropy stable wall boundary conditions. The numerical experiments reported in this paper are performed with the entropy stable collocated Discontinuous Galerkin algorithm and relaxation Runge–Kutta schemes implemented in the hp-adaptive, unstructured, curvilinear grid framework SSDC [26]. SSDC is developed in the AANSLab, which is part of the Extreme Computing Research Center at King Abdullah University of Science and Technology (KAUST). The core entropy stable adaptive algorithms of SSDC are built on top of the Portable and Extensible Toolkit for Scientific computing (PETSc) [2], its mesh topology abstraction (DMPLEX) [20], and its scalable ODE/DAE solver library [1]. The SSDC framework uses a non-dimensional formalism; thus, all quantities are scaled to units. For the Eulerian model, the kinematic viscosity is scaled using \(\alpha =1\). We use the two-point entropy conservative flux presented by [11]. Furthermore, all the simulations have been performed in double (machine) precision. For all the cases, we use the Runge–Kutta scheme of [5] with adaptive time-step and both relative and absolute tolerances set to \(10^{-8}\). The meshes are generated using Gmsh [19], and Pointwise V18.3 released in September, 2019. The SSDC Eulerian and SSDC CNS data computed for this section is available in http://doi.org/10.5281/zenodo.5041436.

6.1 Convergence study

Fig. 2
figure 2

Axial velocity, \({\mathcal {U}}_1\), in a pipe with annular section; Eulerian model with \(\text {Re}=1\), \(\text {Ma}=1e{-}3\)

Table 1 Convergence study for the flow in a pipe with annular cross-section at \(\text {Re}=1\) and \(\text {Ma}=1e{-}3\)
Table 2 Convergence study for the flow in a pipe with annular cross-section at \(\text {Re}=1\) and \(\text {Ma}=1e{-}3\)
Table 3 Convergence study for the flow in a pipe with annular cross-section at \(\text {Re}=1\) and \(\text {Ma}=1e{-}3\)

In this section, we use the method of manufactured solutions (MMS) to verify the accuracy and correct implementation of the proposed boundary conditions. We use a pipe with an annular section and length 1. Similarly to [13], this case is considered for two reasons. First, it has an analytic solution for incompressible flow that cannot be represented in polynomial space [27]. Because we use a compressible formulation instead, we calculate the appropriate source term, giving us the manufactured solution. Second, it allows exercising the high-order mesh capabilities and better approximate the circular geometry of the pipe. The following solution is used for the axial velocity:

$$\begin{aligned} {\mathcal {U}}_1=\frac{G}{4\mu }\left( (R_1^2-r^2)+(R_2^2-R_1^2) \frac{\log (r/R_1)}{\log (R_2/R_1)}\right) , \end{aligned}$$
(53)

where \(R_o=0.5\), \(R_o/R_i=4\), and \(G/\mu =1\) (Fig. 2). We consider uniform density and temperature, and zero nonaxial velocities. The parameters used are \(\text {Re}=1\), \(\text {Ma}=1e{-}3\) and \(\alpha =1\). No-slip adiabatic wall boundary conditions are used on the outer and inner cylinder whereas, periodic boundary conditions are used on the remaining boundaries. We use Mathematica to compute the source term of the Eulerian model [36].

The error calculation uses the following discrete norms

(54)

where \(\Vert \varOmega \Vert \) represents the volume of the computational domain, is the metric Jacobian of the curvilinear transformation from physical space to computational space of the k-th hexahedral element, and K is the total number of non-overlapping hexahedral elements in the mesh.

The results of the convergence study are shown in Tables 1, 2 and 3, where the first column represents the number of elements in the radial and angular coordinates. We observe that the computed order of accuracy is approximately \((p+1)\).

Fig. 3
figure 3

Spinning sphere enclosed in a cubical box; Eulerian model with \(\text {Re}=1\), and \(\text {Ma}=0.05\). The magnitude of the point-wise velocity is used to scale the arrow glyphs vectors and to color the surface of the sphere

Fig. 4
figure 4

Verification of the entropy conservation for the spinning sphere enclosed in a cubical box; Eulerian model with \(\text {Re}=1\), and \(\text {Ma}=0.05\)

6.2 Spinning sphere: verification of the semidiscrete entropy balance

To verify that the scheme enforces no entropy flow through the boundary, we simulate a spinning sphere enclosed in a cubic domain. The sphere rotates at a constant angular velocity around a unit vector given by \(\hat{a_r}=\frac{a_r}{\Vert a_r\Vert }\), where \(a_r=(1,1,1)^\top \). The domain size is \(2\times 2\times 2\) with a sphere of diameter \(D= 0.6\) located at the center of it. Solid wall boundary conditions are imposed on the sphere surface and all six faces of the cubic box. The mesh is composed of 4, 374 hexahedral elements. The sphere surface is discretized with quadratic boundary elements. A solution polynomial degree \(p=5\) is used. We run the Eulerian model with \(\text {Re}=1\), and \(\text {Ma}=0.05\). In Fig. 3, the velocity vector field near the surface of the sphere is shown. The sphere is also colored based on the module of its point-wise velocity vector.

Figure 4a shows the time derivative of the entropy function of the semidiscretization of the Eulerian model (30), , and the dissipation term, \({\mathbf {DT}}\), as a function of time, t (see Eq. (35)). As shown in Fig. 4b, the two terms cancel out, up to machine precision. Therefore, the procedure proposed to impose the boundary conditions is entropy conservative if the IP term in (39) is set to zero. This simulation is a strong numerical verification of what is proven in Sect. 4.4.

Fig. 5
figure 5

Cylinder domain with \(D=1\)

Fig. 6
figure 6

Wake region of the flow past a cylinder at \(\text {Re}=40\) and \(\text {Ma}=0.07\). The background is colored by the magnitude of the point-wise velocity vector solution of the Eulerian model. The wake streamlines for the CNS model are imported from a CNS solution for the same testcase

Table 4 Bubble length, \(L_{\text {bubble}}\), and drag coefficient, \(C_D\)
Fig. 7
figure 7

The density profile for the flow past a cylinder at \(\text {Re}=40\) and \(\text {Ma}=0.07\). The figures are scaled so that differences between the Eulerian and CNS solution densities are visible

Fig. 8
figure 8

Wall pressure coefficient for the flow past a cylinder at \(\text {Re}=40\) and \(\text {Ma} = 0.07\). The reference data are obtained from [23]

Fig. 9
figure 9

Vorticity at the wall for the flow past a cylinder at \(\text {Re}=40\) and \(\text {Ma}=0.07\). The reference data was obtained from [23]

6.3 Laminar flow around a cylinder \(\text {Re}=40\)

In this section, we present the two-dimensional flow around a cylinder of diameter \(D = 1\) at \(\text {Re}=40\), and \(\text {Ma}=0.07\). Figure 5 shows the computational domain and summarizes the boundary conditions. The initial condition is a uniform flow in the \(x_1\) direction. The case is run until convergence to a steady-state. Specifically, we stop the simulation when the residual reaches \(10^{-14}\) and plateau around that value. Entropy stable adiabatic no-slip wall boundary conditions are enforced on the cylinder surface. Far-field boundary conditions are used for the remaining boundaries. The mesh is composed of 1140 elements with quadratic edges for representing the surface of the cylinder. We use a solution polynomial degree \(p =7\). Therefore, the total number of degrees of freedom is 72,960. The solution computed with this setup is denoted here as a “numerically converged solution” in the sense that if we increase the order of accuracy of the method, p, or refine the mesh, the difference between two consecutive numerical solutions for all the primitive variables is machine precision.

First, we compute the length of the recirculation bubble in the wake region. Figure 6 shows the streamlines of the circulation bubble downstream of the sphere. The background is the magnitude of the point-wise velocity vector. The top part of the plot corresponds to the solution computed with the Eulerian model, whereas the bottom part is the solution obtained using the CNS model. Qualitatively, the two solutions look identical. Furthermore, both models show a wake length of 2.25D. The first column in Table 4 compares the length of the bubble with several results published in the literature. The agreement is good. The second column of Table 4 compares the drag coefficient, \(C_D\). The values obtained with both models are very close to each other and agree well with that reported by Calhoun [7] and Russell and Wang [28].

Next, we present some measurements in the boundary layer of the cylinder wall. Figure 7 shows the density profile for both models, where for the Eulerian model, we enforce a zero normal density gradient at the wall. Furthermore, for both models, we use adiabatic solid wall boundary conditions. In Fig. 7a, the difference between the two solution densities is shown, and is smaller than \(1e{-}3\). The difference observed is accumulated at the leading edge and remains consistent along with the tailwind, as shown in Fig. 7. Note that we have different density ranges for each figure. This was done since a unified range does not make differences visible. We highlight that it is remarkable how close the results of the two models are, given their very different structures of the diffusive terms and boundary conditions.

Figure 8 shows the wall pressure coefficient, \(C_p\). The curves obtained with the Eulerian model and the CNS model are very close to each other and follow relatively well the DNS results published by Park et al. [23]. Note that in Park et al. [23], the scheme uses “the second-order central-difference scheme in space.” A similar comparison is made in Fig. 9 for the vorticity at the wall. Again, the curves obtained with the Eulerian model and the CNS model are very close to each other and follow well the DNS results except around \(50^{\circ }\) where they both undershoot the reference results.

6.4 Blast-wave

Fig. 10
figure 10

Density distribution for the blastwave at time \(t=0.01\) computed with the Eulerian and the CNS models. The base figure uses a grid of 32,768 elements

Svärd [32] presents the one-dimensional blastwave as an example where the implementation of the CNS model converges to an unphysical solution. Here, we investigate the same test case. We use \(\text {Re}=10\) and \(\text {Ma}=0.07\), and the same initial conditions as in [32]. All the simulations are performed with \(p=1\). We present the results for a sequence of five uniform nested grids, with respectively 2048, 4096, 8192, 16,384, and 32,768 elements. The solutions obtained with the finest grid are denoted here as “numerically converged solutions”. Solid wall adiabatic no-slip boundary conditions with zero density gradient for the Eulerian model are imposed at the left and right boundaries of the domain.

Svärd [32] observes that since the density flux is not bounded, the solution can converge to a state where the wall dissipates density. This is a non-physical solution and is computed with a non-entropy stable implementation of the CNS model [32]. Our discretization of the Eulerian and CNS models are entropy stable. As we will see shortly, we are unable to reproduce the “lagging” effect observed in [32].

The main plot in Fig. 10 compares the density profiles computed with the Eulerian and the CNS models on the finest grid with 8192 elements. We can easily observe that the two curves do not lie on top of each other. Specifically, we notice a clear difference in the region near the maximum peak, whose position along the x axis also appears to be influenced by the model. Furthermore, differently from [32], we do not notice any difference at the left and right boundaries of the domain between the solution computed with the Eulerian and the CNS models. In Fig. 10, we also report two zoom views of the maximum peaks. There, we plot the density profiles obtained with the five nested grids. We can observe how the solutions approach the “numerically converged solution”. In particular, it appears that the solution obtained with the Eulerian model reaches the “converged state” faster than the solution obtained with the CNS model. Furthermore, we notice that the value of the maximum peak obtained with the Eulerian model is slightly smaller than the same value computed by the CNS model.

6.5 Supersonic flow around a cylinder

Fig. 11
figure 11

The underlying figure was adapted from [26]

Computational domain, hp-nonconforming grid, and solution polynomial degree distribution, p, for the simulation of the supersonic flow past a circular cylinder

Fig. 12
figure 12

Supersonic flow past a cylinder enclosed between two plates at \(\text {Re}=10{,}000\) and \(\text {Ma} = 3.5\)

Fig. 13
figure 13

\(\theta \)\(\beta \)-Ma plot for the flow past a cylinder at \(\text {Re}=10{,}000\), and \(\text {Ma} = 3.5\)

Fig. 14
figure 14

Normalized distance between the shock and the cylinder leading edge for the flow past a cylinder at \(\text {Re}=10{,}000\), and \(\text {Ma} = 3.5\). The background is colored by the point-wise velocity magnitude

In this last test case, we present some results for the flow past a two-dimensional cylinder enclosed between two solid walls [6]. The similarity parameters are \(\text {Re}=10{,}000\) and \(\text {Ma} = 3.5\). The initial condition is a uniform flow with unit density, \(\rho \), unit temperature, T, and only a non-zero unit velocity component in the \(x_1\) direction, \({\mathcal {U}}_1\). The flow is computed with a non-uniform distribution of the solution polynomial degree. Therefore, the solution is computed using the entropy stable p-nonconforming interface technology [16]. The solution polynomial degree distribution is shown in Fig. 11, and it is the same setup used in [26]. Entropy stable adiabatic no-slip wall boundary conditions are enforced on the cylinder surface. Inviscid (slip) wall boundary conditions are imposed on the top and bottom horizontal boundaries, whereas far-field boundary conditions are used for the (left) inlet and the (right) outlet boundaries. The mesh consists of 5067 quadrangles. The solution computed with this setup is denoted here as a “numerically converged solution” in the sense that if we increase the order of accuracy of the method, p, or we refine the mesh, the difference in the solution for all the primitive variables is machine precision. Figure 12 shows the contour plot of the density, \(\rho \), and the velocity component in the \(x_1\) direction, \({\mathcal {U}}_1\), of the developed solution.

A quantitative analysis of the numerical results can be performed using the oblique shock wave theory for the Euler equations [30]. At an oblique shock, the flow changes direction, and there are three directions of interest: the upstream and downstream flow directions and the shock wave direction itself. The most useful relation of oblique shock wave theory is the one providing the deflection angle, \(\theta \), as a function of the shock wave angle, \(\beta \), and local Mach number, \(\text {Ma}\) [21]:

$$\begin{aligned} \tan (\theta )=2\cot (\beta ) \left[ \frac{\text {Ma}^2\sin ^2(\beta )-1}{\text {Ma}^2(\gamma +\cos (2\beta ))+2}\right] . \end{aligned}$$
(55)

The pair \(\theta {-}\beta \) obtained by postprocessing the solutions computed with the Eulerian and CNS models are shown in Fig. 13. We can see that the results for both models are in good agreement with the theoretical curve. Finally, we report the normalized distance between the shock and the leading edge of the cylinder, as shown in Fig. 14. The value of the latter quantity is \(\varDelta /D=0.299\) and \(\varDelta /D=0.308\) for the Eulerian and CNS models, respectively. These values are in good agreement with the approximate value, which reads \(\varDelta /D\simeq 0.193\exp \left( \frac{4.67}{\text {Ma}^2}\right) =0.293\) [4].

7 Conclusion

Guided by the entropy stability analysis, we have derived solid wall boundary conditions that preserve the entropy stability of the Eulerian model for viscous compressible fluids proposed by Svärd [32]. In that context, using summation-by-parts operators and the simultaneous-approximation term technique, we have constructed entropy conservative and entropy stable solid wall boundary conditions for the semidiscretized system, which mimics the continuous entropy analysis results. The proposed boundary conditions have been validated in terms of accuracy, entropy conservation, and entropy stability for a set of test cases of increasing complexity. The numerical results obtained with the Eulerian model have been compared with the solutions computed using the classic compressible Navier–Stokes equations also discretized with an entropy stable methodology constructed using summation-by-parts operators. Differences and similarities have then been highlighted and the models are practically indistinguishable. This study is a first attempt to understand better the effects of the viscous flux term introduced in the conservation of mass equation.