I'm struggling with Hamiltonians and PDE. My question is loosely based on the PDE of this paper by Figalli, Gangbo and Yolcu.
Before asking a question, let me spell out some prior knowledge, coming from the Wikipedia page on the Hamiltonian:
- In Hamiltonian mechanics a system is described by canonical coordinates $(q,p)$: for simplicity lets think of $q$ as position in $\mathbb{R}^d$ and $p$ the momentum (of a particle).
- The Hamiltonian of the system captures the change in time of these coordinates. Hamilton's equations are \begin{align} \frac{dp}{dt}=&-\frac{\partial H}{\partial q} \\ \frac{dq}{dt}=&\frac{\partial H}{\partial p} \end{align} If $H=\frac{p^2}{2m}+V(q)$ where ($m$=mass and $V$ is some energy potential) then Hamilton's equations say that the time derivative of position is velocity (i.e Newton's 2nd Law), and the change in momentum is equal to the negative gradient of the potential energy (i.e. the system tries to minimize energy).
Now in the paper by Figalli et al referenced above, they study the following PDE
$$
\partial_t \rho_t(x)=-\text{div}\Big(\rho_t(x)\nabla_p H\big(x,-\rho_t^{-1}(x)\nabla P(\rho_t(x)) \big)\Big),
$$
where $\rho_t$ is interpreted as the density of a fluid at time $t$, and they call $P$ its pressure.
Moreover, the Hamiltonian is customarily chosen as depending only on its second argument, i.e.
$$
H(x,p)=H(p)=\frac{1}{2}\|p\|^2,
$$
(note in this case if we pick $P(a)=a$ then we get the heat equation $\partial_t \rho_t(x)=\Delta\rho_t(x)$).
Question:
My confusion is why they call $H$ the Hamiltonian: how does it relate to the Hamiltonian I described above? Generally how to write a PDE for a density?
Moreover, since $\rho_t$ only acts on $x$, why does the Hamiltonian depend on the second coordinate?
The Euler equations for an inviscid fluid are an example of an Hamiltonian system if all the forces involved are conservative and the following relationship exists between pressure $P$ and fluid density $\rho_t$ (for smooth, real-valued functions $\rho_t\in C^k(\mathbb{R}\times\mathbb{R}^3)$ and $P$ defined on $\mathbb{R}^3$ and with $d$ the exterior derivative) \begin{equation} \begin{aligned} d \rho_t\wedge dP &= 0 \\ \iff(\partial_y\rho\partial_z P - \partial_z \rho\partial_y P) dydz +(\partial_z\rho\partial_x P - \partial_x \rho\partial_z P)dzdx + (\partial_x\rho\partial_y P - \partial_y\rho\partial_x P)dxdy&=0 \\ \iff (\nabla\rho_t \times \nabla P)\cdot dS&=0, \end{aligned} \end{equation} where in the second line, $\rho_t:= \rho$ and $\partial/\partial x := \partial_x$ (similarly for $y$ and $z$), while $dS:=(dydz,dzdx,dxdy)$ is an infinitesimal surface element dotted into the cross product. Euler fluids satisfy a conservation equation $$\partial_t\rho_t + \mathrm{div}(\rho_tV_t)=0, $$ where $V_t$ is identified as the velocity field of the fluid; in many cases, this is a smooth, non-singular vector field on some simply connected region $\Omega\subset\mathbb{R}^3$.
In the paper you cite, found below equation (1.1), they explicitly define the product of fluid density and the velocity field as the argument you have inside the divergence. Assuming $d\rho_t\wedge dP=0$ (an isothermal-like condition), the Euler equations $$\underbrace{\partial_t V_t+(V_t\cdot\nabla)V_t}_{:=D_t V_t} - F = \frac{1}{\rho_t}\nabla P,$$ where $F$ is a another smooth, conservative vector field on the same region, can then be written as $$D_t V_t = -\nabla (U+\alpha),$$ since there exists a smooth map we call potential $U:\Omega\rightarrow \mathbb{R}$ satisfying $F=-\nabla U$. Since we also require $d\rho_t\wedge dP=0$, we may take $\alpha$ to be understood as the Volterra-type integral $$\alpha:=\int_{(0,0)}^{(t,x)}\frac{dP}{\rho_t}\Rightarrow d\alpha = \frac{dP}{\rho_t}.$$
The Hamiltonian is then defined as the sum of kinetic and potential energies $$ H = \frac{1}{2}(V_t\cdot V_t) + (U+\alpha),$$ where only the first term has velocity-dependence and only the second term $(U+\alpha)$ has positional dependence (explicitly, $V_t\in\ker\partial_q$ and $(U+\alpha)\in\ker\partial_p$). That is, we consider $q\in \Omega$ as the position vector at which the velocity field $V_t$ is defined for time $t$ so that component-wise $\partial_t q = V_t = \partial H/\partial V_t$. For the sake of notation, write the velocity field $V_t := p$ so that we can also write Hamilton's equations $$\partial_t p = -\dfrac{\partial H}{\partial q}\hspace{0.5cm}\text{and}\hspace{0.5cm}\partial_t q = \dfrac{\partial H}{\partial p}.$$
The first of the equations explains why one may replace the velocity field $V_t$ with the gradient ($\nabla_p$) of a Hamiltonian. As far as why the second coordinate of the Hamiltonian is of the form $-\rho_t^{-1}\nabla[P(\rho_t)]$, one may identify this by raising the 1-form $$d\alpha=\frac{dP}{\rho_t}=\rho_t^{-1}(\partial_x P dx + \partial_y Pdy + \partial_z Pdz)$$ to $\rho_t^{-1}\nabla P$.