I know the equation can be written in this way:
$$\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho \vec{v})=0$$
How can i write this equation to $$\frac{\partial \rho}{\partial t} + \rho \nabla \cdot ( \vec{v})=0$$
I know the equation can be written in this way:
$$\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho \vec{v})=0$$
How can i write this equation to $$\frac{\partial \rho}{\partial t} + \rho \nabla \cdot ( \vec{v})=0$$
In general, $\nabla \cdot (\rho \vec v)=\nabla (\rho) \cdot \vec v+\rho \nabla \cdot (\vec v)$. If $\nabla \rho =0$, then
$$\nabla \cdot (\rho \vec v)=\rho \nabla \cdot (\vec v)$$
Note that $\nabla \rho =0$ implies that $\rho$ does not depend on the spatial coordinates.