Fluid Mechanics from a variational principle It is possible to define a good variational principle to describe Fluid Mechanics? If so, what is the correct treatment of the issue. I guess something like:
$$I=\int d^4x \left(\frac{1}{2}\rho v^2-P-\rho g x\right).$$
 A: This is the reason for the Lagrangian coordinates in fluid mechanics.
The velocity field is a momentum, so that the Lagrangian variational description needs the correpsonding coordinate. The corresponding coordinate is the map which tells you where each fluid particle ends up if you follow the flow up to time t. This is a diffeomorphism, and the Hamiltonian formulation is on a phase space of all diffeomorphisms and its tangent space, which is the velocity vector fields.
The kinetic energy is just the integral of the square of the velocity, and there is a pressure which is best put in by enforcing the constraint that the fluid is incompressible by Lagrange multipliers (if it is incompressible). The Lagrangian formulation is covered in many places. It is not particularly computationally convenient because the diffeomorphism generated by a flow is completely impossible to determine, and irrelevant because the diffeomorphisms are a homogenous group.
V.A. Arnold has a treatment of this point of view in his book "Topological Methods in Hydrodynamics", which is very good, and emphasizes the geometry.
A: Well, this is a huge topic, cf. e.g. Refs. 1-2 and e.g. this Phys.SE post.

*

*The simplest action functional for fluid dynamics in the Lagrangian flow picture is
$$\begin{align} I[{\bf r}] ~=~&\int \!\mathrm{d}\tau~\mathrm{d}^3{\bf a}~{\cal L},\cr
{\cal L}~=~&\frac{1}{2}\dot{\bf r}^2 - \varepsilon\left(\rho({\bf a})^{-1}, S({\bf a})\right) -\phi({\bf r} ,\tau))  
.\end{align}\tag{2.6} $$
Here ${\bf r}={\bf r}({\bf a}, \tau)$ are the position of a fluid parcel; ${\bf a}$ is the labelling coordinate of the fluid parcel; $\varepsilon$ is specific internal energy; $S$ is the specific entropy; and $\phi$ is a specific potential energy. Its EL eqs are Newton's 2nd law for the fluid:
$$\begin{align} -\ddot{\bf r}~\approx~&\rho^{-1}\nabla p +\nabla \phi, \cr  p~:=~&\frac{\partial \varepsilon }{\partial (\rho^{-1})} .\end{align}\tag{2.11}$$


*However, in practice one wants to use the Eulerian flow picture. This introduces relabelling symmetry with corresponding constraints. See e.g. Refs. 1-2 for details.
References:

*

*R. Salmon, Hamiltonian Fluid Mechanics, Ann. Rev Fluid. Mech. (1988) 225. The pdf file can be downloaded from the author's webpage.


*R.L. Seliger & G.B. Whitham, Variational principles in continuum mechanics, Proc. R. Soc. Lond. A305 (1968) 1 (Hat tip: tpg2114).
