# Continuity equation for compressible fluid

A question is given as

Consider a fluid of density $\rho(x, y, z, t)$ which moves with velocity $v(x, y, z, t)$ without sources or sink. Show that $\nabla \cdot \vec J + \frac{\partial \rho }{\partial t} = 0 ;$ where $\vec J = \rho \vec v \hspace{0.5 cm}$ ( $\vec v$ being velocity of fluid and $\rho$ density).

In the solution it assumes, $- \nabla \cdot \vec J$ is the change in $\vec J$ within the volume element which should be equal to $\frac{\partial \rho}{\partial t}$ (why equal?). I don't understand this part and I doubt if this question is correct. I think the question should be $$\rho (\nabla \cdot \vec v) + \frac{\partial \rho}{\partial t} = 0$$ Is the question correct? If it's correct help me to understand the solution (if it's right) or please provide me correct answer. Thank you!!

I) The continuity equation without sink and sources reads

$$\frac{\partial \rho }{\partial t} + \nabla \cdot (\rho\vec v) ~=~ 0.$$

Hint on how to derive it:

1. Establish first the integral form of the continuity equation for an arbitrary (sufficiently regular) 3D spatial integration region.

2. Next use the definition of the 3D divergence to argue the differential form of the continuity equation.

The continuity equation can be rewritten with the help of a material derivative $$\frac{D \rho }{D t}$$ as

$$\frac{D \rho }{D t} + \rho \nabla \cdot \vec v ~=~ 0.$$

II) For an incompressible fluid, the density $$\rho$$ of a certain fluid parcel does not change as a function of time,

$$\frac{D \rho }{D t}~=0.$$

If the density $$\rho\neq 0$$, an incompressible fluid then has a divergencefree flow

$$\nabla \cdot \vec v~=~0.$$

• To quickly comment here, $\nabla \cdot \vec{v} = 0$ is not primarily what defines an incompressible fluid; if a fluid can't be compressed, then it can't be decompressed either, and so $D\rho/Dt = 0$. Plugging that into the continuity equation you've rewritten, you get $\nabla \cdot \vec{v} = 0$ as a consequence, since we assume $\rho > 0$ (i.e. matter exists in the system). I'm being nitpicky, but the point is that $D\rho/Dt = 0$ defines incompressibility, while the continuity equation establishes the equivalence $D\rho/Dt = 0 \leftrightarrow \nabla \cdot \vec{v} = 0$.
– Erik
Sep 17 at 15:45
• Hi @Erik. Thanks for the feedback. I updated the answer accordingly. Sep 17 at 16:38