The fluid equaitons from Eulerian to Lagrangian coordinates
Given a set of fluid equations in Eulerian coordinates, how do we transform this set of equations to a set of equations in Lagrangian coordinates? Following [MPS97, pp. 85-87], let us consider the equations governing the motion of one-dimensional motion of isentropic ideal gas:
The continuity equation reads
$$(1)\hspace{30pt} \rho_t+(\rho u)_x = 0; $$
The momentum equation reads
$$(2)\hspace{30pt} \rho(u_t +uu_x)+P_x =0;$$
where $\rho$ is the density, $u$ is the velocity, and $P$ is the pressure depending only on the density $\rho$.
In order to write $(1)(2)$ in Lagrangian coordinates, let us introduce the trajectory equation of the liquid particle
$$(3)\hspace{30pt} \frac{dx}{d\tau}=u(x,\tau),$$
with the initial condition $x(0)=\eta$. The the coordinates change is defined by
$$(4)\hspace{30pt}(\eta, \tau) \mapsto (x,t)=(x(\eta, \tau), \tau).$$
Using $(1)$, we find
$$(5)\hspace{30pt}\frac{d\rho}{d\tau} = \rho_t + \rho_x u = -\rho u_x,$$
and differentiating $(3)$ with respect to $\eta$ gives
$$(6)\hspace{30pt} \frac{d}{d\tau}(\frac{\p x}{\p\eta})=u_x(x,\tau)\frac{\p x}{\p\eta}.$$
From $(5)(6)$, by eliminating $u_x$, we obtain that
$$\frac{d}{d\tau}\big(ln (\rho \frac{\p x}{\p\eta})\big) = 0,$$
which implies that
$$\rho(x(\eta,\tau),\tau) \frac{\p x}{\p\eta} =\rho_0(\eta).$$
Therefore, the Jacobian matrix of the transformation $(4)$ read
\begin{equation}(7)\hspace{30pt}
\frac{\p(x,t)}{\p(\eta,\tau)}=
\begin{pmatrix}
\rho_0/\rho & u ~\\
0 &1
\end{pmatrix}
\end{equation}
With $(7)$ at our disposal, it is easy to rewrite $(1)(2)$ in $(\eta, \tau)$-variables (Lagrangian coordinates):
\begin{equation}
(8)\hspace{30pt}
\begin{cases}
\rho_\tau + (\rho^2/\rho_0) u_\eta = 0;~\\
\rho_0 u_\tau + P_\eta=0.
\end{cases}
\end{equation}
=== References
#[MPS97] Meirmanov, A. M. and Pukhnachov, V. V. and Shmarev, S. I. : //Evolution equations and Lagrangian coordinates.// de Gruyter Expositions in Mathematics, **24**. Walter de Gruyter & Co., Berlin, 1997. xiv+311 pp