# Equation of Continuity: Why should mass be conserved?

If I have a pipe with a fluid in it, and I consider the constraints the pipe puts on my situation, I am able to see only one: the volume of the pipe, is fixed. So, no matter what I throw in, and what comes out, the volume of the fluid inside the pipe should be the same.

An alternative visualisation: the pipe is a godown. You fill it up with sand. The godown is full. Now you continue to throw stuff in, and obviously, equal volume as the entering volume has to be vacated (through a broken window or something. This is, of course just an illustration). Whether you throw in one cubic metre of iron or one cubic metre of hay, the godown just doesn't care! It'll throw out one cubic metre of sand to accommodate whatever you threw in.

Considering a steady flow, i.e., the speed and density of the fluid are functions of position, not time, I conclude that the volume entering the pipe, should be equal to the volume leaving the pipe, and thus $$A_1V_1=A_2V_2,$$ where $A_{i}$ and $V{i}$ correspond to the area of cross sections and speeds of flow at the two ends of the pipe I have. Make the pipe infinitesimally small, and a differential form is obtained, with zero consideration for mass conservation.

I know I must be terribly mistaken. If someone could show me the mistake in this reasoning, it would be most helpful.

Edit: Here's something I thought of.

This is what I had said initially:

Considering a steady flow, i.e., the speed and density of the fluid are functions of position, not time...

Now... The godown example which I used, does not, strictly speaking, satisfy this criterion. As iron or hay (or whatever) is thrown in, the amount of sand available in the godown decreases, and after a certain amount of time, when all the sand is pushed out, THEN you have a steady flow.

In a steady flow, technically, having different mass flow rates would mean that mass is being created/destroyed somewhere within the pipe (existence of mass source/sink). In case we don't have such an arrangement available to us, mass must be conserved. So, the anomaly seems to be resolved.

• Could you please elaborate how you found that the godown example was not actually steady flow ? What do you mean, when you say that 'the amount of sand available in the godown decreases' ? [I have your same query in my mind, unresolved] – Zam Sep 21 '19 at 3:33

The logical step you seem to be missing is the expansion or contraction of the stuff within the godown. If the flow of stuff is steady, it is indeed total mass flux into the godown (and not volume flux) that is zero. If you are putting stuff in at high density and removing it at low density, then at the entry point, the volume flux has a smaller magnitude than at the exit point. The discrepancy is made up for by expansion of the stuff that's already inside. This does not mean that the density at any point changes: it clearly can't in a steady flow. It is helpful to imagine following a parcel of stuff from entry to exit. This parcel has boundaries that move with the stuff, so it always consists of the same material. Because the density is lower when it exits, it must expand along the way. As the flow is steady, the entry and exit fluxes are constant in time, and so bear the same relation to each other whether we compare them simultaneously or with a lag. Conceptually, things become clearer if you let that lag equal the amount of time it takes a parcel of stuff to move through the godown. Clearly, the mass of the parcel remains constant, and its volume does not. The time it takes the parcel to enter must equal the time it takes to exit, or the number of parcels in the godown would not be constant in time. So total mass flux into the godown must be zero.

Conservation of mass can be written:$$\nabla \cdot (\rho \mathbf{u}) = 0.$$ This can be expanded: $$\rho \nabla \cdot \mathbf{u} + \mathbf{u} \cdot \nabla \rho = 0.$$ The first term on the left hand side describes the expansion or compression of stuff in place. It is zero in steady flow. The second term is expansion or compression due to the advection of fluid from a location where the density is different. In compressible fluids, it is nonzero even in steady flows.

• "The logical step you seem to be missing is the expansion or contraction of the stuff within the godown." Well, when there's stuff being thrown in at the inlet, if its a steady flow, density at the inlet, and throughout the godown, is not a function of time, is it? So, talking about the differential equation for flow... Could you please sort this out? Also, "The time it takes the parcel to enter must equal the time it takes to exit, or the number of parcels in the godown would not be constant in time." I am unable to fully comprehend this statement. – Shekhar Upadhyay Feb 12 '18 at 3:07
• I tried to explain a bit further. At no point is the density a function of time. A "parcel" is just a certain amount of stuff. It can expand, contract, change shape, but it's always the same stuff. If the same total amount of stuff is to stay the same, a parcel must take the same time to enter as to leave. Does this not make sense? – Ben51 Feb 12 '18 at 5:33

The continuity equation reads: $\nabla \cdot \vec{j} + \frac{\partial}{\partial t}\rho = 0$ ($\vec{j}$ is flow vector and $\rho$ is mass density function). What you have done it's to prove that $\nabla \cdot \vec{j} = 0$ (because if you close the pipe into a closed surface, the flow in, it's the same to the flow out, so the total flow is zero) and then it leads to $\frac{\partial}{\partial t}\rho$ must be zero i.e the mass is conserved.