A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA...

32
A Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik * and Fran¸coisGay-Balmaz 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 doesn’t 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. Contents 1 Introduction 2 2 Review of variational discretizations in fluid dynamics 3 2.1 Incompressible flow ..................................... 3 2.2 Compressible flows ..................................... 5 3 The distributional directional derivative and its properties 7 3.1 Definition and properties .................................. 7 3.2 Relation with Raviart-Thomas finite element spaces .................. 11 3.3 The lowest-order setting .................................. 13 4 The Lie algebra-to-vector fields map 15 5 Finite element variational integrator 18 5.1 Semidiscrete Euler-Poincar´ e equations .......................... 18 5.2 The compressible fluid ................................... 19 6 Numerical tests 24 A Euler-Poincar´ e variational principle 28 A.1 Euler-Poincar´ e variational principle for incompressible flows .............. 28 A.2 Euler-Poincar´ e variational principle for compressible flows ............... 29 * Department of Mathematics, University of Hawaii at Manoa, [email protected] CNRS - LMD, Ecole Normale Sup´ erieure, [email protected] 1

Transcript of A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA...

Page 1: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

A Variational Finite Element Discretization of Compressible Flow

Evan S Gawliklowast and Francois Gay-Balmazdagger

Abstract

We present a finite element variational integrator for compressible flows The numericalscheme is derived by discretizing in a structure preserving way the Lie group formulation offluid dynamics on diffeomorphism groups and the associated variational principles Given atriangulation on the fluid domain the discrete group of diffeomorphisms is defined as a certainsubgroup of the group of linear isomorphisms of a finite element space of functions In thissetting discrete vector fields correspond to a certain subspace of the Lie algebra of this groupThis subspace is shown to be isomorphic to a Raviart-Thomas finite element space The resultingfinite element discretization corresponds to a weak form of the compressible fluid equation thatdoesnrsquot seem to have been used in the finite element literature It extends previous workdone on incompressible flows and at the lowest order on compressible flows We illustrate theconservation properties of the scheme with some numerical simulations

Contents

1 Introduction 2

2 Review of variational discretizations in fluid dynamics 321 Incompressible flow 322 Compressible flows 5

3 The distributional directional derivative and its properties 731 Definition and properties 732 Relation with Raviart-Thomas finite element spaces 1133 The lowest-order setting 13

4 The Lie algebra-to-vector fields map 15

5 Finite element variational integrator 1851 Semidiscrete Euler-Poincare equations 1852 The compressible fluid 19

6 Numerical tests 24

A Euler-Poincare variational principle 28A1 Euler-Poincare variational principle for incompressible flows 28A2 Euler-Poincare variational principle for compressible flows 29

lowastDepartment of Mathematics University of Hawaii at Manoa egawlikhawaiiedudaggerCNRS - LMD Ecole Normale Superieure francoisgay-balmazlmdensfr

1

B Remarks on the nonholonomic Euler-Poincare variational formulation 29

C Polynomials 30

1 Introduction

Numerical schemes that respect conservation laws and other geometric structures are of paramountimportance in computational fluid dynamics especially for problems relying on long time simula-tion This is the case for geophysical fluid dynamics in the context of meteorological or climateprediction

Schemes that preserve the geometric structures underlying the equations they discretize areknown as geometric integrators [14] One efficient way to derive geometric integrators is to exploitthe variational formulation of the continuous equations and to mimic this formulation at the spatialandor temporal discrete level For instance in classical mechanics a time discretization of theLagrangian variational formulation permits the derivation of numerical schemes called variationalintegrators that are symplectic exhibit good energy behavior and inherit a discrete version ofNoetherrsquos theorem which guarantees the exact preservation of momenta arising from symmetriessee [17]

Geometric variational integrators for fluid dynamics were first derived in [19] for the Eulerequations of a perfect fluid These integrators exploit the viewpoint of [2] that fluid motionscorrespond to geodesics on the group of volume preserving diffeomorphisms of the fluid domainThe spatially discretized Euler equations emerge from an application of this principle on a finitedimensional approximation of the diffeomorphism group The approach has been extended tovarious equations of incompressible fluid dynamics with advected quantities [11] rotating andstratified fluids for atmospheric and oceanic dynamics [9] reduced-order models of fluid flow [16]anelastic and pseudo-incompressible fluids on 2D irregular simplicial meshes [4] compressible fluids[3] and compressible fluids on spheres [7] In all of the aforementioned references the schemes thatresult are low-order finite difference schemes

It was suggested in [16] that the variational discretization initiated in [19] can be generalizedby letting the discrete diffeomorphism group act on finite element spaces Such an approach wasdeveloped in [18] in the context of the ideal fluid and thus allowed for a higher order version ofthe method as well as an error estimate For certain parameter choices this high order methodcoincides with an H(div)-conforming finite element method studied in [13]

In the present paper we develop a finite element variational discretization of compressible fluiddynamics by exploiting the recent progresses made in [3] and [18] based on the variational methodinitiated in [19] Roughly speaking our approach is the following Given a triangulation on thefluid domain Ω we consider the space V r

h sub L2(Ω) of polynomials of degree le r on each simplexand define the group of discrete diffeomorphisms as a certain subgroup Grh of the general lineargroup GL(V r

h ) The action of Grh on V rh is understood as a discrete version of the action by pull

back on functions in L2(Ω) As a consequence the action of the Lie algebra grh on V rh is understood

as as discrete version of the derivation along vector fields In a similar way with [19] and [3] thisinterpretation naturally leads one to consider a specific subspace of grh consisting of Lie algebraelements that actually represent discrete vector fields We show that this subspace is isomorphicto a Raviart-Thomas finite element space We also define a Lie algebra-to-vector fields map thatallows a systematic definition of the semidiscrete Lagrangian for any given continuous LagrangianThe developed setting allows us to derive the finite element scheme by applying a discrete version

2

of the Lie group variational formulation of compressible fluids In particular the discretizationcorresponds to a weak form of the compressible fluid equation that doesnrsquot seem to have been usedin the finite element literature An incompressible version of this expression of the weak form hasbeen used in [12] for the incompressible fluid with variable density The setting that we developapplies in general to 2D and 3D fluid models that can be written in Euler-Poincare form Forinstance it applies to the rotating shallow water equations

The plan of the paper is the following In Section 2 we review the variational Lie groupformulation of both incompressible and compressible fluids by recalling the Hamilton principleon diffeomorphism groups corresponding to the Lagrangian description and the induced Euler-Poincare variational principle corresponding to the Eulerian formulation We also briefly indicatehow this formulation has been previously used to derive variational integrators In Section 3 weconsider the distributional derivative deduce from it a discrete derivative acting on finite elementspaces and study its properties In particular we show that these discrete derivatives are isomorphicto a Raviart-Thomas finite element space In the lower order setting the space of discrete derivativesrecovers the spaces used in previous works both for the incompressible [19] and compressible [3]cases In Section 4 we define a map that associates to any Lie algebra element of the discretediffeomorphism group a vector field on the fluid domain We call such a map a Lie algebra-to-vector fields map It is needed to define in a general way the semidiscrete Lagrangian associatedto a given continuous Lagrangian We study its properties which are used later to write downthe numerical scheme In Section 5 we derive the numerical scheme by using the Euler-Poincareequations on the discrete diffeomorphism group associated to the chosen finite element space As wewill explain in detail in a similar way with the approach initiated in [19] a nonholonomic version ofthe Euler-Poincare principle is used to constrain the dynamics to the space of discrete derivativesWe show that such a space must be a subspace of a Brezzi-Douglas-Marini finite element spaceFinally we illustrate the behavior of the resulting scheme in Section 6

2 Review of variational discretizations in fluid dynamics

We begin by reviewing the variational formulation of ideal and compressible fluid flows and theirvariational discretization

21 Incompressible flow

The Continuous Setting As we mentioned in the introduction solutions to the Euler equationsof ideal fluid flow in a bounded domain Ω sub Rn with smooth boundary can be formally regardedas curves ϕ [0 T ]rarr Diffvol(Ω) that are critical for the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ)dt = 0 (1)

with respect to variations δϕ vanishing at the endpoints Here Diffvol(Ω) is the group of volumepreserving diffeomorphisms of Ω and ϕ(t) Ω rarr Ω is the map sending the position X of a fluidparticle at time 0 to its position x = ϕ(tX) at time t The Lagrangian in (1) is given by thekinetic energy

L(ϕ parttϕ) =

ˆΩ

1

2|parttϕ|2 dX

and is invariant under the right action of Diffvol(Ω) on itself via composition namely

L(ϕ ψ partt(ϕ ψ)) = L(ϕ parttϕ) forallψ isin Diffvol(Ω)

3

This symmetry is often referred to as the particle relabelling symmetry

As a consequence of this symmetry the variational principle (1) can be recast on the Lie algebraof Diffvol(Ω) which is the space Xdiv(Ω) of divergence-free vector fields on Ω with vanishing normalcomponent on partΩ Namely one seeks a curve u [0 T ]rarr Xdiv(Ω) satisfying the critical condition

δ

ˆ T

0`(u) dt = 0 (2)

subject to variations δu of the form

δu = parttv + pounduv with v [0 T ]rarr Xdiv(Ω) and v(0) = v(T ) = 0

where

`(u) =

ˆΩ

1

2|u|2 dx

and Luv = [u v] = u middot nablav minus v middot nablau is the Lie derivative of the vector field v along the vector fieldu This principle is obtained from the Hamilton principle (1) by using the relation parttϕ = u ϕbetween the Lagrangian and Eulerian velocities and by computing the constrained variations of uinduced by the free variations of ϕ The conditions for criticality in (2) read

parttu+ u middot nablau = minusnablapdiv u = 0

(3)

where p is a Lagrange multiplier enforcing the incompressibility constraint The process just de-scribed for the Euler equations is valid in general for invariant Euler-Lagrange systems on arbitraryLie groups and is known as Euler-Poincare reduction It plays an important role in this paper as itis used also at the discrete level to derive the numerical scheme We refer to Appendix A for moredetails on the Euler-Poincare principle and its application to incompressible flows

The Semidiscrete Setting The variational principle recalled above has been used to derivestructure-preserving discretizations of the incompressible Euler equations [19] and various gen-eralizations of it have been used to do the same for other equations in incompressible fluid dy-namics [11 9] In these discretizations the group Diffvol(Ω) is approximated by a subgroup Ghof the general linear group GL(Vh) over a finite-dimensional vector space Vh and extremizers ofa time-discretized action functional are sought within Gh More precisely extremizers are soughtwithin a subspace of the Lie algebra gh of Gh after reducing by a symmetry and imposing nonholo-nomic constraints This construction typically leads to schemes with good long-term conservationproperties

The use of a subgroup of the general linear group to approximate Diffvol(Ω) is inspired by thefact that Diffvol(Ω) acts linearly on the Lebesgue space L2(Ω) from the right via the pullback

f middot ϕ = f ϕ f isin L2(Ω) ϕ isin Diffvol(Ω)

This action satisfiesf middot ϕ = f if f is constant (4)

and it preserves the L2-inner product 〈f g〉 =acute

Ω fg dx thanks to volume-preservation

〈f middot ϕ g middot ϕ〉 = 〈f g〉 forallf g isin L2(Ω) (5)

4

In the discrete setting this action is approximated by the (right) action of GL(Vh) on Vh

f middot q = qminus1f f isin Vh q isin GL(Vh)1 (6)

By imposing discretized versions of the properties (4) and (5) the group Gh is taken equal to

Gh = q isin GL(Vh) | q1 = 1 〈qf qg〉 = 〈f g〉 forall f g isin Vh (7)

where 1 isin Vh denotes a discrete representative of the constant function 1While the elements of Gh are understood as discrete versions of volume preserving diffeomor-

phisms elements in the Lie algebra

gh = A isin L(Vh Vh) | A1 = 0 〈Af g〉+ 〈fAg〉 forall f g isin Vh (8)

of Gh are understood as discrete volume preserving vector fields2 The linear (right) action of theLie algebra element A isin gh on a discrete function f isin Vh induced by the action (6) of Gh is givenby

f middotA = minusAf 3 (9)

It is understood as the discrete derivative of f in the direction AIn early incarnations of this theory Vh is taken equal to RN where N is the number of elements

in a triangulation of Ω and 1 isin RN is the vector of all ones In this case we have 〈FG〉 = FTΘGwhere Θ isin RNtimesN is a diagonal matrix whose ith diagonal entry is the volume of the ith element ofthe triangulation Hence Gh is simply the group of Θ-orthogonal matrices with rows summing to1

In more recent treatments a finite element formulation has been adopted [18] Namely Vh istaken equal to a finite-dimensional subspace of L2(Ω) with the inner product inherited from L2(Ω)and 1 is simply the constant function 1 This is the setting that we will develop to the compressiblecase in the present paper

22 Compressible flows

The Continuous Setting The Lie group variational formulation recalled above generalizes tocompressible flows as follows For simplicity we consider here only the barotropic fluid in whichthe internal energy is a function of the mass density only The variational treatment of the general(or baroclinic) compressible fluid is similar see Appendix A Consider the group Diff(Ω) of all notnecessarily volume preserving diffeomorphisms of Ω and the Lagrangian

L(ϕ parttϕ 0) =

ˆΩ

[1

20|parttϕ|2 minus 0e(0Jϕ)

]dX (10)

Here 0 is the mass density of the fluid in the reference configuration Jϕ is the Jacobian of thediffeomorphism ϕ and e is the specific internal energy of the fluid The equations of evolution arefound as before from the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ 0)dt = 0 (11)

1Note that the representation of the group diffeomorphism by pull-back on functions is naturally a right action(f 7rarr f ϕ) whereas the group GL(Vh) acts by matrix multiplication on the left (f 7rarr qf) This explain the use ofthe inverse qminus1 on right hand side of (6)

2Strictly speaking only a subspace of this Lie algebra represents discrete vector fields as we will see in detaillater

3Note the minus sign due to (6) which is consistent with the fact that f 7rarr f middot A is a right representation whilef 7rarr AF is a left representation

5

subject to arbitrary variations δϕ vanishing at the endpoints and where 0 is held fixedThe main difference with the case of incompressible fluids recalled earlier is that the La-

grangian L is not invariant under the configuration Lie group Diff(Ω) but only under the sub-group Diff(Ω)0 sub Diff(Ω) of diffeomorphisms that preserve 0 ie Diff(Ω)0 = ϕ isin Diff(Ω) |(0 ϕ)Jϕ = 0 namely we have

L(ϕ ψ partt(ϕ ψ) 0) = L(ϕ parttϕ 0) forallψ isin Diff(Ω)0 (12)

as it is easily seen from (10)

As a consequence of the symmetry (12) one can associate to L the Lagrangian `(u ρ) in Eulerianform as follows

L(ϕ parttϕ 0) = `(u ρ) with u = parttϕ ϕminus1 ρ = (0 ϕminus1)Jϕminus1 (13)

and

`(u ρ) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ)

]dx (14)

From the relations (13) the Hamilton principle (11) induces the variational principle

δ

ˆ T

0`(u ρ) dt = 0 (15)

with respect to variations δu and δρ of the form

δu = parttv + pounduv δρ = minusdiv(ρv) with v [0 T ]rarr X(Ω) and v(0) = v(T ) = 0

Here X(Ω) denotes the Lie algebra of Diff(Ω) which consists of vector fields on Ω with vanishingnormal component on partΩ The conditions for criticality in (15) yield the balance of fluid momentum

ρ(parttu+ u middot nablau) = minusnablap with p = ρ2 parte

partρ(16)

while the relation ρ = (0 ϕminus1)Jϕminus1 yields the continuity equation

parttρ+ div(ρu) = 0

As in the case of incompressible flow the process just described for the group Diff(Ω) is a specialinstance of the process of Euler-Poincare reduction We refer to Appendix A for more details andto sect52 for the rotating fluid in a gravitational field

The Semidiscrete Setting A low-order semidiscrete variational setting has been described in[3] that extends the work of [19 11 9] to the compressible case with a particular focus on the rotat-ing shallow water equations It is based on the compressible version of the discrete diffeomorphismgroup (7) namely

Gh = q isin GL(Vh) | q1 = 1 (17)

whose Lie algebra isgh = A isin L(Vh Vh) | A1 = 0 (18)

A nonholonomic constraint is imposed in [3] to distinguish elements of gh that actually representdiscrete versions of vector fields In this paper we will see how this idea generalizes to the higherorder setting The representation of gh on Vh is given as before by f 7rarr f middot A = minusAf and isunderstood as a discrete version of the derivative in the direction A

Notice that we denote by Gh and Gh the subgroups of GL(Vh) when the finite element spaceVh is left unspecified similarly for the corresponding Lie algebras gh and gh When it is chosen asthe space V r

h of polynomials of degree le r on each simplex we use the notations Grh Grh for thegroups and grh grh for the Lie algebras

6

3 The distributional directional derivative and its properties

As we have recalled above when using a subgroup of GL(Vh) to discretize the diffeomorphismgroup its Lie algebra gh contains the subspace of discrete vector fields More precisely as linearmaps in gh sub L(Vh Vh) these discrete vector fields act as discrete derivations on Vh Once avector space Vh is selected it is thus natural to choose these discrete vector fields as distributionaldirectional derivatives In this section we recall this definition study its properties and show thatthese derivations are isomorphic to a Raviart-Thomas finite element space

Let Ω be as before the domain of the fluid assumed to be bounded with smooth boundary Weconsider the Hilbert spaces

H(divΩ) = u isin L2(Ω)n | div u isin L2(Ω)H0(divΩ) = u isin H(divΩ) | u middot n|partΩ = 0H(divΩ) = u isin H(divΩ) | div u = 0 u middot n|partΩ = 0

31 Definition and properties

Let Th be a triangulation of Ω having maximum element diameter h We assume that Th belongsto a shape-regular quasi-uniform family of triangulations of Ω parametrized by h That is thereexist positive constants C1 and C2 independent of h such that

maxKisinTh

hKρKle C1 and max

KisinTh

h

hKle C2

where hK and ρK denote the diameter and inradius of a simplex K For r ge 0 an integer weconsider the subspace of L2(Ω)

V rh = f isin L2(Ω) | f |K isin Pr(K) forallK isin Th (19)

where Pr(K) denotes the space of polynomials of degree le r on a simplex K

Definition 31 Given u isin H(divΩ) the distributional derivative in the direction u is thelinear map nabladist

u L2(Ω)rarr Cinfin0 (Ω)prime defined by

ˆΩ

(nabladistu f)g dx = minus

ˆΩf div(gu) dx forallg isin Cinfin0 (Ω) (20)

When a triangulation Th is fixed f isin V rh and u isin H0(divΩ)capLp(Ω)n p gt 2 the distributional

directional derivative (20) can be rewritten as

ˆΩ

(nabladistu f)g dx =

sumKisinTh

ˆK

(nablauf)g dxminussumKisinTh

ˆpartK

(u middot n)fgds

=sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKg ds

(21)

for all g isin Cinfin0 (Ω) Here nablauf = u middot nablaf denotes the derivative of f along u E0h denotes the set of

interior (nminus 1)-simplices in Th (edges in two dimensions) and JfK is defined by

JfK = f1n1 + f2n2 on e = K1 capK2 isin E0h

7

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 2: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

B Remarks on the nonholonomic Euler-Poincare variational formulation 29

C Polynomials 30

1 Introduction

Numerical schemes that respect conservation laws and other geometric structures are of paramountimportance in computational fluid dynamics especially for problems relying on long time simula-tion This is the case for geophysical fluid dynamics in the context of meteorological or climateprediction

Schemes that preserve the geometric structures underlying the equations they discretize areknown as geometric integrators [14] One efficient way to derive geometric integrators is to exploitthe variational formulation of the continuous equations and to mimic this formulation at the spatialandor temporal discrete level For instance in classical mechanics a time discretization of theLagrangian variational formulation permits the derivation of numerical schemes called variationalintegrators that are symplectic exhibit good energy behavior and inherit a discrete version ofNoetherrsquos theorem which guarantees the exact preservation of momenta arising from symmetriessee [17]

Geometric variational integrators for fluid dynamics were first derived in [19] for the Eulerequations of a perfect fluid These integrators exploit the viewpoint of [2] that fluid motionscorrespond to geodesics on the group of volume preserving diffeomorphisms of the fluid domainThe spatially discretized Euler equations emerge from an application of this principle on a finitedimensional approximation of the diffeomorphism group The approach has been extended tovarious equations of incompressible fluid dynamics with advected quantities [11] rotating andstratified fluids for atmospheric and oceanic dynamics [9] reduced-order models of fluid flow [16]anelastic and pseudo-incompressible fluids on 2D irregular simplicial meshes [4] compressible fluids[3] and compressible fluids on spheres [7] In all of the aforementioned references the schemes thatresult are low-order finite difference schemes

It was suggested in [16] that the variational discretization initiated in [19] can be generalizedby letting the discrete diffeomorphism group act on finite element spaces Such an approach wasdeveloped in [18] in the context of the ideal fluid and thus allowed for a higher order version ofthe method as well as an error estimate For certain parameter choices this high order methodcoincides with an H(div)-conforming finite element method studied in [13]

In the present paper we develop a finite element variational discretization of compressible fluiddynamics by exploiting the recent progresses made in [3] and [18] based on the variational methodinitiated in [19] Roughly speaking our approach is the following Given a triangulation on thefluid domain Ω we consider the space V r

h sub L2(Ω) of polynomials of degree le r on each simplexand define the group of discrete diffeomorphisms as a certain subgroup Grh of the general lineargroup GL(V r

h ) The action of Grh on V rh is understood as a discrete version of the action by pull

back on functions in L2(Ω) As a consequence the action of the Lie algebra grh on V rh is understood

as as discrete version of the derivation along vector fields In a similar way with [19] and [3] thisinterpretation naturally leads one to consider a specific subspace of grh consisting of Lie algebraelements that actually represent discrete vector fields We show that this subspace is isomorphicto a Raviart-Thomas finite element space We also define a Lie algebra-to-vector fields map thatallows a systematic definition of the semidiscrete Lagrangian for any given continuous LagrangianThe developed setting allows us to derive the finite element scheme by applying a discrete version

2

of the Lie group variational formulation of compressible fluids In particular the discretizationcorresponds to a weak form of the compressible fluid equation that doesnrsquot seem to have been usedin the finite element literature An incompressible version of this expression of the weak form hasbeen used in [12] for the incompressible fluid with variable density The setting that we developapplies in general to 2D and 3D fluid models that can be written in Euler-Poincare form Forinstance it applies to the rotating shallow water equations

The plan of the paper is the following In Section 2 we review the variational Lie groupformulation of both incompressible and compressible fluids by recalling the Hamilton principleon diffeomorphism groups corresponding to the Lagrangian description and the induced Euler-Poincare variational principle corresponding to the Eulerian formulation We also briefly indicatehow this formulation has been previously used to derive variational integrators In Section 3 weconsider the distributional derivative deduce from it a discrete derivative acting on finite elementspaces and study its properties In particular we show that these discrete derivatives are isomorphicto a Raviart-Thomas finite element space In the lower order setting the space of discrete derivativesrecovers the spaces used in previous works both for the incompressible [19] and compressible [3]cases In Section 4 we define a map that associates to any Lie algebra element of the discretediffeomorphism group a vector field on the fluid domain We call such a map a Lie algebra-to-vector fields map It is needed to define in a general way the semidiscrete Lagrangian associatedto a given continuous Lagrangian We study its properties which are used later to write downthe numerical scheme In Section 5 we derive the numerical scheme by using the Euler-Poincareequations on the discrete diffeomorphism group associated to the chosen finite element space As wewill explain in detail in a similar way with the approach initiated in [19] a nonholonomic version ofthe Euler-Poincare principle is used to constrain the dynamics to the space of discrete derivativesWe show that such a space must be a subspace of a Brezzi-Douglas-Marini finite element spaceFinally we illustrate the behavior of the resulting scheme in Section 6

2 Review of variational discretizations in fluid dynamics

We begin by reviewing the variational formulation of ideal and compressible fluid flows and theirvariational discretization

21 Incompressible flow

The Continuous Setting As we mentioned in the introduction solutions to the Euler equationsof ideal fluid flow in a bounded domain Ω sub Rn with smooth boundary can be formally regardedas curves ϕ [0 T ]rarr Diffvol(Ω) that are critical for the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ)dt = 0 (1)

with respect to variations δϕ vanishing at the endpoints Here Diffvol(Ω) is the group of volumepreserving diffeomorphisms of Ω and ϕ(t) Ω rarr Ω is the map sending the position X of a fluidparticle at time 0 to its position x = ϕ(tX) at time t The Lagrangian in (1) is given by thekinetic energy

L(ϕ parttϕ) =

ˆΩ

1

2|parttϕ|2 dX

and is invariant under the right action of Diffvol(Ω) on itself via composition namely

L(ϕ ψ partt(ϕ ψ)) = L(ϕ parttϕ) forallψ isin Diffvol(Ω)

3

This symmetry is often referred to as the particle relabelling symmetry

As a consequence of this symmetry the variational principle (1) can be recast on the Lie algebraof Diffvol(Ω) which is the space Xdiv(Ω) of divergence-free vector fields on Ω with vanishing normalcomponent on partΩ Namely one seeks a curve u [0 T ]rarr Xdiv(Ω) satisfying the critical condition

δ

ˆ T

0`(u) dt = 0 (2)

subject to variations δu of the form

δu = parttv + pounduv with v [0 T ]rarr Xdiv(Ω) and v(0) = v(T ) = 0

where

`(u) =

ˆΩ

1

2|u|2 dx

and Luv = [u v] = u middot nablav minus v middot nablau is the Lie derivative of the vector field v along the vector fieldu This principle is obtained from the Hamilton principle (1) by using the relation parttϕ = u ϕbetween the Lagrangian and Eulerian velocities and by computing the constrained variations of uinduced by the free variations of ϕ The conditions for criticality in (2) read

parttu+ u middot nablau = minusnablapdiv u = 0

(3)

where p is a Lagrange multiplier enforcing the incompressibility constraint The process just de-scribed for the Euler equations is valid in general for invariant Euler-Lagrange systems on arbitraryLie groups and is known as Euler-Poincare reduction It plays an important role in this paper as itis used also at the discrete level to derive the numerical scheme We refer to Appendix A for moredetails on the Euler-Poincare principle and its application to incompressible flows

The Semidiscrete Setting The variational principle recalled above has been used to derivestructure-preserving discretizations of the incompressible Euler equations [19] and various gen-eralizations of it have been used to do the same for other equations in incompressible fluid dy-namics [11 9] In these discretizations the group Diffvol(Ω) is approximated by a subgroup Ghof the general linear group GL(Vh) over a finite-dimensional vector space Vh and extremizers ofa time-discretized action functional are sought within Gh More precisely extremizers are soughtwithin a subspace of the Lie algebra gh of Gh after reducing by a symmetry and imposing nonholo-nomic constraints This construction typically leads to schemes with good long-term conservationproperties

The use of a subgroup of the general linear group to approximate Diffvol(Ω) is inspired by thefact that Diffvol(Ω) acts linearly on the Lebesgue space L2(Ω) from the right via the pullback

f middot ϕ = f ϕ f isin L2(Ω) ϕ isin Diffvol(Ω)

This action satisfiesf middot ϕ = f if f is constant (4)

and it preserves the L2-inner product 〈f g〉 =acute

Ω fg dx thanks to volume-preservation

〈f middot ϕ g middot ϕ〉 = 〈f g〉 forallf g isin L2(Ω) (5)

4

In the discrete setting this action is approximated by the (right) action of GL(Vh) on Vh

f middot q = qminus1f f isin Vh q isin GL(Vh)1 (6)

By imposing discretized versions of the properties (4) and (5) the group Gh is taken equal to

Gh = q isin GL(Vh) | q1 = 1 〈qf qg〉 = 〈f g〉 forall f g isin Vh (7)

where 1 isin Vh denotes a discrete representative of the constant function 1While the elements of Gh are understood as discrete versions of volume preserving diffeomor-

phisms elements in the Lie algebra

gh = A isin L(Vh Vh) | A1 = 0 〈Af g〉+ 〈fAg〉 forall f g isin Vh (8)

of Gh are understood as discrete volume preserving vector fields2 The linear (right) action of theLie algebra element A isin gh on a discrete function f isin Vh induced by the action (6) of Gh is givenby

f middotA = minusAf 3 (9)

It is understood as the discrete derivative of f in the direction AIn early incarnations of this theory Vh is taken equal to RN where N is the number of elements

in a triangulation of Ω and 1 isin RN is the vector of all ones In this case we have 〈FG〉 = FTΘGwhere Θ isin RNtimesN is a diagonal matrix whose ith diagonal entry is the volume of the ith element ofthe triangulation Hence Gh is simply the group of Θ-orthogonal matrices with rows summing to1

In more recent treatments a finite element formulation has been adopted [18] Namely Vh istaken equal to a finite-dimensional subspace of L2(Ω) with the inner product inherited from L2(Ω)and 1 is simply the constant function 1 This is the setting that we will develop to the compressiblecase in the present paper

22 Compressible flows

The Continuous Setting The Lie group variational formulation recalled above generalizes tocompressible flows as follows For simplicity we consider here only the barotropic fluid in whichthe internal energy is a function of the mass density only The variational treatment of the general(or baroclinic) compressible fluid is similar see Appendix A Consider the group Diff(Ω) of all notnecessarily volume preserving diffeomorphisms of Ω and the Lagrangian

L(ϕ parttϕ 0) =

ˆΩ

[1

20|parttϕ|2 minus 0e(0Jϕ)

]dX (10)

Here 0 is the mass density of the fluid in the reference configuration Jϕ is the Jacobian of thediffeomorphism ϕ and e is the specific internal energy of the fluid The equations of evolution arefound as before from the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ 0)dt = 0 (11)

1Note that the representation of the group diffeomorphism by pull-back on functions is naturally a right action(f 7rarr f ϕ) whereas the group GL(Vh) acts by matrix multiplication on the left (f 7rarr qf) This explain the use ofthe inverse qminus1 on right hand side of (6)

2Strictly speaking only a subspace of this Lie algebra represents discrete vector fields as we will see in detaillater

3Note the minus sign due to (6) which is consistent with the fact that f 7rarr f middot A is a right representation whilef 7rarr AF is a left representation

5

subject to arbitrary variations δϕ vanishing at the endpoints and where 0 is held fixedThe main difference with the case of incompressible fluids recalled earlier is that the La-

grangian L is not invariant under the configuration Lie group Diff(Ω) but only under the sub-group Diff(Ω)0 sub Diff(Ω) of diffeomorphisms that preserve 0 ie Diff(Ω)0 = ϕ isin Diff(Ω) |(0 ϕ)Jϕ = 0 namely we have

L(ϕ ψ partt(ϕ ψ) 0) = L(ϕ parttϕ 0) forallψ isin Diff(Ω)0 (12)

as it is easily seen from (10)

As a consequence of the symmetry (12) one can associate to L the Lagrangian `(u ρ) in Eulerianform as follows

L(ϕ parttϕ 0) = `(u ρ) with u = parttϕ ϕminus1 ρ = (0 ϕminus1)Jϕminus1 (13)

and

`(u ρ) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ)

]dx (14)

From the relations (13) the Hamilton principle (11) induces the variational principle

δ

ˆ T

0`(u ρ) dt = 0 (15)

with respect to variations δu and δρ of the form

δu = parttv + pounduv δρ = minusdiv(ρv) with v [0 T ]rarr X(Ω) and v(0) = v(T ) = 0

Here X(Ω) denotes the Lie algebra of Diff(Ω) which consists of vector fields on Ω with vanishingnormal component on partΩ The conditions for criticality in (15) yield the balance of fluid momentum

ρ(parttu+ u middot nablau) = minusnablap with p = ρ2 parte

partρ(16)

while the relation ρ = (0 ϕminus1)Jϕminus1 yields the continuity equation

parttρ+ div(ρu) = 0

As in the case of incompressible flow the process just described for the group Diff(Ω) is a specialinstance of the process of Euler-Poincare reduction We refer to Appendix A for more details andto sect52 for the rotating fluid in a gravitational field

The Semidiscrete Setting A low-order semidiscrete variational setting has been described in[3] that extends the work of [19 11 9] to the compressible case with a particular focus on the rotat-ing shallow water equations It is based on the compressible version of the discrete diffeomorphismgroup (7) namely

Gh = q isin GL(Vh) | q1 = 1 (17)

whose Lie algebra isgh = A isin L(Vh Vh) | A1 = 0 (18)

A nonholonomic constraint is imposed in [3] to distinguish elements of gh that actually representdiscrete versions of vector fields In this paper we will see how this idea generalizes to the higherorder setting The representation of gh on Vh is given as before by f 7rarr f middot A = minusAf and isunderstood as a discrete version of the derivative in the direction A

Notice that we denote by Gh and Gh the subgroups of GL(Vh) when the finite element spaceVh is left unspecified similarly for the corresponding Lie algebras gh and gh When it is chosen asthe space V r

h of polynomials of degree le r on each simplex we use the notations Grh Grh for thegroups and grh grh for the Lie algebras

6

3 The distributional directional derivative and its properties

As we have recalled above when using a subgroup of GL(Vh) to discretize the diffeomorphismgroup its Lie algebra gh contains the subspace of discrete vector fields More precisely as linearmaps in gh sub L(Vh Vh) these discrete vector fields act as discrete derivations on Vh Once avector space Vh is selected it is thus natural to choose these discrete vector fields as distributionaldirectional derivatives In this section we recall this definition study its properties and show thatthese derivations are isomorphic to a Raviart-Thomas finite element space

Let Ω be as before the domain of the fluid assumed to be bounded with smooth boundary Weconsider the Hilbert spaces

H(divΩ) = u isin L2(Ω)n | div u isin L2(Ω)H0(divΩ) = u isin H(divΩ) | u middot n|partΩ = 0H(divΩ) = u isin H(divΩ) | div u = 0 u middot n|partΩ = 0

31 Definition and properties

Let Th be a triangulation of Ω having maximum element diameter h We assume that Th belongsto a shape-regular quasi-uniform family of triangulations of Ω parametrized by h That is thereexist positive constants C1 and C2 independent of h such that

maxKisinTh

hKρKle C1 and max

KisinTh

h

hKle C2

where hK and ρK denote the diameter and inradius of a simplex K For r ge 0 an integer weconsider the subspace of L2(Ω)

V rh = f isin L2(Ω) | f |K isin Pr(K) forallK isin Th (19)

where Pr(K) denotes the space of polynomials of degree le r on a simplex K

Definition 31 Given u isin H(divΩ) the distributional derivative in the direction u is thelinear map nabladist

u L2(Ω)rarr Cinfin0 (Ω)prime defined by

ˆΩ

(nabladistu f)g dx = minus

ˆΩf div(gu) dx forallg isin Cinfin0 (Ω) (20)

When a triangulation Th is fixed f isin V rh and u isin H0(divΩ)capLp(Ω)n p gt 2 the distributional

directional derivative (20) can be rewritten as

ˆΩ

(nabladistu f)g dx =

sumKisinTh

ˆK

(nablauf)g dxminussumKisinTh

ˆpartK

(u middot n)fgds

=sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKg ds

(21)

for all g isin Cinfin0 (Ω) Here nablauf = u middot nablaf denotes the derivative of f along u E0h denotes the set of

interior (nminus 1)-simplices in Th (edges in two dimensions) and JfK is defined by

JfK = f1n1 + f2n2 on e = K1 capK2 isin E0h

7

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 3: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

of the Lie group variational formulation of compressible fluids In particular the discretizationcorresponds to a weak form of the compressible fluid equation that doesnrsquot seem to have been usedin the finite element literature An incompressible version of this expression of the weak form hasbeen used in [12] for the incompressible fluid with variable density The setting that we developapplies in general to 2D and 3D fluid models that can be written in Euler-Poincare form Forinstance it applies to the rotating shallow water equations

The plan of the paper is the following In Section 2 we review the variational Lie groupformulation of both incompressible and compressible fluids by recalling the Hamilton principleon diffeomorphism groups corresponding to the Lagrangian description and the induced Euler-Poincare variational principle corresponding to the Eulerian formulation We also briefly indicatehow this formulation has been previously used to derive variational integrators In Section 3 weconsider the distributional derivative deduce from it a discrete derivative acting on finite elementspaces and study its properties In particular we show that these discrete derivatives are isomorphicto a Raviart-Thomas finite element space In the lower order setting the space of discrete derivativesrecovers the spaces used in previous works both for the incompressible [19] and compressible [3]cases In Section 4 we define a map that associates to any Lie algebra element of the discretediffeomorphism group a vector field on the fluid domain We call such a map a Lie algebra-to-vector fields map It is needed to define in a general way the semidiscrete Lagrangian associatedto a given continuous Lagrangian We study its properties which are used later to write downthe numerical scheme In Section 5 we derive the numerical scheme by using the Euler-Poincareequations on the discrete diffeomorphism group associated to the chosen finite element space As wewill explain in detail in a similar way with the approach initiated in [19] a nonholonomic version ofthe Euler-Poincare principle is used to constrain the dynamics to the space of discrete derivativesWe show that such a space must be a subspace of a Brezzi-Douglas-Marini finite element spaceFinally we illustrate the behavior of the resulting scheme in Section 6

2 Review of variational discretizations in fluid dynamics

We begin by reviewing the variational formulation of ideal and compressible fluid flows and theirvariational discretization

21 Incompressible flow

The Continuous Setting As we mentioned in the introduction solutions to the Euler equationsof ideal fluid flow in a bounded domain Ω sub Rn with smooth boundary can be formally regardedas curves ϕ [0 T ]rarr Diffvol(Ω) that are critical for the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ)dt = 0 (1)

with respect to variations δϕ vanishing at the endpoints Here Diffvol(Ω) is the group of volumepreserving diffeomorphisms of Ω and ϕ(t) Ω rarr Ω is the map sending the position X of a fluidparticle at time 0 to its position x = ϕ(tX) at time t The Lagrangian in (1) is given by thekinetic energy

L(ϕ parttϕ) =

ˆΩ

1

2|parttϕ|2 dX

and is invariant under the right action of Diffvol(Ω) on itself via composition namely

L(ϕ ψ partt(ϕ ψ)) = L(ϕ parttϕ) forallψ isin Diffvol(Ω)

3

This symmetry is often referred to as the particle relabelling symmetry

As a consequence of this symmetry the variational principle (1) can be recast on the Lie algebraof Diffvol(Ω) which is the space Xdiv(Ω) of divergence-free vector fields on Ω with vanishing normalcomponent on partΩ Namely one seeks a curve u [0 T ]rarr Xdiv(Ω) satisfying the critical condition

δ

ˆ T

0`(u) dt = 0 (2)

subject to variations δu of the form

δu = parttv + pounduv with v [0 T ]rarr Xdiv(Ω) and v(0) = v(T ) = 0

where

`(u) =

ˆΩ

1

2|u|2 dx

and Luv = [u v] = u middot nablav minus v middot nablau is the Lie derivative of the vector field v along the vector fieldu This principle is obtained from the Hamilton principle (1) by using the relation parttϕ = u ϕbetween the Lagrangian and Eulerian velocities and by computing the constrained variations of uinduced by the free variations of ϕ The conditions for criticality in (2) read

parttu+ u middot nablau = minusnablapdiv u = 0

(3)

where p is a Lagrange multiplier enforcing the incompressibility constraint The process just de-scribed for the Euler equations is valid in general for invariant Euler-Lagrange systems on arbitraryLie groups and is known as Euler-Poincare reduction It plays an important role in this paper as itis used also at the discrete level to derive the numerical scheme We refer to Appendix A for moredetails on the Euler-Poincare principle and its application to incompressible flows

The Semidiscrete Setting The variational principle recalled above has been used to derivestructure-preserving discretizations of the incompressible Euler equations [19] and various gen-eralizations of it have been used to do the same for other equations in incompressible fluid dy-namics [11 9] In these discretizations the group Diffvol(Ω) is approximated by a subgroup Ghof the general linear group GL(Vh) over a finite-dimensional vector space Vh and extremizers ofa time-discretized action functional are sought within Gh More precisely extremizers are soughtwithin a subspace of the Lie algebra gh of Gh after reducing by a symmetry and imposing nonholo-nomic constraints This construction typically leads to schemes with good long-term conservationproperties

The use of a subgroup of the general linear group to approximate Diffvol(Ω) is inspired by thefact that Diffvol(Ω) acts linearly on the Lebesgue space L2(Ω) from the right via the pullback

f middot ϕ = f ϕ f isin L2(Ω) ϕ isin Diffvol(Ω)

This action satisfiesf middot ϕ = f if f is constant (4)

and it preserves the L2-inner product 〈f g〉 =acute

Ω fg dx thanks to volume-preservation

〈f middot ϕ g middot ϕ〉 = 〈f g〉 forallf g isin L2(Ω) (5)

4

In the discrete setting this action is approximated by the (right) action of GL(Vh) on Vh

f middot q = qminus1f f isin Vh q isin GL(Vh)1 (6)

By imposing discretized versions of the properties (4) and (5) the group Gh is taken equal to

Gh = q isin GL(Vh) | q1 = 1 〈qf qg〉 = 〈f g〉 forall f g isin Vh (7)

where 1 isin Vh denotes a discrete representative of the constant function 1While the elements of Gh are understood as discrete versions of volume preserving diffeomor-

phisms elements in the Lie algebra

gh = A isin L(Vh Vh) | A1 = 0 〈Af g〉+ 〈fAg〉 forall f g isin Vh (8)

of Gh are understood as discrete volume preserving vector fields2 The linear (right) action of theLie algebra element A isin gh on a discrete function f isin Vh induced by the action (6) of Gh is givenby

f middotA = minusAf 3 (9)

It is understood as the discrete derivative of f in the direction AIn early incarnations of this theory Vh is taken equal to RN where N is the number of elements

in a triangulation of Ω and 1 isin RN is the vector of all ones In this case we have 〈FG〉 = FTΘGwhere Θ isin RNtimesN is a diagonal matrix whose ith diagonal entry is the volume of the ith element ofthe triangulation Hence Gh is simply the group of Θ-orthogonal matrices with rows summing to1

In more recent treatments a finite element formulation has been adopted [18] Namely Vh istaken equal to a finite-dimensional subspace of L2(Ω) with the inner product inherited from L2(Ω)and 1 is simply the constant function 1 This is the setting that we will develop to the compressiblecase in the present paper

22 Compressible flows

The Continuous Setting The Lie group variational formulation recalled above generalizes tocompressible flows as follows For simplicity we consider here only the barotropic fluid in whichthe internal energy is a function of the mass density only The variational treatment of the general(or baroclinic) compressible fluid is similar see Appendix A Consider the group Diff(Ω) of all notnecessarily volume preserving diffeomorphisms of Ω and the Lagrangian

L(ϕ parttϕ 0) =

ˆΩ

[1

20|parttϕ|2 minus 0e(0Jϕ)

]dX (10)

Here 0 is the mass density of the fluid in the reference configuration Jϕ is the Jacobian of thediffeomorphism ϕ and e is the specific internal energy of the fluid The equations of evolution arefound as before from the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ 0)dt = 0 (11)

1Note that the representation of the group diffeomorphism by pull-back on functions is naturally a right action(f 7rarr f ϕ) whereas the group GL(Vh) acts by matrix multiplication on the left (f 7rarr qf) This explain the use ofthe inverse qminus1 on right hand side of (6)

2Strictly speaking only a subspace of this Lie algebra represents discrete vector fields as we will see in detaillater

3Note the minus sign due to (6) which is consistent with the fact that f 7rarr f middot A is a right representation whilef 7rarr AF is a left representation

5

subject to arbitrary variations δϕ vanishing at the endpoints and where 0 is held fixedThe main difference with the case of incompressible fluids recalled earlier is that the La-

grangian L is not invariant under the configuration Lie group Diff(Ω) but only under the sub-group Diff(Ω)0 sub Diff(Ω) of diffeomorphisms that preserve 0 ie Diff(Ω)0 = ϕ isin Diff(Ω) |(0 ϕ)Jϕ = 0 namely we have

L(ϕ ψ partt(ϕ ψ) 0) = L(ϕ parttϕ 0) forallψ isin Diff(Ω)0 (12)

as it is easily seen from (10)

As a consequence of the symmetry (12) one can associate to L the Lagrangian `(u ρ) in Eulerianform as follows

L(ϕ parttϕ 0) = `(u ρ) with u = parttϕ ϕminus1 ρ = (0 ϕminus1)Jϕminus1 (13)

and

`(u ρ) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ)

]dx (14)

From the relations (13) the Hamilton principle (11) induces the variational principle

δ

ˆ T

0`(u ρ) dt = 0 (15)

with respect to variations δu and δρ of the form

δu = parttv + pounduv δρ = minusdiv(ρv) with v [0 T ]rarr X(Ω) and v(0) = v(T ) = 0

Here X(Ω) denotes the Lie algebra of Diff(Ω) which consists of vector fields on Ω with vanishingnormal component on partΩ The conditions for criticality in (15) yield the balance of fluid momentum

ρ(parttu+ u middot nablau) = minusnablap with p = ρ2 parte

partρ(16)

while the relation ρ = (0 ϕminus1)Jϕminus1 yields the continuity equation

parttρ+ div(ρu) = 0

As in the case of incompressible flow the process just described for the group Diff(Ω) is a specialinstance of the process of Euler-Poincare reduction We refer to Appendix A for more details andto sect52 for the rotating fluid in a gravitational field

The Semidiscrete Setting A low-order semidiscrete variational setting has been described in[3] that extends the work of [19 11 9] to the compressible case with a particular focus on the rotat-ing shallow water equations It is based on the compressible version of the discrete diffeomorphismgroup (7) namely

Gh = q isin GL(Vh) | q1 = 1 (17)

whose Lie algebra isgh = A isin L(Vh Vh) | A1 = 0 (18)

A nonholonomic constraint is imposed in [3] to distinguish elements of gh that actually representdiscrete versions of vector fields In this paper we will see how this idea generalizes to the higherorder setting The representation of gh on Vh is given as before by f 7rarr f middot A = minusAf and isunderstood as a discrete version of the derivative in the direction A

Notice that we denote by Gh and Gh the subgroups of GL(Vh) when the finite element spaceVh is left unspecified similarly for the corresponding Lie algebras gh and gh When it is chosen asthe space V r

h of polynomials of degree le r on each simplex we use the notations Grh Grh for thegroups and grh grh for the Lie algebras

6

3 The distributional directional derivative and its properties

As we have recalled above when using a subgroup of GL(Vh) to discretize the diffeomorphismgroup its Lie algebra gh contains the subspace of discrete vector fields More precisely as linearmaps in gh sub L(Vh Vh) these discrete vector fields act as discrete derivations on Vh Once avector space Vh is selected it is thus natural to choose these discrete vector fields as distributionaldirectional derivatives In this section we recall this definition study its properties and show thatthese derivations are isomorphic to a Raviart-Thomas finite element space

Let Ω be as before the domain of the fluid assumed to be bounded with smooth boundary Weconsider the Hilbert spaces

H(divΩ) = u isin L2(Ω)n | div u isin L2(Ω)H0(divΩ) = u isin H(divΩ) | u middot n|partΩ = 0H(divΩ) = u isin H(divΩ) | div u = 0 u middot n|partΩ = 0

31 Definition and properties

Let Th be a triangulation of Ω having maximum element diameter h We assume that Th belongsto a shape-regular quasi-uniform family of triangulations of Ω parametrized by h That is thereexist positive constants C1 and C2 independent of h such that

maxKisinTh

hKρKle C1 and max

KisinTh

h

hKle C2

where hK and ρK denote the diameter and inradius of a simplex K For r ge 0 an integer weconsider the subspace of L2(Ω)

V rh = f isin L2(Ω) | f |K isin Pr(K) forallK isin Th (19)

where Pr(K) denotes the space of polynomials of degree le r on a simplex K

Definition 31 Given u isin H(divΩ) the distributional derivative in the direction u is thelinear map nabladist

u L2(Ω)rarr Cinfin0 (Ω)prime defined by

ˆΩ

(nabladistu f)g dx = minus

ˆΩf div(gu) dx forallg isin Cinfin0 (Ω) (20)

When a triangulation Th is fixed f isin V rh and u isin H0(divΩ)capLp(Ω)n p gt 2 the distributional

directional derivative (20) can be rewritten as

ˆΩ

(nabladistu f)g dx =

sumKisinTh

ˆK

(nablauf)g dxminussumKisinTh

ˆpartK

(u middot n)fgds

=sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKg ds

(21)

for all g isin Cinfin0 (Ω) Here nablauf = u middot nablaf denotes the derivative of f along u E0h denotes the set of

interior (nminus 1)-simplices in Th (edges in two dimensions) and JfK is defined by

JfK = f1n1 + f2n2 on e = K1 capK2 isin E0h

7

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 4: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

This symmetry is often referred to as the particle relabelling symmetry

As a consequence of this symmetry the variational principle (1) can be recast on the Lie algebraof Diffvol(Ω) which is the space Xdiv(Ω) of divergence-free vector fields on Ω with vanishing normalcomponent on partΩ Namely one seeks a curve u [0 T ]rarr Xdiv(Ω) satisfying the critical condition

δ

ˆ T

0`(u) dt = 0 (2)

subject to variations δu of the form

δu = parttv + pounduv with v [0 T ]rarr Xdiv(Ω) and v(0) = v(T ) = 0

where

`(u) =

ˆΩ

1

2|u|2 dx

and Luv = [u v] = u middot nablav minus v middot nablau is the Lie derivative of the vector field v along the vector fieldu This principle is obtained from the Hamilton principle (1) by using the relation parttϕ = u ϕbetween the Lagrangian and Eulerian velocities and by computing the constrained variations of uinduced by the free variations of ϕ The conditions for criticality in (2) read

parttu+ u middot nablau = minusnablapdiv u = 0

(3)

where p is a Lagrange multiplier enforcing the incompressibility constraint The process just de-scribed for the Euler equations is valid in general for invariant Euler-Lagrange systems on arbitraryLie groups and is known as Euler-Poincare reduction It plays an important role in this paper as itis used also at the discrete level to derive the numerical scheme We refer to Appendix A for moredetails on the Euler-Poincare principle and its application to incompressible flows

The Semidiscrete Setting The variational principle recalled above has been used to derivestructure-preserving discretizations of the incompressible Euler equations [19] and various gen-eralizations of it have been used to do the same for other equations in incompressible fluid dy-namics [11 9] In these discretizations the group Diffvol(Ω) is approximated by a subgroup Ghof the general linear group GL(Vh) over a finite-dimensional vector space Vh and extremizers ofa time-discretized action functional are sought within Gh More precisely extremizers are soughtwithin a subspace of the Lie algebra gh of Gh after reducing by a symmetry and imposing nonholo-nomic constraints This construction typically leads to schemes with good long-term conservationproperties

The use of a subgroup of the general linear group to approximate Diffvol(Ω) is inspired by thefact that Diffvol(Ω) acts linearly on the Lebesgue space L2(Ω) from the right via the pullback

f middot ϕ = f ϕ f isin L2(Ω) ϕ isin Diffvol(Ω)

This action satisfiesf middot ϕ = f if f is constant (4)

and it preserves the L2-inner product 〈f g〉 =acute

Ω fg dx thanks to volume-preservation

〈f middot ϕ g middot ϕ〉 = 〈f g〉 forallf g isin L2(Ω) (5)

4

In the discrete setting this action is approximated by the (right) action of GL(Vh) on Vh

f middot q = qminus1f f isin Vh q isin GL(Vh)1 (6)

By imposing discretized versions of the properties (4) and (5) the group Gh is taken equal to

Gh = q isin GL(Vh) | q1 = 1 〈qf qg〉 = 〈f g〉 forall f g isin Vh (7)

where 1 isin Vh denotes a discrete representative of the constant function 1While the elements of Gh are understood as discrete versions of volume preserving diffeomor-

phisms elements in the Lie algebra

gh = A isin L(Vh Vh) | A1 = 0 〈Af g〉+ 〈fAg〉 forall f g isin Vh (8)

of Gh are understood as discrete volume preserving vector fields2 The linear (right) action of theLie algebra element A isin gh on a discrete function f isin Vh induced by the action (6) of Gh is givenby

f middotA = minusAf 3 (9)

It is understood as the discrete derivative of f in the direction AIn early incarnations of this theory Vh is taken equal to RN where N is the number of elements

in a triangulation of Ω and 1 isin RN is the vector of all ones In this case we have 〈FG〉 = FTΘGwhere Θ isin RNtimesN is a diagonal matrix whose ith diagonal entry is the volume of the ith element ofthe triangulation Hence Gh is simply the group of Θ-orthogonal matrices with rows summing to1

In more recent treatments a finite element formulation has been adopted [18] Namely Vh istaken equal to a finite-dimensional subspace of L2(Ω) with the inner product inherited from L2(Ω)and 1 is simply the constant function 1 This is the setting that we will develop to the compressiblecase in the present paper

22 Compressible flows

The Continuous Setting The Lie group variational formulation recalled above generalizes tocompressible flows as follows For simplicity we consider here only the barotropic fluid in whichthe internal energy is a function of the mass density only The variational treatment of the general(or baroclinic) compressible fluid is similar see Appendix A Consider the group Diff(Ω) of all notnecessarily volume preserving diffeomorphisms of Ω and the Lagrangian

L(ϕ parttϕ 0) =

ˆΩ

[1

20|parttϕ|2 minus 0e(0Jϕ)

]dX (10)

Here 0 is the mass density of the fluid in the reference configuration Jϕ is the Jacobian of thediffeomorphism ϕ and e is the specific internal energy of the fluid The equations of evolution arefound as before from the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ 0)dt = 0 (11)

1Note that the representation of the group diffeomorphism by pull-back on functions is naturally a right action(f 7rarr f ϕ) whereas the group GL(Vh) acts by matrix multiplication on the left (f 7rarr qf) This explain the use ofthe inverse qminus1 on right hand side of (6)

2Strictly speaking only a subspace of this Lie algebra represents discrete vector fields as we will see in detaillater

3Note the minus sign due to (6) which is consistent with the fact that f 7rarr f middot A is a right representation whilef 7rarr AF is a left representation

5

subject to arbitrary variations δϕ vanishing at the endpoints and where 0 is held fixedThe main difference with the case of incompressible fluids recalled earlier is that the La-

grangian L is not invariant under the configuration Lie group Diff(Ω) but only under the sub-group Diff(Ω)0 sub Diff(Ω) of diffeomorphisms that preserve 0 ie Diff(Ω)0 = ϕ isin Diff(Ω) |(0 ϕ)Jϕ = 0 namely we have

L(ϕ ψ partt(ϕ ψ) 0) = L(ϕ parttϕ 0) forallψ isin Diff(Ω)0 (12)

as it is easily seen from (10)

As a consequence of the symmetry (12) one can associate to L the Lagrangian `(u ρ) in Eulerianform as follows

L(ϕ parttϕ 0) = `(u ρ) with u = parttϕ ϕminus1 ρ = (0 ϕminus1)Jϕminus1 (13)

and

`(u ρ) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ)

]dx (14)

From the relations (13) the Hamilton principle (11) induces the variational principle

δ

ˆ T

0`(u ρ) dt = 0 (15)

with respect to variations δu and δρ of the form

δu = parttv + pounduv δρ = minusdiv(ρv) with v [0 T ]rarr X(Ω) and v(0) = v(T ) = 0

Here X(Ω) denotes the Lie algebra of Diff(Ω) which consists of vector fields on Ω with vanishingnormal component on partΩ The conditions for criticality in (15) yield the balance of fluid momentum

ρ(parttu+ u middot nablau) = minusnablap with p = ρ2 parte

partρ(16)

while the relation ρ = (0 ϕminus1)Jϕminus1 yields the continuity equation

parttρ+ div(ρu) = 0

As in the case of incompressible flow the process just described for the group Diff(Ω) is a specialinstance of the process of Euler-Poincare reduction We refer to Appendix A for more details andto sect52 for the rotating fluid in a gravitational field

The Semidiscrete Setting A low-order semidiscrete variational setting has been described in[3] that extends the work of [19 11 9] to the compressible case with a particular focus on the rotat-ing shallow water equations It is based on the compressible version of the discrete diffeomorphismgroup (7) namely

Gh = q isin GL(Vh) | q1 = 1 (17)

whose Lie algebra isgh = A isin L(Vh Vh) | A1 = 0 (18)

A nonholonomic constraint is imposed in [3] to distinguish elements of gh that actually representdiscrete versions of vector fields In this paper we will see how this idea generalizes to the higherorder setting The representation of gh on Vh is given as before by f 7rarr f middot A = minusAf and isunderstood as a discrete version of the derivative in the direction A

Notice that we denote by Gh and Gh the subgroups of GL(Vh) when the finite element spaceVh is left unspecified similarly for the corresponding Lie algebras gh and gh When it is chosen asthe space V r

h of polynomials of degree le r on each simplex we use the notations Grh Grh for thegroups and grh grh for the Lie algebras

6

3 The distributional directional derivative and its properties

As we have recalled above when using a subgroup of GL(Vh) to discretize the diffeomorphismgroup its Lie algebra gh contains the subspace of discrete vector fields More precisely as linearmaps in gh sub L(Vh Vh) these discrete vector fields act as discrete derivations on Vh Once avector space Vh is selected it is thus natural to choose these discrete vector fields as distributionaldirectional derivatives In this section we recall this definition study its properties and show thatthese derivations are isomorphic to a Raviart-Thomas finite element space

Let Ω be as before the domain of the fluid assumed to be bounded with smooth boundary Weconsider the Hilbert spaces

H(divΩ) = u isin L2(Ω)n | div u isin L2(Ω)H0(divΩ) = u isin H(divΩ) | u middot n|partΩ = 0H(divΩ) = u isin H(divΩ) | div u = 0 u middot n|partΩ = 0

31 Definition and properties

Let Th be a triangulation of Ω having maximum element diameter h We assume that Th belongsto a shape-regular quasi-uniform family of triangulations of Ω parametrized by h That is thereexist positive constants C1 and C2 independent of h such that

maxKisinTh

hKρKle C1 and max

KisinTh

h

hKle C2

where hK and ρK denote the diameter and inradius of a simplex K For r ge 0 an integer weconsider the subspace of L2(Ω)

V rh = f isin L2(Ω) | f |K isin Pr(K) forallK isin Th (19)

where Pr(K) denotes the space of polynomials of degree le r on a simplex K

Definition 31 Given u isin H(divΩ) the distributional derivative in the direction u is thelinear map nabladist

u L2(Ω)rarr Cinfin0 (Ω)prime defined by

ˆΩ

(nabladistu f)g dx = minus

ˆΩf div(gu) dx forallg isin Cinfin0 (Ω) (20)

When a triangulation Th is fixed f isin V rh and u isin H0(divΩ)capLp(Ω)n p gt 2 the distributional

directional derivative (20) can be rewritten as

ˆΩ

(nabladistu f)g dx =

sumKisinTh

ˆK

(nablauf)g dxminussumKisinTh

ˆpartK

(u middot n)fgds

=sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKg ds

(21)

for all g isin Cinfin0 (Ω) Here nablauf = u middot nablaf denotes the derivative of f along u E0h denotes the set of

interior (nminus 1)-simplices in Th (edges in two dimensions) and JfK is defined by

JfK = f1n1 + f2n2 on e = K1 capK2 isin E0h

7

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 5: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

In the discrete setting this action is approximated by the (right) action of GL(Vh) on Vh

f middot q = qminus1f f isin Vh q isin GL(Vh)1 (6)

By imposing discretized versions of the properties (4) and (5) the group Gh is taken equal to

Gh = q isin GL(Vh) | q1 = 1 〈qf qg〉 = 〈f g〉 forall f g isin Vh (7)

where 1 isin Vh denotes a discrete representative of the constant function 1While the elements of Gh are understood as discrete versions of volume preserving diffeomor-

phisms elements in the Lie algebra

gh = A isin L(Vh Vh) | A1 = 0 〈Af g〉+ 〈fAg〉 forall f g isin Vh (8)

of Gh are understood as discrete volume preserving vector fields2 The linear (right) action of theLie algebra element A isin gh on a discrete function f isin Vh induced by the action (6) of Gh is givenby

f middotA = minusAf 3 (9)

It is understood as the discrete derivative of f in the direction AIn early incarnations of this theory Vh is taken equal to RN where N is the number of elements

in a triangulation of Ω and 1 isin RN is the vector of all ones In this case we have 〈FG〉 = FTΘGwhere Θ isin RNtimesN is a diagonal matrix whose ith diagonal entry is the volume of the ith element ofthe triangulation Hence Gh is simply the group of Θ-orthogonal matrices with rows summing to1

In more recent treatments a finite element formulation has been adopted [18] Namely Vh istaken equal to a finite-dimensional subspace of L2(Ω) with the inner product inherited from L2(Ω)and 1 is simply the constant function 1 This is the setting that we will develop to the compressiblecase in the present paper

22 Compressible flows

The Continuous Setting The Lie group variational formulation recalled above generalizes tocompressible flows as follows For simplicity we consider here only the barotropic fluid in whichthe internal energy is a function of the mass density only The variational treatment of the general(or baroclinic) compressible fluid is similar see Appendix A Consider the group Diff(Ω) of all notnecessarily volume preserving diffeomorphisms of Ω and the Lagrangian

L(ϕ parttϕ 0) =

ˆΩ

[1

20|parttϕ|2 minus 0e(0Jϕ)

]dX (10)

Here 0 is the mass density of the fluid in the reference configuration Jϕ is the Jacobian of thediffeomorphism ϕ and e is the specific internal energy of the fluid The equations of evolution arefound as before from the Hamilton principle

δ

ˆ T

0L(ϕ parttϕ 0)dt = 0 (11)

1Note that the representation of the group diffeomorphism by pull-back on functions is naturally a right action(f 7rarr f ϕ) whereas the group GL(Vh) acts by matrix multiplication on the left (f 7rarr qf) This explain the use ofthe inverse qminus1 on right hand side of (6)

2Strictly speaking only a subspace of this Lie algebra represents discrete vector fields as we will see in detaillater

3Note the minus sign due to (6) which is consistent with the fact that f 7rarr f middot A is a right representation whilef 7rarr AF is a left representation

5

subject to arbitrary variations δϕ vanishing at the endpoints and where 0 is held fixedThe main difference with the case of incompressible fluids recalled earlier is that the La-

grangian L is not invariant under the configuration Lie group Diff(Ω) but only under the sub-group Diff(Ω)0 sub Diff(Ω) of diffeomorphisms that preserve 0 ie Diff(Ω)0 = ϕ isin Diff(Ω) |(0 ϕ)Jϕ = 0 namely we have

L(ϕ ψ partt(ϕ ψ) 0) = L(ϕ parttϕ 0) forallψ isin Diff(Ω)0 (12)

as it is easily seen from (10)

As a consequence of the symmetry (12) one can associate to L the Lagrangian `(u ρ) in Eulerianform as follows

L(ϕ parttϕ 0) = `(u ρ) with u = parttϕ ϕminus1 ρ = (0 ϕminus1)Jϕminus1 (13)

and

`(u ρ) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ)

]dx (14)

From the relations (13) the Hamilton principle (11) induces the variational principle

δ

ˆ T

0`(u ρ) dt = 0 (15)

with respect to variations δu and δρ of the form

δu = parttv + pounduv δρ = minusdiv(ρv) with v [0 T ]rarr X(Ω) and v(0) = v(T ) = 0

Here X(Ω) denotes the Lie algebra of Diff(Ω) which consists of vector fields on Ω with vanishingnormal component on partΩ The conditions for criticality in (15) yield the balance of fluid momentum

ρ(parttu+ u middot nablau) = minusnablap with p = ρ2 parte

partρ(16)

while the relation ρ = (0 ϕminus1)Jϕminus1 yields the continuity equation

parttρ+ div(ρu) = 0

As in the case of incompressible flow the process just described for the group Diff(Ω) is a specialinstance of the process of Euler-Poincare reduction We refer to Appendix A for more details andto sect52 for the rotating fluid in a gravitational field

The Semidiscrete Setting A low-order semidiscrete variational setting has been described in[3] that extends the work of [19 11 9] to the compressible case with a particular focus on the rotat-ing shallow water equations It is based on the compressible version of the discrete diffeomorphismgroup (7) namely

Gh = q isin GL(Vh) | q1 = 1 (17)

whose Lie algebra isgh = A isin L(Vh Vh) | A1 = 0 (18)

A nonholonomic constraint is imposed in [3] to distinguish elements of gh that actually representdiscrete versions of vector fields In this paper we will see how this idea generalizes to the higherorder setting The representation of gh on Vh is given as before by f 7rarr f middot A = minusAf and isunderstood as a discrete version of the derivative in the direction A

Notice that we denote by Gh and Gh the subgroups of GL(Vh) when the finite element spaceVh is left unspecified similarly for the corresponding Lie algebras gh and gh When it is chosen asthe space V r

h of polynomials of degree le r on each simplex we use the notations Grh Grh for thegroups and grh grh for the Lie algebras

6

3 The distributional directional derivative and its properties

As we have recalled above when using a subgroup of GL(Vh) to discretize the diffeomorphismgroup its Lie algebra gh contains the subspace of discrete vector fields More precisely as linearmaps in gh sub L(Vh Vh) these discrete vector fields act as discrete derivations on Vh Once avector space Vh is selected it is thus natural to choose these discrete vector fields as distributionaldirectional derivatives In this section we recall this definition study its properties and show thatthese derivations are isomorphic to a Raviart-Thomas finite element space

Let Ω be as before the domain of the fluid assumed to be bounded with smooth boundary Weconsider the Hilbert spaces

H(divΩ) = u isin L2(Ω)n | div u isin L2(Ω)H0(divΩ) = u isin H(divΩ) | u middot n|partΩ = 0H(divΩ) = u isin H(divΩ) | div u = 0 u middot n|partΩ = 0

31 Definition and properties

Let Th be a triangulation of Ω having maximum element diameter h We assume that Th belongsto a shape-regular quasi-uniform family of triangulations of Ω parametrized by h That is thereexist positive constants C1 and C2 independent of h such that

maxKisinTh

hKρKle C1 and max

KisinTh

h

hKle C2

where hK and ρK denote the diameter and inradius of a simplex K For r ge 0 an integer weconsider the subspace of L2(Ω)

V rh = f isin L2(Ω) | f |K isin Pr(K) forallK isin Th (19)

where Pr(K) denotes the space of polynomials of degree le r on a simplex K

Definition 31 Given u isin H(divΩ) the distributional derivative in the direction u is thelinear map nabladist

u L2(Ω)rarr Cinfin0 (Ω)prime defined by

ˆΩ

(nabladistu f)g dx = minus

ˆΩf div(gu) dx forallg isin Cinfin0 (Ω) (20)

When a triangulation Th is fixed f isin V rh and u isin H0(divΩ)capLp(Ω)n p gt 2 the distributional

directional derivative (20) can be rewritten as

ˆΩ

(nabladistu f)g dx =

sumKisinTh

ˆK

(nablauf)g dxminussumKisinTh

ˆpartK

(u middot n)fgds

=sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKg ds

(21)

for all g isin Cinfin0 (Ω) Here nablauf = u middot nablaf denotes the derivative of f along u E0h denotes the set of

interior (nminus 1)-simplices in Th (edges in two dimensions) and JfK is defined by

JfK = f1n1 + f2n2 on e = K1 capK2 isin E0h

7

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 6: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

subject to arbitrary variations δϕ vanishing at the endpoints and where 0 is held fixedThe main difference with the case of incompressible fluids recalled earlier is that the La-

grangian L is not invariant under the configuration Lie group Diff(Ω) but only under the sub-group Diff(Ω)0 sub Diff(Ω) of diffeomorphisms that preserve 0 ie Diff(Ω)0 = ϕ isin Diff(Ω) |(0 ϕ)Jϕ = 0 namely we have

L(ϕ ψ partt(ϕ ψ) 0) = L(ϕ parttϕ 0) forallψ isin Diff(Ω)0 (12)

as it is easily seen from (10)

As a consequence of the symmetry (12) one can associate to L the Lagrangian `(u ρ) in Eulerianform as follows

L(ϕ parttϕ 0) = `(u ρ) with u = parttϕ ϕminus1 ρ = (0 ϕminus1)Jϕminus1 (13)

and

`(u ρ) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ)

]dx (14)

From the relations (13) the Hamilton principle (11) induces the variational principle

δ

ˆ T

0`(u ρ) dt = 0 (15)

with respect to variations δu and δρ of the form

δu = parttv + pounduv δρ = minusdiv(ρv) with v [0 T ]rarr X(Ω) and v(0) = v(T ) = 0

Here X(Ω) denotes the Lie algebra of Diff(Ω) which consists of vector fields on Ω with vanishingnormal component on partΩ The conditions for criticality in (15) yield the balance of fluid momentum

ρ(parttu+ u middot nablau) = minusnablap with p = ρ2 parte

partρ(16)

while the relation ρ = (0 ϕminus1)Jϕminus1 yields the continuity equation

parttρ+ div(ρu) = 0

As in the case of incompressible flow the process just described for the group Diff(Ω) is a specialinstance of the process of Euler-Poincare reduction We refer to Appendix A for more details andto sect52 for the rotating fluid in a gravitational field

The Semidiscrete Setting A low-order semidiscrete variational setting has been described in[3] that extends the work of [19 11 9] to the compressible case with a particular focus on the rotat-ing shallow water equations It is based on the compressible version of the discrete diffeomorphismgroup (7) namely

Gh = q isin GL(Vh) | q1 = 1 (17)

whose Lie algebra isgh = A isin L(Vh Vh) | A1 = 0 (18)

A nonholonomic constraint is imposed in [3] to distinguish elements of gh that actually representdiscrete versions of vector fields In this paper we will see how this idea generalizes to the higherorder setting The representation of gh on Vh is given as before by f 7rarr f middot A = minusAf and isunderstood as a discrete version of the derivative in the direction A

Notice that we denote by Gh and Gh the subgroups of GL(Vh) when the finite element spaceVh is left unspecified similarly for the corresponding Lie algebras gh and gh When it is chosen asthe space V r

h of polynomials of degree le r on each simplex we use the notations Grh Grh for thegroups and grh grh for the Lie algebras

6

3 The distributional directional derivative and its properties

As we have recalled above when using a subgroup of GL(Vh) to discretize the diffeomorphismgroup its Lie algebra gh contains the subspace of discrete vector fields More precisely as linearmaps in gh sub L(Vh Vh) these discrete vector fields act as discrete derivations on Vh Once avector space Vh is selected it is thus natural to choose these discrete vector fields as distributionaldirectional derivatives In this section we recall this definition study its properties and show thatthese derivations are isomorphic to a Raviart-Thomas finite element space

Let Ω be as before the domain of the fluid assumed to be bounded with smooth boundary Weconsider the Hilbert spaces

H(divΩ) = u isin L2(Ω)n | div u isin L2(Ω)H0(divΩ) = u isin H(divΩ) | u middot n|partΩ = 0H(divΩ) = u isin H(divΩ) | div u = 0 u middot n|partΩ = 0

31 Definition and properties

Let Th be a triangulation of Ω having maximum element diameter h We assume that Th belongsto a shape-regular quasi-uniform family of triangulations of Ω parametrized by h That is thereexist positive constants C1 and C2 independent of h such that

maxKisinTh

hKρKle C1 and max

KisinTh

h

hKle C2

where hK and ρK denote the diameter and inradius of a simplex K For r ge 0 an integer weconsider the subspace of L2(Ω)

V rh = f isin L2(Ω) | f |K isin Pr(K) forallK isin Th (19)

where Pr(K) denotes the space of polynomials of degree le r on a simplex K

Definition 31 Given u isin H(divΩ) the distributional derivative in the direction u is thelinear map nabladist

u L2(Ω)rarr Cinfin0 (Ω)prime defined by

ˆΩ

(nabladistu f)g dx = minus

ˆΩf div(gu) dx forallg isin Cinfin0 (Ω) (20)

When a triangulation Th is fixed f isin V rh and u isin H0(divΩ)capLp(Ω)n p gt 2 the distributional

directional derivative (20) can be rewritten as

ˆΩ

(nabladistu f)g dx =

sumKisinTh

ˆK

(nablauf)g dxminussumKisinTh

ˆpartK

(u middot n)fgds

=sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKg ds

(21)

for all g isin Cinfin0 (Ω) Here nablauf = u middot nablaf denotes the derivative of f along u E0h denotes the set of

interior (nminus 1)-simplices in Th (edges in two dimensions) and JfK is defined by

JfK = f1n1 + f2n2 on e = K1 capK2 isin E0h

7

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 7: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

3 The distributional directional derivative and its properties

As we have recalled above when using a subgroup of GL(Vh) to discretize the diffeomorphismgroup its Lie algebra gh contains the subspace of discrete vector fields More precisely as linearmaps in gh sub L(Vh Vh) these discrete vector fields act as discrete derivations on Vh Once avector space Vh is selected it is thus natural to choose these discrete vector fields as distributionaldirectional derivatives In this section we recall this definition study its properties and show thatthese derivations are isomorphic to a Raviart-Thomas finite element space

Let Ω be as before the domain of the fluid assumed to be bounded with smooth boundary Weconsider the Hilbert spaces

H(divΩ) = u isin L2(Ω)n | div u isin L2(Ω)H0(divΩ) = u isin H(divΩ) | u middot n|partΩ = 0H(divΩ) = u isin H(divΩ) | div u = 0 u middot n|partΩ = 0

31 Definition and properties

Let Th be a triangulation of Ω having maximum element diameter h We assume that Th belongsto a shape-regular quasi-uniform family of triangulations of Ω parametrized by h That is thereexist positive constants C1 and C2 independent of h such that

maxKisinTh

hKρKle C1 and max

KisinTh

h

hKle C2

where hK and ρK denote the diameter and inradius of a simplex K For r ge 0 an integer weconsider the subspace of L2(Ω)

V rh = f isin L2(Ω) | f |K isin Pr(K) forallK isin Th (19)

where Pr(K) denotes the space of polynomials of degree le r on a simplex K

Definition 31 Given u isin H(divΩ) the distributional derivative in the direction u is thelinear map nabladist

u L2(Ω)rarr Cinfin0 (Ω)prime defined by

ˆΩ

(nabladistu f)g dx = minus

ˆΩf div(gu) dx forallg isin Cinfin0 (Ω) (20)

When a triangulation Th is fixed f isin V rh and u isin H0(divΩ)capLp(Ω)n p gt 2 the distributional

directional derivative (20) can be rewritten as

ˆΩ

(nabladistu f)g dx =

sumKisinTh

ˆK

(nablauf)g dxminussumKisinTh

ˆpartK

(u middot n)fgds

=sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKg ds

(21)

for all g isin Cinfin0 (Ω) Here nablauf = u middot nablaf denotes the derivative of f along u E0h denotes the set of

interior (nminus 1)-simplices in Th (edges in two dimensions) and JfK is defined by

JfK = f1n1 + f2n2 on e = K1 capK2 isin E0h

7

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 8: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

with fi = f |Ki n1 the normal vector to e pointing from K1 to K2 and similarly for n2

Note that there are some subtleties that arise when looking at traces on subsets of the boundaryif the trace is a distribution which explains why we need to take u isin H0(divΩ)capLp(Ω)n for somep gt 2 when passing to the second line in (21) The trace of a vector field u isin H(divK) on partK

satisfies u middot n isin Hminus12(partK) = H120 (partK)prime = H12(partK)prime but the trace of u on e sub partK satisfies

u middot n isin H1200 (e)prime where H

1200 (e) defined by

H1200 (e) = g isin H12(e) | the zero-extension of g to partK belongs to H12(partK) ( H

120 (e)

see eg [5] So for u isin H(divΩ) and smooth gacutepartK(umiddotn)g ds is always well-defined but

acutee(umiddotn)g ds

need not be some extra regularity for u is required to make it well-defined

Definition 32 Given A isin L(V rh V

rh ) and u isin H0(divΩ) cap Lp(Ω)n p gt 2 we say that A

approximates minusu in V rh

4 if whenever f isin L2(Ω) and fh isin V rh is a sequence satisfying f minus

fhL2(Ω) rarr 0 we have

〈Afh minusnabladistu f g〉 rarr 0 forallg isin Cinfin0 (Ω) (22)

In other words we require that A is a consistent approximation of nabladistu in V r

h

Note that the above definition abuses notation slightly we are really dealing with a sequenceof Arsquos parametrized by h

Proposition 31 Given u isin H0(divΩ)capLp(Ω)n and r ge 0 an integer a consistent approximationof nabladist

u in V rh is obtained by setting A = Au isin L(V r

h Vrh ) defined by

〈Auf g〉 =sumKisinTh

ˆK

(nablauf)g dxminussumeisinE0h

ˆeu middot JfKgds forallf g isin V r

h (23)

where g = 12(g1 + g2) on e = K1 capK2

Moreover if r ge 1 p = infin and A isin L(V rh V

rh ) is any other operator that approximates u in

V rh then A must be close to Au in the following sense if f isin L2(Ω) g isin Cinfin0 (Ω) and if fh gh isin V r

h

satisfy fh minus fL2(Ω) rarr 0 and hminus1g minus ghL2(Ω) +(sum

KisinTh |g minus gh|2H1(K)

)12rarr 0 then

〈(AminusAu)fh gh〉 rarr 0

provided that AfhL2(Ω) le C(u f)hminus1 for some constant C(u f)

As we will see in sect33 for r = 0 the definition of Au in (23) recovers the one used in [3] There adifferent definition of ldquoA approximates minusurdquo than (22) was considered for the particular case r = 0When this definition is used analogous statements of both parts of Proposition 31 hold for r = 0under an additional assumption of the family of meshes [3 Lemma 22]

Proof The operator Au is a consistent approximation of nabladistu since for all g isin Cinfin0 (Ω)

〈Aufh minusnabladistu f g〉 = 〈nabladist

u (fh minus f) g〉

= minusˆ

Ω(fh minus f) div(gu)dx

le fh minus fL2(Ω)u middot nablag + g div uL2(Ω) rarr 0

4The fact that A approximates minusu and not u is consistent with the fact that f 7rarr Af is a left Lie algebra actionwhereas the derivative f 7rarr nablauf is a right Lie algebra action

8

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 9: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

For the second part we note that

〈Afh gh〉 minus 〈Aufh gh〉 = 〈Afh minusAufh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u fh g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉= 〈Afh minusnabladist

u f g〉+ 〈nabladistu (f minus fh) g〉+ 〈Afh gh minus g〉 minus 〈Aufh gh minus g〉

le |〈Afh minusnabladistu f g〉|+ f minus fhL2(Ω)div(ug)L2(Ω)

+ AfhL2(Ω)gh minus gL2(Ω) + |〈Aufh gh minus g〉|

By assumption the first three terms above tend to zero as hrarr 0 The last term satisfies

〈Aufh gh minus g〉 = 〈Aufh gh〉 minus 〈nabladistu fh g〉

=sumKisinTh

ˆK

(nablaufh)(gh minus g) dxminussumeisinE0h

ˆeu middot JfhKgh minus gds

since g = g on each e isin E0h To analyze these integrals we make use of the inverse estimate [10]

fhH1(K) le Chminus1K fhL2(K) forallfh isin V r

h forallK isin Th

and the trace inequality [1]

fL2(partK) le C(hminus12K fL2(K) + h

12K |f |H1(K)

) forallf isin H1(K) forallK isin Th

Using the inverse estimate we see that∣∣∣∣ˆK

(nablaufh)(gh minus g) dx

∣∣∣∣ le uLinfin(Ω)|fh|H1(K)gh minus gL2(K)

le Chminus1K uLinfin(Ω)fhL2(K)gh minus gL2(K)

Using the trace inequality and the inverse estimate we see also that∣∣∣∣ˆeu middot JfhKgh minus g ds

∣∣∣∣le 1

2uLinfin(Ω)

(fh1L2(e) + fh2L2(e)

) (gh1 minus g1L2(e) + gh2 minus g2L2(e)

)le CuLinfin(Ω)

(hminus12K1fhL2(K1) + h

minus12K2fhL2(K2)

)times(hminus12K1gh minus gL2(K1) + h

12K1|gh minus g|H1(K1) + h

minus12K2gh minus gL2(K2) + h

12K2|gh minus g|H1(K2)

)

where K1K2 isin Th are such that e = K1 capK2 fhi = fh|Ki ghi = gh|Ki

and gi = g|Ki Summing

over all K isin Th and all e isin E0h and using the quasi-uniformity of Th we get

|〈Aufh gh minus g〉| le CuLinfin(Ω)fhL2(Ω)

(hminus1gh minus gL2(Ω) +

( sumKisinTh

|g minus gh|2H1(K)

)12)rarr 0

Note that formula (23) for Au is obtained from formula (21) valid for f isin V rh and g isin Cinfin0 (Ω)

by rewriting it for the case where g isin V rh and choosing to replace g rarr g in the second term in

(21)

9

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 10: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

Proposition 32 For all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

Au1 = 0 and 〈Auf g〉+ 〈fAug〉+ 〈f (div u)g〉 = 0 forallf g isin V rh (24)

Hence if u isin H(divΩ) then

Au1 = 0 and 〈Auf g〉+ 〈fAug〉 = 0 forallf g isin V rh (25)

Proof The first property Au1 = 0 follows trivially from the expression (23) since nablau1 = 0 andJ1K = 0 We now prove the second equality Using (23) we compute

〈Auf g〉+ 〈fAug〉

=sumKisinTh

ˆK

((nablauf)g + (nablaug)f) dxminussumeisinE0h

ˆeu middot JfKg dsminus

sumeisinE0h

ˆeu middot JgKf ds

=sumKisinTh

ˆK

(div(fgu)minus fg div u) dxminussumeisinE0h

ˆeu middot (JgKf+ JfKg) ds

= minussumKisinTh

ˆKfg div udx+

sumKisinTh

sumeisinK

ˆefKe g

Ke u middot nKe ds

minussumeisinE0h

ˆeu middot(

(sumK3e

gKe nKe )

1

2

sumK3e

fKe + (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

= minussumKisinTh

ˆKfg div udx

+sumeisinE0h

ˆeu middot(sumK3e

fKe gKe n

Ke minus (

sumK3e

gKe nKe )

1

2

sumK3e

fKe minus (sumK3e

fKe nKe )

1

2

sumK3e

gKe

)ds

where the sumsum

K3e is just the sum over the two simplices neighboring e We have denoted bynKe the unit normal vector to e pointing outside K and by fKe g

Ke the values of f |K and g|K on

the hyperface e Now for each e isin E0h and denoting simply by 1 and 2 the simplices K1K2 with

K1 capK2 = e the last term in parenthesis can be written as

f1e g

1en

1e + f2

e g2en

2e minus (g1

en1e + g2

en2e)

1

2(f1e + f2

e )minus (f1e n

1e + f2

e n2e)

1

2(g1e + g2

e)

= 0 +1

2

(g1en

1ef

2e + g2

en2ef

1e + f1

e n1eg

2e + f2

e n2eg

1e

)= 0

since n2e = minusn1

e

From the previous result we get a well-defined linear map

A H0(divΩ) cap Lp(Ω)n rarr grh sub L(V rh V

rh ) u 7rarr A(u) = Au p gt 2 (26)

with values in the Lie algebra grh = A isin L(V rh V

rh ) | A1 = 0 of Gh In the divergence free case

it restricts toA H(divΩ) cap Lp(Ω)n rarr grh sub L(V r

h Vrh )

with grh = A isin L(V rh V

rh ) | A1 = 0 〈Af g〉+ 〈fAg〉 = 0 forallf g isin V r

h the Lie algebra of Gh see(7)

10

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 11: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

32 Relation with Raviart-Thomas finite element spaces

Definition 33 For r ge 0 an integer we define the subspace Srh sub grh sub L(V rh V

rh ) as

Srh = ImA = Au isin L(V rh V

rh ) | u isin H0(divΩ)

Proposition 33 Let r ge 0 be an integer The space Srh sub grh is isomorphic to the Raviart-Thomasspace of order 2r

RT2r(Th) = u isin H0(divΩ) | u|K isin (P2r(K))n + xP2r(K) forallK isin Th

An isomorphism is given by u isin RT2r(Th) 7rarr Au isin SrhIts inverse is given by

A isin Srh 7rarr u =sumKisinTh

sumα

φαKsumj

〈AfαjK gαjK 〉+sumeisinE0h

sumβ

φβesumj

〈Afβje gβje 〉 isin RT2r(Th) (27)

In this formula

bull (fαjK gαjK ) (fβje gβje ) isin V rh times V r

h are such that the images ofsum

j(fαjK gαjK ) isin V r

h otimes V rh andsum

j(fβje gβje ) isin V r

h otimes V rh under the map

V rh otimes V r

h rarr RT2r(Th)lowast f otimes g 7minusrarrsumKisinTh

(nablaf g)|K +sumeisinTh

JfKege (28)

are (pαK 0) and (0 pβe ) respectively which is a basis of the dual space RT2r(Th)lowast adapted tothe decomposition

RT2r(Th)lowast =sumK

P2rminus1(K)n oplussumeisinK

P2r(e)

bull φαK φβe is a basis of RT2r(Th) dual to the basis pαK and pβe of RT2r(Th)lowast

Proof Let us consider the linear map A H0(divΩ)rarr L(V rh V

rh ) defined in (26) From a general

result of linear algebra we have dim(ImA) = dim(ImAlowast) where Alowast L(V rh V

rh )lowast rarr H0(divΩ)lowast is

the adjoint to A We have

ImAlowast =

Nsumi=1

ciσfigi isin H0(divΩ)lowast∣∣∣ N isin N fi gi isin V r

h ci isin R i = 1 2 N

where the linear form σfg = Alowast(f otimes g) H0(divΩ)rarr R is given by σfg(u) = 〈fAug〉Now the space ImAlowast is spanned by functionals of the form

u 7rarrˆe(u middot n)pq ds p q isin Pr(e) e isin E0

h (29)

and

u 7rarrˆK

(u middot nablaq)p dx p q isin Pr(K) K isin Th (30)

This can be seen by choosing appropriate f and g in σfg and using the definition (23) of Au Indeedif we choose two adjacent simplices K1 and K2 and set f |K1

= p isin Pr(K1) g|K2= minus2q isin Pr(K2)

f |ΩK1= 0 and g|ΩK2

= 0 we get 〈Auf g〉 =acutee(u middot n)pq ds with e = K1 capK2 Likewise if we

11

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 12: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

choose a simplex K and set f |K = q isin Pr(K) g|K = p isin Pr(K) and f |ΩK = g|ΩK = 0 we get

〈Auf g〉 =acuteK(u middot nablaq)p dx + 1

2

acutepartK(u middot n)pq ds Taking appropriate linear combinations yields the

functionals (29-30)Now observe that the functionals (29-30) span the same space (see Lemmas C1 and C2 in

Appendix C) as the functionals

u 7rarrˆe(u middot n)pds p isin P2r(e) e isin E0

h

and

u 7rarrˆKu middot pdx p isin P2rminus1(K)n K isin Th

These functionals are well-known [8] they are a basis for the dual of

RT2r(Th) = u isin H(divΩ) | u middot n|partΩ = 0 u|K isin (P2r(K))n + xP2r(K) forallK isin Th

often referred to as the ldquodegrees of freedomrdquo for RT2r(Th)We thus have proven that ImAlowast is isomorphic to RT2r(Th)lowast and hence Srh = ImA is isomorphic

to RT2r(Th) all these spaces having the same dimensions Now let us consider the linear mapu isin RT2r(Th)rarr A(u) = Au isin Srh Since its kernel is zero the map is an isomorphism

Consider now a basis pαK pβe of the dual space RT2r(Th)lowast identified withsum

KisinTh P2rminus1(K)n oplussumeisinTh P2r(e) ie the collection pαK is a basis of

sumKisinEh P2rminus1(K)n and the collection pβe is a

basis ofsum

eisinTh P2r(e) There is a dual basis φαK φβe of RT2r(Th) such that

〈(pαK 0)φαprimeKprime〉 = δααprimeδKKprime 〈(pαK 0)φβe 〉 = 0

〈(0 pβe )φβprime

eprime 〉 = δββprimeδeeprime 〈(0 pβe )φαK〉 = 0

where

〈(p p) u〉 =sumK

ˆKu middot p dx+

sume

ˆe(u middot n)pds

is the duality pairing between RT2r(Th)lowast and RT2r(Th)

Choosing fαjK gαjK isin V rh and fβje gβje isin V r

h such thatsumj

nablafαjK gαjK |Kprime = pαKδKKprime sumj

JfαjK KegαjK e = 0

sumj

nablafβje gβje |K = 0sumj

Jfβje Keprimegβje eprime = pβe δeeprime

we have that sumj

〈AufαjK gαjK 〉 andsumj

〈Aufβje gβje 〉

are exactly the degrees of freedom of u relative to the basis pαK pβe Therefore u is expressed as

u =sumK

sumα

φαKsumj

〈AufαjK gαjK 〉+sumeisinK

sumβ

φβesumj

〈Aufβje gβje 〉

as desired

12

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 13: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

Note that the map (28) with V rh otimes V r

h identified with L(V lowasth Vrh ) can be identified with the

composition Ilowast Alowast where Ilowast is the dual map to the inclusion I RT2r(Th) rarr H0(divΩ) Thismap is surjective from the preceding result

Proposition 34 The kernel of the map u isin H0(divΩ) cap Lp(Ω)n 7rarr A(u) = Au isin L(V rh V

rh )

p gt 2 iskerA = u isin H0(divΩ) cap Lp(Ω) | Π2r(u) = 0 = ker Π2r

where Π2r H0(divΩ)capLp(Ω)n rarr RT2r(Th) is the global interpolation operator defined by Π2r(v)|K =ΠK

2r(v|K) with ΠK2r H(divK) cap Lp(K)n rarr RT2r(K) defined by the two conditions

ˆe

((uminusΠK

2ru) middot n)p ds = 0 for all p isin P2r(e) for all e isin K

and ˆK

(uminusΠK2ru) middot p dx = 0 for all p isin P2rminus1(K)n

Proof For u isin H0(divΩ) cap Lp(Ω)n we have Au = 0 if and only if 〈Auf g〉 = 0 for all f g isin V rh

As we just commented above the map (28) is surjective hence from (23) we see that 〈Auf g〉 = 0for all f g isin V r

h holds if and only if

ˆe(u middot n)p ds = 0 for all p isin P2r(e) e isin E0

h

and ˆKu middot p dx = 0 for all p isin P2rminus1(K)n K isin Th

This holds if and only if Π2r(u) = 0

In particular for u isin H0(divΩ) cap Lp(Ω) p gt 2 there exists a unique u isin RT2r(Th) such thatAu = Au It is given by u = Π2r(u)

33 The lowest-order setting

We now investigate the setting in which r = 0 in order to connect with the previous works [19] and[3] for both the incompressible and compressible cases Enumerate the elements of Th arbitrarilyfrom 1 to N and let ψii be the orthogonal basis for V 0

h given by

ψi(x) =

1 if x isin Ki

0 otherwise

where Ki isin Th denotes the ith element of Th Relative to this basis for A isin g0h sub L(V 0

h V0h ) we

have

A( Nsumj=1

fjψj

)=

Nsumi=1

( Nsumj=1

Aijfj

)ψi forallf =

Nsumj=1

fjψj isin Vh

where

Aij =〈ψi Aψj〉〈ψi ψi〉

=1

|Ki|〈ψi Aψj〉 (31)

13

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 14: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

In what follows we will abuse notation by writing A for both the operator A isin g0h and the

matrix A isin RNtimesN with entries (31) It is immediate from (8) that

g0h =

A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0 foralli and ATΘ + ΘA = 0 g0

h =A isin RNtimesN

∣∣∣ Nsumj=1

Aij = 0

where Θ is a diagonal N timesN matrix with diagonal entries Θii = |Ki| These are the Lie algebrasused in [19] and [3]

The next lemma determines the subspace S0h = ImA in the case r = 0 We write j isin N(i) to

indicate that j 6= i and Ki capKj is a shared (nminus 1)-dimensional simplex

Lemma 35 If A = Au for some u isin H0(divΩ) cap Lp(Ω)n p gt 2 then for each i

Aij = minus 1

2|Ki|

ˆKicapKj

u middot n ds j isin N(i)

Aii =1

2|Ki|

ˆKi

div u dx

(32)

and Aij = 0 for all other j

Proof Let j isin N(i) and consider the expression (23) with f = ψj and g = ψi All terms vanishexcept one giving

〈Aψj ψi〉 = minusˆKicapKj

u middot JψjKψi ds

= minus1

2

ˆKicapKj

u middot n ds

Now consider the case in which i = j Let E0(Ki) denote the set of (n minus 1)-simplices that are onthe boundary of Ki but in the interior of Ω Since u middot n = 0 on partΩ

〈Aψi ψi〉 = minussum

eisinE0(Ki)

ˆeu middot JψiKψi ds

=

ˆpartKi

u middot n1

2ds

=1

2

ˆKi

div udx

The expressions in (32) follow from (31) Finally if j 6= i and j isin N(i) then all terms in (23)vanish when f = ψj and g = ψi

Remark 31 The expressions in (32) recover the relations between Lie algebra elements and vectorfields used in [19] and [3] In particular in the incompressible case using also (25) in Proposition32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i)

which is the nonholonomic constraint used in [19] Similarly in the compressible case using (24)in Proposition 32 we have

ImA =A isin g0

h | Aij = 0 forallj isin N(i) ATΘ + ΘA is diagonal

14

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 15: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

which is the nonholonomic constraint used in [3] By Proposition 33 we have ImA RT2r(Th) =RT0(Th) in the compressible case This is reflected in (32) every off-diagonal entry of A isin ImAcorresponds to a degree of freedom

acutee(u middot n)ds e isin E0

h for RT0(Th) (and every diagonal entry of Ais a linear combination thereof)

4 The Lie algebra-to-vector fields map

In this section we define a Lie algebra-to-vector fields map that associates to a matrix A isin L(V rh V

rh )

a vector field on Ω Such a map is needed to define in a general way the semidiscrete Lagrangianassociated to a given continuous Lagrangian

Since any A isin Srh is associated to a unique vector field u isin RT2r(Th) one could think that thecorrespondence A isin Shr rarr u isin RT2r(Th) can be used as a Lie algebra-to-vector fields map Howeveras explained in detail in Appendix B the Lagrangian must be defined on a larger space than theconstraint space Srh namely at least on Srh + [Srh S

rh] This is why such a Lie algebra-to-vector

fields map is needed

Definition 41 For r ge 0 an integer we consider the Lie algebra-to-vector field map L(V rh V

rh )rarr

[V rh ]n defined by

A =

nsumk=1

A(Irh(xk))ek (33)

where Irh L2(Ω) rarr V rh is the L2-orthogonal projector onto V r

h xk Ω rarr R are the coordinatemaps and ek the canonical basis for Rn

The idea leading to the definition (33) is the following On one hand the component uk of ageneral vector field u =

sumk u

kek can be understood as the derivative of the coordinate functionxk in the direction u ie uk = nablauxk On the other hand from the definition of the discretediffeomorphism group the linear map f 7rarr Af for f isin V r

h is understood as a derivation hence (33)is a natural candidate for a Lie algebra-to-vector field map We shall study its properties belowafter describing in more detail in the next lemma the expression (33) for r = 0

Lemma 41 For r = 0 and A isin g0h sub L(V 0

h V0h ) A is the vector field constant on each simplex

given on simplex Ki by

A|Ki =sumj

(bj minus bi)Aij (34)

where bi = 1|Ki|acuteKix dx denotes the barycenter of Ki

Proof The L2-projection of the coordinate function xk onto Vh is given by

I0h(xk) =

sumj

ψj1

|Kj |

ˆKj

xk =sumj

ψj(bj)k

where (bj)k denotes the kth component of bj Hence

A =

nsumk=1

(A(Ihxk))ek =

nsumk=1

sumj

(bj)kekAψj =sumj

bjAψj

=sumj

bjsumi

Aijψi =sumi

ψisumj

bjAij =sumi

ψisumj

(bj minus bi)Aij

where the last equality follows from the fact thatsum

j Aij = 0 for every i

15

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 16: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

Proposition 42 For u isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 0 we consider Au isin L(V rh V

rh )

defined in (23)

bull If r ge 1 then for all u isin H0(divΩ) cap Lp(Ω) p gt 2 we have

(Au)k = Irh(uk) k = 1 n

In particular if u is such that u|K isin Pr(K)n for all K then Au = u

bull If r = 0 then

Au|K =1

2|K|sumeisinK

ˆeu middot neminus(be+ minus beminus)ds

where neminus is the normal vector field pointing from Kminus to K+ and beplusmn are the barycenters ofKplusmn In particular if u isin RT0(Th) then

Au|K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

More particularly if u isin RT0(Th) and the triangles are regular

Au = u

As a consequence we also note that for r ge 1 and u isin H0(divΩ) cap Lp(Ω) p gt 2

Au = u hArr u|K isin Pr(K)n forallK

Proof When r ge 1 we have Irh(xk) = xk hence Au(x) =sumn

k=1(Auxk)(x)ek We compute Aux

k isinV rh as follows for all g isin V r

h we have

〈Auxk g〉 =sumKisinTh

ˆK

(nablaxk middot u)gdxminussumeisinE0h

ˆeu middot JxkKegeds =

ˆΩukgdx

Since this is true for all g isin V rh and since Aux

k must belong to V rh we have

(Au)k = Auxk = Irh(uk)

as desiredWhen r = 0 we have I0

h(f)|Ki = 1|Ki|acuteKif(x)dx hence I0

h(xk)|Ki = (bi)k We compute

AuI0h(xk) isin V 0

h as follows for all g isin V 0h we have

〈AuI0h(xk) g〉 =

sumKiisinTh

ˆKi

(nabla(bi)k middot u)gdxminus

sumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)geds

= 0minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

) 1

2(ge+ + geminus)ds

= minussumeisinE0h

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

(1

2|Ke+ |

ˆKe+

gdx+1

2|Keminus |

ˆKeminus

gdx

)

= minussumK

sumeisinK

ˆeu middot(bke+ne+ + bkeminusneminus

)ds

1

2|K|

ˆKgdx

16

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 17: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

hence we get

AuI0h(xk)|K =

1

2|K|sumeisinK

ˆeu middot neminus

(bke+ minus b

keminus

)ds

from which the result follows This result can be also obtained by combining the results of Propo-sition 35 and Lemma 41

In 2D for the case of a regular triangle we have be+ minus beminus = neminus23H where H is the height

and |K| = 12 |e|H so we get

Au|K =1

2|K|2

3HsumeisinK|e|(u middot neminus)neminus =

2

3

sumeisinK

(u middot neminus)neminus = u

Similar computations hold in 3D

Proposition 43 For all u v isin H0(divΩ) cap Lp(Ω) p gt 2 and r ge 1 we have

〈 [Au Av]k g〉 =

sumK

ˆK

(nablavk middot uminusnablauk middot v)gdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

for k = 1 n for all g isin V rh where uk = Irh(uk) isin V r

h and vk = Irh(vk) isin V rh The convention is

such that if n is pointing from Kminus to K+ then [vk] = vkminus minus vk+So in particular if u|K v|K isin Pr(K) then

〈 [Au Av]k g〉 =

sumK

ˆK

[u v]kgdxminussumeisinE0h

ˆe

(u middot n[vk]minus v middot n[uk]

)gds

If u v w isin H0(divΩ) cap Lp(Ω) p gt 2 and u|K v|K w|K isin Pr(K) we have

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot [utimes v]ds

For r = 0 and u v isin H0(divΩ) cap Lp(Ω) p gt 2 such that u|K v|K isin P0(K) then [Au Av] isin[V 0h ]n is the vector field constant on each simplex K given on K by

[Au Av]|K =1

2|K|sumeisinK|e|(u middot neminus(c[v]e+ minus c[v]eminus)minus v middot neminus(c[u]e+ minus c[u]eminus)

)

where c[u] isin [V 0h ]n is the vector field constant on each simplex K given on K by

c[u]K =1

2|K|sumeisinK|e|u middot neminus(be+ minus beminus)

similarly for c[v] isin [V 0h ]n

17

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 18: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

Proof We note that from Proposition 42

[Au Av]k

= Au(Avxk)minusAv(Auxk) = AuI

rh(vk)minusAvIrh(uk) = Auv

k minusAvuk

for all u v isin H0(divΩ) cap Lp(Ω) p gt 2 Then using (23) we have for all g isin V rh

〈Auvk g〉 =sumK

ˆK

(nablavk middot u)gdxminussumeisinE0h

ˆeu middot JvkKgds

similarly for 〈Avuk g〉 from which we get the first formula

The second formula follows when u|K v|K isin Pr(K) since in this case u = u v = v

For the third formula we choose g = Awk

= wk in the first formula and sum over k = 1 n toget

ˆΩ

[Au Av] middot Aw dx =

nsumk=1

〈 [Au Av]k Aw

k〉

=sumK

ˆK

(nablav middot uminusnablau middot v) middot w dx

minussumeisinE0h

ˆe

(u middot n [v]minus v middot n [u]

)middot wds

So far we only used u v w isin H0(divΩ)capLp(Ω) p gt 2 Now we assume further that u|K v|K w|K isinPr(K) for all K so we have u = u v = v w = w u middotn = u middotn v middotn = v middotn [v] middotn = [u] middotn = 0Using some vector calculus identities for the last term we get

ˆΩ

[Au Av] middot Aw dx =sumK

ˆK

[u v] middot w dxminussumeisinE0h

ˆe(ntimes w) middot (u times [v] + [u]times v)ds

which yields the desired formula since [utimes v] = u times [v] + [u]times v

5 Finite element variational integrator

In this section we derive the variational discretization for compressible fluids by using the settingdeveloped so far We focus on the case in which the Lagrangian depends only on the velocity andthe mass density since the extension to a dependence on the entropy density is straightforwardsee sect6 and Appendix A

51 Semidiscrete Euler-Poincare equations

Given a continuous Lagrangian `(u ρ) expressed in terms of the Eulerian velocity u and massdensity ρ the associated discrete Lagrangian `d grh times V r

h rarr R is defined with the help of the Liealgebra-to-vector fields map as

`d(AD) = `(AD) (35)

where D isin V rh is the discrete density Exactly as in the continuous case the right action of Grh on

discrete densities is defined by duality as

〈D middot q E〉 = 〈D qE〉 forallE isin V rh (36)

18

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 19: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

The corresponding action of grh on D is given by

〈D middotBE〉 = 〈DBE〉 forallE isin V rh (37)

The semidiscrete equations are derived by mimicking the variational formulation of the contin-uous equations namely by using the Euler-Poincare principle applied to `d As we have explainedearlier only the Lie algebra elements in ImA = Srh actually represent a discretization of continuousvector fields Following the approach initiated [19] this condition is included in the Euler-Poincareprinciple by imposing Srh as a nonholonomic constraint and hence applying the Euler-Poincare-drsquoAlembert recalled in Appendix B As we will see later one needs to further restrict the constraintSrh to a subspace ∆R

h sub Srh

For a given constraint ∆Rh sub grh a given Lagrangian `d and a given duality pairing 〈〈KA〉〉

between elements K isin (grh)lowast and A isin grh the Euler-Poincare-drsquoAlembert principle seeks A(t) isin ∆Rh

and D(t) isin V rh such that

δ

ˆ T

0`d(AD)dt = 0 for δA = parttB + [BA] and δD = minusD middotB

for all B(t) isin ∆Rh with B(0) = B(T ) = 0 The expressions for δA and δB are deduced from the

relations A(t) = q(t)q(t)minus1 and D(t) = D0 middot q(t)minus1 with D0 the initial value of the density as inthe continuous case

The critical condition associated to this principle islanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (38)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD isin (∆R

h ) forallt isin (0 T ) (39)

The differential equation for D follows from differentiating D(t) = D0 middot q(t)minus1 to obtain parttD =minusD middotA or equivalently

〈parttDE〉+ 〈DAE〉 = 0 forallt isin (0 T ) forall E isin V rh (40)

We refer to Appendix B for more details and the explanation of the notations The extension of (38)and (39) to the case when the Lagrangian depends also on the entropy density is straightforwardbut important see sect6

As explained in Appendix B a sufficient condition for (38) to be a solvable system for T smallenough is that the map

A isin ∆Rh rarr

δ`dδA

(AD) isin (grh)lowast(∆Rh ) (41)

is a diffeomorphism for all D isin V rh strictly positive

52 The compressible fluid

We now focus on the compressible barotropic fluid whose continuous Lagrangian is given in (14)Following (35) we have the discrete Lagrangian

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 minusDe(D)

]dx (42)

19

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 20: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

In order to check condition (41) we shall compute the functional derivative δ`dδA We havelanglangδ`d

δA δA

rangrang=

ˆΩDA middot δAdx =

ˆΩIrh(DA) middot δAdx =

langlangIrh(DA)[ δA

rangrangwhere we defined the linear map [ ([V r

h ]n)lowast = [V rh ]n rarr (grh)lowast as the dual map to grh rarr [V r

h ]nnamely

〈〈α[ A〉〉 = 〈α A〉 forallα isin [V rh ]n A isin grh

We thus get δ`dδA = Irh(DA)[ and note that the choice ∆R

h = Srh is not appropriate since the linear

map A isin Srh 7rarr Irh(DA)[ isin (grh)lowast(Srh) is not an isomorphism We thus need to restrict theconstraint Srh to a subspace ∆R

h sub Srh such that

A isin ∆Rh 7rarr Irh(DA)[ isin (grh)lowast(∆R

h ) (43)

becomes an isomorphism for all D isin V rh strictly positive We shall denote by Rh the subspace of

RT2r(Th) corresponding to ∆Rh via the isomorphism u isin RT2r(Th) 7rarr Au isin Srh shown in Proposition

33 The diagram below illustrates the situation that we consider

H0(divΩ)12

A Srh12 grh

[V rh ]n

RT2r(Th)12

OO

yy

99

∆Rh

12

OO

Rh12

OO

yy

99

The kernel of (43) is computed as

A isin ∆Rh | Irh(DA)[ isin (∆R

h ) = A isin ∆Rh | 〈〈Irh(DA)[ B〉〉 = 0 forallB isin ∆R

h

= A isin ∆Rh | 〈Irh(DA) B〉 = 0 forallB isin ∆R

h = Au isin ∆R

h | 〈Irh(DIrh(u)) Irh(v)〉 = 0 forallv isin Rh= Au isin ∆R

h | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh

We note that since AB isin ∆Rh sub Srh we have A = Au and B = Bv for unique u v isin Rh sub RT2r(Th)

by Proposition 33 so the kernel is isomorphic to the space

u isin Rh | 〈DIrh(u) Irh(v)〉 = 0 forallv isin Rh (44)

This space is zero if and only if Rh is a subspace of [V rh ]n capH0(divΩ) = BDMr(Th) the Brezzi-

Douglas-Marini finite element space of order r Indeed in this case the space (44) can be rewrittenas

u isin Rh | 〈Du v〉 = 0 forallv isin Rh = 0

since D is strictly positive (it suffices to take v = u) Conversely if there exists a nonzero w isinRh BDMr(Th) then u = w minus Irh(w) 6= 0 satisfies Irh(u) = 0 showing that (44) is nonzero

Using the expressions of the functional derivatives

δ`dδA

= Irh(DA)[δ`dδD

= Irh

(1

2|A|2 minus e(D)minusD parte

partD

)

20

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 21: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

of (42) the Euler-Poincare equations (38) are equivalent tolangpartt(DA) B

rang+langDA [AB]

rang+langIrh

(1

2|A|2minus e(D)minusD parte

partD

) D middotB

rang= 0 forallt isin (0 T ) forall B isin ∆R

h

(45)To relate (45) and (66) to more traditional finite element notation let us denote ρh = D

uh = minusA and σh = E and vh = minusB Then using Proposition 43 the identities Auh = minusAand Avh = minusB and the definition (23) of Au we see that (45) and (66) are equivalent to seekinguh isin Rh and ρh isin V r

h such that

〈partt(ρhuh) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (46)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (47)

where wh = Irh(ρhuh) fh = Irh

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and

ah(w u v) =sumKisinTh

ˆKw middot (v middot nablauminus u middot nablav) dx+

sumeisinE0h

ˆe(v middot n[u]minus u middot n[v]) middot w ds

bh(w f g) =sumKisinTh

ˆK

(w middot nablaf)g dxminussumeisinE0h

w middot JfKg ds

Remark 51 The above calculations carry over also to the setting in which the density is taken tobe an element of V s

h sub V rh s lt r In this setting (47) must hold for every σh isin V s

h the definition

of fh becomes fh = Ish

(12 |uh|

2 minus e(ρh)minus ρh partepartρh

) and the definition of wh remains unchanged By

fixing s and Rh we may then take r large enough so that Irh(ρhuh) = ρhuh

Extension to rotating fluids For the purpose of application in geophysical fluid dynamics weconsider the case of a rotating fluid with angular velocity ω in a gravitational field with potentialΦ(x) The equations of motion are obtained by taking the Lagrangian

`(u ρ) =

ˆΩ

[1

2ρ|u|2 + ρR middot uminus ρe(ρ)minus ρΦ

]dx

where the vector field R is half the vector potential of ω ie 2ω = curlR Application of theEuler-Poincare principle (15) yields the balance of fluid momentum

ρ(parttu+ u middot nablau+ 2ω times u) = minusρnablaΦminusnablap with p = ρ2 parte

partρ (48)

The discrete Lagrangian is defined exactly as in (35) and reads

`d(AD) = `(AD) =

ˆΩ

[1

2D|A|2 +DA middotRminusDe(D)minusDΦ

]dx (49)

We get δ`dδA = Irh(DA)[ + Ih(DR)[ and the same reasoning as before shows that the affine map

A isin ∆Rh rarr

δ`dδAisin (grh)lowast(∆R

h ) (50)

is a diffeomorphism for all D isin V rh strictly positive The Euler-Poincare equations (38) now yieldlang

partt(D(A+R)

) Brang

+langD(A+R) [AB]

rang+langIrh

(1

2|A|2+AmiddotRminuse(D)minusD parte

partDminusΦ) DmiddotB

rang= 0 forallB isin ∆R

h

(51)

21

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 22: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

which in traditional finite element notations is

〈partt(ρhuh + ρhR) vh〉+ ah(wh uh vh)minus bh(vh fh ρh) = 0 forallvh isin Rh (52)

〈parttρh σh〉 minus bh(uh σh ρh) = 0 forallσh isin V rh (53)

where wh = Irh(ρhuh + ρhR) fh = Irh

(12 |uh|

2 + uh middotRminus e(ρh)minus ρh partepartρhminus Φ

) and ah bh defined as

before

Lowest-order setting As a consequence of Remark 31 for r = 0 the Euler-Poincare equations(38) are identical to the discrete equations considered in [3] and in the incompressible case theycoincide with those of [19 11 9] The discrete Lagrangians used are however different For instanceby using the result of Lemma 41 for r = 0 the discrete Lagrangian (42) for A isin S0

h becomes

`(AD) =1

2

sumi

|Ki|Di

sumjkisinN(i)

M(i)jk AijAik minus

sumi

|Ki|Die(Di) (54)

where M(i)jk = (bj minus bi) middot (bk minus bi) This is similar but not identical to the reduced Lagrangian

used in eg [19] There each M (i) is replaced by a diagonal matrix with diagonal entries M(i)jj =

2|Ki||ci minus cj ||Ki capKj | where ci denotes the circumcenter of Ki

Variational time discretization The variational character of compressible fluid equations canbe exploited also at the temporal level by deriving the temporal scheme via a discretization intime of the Euler-Poincare variational principle in a similar way to what has been done in [11 9]for incompressible fluid models This discretization of the Euler-Poincare equation follows the onepresented in [6]

In this setting the relations A(t) = g(t)g(t)minus1 and D(t) = D0 middot g(t)minus1 are discretized as

Ak = τminus1(gk+1gminus1k )∆t and Dk = D0 middot gminus1

k (55)

where τ grh rarr Grh is a local diffeomorphism from a neighborhood of 0 isin grh to a neighborhood ofe isin Grh with τ(0) = e and τ(A)minus1 = τ(minusA) Given A isin grh we denote by dτA grh rarr grh the righttrivialized tangent map defined as

dτA(δA) = (Dτ(A) middot δA) τ(A)minus1 δA isin grh

We denote by dτminus1A grh rarr grh its inverse and by (dτminus1

A )lowast (grh)lowast rarr (grh)lowast the dual mapThe discrete Euler-Poincare-drsquoAlembert variational principle reads

δ

Kminus1sumk=0

`d(Ak Dk)∆t = 0

for variations

δAk =1

∆tdτminus1

∆tAk(Bk+1)minus 1

∆tdτminus1minus∆tAk

(Bk) δDk = minusDk middotBk

where Bk isin ∆Rh vanishes at the extremities These variations are obtained by taking the variations

of the relations (55) and defining Bk = δgkgminus1k It yields

1

∆t

langlang(dτminus1

∆tAkminus1

)lowast δ`dδAkminus1

minus(dτminus1minus∆tAk

)lowast δ`dδAk

Bk

rangrangminuslang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

22

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 23: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

From Dk = D0 middot gminus1k one gets

Dk+1 = Dk middot τ(minus∆tAk) (56)

Several choices are possible for the local diffeomorphism τ see eg [6] One option is theCayley transform

τ(A) =

(I minus A

2

)minus1(I +

A

2

)

We have τ(0) = I and since Dτ(0)δA = δA it is a local diffeomorphism We also note that A1 = 0implies τ(A)1 = 1 in a suitably small neighborhood of 0 We have

dτA(δA) =

(I minus A

2

)minus1

δA

(I +

A

2

)minus1

dτminus1A (B) = B +

1

2[BA]minus 1

4ABA

so the discrete Euler-Poincare equations readlanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAk

[Ak Bk]minus∆t

2AkBkAk

rangrang+

1

2

langlang δ`dδAkminus1

[Akminus1 Bk] +∆t

2Akminus1BkAkminus1

rangrang+lang δ`dδDk

Dk middotBkrang

= 0 forall Bk isin ∆Rh

This is the discrete time version of (38) The discrete time version of (39) can be similarly writtenWith this choice of τ the evolution Dk is obtained from (56) which is equivalent to

Dk middot (I +∆t

2Akminus1) = Dkminus1 middot (I minus

∆t

2Akminus1)

Recalling (37) we getlangDk minusDkminus1

∆t Ek

rang+

langDkminus1 +Dk

2 Akminus1Ek

rang= 0 forallEk isin V r

h

Energy preserving time discretization For Lagrangians of the form (49) it is possible toconstruct a time discretization that exactly preserves the energy

acuteΩ[1

2D|A|2 + De(D) + DΦ]dx

Note that the contribution of the rotation does not appear in the expression of the total energyTo do this let us define

Fkminus12 =1

2Akminus1 middot Ak + Akminus12 middotRminus f(Dkminus1 Dk)minus Φ (57)

where

f(x y) =ye(y)minus xe(x)

y minus x

Also let Akminus12 = 12(Akminus1 +Ak) and Dkminus12 = 1

2(Dkminus1 +Dk) The energy-preserving scheme readslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+ 〈Fkminus12 Dkminus12 middotBk〉 = 0 forall Bk isin ∆Rh (58)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (59)

23

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 24: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

Proposition 51 The solution of (58-59) satisfies

ˆΩ

[1

2Dk|Ak|2 +Dke(Dk) +DkΦ

]dx =

ˆΩ

[1

2Dkminus1|Akminus1|2 +Dkminus1e(Dkminus1) +Dkminus1Φ

]dx (60)

Proof Taking Bk = Akminus12 in (58) giveslanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Akminus12

rangrang+ 〈Fkminus12 Dkminus12 middotAkminus12〉 = 0

Using the density equation (59) and the definition (49) of `d we can rewrite this aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rangminuslangDk minusDkminus1

∆t Fkminus12

rang= 0 (61)

After rearrangement the first term can be expressed aslang 1

∆t

(Dk(Ak +R)minusDkminus1(Akminus1 +R)

) Akminus12

rang=

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t Akminus12 middotR+

1

2Akminus1 middot Ak

rang

Inserting this and the definition of Fkminus12 into (61) gives

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDk minusDkminus1

∆t f(Dkminus1 Dk) + Φ

rang= 0

Finally the definition of f yields

1

2∆t

(〈DkAk Ak〉 minus 〈Dkminus1Akminus1 Akminus1〉

)+

langDke(Dk)minusDkminus1e(Dkminus1) +DkΦminusDkminus1Φ

∆t 1

rang= 0

which is equivalent to (60)

Note that the definition of Fkminus12 in (57) can be rewritten in terms of `d as

`d(Ak Dk)minus `d(Akminus1 Dkminus1) =1

2

langlang δ`dδAkminus1

+δ`dδAk

Ak minusAkminus1

rangrang+ 〈Fkminus12 Dk minusDkminus1〉 (62)

This is reminiscent of a discrete gradient method [14 p 174] with Fkminus12 playing the role of the

discrete version of δ`δD

6 Numerical tests

Convergence To test our numerical method we used (52-53) to simulate a rotating fluid withangular velocity ω = 1 (ie R = (minusy x)) and internal energy e(ρ) = 1

2ρ in the absence of agravitational field This choice of the function e(ρ) corresponds to the case of the rotating shallowwater equations for which ρ is interpreted as the fluid depth We initialized u(x y 0) = (0 0) andρ(x y 0) = 2 + sin(πx2) sin(πy2) on Ω = (minus1 1) times (minus1 1) and numerically integrated (52-53)using the energy-preserving time discretization (58-59) with ∆t = 000625 We used the finiteelement spaces Rh = RTr(Th) and V r

h with r = 0 1 2 on a uniform triangulation Th of Ω withmaximum element diameter h = 2minusj j = 0 1 2 3 We computed the L2-errors in the velocity and

24

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 25: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

Figure 1 Contours of the mass density at t = 10 12 14 16 18 20 in the Rayleigh-Taylorinstability simulation

0 05 1 15 2

minus1

0

1

2

middot10minus14

t

E(t

)E

(0)minus

1

Figure 2 Relative errors in the energy E(t) =acute

Ω

(12ρ|u|

2 + ρe(ρ) + ρΦ)

dx during the Rayleigh-Taylor instability simulation

25

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 26: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

r hminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate1 358 middot 10minus1 210 middot 10minus1

0 2 184 middot 10minus1 096 117 middot 10minus1 0854 931 middot 10minus2 099 558 middot 10minus2 1068 464 middot 10minus2 100 274 middot 10minus2 1031 143 middot 10minus1 100 middot 10minus1

1 2 436 middot 10minus2 171 243 middot 10minus2 2054 137 middot 10minus2 168 685 middot 10minus3 1838 440 middot 10minus3 163 174 middot 10minus3 1971 278 middot 10minus2 183 middot 10minus2

2 2 780 middot 10minus3 183 461 middot 10minus3 1994 181 middot 10minus3 211 635 middot 10minus4 2868 450 middot 10minus4 200 115 middot 10minus4 246

Table 1 L2-errors in the velocity and density at time T = 05

∆tminus1 uh minus uL2(Ω) Rate ρh minus ρL2(Ω) Rate2 493 middot 10minus2 995 middot 10minus2

4 168 middot 10minus2 155 312 middot 10minus2 1678 503 middot 10minus3 174 892 middot 10minus3 18116 144 middot 10minus3 180 243 middot 10minus3 188

Table 2 Convergence with respect to ∆t of the L2-errors in the velocity and density at timeT = 05

density at time T = 05 by comparing with an ldquoexact solutionrdquo obtained with h = 2minus5 r = 2 Theresults in Table 1 indicate that the methodrsquos convergence order is optimal (order r+ 1) when r = 0and suboptimal when r gt 0 but still grows with r

We also repeated the above experiment with varying values of ∆t and with fixed values ofh = 2minus4 and r = 2 The results in Table 2 indicate that the method is second-order accurate withrespect to ∆t

Rayleigh-Taylor instability Next we simulated a Rayleigh-Taylor instability For this testwe considered a fully (or baroclinic) compressible fluid whose energy depends on both the massdensity ρ and the entropy density s both of which are advected parameters The setting is thesame as above but with a Lagrangian

`(u ρ s) =

ˆΩ

[1

2ρ|u|2 minus ρe(ρ η)minus ρΦ

]dx (63)

where η = sρ is the specific entropy In terms of the discrete velocity A isin ∆R

h discrete mass densityD isin V r

h and discrete entropy density S isin V rh the spatially discrete Euler-Poincare equations for

this Lagrangian readlanglangparttδ`dδA

Brangrang

+langlangδ`dδA

[AB]rangrang

+langδ`dδD

D middotBrang

+langδ`dδS

S middotBrang

= 0 forall t isin (0 T ) forall B isin ∆Rh (64)

or equivalently

parttδ`dδA

+ adlowastAδ`dδAminus δ`dδDD minus δ`d

δS S isin (∆R

h ) forallt isin (0 T ) (65)

together with

〈parttDE〉+ 〈DAE〉 = 0 and 〈parttSH〉+ 〈SAH〉 = 0 forallt isin (0 T ) forall EH isin V rh (66)

26

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 27: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

In analogy with (58-59) an energy-preserving time discretization is given bylanglang 1

∆t

(δ`dδAk

minus δ`dδAkminus1

) Bk

rangrang+

1

2

langlang δ`dδAkminus1

+δ`dδAk

[Akminus12 Bk]rangrang

+〈Fkminus12 Dkminus12 middotBk〉+ 〈Gkminus12 Skminus12 middotBk〉 = 0 forall Bk isin ∆Rh (67)lang

Dk minusDkminus1

∆t Ek

rang+ 〈Dkminus12 middotAkminus12 Ek〉 = 0 forallEk isin V r

h (68)langSk minus Skminus1

∆tHk

rang+ 〈Skminus12 middotAkminus12 Hk〉 = 0 forallHk isin V r

h (69)

where Akminus12 = 12(Akminus1 +Ak) Dkminus12 = 1

2(Dkminus1 +Dk) Skminus12 = 12(Skminus1 + Sk)

Fkminus12 =1

2Akminus1 middot Ak minus

1

2(f(Dkminus1 Dk Skminus1) + f(Dkminus1 Dk Sk))minus Φ (70)

Gkminus12 = minus1

2(g(Skminus1 Sk Dkminus1) + g(Skminus1 Sk Dk)) (71)

and

f(DDprime S) =Dprimee(Dprime SDprime)minusDe(DSD)

Dprime minusD

g(S Sprime D) =De(DSprimeD)minusDe(DSD)

Sprime minus S

We took e equal to the internal energy for a perfect gas

e(ρ η) = KeηCvργminus1

where γ = 53 and K = Cv = 1 and we used a graviational potential Φ = minusy which correspondsto an upward gravitational force We initialized

ρ(x y 0) = 15minus 05 tanh

(y minus 05

002

)

u(x y 0) =

(0minus0025

radicγp(x y)

ρ(x y 0)cos(8πx) exp

(minus(y minus 05)2

009

))

s(x y 0) = Cvρ(x y 0) log

(p(x y)

(γ minus 1)Kρ(x y 0)γ

)

where

p(x y) = 15y + 125 + (025minus 05y) tanh

(y minus 05

002

)

We implemented (67-69) with ∆t = 001 and with the finite element spaces Rh = RT0(Th) and V 1h

on a uniform triangulation Th of Ω = (0 14)times(0 1) with maximum element diameter h = 2minus8 Weincorporated upwinding into (67-69) using the strategy detailed in [12] which retains the schemersquosenergy-preserving property Plots of the computed mass density at various times t are shown inFig 1 Fig 2 confirms that energy was preserved exactly up to roundoff errors

Acknowledgements

EG was partially supported by NSF grant DMS-1703719 FGB was partially supported by theANR project GEOMFLUID ANR-14-CE23-0002-01

27

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 28: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

A Euler-Poincare variational principle

In this Appendix we first recall the Euler-Poincare principle for invariant Euler-Lagrange systems onLie groups This general setting underlies the Lie group description of incompressible flows recalledin sect21 due to [2] in which case the Lie group is G = Diffvol(Ω) It also underlies the semidiscretesetting in which case the Lie group is G = Gh In this situation however a nonholonomicconstraint needs to be considered see Appendix B Then we describe the extension of this settingthat is needed to formulate the variational formulation of compressible flow and its discretization

A1 Euler-Poincare variational principle for incompressible flows

Let G be a Lie group and let L TGrarr R be a Lagrangian defined on the tangent bundle TG of GThe associated equations of evolution given by the Euler-Lagrange equations arise as the criticalcurve condition for the Hamilton principle

δ

ˆ T

0L(g(t) g(t))dt = 0 (72)

for arbitrary variations δg with δg(0) = δg(T ) = 0

If we assume that L is G-invariant ie L(gh gh) = L(g g) for all h isin G then L induces afunction ` grarr R on the Lie algebra g of G defined by `(u) = L(g g) with u = ggminus1 isin g In thiscase the equations of motion can be expressed exclusively in terms of u and ` and are obtained byrewriting the variational principle (72) in terms of ` and u(t) One gets

δ

ˆ T

0`(u(t))dt = 0 for δu = parttv + [v u] (73)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (73) isobtained by a direct computation using u = ggminus1 and defining v = δggminus1

In order to formulate the equations associated to (73) one needs to select an appropriate spacein nondegenerate duality with g denoted glowast (the usual dual space in finite dimensions) We shalldenote by 〈〈 〉〉 glowast times grarr R the associated nondegenerate duality pairing From (73) one directlyobtains the equation langlang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang= 0 forall v isin g (74)

In (74) the functional derivative δ`δu isin glowast of ` is defined in terms of the duality pairing aslanglang δ`δu δurangrang

=d

∣∣∣∣ε=0

`(u+ εδu)

In finite dimensions and under appropriate choices for the functional spaces in infinite dimen-sions (74) is equivalent to the Euler-Poincare equation

parttδ`

δu+ adlowastu

δ`

δu= 0

where the coadjoint operator adlowastu glowast rarr glowast is defined by 〈〈adlowastum v〉〉 = 〈〈m [u v]〉〉For incompressible flows without describing the functional analytic setting for simplicity we

have G = Diffvol(Ω) and g = Xvol(Ω) the Lie algebra of divergence free vector fields parallel to theboundary We can choose glowast = Xvol(Ω) with duality pairing 〈〈 〉〉 given by the L2 inner productA direct computation gives the coadjoint operator adlowastum = P(u middot nablam + nablauTm) where P is theLeray-Hodge projector onto Xvol(Ω) One directly checks that in this case (73) yields the Eulerequations (3) for incompressible flows

28

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 29: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

A2 Euler-Poincare variational principle for compressible flows

The general setting underlying the variational formulation for compressible fluids starts exactly asbefore namely a system whose evolution is given by the Euler-Lagrange equations for a Lagrangiandefined on the tangent bundle of a Lie group G The main difference is that the Lagrangian dependsparametrically on some element a0 isin V of a vector space (the reference mass density 0 in the caseof the barotropic compressible fluid the reference mass and entropy densities 0 and S0 for thegeneral compressible fluid) on which G acts by representation and in addition L is invariantonly under the subgroup of G that keeps a0 fixed If we denote by L(g g a0) this Lagrangianand by a isin V 7rarr a middot g isin V the representation of G on V the reduced Lagrangian is defined by`(u a) = L(g g a0) where u = ggminus1 a = a0 middot gminus1

The Hamilton principle now yields the variational formulation

δ

ˆ T

0`(u(t) a(t))dt = 0 for δu = parttv + [v u] and δa = minusa middot v (75)

where v(t) isin g is an arbitrary curve with v(0) = v(T ) = 0 The form of the variation δu in (75) isthe same as before while the expression for δa is obtained from the relation a = a0 middot gminus1

From (75) and with respect to the choice of a spaces glowast and V lowast in nondegenerate duality withg and V with duality pairings 〈〈 〉〉 and 〈 〉V one directly obtains the equationslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 forall v isin g (76)

The continuity equationpartta+ a middot u = 0

arises from the definition a(t) = a0 middot g(t)minus1 In a similar way with above (76) now yields theEuler-Poincare equations

parttδ`

δu+ adlowastu

δ`

δu=δ`

δa a (77)

where δ`δa a isin glowast is defined by

langlangδ`δa a v

rangrang= minus

langδ`δa a middot v

rangV

for all v isin g We refer to [15] for a

detailed exposition

For the compressible fluid in the continuous case we have G = Diff(Ω) and g = X(Ω) theLie algebra of vector fields on Ω with vanishing normal component to the boundary We chooseto identify glowast with g via the L2 duality pairing Consider the Lagrangian (63) of the generalcompressible fluid Using the expressions adlowastum = u middot nablam + nablauTm + m div u δ`

δu = ρu δ`δρ =

12 |u|

2 minus e(ρ)minus ρ partepartρ + η partepartη minus Φ δ`δs = minus parte

partη δ`δρ ρ = ρnabla δ`

δρ and δ`δs s = snabla δ`

δs one directly obtains

ρ(parttu+ u middot nablau) = minusnablapminus ρnablaΦ

from (77) with p = ρ2 partepartρ For the semidiscrete case one uses a nonholonomic version of the

Euler-Poincare equations (77) reviewed in the next paragraph

B Remarks on the nonholonomic Euler-Poincare variational for-mulation

Hamiltonrsquos principle can be extended to the case in which the system under consideration is subjectto a constraint given by a distribution on the configuration manifold ie a vector subbundle of

29

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 30: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

the tangent bundle This is known as the Lagrange-drsquoAlembert principle and for a system on aLie group G and constraint ∆G sub TG it is given by the same critical condition (72) but only withrespect to variations statisfaying the constraint ie δg isin ∆G

In the G-invariant setting recalled in sectA1 it is assumed that the constraint ∆G is also G-invariant and thus induces a subspace ∆ sub g of the Lie algebra In the more general setting ofsectA2 one can allow ∆G to be only Ga0-invariant although for the situation of interest in this paper∆G is also G-invariant

The Lagrange-drsquoAlembert principle yields now the Euler-Poincare-drsquoAlembert principle (75) inwhich we have the additional constraint u(t) isin ∆ on the solution and v(t) isin ∆ on the variationsso that (76) becomeslanglang

parttδ`

δu vrangrang

+langlang δ`δu [u v]

rangrang+lang δ`δa a middot v

rangV

= 0 for all v isin ∆ where u isin ∆ (78)

In presence of the nonholonomic constraint (77) becomes

parttδ`

δu+ adlowastu

δ`

δuminus δ`

δa a isin ∆ u isin ∆ (79)

where ∆ = m isin glowast | 〈〈mu〉〉 = 0 forall u isin ∆

There are two important remarks concerning (78) and (77) that play an important role forthe variational discretization carried out in this paper First we note that although the solutionbelongs to the constraint ie u isin ∆ the equations depend on the expression of the Lagrangian `on a larger space namely on ∆ + [∆∆] It is not enough to have its expression only on ∆ This isa main characteristic of nonholonomic mechanics Second a sufficient condition to get a solvabledifferential equation is that the map u isin ∆ 7rarr δ`

δu isin glowast∆ is a diffeomorphism for all a

C Polynomials

Below we prove two facts about polynomials that are used in the proof of Proposition 33 We denoteby Hr(K) the space of homogeneous polynomials of degree r on a simplex K To distinguish powersfrom indices we denote coordinates by x1 x2 xn rather than x1 x2 xn in this section

Lemma C1 Let K be a simplex of dimension n ge 1 For every integer r ge 0Nsumi=1

piqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2r(K)

Proof This follows from the fact that every monomial in P2r(K) can be written as a product oftwo monomials in Pr(K)

Lemma C2 Let K be a simplex of dimension n isin 2 3 For every integer r ge 0Nsumi=1

pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

= P2rminus1(K)n

30

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 31: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

Proof We proceed by induction

Denote Qr(K) =sumN

i=1 pinablaqi | N isin N pi qi isin Pr(K) i = 1 2 N

By inductive hypoth-

esis Qr(K) contains Qrminus1(K) = P2rminus3(K)n It also contains H2rminus2(K)n Indeed if fek isinH2rminus2(K)n with k isin 1 2 n and f a monomial then f = xjg for some g isin H2rminus3(K)and some j isin 1 2 n so fek =

sumi(xjpi)nablaqi isin Qr(K) for some pi qi isin Prminus1(K) by inductive

hypothesis Thus Qr(K) contains P2rminus2(K)nNext we show that Qr(K) contains every u isin H2rminus1(K)n Without loss of generality we may

assume u = fe1 with f isin H2rminus1(K) a monomial When n = 2 the only such vector fields areu = xa1x

2rminus1minusa2 e1 a = 0 1 2r minus 1 which can be expressed as

xa1x2rminus1minusa2 e1 =

1rx

aminusr+11 x2rminus1minusa

2 nabla(xr1) if a ge r minus 11

a+1xr2nabla(xa+1

1 xrminus1minusa2 )minus rminus1minusa

(a+1)rxa+11 xrminus1minusa

2 nabla(xr2) if a lt r minus 1

The case n = 3 is handled similarly by considering the vector fields fe1 with

f isin xa1xb2x2rminus1minusaminusb3 | a b ge 0 a+ b le 2r minus 1

References

[1] D N Arnold [1982] An interior penalty finite element method with discontinuous elementsSIAM Journal on Numerical Analysis 19(4) 742ndash760

[2] VI Arnold [1966] Sur la geometrie differentielle des des groupes de Lie de dimenson infinieet ses applications a lrsquohydrodynamique des fluides parfaits Ann Inst Fourier Grenoble 16319ndash361

[3] W Bauer F Gay-Balmaz [2019] Towards a variational discretization of compressible fluids therotating shallow water equations Journal of Computational Dynamics 6(1) httpsarxivorgpdf171110617pdf

[4] W Bauer F Gay-Balmaz [2019] Variational integrators for anelastic and pseudo-incompressible flows J Geom Mech to appear

[5] P K Bhattacharyya [2012] Distributions Generalized Functions with Applications in SobolevSpaces Berlin Boston De Gruyter

[6] N Bou-Rabee and J E Marsden [2009] Hamilton-Pontryagin Integrators on Lie Groups Part IIntroduction and Structure-Preserving Properties Foundations of Computational Mathematics9 197ndash219

[7] R Brecht W Bauer A Bihlo F Gay-Balmaz and S MacLachlan [2019] Variational integratorfor the rotating shallow-water equations on the sphere Q J Royal Meteorol Soc to appearhttpsarxivorgpdf180810507pdf

[8] F Brezzi and M Fortin [1991] Mixed and Hybrid Finite Element Methods Springer-VerlagNew York

[9] M Desbrun E Gawlik F Gay-Balmaz and V Zeitlin [2014] Variational discretization forrotating stratified fluids Disc Cont Dyn Syst Series A 34 479ndash511

31

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials
Page 32: A Variational Finite Element Discretization of ...math.hawaii.edu/~egawlik/pdf/GaGB2019.pdfA Variational Finite Element Discretization of Compressible Flow Evan S. Gawlik and Fran˘cois

[10] A Ern and J-L Guermond [2004] Theory and Practice of Finite Elements Applied Mathe-matical Sciences 159 Springer

[11] E Gawlik P Mullen D Pavlov J E Marsden and M Desbrun [2011] Geometric variationaldiscretization of continuum theories Physica D 240 1724ndash1760

[12] E Gawlik and F Gay-Balmaz [2019] A conservative finite element method for the incom-pressible Euler equations with variable density preprint

[13] J Guzman C W Shu and A Sequeira [2016] H(div) conforming and DG methods forincompressible Eulerrsquos equations IMA Journal of Numerical Analysis 37(4) 1733ndash71

[14] E Hairer C Lubich and G Wanner [2006] Geometric Numerical Integration Structure-Preserving Algorithms for Ordinary Diffrential Equations Springer Series in ComputationalMathematics 31 Springer-Verlag 2006

[15] D D Holm J E Marsden and T S Ratiu [1998] The Euler-Poincare equations and semidi-rect products with applications to continuum theories Adv in Math 137 1ndash81

[16] B Liu G Mason J Hodgson Y Tong and M Desbrun [2015] Model-reduced variationalfluid simulation ACM Trans Graph (SIG Asia) 34 Art 244

[17] J E Marsden and M West [2001] Discrete mechanics and variational integrators Acta Nu-mer 10 357ndash514

[18] A Natale and C Cotter [2018] A variational H(div) finite-element discretization approach forperfect incompressible fluids IMA Journal of Numerical Analysis 38(2) 1084

[19] D Pavlov P Mullen Y Tong E Kanso J E Marsden and M Desbrun [2010] Structure-preserving discretization of incompressible fluids Physica D 240 443ndash458

32

  • Introduction
  • Review of variational discretizations in fluid dynamics
    • Incompressible flow
    • Compressible flows
      • The distributional directional derivative and its properties
        • Definition and properties
        • Relation with Raviart-Thomas finite element spaces
        • The lowest-order setting
          • The Lie algebra-to-vector fields map
          • Finite element variational integrator
            • Semidiscrete Euler-Poincareacute equations
            • The compressible fluid
              • Numerical tests
              • Euler-Poincareacute variational principle
                • Euler-Poincareacute variational principle for incompressible flows
                • Euler-Poincareacute variational principle for compressible flows
                  • Remarks on the nonholonomic Euler-Poincareacute variational formulation
                  • Polynomials