1 Introduction

Hyperbolic systems find a wide range of applications in science and engineering, like the Euler equations of compressible gasdynamics in aerospace engineering, the magnetohydrodynamics (MHD) equations in plasma and astrophysics, the Maxwell equations in computational electromagnetism, the equations of nonlinear hyperelasticity which describe the dynamics of nonlinear elasto-plastic solids under large deformations, or the shallow water equations in geophysics and environmental engineering. A common aspect of these equations is that they can all be written under the form of a symmetrizable and thermodynamically compatible hyperbolic (SHTC) system.

In his groundbreaking work An interesting class of quasilinear systems, Godunov discovered the link between symmetric hyperbolicity in the sense of Friedrichs [44] and thermodynamic compatibility, see [52]. The idea of Godunov was rediscovered independently 10 years later by Friedrichs and Lax [45]. Relevant contributions to the field can also be found in the works of Boillat [13] and Ruggeri [88]. In a series of subsequent papers Godunov and Romenski and collaborators were able to show that the class of SHTC systems covers a rather wide range of known mathematical models, including magnetohydrodynamics [53], nonlinear hyperelasticity [54], compressible multi-phase flows [84, 86] and also fluid and solid mechanics in special and general relativity, see [56, 85]. More complex continuum mechanics with torsion was included in the class of SHTC systems in [78] and very recently a link between the class of SHTC systems and Hamiltonian mechanics was discovered, see [76]. For a general presentation of the SHTC framework the reader is referred to [83] and [55]. All SHTC systems can be derived from an underlying variational principle and the total energy potential appearing in the Lagrangian has therefore a privileged role in the SHTC framework. This special role of the total energy potential is also justified by the connection with Hamiltonian mechanics. A common point of view adopted in the framework of most SHTC systems is therefore that the entropy density is seen as a primary evolution variable, while the conservation law for the total energy density is seen as the consequence, since total energy conservation can be obtained as an extra conservation law after a suitable linear combination of all the other evolution equations with the so-called thermodynamic dual variables or main field variables [88], which are the partial derivatives of the total energy density with respect to the conservative variables.

Since the seminal work of Tadmor [92] on entropy compatible schemes, many schemes have been developed in order to obtain thermodynamic compatibility on the discrete level according to the ideas of Friedrichs and Lax [45], i.e. discretizing the energy conservation law directly and obtaining the entropy inequality as a consequence of the other equations. For recent works on high order entropy-compatible finite volume and discontinuous Galerkin finite element schemes for systems of conservation laws the reader is referred to [27, 28, 30, 38, 43, 46, 48, 60, 70, 81, 82, 87, 89] and references therein. Entropy-compatible schemes for non-conservative hyperbolic equations were introduced, for example, in [2, 42]. Most of the above-mentioned schemes rely on the framework introduced by Tadmor in [92], while a completely different and very simple and general framework for the construction of compatible numerical schemes that satisfy extra conservation laws at the discrete level was very recently forwarded in [1, 2, 4,5,6]. For the sake of completeness, we also would like to mention recent developments in the context of thermodynamically compatible schemes for Lagrangian hydrodynamics, see [8, 25, 72].

Up to now, there are only very few numerical schemes which try to construct a dual algorithm to the framework of Tadmor and in line with the philosophy of SHTC systems, namely numerical schemes that discretize the entropy inequality directly and which obtain the total energy equation as a natural consequence of the thermodynamically compatible discretization of all other equations. First attempts have been documented recently in [3, 20,21,22], where thermodynamically compatible finite volume schemes were introduced that obtain the total energy conservation as a consequence of all the other equations, thus creating the missing dual algorithms to the entropy-compatible schemes of Tadmor. For the construction of a thermodynamically compatible flux for the underlying Euler and shallow water subsystems our method makes use of the Godunov parametrization in terms of a generating potential.

It is the aim of the present paper to extend the above mentioned thermodynamically compatible finite volume schemes to the discontinuous Galerkin finite element framework, i.e. we want to construct new thermodynamically compatible DG schemes that directly discretize the entropy inequality and which obtain discrete total energy conservation as a consequence. Therefore, our new DG schemes will satisfy a cell entropy inequality by construction and can be proven to be nonlinearly stable in the energy norm. We want to stress that is is not the aim of this paper to develop better numerical schemes compared to existing ones, which directly discretize the total energy conservation equation and which obtain the entropy inequality as a consequence. In this paper, instead, we want to promote a radically new concept in the field of entropy-compatible DG schemes. For an introduction to high order DG schemes, the reader is referred to the seminal papers of Cockburn and Shu [32,33,34,35,36,37], while the first proof of nonlinear \(L^2\) stability and verification of a discrete cell entropy inequality for DG schemes was presented for nonlinear scalar conservation laws in [63].

We also would like to clearly point out the two main limitations of the DG method presented in this paper: first, all mathematical proofs rely on the assumption of an exact calculation of all integrals, as in [63]. While at least in principle arbitrary accuracy can be achieved via suitable adaptive numerical quadrature, this assumption is rather restrictive for practical purposes. In the actual implementation we have always used \(N+1\) Gauss-Legendre quadrature points to approximate the integrals for DG schemes of polynomial approximation degree N. Future work will include a generalization of the HTC DG schemes presented in this paper to account also for numerical quadrature errors. Second, we have not yet developed suitable thermodynamically compatible limiters, but we rather rely on a simple artificial viscosity approach to stabilize our scheme in the presence of shock waves or steep gradients. Future research concerning the two previous points will be needed, but is out of scope of the present work.

The rest of this article is organized as follows. In Sect. 2 we present the two governing PDE systems that are discretized in this paper, namely the unified first order hyperbolic GPR model of continuum mechanics [22, 40, 77, 83] and the first order hyperbolic model of unsteady turbulent shallow water flows introduced and studied by Gavrilyuk et al. in [49, 50, 62]. In Sect. 3 we first present the new semi-discrete DG schemes in one space dimension, for pedagogical reasons and to facilitate the reading, and subsequently we extend it also to multiple space dimensions. A set of numerical results obtained with the new HTC DG schemes is presented for both governing PDE systems in Sect. 4. The paper is rounded-off by some concluding remarks and an outlook to future work in Sect. 5.

2 Governing Equations

2.1 Godunov–Peshkov–Romenski (GPR) Model of Continuum Mechanics

We consider the following first order hyperbolic model of continuum mechanics regularized with vanishing viscosity terms and which goes back to the work of Godunov [52], Godunov and Romenski [54, 55, 83] and Peshkov and Romenski, see [40, 77]:

$$\begin{aligned}&\frac{\partial \rho }{\partial t}+\frac{\partial (\rho v_k)}{\partial x_k} {- \frac{\partial }{\partial x_m} \!\! \left( \epsilon \frac{\partial \rho }{\partial x_m} \right) } = 0, \end{aligned}$$
(1a)
$$\begin{aligned}&\frac{\partial \rho v_i}{\partial t}+\frac{\partial \left( \rho v_i v_k + p \, \delta _{ik} {\, + \, \sigma _{ik} + \omega _{ik}} \right) }{\partial x_k} {-\frac{\partial }{\partial x_m} \!\! \left( \epsilon \frac{\partial \rho v_i}{\partial x_m} \right) } = 0, \end{aligned}$$
(1b)
$$\begin{aligned}&\frac{\partial \rho S}{\partial t}+\frac{\partial \left( \rho S v_k {\, + \, \beta _k} \right) }{\partial x_k} { - \frac{\partial }{\partial x_m} \!\! \left( \epsilon \frac{\partial \rho S}{\partial x_m} \right) } = {\Pi } \, {+ \dfrac{\alpha _{ik} \alpha _{ik} }{\theta _1(\tau _1) T} + \dfrac{\beta _i \beta _i}{\theta _2(\tau _2) T} } \ge 0, \end{aligned}$$
(1c)
$$\begin{aligned}&{\frac{\partial A_{i k}}{\partial t}+\frac{\partial (A_{im} v_m)}{\partial x_k} + v_m \left( \frac{\partial A_{ik}}{\partial x_m}-\frac{\partial A_{im}}{\partial x_k}\right) } {-\frac{\partial }{\partial x_m} \!\! \left( \epsilon \frac{\partial A_{ik}}{\partial x_m} \right) } = {-\dfrac{ \alpha _{ik} }{\theta _1(\tau _1)} }, \end{aligned}$$
(1d)
$$\begin{aligned}&{\frac{\partial J_k}{\partial t}+\frac{\partial \left( J_m v_m + T \right) }{\partial x_k} + v_m \left( \frac{\partial J_{k}}{\partial x_m}-\frac{\partial J_{m}}{\partial x_k}\right) } {-\frac{\partial }{\partial x_m} \!\! \left( \epsilon \frac{\partial J_{k}}{\partial x_m} \right) } = {-\dfrac{\beta _k}{\theta _2(\tau _2)}}, \end{aligned}$$
(1e)
$$\begin{aligned}&\frac{\partial {\mathcal {E}}}{\partial t}+\frac{\partial \left( v_k \left( {\mathcal {E}}_1 \!+\! {\mathcal {E}}_2 {+ {\mathcal {E}}_3 + {\mathcal {E}}_4} \right) + v_i \, (p \, \delta _{ik} {+ \sigma _{ik}+\omega _{ik}}) { + h_k} \right) }{\partial x_k} {-\frac{\partial }{\partial x_m} \!\! \left( \epsilon \frac{\partial {\mathcal {E}}}{\partial x_m} \right) } = 0. \qquad \end{aligned}$$
(1f)

In the overdetermined system above \({\mathbf {q}}=\{q_i\} = (\rho , \rho v_i, \rho S, {A_{ik}}, {J_k})^T\) denotes the state vector, the total energy potential is \({\mathcal {E}} = \rho E ={\mathcal {E}}_1 +{\mathcal {E}}_2 {\, + \, {\mathcal {E}}_3 + {\mathcal {E}}_4} \) with \({\mathcal {E}}_i = \rho E_i\), \(\epsilon >0\) is a vanishing viscosity and the nonnegative entropy production term due to the viscous terms is given by

$$\begin{aligned} {\Pi = \frac{\epsilon }{T} \, \partial _{x_m} q_i \,\, \partial ^2_{q_i q_j} {\mathcal {E}} \, \partial _{x_m} q_j \ge 0}. \end{aligned}$$
(2)

The positivity of this term comes from \(\epsilon >0\) and since we assume a positive temperature \(T > 0\) and that the Hessian of the total energy potential is at least positive semi-definite, \({\mathcal {H}}_{ij}:=\partial ^2_{q_i q_j} {\mathcal {E}} \ge 0\). Throughout this paper, we use the notations \(\partial _p = \partial / \partial p\) and \(\partial ^2_{pq} = \partial ^2 / (\partial p \partial q)\) for the first and second partial derivatives w.r.t. generic coordinates or quantities p and q, which may also be vectors or components of a vector. Furthermore, we make use of the Einstein summation convention over repeated indices. Last but not least, in some occasions we also use bold face symbols in order to denote vectors and matrices, e.g. \({\mathbf {q}}=\{q_i\}\) and \({\mathbf {A}}=\{A_{ik}\}\), and so on. In the above model the four contributions to the total energy density are

$$\begin{aligned} {\mathcal {E}}_1 = \frac{\rho ^\gamma }{\gamma -1} e^{S/c_v}, \quad {\mathcal {E}}_2 = \frac{1}{2}\rho v_i v_i, \quad {\mathcal {E}}_3 = \frac{1}{4} \rho c_s^2 \mathring{G}_{ij} \mathring{G}_{ij}, \quad {\mathcal {E}}_4 = \frac{1}{2}c_h^2 \rho J_i J_i, \end{aligned}$$
(3)

with the components of the metric tensor \({\mathbf {G}}\) and its trace-free part \(\mathring{{\mathbf {G}}}\) given by \({G}_{ik} = A_{ji} A_{jk} \) and \(\mathring{G}_{ik} = {G}_{ik} - \frac{1}{3} \, G_{mm} \delta _{ik}\). The total energy density associated with the Euler subsystem is \({\mathcal {E}}^{12} = {\mathcal {E}}_1 + {\mathcal {E}}_2\). The vector of thermodynamic dual variables reads \({\mathbf {p}} = \partial _{{\mathbf {q}}} {\mathcal {E}}=\{p_i\} = \left( r, v_i, T, {\alpha _{ik}}, {\beta _k} \right) ^T\) with

$$\begin{aligned} r = \partial _{\rho } {\mathcal {E}}, \quad v_i = \partial _{\rho v_i} {\mathcal {E}}, \quad T = \partial _{\rho S} {\mathcal {E}}, \quad \alpha _{ik} = \partial _{A_{ik}} {\mathcal {E}}, \quad \beta _{k} = \partial _{J_{k}} {\mathcal {E}}. \end{aligned}$$
(4)

The pressure is defined as \( p = \rho \, \partial _\rho {\mathcal {E}} + \rho v_i \, \partial _{\rho v_i} {\mathcal {E}} + \rho S \, \partial _{\rho S} {\mathcal {E}} - {\mathcal {E}} = \rho ^2 \partial _\rho E, \) the stress tensors due to shear stress and thermal stress are, respectively,

$$\begin{aligned} \sigma _{ik} =\! A_{ji} \partial _{A_{jk}} {\mathcal {E}} = \! A_{ji} \alpha _{jk} = \rho c_s^2 G_{ij} \mathring{G}_{jk}, \;\;\; \omega _{ik} = \! J_i \partial _{J_{k}} {\mathcal {E}} = \! J_i \beta _{k} = \rho c_h^2 J_i J_k, \end{aligned}$$
(5)

while the heat flux vector is given by

$$\begin{aligned} h_k = \partial _{\rho S} {\mathcal {E}} \, \partial _{J_k} {\mathcal {E}} = T \beta _k = \rho c_h^2 T J_k. \end{aligned}$$
(6)

The total energy flux \(F_k\) can be decomposed into a contribution from the Euler subsystem (black terms) and the remaining terms (red terms) as \(F_k\! =\! F_k^{12}\! + \! {F_k^{34}}\!\), with

$$\begin{aligned} F_k^{12}= & {} v_k \left( {\mathcal {E}}_1 + {\mathcal {E}}_2 \right) + v_i \delta _{ik} p, \nonumber \\ {F_k^{34}}= & {} {v_k \left( {\mathcal {E}}_3 + {\mathcal {E}}_4 \right) + v_i \left( \sigma _{ik} + \omega _{ik} \right) + h_k }. \end{aligned}$$
(7)

Note that for our convenience, we use the opposite sign in the definition of the stress tensor compared to the generally accepted notation. Furthermore, \(\theta _1(\tau _1)>0\) and \(\theta _2(\tau _2)>0\) are two algebraic functions of the state vector \({\mathbf {q}}\) and the positive relaxation times \(\tau _1>0\) and \(\tau _2>0\):

$$\begin{aligned} \theta _1 = \frac{1}{3} \rho z_1 \tau _1 \, c_s^2 \, \left| {\mathbf {A}} \right| ^{-\frac{5}{3}}, \qquad \theta _2 = \rho z_2 \tau _2 \, c_h^2, \qquad z_1 = \frac{\rho _0}{\rho }, \qquad z_2 = \frac{\rho _0 T_0}{\rho \, T}, \end{aligned}$$
(8)

with \( \rho _0 \) and \( T_0 \) being some reference density and temperature. It is easy to check that (1f) is a consequence of (1a)–(1e), i.e.

$$\begin{aligned} (1{\mathrm{f}}) = r \cdot (1{\mathrm{a}}) + v_i \cdot (1{\mathrm{b}}) + T \cdot (1{\mathrm{c}}) + \alpha _{ik} \cdot (1{\mathrm{d}}) + \beta _{k} \cdot (1{\mathrm{e}}). \end{aligned}$$
(9)

In [40] a formal asymptotic analysis of the model (1a)–(1f) was carried out, revealing that in the stiff limit the stress tensor \(\sigma _{ik}\) and the heat flux \(h_k\) tend to

$$\begin{aligned} \sigma _{ik} = -\frac{1}{6} \rho _0 c_s^2 \tau _1 \left( \partial _k v_i + \partial _i v_k - \frac{2}{3} \left( \partial _m v_m\right) \delta _{ik} \right) , \qquad h_k = - \rho _0 T_0 c_h^2 \tau _2 \partial _k T, \end{aligned}$$
(10)

i.e. when the relaxation times \(\tau _1, \tau _2\rightarrow 0\), the Navier–Stokes–Fourier equations are retrieved, with effective shear viscosity \( \mu = \frac{1}{6} \rho _0 c_s^2 \tau _1 \) and heat conductivity \( \kappa = \rho _0 T_0 c_h^2 \tau _2 \).

2.2 Turbulent Shallow Water Flows (TSW)

The second model considered is the following overdetermined hyperbolic model for turbulent shear shallow water flows (TSW) in multiple space dimensions, which has been recently proposed by Gavrilyuk and Ivanova et al. in [50] and which was also applied and studied in [12, 29, 62]. In this paper, we employ the reformulation proposed in [21] in terms of a new evolution variable \({\mathbf {Q}}\) that allows to rewrite the Reynolds stress tensor \({\mathbf {P}}\) as \({\mathbf {P}} = {\mathbf {Q}} {\mathbf {Q}}^T\). Note that the original Reynolds stress tensor \({\mathbf {P}}\) is symmetric and positive definite, while \({\mathbf {Q}}\) is not symmetric. There are three reasons for such a decomposition: first, the interesting analogy with the GPR model of continuum mechanics, where the symmetric positive definite metric tensor \({\mathbf {G}}= {\mathbf {A}}^T {\mathbf {A}}\) is written in terms of the non-symmetric distortion field \({\mathbf {A}}\) (the inverse deformation gradient for purely elastic materials), see [21] and eqn. (16) below; second, there is a purely numerical advantage, since the evolution of \({\mathbf {Q}}\) instead of \({\mathbf {P}}\) allows the discrete trace of \({\mathbf {P}}\) to be naturally non-negative, while this is non-trivial for high order DG schemes when evolving \({\mathbf {P}}\) directly, see also [21]; third, the total energy potential is a quadratic function in terms of \({\mathbf {Q}}\), while it is not in terms of \({\mathbf {P}}\). The quadratic dependence on \({\mathbf {Q}}\) is important for the construction of thermodynamically compatible schemes, as those presented in [21] and in this paper. For more details concerning the physical interpretation of the PDE for \({\mathbf {Q}}\) and the various motivations why to choose this evolution variable rather than the original Reynolds stress tensor \({\mathbf {P}}\), see [21].

With \(P_{ik} = Q_{im} Q_{km}\) written in terms of the new evolution variable \({\mathbf {Q}}\) and the notation \(\partial _m = \partial / \partial x_m\) the turbulent shallow water system can be rewritten as an overdetermined PDE system as follows:

$$\begin{aligned}&\partial _t h + \partial _m (h v_m) {- \left( \epsilon \frac{\partial h}{\partial x_m} \right) } = 0 , \end{aligned}$$
(11a)
$$\begin{aligned}&\partial _t (h v_i) + \partial _k \left( h v_i v_k + \frac{1}{2} g h^2 \delta _{ik} + {h P_{ik}} \right) {-\frac{\partial }{\partial x_m} \left( \epsilon \frac{\partial h v_i}{\partial x_m} \right) } = 0, \end{aligned}$$
(11b)
$$\begin{aligned}&{\partial _t Q_{ik} + v_m \, \partial _m \, Q_{ik} + \left( \partial _m v_i \right) \, Q_{mk}} {-\frac{\partial }{\partial x_m} \left( \epsilon \frac{\partial Q_{ik}}{\partial x_m} \right) } = {\Pi _{ik}}, \quad \quad \end{aligned}$$
(11c)
$$\begin{aligned}&\partial _t {\mathcal {E}}+ \partial _i \left( ({\mathcal {E}}_1 + {{\mathcal {E}}_2}) v_i + \left( \frac{1}{2} g h^2 \delta _{ik} + {h P_{ik}} \right) \! v_k \right) {-\frac{\partial }{\partial x_m} \left( \epsilon \frac{\partial {\mathcal {E}}}{\partial x_m} \right) } = 0, \end{aligned}$$
(11d)

with the evolution variables \(h\!=\!h(\mathbf {x},t)\), \(h {\mathbf {v}}\!=\! h{\mathbf {v}}(\mathbf {x},t)\), \({\mathbf {Q}}\!=\!{\mathbf {Q}}(\mathbf {x},t)\), the Reynolds stress tensor \(\mathbf {P}=\mathbf {P}(\mathbf {x},t)\), and the total energy \({\mathcal {E}}= hE = {\mathcal {E}}_1 + {\mathcal {E}}_2 + {{\mathcal {E}}_3} \), that can be decomposed into three contributions with \({\mathcal {E}}_1 = hE_1 = \frac{1}{2}g h^2\), \({\mathcal {E}}_2 = h E_2 = \frac{1}{2}h v_i v_i\) and \({\mathcal {E}}_3 = h E_3 = \frac{1}{2}h Q_{ik} Q_{ik}\). Here, \({\mathcal {E}}^{12}={\mathcal {E}}_1 + {\mathcal {E}}_2\) is the total energy potential of the shallow water subsystem in (11a)–(11b) (black terms) and \({\mathcal {E}}_3\) is the total energy associated with the new object \(Q_{ik}\) (red terms). In what follows, we will again decompose the inviscid part of the total energy flux in (11d) as

$$\begin{aligned} F_k = \left( {\mathcal {E}}_{1} + {\mathcal {E}}_{2} \right) v_k + \frac{1}{2} g h^2 \delta _{ik} v_i + {{\mathcal {E}}_3 v_k + v_i h P_{ik}} = F_k^{12} + {F_k^{34}}, \end{aligned}$$
(12)

with the abbreviations

$$\begin{aligned} F_k^{12} = \left( {\mathcal {E}}_{1} + {\mathcal {E}}_{2} \right) v_i + \frac{1}{2} g h^2 v_i, \qquad F_k^{34} = {\mathcal {E}}_3 v_k + v_i h P_{ik} \end{aligned}$$
(13)

that will be used later. Here, \(F^{12}\) corresponds to the energy flux related to the shallow water subsystem (black terms) and \(F^{34}\) to the energy flux related to the work of the Reynolds stress tensor (red terms). The production term, \(\Pi _{ik}\), which is needed to achieve the consistency of (11a)–(11c) with the total energy conservation law (11d), reads

$$\begin{aligned} \Pi _{ik} = \epsilon \frac{Q_{ik}}{h \, \text {tr}{\mathbf {P}} } \, \partial _m q_i \, \left( \partial ^2_{q_i q_j} {\mathcal {E}}\right) \, \partial _m q_j. \end{aligned}$$
(14)

In (14) the vector \({\mathbf {q}}=q_i = (h, h v_i, Q_{ik})\) indicates the vector of primary state variables and \(\partial ^2_{q_i q_j} {\mathcal {E}}\) is the Hessian matrix of the total energy potential with respect to these state variables. One can show that the Hessian matrix is positive definite for sufficiently small turbulent kinetic energy \(Q_{ij} Q_{ij}\) compared to gh, namely \(Q_{ij} Q_{ij} < gh\), which is a rather mild assumption, see [21] for details. In [21] it was also shown that the energy conservation law (11d) is a consequence of Eqs. (11a)–(11c). Concerning the entropy inequality associated with the turbulent shallow water equations, in [21, 62] it was shown that the following entropy inequality is a consequence of system (11):

$$\begin{aligned} \partial _t |{\mathbf {Q}}| + \partial _m \left( v_m |{\mathbf {Q}}| \right) = \epsilon \frac{|{\mathbf {Q}}| \delta _{kk}}{h \, \text {tr}{\mathbf {P}} } \, \partial _m q_i \, \left( \partial ^2_{q_i q_j} {\mathcal {E}}\right) \, \partial _m q_j \ge 0, \end{aligned}$$
(15)

with \(\delta _{ik}\) the usual Kronecker symbol and \(|{\mathbf {Q}}|=\det ({\mathbf {Q}})\) denoting the determinant of \({\mathbf {Q}}\). However, obtaining a discrete analogue of (15) is clearly out of scope of the present paper, since it would require a provably compatible discretization of the Jacobi identity of the time derivative of the determinant of a matrix.

Note that the system (11) contains non-conservative terms that do not vanish across shock waves, see [62]. This poses many challenges from a theoretical as well as from a numerical point of view. As already pointed out in [21, 62] the key ingredient for a successful numerical discretization of (11) is the discrete consistency of the numerical scheme with the total energy conservation law. In [62] this discrete consistency was imposed via a suitable wave splitting approach that made use of total energy conservation in each sub step of the split scheme. In [21] total energy conservation was instead achieved either via a provably thermodynamically compatible discretization, as used in this paper, or via a suitable rescaling of \({\mathbf {Q}}\) at the end of each time step, such as to enforce discrete energy conservation. For a more detailed discussion on this topic, see [21]. Note that the governing PDE for \({\mathbf {Q}}\) (11c) is formally very similar to the governing PDE for the distortion field \(A_{ik}\) in nonlinear hyperelasticity, (1d), which after application of the product rule reads

$$\begin{aligned} \partial _t A_{ik} + v_m \partial _m \, A_{ik} + A_{im} \left( \partial _k v_m \right) {-\frac{\partial }{\partial x_m} \!\! \left( \epsilon \frac{\partial A_{ik}}{\partial x_m} \right) } = - \frac{ E_{A_{ik}}}{\theta _1(\tau _1)}. \end{aligned}$$
(16)

As one can easily see, the order of the matrix-product in the third term on the left hand side of (11c) and (16) is exchanged.

2.3 The Godunov Form of Hyperbolic Systems of Conservation Laws

The Godunov form, [52], of the inviscid Euler subsystem in (1) and of the shallow water subsystem in (11) (black terms) reads

$$\begin{aligned}&\partial _t \left( \partial _{{\mathbf {p}}} L^{12} \right) + \partial _k \left( \partial _{{\mathbf {p}}} (v_k L^{12}) \right) = 0, \end{aligned}$$
(17)
$$\begin{aligned}&{\mathbf {q}}= \partial _{{\mathbf {p}}} L^{12}, \quad {\mathbf {p}}= \partial _{{\mathbf {q}}} {\mathcal {E}}^{12}, \quad {\mathbf {f}}_k = \partial _{{\mathbf {p}}} (v_k L^{12}), \quad F^{12}_k = {\mathbf {p}}\cdot {\mathbf {f}}_k - v_k L^{12}. \end{aligned}$$
(18)

The so-called generating potential \(L^{12}\), which is the Legendre transform of the total energy density related to the Euler/shallow water subsystem \({\mathcal {E}}^{12}= {\mathcal {E}}_{1} + {\mathcal {E}}_{2}\), is defined as

$$\begin{aligned} L^{12} = {\mathbf {p}}\cdot {\mathbf {q}}- {\mathcal {E}}^{12}. \end{aligned}$$
(19)

It is easy to check that with the above parametrization of the hyperbolic system according to Godunov, the extra conservation law for the total energy density takes the form

$$\begin{aligned} \partial _t {\mathcal {E}}^{12}+ \partial _k F^{12}_k = 0 \end{aligned}$$
(20)

with the related total energy flux \(F^{12}_k\).

2.4 General Formulation

Both PDE systems presented previously, i.e. the GPR model (1) and the hyperbolic model for turbulent shallow water flows (11) can be cast into the following general form

$$\begin{aligned} \partial _t {\mathbf {q}}+ \partial _k {\mathbf {f}}_k({\mathbf {q}}) + {\partial _k {\mathbf {h}}_k({\mathbf {q}}) + {\mathbf {B}}_k({\mathbf {q}}) \partial _k {\mathbf {q}}} - {\partial _m \left( \epsilon \partial _m {\mathbf {q}}\right) } = {{\mathbf {P}}} + {{\mathbf {S}}({\mathbf {q}})}, \end{aligned}$$
(21)

with the extra conservation law for the total energy density

$$\begin{aligned} \frac{\partial {\mathcal {E}}}{\partial t} + \partial _k {F}_k - \partial _m \left( \epsilon \partial _m {\mathcal {E}} \right) = 0. \end{aligned}$$
(22)

Here, the flux tensor \({\mathbf {f}}_k({\mathbf {q}})\) is related to the terms that directly fall into the formalism of Godunov (black terms), the flux tensor \({\mathbf {h}}_k({\mathbf {q}})\) and the nonconservative product \({\mathbf {B}}_k({\mathbf {q}}) \partial _k {\mathbf {q}}\) include the terms that are not directly contained in the Godunov formalism (red terms), the dissipation is \(\partial _m \left( \epsilon \partial _m {\mathbf {q}}\right) \) with the associated entropy production \({\mathbf {P}}\) (blue terms) and the relaxation source terms are denoted by \({\mathbf {S}}({\mathbf {q}})\) (green terms). In the extra conservation law (22) the total energy flux is denoted by \(F_k=F_k({\mathbf {q}})\).

Since \({\mathbf {p}}= \partial _{\mathbf {q}}{\mathcal {E}}\) and therefore \({\mathbf {p}}\cdot \partial _t {\mathbf {q}}= \partial _t {\mathcal {E}}\), for thermodynamic compatibility of the full system (21) with (22) the following identity must hold:

$$\begin{aligned} {\mathbf {p}}\cdot \left( \partial _k {\mathbf {f}}_k({\mathbf {q}}) + \partial _k {\mathbf {h}}_k({\mathbf {q}}) \right) + {\mathbf {p}}\cdot {\mathbf {B}}_k({\mathbf {q}}) \partial _k {\mathbf {q}}= \partial _k F_k. \end{aligned}$$
(23)

The above condition can be divided into two separate equalities,

$$\begin{aligned} {\mathbf {p}}\cdot \partial _k {\mathbf {f}}_k({\mathbf {q}})= & {} \partial _k F_k^{12}, \end{aligned}$$
(24)
$$\begin{aligned} {\mathbf {p}}\cdot \partial _k {\mathbf {h}}_k({\mathbf {q}}) + {\mathbf {p}}\cdot {\mathbf {B}}_k({\mathbf {q}}) \partial _k {\mathbf {q}}= & {} \partial _k F_k^{34}, \end{aligned}$$
(25)

which mean compatibility of the flux terms and of the non-conservative products with the corresponding contribution to the total energy flux. Moreover, we also have

$$\begin{aligned} {\mathbf {p}}\cdot {\mathbf {P}} + {\mathbf {p}}\cdot \partial _m \left( \epsilon \partial _m {\mathbf {q}}\right) = \partial _m \left( \epsilon \partial _m {\mathcal {E}} \right) , \end{aligned}$$
(26)

i.e. compatibility of the dissipation terms with the production term and

$$\begin{aligned} {\mathbf {p}}\cdot {\mathbf {S}}({\mathbf {q}}) = 0, \end{aligned}$$
(27)

is required in order to have compatibility of the algebraic source terms.

3 Numerical Method

3.1 Review of Thermodynamically Compatible Finite Volume Schemes

In this section we first briefly recall the new class of thermodynamically compatible HTC finite volume schemes forwarded in [21, 22] for the GPR model and for the hyperbolic model of turbulent shallow water flows and in [20] for the MHD equations. All these schemes obtain the total energy conservation law as a consequence of all other equations. Recalling these schemes here is useful since their thermodynamically compatible numerical flux and the appropriate discretization of the fluctuations will be also the basis of the high order DG schemes proposed in this paper. Given a spatial control volume denoted by \(\Omega ^{\ell } \) with circumcenter \({\mathbf {x}}^{\ell }\), and denoting one of its neighbors by \( \Omega ^{{\mathcal {r}}} \) and the common edge by \( \partial \Omega ^{\ell {\mathcal {r}}} \), \({\mathbf {n}}^{\ell {\mathcal {r}}} = (n_1^{\ell {\mathcal {r}}},n_2^{\ell {\mathcal {r}}})^T\) being the outward pointing unit normal vector to the face \(\partial \Omega ^{\ell {\mathcal {r}}}\), with \({\mathbf {n}}^{{\mathcal {r}}\ell }=-{\mathbf {n}}^{\ell {\mathcal {r}}}\), and denoting by \(N_{\ell }\) the set of neighbors of cell \(\Omega ^\ell \), then the thermodynamically compatible finite volume schemes [20,21,22] read as follows:

$$\begin{aligned} \frac{\partial {\mathbf {q}}^{\ell }}{\partial t}= & {} - \frac{1}{\left| \Omega ^{\ell }\right| } \sum _{{\mathcal {r}}\in N_{\ell }} \left| \partial \Omega ^{\ell {\mathcal {r}}}\right| \left( {\mathcal {F}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}}+ {{\mathcal {R}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}}} \, \right. \nonumber \\&\quad +\, \left. {{\mathcal {G}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}}}+ {{\mathbf {P}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) }\right) + {{\mathbf {S}}({\mathbf {q}}^{\ell })}. \end{aligned}$$
(28)

The thermodynamically compatible numerical flux in normal direction \({\mathcal {F}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}}\) is based on a discrete Godunov formalism, making use of the generating potential \(L^{12}\) and a path integral along a straight line segment path in the main field (thermodynamic dual) variables, which leads to the so-called p-scheme proposed in [21],

$$\begin{aligned} {\mathcal {F}}^{\ell {\mathcal {r}}} = {\mathcal {F}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}} = \int \limits _{s=0}^{1} {\mathbf {f}}_k\left( \varvec{\Psi }({\mathbf {p}}^{\ell },{\mathbf {p}}^{{\mathcal {r}}},s)\right) \cdot n_k^{\ell {\mathcal {r}}} \, ds, \end{aligned}$$
(29)

with the path given by

$$\begin{aligned} \varvec{\Psi }({\mathbf {p}}^{\ell },{\mathbf {p}}^{{\mathcal {r}}},s) = {\mathbf {p}}^{\ell } + s \left( {\mathbf {p}}^{{\mathcal {r}}} - {\mathbf {p}}^{\ell }\right) . \end{aligned}$$
(30)

The path integral is calculated numerically at the aid of a Gauss-Legendre quadrature of sufficient accuracy. It is easy to check, see [20,21,22], that with the Godunov parametrization of the physical flux \({\mathbf {f}}_k = \partial _{{\mathbf {p}}}(v_k L^{12})\) in terms of the generating potential \(L^{12} = {\mathbf {p}}\cdot {\mathbf {q}}- {\mathcal {E}}^{12}\) the numerical flux (29) satisfies the compatibility property

$$\begin{aligned} {\mathcal {F}}^{\ell {\mathcal {r}}} \cdot \left( {\mathbf {p}}^{{\mathcal {r}}} - {\mathbf {p}}^{\ell } \right) = \left( \left( v_k L^{12}\right) ^{{\mathcal {r}}} - \left( v_k L^{12}\right) ^{\ell } \right) n_k^{\ell {\mathcal {r}}} \end{aligned}$$
(31)

and since \(F^{12}_k = {\mathbf {p}}\cdot {\mathbf {f}}_k - (v_k L^{12})\), after subtracting \(\left( {\mathbf {p}}^{{\mathcal {r}}} \cdot {\mathbf {f}}_k^{{\mathcal {r}}} - {\mathbf {p}}^{\ell } \cdot {\mathbf {f}}_k^{\ell } \right) \, n_k^{\ell {\mathcal {r}}} \) from both sides of the above equation, we obtain the property

$$\begin{aligned} {\mathbf {p}}^{\ell } \cdot \left( {\mathcal {F}}^{\ell {\mathcal {r}}} - {\mathbf {f}}_k^{\ell } \, n_k^{\ell {\mathcal {r}}} \right) + {\mathbf {p}}^{{\mathcal {r}}} \cdot \left( {\mathbf {f}}_k^{{\mathcal {r}}} \, n_k^{\ell {\mathcal {r}}} - {\mathcal {F}}^{\ell {\mathcal {r}}} \right) = \left( F_k^{12,{\mathcal {r}}} - F_k^{12,\ell } \right) n_k^{\ell {\mathcal {r}}} \end{aligned}$$
(32)

in terms of the fluctuations \({\mathcal {F}}^{\ell {\mathcal {r}}} - {\mathbf {f}}_k^{\ell } \, n_k^{\ell {\mathcal {r}}}\) and \( {\mathbf {f}}_k^{{\mathcal {r}}} \, n_k^{\ell {\mathcal {r}}} - {\mathcal {F}}^{\ell {\mathcal {r}}} \) related to the numerical flux in normal direction. Moreover, the flux containing the numerical viscosity reads

$$\begin{aligned} {\mathcal {G}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) = \epsilon ^{\ell {\mathcal {r}}}\frac{{\mathbf {q}}^{{\mathcal {r}}}-{\mathbf {q}}^{\ell }}{\delta ^{\ell {\mathcal {r}}}}= \epsilon ^{\ell {\mathcal {r}}}\frac{\Delta {\mathbf {q}}^{\ell {\mathcal {r}}}}{\delta ^{\ell {\mathcal {r}}}}, \quad \delta ^{\ell {\mathcal {r}}} = \left\| {\mathbf {x}}^{\mathcal {r}}- {\mathbf {x}}^\ell \right\| = \Delta x n_{1}^{\ell {\mathcal {r}}}+\Delta y n_{2}^{\ell {\mathcal {r}}}, \end{aligned}$$
(33)

with an associate non-negative entropy production term that will be specified later. If present in the mathematical model, the algebraic source term must obey a pointwise compatibility condition as follows

$$\begin{aligned} {\mathbf {p}}^{\ell } \cdot \mathbf {S} \left( {\mathbf {q}}^{\ell } \right) = 0, \end{aligned}$$
(34)

while the fluctuations related to the remaining part of the energy potential (red terms) satisfy

$$\begin{aligned} {\mathbf {p}}^{\ell } \cdot {\mathcal {R}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}} + {\mathbf {p}}^{{\mathcal {r}}} \cdot {\mathcal {R}}\left( {\mathbf {q}}^{{\mathcal {r}}},{\mathbf {q}}^{\ell }\right) \cdot {\mathbf {n}}^{{\mathcal {r}}\ell } = \left( F_k^{34,{\mathcal {r}}} - F_k^{34,\ell } \right) n_k^{\ell {\mathcal {r}}} \end{aligned}$$
(35)

with \({\mathbf {n}}^{{\mathcal {r}}\ell }=-{\mathbf {n}}^{\ell {\mathcal {r}}}\). The discrete fluctuation terms, \({\mathcal {R}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}} \), are specific for each model and are detailed below. In this paper we use the terminology fluctuation for both, flux differences, as well as for the jump terms that arise at the element boundaries due to the non-conservative terms in the PDE system (21), see [27, 75]. The fluctuations are also related to the wave propagation form of the scheme, see [68, 69].

GPR model. Following [22], the thermodynamically compatible discretization of the fluctuations \({\mathcal {R}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}}\) for the GPR model (1) reads:

$$\begin{aligned} {\mathcal {R}}\!\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \! \cdot \! {\mathbf {n}}^{\ell {\mathcal {r}}} \! = \!\! \left( \begin{array}{c} 0 \\ \left( \sigma _{ik}^{\ell {\mathcal {r}}} - \sigma _{ik}^{\ell }\right) \cdot n_k^{\ell {\mathcal {r}}} + \left( \omega _{ik}^{\ell {\mathcal {r}}} - \omega _{ik}^{\ell } \right) \cdot n_k^{\ell {\mathcal {r}}}\\ \frac{1}{2}\left( \beta _{k}^{{\mathcal {r}}} - \beta _{k}^{\ell } \right) \cdot n_k^{\ell {\mathcal {r}}}\\ \frac{1}{2}A_{im}^{\ell {\mathcal {r}}} \left( v_{m}^{{\mathcal {r}}} - v_{m}^{\ell } \right) n_k^{\ell {\mathcal {r}}} + \frac{1}{2}{\tilde{u}}_{A}^{\ell {\mathcal {r}}} \left( A_{ik}^{{\mathcal {r}}} - A_{ik}^{\ell } \right) \\ \frac{1}{2}J_{m}^{\ell {\mathcal {r}}} \left( v_{m}^{{\mathcal {r}}} - v_{m}^{\ell } \right) n_k^{\ell {\mathcal {r}}} \! + \! \frac{1}{2}{\tilde{u}}_{J}^{\ell {\mathcal {r}}} \left( J_{k}^{{\mathcal {r}}} - J_{k}^{\ell } \right) \!+\! \frac{1}{2}\left( T^{{\mathcal {r}}} - T^{\ell } \right) n_k^{\ell {\mathcal {r}}} \end{array} \right) , \end{aligned}$$
(36)

where

$$\begin{aligned} \sigma _{jk}^{\ell {\mathcal {r}}}= & {} \frac{1}{2}\left( A_{ij}^{\ell }+A_{ij}^{{\mathcal {r}}}\right) \frac{1}{2}\left( \alpha _{ik}^{\ell }+\alpha _{ik}^{{\mathcal {r}}}\right) , \quad \omega _{ik}^{\ell {\mathcal {r}}} = \frac{1}{2}\left( J_{i}^{\ell }+J_{i}^{{\mathcal {r}}}\right) \frac{1}{2}\left( \beta _{k}^{\ell }+\beta _{k}^{{\mathcal {r}}}\right) , \end{aligned}$$
(37)
$$\begin{aligned} A^{\ell {\mathcal {r}}}_{im}= & {} \frac{1}{2}\left( A^{\ell }_{im}+A^{{\mathcal {r}}}_{im}\right) , \qquad {\tilde{u}}_{A}^{\ell {\mathcal {r}}} = \frac{{\mathcal {F}}_{\rho }^{\ell {\mathcal {r}}}\left( E_{3}^{{\mathcal {r}}}-E_{3}^{\ell }\right) }{\frac{1}{2} \left( \alpha _{ik}^{\ell }+\alpha _{ik}^{{\mathcal {r}}}\right) \left( A_{ik}^{{\mathcal {r}}}-A_{ik}^{\ell } \right) }, \end{aligned}$$
(38)
$$\begin{aligned} J^{\ell {\mathcal {r}}}_{i}\!= & {} \! \frac{1}{2}\left( J^{\ell }_{i}+J^{{\mathcal {r}}}_{i}\right) , \qquad {\tilde{u}}_{J}^{\ell {\mathcal {r}}} = \frac{{\mathcal {F}}_{\rho }^{\ell {\mathcal {r}}}\left( E_{4}^{{\mathcal {r}}}-E_{4}^{\ell }\right) }{\frac{1}{2} \left( \beta _{k}^{\ell }+\beta _{k}^{{\mathcal {r}}}\right) \left( J_{k}^{{\mathcal {r}}}-J_{k}^{\ell } \right) }, \end{aligned}$$
(39)

and \({\mathbf {P}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) = \left( 0, {\mathbf {0}}, \Pi ^{\ell {\mathcal {r}}}, {\mathbf {0}}, {\mathbf {0}} \right) ^T\), is the non-negative entropy production term due to the numerical viscosity with

$$\begin{aligned} \Pi ^{\ell {\mathcal {r}}} = \frac{1}{2}\epsilon ^{\ell {\mathcal {r}}} \frac{\Delta {\mathbf {q}}^{\ell {\mathcal {r}}}}{T^{\ell }} \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \frac{\Delta {\mathbf {q}}^{\ell {\mathcal {r}}}}{\delta ^{\ell {\mathcal {r}}}} \ge 0, \qquad T^{\ell } = \frac{\left( \rho ^{\ell }\right) ^{\gamma -1}}{\left( \gamma -1\right) c_{v}} e^{\frac{ S^{\ell }}{c_{v}}}. \end{aligned}$$
(40)

Turbulent shallow water flows. According to [21] the thermodynamically compatible discretization of the fluctuations \({\mathcal {R}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}}\) for the turbulent shallow water model (11) reads:

$$\begin{aligned} {\mathcal {R}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) \cdot {\mathbf {n}}^{\ell {\mathcal {r}}} = \left( \begin{array}{c} 0 \\ \left( \sigma _{ik}^{\ell {\mathcal {r}}} - \sigma _{ik}^{\ell }\right) \cdot n_k^{\ell {\mathcal {r}}} \\ \frac{1}{2}Q_{mk}^{\ell {\mathcal {r}}} \left( v_{i}^{{\mathcal {r}}} - v_{i}^{\ell } \right) n_m^{\ell {\mathcal {r}}} + \frac{1}{2}{\tilde{u}}_{Q}^{\ell {\mathcal {r}}} \left( Q_{ik}^{{\mathcal {r}}} - Q_{ik}^{\ell } \right) \end{array} \right) , \end{aligned}$$
(41)

where

$$\begin{aligned} \sigma _{ij}^{\ell {\mathcal {r}}}= & {} \frac{1}{2}\left( Q_{jk}^{\ell }+Q_{jk}^{{\mathcal {r}}}\right) \frac{1}{2}\left( h Q_{ik}^{\ell }+h Q_{ik}^{{\mathcal {r}}}\right) , \end{aligned}$$
(42)
$$\begin{aligned} Q^{\ell {\mathcal {r}}}_{mk}= & {} \frac{1}{2}\left( Q^{\ell }_{mk}+Q^{{\mathcal {r}}}_{mk}\right) , \qquad {\tilde{u}}_{Q}^{\ell {\mathcal {r}}} = \frac{{\mathcal {F}}_{h}^{\ell {\mathcal {r}}}\left( E_{3}^{{\mathcal {r}}}-E_{3}^{\ell }\right) }{\frac{1}{2} \left( h Q_{ik}^{\ell } + h Q_{ik}^{{\mathcal {r}}}\right) \left( Q_{ik}^{{\mathcal {r}}}-Q_{ik}^{\ell } \right) }, \end{aligned}$$
(43)

and \({\mathbf {P}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}}\right) = \left( 0, {\mathbf {0}}, \Pi _{ik}^{\ell {\mathcal {r}}} \right) ^T\), is the non-negative entropy production term due to the numerical viscosity with

$$\begin{aligned} \Pi _{ik}^{\ell {\mathcal {r}}} = Q_{ik}^{\ell } \frac{1}{2}\epsilon ^{\ell {\mathcal {r}}} \frac{\Delta {\mathbf {q}}^{\ell {\mathcal {r}}}}{T^{\ell }} \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \frac{\Delta {\mathbf {q}}^{\ell {\mathcal {r}}}}{\delta ^{\ell {\mathcal {r}}}} \ge 0, \qquad T^{\ell } = h^\ell \text {tr}{{\mathbf {P}}}^{\ell }. \end{aligned}$$
(44)

In both cases the Roe matrix of the Hessian \(\partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}}\) must satisfy the Roe property

$$\begin{aligned} \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) = {\mathbf {p}}^{{\mathcal {r}}} - {\mathbf {p}}^{\ell }. \end{aligned}$$
(45)

It can be easily obtained via the path integral

$$\begin{aligned} \partial ^2_{{\mathbf {q}}{\mathbf {q}}}\tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} = \int \limits _0^1 \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}}\left( \tilde{\varvec{\psi }}(s)\right) ds =: \left( \partial ^2_{{\mathbf {p}}{\mathbf {p}}} {\tilde{L}}^{\ell {\mathcal {r}}} \right) ^{-1}, \end{aligned}$$
(46)

where this time a segment path in \({\mathbf {q}}\) variables is used:

$$\begin{aligned} \tilde{\varvec{\psi }}(s) = \tilde{\varvec{\psi }}({\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}},s) = {\mathbf {q}}^{\ell } + s \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell }\right) . \end{aligned}$$
(47)

Throughout this paper all path integrals are computed numerically at the aid of a Gauss-Legendre quadrature formula of sufficient accuracy. In practice, we found that 3 quadrature points are enough, see [22] for a detailed analysis on the influence of the accuracy of the numerical quadrature on total energy conservation.

3.2 Thermodynamically Compatible DG Schemes in One Space Dimension

In one space dimension, the computational domain, \(\Omega \), is covered by non-overlapping elements of the form \(\Omega ^{\ell }=[x^{\ell -\frac{1}{2}},x^{\ell +\frac{1}{2}}]\) and the discrete solution is expanded in terms of nodal basis functions \(\varphi _m(x)\) as

$$\begin{aligned} {\mathbf {q}}_h(x,t)= \sum _{m=0}^{N} \varphi _m(x) {\hat{{\mathbf {q}}}}_m^{\ell }(t), \end{aligned}$$
(48)

with \({\hat{{\mathbf {q}}}}_m^{\ell }(t)\) the time dependent degrees of freedom and N the maximum polynomial degree of the basis functions. In this paper, we use Lagrange interpolation polynomials passing through the Gauss-Legendre quadrature nodes. Consequently, we have the discrete main field

$$\begin{aligned} {\mathbf {p}}_h(x,t)= \sum _{m=0}^{N} \varphi _m(x) {\hat{{\mathbf {p}}}}_m^{\ell }(t),\qquad {\hat{{\mathbf {p}}}}_m^{\ell }(t) = {\mathbf {p}}\left( {\hat{{\mathbf {q}}}}_m^{\ell }(t)\right) \end{aligned}$$
(49)

and the discrete total energy density

$$\begin{aligned} {\mathcal {E}}_h(x,t)= \sum _{m=0}^{N} \varphi _m(x) \hat{{\mathcal {E}}}_m^{\ell }(t),\qquad \hat{{\mathcal {E}}}_m^{\ell }(t) = {\mathcal {E}}\left( {\hat{{\mathbf {q}}}}_m^{\ell }(t)\right) . \end{aligned}$$
(50)

To ease notation, we will make use of the following abbreviations:

$$\begin{aligned} \varphi _k^{\ell -\frac{1}{2}}=\varphi _k\left( x^{\ell -\frac{1}{2}}_{+} \right) ,\quad \varphi _k^{\ell +\frac{1}{2}}=\varphi _k\left( x^{\ell +\frac{1}{2}}_{-} \right) , \\ \partial _x \varphi _k^{\ell -\frac{1}{2}} = \partial _x \varphi _k\left( x^{\ell -\frac{1}{2}}_{+} \right) , \quad \partial _x \varphi _k^{\ell +\frac{1}{2}} = \partial _x \varphi _k\left( x^{\ell +\frac{1}{2}}_{-} \right) . \end{aligned}$$

Multiplication of (21) by a test function \(\varphi _k\), integration over a cell \(\Omega ^{\ell }\), substitution of (48), integration by parts and addition of the jump terms \(\partial _x \varphi _k^{\ell \pm \frac{1}{2}} {\mathcal {V}}^{\ell \pm \frac{1}{2}}\) with positive sign on the right hand side lead to the DG scheme

$$\begin{aligned}&\int \limits _{x^{\ell -\frac{1}{2}}}^{x^{\ell +\frac{1}{2}}} \! \varphi _k \partial _t {\mathbf {q}}_h dx + \varphi _k^{\ell +\frac{1}{2}} {\mathcal {F}}^{\ell +\frac{1}{2}} - \varphi _k^{\ell -\frac{1}{2}} {\mathcal {F}}^{\ell -\frac{1}{2}} - \!\! \int \limits _{x^{\ell -\frac{1}{2}}_{+}}^{x^{\ell +\frac{1}{2}}_{-}} \!\! \partial _x \varphi _k {\mathbf {f}}_1({\mathbf {q}}_h) dx \nonumber \\&\qquad +\, \varphi _k^{\ell +\frac{1}{2}} {{\mathcal {R}}^{\ell +\frac{1}{2}}_{-}} + \varphi _k^{\ell -\frac{1}{2}} {{\mathcal {R}}^{\ell -\frac{1}{2}}_{+}} + \int \limits _{x^{\ell -\frac{1}{2}}_{+}}^{x^{\ell +\frac{1}{2}}_{-}} \! \varphi _k \left( {{\partial _{x}{\mathbf {h}}_1({\mathbf {q}}_h)} + {\mathbf {B}}_1({\mathbf {q}}_h) \partial _x {\mathbf {q}}_h}\right) dx \nonumber \\&\quad =\varphi _k^{\ell +\frac{1}{2}} {{\mathcal {G}}^{\ell +\frac{1}{2}}} - \varphi _k^{\ell -\frac{1}{2}} {{\mathcal {G}}^{\ell -\frac{1}{2}}} + \partial _x \varphi _k^{\ell +\frac{1}{2}} {{\mathcal {V}}^{\ell +\frac{1}{2}}} + \partial _x \varphi _k^{\ell -\frac{1}{2}} {{\mathcal {V}}^{\ell -\frac{1}{2}}} \nonumber \\&\qquad -\, \int \limits _{x^{\ell -\frac{1}{2}}_{+}}^{x^{\ell +\frac{1}{2}}_{-}} \partial _x \varphi _k {\epsilon \partial _x {\mathbf {q}}_h } dx + {{\mathbf {P}}_k} +\int \limits _{x^{\ell -\frac{1}{2}}}^{x^{\ell +\frac{1}{2}}} \! \varphi _k {{\mathbf {S}}({\mathbf {q}}_h)} dx, \end{aligned}$$
(51)

where the different terms are defined as described below.

According to [20,21,22] and as shown above for the finite volume case, the numerical flux is obtained by a path integral following the ideas on path conservative methods presented in [26, 75]:

$$\begin{aligned} {\mathcal {F}}^{\ell +\frac{1}{2}} = {\mathcal {F}}\left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{-},{\mathbf {q}}^{\ell +\frac{1}{2}}_{+}\right) \cdot {\mathbf {n}} = \int \limits _{0}^{1} {\mathbf {f}}_k\left( \varvec{\Psi }({\mathbf {p}}^{\ell +\frac{1}{2}}_{-},{\mathbf {p}}^{\ell +\frac{1}{2}}_{+},s)\right) \cdot n_k \, ds, \end{aligned}$$
(52)

with \({\mathbf {n}}=\left( 1,0,0\right) \), in 1D, and the path given by

$$\begin{aligned} \varvec{\Psi }({\mathbf {p}}^{\ell +\frac{1}{2}}_{-},{\mathbf {p}}^{\ell +\frac{1}{2}}_{+},s) = {\mathbf {p}}^{\ell +\frac{1}{2}}_{-} + s \left( {\mathbf {p}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {p}}^{\ell +\frac{1}{2}}_{-}\right) . \end{aligned}$$
(53)

The point values \({\mathbf {p}}^{\ell +\frac{1}{2}}_{\pm }\) are given by the point-wise evaluation \({\mathbf {p}}^{\ell +\frac{1}{2}}_{\pm } = {\mathbf {p}}({\mathbf {q}}^{\ell +\frac{1}{2}}_{\pm })\), with \({\mathbf {q}}^{\ell +\frac{1}{2}}_{\pm }\) the boundary-extrapolated values of the discrete numerical solution \({\mathbf {q}}_h\). The numerical flux, by construction, verifies the following Roe-type property, see [20,21,22]:

$$\begin{aligned} {\mathcal {F}}^{\ell +\frac{1}{2}} \cdot \left( {\mathbf {p}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {p}}^{\ell +\frac{1}{2}}_{-}\right) = (v_1L)_{+}^{\ell +\frac{1}{2}}-(v_1L)_{-}^{\ell +\frac{1}{2}}. \end{aligned}$$
(54)

The viscous numerical flux is inspired by the work of Gassner, Lörcher and Munz [47] and reads

$$\begin{aligned} {\mathcal {G}}^{\ell +\frac{1}{2}}= & {} \frac{1}{2} \epsilon \, \partial ^2_{{\mathbf {p}}{\mathbf {p}}} \tilde{{\mathbf {L}}}^{\ell +\frac{1}{2}} \left( \partial _x {\mathbf {p}}^{\ell +\frac{1}{2}}_{-} + \partial _x {\mathbf {p}}^{\ell +\frac{1}{2}}_{+} \right) + \eta ^{\ell +\frac{1}{2}} \left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell +\frac{1}{2}}_{-} \right) , \nonumber \\ \eta ^{\ell +\frac{1}{2}}= & {} \frac{1}{2} s_{\max }^{\ell +\frac{1}{2}} + \frac{2N + 1}{\Delta x} \epsilon . \end{aligned}$$
(55)

We stress that in our DG scheme above the jump terms \({\mathcal {V}}^{\ell +\frac{1}{2}}\) have the opposite sign compared to the ones derived in [47] via the usual integration by parts back and forth. This choice of the sign is necessary in order to prove semi-discrete total energy conservation and thus nonlinear stability in the energy norm, see the additional comments in the proof of Theorem 2. They read

$$\begin{aligned} {\mathcal {V}}^{\ell +\frac{1}{2}} = \frac{1}{2} \epsilon \left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell +\frac{1}{2}}_{-} \right) . \end{aligned}$$
(56)

For the GPR model, the discrete entropy production term related to the viscous terms is \({\mathbf {P}}_k = (0,{\mathbf {0}},\Pi _k^{\mathrm {GPR}},{\mathbf {0}},{\mathbf {0}})^T\), with

$$\begin{aligned} \Pi _k^{\mathrm {GPR}}= & {} \int \limits _{x^{\ell -\frac{1}{2}}_{+}}^{x^{\ell +\frac{1}{2}}_{-}} \varphi _k \frac{\epsilon }{T} \partial _x {\mathbf {q}}_h \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}} \, \partial _x {\mathbf {q}}_h dx \nonumber \\&\quad +\, \varphi _k^{\ell -\frac{1}{2}} \frac{\eta ^{\ell -\frac{1}{2}}}{2\, T^{\ell -\frac{1}{2}}_{+}} \left( {\mathbf {q}}^{\ell -\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell -\frac{1}{2}}_{-} \right) \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell -\frac{1}{2}} \left( {\mathbf {q}}^{\ell -\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell -\frac{1}{2}}_{-} \right) \nonumber \\&\quad +\, \varphi _k^{\ell +\frac{1}{2}} \frac{\eta ^{\ell +\frac{1}{2}}}{2 \, T^{\ell +\frac{1}{2}}_{-}} \left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell +\frac{1}{2}}_{-} \right) \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell +\frac{1}{2}} \left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell +\frac{1}{2}}_{-} \right) , \end{aligned}$$
(57)

while for the turbulent shallow water equations we have \({\mathbf {P}}_k = (0,{\mathbf {0}},\varvec{\Pi }_k^{\mathrm {TSW}})^T\),

$$\begin{aligned} \varvec{\Pi }_k^{\mathrm {TSW}}= & {} \int \limits _{x^{\ell -\frac{1}{2}}_{+}}^{x^{\ell +\frac{1}{2}}_{-}} \varphi _k \frac{\epsilon \, {\mathbf {Q}}}{h \text {tr}(\P )} \partial _x {\mathbf {q}}_h \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}} \, \partial _x {\mathbf {q}}_h dx \nonumber \\&\quad +\, \varphi _k^{\ell -\frac{1}{2}} \frac{\eta ^{\ell -\frac{1}{2}}\,{\mathbf {Q}}^{\ell -\frac{1}{2}}_{+}}{2\, h\,\text {tr}(\P )^{\ell -\frac{1}{2}}_{+}} \,\left( {\mathbf {q}}^{\ell -\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell -\frac{1}{2}}_{-} \right) \!\cdot \! \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell -\frac{1}{2}} \left( {\mathbf {q}}^{\ell -\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell -\frac{1}{2}}_{-} \right) \nonumber \\&\quad +\, \varphi _k^{\ell +\frac{1}{2}} \frac{\eta ^{\ell +\frac{1}{2}}\,{\mathbf {Q}}^{\ell +\frac{1}{2}}_{-}}{2 \,h\,\text {tr}(\P )^{\ell +\frac{1}{2}}_{-}} \left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell +\frac{1}{2}}_{-} \right) \! \cdot \! \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell +\frac{1}{2}} \left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+} - {\mathbf {q}}^{\ell +\frac{1}{2}}_{-} \right) \!. \end{aligned}$$
(58)

For both models, the fluctuations are defined according to (36) and (41), respectively, which in one space dimension reduces to

$$\begin{aligned} {\mathcal {R}}^{\ell +\frac{1}{2}}_{-} = {\mathcal {R}}\left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{-},{\mathbf {q}}^{\ell +\frac{1}{2}}_{+}\right) \cdot {\mathbf {n}}, \quad \text { and } \quad {\mathcal {R}}^{\ell +\frac{1}{2}}_{+} = - {\mathcal {R}}\left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+},{\mathbf {q}}^{\ell +\frac{1}{2}}_{-}\right) \cdot {\mathbf {n}} \end{aligned}$$

with \({\mathbf {n}}=(1,0,0)\). They verify the discrete compatibility relation

$$\begin{aligned} {\mathbf {p}}^{\ell +\frac{1}{2}}_{-} \cdot {\mathcal {R}}^{\ell +\frac{1}{2}}_{-} + {\mathbf {p}}^{\ell +\frac{1}{2}}_{+} \cdot {\mathcal {R}}^{\ell +\frac{1}{2}}_{+} = F_1^{34}\left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{+} \right) - F_1^{34}\left( {\mathbf {q}}^{\ell +\frac{1}{2}}_{-} \right) . \end{aligned}$$
(59)

3.3 Thermodynamically Compatible DG Schemes in Multiple Space Dimensions

In multiple space dimensions, the computational domain \(\Omega \) is discretized via non-overlapping elements defined as \({\Omega _{i}}=[x^{i_1-\frac{1}{2}}_1,x^{i_1+\frac{1}{2}}_1]\times [x^{i_2-\frac{1}{2}}_2,x^{i_2+\frac{1}{2}}_2]\). The discrete solution for the vector of conservative variables reads as usual

$$\begin{aligned} {\mathbf {q}}_h(\mathbf {x},t)= \sum _{m=1}^{{{\mathcal {N}}}} \varphi _m(\mathbf {x}) {\hat{{\mathbf {q}}}}_m^{i}(t). \end{aligned}$$
(60)

As in the one-dimensional case we employ nodal basis functions, defined as the tensor products of the one-dimensional basis functions described in the previous section. The maximum polynomial approximation degree per dimension is again denoted by N and \({\mathcal {N}}\) in (60) denotes the number of degrees of freedom per element, i.e. \((N+1)^d\) for a tensor-product basis in d space dimensions. In multiple space dimensions, the thermodynamically compatible DG scheme for the hyperbolic system (21), denoted by HTC DG scheme in the following, can be derived via multiplication of (21) with a test function \(\varphi _k(\mathbf {x}) \), integration by parts of the flux terms and via the use of suitable thermodynamically compatible fluxes and fluctuations defined later:

$$\begin{aligned}&\int \limits _{{\Omega _i}} \varphi _k \partial _t {\mathbf {q}}d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} \varphi _k {\mathcal {F}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}} \, dS - \int \limits _{{\Omega _i^{\circ }}} \partial _m \varphi _k {\mathbf {f}}_m({\mathbf {q}}_h) d\mathbf {x}\nonumber \\&\qquad +\, \int \limits _{{\partial \Omega _i}} \varphi _k {{\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \int \limits _{{\Omega _i^{\circ }}} \varphi _k { \left( \partial _m {\mathbf {h}}_m({\mathbf {q}}_h) + {\mathbf {B}}_m({\mathbf {q}}_h) \partial _m{\mathbf {q}}_h \right) } d\mathbf {x}\nonumber \\&\quad = \int \limits _{{\partial \Omega _i}} \varphi _k {{\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \int \limits _{{\partial \Omega _i}} \partial _m \varphi _k {{\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {n}_m \, dS \nonumber \\&\qquad -\, \int \limits _{{\Omega _i^{\circ }}} \partial _m \varphi _k { \left( \epsilon \partial _m {\mathbf {q}}_h \right) } d\mathbf {x}+ {{\mathbf {P}}_k} + \int \limits _{{\Omega _i}} \varphi _k {{\mathbf {S}}({\mathbf {q}}_h)} d\mathbf {x}. \end{aligned}$$
(61)

Here, \({\mathbf {q}}_h^{\ell }\), \({\mathbf {q}}_h^{{\mathcal {r}}}\) are the boundary extrapolated values of the DG solution computed at the left and right sides of the element boundary, respectively. To compute the thermodynamically compatible numerical fluxes \({\mathcal {F}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}}\) and the fluctuations \({\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}}\) we can make use of those already introduced for the finite volume scheme (29), (36), (41), which satisfy the compatibility relations (31) and (35). The viscous fluxes read

$$\begin{aligned} {\mathcal {G}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}} \right) \cdot {\mathbf {n}}= & {} \frac{1}{2} \epsilon \, \partial ^2_{{\mathbf {p}}{\mathbf {p}}} \tilde{{\mathbf {L}}}^{\ell {\mathcal {r}}} \left( \partial _k {\mathbf {p}}^{\ell } + \partial _k {\mathbf {p}}^{{\mathcal {r}}} \right) n_k + \eta ^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) , \nonumber \\ \eta ^{\ell {\mathcal {r}}}= & {} \frac{1}{2} s_{\max }^{\ell {\mathcal {r}}} + \frac{2N + 1}{\delta ^{\ell {\mathcal {r}}}} \epsilon ^{\ell {\mathcal {r}}}, \end{aligned}$$
(62)

while the viscous jump terms are given by

$$\begin{aligned} {\mathcal {V}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}} \right) = \frac{1}{2} \epsilon ^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) . \end{aligned}$$
(63)

We emphasize again that the term in (61) including the jump \({\mathcal {V}}\left( {\mathbf {q}}^{\ell },{\mathbf {q}}^{{\mathcal {r}}} \right) \) has the opposite sign compared to the one given in [47] in order to prove thermodynamic compatibility, see the proof of Theorem 2. The discrete entropy production term, \({\mathbf {P}}_k= (0,{\mathbf {0}},\Pi _k^{\mathrm {GPR}},{\mathbf {0}},{\mathbf {0}})^T\), for the GPR model, is

$$\begin{aligned} \Pi _k^{\mathrm {GPR}}= & {} \int \limits _{{\Omega _i^{\circ }}} \varphi _k \frac{\epsilon }{T} \partial _k {\mathbf {q}}_h \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}} \, \partial _k {\mathbf {q}}_h d\mathbf {x}\nonumber \\&\quad +\, \int \limits _{{\partial \Omega _i}}\varphi _k \frac{\eta ^{\ell {\mathcal {r}}}}{2\, T^{\ell }} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) dS \end{aligned}$$
(64)

while for the TSW model it reads \({\mathbf {P}}_k = (0,{\mathbf {0}},\varvec{\Pi }_k^{\mathrm {TSW}})^T\), with

$$\begin{aligned} \varvec{\Pi }_k^{\mathrm {TSW}}= & {} \int \limits _{{\Omega _i^{\circ }}} \varphi _k \frac{\epsilon \,{\mathbf {Q}}}{h\, \text {tr}\P } \partial _k {\mathbf {q}}_h \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}} \, \partial _k {\mathbf {q}}_h d\mathbf {x}\nonumber \\&\quad +\, \int \limits _{{\partial \Omega _i}}\varphi _k \frac{\eta ^{\ell {\mathcal {r}}}\,{\mathbf {Q}}^{\ell }}{2\, h\,\text {tr}\P ^{\ell }} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) dS. \end{aligned}$$
(65)

Theorem 1

(Cell entropy inequality) For the GPR model the HTC DG scheme (61) satisfies the cell entropy inequality

$$\begin{aligned}&\int \limits _{{\Omega _i}} \partial _t (\rho S)_h d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} {\mathcal {F}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}} \, dS + \int \limits _{{\partial \Omega _i}} {\frac{1}{2}\left( \beta _{m}^{\ell }+\beta _{m}^{{\mathcal {r}}}\right) } \cdot n_{m} \, dS \nonumber \\&\quad -\, \int \limits _{{\partial \Omega _i}} {{\mathcal {G}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS \ge 0. \end{aligned}$$
(66)

Proof

To obtain a cell entropy inequality for the GPR model, we employ the test function \(\varphi _k=1\) in (61) that, together with the notation

$$\begin{aligned} \pi = \dfrac{\alpha _{ik} \alpha _{ik} }{\theta _1(\tau _1) T} + \dfrac{\beta _i \beta _i}{\theta _2(\tau _2) T} \ge 0 \end{aligned}$$
(67)

and (64), yields

$$\begin{aligned}&\int \limits _{{\Omega _i}} \partial _t \rho S d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} {\mathcal {F}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}} \, dS + \int \limits _{{\partial \Omega _i}} {{\mathcal {R}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS \nonumber \\&\quad + \int \limits _{{\Omega _i^{\circ }}} { \left( \partial _m {\mathbf {h}}_m({\mathbf {q}}_h) + {\mathbf {B}}_m({\mathbf {q}}_h) \partial _m{\mathbf {q}}_h \right) } d\mathbf {x}- \int \limits _{{\partial \Omega _i}} {{\mathcal {G}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS = \int \limits _{{\Omega _i}} {\pi } d\mathbf {x}\nonumber \\&\quad +\int \limits _{{\Omega _i^{\circ }}} { \frac{\epsilon }{T} \partial _k {\mathbf {q}}_h \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}} \, \partial _k {\mathbf {q}}_h} d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} { \frac{\eta ^{\ell {\mathcal {r}}}}{2\, T^{\ell }} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) }dS . \end{aligned}$$

Substituting (36), we get

$$\begin{aligned}&\int \limits _{{\Omega _i}} \partial _t \rho S d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} {\mathcal {F}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}} \, dS + \int \limits _{{\partial \Omega _i}} {\frac{1}{2}\left( \beta _{k}^{{\mathcal {r}}} - \beta _{k}^{\ell } \right) \cdot n_k} \, dS \nonumber \\&\quad + \int \limits _{{\Omega _i^{\circ }}} { \partial _m \beta _m } d\mathbf {x}- \int \limits _{{\partial \Omega _i}} {{\mathcal {G}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS = \int \limits _{{\Omega _i}} {\pi } d\mathbf {x}\nonumber \\&\quad +\int \limits _{{\Omega _i^{\circ }}} { \frac{\epsilon }{T} \partial _k {\mathbf {q}}_h \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}} \, \partial _k {\mathbf {q}}_h} d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} { \frac{\eta ^{\ell {\mathcal {r}}}}{2\, T^{\ell }} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) }dS. \end{aligned}$$

At the aid of Gauss’ theorem and thanks to \(\pi \ge 0\) and \(\partial ^2_{{\mathbf {q}}{\mathbf {q}}} {{\mathcal {E}}}\ge 0\), we obtain the sought cell entropy inequality:

$$\begin{aligned}&\int \limits _{{\Omega _i}} \partial _t \rho S d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} {\mathcal {F}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}} \, dS + \int \limits _{{\partial \Omega _i}} {\frac{1}{2}\left( \beta _{k}^{{\mathcal {r}}} + \beta _{k}^{\ell } \right) \cdot n_k} \, dS\nonumber \\&\quad - \int \limits _{{\partial \Omega _i}} {{\mathcal {G}}_{\rho S}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS = \int \limits _{{\Omega _i}} {\pi } d\mathbf {x}\nonumber \\&\quad +\int \limits _{{\Omega _i^{\circ }}} { \frac{\epsilon }{T} \partial _k {\mathbf {q}}_h \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} {\mathcal {E}} \, \partial _k {\mathbf {q}}_h} d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} { \frac{\eta ^{\ell {\mathcal {r}}}}{2\, T^{\ell }} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) \cdot \partial ^2_{{\mathbf {q}}{\mathbf {q}}} \tilde{{\mathcal {E}}}^{\ell {\mathcal {r}}} \left( {\mathbf {q}}^{{\mathcal {r}}} - {\mathbf {q}}^{\ell } \right) }dS \ge 0. \end{aligned}$$

\(\square \)

Theorem 2

(Nonlinear stability in the energy norm) The HTC DG schemes (61) with (28), (35), (62), (63) and (64) for the GPR model and with (65) for the TSW model are nonlinearly stable in the energy norm, i.e.

$$\begin{aligned} \int \limits _{\Omega } \frac{\partial {\mathcal {E}}}{\partial t} d\mathbf {x}= 0, \end{aligned}$$
(68)

for vanishing boundary fluxes.

Proof

Using the Godunov parametrization of the flux \({\mathbf {f}}_m= \partial _{{\mathbf {p}}}(v_m L)\) with the shorthand notation \(L:=L^{12}\) and summing up all equations in (61) after multiplication by \({\hat{{\mathbf {p}}}}^{i}_{m}\) yields

$$\begin{aligned}&\int \limits _{{\Omega _i}} {\mathbf {p}}_{h}\cdot \partial _t {\mathbf {q}}_h d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} {\mathbf {p}}_{h}^{\ell }\cdot {\mathcal {F}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}} \, dS - \int \limits _{{\Omega _i^{\circ }}} \partial _m {\mathbf {p}}_{h}\cdot \partial _{{\mathbf {p}}}(v_mL) d\mathbf {x}\nonumber \\&\qquad +\, \int \limits _{{\partial \Omega _i}} {\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \int \limits _{{\Omega _i^{\circ }}} {\mathbf {p}}_{h}\cdot { \left( \partial _m {\mathbf {h}}_m({\mathbf {q}}_h) + {\mathbf {B}}_m({\mathbf {q}}_h) \partial _m{\mathbf {q}}_h \right) } d\mathbf {x}\nonumber \\&\quad = \int \limits _{{\partial \Omega _i}}\! \!{\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \!\!\int \limits _{{\partial \Omega _i}} \!\!\partial _m {\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {n}_m \, dS \nonumber \\&\qquad -\, \!\!\int \limits _{{\Omega _i^{\circ }}}\! \!\partial _m {\mathbf {p}}_{h}\cdot { \left( \epsilon \partial _m {\mathbf {q}}_h \right) } d\mathbf {x}+ {{\mathbf {P}}_k}\cdot {\hat{{\mathbf {p}}}}^{i}_{k} + \!\!\int \limits _{{\Omega _i}} \!\!{\mathbf {p}}_{h}\!\cdot \! {{\mathbf {S}}({\mathbf {q}}_h)} d\mathbf {x}. \end{aligned}$$

The compatibility condition (25) and the point-wise compatibility of the source terms, (27), lead to

$$\begin{aligned}&\int \limits _{{\Omega _i}} {\mathbf {p}}_{h}\cdot \partial _t {\mathbf {q}}_h d\mathbf {x}+ \int \limits _{{\partial \Omega _i}} {\mathbf {p}}_{h}^{\ell }\cdot {\mathcal {F}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}} \, dS - \int \limits _{{\Omega _i^{\circ }}} \partial _m (v_mL) d\mathbf {x}\nonumber \\&\qquad +\, \int \limits _{{\partial \Omega _i}} {\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \int \limits _{{\Omega _i^{\circ }}} \partial _k F_k^{34} d\mathbf {x}\nonumber \\&\quad = \int \limits _{{\partial \Omega _i}}\! \!{\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \!\!\int \limits _{{\partial \Omega _i}} \partial _m {\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {n}_m \, dS \nonumber \\&\qquad -\, \!\!\int \limits _{{\Omega _i^{\circ }}} \partial _m {\mathbf {p}}_{h}\cdot { \left( \epsilon \partial _m {\mathbf {q}}_h \right) } d\mathbf {x}+ {{\mathbf {P}}_k}\cdot {\hat{{\mathbf {p}}}}^{i}_{k} . \end{aligned}$$

Using (24), the notation \({\mathcal {F}}^{\ell {\mathcal {r}}}={\mathcal {F}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {\mathbf {n}}\) and adding and subtracting \(\frac{1}{2}\int \nolimits _{{\partial \Omega _i}} {\mathbf {p}}^{{\mathcal {r}}}_{h}\cdot {\mathcal {F}}^{\ell {\mathcal {r}}} dS \) and \(\int \nolimits _{{\partial \Omega _i}} {\frac{1}{2}{\mathbf {p}}_{h}^{{\mathcal {r}}} \cdot {\mathcal {R}}({\mathbf {q}}_h^{{\mathcal {r}}},{\mathbf {q}}_h^{\ell }) \cdot (-{\mathbf {n}})} \, dS \), we obtain

$$\begin{aligned}&\int \limits _{{\Omega _i}} {\mathbf {p}}_{h}\cdot \partial _t {\mathbf {q}}_h d\mathbf {x}+ \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left( {\mathbf {p}}_{h}^{\ell }+ {\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {\mathcal {F}}^{\ell {\mathcal {r}}} \, dS + \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left( {\mathbf {p}}_{h}^{\ell }- {\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {\mathcal {F}}^{\ell {\mathcal {r}}} \, dS \nonumber \\&\qquad -\int \limits _{{\partial \Omega _i}} (v_mL)^{\ell }\cdot n_m dS +\int \limits _{{\partial \Omega _i}} {\frac{1}{2}\left( {\mathbf {p}}_h^{\ell } \cdot {\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) - {\mathbf {p}}_{h}^{{\mathcal {r}}} \cdot {\mathcal {R}}({\mathbf {q}}_h^{{\mathcal {r}}},{\mathbf {q}}_h^{\ell }) \right) \cdot {\mathbf {n}}} \, dS \nonumber \\&\qquad +\int \limits _{{\partial \Omega _i}} {\frac{1}{2}\left( {\mathbf {p}}_h^{\ell } \cdot {\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) + {\mathbf {p}}_{h}^{{\mathcal {r}}} \cdot {\mathcal {R}}({\mathbf {q}}_h^{{\mathcal {r}}},{\mathbf {q}}_h^{\ell }) \right) \cdot {\mathbf {n}}} \, dS + \int \limits _{{\Omega _i^{\circ }}} \partial _k F_k^{34} d\mathbf {x}\nonumber \\&\quad = \int \limits _{{\partial \Omega _i}}\! \!{\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \!\!\int \limits _{{\partial \Omega _i}} \!\!\partial _m {\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {n}_m \, dS \nonumber \\&\qquad - \!\!\int \limits _{{\Omega _i^{\circ }}}\! \!\partial _m {\mathbf {p}}_{h}\cdot { \left( \epsilon \partial _m {\mathbf {q}}_h \right) } d\mathbf {x}+ {{\mathbf {P}}_k}\cdot {\hat{{\mathbf {p}}}}^{i}_{k} . \end{aligned}$$

Next, we add and subtract \(\frac{1}{2}\int \limits _{{\partial \Omega _i}} (v_mL)^{{\mathcal {r}}}\cdot n_m dS \) and use the compatibility condition of the fluctuations, (35),

$$\begin{aligned}&\int \limits _{{\Omega _i}} {\mathbf {p}}_{h}\cdot \partial _t {\mathbf {q}}_h d\mathbf {x}+ \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left( {\mathbf {p}}_{h}^{\ell }+ {\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {\mathcal {F}}^{\ell {\mathcal {r}}} \, dS + \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left( {\mathbf {p}}_{h}^{\ell }- {\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {\mathcal {F}}^{\ell {\mathcal {r}}} \, dS \nonumber \\&\qquad - \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left( (v_mL)^{\ell } + (v_mL)^{{\mathcal {r}}}\right) \cdot n_m dS - \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left( (v_mL)^{\ell } - (v_mL)^{{\mathcal {r}}}\right) \cdot n_m dS \nonumber \\&\qquad +\frac{1}{2}\int \limits _{{\partial \Omega _i}} {\left( F^{34,{\mathcal {r}}}_m - F^{34,\ell }_m \right) n_m} dS + \int \limits _{{\Omega _i^{\circ }}} \partial _k F_k^{34} d\mathbf {x}\nonumber \\&\qquad +\int \limits _{{\partial \Omega _i}} {\frac{1}{2}\left( {\mathbf {p}}_h^{\ell } \cdot {\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) + {\mathbf {p}}_{h}^{{\mathcal {r}}} \cdot {\mathcal {R}}({\mathbf {q}}_h^{{\mathcal {r}}},{\mathbf {q}}_h^{\ell }) \right) \cdot {\mathbf {n}}} \, dS \nonumber \\&\quad = \int \limits _{{\partial \Omega _i}}\! \!{\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \!\!\int \limits _{{\partial \Omega _i}} \!\!\partial _m {\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {n}_m \, dS \nonumber \\&\qquad - \!\!\int \limits _{{\Omega _i^{\circ }}}\! \!\partial _m {\mathbf {p}}_{h}\cdot { \left( \epsilon \partial _m {\mathbf {q}}_h \right) } d\mathbf {x}+ {{\mathbf {P}}_k}\cdot {\hat{{\mathbf {p}}}}^{i}_{k} . \end{aligned}$$

Rearranging terms and using property (31) of the thermodynamically compatible flux, we get

$$\begin{aligned}&\int \limits _{{\Omega _i}} \partial _t {\mathcal {E}}_{h} d\mathbf {x}+ \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left[ \left( {\mathbf {p}}_{h}^{\ell }+ {\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {\mathcal {F}}^{\ell {\mathcal {r}}} - \left( (v_mL)^{\ell } + (v_mL)^{{\mathcal {r}}}\right) \cdot n_m \right] dS \nonumber \\&\qquad +\frac{1}{2}\!\! \int \limits _{{\partial \Omega _i}} \!\!\left( F^{34,{\mathcal {r}}}_m + F^{34,\ell }_m \right) n_m dS + \!\! \int \limits _{{\partial \Omega _i}} \!\! {\frac{1}{2}\left( {\mathbf {p}}_h^{\ell }\! \cdot {\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) + {\mathbf {p}}_{h}^{{\mathcal {r}}}\! \cdot {\mathcal {R}}({\mathbf {q}}_h^{{\mathcal {r}}},{\mathbf {q}}_h^{\ell }) \right) \!\cdot \! {\mathbf {n}}} \, dS \nonumber \\&\quad = \int \limits _{{\partial \Omega _i}}\! \!{\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS + \!\!\int \limits _{{\partial \Omega _i}} \!\!\partial _m {\mathbf {p}}_{h}^{\ell }\cdot {{\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {n}_m \, dS \nonumber \\&\qquad - \!\!\int \limits _{{\Omega _i^{\circ }}}\! \!\partial _m {\mathbf {p}}_{h}\cdot { \left( \epsilon \partial _m {\mathbf {q}}_h \right) } d\mathbf {x}+ {{\mathbf {P}}_k}\cdot {\hat{{\mathbf {p}}}}^{i}_{k} . \end{aligned}$$
(69)

We now address the numerical dissipation terms. By adding and subtracting \(\frac{1}{2}\int \limits _{{\partial \Omega _i}} {\mathbf {p}}_{h}^{{\mathcal {r}}}\cdot {\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})\cdot {\mathbf {n}} \, dS\) and \(\frac{1}{2}\int \limits _{{\partial \Omega _i}} \partial _m {\mathbf {p}}_{h}^{{\mathcal {r}}}\cdot {\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) \cdot {n}_m \, dS\), we obtain

where the second equality follows from the definition of the dissipative terms (62)–(63) and the last one is obtained introducing the production term and making use of the Roe property of the Hessian \(\partial ^2_{{\mathbf {p}}{\mathbf {p}}} \tilde{{L}}^{\ell {\mathcal {r}}}\). The two terms indicated by the red dashed lines cancel only due to the particular choice of the opposite sign of the jump terms related to \({\mathcal {V}}\) in (61) compared to the sign given in [47]. Since the main objective of this paper is the construction of provably thermodynamically compatible DG schemes that leads to semi-discrete total energy conservation, the sign is dictated by the present proof. Substitution of the former relation into (69) leads to

$$\begin{aligned}&\int \limits _{{\Omega _i}} \partial _t {\mathcal {E}}_{h} d\mathbf {x}+ \frac{1}{2}\int \limits _{{\partial \Omega _i}} \left[ \left( {\mathbf {p}}_{h}^{\ell }+ {\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {\mathcal {F}}^{\ell {\mathcal {r}}} - \left( (v_mL)^{\ell } + (v_mL)^{{\mathcal {r}}}\right) \cdot n_m \right] dS\nonumber \\&\quad +\frac{1}{2}\int \limits _{{\partial \Omega _i}} {\left( F^{3q4,{\mathcal {r}}}_m + F^{34,\ell }_m \right) n_m} dS + \int \limits _{{\partial \Omega _i}} \frac{1}{2}\left( {\mathbf {p}}_h^{\ell } \cdot {\mathcal {R}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}}) + {\mathbf {p}}_{h}^{{\mathcal {r}}} \cdot {\mathcal {R}}({\mathbf {q}}_h^{{\mathcal {r}}},{\mathbf {q}}_h^{\ell }) \right) \cdot {\mathbf {n}} \, dS \nonumber \\&\quad =\!\int \limits _{{\partial \Omega _i}}\!\! \frac{1}{2}\left( {\mathbf {p}}_{h}^{\ell }+{\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {{\mathcal {G}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {\mathbf {n}} \, dS \! +\!\! \int \limits _{{\partial \Omega _i}} \!\!\frac{1}{2}\left( \partial _m{\mathbf {p}}_{h}^{\ell }-\partial _m{\mathbf {p}}_{h}^{{\mathcal {r}}}\right) \cdot {{\mathcal {V}}({\mathbf {q}}_h^{\ell },{\mathbf {q}}_h^{{\mathcal {r}}})} \cdot {n}_m \, dS, \end{aligned}$$

where the sum of the second, third and fourth terms is a consistent approximation of the total energy flux. Integrating over the domain \(\Omega \), we obtain nonlinear stability in the energy norm

$$\begin{aligned} \int \limits _{\Omega } \frac{\partial {\mathcal {E}}_{h}}{\partial t} d\mathbf {x}=\sum _{{\Omega _i}}\int \limits _{{\Omega _i}} \partial _t {\mathcal {E}}_{h} d\mathbf {x}= 0 \end{aligned}$$

since the sum of all internal fluxes cancels and the boundary fluxes vanish. \(\square \)

4 Numerical Results

In this section, we present several numerical test cases aiming at assessing the proposed semi-discrete HTC DG schemes for both the GPR model and the hyperbolic turbulent shallow water system. As time integrator the classical fourth order Runge-Kutta method is used for all test problems shown below. Besides, the time step is set according to the CFL-type condition

$$\begin{aligned} \Delta t = \frac{\text {CFL}}{2N+1} \, \frac{1}{\frac{|\lambda _{\max }|}{h} + 2 \, \epsilon \, \frac{2N+1}{h^2}} \end{aligned}$$
(70)

with \(h=\min (\Delta x, \Delta y)\) the characteristic mesh spacing, \(|\lambda _{\max }|\) the maximum absolute value of the eigenvalues in the domain and \(\text {CFL} < d\), where d is the number of space dimensions.

4.1 GPR Model of Continuum Mechanics

In all numerical tests carried out in the fluid limit of the GPR model the relaxation time \(\tau _1\) is obtained from the relation \(\mu = \frac{1}{6} \rho _0 c_s^2 \tau _1\) for given shear sound speed \(c_s\), reference density \(\rho _0\) and dynamic viscosity \(\mu \). If not stated otherwise, the artificial viscosity is by default set to \(\epsilon =0\), the reference density is set to \(\rho _0=1\) and the specific heat at constant volume is set to \(c_v=1\). We furthermore set \(\gamma =1.4\) for all tests.

4.1.1 Numerical Convergence Study

The order of accuracy of the new HTC DG scheme is verified experimentally for the Euler subsystem, i.e. for the black terms in (1) at the aid of the well-known isentropic vortex problem, see [61]. The parameters for the GPR model are set to \(c_s=0\), \(c_h=0\) and the artificial viscosity is set to \(\epsilon =0\). The problem is solved until a final time of \(t=0.25\) in a periodic domain \(\Omega = [0,10]^2\). Since the flow is isentropic, the entropy is constant and therefore the corresponding velocity, temperature, density and pressure profiles are

$$\begin{aligned}&\left( \begin{array}{c} \delta v_1 \\ \delta v_2 \end{array}\right) = \frac{\varepsilon }{2\pi }e^{\frac{1-r^2}{2}} \left( \begin{array}{c} 5-y \\ x-5 \end{array}\right) , \quad \delta T = -\frac{(\gamma -1)\varepsilon ^2}{8\gamma \pi ^2}e^{1-r^2}, \nonumber \\&\quad \delta \rho = (1+\delta T)^{\frac{1}{\gamma -1}}, \quad \delta p = (1+\delta T)^{\frac{\gamma }{\gamma -1}} \end{aligned}$$
(71)

with \(r^2=(x-5)^2+(y-5)^2\) and the vortex strength \(\varepsilon =5\). The above vortex is a steady solution of the Euler equations, hence the initial condition is equal to the exact solution of the problem also for all later times. The numerical convergence study of the HTC DG schemes is carried out with different polynomial approximation degrees N on a sequence of successively refined Cartesian meshes composed of \(N_x \times N_y\) elements. The \(L^2\) error norms computed at the final time are reported in Table 1, together with the numerically observed convergence rates of the scheme for the density \(\rho \), the momentum density \(\rho v_1\) and the entropy density \(\rho S\).

The numerical convergence rates are optimal for the density (\(N+1\)), while they are not for the momentum density. Instead, the entropy density reaches orders between 2N and \(2N+2\). The explanation for this interesting observation is the following: the present test problem is isentropic and for \(\epsilon =0\) the only mechanism that generates entropy in the HTC DG scheme is the jump term \(\frac{1}{2}s_{\max } ({\mathbf {q}}_h^+ - {\mathbf {q}}_h^-)\) in the numerical viscosity flux \({\mathcal {G}}\). But since the jumps tend to zero with order between \(N+\frac{1}{2}\) to \(N+1\) and the production term \(\Pi _k\) in the entropy inequality is quadratic in the jump, for the proposed HTC DG scheme we actually expect twice the convergence order for the entropy density for all isentropic flows. This seems to be indeed a very interesting feature of our new HTC DG scheme, which is directly based on the discretization of the entropy inequality (1c) rather than on the total energy conservation law (1f), unlike standard DG schemes.

Table 1 Numerical convergence results in \(L^2\) norm for density \(\rho \), momentum density \(\rho v_1\) and entropy density \(\rho S\) at time \(t=0.25\) using the HTC DG scheme applied to the Euler subsystem, i.e. to the black terms in (1)

4.1.2 Simple Shear Motion in Solids and Fluids

Next, we simulate the time evolution of a simple isolated shear layer in one space dimension. The computational domain is the interval \(\Omega =[-0.5,+0.5]\) and the initial data are \(\rho =1\), \(v_1=v_3=0\), \(p=1\), \({\mathbf {A}}= {\mathbf {I}}\), \({\mathbf {J}}=0\), \(v_2=-v_0\) for \(x<0\) and \(v_2=+v_0\) for \(x\ge 0\) with \(v_0=0.1\). The shear sound speed and the speed of heat waves are set to \(c_s=c_h=1\). Simulations are carried out until a final time of \(t=0.4\) using an equidistant grid composed of 1024 element using the new HTC discontinuous Galerkin scheme with polynomial approximation degree of \(N=9\). In the fluid limit of the model, i.e. for \(\tau _1 \ll 1\), we set \(\kappa = \mu \) and the reference solution for \(v_2\) is simply given by the exact solution of the first problem of Stokes for the incompressible Navier–Stokes equations, see e.g. [11, 15, 24, 40], and which reads

$$\begin{aligned} v_2(x,t) = v_0 \, \text {erf}\left( \frac{1}{2}\frac{x}{\sqrt{\nu t}} \right) \end{aligned}$$
(72)

with \(\nu = \mu / \rho _0\). In the solid limit of the GPR model a reference solution can be obtained by solving the system (1) on a very fine mesh of 10000 cells using a classical second order accurate MUSCL-Hancock type TVD finite volume scheme, see [96] for details. In all cases we set the artificial viscosity to \(\epsilon =10^{-6}\). The numerical results obtained with the new HTC DG scheme are shown in Fig. 1 and in all cases an excellent agreement between numerical and reference solutions can be observed.

Fig. 1
figure 1

Numerical solution at time \(t=0.4\) obtained with the new thermodynamically compatible HTC discontinuous Galerkin finite element schemes for the GPR model applied to simple shear motion in viscous fluids and in an ideal elastic solid using 1000 elements with polynomial approximation degree \(N=9\). Results for the solid (top left) and for fluids with different viscosities: \(\mu =10^{-2}\) (top right), \(\mu =10^{-3}\) (bottom left) and \(\mu =10^{-4}\) (bottom right) (Color figure online)

4.1.3 Riemann Problems

In this section, we apply the new HTC DG scheme to five Riemann problems in the domain \(\Omega =[-0.5,+0.5]\) with left and right initial states given in Table 2 and with initial discontinuity located in \(x_c=0\), if not stated otherwise. We consider test cases for both, the full GPR model (1) (RP4 and RP5), as well as the Euler subsystem (RP1, RP2, RP3), i.e. just the black terms in (1). The exact Riemann solver for the Euler equations can be found in the well-known textbook [96]. For the full GPR model we generate a numerical reference solution by solving (1) on a very fine mesh of 128000 control volumes using a classical second order TVD finite volume scheme of the MUSCL-Hancock type, see [96]. For the computation of the reference solution, we solve the total energy conservation law (1f) instead of the entropy inequality (1c), while in the HTC DG scheme we solve the entropy inequality (1c) instead of the energy Eq. (1f). As such, the reference solution is really obtained in a completely different manner compared to the numerical scheme proposed in this paper. For the last two Riemann problems, RP4 and RP5, we define the initial conditions for the distortion field \({\mathbf {A}}\) and for the specific thermal impulse \({\mathbf {J}}\) to \({\mathbf {A}} = {\mathbf {I}}\) and \({\mathbf {J}}={\mathbf {0}}\). Furthermore, we set \(c_s=c_h=1\). For RP4 we furthermore choose the relaxation times so that \(\mu =\lambda =10^{-5}\) and for RP5 we simply set \(\tau _1 = \tau _2 = 10^{20}\). The artificial viscosity is set to \(\epsilon = 10^{-5}\) in all cases. In Figs. 234 and 5 we compare the reference solutions with the numerical results obtained with the new HTC DG scheme proposed in this paper. The employed mesh resolution is provided for each test case in the corresponding figure caption and the polynomial approximation degree for the HTC DG scheme is set to \(N=9\). For all Riemann problems we can observe an excellent agreement between numerical solution and reference solution.

Table 2 Initial states left (L) and right (R) for density \(\rho \), velocity \({\mathbf {v}}=(v_1,v_2,0)\) and pressure p for Riemann problems RP1-RP3 (Euler subsystem) and for RP4-RP5 (full GPR model)
Fig. 2
figure 2

Results of the density for Riemann problems RP1 (\(x_c=0\)) and RP2 (\(x_c=-0.2\)) at times \(t=0.2\) and \(t=0.035\), obtained using the new thermodynamically compatible HTC DG scheme with \(N=9\) (red dashed line) on 1000 elements applied to the compressible Euler equations. The exact solution, see [96], is pictured by the black solid line (Color figure online)

Fig. 3
figure 3

Results for the double rarefaction problem RP3 (\(x_c=0\)) at time \(t=0.2\), obtained using the new thermodynamically compatible HTC DG scheme with \(N=9\) (red dashed line) on 1000 elements applied to the compressible Euler equations. Density (left panel), velocity (central panel), specific internal energy (right panel). The exact solution, see [96], is pictured by the black solid line (Color figure online)

Fig. 4
figure 4

Numerical results at time \(t=0.2\) for Riemann problem RP4 (\(x_c=0\)), obtained with the new HTC DG scheme (red solid line) on 1000 elements with \(N=9\), a fourth order ADER-DG scheme applied to the vanishing viscosity limit of the viscous equations (1a)–(1c) using \(\epsilon = 2 \times 10^{-5}\) on 14,400 elements (dashed blue line) and the exact solution of the compressible Euler equations (black solid line). This test corresponds to the fluid limit of the GPR model (Color figure online)

Fig. 5
figure 5

Numerical results at time \(t=0.2\) for Riemann problem RP5 (\(x_c=0\)) obtained with the HTC DG scheme (red solid line) on 1000 elements with \(N=9\), a fourth order ADER-DG scheme applied to the vanishing viscosity limit of the viscous equations (1a)–(1c) using \(\epsilon = 2 \times 10^{-5}\) (dashed blue line) on 144,000 elements and the reference solution obtained with a MUSCL-Hancock scheme applied to the model with the energy conservation law (1f) instead of the entropy inequality (1c) (black solid line) using 128000 elements. This test corresponds to the solid limit of the GPR model (Color figure online)

4.1.4 Viscous Shock Wave

Here we apply our new HTC DG scheme to a stationary viscous shock wave with a shock Mach number \(M_s=2\). The Prandtl number in the fluid is set to Pr\(=0.75\), hence an exact solution of the compressible Navier–Stokes equations exists, see e.g. [9, 14] and [40] for a detailed description of the test problem and for details concerning the computation of the exact solution. The problem is solved in the domain \(\Omega =[-0.5,+0.5]\) and the shock wave is centered at \(x=0\). The fluid moves into the shock from the left to the right. The density, velocity, pressure and sound speed in front of the shock are \(\rho _0 =1\), \(v^0_1=2\), \(v^0_2=v_3=0\), \(p^0=1/\gamma \) and \(c^0 = 1\). The Reynolds number based on a unitary reference length \(L=1\) is \(Re_s= \rho ^0 \, c^0 \, M_s \, L \, \mu ^{-1}\). The remaining parameters of the GPR model are chosen as \(c_v = 2.5\), \(c_h=c_s=10\), \(\mu =2 \times 10^{-2}\) and \(\lambda = \left( 9 + \frac{1}{3}\right) 5\times 10^{-2}\), hence the shock Reynolds number is \(Re_s=100\). The initial data for the distortion field and for the thermal impulse are \({\mathbf {A}}=\root 3 \of {\rho } \, {\mathbf {I}}\) and \({\mathbf {J}}={\mathbf {0}}\). The HTC DG scheme is run until a final time of \(t=0.25\) on 256 elements with a polynomial approximation degree of \(N=9\). In Fig. 6 we provide a comparison between the numerical solution obtained with the new thermodynamically compatible DG scheme proposed in this paper and applied to (1) with the exact solution of the compressible Navier–Stokes equations. For all quantities an excellent agreement between numerical and reference solution is achieved.

Fig. 6
figure 6

Exact solution of the compressible Navier–Stokes equations and numerical solution obtained with the HTC DG scheme (\(N=9\)) applied to the GPR model for a viscous shock at \(M_s=2\), \(Re_s=100\) and \(Pr=0.75\). Density (left), stress \(\sigma _{11}\) (center) and heat flux \(h_1\) (right) at time \(t=0.25\) (Color figure online)

4.1.5 Solid Rotor Problem

As fourth test, we study the solid rotor problem proposed in [15, 22], by solving the GPR model in the solid limit, i.e. setting \(\tau _1 = \tau _2 = 10^{20}\). The computational domain is the square \(\Omega = [-1,+1]^2\) with transmissive boundary conditions everywhere. Initially we set \(\rho = 1\), \(p = 1\), \({\mathbf {A}} = {\mathbf {I}}\), \({\mathbf {J}}={\mathbf {0}}\), and a velocity field given by \(v_1 = -y/R\), \(v_2 = +x/R\) and \(v_3=0\) within the circle \(\left\| {\mathbf {x}} \right\| \le R\) of radius \(R=0.2\), while for \(r > R\) the medium is at rest, i.e. \({\mathbf {v}}=0\). The shear sound speed and the parameter related to finite speed heat wave propagation are set to \(c_s = 1.0\) and \(c_h = 1.0\). Simulations are run until a final time of \(t=0.3\) using the new HTC DG scheme with \(128 \times 128\) elements and a polynomial approximation degree of \(N=5\). The artificial viscosity is set to a constant value of \(\epsilon = 5 \times 10^{-4}\). The reference solution is provided by a second order MUSCL-Hancock scheme on \(512 \times 512\) control volumes, see [15, 22]. In Fig. 7 the numerical results obtained with the HTC DG scheme are compared with the reference solution. We observe a very good agreement, also with the results published previously in [15, 22].

Fig. 7
figure 7

Results obtained for the solid rotor problem at time \(t=0.3\) applying the new HTC DG scheme (\(N=5\)) to the GPR model in the solid limit (left) and using a classical second order MUSCL scheme (right) (Color figure online)

4.1.6 Lid-Driven Cavity

We now apply our new thermodynamically compatible HTC DG scheme to the well-known lid-driven cavity problem, see [51]. This test can be used to validate compressible flow solvers in the low Mach number regime, see e.g. [11, 24, 94] and was already successfully solved with the GPR model, see [15, 22, 40]. The two-dimensional computational domain is \(\Omega = [0,1] ^{2}\) and the initial condition is given by \(\rho =1\), \({\mathbf {v}}={\mathbf {0}}\), \(p=10^2\), \({\mathbf {A}}={\mathbf {I}}\) and \({\mathbf {J}}={\mathbf {0}}\). The lid velocity on the upper boundary is \({\mathbf {v}}=(1,0,0)\), while solid no-slip walls, \({\mathbf {v}}={\mathbf {0}}\), are imposed everywhere else. As model parameters we use \(c_s = 8\), \(c_h=2\), \(\tau _2=10^{-2}\) and \(\mu =10^{-2}\), i.e. the associated Reynolds number is \(Re=100\), while the characteristic Mach number of the flow based on the lid velocity is about \(M=0.08\). The new HTC DG scheme is run until \(t=10\) using \(256 \times 256\) elements with polynomial approximation degree \(N=3\) and \(\epsilon =10^{-3}\). The obtained computational results are depicted in Fig. 8, where also a comparison with the reference solution of Ghia et al. [51] is shown and which is based on the solution of the incompressible Navier–Stokes equations. One can observe an excellent agreement between the numerical results obtained with the new HTC DG scheme applied to the GPR model and the reference solution. We stress that the reference solution has been obtained with a different numerical scheme that was applied to a different PDE system.

We would like to clarify that the lid-driven cavity generates pressure peaks in the upper corners of the domain due to the discontinuous velocity field in the boundary conditions, which requires limiting of high order DG schemes. This is the reason why the simulation was carried out with artificial viscosity, see also [22] for the same artificial viscosity parameter used in thermodynamically compatible finite volume schemes.

Fig. 8
figure 8

Lid-driven cavity at Reynolds number \(Re=100\). Results at time \(t=10\) using the new HTC DG scheme (\(N=3\)) applied to the GPR model. Contours of \(v_1\) (left) and comparison of the velocity with the reference solution [51] on 1D cuts along the x and y axis (right) (Color figure online)

4.1.7 Double Shear Layer

In this last test case concerning the GPR model, we solve the double shear layer problem of [10]. This benchmark was also used in [11, 15, 22, 24, 40, 93, 94] to assess the behaviour of compressible flow solvers in the weakly compressible regime, including applications to the GPR model. The computational domain is \(\Omega =[0,1]^2\), the boundary conditions are periodic everywhere and the test is run until a final time of \(t=1.8\). The initial condition reads

$$\begin{aligned} v_1=\left\{ \begin{array}{ll} \tanh \left( {\tilde{\rho }} (y-0.25) \right) , &{}\quad \text { if } y \le 0.5, \\ \tanh \left( {\tilde{\rho }} (0.75-y) \right) , &{}\quad \text { if } y > 0.5, \end{array} \right. \qquad v_2= \delta \sin (2\pi x), \qquad v_3 = 0, \end{aligned}$$

\(\rho = \rho _0 = 1\), \(p = 10^2 / \gamma \), \({\mathbf {A}}={\mathbf {I}}\) and \({\mathbf {J}}={\mathbf {0}}\), with \(\delta =0.05\) and \({\tilde{\rho }}=30\). The remaining model parameters are set to \(\nu = \mu / \rho _0 = 2 \times 10^{-3}\), \(\rho _0=1\), \(c_v=1\), \(c_s=8\), \(c_h=2\) and \(\tau _2 = 4 \times 10^{-3}\), hence the characteristic Mach number is \(M=0.1\). We run our new HTC DG scheme on a mesh of \(1024 \times 1024\) elements, using a polynomial approximation degree of \(N=3\) and \(\epsilon = 1 \times 10^{-6}\). In Fig. 9 the temporal evolution of the distortion field component \(A_{12}\) is shown. One can observe how the initial shear layers develop into several vortex structures. A more detailed analysis of the flow has been provided in [10, 11, 15, 24, 40]. Our computational results agree very well with those obtained with the thermodynamically compatible finite volume scheme [22] run on \(4000 \times 4000\) control volumes.

Fig. 9
figure 9

From top to bottom: distortion field component \(A_{12}\) for the double shear layer at times \(t=0.4\), \(t=0.8\), \(t=1.2\) and \(t=1.8\) obtained with the HTC DG scheme on \(1024 \times 1024\) elements and polynomial approximation degree \(N=3\) applied to the GPR model (\(\mu = 2 \times 10^{-3}\)) (left column). For comparison, the results obtained with the HTC finite volume scheme [22] on \(4000 \times 4000\) control volumes are also shown (right column) (Color figure online)

4.2 Turbulent Shallow Water Flows

4.2.1 Numerical Convergence Study

In order to verify the convergence of the new HTC DG scheme for the turbulent shallow water model experimentally we consider a manufactured solution test proposed in [21]. The test is run on the computational domain \(\Omega =[0,2 \pi ]^2\) and with periodic boundary conditions everywhere. The solution of system (11) is defined as follows:

$$\begin{aligned} h({\mathbf {x}},t) = h_{0}, \qquad h{\mathbf {v}}({\mathbf {x}},t) = \begin{pmatrix} \sin (x)\cos (y)\cos (t)\\ -\cos (x)\sin (y)\cos (t) \end{pmatrix},\nonumber \\ {\mathbf {Q}}({\mathbf {x}},t) =q_0\begin{pmatrix} \sin (x)\cos (y)\cos (t) &{} -\sin (x)\cos (y)\cos (t) \\ -\cos (x)\sin (y)\cos (t) &{} \cos (x)\sin (y)\cos (t) \end{pmatrix} \end{aligned}$$
(73)

with the total energy

$$\begin{aligned} h E ({\mathbf {x}},t) = g\frac{h_0^2}{2} + \left( \frac{2}{h_0} + h_0 q_0^2\right) \left( \sin ^2(x)\cos ^2(y)+\cos ^2(x)\sin ^2(y)\right) \cos ^2(t). \end{aligned}$$
(74)

This choice of \({\mathbf {Q}}({\mathbf {x}},t)\) yields a Reynolds stress tensor of the form

$$\begin{aligned} {\mathbf {P}}({\mathbf {x}},t) = 2q_0^2\begin{pmatrix} c_1^2 \cos ^2(t) &{} - c_1 c_2 \cos ^2(t) \\ - c_1 c_2 \cos ^2(t) &{} c_2^2 \cos ^2(t) \end{pmatrix}, \end{aligned}$$
(75)

with \(c_1=\sin (x) \cos (y)\) and \(c_2 = \sin (y) \cos (x)\). To complete the definition of the problem we set \(h_{0}=1\) and \(q_{0}=0.5\). Let us remark that to get the sought solution, (73)–(74), a set of source terms must be added to the right hand side of (11). The expressions of the source terms can be simply calculated by substitution of (73)–(74) in (11). The simulation is run until a final time of \(t=0.1\) using the new HTC DG schemes proposed in this paper and using polynomial degrees \(N\in \left\{ 2,3,4,5\right\} \). The artificial viscosity coefficient is set to \(\epsilon =0\) inside each element, while for this test case the penalty parameter inside the Rusanov-type flux \({\mathcal {G}}\) is set to \(\eta =s_{\max }\). The errors in \(L^{2}\) norm obtained for h, \(hv_1\) and \(Q_{11}\) are reported in Table 3. From the obtained results we can conclude that, overall, the obtained experimental order of accuracy of the scheme is \(N+1\) for the water depth h, while for the other quantities we observe \(N+1\) for odd and N for even polynomial approximation degrees N.

Table 3 \(L^{2}\) errors and convergence rates for the manufactured test obtained using the ADER-DG method with \(N\in \left\{ 2,3,4,5 \right\} \)
Table 4 Initial left and right states for the Riemann problems RP1–RP3 for the turbulent shallow water model

4.2.2 Riemann Problems

In this section, we address a set of three Riemann problems proposed and solved in [21] for the turbulent shallow water model (11). An exact Riemann solver for the original model [50, 62] based on the evolution of the Reynolds stress tensor \({\mathbf {P}}\) instead of its decomposition \({\mathbf {Q}}\) was recently forwarded in [74]. For alternative numerical schemes applied to the hyperbolic shear shallow water model the reader is referred to [12, 21, 29, 74]. An important difficulty present in the model (11) and also in the original model proposed in [50] is its non-conservative formulation, with non-conservative products active across genuinely nonlinear fields. This makes a proper numerical discretization in the presence of shock waves extremely challenging. In [21] it was shown that thermodynamic compatibility, in particular compatibility with the total energy conservation law, is a necessary key ingredient for a correct discretization of the equations. Thermodynamic compatibility can be either achieved via the original wave splitting proposed in [50], or by the unsplit schemes introduced in [21], which either enforce energy conservation by explicitly solving the energy equation and an appropriate rescaling of the object \({\mathbf {Q}}\), or via a thermodynamically compatible discretization that is consistent with (11) at a discrete level, including the entropy production terms \(\Pi _{ik}\), or via a direct numerical simulation (DNS) of the viscous equations in the vanishing viscosity limit.

Fig. 10
figure 10

Numerical solution of Riemann problem RP1 obtained with different numerical schemes at time \(t=0.5\): split scheme of [50] on 250,000 elements (solid black line); vanishing viscosity limit of the viscous system (11a)–(11d) with \(\epsilon = 2 \times 10^{-6}\) using a fourth order ADER-DG scheme (\(N=3\)) on 11,200 elements (dashed blue line); new thermodynamically compatible HTC DG scheme on 4096 elements with \(N=9\) (dashed red line) (Color figure online)

Fig. 11
figure 11

Numerical solution of the Riemann problem RP2 obtained with different numerical schemes at time \(t=10\): split scheme of [50] on 100,000 elements (solid black line); vanishing viscosity limit of the viscous system (11a)–(11d) with \(\epsilon = 1 \cdot 10^{-6}\) using a fourth order ADER-DG scheme (\(N=3\)) on 10,200 elements (dashed blue line); new thermodynamically compatible HTC DG scheme on 2048 elements with \(N=9\) (dashed red line) (Color figure online)

Fig. 12
figure 12

Numerical solution of the Riemann problem RP3 obtained with different numerical schemes at time \(t=0.5\): split scheme of [50] on 250,000 elements (solid black line); vanishing viscosity limit of the viscous system (11a)–(11d) with \(\epsilon = 2 \times 10^{-6}\) using a fourth order ADER-DG scheme (\(N=3\)) on 10,200 elements (dashed blue line); new thermodynamically compatible HTC DG scheme on 2048 elements with \(N=9\) (dashed red line) (Color figure online)

In the following we solve three Riemann problems in the one-dimensional domain \(\Omega = [0,1]\) with initial data given in Table 4, where also the final times are reported for each test case. The state variables which are not explicitly indicated in Table 4 are set to zero, i.e. \(v_1 = 0\) and \(Q_{21}=0\). All simulations are run with the thermodynamically compatible DG scheme proposed in this paper, using 4096 elements and a polynomial approximation degree of \(N=9\). The artificial viscosity is set to \(\epsilon =10^{-6}\) in RP1 and RP2 and to \(\epsilon = 2 \times 10^{-6}\) for RP3. The obtained computational results are shown in Figs. 1011 and 12, where also a comparison with the scheme of Ivanova et al. [62] is provided, together with a comparison of a direct numerical simulation (DNS) of the vanishing viscosity limit of the equations on a sufficiently fine mesh.

The numerical results obtained with the HTC DG scheme are in excellent agreement with both reference solutions, even for RP3 with its complex wave pattern. This highlights the importance of the discrete thermodynamic compatibility when discretizing non-conservative hyperbolic equations like system (11).

Fig. 13
figure 13

Roll wave test problem for turbulent shallow water flow at time \(t=12.5\): comparison of the numerical results obtained using the new HTC DG scheme (\(N=5\)) with the experimental profile of Brock [16, 17] (Color figure online)

4.2.3 Roll Waves

The last test case concerns the simulation of one-dimensional roll waves and was originally proposed and numerically solved in [50]. The obtained numerical results can be compared with the experimental data provided by Brock in [16, 17]. The one-dimensional domain \(\Omega = [0, L]\) is periodic with length \(L=1.3\). According to [50] the initial condition reads \(h = h_0 ( 1 + a \sin (2 \pi x / L))\) with \(a=0.05\), \(v_1 = \sqrt{ g h_0 \tan \theta / C_f}\), \(v_2=0\) and \({\mathbf {Q}}= \sqrt{\frac{1}{2}\varphi h^2} {\mathbf {I}}\). The remaining parameters of this test problem are \(\theta = 0.05011\), \(\partial _x b = \tan (\theta )\), \(h_0 = 0.00798\), \(C_f = 0.0036\), \(C_r = 0.00035\) and \(\varphi = 22.76\), see [50]. In order to simulate this test case, the following dissipative source terms must be added to the right hand side of (11): in the momentum equation (11b) we add the term \(-C_f \sqrt{v_m v_m} v_i\) to the right hand side and in the PDE for \(Q_{ik}\), Eqn. (11c), we add \(-\alpha / h Q_{ik}\), with \(\alpha = \max \left( 0, C_r \frac{\text {tr}{\mathbf {P}} - \varphi h^2}{\text {tr}{\mathbf {P}} ^2} \left\| {\mathbf {v}} \right\| ^3 \right) \) to the right hand side, see [50] and [21] for details. It is obvious that in the presence of the dissipative source terms, total energy in the turbulent flow is no longer conserved.

We run the new thermodynamically compatible DG scheme proposed in this paper using 512 elements, a polynomial approximation degree of \(N=5\) and an artificial viscosity of \(\epsilon =4 \times 10^{-5}\). Simulations are run until a final time of \(t=12.5\). As already suggested in [21], the bottom slope is simply implemented as an algebraic source. In Fig. 13 the numerical results obtained with the new HTC DG scheme are compared with the experimental profile of Brock documented in [16, 17, 21, 50]. In order to perform this comparison, the spatial coordinate has been normalized by the reference length L and the wather depth has been normalized by \(h_0\), i.e. we plot \(h/h_0\) over x/L. The numerical results have been shifted in x direction so that the numerical shock location coincides with the experimental one. In total two periods of the simulation are shown. Overall, one can note a good agreement between the numerical results and the experimental reference data.

5 Conclusion

In this paper we have introduced new high order accurate and thermodynamically compatible discontinuous Galerkin finite element schemes for the Godunov–Peshkov–Romenski (GPR) model of continuum mechanics and for the first order hyperbolic model of turbulent shallow water flows of Gavrilyuk et al. [50, 62]. The key feature of our new methods is that they discretize the entropy inequality directly as a primary evolution equation, while total energy conservation is achieved as a mere consequence of the thermodynamically compatible discretization of all other equations. The new DG methods satisfy a cell entropy inequality by construction, and can be proven to be nonlinearly stable in the energy norm due to the thermodynamic compatibility. The new DG schemes proposed in this paper can therefore be seen as the missing dual algorithms to known entropy consistent DG schemes, which usually discretize the total energy conservation law directly and obtain the entropy inequality as a consequence, see e.g. [30, 38, 48, 60, 70, 87, 89].

To the very best of our knowledge, the DG schemes presented in this paper are the first provably thermodynamically compatible DG schemes for the unified model of continuum mechanics of Godunov, Peshkov and Romenski [54, 77] and for the turbulent shallow water model of Gavrilyuk et al. [50, 62]. It is also the first time that a DG scheme has been developed which does not directly discretize the total energy conservation law, but which obtains total energy conservation as a consequence of a compatible discretization of all the other PDE. Compared to existing HTC finite volume schemes [20,21,22] the mathematical proofs for the DG framework are more complex, in particular concerning the design of a proper thermodynamically compatible numerical viscosity, for which the jump terms \({\mathcal {V}}\) must have opposite sign compared to classical symmetric interior penalty Galerkin schemes [47].

We have applied our new DG schemes to a wide range of test problems in one and two space dimensions, obtaining overall a very good agreement with available exact, numerical and even experimental reference solutions. As in previous work on thermodynamically compatible finite volume schemes [20,21,22] the high order DG schemes presented in this paper rely on a path-integral and a Godunov parametrization of the physical flux \({\mathbf {f}}_k = \partial _{{\mathbf {p}}}(v_k L)\) in terms of a generating potential L in order to construct a thermodynamically compatible flux for the inviscid Euler and shallow water subsystems.

We clearly emphasize again that for all proofs provided in this paper we assume all integrals to be exact. Further work on provably thermodynamically compatible DG schemes including numerical quadrature errors will be necessary in the future, also considering the recent ideas of Abgrall et al. [1, 3].

In the future, we plan to extend our thermodynamically compatible DG schemes also to the magnetohydrodynamics (MHD) equations and to the conservative SHTC system of compressible two-fluid flows proposed and studied in [71, 84, 86, 95]. The thermodynamically compatible DG schemes presented in this paper have been analyzed only in the semi discrete setting. The fully discrete case is clearly out of scope of the present paper. Further research will also consider fully-discrete thermodynamically compatible time discretizations, either making use of the line integral approach of Brugnano and Iavernaro [18, 19], or by extending the exactly conservative fully-discrete FV scheme forwarded in [22] for the Euler subsystem to the full GPR model and other more complex SHTC systems. However, the approach presented in [22] requires the calculation of \({\mathbf {q}}={\mathbf {q}}({\mathbf {p}})\) which is very complex in case of the GPR model. For alternative extensions to the fully discrete case, at least for the Euler subsystem, see e.g. [22, 73, 79, 80].

Moreover, we will investigate whether it is possible to extend thermodynamically compatible DG schemes in such a way as to preserve curl and divergence involution constraints exactly, see e.g. [15, 39] for involution-preserving semi-implicit discretizations on staggered meshes. We will also consider an extension of the framework of thermodynamically compatible schemes to the class of semi-implicit hybrid finite-volume / finite-element methods [11, 23, 24] on staggered unstructured meshes.

The development of provably thermodynamically compatible limiters for the DG scheme presented in this paper was out of scope of this work and will be left to future studies. Instead of sophisticated limiters, a simple artificial viscosity approach has been used in this paper. In the future we will consider also slope and moment limiters [64, 65], provably positivity preserving limiters [97], as well as the use of cell-centered thermodynamically compatible finite volume schemes [3, 20,21,22] as a posteriori subcell limiters, similar to the ideas on subcell limiting for DG schemes presented in [41, 60, 90, 91].

A fundamental mathematical property of any reasonable numerical scheme for nonlinear systems of hyperbolic conservation laws that was not investigated in this paper at all was the invariant domain preserving property (IDP), such as the positivity of density and entropy. Future work will consider provably IDP extensions of our methods, making use of the mathematical techniques presented in the seminal work of Guermond and Popov et al. concerning provably invariant domain preserving schemes [31, 57,58,59] and in the work of Kuzmin et al. [7, 65,66,67] concerning bound-preserving algebraic flux limiters and slope limiters for high order continuous and discontinuous Galerkin finite element schemes.