Relating the Continuity Equation in the Eulerian Frame & Lagrangian Frame
The continuity equation in fluid dynamics says that mass is conserved throughout a fluid (mass flux in = mass flux out). Because a fluid is a continuous medium, there are different frames of reference to observe it properties, and this will affect how the continuity equation is calculated.
In the Eulerian frame of reference, we focus on a fixed region of interest and allow the fluid to flow in and out and observe its properties.
The only way to change the density within the Eulerian frame is to change the mass flux (\rho v) entered (+ mass flux) and exiting (- mass flux).
\frac{d\rho}{dt}= \nabla \cdot \rho v
where \nabla \cdot v describes the volume flux.
In the Lagrangian frame of reference, we focus on a fixed parcel of fluid and follow it through space and time as we observe its properties.
The density of the Lagrangian frame (the region defined by the parcel’s finite volume) can change either by allowing the density of the parcel to change or by moving the parcel into a region with a different density ( v\nabla \rho )
\frac{D\rho}{Dt} + \rho \nabla \cdot v= 0
The \frac{D\rho}{Dt} is the material derivative, which can be expressed in terms of the partial derivative with an additional term
\frac{D\rho}{Dt}= \frac{d\rho}{dt} + v\nabla \rho
where we can derive the Lagrangian frame of reference in terms of the Eulerian using Leibniz’s rule
\nabla \cdot (\rho v) = \rho (\nabla \cdot v) + v(\nabla \rho)
\frac{D\rho}{Dt}= -\rho(\nabla \cdot v) = -\nabla \cdot (\rho v) + v \nabla \rho
where the v \nabla \rho term is the advective transport of the parcel.
From this, we can also see how an incompressible fluid is one in which the material density is constant \frac{D\rho}{Dt} = 0 as it moves with the flow.
\frac{D\rho}{Dt}= -\nabla \cdot (\rho v) + v \nabla \rho = 0
\frac{D\rho}{Dt}= \frac{d\rho}{dt} + v \nabla \rho = 0
\frac{d\rho}{dt}= -v \nabla \rho = \nabla \cdot (\rho v)
\nabla \cdot (\rho v) = 0
In other words, an incompressible fluid is one in which there are no sources or sinks of mass flux.