## Abstract

Parcel Eulerian–Lagrangian Hamiltonian formulations have recently been used in structure-preserving numerical schemes, asymptotic calculations and in alternative explanations of fluid parcel (in)stabilities. A parcel formulation describes the dynamics of one fluid parcel with a Lagrangian kinetic energy but an Eulerian potential evaluated at the parcel's position. In this paper, we derive the geometric link between the parcel Eulerian–Lagrangian formulation and well-known variational and Hamiltonian formulations for three models of ideal and geophysical fluid flow: generalized two-dimensional vorticity–stream function dynamics, the rotating two-dimensional shallow-water equations and the rotating three-dimensional compressible Euler equations.

## 1. Introduction

Conservation laws play an important role in geophysical fluid mechanics. In the absence of forcing and dissipation, conservations laws can be derived systematically from the variational or Hamiltonian structure of the equations of fluid motion. Conservation or near-conservation of mass, energy and vorticity in the underlying idealized model and its numerical treatment is considered desirable to enhance stability and accurate ensemble forecasting, even though the dynamics of the atmosphere and oceans are ultimately driven by forcing on the large scales and subject to viscosity on the small scales.

Recently, Frank *et al*. (2002) and Frank & Reich (2003, 2004) introduced a Hamiltonian particle mesh (HPM) numerical method, which conserves mass, energy, circulation and phase-space structure when a symplectic time integration scheme is used. The HPM method is a parcel Eulerian–Lagrangian method: the fluid particles and velocities are discretized in a Lagrangian way, while the effective density is Eulerian and is discretized and smoothed on a fixed mesh. Smoothing of this density appears be required to ensure stability for time-steps on the advection time-scale.

The conservation of mass and circulation in the HPM numerical model is shown by interpreting the dynamics of particles as a non-autonomous Hamiltonian system with particle position and particle velocity as variables; parcels interact via the transport of mass or vorticity (Frank & Reich 2003). Generally, the Hamiltonian associated with a particle representation consists of a type of Bernoulli function, that is, the sum of the Lagrangian kinetic energy plus an Eulerian potential function depending on space, evaluated at the position of the particle, and time. It turns out that in continuum fluid dynamics a single fluid parcel satisfies the same non-autonomous Hamiltonian formulation, which is finite dimensional for the one distinguished fluid parcel. The Eulerian potential is now transported by the flow generated by the parcel velocities, thereby coupling the parcels to a continuum. We call this the parcel Eulerian–Lagrangian formulation.

The question we will answer is how such parcel Eulerian–Lagrangian formulations relate to the well-known Lagrangian or Eulerian continuum Hamiltonian mechanics. Three flow systems are considered in turn: generalized two-dimensional incompressible flow expressed in terms of stream function and (potential) vorticity, two-dimensional rotating shallow-water equations and three-dimensional rotating compressible Euler equations for the motion of air. Besides the preservation of the Hamiltonian structure in the numerical HPM approach, the parcel formulation is often simpler than the more commonly used partial differential formulation in asymptotics (Bokhove 2005), fluid parcel explanations of flow instabilities (Bokhove 2005) and the proof of the Jacobi identity (this paper). In particular, the continuum Poisson bracket inherits the Jacobi identity by construction from the parcel formulation, where it is more easily verified. The link between the Hamiltonian formulation and its parcel Eulerian–Lagrangian form for an ensemble of point vortices was already noted by Morrison (1981); we believe that the general case and the derivation through Lagrangian symmetries are new.

The outline of the paper is as follows. In §2, we introduce definitions and relations between Lagrangian and Eulerian flows. An overview of the three parcel Eulerian–Lagrangian flows is given in §3. The relation between parcel and continuum dynamics is given in §§4–6 in turn for the vortical flows, the shallow-water equations and the compressible equations for air.

## 2. Preliminaries

The fundamental object in the continuum description of a fluid in a container *D* is the *flow map* which maps a fluid ‘parcel’ labelled by its initial location ** a** to its later Eulerian position . Depending on the application considered later,

*D*may be two- or three-dimensional. We view as a curve in the group of diffeomorphisms (or, if the system is incompressible, the subgroup of volume preserving diffeomorphisms) of

*D*parametrized by

*t*.

The *Lagrangian velocity* is the velocity of the fluid parcel labelled ** a**, while the

*Eulerian velocity*is the velocity of the parcel passing location

**at time**

*x**t*, so that, following the conventions of, for example, Marsden & Ratiu (1994) (see also Oliver (2006) for the shallow-water case)(2.1)

The *effective density* , which may be the physical fluid density or, as in the case of the shallow-water equations, the height function, is a density form on which the flow map acts by pullback, i.e.(2.2)where is the initial effective density, which we often take equal to one for simplicity, and denotes the gradient with respect to the label coordinates; we will not explicitly denote the variables of differentiation when no confusion is possible. In the following, we will treat *ρ* as a scalar, so that is the Jacobian determinant of the transformation; relation (2.2) can then be written in the equivalent integral form(2.3)where denotes the Dirac measure. A further formally equivalent relation is the Eulerian continuity equation(2.4)which follows from differentiating (2.2) in time and using (2.1). When the flow is incompressible, ; for simplicity, we will also assume *ρ* constant.

If denotes a curve of flow maps parametrized by *ε* with , the *variational derivative* is defined as(2.5)It is useful to introduce a corresponding *Eulerian variation* ** w** via(2.6)which can be seen as an analogy to , so that

**and**

*u***must satisfy the same boundary conditions. Moreover, just as (2.4) emerges from (2.1), we derive(2.7)from (2.6). For incompressible flows, this implies that , so that for any materially conserved quantity ,(2.8)**

*w*In the following, we localize various quantities to a single, distinguished fluid parcel, which we label ** A**. Quantities relating to this distinguished parcel are also written in capital letters so that, in particular, and . We localize variations of the flow map by introducing the special variations(2.9)and(2.10)

Finally, for vector fields in two dimensions we write and identify the curl with a scalar field, so that the curl operator in two dimensions is conveniently written as .

## 3. Parcel Eulerian–Lagrangian fluid dynamics

### (a) Two-dimensional generalized vorticity dynamics

The generalized two-dimensional vorticity dynamics considered in Bernsen *et al*. (2006) take the parcel formulation(3.1a)(3.1b)(3.1c)where denotes the (potential) vorticity, the stream function, denotes the parcel velocity which satisfies the weighted divergence condition , and denotes the flow generated by ** u**. Equation (3.1

*c*) expresses the material conservation of (potential) vorticity. The single-parcel dynamics is Hamiltonian with(3.2)We assume that , and . For

*B*=1 and , the system reduces to the Euler equations for ideal incompressible flow. For other choices, the system reduces to the quasi-geostrophic or to the rigid lid equations with representing the bottom topography of the basin; for details see Bernsen

*et al*. (2006).

Boundary conditions depend on the setting, where the possible choices include doubly periodic, sufficient decay at infinity, and *ψ*=0 with possibly circulation conditions if the domain is not simply connected.

In the simplified case that the Hamiltonian is prescribed, as is commonly done in studies of chaotic advection, the Hamilton equations (3.1*a*) form a kinematic description. In contrast, a dynamic formulation arises if we solve (3.1*a*) for every parcel ** A** to obtain using (3.1

*b*) with

*ζ*defined in (3.1

*c*) to determine as function of space and time. Note that (3.1

*c*) equals (2.3) if we identify

*ρ*with vorticity

*ζ*.

The associated Poisson formulation is(3.3a)(3.3b)for arbitrary functions *F* and *G* of ** X** and

*t*. The Poisson bracket is skew-symmetric, i.e. , and satisfies the Jacobi identity(3.4)The Jacobi identity holds for general smooth bounded away from zero and can be verified by direct computation. For a discussion of the general role of the Jacobi identity, see, for example, Olver (1986).

### (b) Two-dimensional rotating shallow-water dynamics

The parcel form of the rotating shallow-water equations has been used extensively as a basis for a numerical particle method by Frank *et al*. (2002) and Frank & Reich (2003, 2004). It reads(3.5a)(3.5b)(3.5c)where ** X** and

**denote horizontal position and velocity, respectively,**

*U**f*denotes the constant Coriolis parameter,

*g*the gravitational acceleration, the depth of the fluid basin relative to some horizontal stratum

*z*=0, and the Eulerian depth of the shallow layer of fluid. The single-parcel Hamiltonian reads(3.6)When the two-dimensional domain

*D*has a boundary, zero flux boundary conditions , with

**denoting the outward normal, will be used.**

*n*The parcel Poisson formulation is(3.7a)(3.7b)for arbitrary functions *F* and *G* of ** X**,

**and**

*U**t*. The bracket (3.7

*b*) is skew-symmetric and canonical when

*f*=0. It satisfies the Jacobi identity (3.4), as can be verified directly.

### (c) Three-dimensional rotating compressible dynamics for air

The equations for compressible ideal gas in three dimensions have been cast into parcel form in Bokhove (2005), a formulation that underlies Dixon & Reich's (2004) particle method. The parcel equations read(3.8a)(3.8b)(3.8c)(3.8d)(3.8e)where is an external potential, denotes the Eulerian and the corresponding parcel potential temperature with temperature *T*, pressure *p* and reference pressure . We assume the thermodynamics of an ideal gas where with gas constant *R*, specific heat at constant pressure and . The system is then closed via the Exner function(3.8f)and the ideal gas law, which implies(3.8g)Note that both the single-parcel potential temperature and the Eulerian potential temperature field *θ* appear in the system—in (3.8*b*) and (3.8*g*), respectively. The parcel potential temperature acts as a (trivial) variable in the Hamiltonian structure, while the Eulerian potential temperature is a materially advected quantity. To make this point, the system contains the two computationally redundant potential temperature equations (3.8*c*) and (3.8*e*).

The boundary conditions are taken to be doubly periodic in the horizontal with a solid bottom at and flow at rest for . Note that , so that (3.8*b*) attains its usual form. The parcel Hamiltonian reads(3.9)Finally, system (3.8) has the parcel Poisson formulation(3.10a)(3.10b)for arbitrary functions *F* and *G* of ** X**,

**, and**

*U**t*. The bracket (3.10

*b*) is skew-symmetric, canonical when , and can be shown to satisfy the Jacobi identity (3.4) by direct verification.

## 4. Generalized vorticity–stream function dynamics

### (a) Equations of motion

The Eulerian description of the generalized vorticity dynamics (3.1) reads(4.1a)(4.1b)(4.1c)with appropriate, here doubly periodic, boundary conditions for (4.1*b*). Note that if *B* is spatially varying, ** u** satisfies a weighted incompressibility constraint, so that the Jacobian determinant(4.2)must be used when changing from Lagrangian to Eulerian coordinates.

System (4.1) arises from a continuum variational principle which we will first restrict to single, distinguished parcels to derive the parcel Hamiltonian form. Subsequently, we show how a full continuum Hamiltonian formulation can be recovered from the parcel one.

### (b) From continuum to parcel variational principle

To expose the subtleties of this derivation more clearly, we restrict ourselves to the case of ideal incompressible flow, where *B*=1 and . It is well known that (4.1) arises via the Hamilton principle with extended Lagrangian(4.3a)(4.3b)We recall this argument briefly. We seek stationary points of the action under *independent* variations of and which vanish at the temporal endpoints. Thus,(4.4)where we have integrated by parts in time. The first term under the integral states that , whence the second term yields, after using (2.6) and integration by parts, that(4.5)so that is orthogonal to divergence free vector fields, or(4.6)where *p* is identified with the physical pressure. The transport of vorticity (4.1*a*) is then obtained by taking the curl of (4.6).

Vorticity advection can also be derived by taking particle relabelling variations of the action . With particle relabelling transformation we mean area preserving rearrangements of the initial fluid labels. A variation of a flow map under a differentiable one-parameter family of label changes then takes the form(4.7)with . Differentiating in *ϵ* and setting *ε*=0 yields(4.8)where incompressibility implies that is divergence free.

The crucial observation is that the particle relabelling symmetry implies a material conservation law—which we may call conservation of *potential vorticity* but which is not yet in any way related to the physical vorticity—even without the identification . We thus proceed *without* assuming the computation leading up to (4.6). In this situation, it is crucial to distinguish between three Lagrangian vector fields, namely ** V**, , and the Lagrangian variation

*. Since*

**W***is divergence free, we write . For the other two vector fields, we associate Eulerian vector fields via and , and define corresponding Eulerian stream functions(4.9)as well as vorticities(4.10)*

**W**Since particle relabelling variations act only on , the resulting conservation law is independent of the Hamiltonian, and we find(4.11)If we assume that * V* and solve the equations of motion which, at this point, are not yet explicitly known, the last integral in (4.11) must vanish. Moreover, using (4.8), we find that(4.12)The last equality is due to integration by parts and the incompressibility condition . The computation can easily be checked by component-wise computation, but also has a direct interpretation as the commutation of pullback and exterior derivative in the calculus of differential forms.

Combining (4.11) and (4.12), we find that *ζ* is materially conserved, i.e.(4.13)We now use this conservation law as a constraint when taking regular variations in , vanishing at the temporal endpoints, of the extended Lagrangian (4.3). First, we compute the variation of in two different ways. On the one hand,(4.14)and on the other hand,(4.15)Combining (4.14) and (4.15), we obtain(4.16)

In order to take variations of the first term in the Lagrangian (4.3*a*), we note that the conservation law for *ζ*, equation (4.13), implies(4.17)so that(4.18)Further,(4.19)so that(4.20a)and(4.20b)Hence, using (4.20), we derive(4.21)where, in the third equality, we have used that(4.22)Altogether, combining (4.16) and (4.21), we obtain(4.23)We localize this expression by choosing variations of the type (2.9), so that(4.24)Dividing through by , we obtain the parcel variational principle(4.25a)where(4.25b)Since the parcel Poisson structure (3.3*b*) is nearly canonical, it follows by inspection from the equations of motion implied by (4.25).

We observe that this parcel variational principle encodes only the dynamic part of the parcel system (3.1),(4.26)The full continuum variational principle encodes, in addition, the material conservation law which has been externalized by the localization and is not present in (4.25).

Considering that all particular fluid labels ** A** satisfy (4.26), we conclude that . Since we defined earlier on, we identify

*a posteriori*that

*θ*=

*ψ*(up to a constant) and

*ζ*=

*ω*.

We finally remark that the underlying principle of our construction is independent of the two-dimensionality of the flow and of the corresponding vorticity–stream function formulation. The details of the construction for three-dimensional flow are very different, however, and will be considered in a forthcoming paper.

### (c) From parcel to continuum Eulerian Hamiltonian dynamics

We now demonstrate that the above procedure can be reversed for the case of generalized vorticity–stream function dynamics with functions *B*, *C* and *D*. Given the parcel Hamiltonian structure (3.3*b*), we derive the corresponding continuum vorticity bracket. Generally speaking, we recover continuum quantities from parcel quantities by integrating over label space. For any function of single-parcel variables, we define the functional(4.27)To establish the relation between the partial derivatives of *F* and partial variations of , we compare the definition of with the variation of (4.27),(4.28)respectively. Hence,(4.29)The Hamiltonian dynamics follows by taking the time derivative of (4.27) and using the parcel Hamiltonian dynamics (3.3*b*)(4.30)Substitution of (4.29) into the last line of (4.30) with use of (3.3*b*) gives the well-known vorticity bracket (e.g. Shepherd 1990)(4.31)Since the parcel Hamiltonian implicitly depends on *ζ*, it cannot be recovered via (4.27). Note, however, that the crucial identity which lead us to the continuum bracket is (4.29) which, as we will show in §4*d*, can also be derived on independent grounds.

We thus need to find a functional which satisfies (4.29) with and . Noting that (3.1*b*) implies , we see that(4.32)In conclusion, the Hamiltonian dynamics is governed by , bracket (4.31) and Hamiltonian (4.32). The bracket is observed to be skew-symmetric, , and satisfies the Jacobi identity(4.33)as can be seen as follows. From (4.29) and (4.30), we immediately see that(4.34)Substitution of (4.34) into then yields(4.35)Thus, the Jacobi identity for single-parcel variables implies the full continuum Jacobi identity (4.33).

We finally remark that the vorticity dynamics (4.1) can be recovered from by choosing(4.36)

### (d) General vorticity functionals

In the following, we prove (4.29) for general vorticity functionals . This computation provides a different viewpoint on the reconstruction of the continuum Poisson formulation. In particular, it shows that (4.29) is not simply postulated, but is a direct inverse of the restriction-to-parcels process. The disadvantage of this approach is that the interpretation of (4.29) as an integration over labels is lost, and that the argument works backward, i.e. following the restriction-to-parcels route.

Using (4.17), integrating by parts, and changing variables, we find(4.37)As before, we localize this expression by choosing variations of the type (2.9), so that, comparing with (4.24), we obtain(4.38)Dividing by and integration in space yields (4.29). A computation similar to the above holds for the time derivative of in place of the variational derivative, providing yet another, more general route to the Poisson bracket for functionals.

## 5. Rotating shallow-water equations

### (a) Equations of motion

The Eulerian form of the rotating shallow-water equations (3.5) is(5.1a)(5.1b)In the following, we will again start out with the full continuum variational principle for this system, derive its parcel form, and then use the parcel Poisson structure to reconstruct the full continuum Poisson structure.

### (b) From continuum to parcel variational principle

It is well known (e.g. Salmon 1998) that the rotating shallow-water equations arise as the critical point of the action(5.2)where , with respect to variations that vanish at the temporal endpoints and are tangential to solid boundaries, i.e. which satisfy . The shallow-water Lagrangian written in Eulerian coordinates reads(5.3)The crucial observation is that, due to (2.7) for *ρ*=*h* and integration by parts,(5.4)We restrict the entire variational principle down to the single fluid parcel labelled ** A** by using the special variations (2.9) and (2.10) in the variation of (5.2). The first two terms in the variation of (5.2) then give(5.5)where

**and**

*X***are the position and velocity of the distinguished fluid parcel labelled**

*U***.**

*A*If we now consider *h* as a given density field, the last term in (5.2) and (5.4) can be seen as a perfect variation with respect to the parcel coordinates,(5.6)Altogether, we obtain the parcel variational principle(5.7)It is important to note that in the full continuum variational principle, variations of *h* are slaved to variations of . In the parcel variational principle, however, *h* is treated like an externally prescribed potential as it is defined via (3.5*c*) which closes the dynamics, but is not part of the variational structure. This distinction is crucial when we recover the continuum from the parcel Hamiltonian formulation in §5*c*.

Denoting the conjugate momentum by ** U**, we obtain a Hamilton principle(5.8)with

**and**

*X***as independent variables, and(5.9a)(5.9b)The parcel equations of motion follow immediately. Finally, we can easily deduce the Poisson formulation (3.7) since the bracket is nearly canonical.**

*U*### (c) From parcel to continuum Eulerian Hamiltonian dynamics

We will recover the continuum quantities from the corresponding parcel quantities by integrating over label space. For any function of single-parcel variables, we define the functional(5.10)Hence,(5.11)where and are independent, so that(5.12)and consequently(5.13)Moreover,(5.14)Direct substitution of (5.12) into (5.14) while using (3.7*b*) yields the well-known shallow-water bracket (e.g. Shepherd 1990)(5.15)with potential vorticity .

It remains to find an explicit expression for the Hamiltonian . Since the parcel Hamiltonian depends on *h*, it cannot simply be substituted into (5.10). Note, however, that the crucial identities which lead us to the continuum bracket are (5.12) which, as we will show in §5*d*, can also be derived on independent grounds. We must thus seek an which satisfies (5.12) directly. By inspection, we find(5.16)Hence, the Hamiltonian dynamics is governed by . The shallow-water equations (5.1) are recovered by choosing(5.17)and(5.18)for the continuity and momentum equations, respectively. Thus, by transforming the parcel generalized Poisson bracket, we arrive at the continuum Eulerian generalized Poisson bracket, which is skew-symmetric and satisfies the Jacobi identity by construction. The proof is as follows. Since (5.15) implies that Jacobi brackets satisfy (5.12), that is(5.19)we also have(5.20)Therefore, the Jacobi identity (3.4) for functions implies the Jacobi identity for functionals.

### (d) General velocity–height functionals

As we considered general vorticity functionals in §4*d*, we will now derive (5.12) for general velocity–height functionals . In addition to providing an alternative viewpoint on the reconstruction of the continuum Poisson structure, we find that the correspondence is only valid if is of the particular form(5.21)for arbitrary functions *f* and *g*.

Starting from a general functional , we use (2.7) with *ρ*=*h*, integrate by parts, change to Lagrangian variables, apply (2.6) and its time derivative, and finally restrict the variations to a distinguished fluid parcel ** A**, thereby obtaining(5.22)Thus, at the distinguished parcel,(5.23)The relations (5.12) follow by integration and rearrangement of terms. Writing(5.24)we find that and therefore(5.25)We conclude that this expression is only compatible with the first condition of (5.12) provided (5.21) holds. A computation similar to (5.22) holds for the time derivative of in place of the variational derivative, providing yet another, more general route to the Poisson bracket for functionals.

## 6. Rotating compressible Euler equations

### (a) Equations of motion

The Eulerian description of the Euler equations (3.8) for an ideal gas with velocity , density and potential temperature reads(6.1a)(6.1b)(6.1c)(6.1d)Note that in (6.1*a*), using and the ideal gas law , we can rewrite in its usual form.

The continuum variational principle and its restriction to single parcels is largely similar to the case of rotating shallow water, so we omit this computation. However, we demonstrate how the continuum Poisson structure is derived from the parcel one.

### (b) From parcel to continuum Hamiltonian dynamics

For any function of single-parcel variables, we define again an associated functional(6.2)Since(6.3)and and are independent, we find(6.4)and therefore(6.5)We obtain the continuum bracket from(6.6)Substitution of (6.4) into (6.6) while using (3.10*b*) yields the Eulerian bracket(6.7)This is the well-known compressible Euler bracket (e.g. Morrison 1998) with the vorticity vector . The Hamiltonian(6.8)is obtained from (6.4) using the thermodynamic relation (e.g. Stanley 1971), where denotes the internal energy, and the potential temperature is defined as in §3*c*.

In conclusion, the Hamiltonian formulation of the compressible Euler equations consists of with Hamiltonian (6.8) and Poisson bracket (6.7). The equations of motion (6.1) are recovered by taking, in turn, , and .

## Acknowledgements

This paper was sparked by discussions among participants of the EPSRC network *Geometric Methods in Geophysical Fluid Dynamics*, and we thank the network organizers for the opportunity to participate. We also thank the Geophysical Fluid Dynamics fellowship program at the Woods Hole Oceanographic Institution for the hospitality during the finalization of the manuscript and the anonymous reviewers for many insightful remarks. O.B. further acknowledges a fellowship from The Royal Netherlands Academy of Arts and Sciences (KNAW).

## Footnotes

- Received September 4, 2005.
- Accepted January 3, 2006.

- © 2006 The Royal Society