## Abstract

We present a finite element variational integrator for compressible flows. The numerical scheme is derived by discretizing, in a structure-preserving way, the Lie group formulation of fluid dynamics on diffeomorphism groups and the associated variational principles. Given a triangulation on the fluid domain, the discrete group of diffeomorphisms is defined as a certain subgroup of the group of linear isomorphisms of a finite element space of functions. In this setting, discrete vector fields correspond to a certain subspace of the Lie algebra of this group. This subspace is shown to be isomorphic to a Raviart–Thomas finite element space. The resulting finite element discretization corresponds to a weak form of the compressible fluid equation that does not seem to have been used in the finite element literature. It extends previous work done on incompressible flows and at the lowest order on compressible flows. We illustrate the conservation properties of the scheme with some numerical simulations.

### Similar content being viewed by others

## Notes

Note that the representation of the group diffeomorphism by pull-back on functions is naturally a

*right*action (\(f\mapsto f\circ \varphi \)), whereas the group \(GL(V_h)\) acts by matrix multiplication on the*left*(\(f\mapsto q f\)). This explains the use of the inverse \(q^{-1}\) on right hand side of (6).Strictly speaking, only a subspace of this Lie algebra represents discrete vector fields, as we will see in detail later.

Note the minus sign due to (6), which is consistent with the fact that \(f\mapsto f\cdot A\) is a

*right*representation while \(f\mapsto Af\) is a*left*representation.Full \({\text {Diff}}(\Omega )\)-invariance can be obtained by letting \({\text {Diff}}(\Omega )\) also act on \( \varrho _0\), as \(L(\varphi \circ \psi ,\partial _t (\varphi \circ \psi ), (\varrho _0 \circ \psi )J \psi )= L(\varphi ,\partial _t \varphi , \varrho _0)\).

The fact that

*A*approximates \(-u\) and not*u*is consistent with the fact that \(f\mapsto Af\) is a left Lie algebra action whereas the derivative \(f\mapsto \nabla _u f\) is a right Lie algebra action.

## References

D. N. Arnold [1982], An interior penalty finite element method with discontinuous elements,

*SIAM Journal on Numerical Analysis*,**19**(4), 742–760.V. I. Arnold [1966], Sur la géométrie différentielle des des groupes de Lie de dimension infinie et ses applications à l’hydrodynamique des fluides parfaits,

*Ann. Inst. Fourier*, Grenoble**16**, 319–361.W. Bauer, F. Gay-Balmaz [2019], Towards a variational discretization of compressible fluids: the rotating shallow water equations,

*Journal of Computational Dynamics*,**6**(1), https://arxiv.org/pdf/1711.10617.pdfW. Bauer, F. Gay-Balmaz [2019], Variational integrators for anelastic and pseudo-incompressible flows,

*J. Geom. Mech.*,**11**(4), 511–537.P. K. Bhattacharyya [2012],

*Distributions, Generalized Functions with Applications in Sobolev Spaces*, Berlin, Boston: De Gruyter.N. Bou-Rabee and J. E. Marsden [2009], Hamilton-Pontryagin Integrators on Lie Groups. Part I: Introduction and Structure-Preserving Properties,

*Foundations of Computational Mathematics*,**9**, 197–219.R. Brecht, W. Bauer, A. Bihlo, F. Gay-Balmaz, and S. MacLachlan [2019], Variational integrator for the rotating shallow-water equations on the sphere,

*Q. J. Royal Meteorol. Soc.*,**145**, 1070–1088. https://arxiv.org/pdf/1808.10507.pdfF. Brezzi and M. Fortin [1991],

*Mixed and Hybrid Finite Element Methods*, Springer-Verlag, New York.M. Desbrun, E. Gawlik, F. Gay-Balmaz and V. Zeitlin [2014], Variational discretization for rotating stratified fluids,

*Disc. Cont. Dyn. Syst. Series A*,**34**, 479–511.A. Ern and J.-L. Guermond [2004],

*Theory and Practice of Finite Elements*, Applied Mathematical Sciences,**159**, Springer.E. Gawlik, P. Mullen, D. Pavlov, J. E. Marsden and M. Desbrun [2011], Geometric, variational discretization of continuum theories,

*Physica D*,**240**, 1724–1760.E. Gawlik and F. Gay-Balmaz [2020], A conservative finite element method for the incompressible Euler equations with variable density,

*Journal of Computational Physics*,**412**, 109439.J. Guzman, C. W. Shu, and A. Sequeira [2016], H(div) conforming and DG methods for incompressible Euler’s equations,

*IMA Journal of Numerical Analysis*,**37**(4), 1733–71.E. Hairer, C. Lubich, and G. Wanner [2006],

*Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations*, Springer Series in Computational Mathematics,**31**, Springer-Verlag, 2006.D. D. Holm, J. E. Marsden, and T. S. Ratiu [1998], The Euler-Poincaré equations and semidirect products with applications to continuum theories,

*Adv. in Math.*,**137**, 1–81.B. Liu, G. Mason, J. Hodgson, Y. Tong and M. Desbrun [2015], Model-reduced variational fluid simulation,

*ACM Trans. Graph. (SIG Asia)*,**34**, Art. 244.J. E. Marsden and M. West [2001], Discrete mechanics and variational integrators,

*Acta Numer.*,**10**, 357–514.A. Natale and C. Cotter [2018], A variational H(div) finite-element discretization approach for perfect incompressible fluids,

*IMA Journal of Numerical Analysis*,**38**(2), 1084.D. Pavlov, P. Mullen, Y. Tong, E. Kanso, J. E. Marsden and M. Desbrun [2010], Structure-preserving discretization of incompressible fluids,

*Physica D*,**240**, 443–458.T. Vazquez-Gonzalez, A. Llor and C .Fochesato [2017], A novel GEEC (Geometry, Energy, and Entropy Compatible) procedure applied to a staggered direct-ALE scheme for hydrodynamics,

*Eur. J. Mech. B Fluids*,**65**, 494–514. https://doi.org/10.1016/j.euromechflu.2017.05.003.

## Acknowledgements

EG was supported by NSF grants DMS-1703719 and DMS-2012427. FGB was supported by the ANR project GEOMFLUID, ANR-14-CE23-0002-01.

## Author information

### Authors and Affiliations

### Corresponding author

## Additional information

Communicated by Douglas Arnold.

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Appendices

### Euler–Poincaré Variational Principle

In this Appendix we first recall the Euler–Poincaré principle for invariant Euler-Lagrange systems on Lie groups. This general setting underlies the Lie group description of incompressible flows recalled in Sect. 2.1 due to [2], in which case the Lie group is \(G={\text {Diff}}_\mathrm{vol}(\Omega )\). It also underlies the semidiscrete setting, in which case the Lie group is \(G=G_h\). In this situation, however, a nonholonomic constraint needs to be considered, see Appendix B. Then, we describe the extension of this setting that is needed to formulate the variational formulation of compressible flow and its discretization.

### 1.1 Euler–Poincaré Variational Principle for Incompressible Flows

Let *G* be a Lie group and let \(L:TG \rightarrow {\mathbb {R}}\) be a Lagrangian defined on the tangent bundle *TG* of *G*. The associated equations of evolution, given by the Euler-Lagrange equations, arise as the critical curve condition for the Hamilton principle

for arbitrary variations \(\delta g\) with \(\delta g(0)= \delta g(T)=0\).

If we assume that *L* is *G*-invariant, i.e., \(L(gh, \dot{g}h)=L(g, \dot{g})\), for all \(h\in G\), then *L* induces a function \(\ell :{\mathfrak {g}}\rightarrow {\mathbb {R}}\) on the Lie algebra \({\mathfrak {g}}\) of *G*, defined by \(\ell (u)=L(g,\dot{g})\), with \(u=\dot{g} g^{-1}\in {\mathfrak {g}}\). In this case, the equations of motion can be expressed exclusively in terms of *u* and \(\ell \) and are obtained by rewriting the variational principle (74) in terms of \(\ell \) and *u*(*t*). One gets

where \(v(t)\in {\mathfrak {g}}\) is an arbitrary curve with \(v(0)=v(T)=0\). The form of the variation \({\delta u}\) in (75) is obtained by a direct computation using \(u= \dot{g} g^{-1}\) and defining \(v= {\delta g} g^{-1}\).

In order to formulate the equations associated with (75) one needs to select an appropriate space in nondegenerate duality with \({\mathfrak {g}}\) denoted \({\mathfrak {g}}^*\) (the usual dual space in finite dimensions). We shall denote by \(\langle \!\langle \,, \rangle \!\rangle : {\mathfrak {g}}^* \times {\mathfrak {g}}\rightarrow {\mathbb {R}}\) the associated nondegenerate duality pairing. From (75) one directly obtains the equation

In (76), the functional derivative \(\frac{\delta \ell }{\delta u}\in {\mathfrak {g}}^*\) of \(\ell \) is defined in terms of the duality pairing as

In finite dimensions, and under appropriate choices for the functional spaces in infinite dimensions, (76) is equivalent to the Euler–Poincaré equation

where the coadjoint operator \( {\text {ad}}^*_u: {\mathfrak {g}}^* \rightarrow {\mathfrak {g}}^*\) is defined by \(\langle \!\langle {\text {ad}}^*_um,v\rangle \!\rangle =\langle \!\langle m,[u,v]\rangle \!\rangle \).

For incompressible flows, without describing the functional analytic setting for simplicity, we have \(G={\text {Diff}}_\mathrm{vol}(\Omega )\) and \({\mathfrak {g}}= {\mathfrak {X}}_\mathrm{vol}(\Omega )\) the Lie algebra of divergence free vector fields parallel to the boundary. We can choose \({\mathfrak {g}}^*= {\mathfrak {X}}_\mathrm{vol}(\Omega )\) with duality pairing \(\langle \!\langle \,, \rangle \!\rangle \) given by the \(L^2\) inner product. A direct computation gives the coadjoint operator \({\text {ad}}^*_u m= {\mathbf {P}}(u \cdot \nabla m + \nabla u ^{\mathsf {T}} m)\), where \({\mathbf {P}}\) is the Leray-Hodge projector onto \({\mathfrak {X}}_\mathrm{vol}(\Omega )\). One directly checks that in this case (75) yields the Euler equations (3) for incompressible flows.

### 1.2 Euler–Poincaré Variational Principle for Compressible Flows

The general setting underlying the variational formulation for compressible fluids starts exactly as before, namely, a system whose evolution is given by the Euler-Lagrange equations for a Lagrangian defined on the tangent bundle of a Lie group *G*. The main difference is that the Lagrangian depends parametrically on some element \(a_0\in V\) of a vector space (the reference mass density \(\varrho _0\) in the case of the barotropic compressible fluid, the reference mass and entropy densities \(\varrho _0\) and \(S_0\) for the general compressible fluid) on which *G* acts by representation, and, in addition, *L* is invariant only under the subgroup of *G* that keeps \(a_0\) fixed. If we denote by \(L(g, \dot{g}, a_0)\) this Lagrangian and by \(a\in V\mapsto a\cdot g \in V\) the representation of *G* on *V*, the reduced Lagrangian is defined by \(\ell (u, a)= L(g, \dot{g}, a_0)\), where \(u= \dot{g}g^{-1}\), \(a= a_0\cdot g^{-1}\).

The Hamilton principle now yields the variational formulation

where \(v(t)\in {\mathfrak {g}}\) is an arbitrary curve with \(v(0)=v(T)=0\). The form of the variation \(\delta u\) in (77) is the same as before, while the expression for \({\delta a}\) is obtained from the relation \(a= a_0\cdot g^{-1}\).

From (77) and with respect to the choice of a spaces \({\mathfrak {g}}^*\) and \(V^*\) in nondegenerate duality with \({\mathfrak {g}}\) and *V*, with duality pairings \(\langle \!\langle \,,\rangle \!\rangle \) and \(\langle \,,\rangle _V\), one directly obtains the equations

The continuity equation

arises from the definition \(a(t)= a_0 \cdot g(t)^{-1}\). In a similar way with above, (78) now yields the Euler–Poincaré equations

where \(\frac{\delta \ell }{\delta a}\diamond a\in {\mathfrak {g}}^*\) is defined by \(\left\langle \!\left\langle \frac{\delta \ell }{\delta a}\diamond a,v\right\rangle \!\right\rangle = -\Big \langle \frac{\delta \ell }{\delta a},a\cdot v \Big \rangle _V \), for all \(v\in {\mathfrak {g}}\). We refer to [15] for a detailed exposition.

For the compressible fluid, in the continuous case we have \(G= {\text {Diff}}(\Omega )\) and \({\mathfrak {g}}={\mathfrak {X}}(\Omega )\) the Lie algebra of vector fields on \(\Omega \) with vanishing normal component to the boundary. We choose to identify \({\mathfrak {g}}^*\) with \({\mathfrak {g}}\) via the \(L^2\) duality pairing. Consider the Lagrangian (65) of the general compressible fluid. Using the expressions \({\text {ad}}^*_u m = u \cdot \nabla m + \nabla u^{\mathsf {T}} m + m {\text {div}} u\), \(\frac{\delta \ell }{\delta u}= \rho u\), \(\frac{\delta \ell }{\delta \rho }= \frac{1}{2}|u|^2 - e(\rho ) - \rho \frac{\partial e}{\partial \rho }+\eta \frac{\partial e}{\partial \eta }-\phi \), \(\frac{\delta \ell }{\delta s}= - \frac{\partial e}{\partial \eta }\), \(\frac{\delta \ell }{\delta \rho }\diamond \rho = \rho \nabla \frac{\delta \ell }{\delta \rho }\), and \(\frac{\delta \ell }{\delta s}\diamond s= s \nabla \frac{\delta \ell }{\delta s}\), one directly obtains

from (79), with \(p= \rho ^2\frac{\partial e}{\partial \rho }\). For the semidiscrete case, one uses a nonholonomic version of the Euler–Poincaré equations (79), reviewed in the next paragraph (Fig. 3).

### Remarks on the Nonholonomic Euler–Poincaré Variational Formulation

Hamilton’s principle can be extended to the case in which the system under consideration is subject to a constraint, given by a distribution on the configuration manifold, i.e., a vector subbundle of the tangent bundle. This is known as the Lagrange-d’Alembert principle and, for a system on a Lie group *G* and constraint \({\Delta _G} \subset TG\), it is given by the same critical condition (74) but only with respect to variations satisfying the constraint, i.e., \({\delta g}\in {\Delta _G}\).

In the *G*-invariant setting recalled in Sect. A.1 it is assumed that the constraint \({\Delta _G}\) is also *G*-invariant and thus induces a subspace \(\Delta \subset {\mathfrak {g}}\) of the Lie algebra. In the more general setting of Sect. A.2, one can allow \({\Delta _G}\) to be only \(G_{a_0}\)-invariant, although for the situation of interest in this paper, \({\Delta _G}\) is also *G*-invariant.

The Lagrange-d’Alembert principle yields now the Euler–Poincaré–d’Alembert principle (77) in which we have the additional constraint \(u(t)\in \Delta \) on the solution and \(v(t)\in \Delta \) on the variations, so that (78) becomes

In presence of the nonholonomic constraint, (79) becomes

where \(\Delta ^\circ = \{m \in {\mathfrak {g}}^* \mid \langle \!\langle m,u\rangle \!\rangle =0, \;\forall \; u\in \Delta \}\).

There are two important remarks concerning (80) and (81) that play an important role for the variational discretization carried out in this paper. First, we note that although the solution belongs to the constraint, i.e., \(u\in \Delta \), the equations depend on the expression of the Lagrangian \(\ell \) on a larger space, namely, on \(\Delta + [\Delta , \Delta ]\). It is not enough to have its expression only on \(\Delta \). This is a main characteristic of nonholonomic mechanics. Second, a sufficient condition to get a solvable differential equation is that the map \(u \in \Delta \mapsto \frac{\delta \ell }{\delta u } \in {\mathfrak {g}}^*/\Delta ^\circ \) is a diffeomorphism for all *a*.

### Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 3.3. We denote by \(H_r(K)\) the space of homogeneous polynomials of degree *r* on a simplex *K*. To distinguish powers from indices, we denote coordinates by \(x_1,x_2,\dots ,x_n\) rather than \(x^1,x^2,\dots ,x^n\) in this section.

### Lemma C.1

Let *K* be a simplex of dimension \(n \ge 1\). For every integer \(r \ge 0\),

### Proof

This follows from the fact that every monomial in \(P_{2r}(K)\) can be written as a product of two monomials in \(P_r(K)\). \(\square \)

### Lemma C.2

Let *K* be a simplex of dimension \(n \in \{2,3\}\). For every integer \(r \ge 0\),

### Proof

We proceed by induction.

Denote \(Q_r(K) = \left\{ \sum _{i=1}^N p_i \nabla q_i \mid N \in {\mathbb {N}}, \, p_i, q_i \in P_r(K), \, i=1,2,\dots ,N \right\} \). By inductive hypothesis, \(Q_r(K)\) contains \(Q_{r-1}(K)=P_{2r-3}(K)^n\). It also contains \(H_{2r-2}(K)^n\). Indeed, if \(f e_k \in H_{2r-2}(K)^n\) with \(k \in \{1,2,\dots ,n\}\) and *f* a monomial, then \(f=x_j g\) for some \(g \in H_{2r-3}(K)\) and some \(j \in \{1,2,\dots ,n\}\), so \(fe_k = \sum _i (x_j p_i) \nabla q_i \in Q_r(K)\) for some \(p_i,q_i \in P_{r-1}(K)\) by inductive hypothesis. Thus, \(Q_r(K)\) contains \(P_{2r-2}(K)^n\).

Next we show that \(Q_r(K)\) contains every \(u \in H_{2r-1}(K)^n\). Without loss of generality, we may assume \(u = fe_1\) with \(f \in H_{2r-1}(K)\) a monomial. When \(n=2\), the only such vector fields are \(u = x_1^a x_2^{2r-1-a} e_1\), \(a=0,1,\dots ,2r-1\), which can be expressed as

The case \(n=3\) is handled similarly by considering the vector fields \(f e_1\) with

\(\square \)

## Rights and permissions

## About this article

### Cite this article

Gawlik, E.S., Gay-Balmaz, F. A Variational Finite Element Discretization of Compressible Flow.
*Found Comput Math* **21**, 961–1001 (2021). https://doi.org/10.1007/s10208-020-09473-w

Received:

Revised:

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s10208-020-09473-w

### Keywords

- Structure-preserving discretization
- Compressible fluid
- Finite element variational integrator
- Discrete diffeomorphism group
- Geometric formulation of fluid dynamics