## 1. Introduction

Hamiltonian formulations of the equations of motion have been applied to a variety of idealized flows (see the reviews by Salmon 1988, 1998; Shepherd 1990; Morrison 1998). Particularly noteworthy is the ability of the Hamiltonian approach to systematize the derivation of the expression for the available energy (Shepherd 1993). Here available energy is the nonkinetic contribution to the pseudoenergy and has potential and elastic components.

The purpose of the present investigation is to extend the Hamiltonian description of idealized rotating compressible flows to the case where the fluid is a binary mixture of two flow components whose composition is not homogenous. The mixture is idealized to be in approximate local thermodynamic equilibrium. Diffusive processes are ignored. It is further assumed that the velocities of the two components are the same.

The next section presents the generic equations for such a binary geophysical fluid. Section 3 casts the system into a Hamiltonian formulation. This formulation extends that for the single-component system to include a prognostic equation for the relative concentration of the two components. Section 4 describes the range of Casimir invariants. These include a generalized potential vorticity that is implicit in the kinematic discussions of Truesdell (1951, 1954) and Haynes and McIntyre (1987). Section 5 describes the available energy for the system, its partitioning into available potential and available elastic energies, and its small amplitude limit. The approach follows that of Shepherd (1993) to yield a local expression like that of Andrews (1981) relative to an arbitrary reference state. Section 6 presents a linear stability analysis of the flow. Sections 7 and 8 apply these findings to a moist atmosphere and a salty ocean. The formulation for the atmosphere allows the water vapor to exist in equilibrium with either liquid or solid water and to undergo a change of phase. It generalizes the moist available potential energy of Lorenz (1979) to a local expression relative to an arbitrary reference state. It is also shown that, in principle, the nonlinear theory is applicable to the oceans.

## 2. The model geophysical fluid

**v**is the three-dimensional velocity,

**Ω**is the rotation rate,

*p*is the pressure,

*ρ*is the total density, Φ is the geopotential,

*η*is the total entropy per unit total mass, and

*χ*is the generic concentration describing the relative amount of mass of the sparse component to that of the more abundant component. It is assumed that both components move with the same velocity

**v**and have the same temperature

*T.*

*u*per unit total mass aswhere

*μ*is the chemical potential of the mixture. Because

*u*is a function of

*ρ,*

*η,*and

*χ,*we may writeComparison of these last two expressions impliesand the commutability of the second derivatives yields Maxwell's relations in the formIt is also convenient to introduce the enthalpy,

*h*=

*u*+

*p*/

*ρ.*Then the thermodynamic identity becomesFor the present we assume the definitions for

*u,*

*h,*

*η,*

*χ,*and

*μ*are known. Their specification is postponed until sections 7 and 8 in which applications to the atmosphere and ocean are made.

## 3. Hamiltonian description

**u**= (

*u*

_{1},

*u*

_{2},

*u*

_{3},

*u*

_{4},

*u*

_{5},

*u*

_{6})

^{T}= (

**v**,

*ρ,*

*η,*

*χ*)

^{T}with the Hamiltonian functiondescribing the total energy of the system. The prognostic equations may be written in Cartesian tensor notation:where

*δH*/

*δu*

_{j}denotes a functional derivative, and

*J*

_{ij}is the tensor:where the velocity and absolute vorticity arerespectively. We note that the functional derivatives of the Hamiltonian areThen the Hamiltonian description (3.2) becomesThe first three equations represent the momentum equation in the formwhere the pressure gradient is related to the other flow variables by the spatial derivative form of the thermodynamic identity (2.6). The fourth, fifth, and sixth equations in this set represent the equation of continuity for total density, and the equations of conservation of entropy and concentration, respectively.

*J*satisfies the Jacobi condition. Its Poisson bracket iswhere the integration is over the total volume

*V*of fluid. Using the divergence theorem this expression becomeswhere we have assumed thaton the boundaries of the domain. Here,

**n̂**is the unit normal on the boundaries. It is traditional (e.g., Morrison 1998) to neglect these boundary contributions. The bracket (3.8b) may be put into Lie–Poisson form by a transformation from the variables

**v**,

*η,*and

*χ*to the variables

**M**(=

*ρ*

**v**),

*σ*(=

*ρη*), and

*X*(=

*ρχ*) in a manner similar to Morrison (1998, p. 490). This transformation amounts to writing (2.1) in flux form. The result,implies that the Jacobi identity is satisfied because the contribution of

*X*is isomorphic with that of

*σ*and

*ρ*and, apart from the contributions from

*F*and

*G,*(3.10) is linear in [

**M**,

*ρ,*

*σ,*

*X*] (Morrison 1982).

## 4. Casimir invariants

**u**. In principle, a Lagrangian description may be constructed for nine variables (

**u**plus the three spatial coordinates). This reduction in the number of variables from the Lagrangian to the Eulerian description implies that the Eulerian description is noncanonical. Mathematically this reduction is reflected in the fact that the matrix 𝗝 is singular. As a consequence, Eulerian Hamiltonian descriptions possess global invariants. Because of the reduction in the number of invariants (Kuroda 1990), the Hamiltonian system should possess three distinct Casimir invariants. These Casimirs are functionals

*C*that have a vanishing Poisson bracket:If the arbitrary functional

*F*is a function of

*ρ,*

*η,*

*χ,*or

**v**separately, then

*C*must satisfy the four constraintsThree distinct solutions to (4.2) arewhere

*f*and

*g*are arbitrary functions of

*η*and

*χ,*and

**v**

_{a}is the absolute velocity. Here, the generalized potential vorticity iswhere

*λ*=

*λ*(

*ρ,*

*η,*

*χ*) is an arbitrary thermodynamic scalar function.

*C*

_{1}, is a consequence of the material conservation of entropy and concentration and expresses the global invariance of these two quantities (and combinations thereof). This thermodynamic Casimir

*C*

_{1}has the functional derivativesThe first three constraints of (4.2) are trivially satisfied while the last is satisfied by the chain rule. Thus,

*C*

_{1}is a Casimir.

*C*

_{2}, is a consequence (Salmon 2003, personal communication) of the conservation of the absolute circulationwhere

*L*is a curve formed by the intersection of a surface of constant entropy

*η*with a surface of constant concentration

*χ.*If the curve

*L*is closed, then the circulation is conserved. If the curve

*L*does not close, then the circulation is also conserved by the assumption to neglect any boundary contributions. Letting

*η,*

*χ,*and

*a*be the mass-labeling coordinates such that the density is the Jacobian of the transformation between the mass-labeling and Cartesian coordinates,Because only

*a*varies along the curve

*L,*we can rewrite the circulation asThenis also conserved because Γ is conserved on each curve

*L*of constant

*η*and

*χ.*Transforming the integral to physical space yieldswhich is equivalent to (4.3b). The functional derivatives of

*C*

_{2}areand it is straightforward to show that these satisfy (4.2). Thus,

*C*

_{2}is a Casimir.

*C*

_{3}, is a consequence of the kinematic structure of potential vorticity (see Truesdell 1951, 1954; Haynes and McIntyre 1987). This kinematic Casimir arises directly from the fact that the divergence of a curl vanishes. The functional derivatives of

*C*

_{3}arewhich all vanish. This result implies that the functional derivatives of the Casimir are identically zero and

*C*

_{3}satisfies the four conditions trivially. This is a very special case, but it holds for an arbitrary thermodynamic scalar function

*λ*because of the vector identities for the vanishing of the divergence of a curl and the curl of a gradient. Thus, Eqs. (4.3) are the Casimir invariants.

## 5. Available energy

*C*relative to a base state

**u**

_{0}asThen we define the available energy as the nonkinetic energy contribution to the pseudoenergy. To construct the pseudoenergy for a generic geophysical flow we consider a type-1 Casimir invariant (4.3a) with functional derivatives (4.5) and choose a resting base-state

**u**

_{0}such thatthat is, in hydrostatic balanceBecause the density is a positive quantity, this relation implies that the base-state pressure is a monotonic function of height. Thermodynamically, we have that

*p*

_{0}

*p*

_{0}

*ρ*

_{0}

*η*

_{0}

*χ*

_{0}

*ρ*

_{0}=

*ρ*

_{0}(

*η*

_{0},

*χ*

_{0}). Here, the Casimir

*C*must satisfywhen evaluated in the base state. The last condition is satisfied trivially. The remaining three conditions require that

*f*satisfywhere the subscript 0 indicates the quantity in parentheses has been evaluated in the base state (5.2). For example,

*u*

_{0}is the base-state internal energy. In order to satisfy the first condition we choose

*f*such thatwhere

*Z*

*η,*

*χ*

_{0}

*z.*

*p*

_{0}=

*p*

_{0}(

*η,*

*χ*) and

*p*

_{0}=

*p*

_{0}(

*z*), soand the second condition is satisfied. Similarly, using (2.4b,c),and the third condition (5.7c) is satisfied.

*A*= AEE + APE. Following Andrews (1981) the available elastic energy per unit volume iswhere

*h*is the enthalpy. Then APE =

*A*− AEE. If the departures of

**u**from the base state

**u**

_{0}are small, then (5.15) may be expanded in a Taylor series about

**u**

_{0}. To leading order, one findswhere the subscripts

*ρ,*

*η,*and

*χ*denote differentiation with respect to those variables but the subscript 0 denotes evaluation in the base state. Evaluation of the second derivatives is relatively straightforward but tedious. Some details are summarized in the appendix. In addition, use is made of the relationWith some effort, one finds thatwhere the first term on the right-hand side is the linear APE and the second the linear AEE. Here,

*c*

_{0}is the speed of soundand the square of the buoyancy frequency isIt may also be verified that the linearized form of (5.16) is the second term in (5.19). These results are the generalization of the one-component expressions to a binary fluid.

## 6. Linear stability analysis

*C.*Thus, the state

**u**

_{0}is an extremum. For linear stability, it is sufficient that the second variation of the pseudoenergy be positive. This convexity condition iswhere the subscripts denote differentiation. For linear stability it is sufficient that the integrand be positive definite. The kinetic energy contribution is positive. The available energy contribution is a third-order quadratic form. Stability is ensured if this contribution is nonnegative. Based on the theory of quadratic forms (e.g., Hildebrand 1965), this contribution is positive semidefinite ifwhen evaluated in the base state. The vanishing of the third condition (6.2c) means that the 3 × 3 symmetric matrix associated with the quadratic form is singular and that a 2 × 2 submatrix contains the necessary information. Then it is sufficient for stability thatUsing the results in the appendix, we findwhere

*c*

_{0}is the speed of sound (5.20) and the square of the buoyancy frequency is given by (5.21). Then stability is ensured if the sound speed is real, the density decreases with height, and the square of the buoyancy frequency is positive. While these stability conditions are well known, their derivation here for a compressible binary fluid using a Hamiltonian description is new. Identical stability requirements result from conditions analogous to (6.3) but for the derivatives with respect to

*ρ*and

*χ.*Those conditions with respect to

*η*and

*χ*fail to capture all of the stability requirements. This result reflects the singularity of the 3 × 3 matrix.

## 7. Application to a moist atmosphere

*p*iswhere ε =

*R*

_{a}/

*R*

_{υ}= 0.622 is the ratio of the molecular weight of water vapor to that of dry air, and

*R*

_{a}and

*R*

_{υ}are the gas constants for dry air and water vapor. The mixing ratios of water vapor

*r*

_{υ}and total water

*r*arewhere

*ρ*

_{a},

*ρ*

_{υ}, and

*ρ*

_{w}are the densities of the dry air, water vapor, and total water. The total density is related to the density of dry air by

*ρ*=

*ρ*

_{a}(1 +

*r*). The vapor pressure

*e*iswhere the partial pressure due to dry air is

*p*

_{a}=

*p*−

*e.*Then the mixing ratio is

*r*

_{υ}= ε

*e*/

*p*

_{a}. In keeping with atmospheric conventions we replace the symbol

*η*with

*s*for atmospheric entropy and replace the symbol

*χ*with

*r*for the mixing ratio of total water. Because all the flow components move with the same velocity, there is no fallout and the total mixing ratio

*r*satisfies a conservation statement of the form (2.1d). Following Lorenz (1979) and Emanuel (1994), the thermodynamic fields may be expressed in a general manner so that they are valid for unsaturated flow (

*r*=

*r*

_{υ}) without liquid water (

*r*

_{l}≡

*r*−

*r*

_{υ}= 0) and for saturated flow (

*r*

_{υ}=

*r*−

*r*

_{l}) with liquid water (

*r*

_{l}> 0).

*s*per unit mass of cloudy air isThe specific entropies for the dry air, water vapor, and liquid water arewhere

*s*

_{a0},

*s*

_{υ0}, and

*s*

_{l0}are reference values of the entropy of dry air, water vapor, and liquid water. Here,

*c*

_{pa}and

*c*

_{pv}are the specific heats at constant pressure for the dry air and water vapor, while

*c*

_{l}is the specific heat of the liquid water. We assume that these specific heats are constants independent of temperature but allow the enthalpy of vaporization

*l*

_{υ}to satisfy Kirchhoff's relation

*dl*

_{υ}= −(

*c*

_{l}−

*c*

_{pv})

*dT.*In saturated conditions, the saturation vapor pressure

*e*

_{sat}is defined as a function of temperature by the Clausius–Clapeyron equationsuch that

*e*

_{sat}= 6.11 mb at

*T*= 273.16 K.

*u*

_{a0}and

*u*

_{υ0}are reference values of the internal energy:and

*T*

_{00}is a reference temperature. Then the enthalpy

*h*per unit mass of cloudy air isNote that this relation defines the enthalpies of the dry air and water vapor asThe thermodynamic identity (2.2) for the present system can be shown to have the formwhere the chemical potential for this system is (1 +

*r*)

^{2}

*μ*=

*μ*

_{υ}−

*μ*

_{a}and the chemical potentials of the dry air and water vapor areThis result follows in a clear and easily interpreted fashion because the definitions for the entropy and internal energy retained the reference values of the fields (cf. Lorenz 1979). Having served their purpose, these reference values do not alter (2.1) or the Hamiltonian formulation and may be dropped in the subsequent analysis. [We note that Eq. (17) of Lorenz is valid for his problem where the differentials are material ones following a cloudy air parcel that conserves its total water,

*dr*= 0.]

*ρ,*

*s,*and

*r.*Formally this requirement is met by the preceding set of relations. The ideal gas laws may be used to eliminate the partial pressures from the definition of the entropy (7.4) to yield an equation for the temperature field as a function of

*ρ,*

*s,*and

*r.*Then the internal energy (7.7) and total pressure (7.1) are also functions of

*ρ,*

*s,*and

*r.*This relation for the pressure holds in the unsaturated case because

*r*

_{υ}=

*r*and in the saturated case because

*r*

_{υ}=

*r*

_{sat}, whereand the saturation vapor pressure is only a function of temperature by the Clausius–Clapeyron Eq. (7.6). In order to partition the available energy into available elastic and potential energies, the enthalpy (7.9) must be expressed in terms of the pressure, entropy, and total mixing ratio. Again this is formally possible. Because (5.15) and (5.16) involve differences in the internal energy and enthalpy for the same values of

*χ*=

*r,*the reference values

*u*

_{a0}and

*u*

_{υ0}need not be specified and may be dropped from the subsequent analysis.

We note that the formulation presented here for a moist atmosphere with water vapor and liquid water is readily modified for one with water vapor and solid water.

## 8. Application to the ocean

*ρ,*the entropy

*η,*and the concentration is taken to be the salinity

*χ*≡

*S.*The salinity

*S*is the mass of sea salt per unit mass of seawater. In contrast to the atmospheric thermodynamics that may be expressed completely and analytically, the oceanic case is complicated by the reliance on tabular expressions for the state variables (e.g., Fofonoff 1962, 1985). The approach of Feistel (1993; see also Feistel and Hagen 1994, 1995) is adopted here because it presents a synthesis of earlier results that is internally mathematically consistent. In this approach, the equation of state for seawater and the Gibbs free energy

*G*are given as functions of the measurable state variables of salinity, temperature, and pressure:In addition the temperature is expressed as a function of the salinity, entropy, and pressure:

*T*

*T*

*S,*

*η,*

*p*

*G*

*G*

*ρ,*

*η,*

*S*

*T*

*T*

*ρ,*

*η,*

*S*

*u*=

*G*+

*Tη*−

*p*/

*ρ,*the results (8.3)–(8.5) imply

*u*

*u*

*ρ,*

*η,*

*S*

*μ*

_{sw}is the chemical potential of seawater (i.e., the difference between the specific chemical potential of salt is seawater and that of water in seawater; Fofonoff 1962; Feistel 1993). Formally then, this idealized ocean system is Hamiltonian.

Lastly because the enthalpy *h* = *G* + *Tη,* it may be expressed using (8.2) and (8.3) as *h* = *h*(*p,* *η,* *S*). Thus, the available energy relations of section 5 are applicable to the ocean in both their finite- and small-amplitude forms.

## 9. Conclusions

The Hamiltonian description of a compressible, rotating flow has been extended to the case of a binary fluid. This generic description in section 3 is applicable to any fluid system satisfying the thermodynamic identity (2.2). This constraint is satisfied by an ocean idealized to contain a single solute, the salinity, and by a moist atmosphere idealized to contain water in gaseous and either liquid or solid form. [A moist atmosphere containing water vapor and liquid and solid water is not Hamiltonian in the present description because the thermodynamic identity is more general than that of (2.2).] The Casimir invariants of the generic binary fluid are given by (4.3). They reflect the conservation of entropy and concentration, the conservation of circulation on lines formed on the intersection of surfaces of constant entropy and surfaces of constant concentration, and the conservation of a generalized potential vorticity. In (4.3c) the thermodynamic scalar function *λ* may be the pressure, density, temperature, salinity, or water mixing ratio.

The result (5.15) for the available energy extends the result of Andrews (1981) to a binary system. Like that of Andrews, the available energy is a local, positive-definite definition of the nonkinetic contribution to the pseudoenergy. Following Andrews (1981, section 5) the present moist result is similarly related to the moist available potential energy of Lorenz (1979) as his dry result is to that of Lorenz (1955). The utility of the present result in an Eulerian framework is severely restricted because it is required that every value of entropy and concentration be present in the reference state. In a Lagrangian framework, one could use (5.15) to track the evolution and partitioning of the available and kinetic energies for individual fluid parcels. Such an application to moist parcel dynamics will be presented in another forum.

## Acknowledgments

The National Science Foundation under Grants ATM-9820233 and ATM-0215358 provided partial support for this research. I thank Dennis Lamb for fruitful discussions on moist thermodynamics and Raymond G. Najjar for bringing the work of Rainer Feistel to my attention. Reviewer Rick Salmon graciously provided Casimir *C*_{2} after noting a deficiency in my original formulation.

## REFERENCES

Andrews, D. G., 1981: A note on potential energy density in a stratified compressible fluid.

,*J. Fluid Mech.***107****,**227–236.Callen, H. B., 1985:

*Thermodynamics and an Introduction to Thermostatics*. John Wiley, 493 pp.Durran, D. R., , and J. B. Klemp, 1982: On the effects of moisture on the Brunt–Väisälä frequency.

,*J. Atmos. Sci.***39****,**2152–2158.Emanuel, K. A., 1994:

*Atmospheric Convection*. Oxford, 580 pp.Feistel, R., 1993: Equilibrium thermodynamics of seawater revisited.

*Progress in Oceanography,*Vol. 31, Pergamon, 101–179.Feistel, R., , and E. Hagen, 1994: Thermodynamic quantities in oceanography.

*The Oceans: Physical–Chemical Dynamics and Human Impact,*S. K. Majumdar et al., Eds., The Pennsylvania Academy of Science, 1–16.Feistel, R., , and E. Hagen, 1995: On the GIBBS thermodynamic potential of seawater.

*Progress in Oceanography,*Vol. 36, Pergamon, 249–327.Fofonoff, N. P., 1962: Physical properties of seawater.

*The Sea,*M. N. Hill, Ed., Physical Oceanography, Vol. 1, Wiley and Sons, 3–30.Fofonoff, N. P., 1985: Physical properties of sea-water. A new salinity scale and equation of state for seawater.

,*J. Geophys. Res.***90****,**3332–3342.Haynes, P. H., , and M. E. McIntyre, 1987: On the evolution of vorticity and potential vorticity in the presence of diabatic heating and frictional and other forces.

,*J. Atmos. Sci.***44****,**828–841.Hildebrand, F. B., 1965:

*Methods of Applied Mathematics*. Prentice-Hall, 362 pp.Kuroda, Y., 1990: Symmetries and Casimir invariants for perfect fluid.

,*Fluid Dyn. Res.***5****,**273–287.Lalas, D. P., , and F. Einaudi, 1974: On the correct use of the wet adiabatic lapse rate in stability criteria of a saturated atmosphere.

,*J. Appl. Meteor.***13****,**318–324.Lorenz, E. N., 1955: Available potential energy and the maintenance of the general circulation.

,*Tellus***7****,**157–167.Lorenz, E. N., 1979: Numerical evaluation of moist available energy.

,*Tellus***31****,**230–235.Morrison, P. J., 1982: Poisson brackets for fluids and plasmas.

*Mathematical Methods in Hydrodynamics and Integrability in Related Dynamical Systems,*M. Tabor and Y. M. Treve, Eds., American Institute of Physics, 13–46.Morrison, P. J., 1998: Hamiltonian description of the ideal fluid.

,*Rev. Mod. Phys.***70****,**467–521.Salmon, R., 1988: Hamiltonian fluid dynamics.

,*Annu. Rev. Fluid Mech.***20****,**225–256.Salmon, R., 1998:

*Lectures on Geophysical Fluid Dynamics*. Oxford, 378 pp.Shepherd, T. G., 1990: Symmetries, conservation laws, and Hamiltonian structure in geophysical fluid dynamics.

*Advances in Geophysics,*Vol. 32, Academic Press, 287–338.Shepherd, T. G., 1993: A unified theory of available potential energy.

,*Atmos.–Ocean***31****,**1–26.Truesdell, C., 1951: Proof that Ertel's theorem holds on average for any medium suffering no tangential acceleration on the boundary.

,*Geofis. Pura Appl.***19****,**167–169.Truesdell, C., 1954:

*The Kinematics of Vorticity*. Indiana University Press, 232 pp.

## APPENDIX

### Derivatives of the Available Energy

*A.*It employs the thermodynamic relations (2.4), as well as Maxwell's relations (2.5), and the fact thatimpliesSimilar relations hold for differentiation with respect to

*χ.*The second derivative with respect to

*η*is one of the most involved calculations. An intermediate result isWe note that, in general,but for the base state

*p*

_{0}=

*p*

_{0}(

*η,*

*χ*), so the composite derivatives (Callen 1985) areThus, (A.3) may be written asIn summary, we findThen we haveLastly, one can show that (6.2c) holds using these results and (A.5).