Novel Pressure-Equilibrium and Kinetic-Energy Preserving fluxes for compressible flows based on the harmonic mean
Abstract
Employing physically-consistent numerical methods is an important step towards attaining robust and accurate numerical simulations. When addressing compressible flows, in addition to preserving kinetic energy at a discrete level, as done in the incompressible case, additional properties are sought after, such as the ability to preserve the equilibrium of pressure that can be found at contact interfaces. This paper investigates the general conditions of the spatial numerical discretizations to achieve the pressure equilibrium preserving property (PEP). Schemes from the literature are analyzed in this respect, and procedures to impart the PEP property to existing discretizations are proposed. Additionally, new PEP numerical schemes are introduced through minor modifications of classical ones. Numerical tests confirmed the theory hereby presented and showed that the modifications, beyond the enforcement of the PEP property, have a generally positive impact on the performances of the original schemes.
Keywords Compressible flows Turbulent flows Kinetic-energy preserving methods Pressure equilibrium preserving methods
1 Introduction
Despite the long-standing research efforts starting in the 1950s with the pioneering work at Los Alamos National Laboratory, the design of numerical methods for the discretization of Navier-Stokes equations is still an active research topic. The growth of computational resources continually pushes the community towards more challenging applications, and the design of the ‘optimal’ discretization setting for the various flow regimes, especially for turbulent flows, is still an ambitious goal.
In the context of compressible flows, considerable research efforts have focused over many decades on the problem of the correct and efficient representation of admissible weak solutions (i.e. shock waves or contact discontinuities). However, there are some numerical issues associated with smooth regions of the flow, such as the nonlinear instability due to the spatial discretization of convective terms, which have a great impact in numerical simulations at high Reynolds numbers and have received less attention. Only in recent years this topic has seen a renowned interest in the wider context of structure-preserving or physics-compatible methods. These methods aim to devise stable and reliable numerical discretizations without the explicit addition of numerical dissipation, but discretely reproducing the (conservative) structure of suitably selected induced quantities. The first paper addressing these topics is that of Feiereisen et al. [1] in which the authors, inspired by previous studies for incompressible formulations, use a skew-symmetric like splitting of the convective terms in mass and momentum equations within the framework of a Finite Difference (FD) discretization. This formulation was shown to achieve the so-called Kinetic Energy Preserving (KEP) property, i.e. the induced discrete equation for kinetic energy has convective terms automatically coming in conservative form, which implies that the discrete formulation does not spuriously produce kinetic energy, with a remarkable increase in reliability of the numerical simulations. After this seminal work, several other attempts have been made to obtain more general KEP schemes, among which we recall here the Finite Volume (FV) analyses of Jameson [2] and Subbareddy and Candler [3] and the works on the triple splitting by Kennedy and Gruber [4] and Pirozzoli [5]. In more recent years, a quite complete characterization of the possible KEP formulations in a FD framework has been derived [6] and its relations with FV formulations based on algebraic fluxes have been explored [7, 8]. Among other less standard extensions of interest, we mention the approach of Edoh [9], utilizing the rotational form of the momentum equation, and that in which a formulation of the governing equations based on square-root variables is used [10, 11, 12, 13].
In addition to kinetic energy, also discrete entropy conservation has been explored as a means to improve fidelity and suppress instabilities in turbulent simulations. The first attempt in this direction from a FD standpoint was put forward by Honein and Moin [14], who proposed to integrate a modified (non conservative) version of the total-energy equation corresponding, for exact time integration, to a conservative discretization of the entropy equation. Although this approach achieves exact entropy conservation at the cost of spoiling the total-energy balance, it has shown increased robustness and a more faithful representation of thermodynamic fluctuations in numerical simulations of isotropic turbulence. In the context of FV methods, the theory of entropy variables developed by Tadmor [15, 16], forms the basis for the construction of Entropy Conservative (EC) numerical fluxes that can discretely reproduce the correct entropy balance without sacrificing the total-energy conservation. Ismail and Roe [17] developed ‘affordable’ EC numerical fluxes based on the logarithmic mean for ideal gases, whereas Chandrashekar [18] proposed for the first time both KEP and EC numerical fluxes as a basis for entropy-stable discretization of Euler and Navier-Stokes equations. More recently, Ranocha [19, 20] developed a more refined KEP and EC formulation which is also able to enforce the so-called Pressure Equilibrium Preserving (PEP) property [21], i.e. the ability of the discrete scheme to reproduce the traveling density wave solutions of the compressible Euler equations, obtained for initially uniform pressure and velocity distributions. This last scheme appears as the most complete one in terms of structure-preserving properties for compressible Euler equations and ideal gases. However, as it is based on logarithmic means, it comes with a non-negligible increase in computational cost and is potentially singular for uniform distributions of density or temperature. These disadvantages have been recently solved by De Michele and Coppola [22], who proposed a family of Asymptotically Entropy Conservative (AEC) schemes which are PEP and KEP and arbitrarily reduce the error on entropy conservation. As they are based on arithmetic and harmonic means, they only use algebraic operations for the computation of the fluxes, with increased efficiency at comparable performances. Moreover, the fluxes do not exhibit any singularity for uniform distributions. This family of schemes improves existing formulations which approximately enforce the entropy-conservation property, as the KEEP or KEEP(N) schemes [23, 24], by giving a more accurate reproduction of the induced entropy balance and by additionally enforcing the PEP property.
The enforcement of the PEP property has been seen as a crucial requirement in many applications ([25, 21, 26]) and recently it has been the subject of many studies, for ideal and real gases or multi-component flows ([21, 20, 27, 28, 26]). In this paper, we propose an analysis of existing PEP schemes for ideal gases which allows one to obtain simple criteria to enforce the PEP property in existing and widely used numerical fluxes. It is shown that the needed modifications typically amount to the specification of a suitable ‘dual’ interpolation for the density in the internal-energy flux which, in the cases here analyzed, reduces to the use of the harmonic mean in place of the arithmetic mean. The novel formulations are found to improve the global performances of the original schemes without increasing the computational cost.
2 Problem formulation and discrete approximation
In this paper, we focus on the spatial discretization of the compressible Euler equations:
(1) | ||||
(2) | ||||
(3) |
where , , and are respectively the density, the Cartesian velocity component along the direction , the pressure and the total energy per unit mass, sum of internal and kinetic energies: . We use Greek subscripts to refer to the Cartesian components of vectors, for which the summation convention over repeated indices holds. When the Greek subscripts are omitted, it is assumed that the relevant equations hold for a generic value of it (i.e. or ). In place of Eq. (3), the system of Euler equations could be equivalently written by using the evolution equation for another thermodynamic variable, such as pressure or internal energy per unit volume; we discuss this possibility in the context of the discretization procedure in Sec. 4.2. The ideal gas law is assumed, which implies the simple proportionality , the ratio of specific heats at constant pressure and volume being constant.
We work in a semi-discretized framework, in which spatial discretization is firstly performed, whereas the resulting system of Ordinary Differential Equations (ODE) is integrated in time by using a standard solver. Since we focus on spatial discretization, we will assume that the effects of time integration errors are negligible at sufficiently small time steps. This implies that in the theoretical analysis, all the manipulations involving time derivatives can be carried out at the continuous level. Spatial discretization is made by using a FD method over a uniform (colocated) Cartesian mesh of width . Our notion of FD methods liberally includes also all the discretizations in which a numerical flux defined on the face located at the midpoint between nodal values is specified, and the convective terms are expressed as differences of numerical fluxes at adjacent faces. These formulations usually belong to FV methods, but in our use, the discrete variables are always interpreted as nodal values over a colocated mesh, and no reference to cell-vertex or cell-centered formulations is made. Latin subscripts as or are used to denote the values of the discretized variable on a nodal point .
In what follows, we will discuss the PEP property of the spatial discretization; for this, we need to analyze the induced evolution equations for and , which can be easily obtained by manipulating Eq. (1)–(3) and read
(4) | ||||
(5) |
From these equations, one readily sees that for constant initial distributions of velocity and pressure, the right-hand sides of the evolution equations for velocity and pressure are zero, which in turn implies that time derivatives at the left-hand sides are also zero. This means that pressure and velocity remain constant (in time) when starting from constant (in space) distributions, i.e. the equations preserve the equilibrium of the pressure and the solution evolves as a density wave, according to Eq. (1). An important point here is that Eq. (4) and (5) are obtained by manipulation of Eqs. (1)–(3) in which the product or chain rules for derivatives are used, which are not valid, in general, at the discrete level. This implies that when Eqs. (1)–(3) are directly discretized, the discrete analogues of Eq. (4) and (5) have a structure which is, in general, different from that of the continuous equations, and the PEP property is typically lost at discrete level.
Eqs. (1)–(3), as most of the induced balance equations for secondary quantities, have a common structure that can be loosely expressed as
(6) |
where is the convective term and is a pressure term. The symbols and will be used here to denote both the individual spatial terms at the right hand sides of Eqs. (1)–(3), or their spatial discretizations, the correct interpretation emerging from the context. When needed, we will use the more explicit notation to denote a particular discretization of at node . In Eqs. (1)–(3) the convective terms have a divergence structure (i.e. they are in the form of the divergence of a convective flux) and we assume that the schemes used for the convective terms in the equations that are directly discretized are always in locally conservative form, i.e. they can be expressed as a sum of differences of (numerical) fluxes along each Cartesian direction. We use the symbol to denote the numerical flux along the direction . With this notation, the discretization of the convective term can be expressed as
(7) |
where . In most cases, the theory will be developed, without loss of generality, for the one-dimensional version of Eq. (1)–(3), as the convective terms along the various directions are independent and can be treated separately. For this reason, the apex will be most of the time removed from the notation for the numerical flux. Moreover, when the suffix or is not present, it is implicitly assumed that we are referring to the ‘right’ flux: .
As is a divergence-type term, Eq. (7) suggests that is an average- or interpolation-type term along , consistent with the convective flux at . There are many ways in which this interpolation can be done, as one can choose to interpolate the product of the variables or to take the product of the interpolations. Moreover, the choice of the interpolation operator adds crucial degrees of freedom to the specification of the numerical flux. Each choice corresponds to a different discrete formulation, with different properties. Here we are especially interested in how the choice of the numerical fluxes for the primary variables impacts the structural properties of the induced discrete evolution equations for pressure and velocity.
The formulations here analyzed will be exposed with respect to second-order (two-point), symmetric interpolations for the fluxes , which correspond to central-like and non-dissipative three-point discretizations of the convective terms . However, provided that the interpolation operators are also smooth and consistent, the theory reported in [22] (and adapted from [29]) easily allows the extension to high-order formulations.
3 Kinetic Energy preserving formulations
When using bilinear or trilinear interpolations, a complete correspondence can be obtained between the various choices of the numerical fluxes and suitable FD discretizations of the convective terms. For an extensive treatment of this and related topics, the reader is referred to [6, 7, 8, 30, 31]. Here, we summarize only the most useful relations. We preliminarily define the arithmetic and product means as and and the following FD discretizations for the convective terms for the mass equation and for a generic species :
(8) |
(9) |
where is the central difference and is a special symbol we use to denote . With this notation, it is not difficult to recognize the following correspondences between the convective terms and their associated fluxes in a 1D framework [5, 6, 7, 30]
(10) |
(11) |
where , and are the discretizations of the convective terms used by Feiereisen et al. [1], Coppola et al. [6], and Kennedy and Gruber [4] and Pirozzoli [5], respectively.
The coordinated use of suitable discretizations for the convective terms in the equations for and can conduct to KEP methods, which are built in such a way that the convective term in the discrete evolution equation for the generalized kinetic energy automatically has a globally (and locally) conservative structure [32, 33]. The combinations of the discretizations , and for the convective terms of the mass and equations are easily seen to be KEP [6, 7, 33]. The same considerations hold for any linear combination of two of them, giving rise to a one-parameter family of locally conservative KEP schemes. Its formulation in terms of numerical fluxes has the property that the convective fluxes for and are linked by the relation , which assures kinetic-energy preservation in second-order, finite volume discretizations [34, 35]. Note that this last condition is more general than the one developed for purely FD discretizations, as it holds for arbitrary specifications of the interpolations used for . This observation is relevant for us, since in what follows we will use more general interpolations than the ones corresponding to classical FD formulations (e.g. the logarithmic or harmonic means). Moreover, the KEP condition expressed in terms of numerical fluxes precisely identifies the degree of freedom left in these formulations with the mass flux, which is specified by one parameter for two-point bilinear interpolations [7], but can be arbitrarily specified for more general averages. In all the cases analyzed, it can be shown that KEP schemes are both globally and locally conservative for the generalized kinetic energy , with convective numerical flux ([7, 22]).
4 Pressure Equilibrium Preserving formulations
4.1 Discrete velocity equation
Starting from the (semi-)discrete equations (6) for mass () and momentum (), one can easily obtain the induced discrete version of the velocity equation (4)
(12) |
To discretely preserve the pressure equilibrium, the right-hand side of this equation must be equal to zero when pressure and velocity are spatially constant. Assuming that both and do not explicitly depend on the pressure, one obtains the conditions
(13) | ||||
(14) |
where we use the notation that the ‘hat’ symbol denotes the discrete term when evaluated at constant values of velocity and pressure .
The condition in Eq. (13) is always verified when a straightforward discretization of the pressure term is performed, such as . More elaborate discretizations for , however, are still allowed to obtain a PEP scheme, as long as Eq. (13) is satisfied. The condition in Eq. (14) needs more attention. Expressed in flux form it requires [20]
(15) |
As already mentioned in Sec. 3, a generic KEP scheme in flux form satisfies , so this kind of scheme fulfills the condition in Eq. (15) (and Eq. (14)). This is true for all schemes with mass flux based on bilinear interpolations, but also for more general schemes in which arbitrary interpolations are used for . Moreover, Eq. (14) can be satisfied also by schemes that are not KEP. As an example, the formulation employed by Blaisdell et al. [36], corresponding to and has numerical fluxes and , which are easily seen to be not KEP. However, for constant velocity and pressure, they become and , which satisfy Eq. (15). It turns out that the formulation employed in Blaisdell et al. [36] for the energy equation also satisfies the analogous condition for pressure, detailed in the next Sec. 4.2, which shows that the Blaisdell scheme, even without being KEP, is PEP.
4.2 Discrete pressure equation
As for the case of the discrete equation for velocity, algebraic manipulation of equations (6) for mass, momentum, and an ‘energy’ variable among , or , allows one to write the discrete evolution equation for . The form of this equation depends on the choice of the primary energy variable whose equation is directly discretized. In the following sections, we separately analyze some of the possible options.
4.2.1 Formulations based on the pressure equation
The simplest case is when the pressure equation (5) is discretized in place of Eq. (3). In this case, one has that the discrete pressure equation trivially is
(16) |
where and are specified through direct discretization of the terms and , respectively. Assuming a straightforward discretization of the non-conservative pressure term, such as
(17) |
and of , by using a general average of divergence and advective forms
(18) |
one naturally has . The simple proportionality between pressure and internal energy implies that if pressure is correctly preserved by convection (i.e. is in locally conservative form), then so is internal energy. Moreover, if the discretization of density and momentum equations is such that the scheme is KEP, then total energy is also conserved as a result.
This approach has been followed for the first time by Feiereisen et al. [1]. In that paper, in addition to the well known KEP discretization of mass and momentum equations, they use the pressure equation as ‘energy’ equation, with convective term discretized using the advective form
(19) |
corresponding to in Eq. (18) and to the convective numerical flux . The non-conservative pressure term is discretized as usual as . Under these assumptions, the condition is easily verified, which assures that the Feiereisen scheme, which is a prototypical KEP scheme, is also PEP. More recently, Shima et al. [21] proposed the KEEP-PE discretization of the total-energy equation that, for exact time integration, is equivalent to a direct discretization of the pressure equation where the skew-symmetric form is employed for the convective term
(20) |
corresponding to in Eq. (18) with associated numerical flux . The general formulation in Eq. (18) produces valid PEP schemes for all values of with numerical flux . The case of has been also investigated in [30].
Since the family defined by Eq. (18) only includes schemes that are combination of advective and divergence forms, and as a consequence are based on bilinear fluxes, it excludes all the possible discretizations associated with nonlinear fluxes. In fact, in the more general framework of finite-volume methods, the convective term is built as a difference of arbitrary fluxes, whose generic form can be written as
(21) |
where represents a generic two-point average of the product . Provided that the obvious consistency property that the flux is invariant under translation for constant and holds, one has and pressure equilibrium is preserved by convection. An example of this more general case is given by
(22) |
where is the geometric mean: . The convective term built on this flux can be shown to be equivalent to the discretization proposed by Rozema et al. [11]. In their work, it is considered the evolution equation of the square-root variable which, due to the proportionality between and for ideal gases, is equivalent to a direct discretization of the equation
(23) |
The use of the skew-symmetric form on the convective term can be shown to lead back to the flux in Eq. (22).
The findings of this section can be summarized by the following
Remark 1
(Discrete pressure equation)
A finite-difference discretization of the pressure equation with formulations (18) (or (21)) for the convective term and (17) for the pressure term, is always PEP, provided the conditions for velocity equilibrium Eq. (14) and (13) are satisfied. For ideal gases, internal energy is additionally discretely preserved by convection. If the discretizations of mass and momentum equations are KEP, total energy is also discretely conserved.
4.2.2 Formulations based on the internal-energy equation
All the mentioned formulations based on a direct discretization of the pressure equation can also be interpreted as discretizations of the internal-energy equation
(24) |
as, due to the proportionality relation in the ideal gas law, one has
(25) |
However, it is also possible to have schemes defined from a direct discretization of the internal-energy equation (24) that cannot be interpreted as coming from a straightforward discretization of the pressure equation. This happens when, in the specification of the numerical flux , the product is not treated as one single variable, but and are averaged separately. In this case the discretization of Eq. (24) is not equivalent to a direct discretization of the pressure equation, as the product of interpolations of and does not correspond, in general, to a single interpolation involving only pressure.
An example of this type of schemes is the KGP formulation analyzed in Coppola et al. [6], which uses the internal energy as thermodynamic variable and discretizes the convective terms with a full splitting, using the forms for the mass equation and for momentum and internal-energy equations, resulting in the set of fluxes
(26) |
For exact time integration, the scheme in Eq. (26) is equivalent to the KEEP scheme proposed in Kuya et al. [23], which discretizes the total-energy equation with kinetic-energy and pressure fluxes consistent with that induced by the formulation in Eq. (26). The KEEP scheme is analyzed in the next Sec. 4.2.3. The scheme defined by Eq. (26) cannot be cast as a conservative discretization of the pressure equation and, in fact, it is not PEP, as shown below.
Due to the proportionality relation in Eq. (25), schemes based on the discretization of the internal-energy equation can be PEP if, for constant and , the convective and pressure term for fulfill the condition
(27) |
as the proportionality condition (inducing Eq. (25)) holds in all cases for ideal gases. If the pressure term in Eq. (24) is directly discretized as , one has and Eq. (27) is equivalent to requiring that , i.e. the flux for the convective part of the internal-energy equation is only a function of pressure and velocity, which implies . Since we have already considered the case in which the product is treated as one, let us consider the generic internal-energy flux in which and are averaged separately. In this case, when velocity and pressure are constant and equal to and respectively, one can write:
(28) |
in which two different kinds of mean have been used for density and internal energy. To obtain Eq. (28) we have assumed that, given a constant and a variable , the relation holds for a generic mean. This is not the case for every possible mean, but it holds for most of them, such as all power means, including the harmonic mean, the logarithmic mean and the Stolarsky means used in Winters et al. [37].
In order for the flux in Eq. (28) to be constant, the means chosen for density and internal energy must satisfy
(29) |
where the value of the arbitrary constant at the right-hand side has to be one for consistency. Eq. (29) is the general condition for PEP schemes which are based on a discretization of the internal-energy equation in which and are averaged separately. The previous discussion can be summarized in the following
Remark 2
(Discrete internal-energy equation)
For ideal gases, a locally-conservative discretization of the internal-energy equation in which the convective flux is specified treating the product of density and internal energy as a single variable is equivalent to a formulation based on the pressure equation. As such, it is always PEP under the hypotheses of Remark 1.
Locally-conservative discretizations in which density and internal energy are interpolated separately are PEP if Eq. (29) is satisfied.
Many popular schemes fall into this category, and it is a simple exercise to check if they are PEP through the use of Eq. (29). The simplest example is the KGP scheme defined in Eq. (26) for which one has
(30) |
It is easily seen that in this case the flux is not constant, since , which do not satisfy Eq. (29), in general.
The scheme with flux in Eq. (22), can also be reinterpreted as a formulation based on internal-energy equation. In fact, due to the identity , the internal-energy flux corresponding to the pressure flux in Eq. (22) is , for which one has
(31) |
By noting that the geometric mean naturally has the property , one sees that Eq. (29) is satisfied with , which implies that the scheme based on the geometric mean, and equivalent to that proposed by Rozema et al. [11], is PEP.
As a further example, we consider the scheme studied by Ranocha and Gassner [20], which can be formulated through the specification of the mass, momentum and internal-energy fluxes as [22]
(32) |
where is the logarithmic mean. This scheme is easily seen to be KEP, because of the form of the momentum flux, and the wise use of the logarithmic mean renders it also EC for perfect gases [20, 22]. Written explicitly, the internal-energy flux is
(33) |
for which
(34) |
and in this case and is taken exactly as the dual mean required to satisfy Eq. (29): .
Finally, we consider the formulation recently proposed by De Michele and Coppola [22], whose convective fluxes for mass, momentum and internal-energy are
(35) |
where is the harmonic mean. For constant and the internal-energy flux becomes and, based on the fact that the harmonic mean is the dual of the arithmetic mean with respect to Eq. (29), i.e. , it follows that also the scheme in Eq. (35) is PEP. It is interesting to note that this property extends also to the whole family of Asymptotically Entropy Conserving (AEC) schemes presented in [22], in which the means of density and internal energy include truncated asymptotic expansions. For these schemes the internal-energy convective flux is written as
(36) |
where . It can be verified that condition (29) holds for every value of , making each scheme of the family PEP.
4.2.3 Formulations based on the total-energy equation
If a KEP discretization is used for the density and momentum equations, every direct discretization of internal-energy or pressure equations with locally conservative convective terms can also be interpreted as a conservative discretization of the total-energy equation. In this case, total energy evolves driven by numerical fluxes which are the sum of the primary internal-energy flux and the kinetic-energy flux induced by the discretization of mass and momentum:
(37) |
where in case the pressure equation is directly discretized. The pressure term results discretized with the advective form
(38) |
coming from the separate discretizations of the pressure terms in the momentum equation () and in the internal-energy (or pressure) equation (). These formulations can be directly designed starting from the total-energy equation, with numerical fluxes specified according to Eq. (37) and (38), and are equivalent, for exact time integration, to the formulations based on the flux ; as such, the total-energy flux inherits the PEP properties of the flux .
An example of this type of formulations is the KEEP scheme proposed by Kuya et al. [23], which is defined by the set of mass, momentum, and total-energy fluxes given by:
(39) |
where the apex ∗ is used to indicate that the flux includes also the contribution coming from the (conservative) pressure term. The form of the total-energy flux was determined in Kuya et al. [23] by satisfying the so-called Analytical Relations, which were introduced to improve the entropy conservation of the overall formulation. The final result of their analysis is that the specification of the kinetic-energy flux and of the pressure term in the total-energy flux has to be the same as that induced by the discretization of mass and momentum alone, which renders the formulation equivalent, for exact time integration, to a formulation based on the internal-energy equation.
It is also possible to have formulations based on a direct discretization of the total-energy equation, which do not come from formulations in terms of internal energy or pressure. An example of this type of discretization is given by the formulation used by Jameson [34] and Pirozzoli [5]. In this scheme, the total-energy equation is written as
(40) |
where is the total enthalpy per unit mass. By following the same convention introduced in Eq. (39), the convective term in Eq. (40) is here denoted as , where is the conservative pressure term . In the Jameson-Pirozzoli (JP) scheme, is split with a fully triple (KGP) splitting, corresponding to the numerical flux . The contextual use of the KEP discretization leads to a formulation that can be expressed in numerical-flux terms as
(41) |
By expanding the total-energy flux into its components one has
(42) |
from which one sees that the scheme cannot be obtained from a straightforward discretization of the internal-energy equation, as the convective flux of kinetic energy is different from that induced by the KEP formulation ( versus ). In this case, the internal energy discretely evolves with a convective flux which reads
(43) |
The (non conservative) pressure term is given by , i.e.
(44) |
For constant and one has
(45) | ||||
(46) |
The PEP condition now is that the right-hand side of Eq. (45) is constant and that of Eq. (46) is zero, neither of which is true, because of the term , which shows that the JP scheme is not PEP.
A similar approach is adopted in the scheme proposed by Singh and Chandrashekar [38], which in our notation can be written as
(47) |
In this case the internal-energy flux is split by grou** and , which allows one to write the total-energy convective and pressure flux as
(48) |
In this instance, however, the fulfillment of the PEP property is evident by observing that Eq. (47) induces
(49) |
for which the conditions and are easily verified.
The discussion and examples above lead to the following
Remark 3
(Discrete total-energy equation)
A locally-conservative discretization of the total-energy equation,
that cannot be written as induced by an analogous formulation based on the internal-energy equation, is PEP provided that the kinetic-energy flux is constant for constant velocity and pressure distributions and Eq. (29) is satisfied. For formulations induced by a discretization of the internal-energy equation the same conclusions of Remark 2 apply.
5 Novel PEP schemes
The analysis exposed in the previous sections allows us to discuss the modifications needed to enforce the PEP property in existing schemes. The general strategy is to express the given scheme in terms of fluxes for mass, momentum, and internal energy and to enforce the condition in Eq. (29) by modifying the interpolation for density in the internal-energy flux. Here we consider two popular schemes that have been already analyzed in the previous sections, namely the KGP (or KEEP) scheme in Eq. (26) and (39) and the JP scheme in Eq. (41).
In the first case, inspection of Eq. (26) shows that the internal-energy flux is . For this scheme, one has and the modifications needed to render it PEP is the use of the dual of the arithmetic mean for density, which is the harmonic mean: . In fact, the internal energy flux reduces, for and constant to , which is constant, since . The final expression for the modified KGP scheme is
(50) |
The discrete formulation based on this set of fluxes has the KEP and PEP properties and, as it will be shown in the next Sec. 6, it basically retains the favourable properties on global entropy conservation of the original scheme. Note that the scheme in Eq. (50) does not have the property that the internal-energy flux is the product between the mass flux and the arithmetic average for (as in the original version in Eq. (39)), which is considered as a desirable characteristic since it adds the structural property that the quantity is preserved globally (and locally) by convection. To retain this property we propose to refine the formulation by adopting the harmonic mean also for the density in the mass flux, which leads to
(51) |
This last scheme is the most straightforward modification of the KGP or KEEP scheme which fulfills the PEP property, leaving as unmodified the general structure of the formulation. It will be referred to as the KGP-H (or KEEP-H in its formulation based on the total-energy flux). It can be also considered as a ‘dual’ scheme with respect to the formulation defined in Eq. (35) and presented in De Michele and Coppola [22], since the means for density and internal energy in Eq. (35) (arithmetic and harmonic, respectively) are exchanged in the scheme in Eq. (51).
It is interesting to note that, as it has been done for the AEC schemes in De Michele and Coppola [22], the KGP-H scheme in Eq. (51) can be made AEC through the use of truncated asymptotic expansions, still kee** the PEP property. In fact, the formulation given by
(52) |
is easily shown to be Asymptotically Entropy Conservative, since the mass and internal-energy fluxes converge to the fluxes of Ranocha in Eq. (32) as . The form of the truncated expansions in the mass and internal-energy fluxes is also such that the PEP property is retained at each order . We will refer to this class of schemes as KGP-H(N) or KEEP-H(N).
A similar modification can be used to convert the JP scheme into a PEP scheme without altering the general structure of the fluxes. Once again, the failure to fulfill the PEP property in the JP scheme can be traced back to the term in the fluxes in Eqs. (45) and (46). The modification of the mass flux from to converts the product in Eqs. (45) and (46) into the (constant) product , which assures that the scheme is PEP. Following these considerations, the proposed PEP modification of the JP scheme is defined by the fluxes
(53) |
We will refer to the formulation based on these fluxes as the JP-H scheme.
6 Numerical results
In this section, two numerical tests are performed to assess the theoretical predictions and to test that the main properties of the original schemes are retained by the modified versions, which have the additional structural benefit of satisfying the PEP property. In Tab. 1 a list of the schemes used for the tests is reported, together with their conservation properties. Independently of the energy variable they are based on, all schemes have been implemented through a discretization of total energy, so the total-energy flux is reported in Tab. 1. The high-order flux is obtained from the second-order, two-point one as explained in the appendix of [22].
Ref. | KEP | PEP | AEC | |||||
---|---|---|---|---|---|---|---|---|
KEEP | [23] | |||||||
KEEP-H | new | |||||||
KEEP-H(N) | new | |||||||
JP | [34],[5] | |||||||
JP-H | new | |||||||
- | [22] | |||||||
AEC(N) | [22] |
The first test is a simple two-dimensional density-wave problem, in which an initially constant (two–dimensional) distribution of pressure and velocity is assumed with a space-variable density field. The analytical solution evolves as a convection of the density wave, meanwhile both pressure and velocity are supposed to remain constant in time. The initial conditions for the density wave test are
The fluxes employed are fourth-order accurate while the classical fourth-order Runge-Kutta scheme (RK4) is used for time integration. The domain is discretized using nodes in each spatial direction; the time step is chosen so that and the error due to the temporal integration can be considered negligible.
As expected from the theoretical analysis and from the results of previous studies [21, 22], the two schemes lacking the PEP property, the KEEP and the JP schemes, induced spurious pressure oscillations, whose amplification lead to the blow-up of the simulations at times and , respectively. The error on pressure is showcased in Fig. 1(a): at a time , before the blow-up of any of the simulations, the PEP schemes have a pressure value that is within of the initial value, while the JP and KEEP schemes present nonphysical oscillations. The error on entropy conservation is also investigated, to ensure that the modification that has been used to make the JP and KEEP schemes PEP did not drastically worsen their performance. Fig. 1(b) shows the time evolution of the entropy integral nondimensionalized as . In this test, the new schemes JP-H and KEEP-H have identical entropy production; this can be explained since, for constant and , they both reduce to the scheme with density and internal energy fluxes as
The comparison with the original JP and KEEP schemes is hard to draw, since they both quickly diverge, but they also seem to have a similar behavior, at least at the beginning. The entropy error of the simulation using the scheme A-H has the same order of magnitude, since it also has an identical internal energy flux to that of JP-H and KEEP-H for constant and , and differs only in the specification of the mass flux ( versus ). Larger differences can be observed by comparing the family of asymptotically entropy conserving KEEP-H(N) and AEC(N): by increasing the number of additional terms , the AEC(N) family seems to be converging faster to an exactly entropy conserving flux, with for AEC(2) at . This is in accordance with the theory presented in [22], by which the arithmetic mean on density and the harmonic mean on internal energy are usually closer to the means used by the entropy conserving scheme by Ranocha [29].
For the second test, all the schemes here considered have been implemented in the open-source code STREAmS-2 [39], which is a parallel, high-order compressible flow solver with GPU support. The solver has been used to simulate the three-dimensional case of the Taylor-Green vortex, with initial conditions
in which , , , with the Mach number . The triperiodic domain has side length in all directions and is discretized using nodes. For the spatial discretization, the 6th-order version of the fluxes is used, whereas for time integration a standard RK4 procedure has been implemented and used at CFL = 0.1, which is sufficiently small that linear invariants are exactly conserved to machine precision for all schemes.
In this case, the problem of pressure oscillations does not have equally serious consequences, and as such all schemes were able to carry out the calculations up to the desired end time. Analysing Fig. 2(a), it is confirmed the result that the schemes based on the internal energy equation are able to reduce the spurious entropy production (see [6, 30]); comparing the original JP scheme to the modified JP-H, it appears that also the addition of the PEP property may provide a benefit, even though to a lesser extent. Comparing the results of A-H, KEEP and KEEP-H, they all are of the same order of magnitude, with only minor deterioration in entropy conservation for the KEEP-H scheme, in line with the theory reported in [22], being mathematically less close to an exact EC scheme. Adding an additional term in the series expansions leads to a machine zero error in entropy conservation for both AEC(1) and KEEP-H(1).
An additional insight into the reliability of the schemes can be obtained through the study of the time evolution of thermodynamic fluctuations which are expected to stabilize around a constant value after an initial transient, as in the case of inviscid isotropic homogeneous turbulence [14, 5, 6]. The evolution of temperature fluctuations is displayed in Fig. 2(b). The schemes based on the internal energy equation are able to keep the value of the fluctuations constant; the JP-H schemes seems to produce an improvement in the behavior of the JP method, but the fluctuations still present an increase with time. Similar behavior could also be seen through the analysis of density fluctuations (not shown).
7 Conclusions
In this study, we have discussed the characteristics of a spatial discretization of the compressible Euler equations that are necessary for it to possess the PEP property. General conditions have been given for the discretization of the momentum equation and of the energy equation, be it pressure, internal or total energy; considering these requirements, schemes from the literature have been analyzed. The classical JP scheme [5] and the KEEP scheme [23] have been modified to obtain the PEP property by using the harmonic mean for the interpolation of density in the numerical fluxes, which was found to be the correct counterpart to the use of the arithmetic mean on internal energy.
The numerical test of a two-dimensional density wave has confirmed the capability of the newly introduced schemes to maintain unchanged the initially constant fields of pressure and velocity, as desired. Moreover, the numerical error on entropy conservation has also been analyzed, including the test of the three-dimensional Taylor-Green vortex, to make sure that the modifications did not corrupt the effectiveness of the original schemes. The KEEP-H scheme showed an error of the same order of magnitude as the one of the original KEEP. On the other hand, the JP-H scheme showed an improvement when compared to the JP scheme on which it was based. Another positive change for this scheme was observed by considering thermodynamic fluctuations. However, the introduction of the PEP property was not enough to make them stabilize around a constant value.
These findings serve as a demonstration of the techniques that can be employed to instill the PEP property in numerical schemes that may not already exhibit it, showcasing the feasibility of making such modifications with minimal changes in current compressible flow solvers.
Acknowledgments
We acknowledge the CINECA award under the ISCRA initiative, for the availability of high-performance computing resources and support.
References
- Feiereisen et al. [1981] W. J. Feiereisen, W. C. Reynolds, J. H. Ferziger, Numerical Simulation of Compressible, Homogeneous Turbulent Shear Flow, Technical Report TF-13, Stanford University, 1981.
- Jameson [2008] A. Jameson, The construction of discretely conservative finite volume schemes that also globally conserve energy or entropy, J. Sci. Comput. 34 (2008) 152–187.
- Subbareddy and Candler [2009] P. K. Subbareddy, G. V. Candler, A fully discrete, kinetic energy consistent finite-volume scheme for compressible flows, J. Comput. Phys. 228 (2009) 1347–1364.
- Kennedy and Gruber [2008] C. A. Kennedy, A. Gruber, Reduced aliasing formulations of the convective terms within the Navier-Stokes equations for a compressible fluid, J. Comput. Phys. 227 (2008) 1676–1700.
- Pirozzoli [2010] S. Pirozzoli, Generalized conservative approximations of split convective derivative operators, J. Comput. Phys. 229 (2010) 7180–7190.
- Coppola et al. [2019] G. Coppola, F. Capuano, S. Pirozzoli, L. de Luca, Numerically stable formulations of convective terms for turbulent compressible flows, J. Comput. Phys. 382 (2019) 86–104.
- Coppola and Veldman [2023] G. Coppola, A. E. P. Veldman, Global and local conservation of mass, momentum and kinetic energy in the simulation of compressible flow, J. Comput. Phys. 475 (2023) 111879.
- Coppola and Veldman [2022] G. Coppola, A. E. P. Veldman, Linear and quadratic invariants preserving discretization of Euler equations, in: The 8th European Congress on Computational Methods in Applied Sciences and Engineering. ECCOMAS Congress, 5-9 June 2022, Oslo, Norway, 2022.
- Edoh [2022] A. K. Edoh, A new kinetic-energy-preserving method based on the convective rotational form, J. Comput. Phys. 454 (2022) 110971.
- Morinishi [2010] Y. Morinishi, Skew-symmetric form of convective terms and fully conservative finite difference schemes for variable density low-Mach number flows, J. Comput. Phys 229 (2010) 276–300.
- Rozema et al. [2014] W. Rozema, J. C. Kok, R. W. C. P. Verstappen, A. E. P. Veldman, A symmetry-preserving discretisation and regularisation model for compressible flow with application to turbulent channel flow, J. Turbul. 34 (2014) 386 – 410.
- Nordström [2022] J. Nordström, A skew-symmetric energy and entropy stable formulation of the compressible Euler equations, J. Comput. Phys. 470 (2022) 111573.
- De Michele and Coppola [2023] C. De Michele, G. Coppola, On a class of structure-preserving discretizations in compressible flows, in: AIAA AVIATION 2023 Forum, American Institute of Aeronautics and Astronautics, 2023. doi:doi:10.2514/6.2023-4420.
- Honein and Moin [2004] A. E. Honein, P. Moin, Higher entropy conservation and numerical stability of compressible turbulence simulations, J. Comput. Phys. 201 (2004) 531 – 545.
- Tadmor [1987] E. Tadmor, The numerical viscosity of entropy stable schemes for systems of conservation laws. I, Math. Comput. 179 (1987) 91–103.
- Tadmor [2003] E. Tadmor, Entropy stability theory for difference approximations of nonlinear conservation laws and related time-dependent problems, Acta Numerica 12 (2003) 451–512.
- Ismail and Roe [2009] F. Ismail, P. L. Roe, Affordable, entropy-consistent Euler flux functions II: Entropy production at shocks, J. Comput. Phys. 228 (2009) 5410–5436.
- Chandrashekar [2013] P. Chandrashekar, Kinetic energy preserving and entropy stable finite volume schemes for compressible Euler and Navier-Stokes equations, Commun. Comput. Phys. 14 (2013) 1252–1286.
- Ranocha [2020] H. Ranocha, Entropy conserving and kinetic energy preserving numerical methods for the Euler equations using summation-by-parts operators, in: S. Sherwin, D. Moxey, V. Peiró, J., P.E., C. Schwab (Eds.), Spectral and High Order Methods for Partial Differential Equations ICOSAHOM 2018. Lecture Notes in Computational Science and Engineering, volume 134, Springer, Cham, 2020.
- Ranocha and Gassner [2022] H. Ranocha, G. Gassner, Preventing pressure oscillations does not fix local linear stability issues of entropy-based split-form high-order schemes, Commun. Appl. Math. Comput. 4 (2022) 880–903.
- Shima et al. [2021] N. Shima, Y. Kuya, Y. Tamaki, S. Kawai, Preventing spurious pressure oscillations in split convective form discretization for compressible flows, J. Comput. Phys. 427 (2021) 110060.
- De Michele and Coppola [2023] C. De Michele, G. Coppola, Asymptotically entropy-conservative and kinetic-energy preserving numerical fluxes for compressible Euler equations, J. Comput. Phys. 492 (2023) 112439.
- Kuya et al. [2018] Y. Kuya, K. Totani, S. Kawai, Kinetic energy and entropy preserving schemes for compressible flows by split convective forms, J. Comput. Phys. 375 (2018) 823–853.
- Tamaki et al. [2022] Y. Tamaki, Y. Kuya, S. Kawai, Comprehensive analysis of entropy conservation property of non-dissipative schemes for compressible flows: KEEP scheme redefined, J. Comput. Phys. 468 (2022) 111494.
- Abgrall and Karni [2001] R. Abgrall, S. Karni, Computations of compressible multifluids, J. Comput. Phys. 169 (2001) 594–623.
- Bernades et al. [2023] M. Bernades, L. Jofre, F. Capuano, Kinetic-energy- and pressure-equilibrium-preserving schemes for real-gas turbulence in the transcritical regime, J. Comput. Phys. 493 (2023) 112477.
- Jain and Moin [2022] S. S. Jain, P. Moin, A kinetic energy–and entropy-preserving scheme for compressible two-phase flows, J. Comput. Phys. 464 (2022) 111307.
- Fujiwara et al. [2023] Y. Fujiwara, Y. Tamaki, S. Kawai, Fully conservative and pressure-equilibrium preserving scheme for compressible multi-component flows, J. Comput. Phys. 478 (2023) 111973.
- Ranocha [2018] H. Ranocha, Comparison of some entropy conservative numerical fluxes for the Euler equations, J. Sci. Comput. 76 (2018) 216–242.
- De Michele and Coppola [2023] C. De Michele, G. Coppola, Numerical treatment of the energy equation in compressible flows simulations, Comput. Fluids 250 (2023) 105709.
- De Michele and Coppola [2022] C. De Michele, G. Coppola, An assessment of various discretizations of the energy equation in compressible flows, in: The 8th European Congress on Computational Methods in Applied Sciences and Engineering. ECCOMAS Congress, 5-9 June 2022, Oslo, Norway, 2022.
- Coppola et al. [2017] G. Coppola, F. Capuano, L. de Luca, Energy-preserving discretizations of the Navier-Stokes equations. classical and modern approaches, in: L. Ascione, V. Berardi, L. Feo, F. Fraternali, A. M. Tralli (Eds.), AIMETA 2017 - Proceedings of the 23rd Conference of the Italian Association of Theoretical and Applied Mechanics, volume 3, 2017, pp. 2284–2310.
- Coppola et al. [2019] G. Coppola, F. Capuano, L. de Luca, Discrete energy-conservation properties in the numerical solution of the Navier–Stokes equations, Appl. Mech. Rev. 71 (2019) 010803–1 – 010803–19.
- Jameson [2008] A. Jameson, Formulation of kinetic energy preserving conservative schemes for gas dynamics and direct numerical simulation of one-dimensional viscous compressible flow in a shock tube using entropy and kinetic energy preserving schemes, J. Sci. Comput. 34 (2008) 188–208.
- Veldman [2019] A. E. P. Veldman, A general condition for kinetic-energy preserving discretization of flow transport equations, J. Comput. Phys. 398 (2019) 108894.
- Blaisdell et al. [1996] G. A. Blaisdell, E. T. Spyropoulos, J. H. Qin, The effect of the formulation of nonlinear terms on aliasing errors in spectral methods, Appl. Numer. Math. 21 (1996) 207–219.
- Winters et al. [2020] A. R. Winters, C. Czernik, M. B. Schily, G. J. Gassner, Entropy stable numerical approximations for the isothermal and polytropic Euler equations, BIT Numerical Mathematics 60 (2020) 791 – 824.
- Singh and Chandrashekar [2021] V. Singh, P. Chandrashekar, On a linear stability issue of split form schemes for compressible flows, arxiv:2104.14941 [math.NA] (2021).
- Bernardini et al. [2023] M. Bernardini, D. Modesti, F. Salvadore, S. Sathyanarayana, G. Della Posta, S. Pirozzoli, STREAmS-2.0: Supersonic turbulent accelerated Navier-Stokes solver version 2.0, Comput. Phys. Commun. 285 (2023) 108644.