# Derivation of the Continuity Equation for Fluids

## Homework Statement

Derive a mathematical relationship which encapsulates the principle of continuity in fluid flow.

## The Attempt at a Solution

Imagine we have a mass of fluid ## M##, of volume ##V##, bounded by a surface ##S##. If we take a small element of this volume ##dm##, we can form two equivalent expressions, in terms of the fluid density, ##\rho##.

$$dm = \rho(V) dV$$ (1)
Now, let the velocity of the fluid be ## \vec{v} ##, where ## v = v(x,y,z,t) ## (i.e ## v ## is a function of both position and time).

$$dm = \rho (\vec{v} \cdot \hat{n}) \ dA = \rho (\vec{v} \cdot \vec{dS})$$ (2)
Where ## \vec{dS} ## is the infinitesimal surface area element of ## S ## such that ## \vec{dS} = \hat{n} dA ##

So, in integral form:

$$M = \iiint \rho(V) dV = \iint \rho (\vec{v} \cdot \vec{dS})$$

Looking at how ## M ## change as a function of time:
$$\frac{dM}{dt} = \iiint \frac{d \rho(V)}{dt} dV = \iint \rho(\frac{\vec{dv}}{dt} \cdot \vec{dS})$$

But ## \vec{v} = v(x,y,z,t) ##:

$$\implies \frac{d\vec{v}}{dt} = \frac{\partial \vec{v} }{\partial t} + \frac{\partial \vec{v} }{\partial x} dx ...$$
$$\frac{d\vec{v}}{dt}= \frac{\partial \vec{v}}{\partial t} + \vec{v} \cdot (\nabla \cdot \vec{v})$$

So:
$$\frac{dM}{dt} = \iiint \frac{d \rho(V)}{dt} dV = \iint \rho \bigg(\frac{\partial \vec{v}}{\partial t} + \vec{v} \cdot (\nabla \cdot \vec{v})\bigg) \cdot \vec{dS}$$

However, since the surface ## S ## and the volume ## V ## is arbitrary, it is equally valid to write:

$$\frac{d \rho(V)}{dt} = \frac{\partial \vec{v}}{\partial t} + \vec{v} \cdot (\nabla \cdot \vec{v})$$

The trouble is that this doesn't seem to be at all the form of the continuity equation I've seen on Wikipedia! I realise you can use the divergence them to express the surface integral directly in terms of the divergence, but is the result I've got here equivalent to that?

Thank you very much!

Related Calculus and Beyond Homework Help News on Phys.org
BvU
Homework Helper
$$dm = \rho (\vec{v} \cdot \hat{n}) \ dA = \rho (\vec{v} \cdot \vec{dS})$$
What is this dm ? Wasn't ##\rho## a function of position (3 arguments, and perhaps also time) ? Now ##\vec v \cdot \hat n## is a scalar. What does it represent ?

The component of the fluid velocity flowing through the small surface element ## dA ##. ## \rho ## may be a function of position and time, but why would this make the above invalid? Since we're using an infitesimal mass, ## \rho ## might (almost) as well be a constant, no? i.e. we're effectively evaluating the density at a specific point, the centre of a very small box with sides area ## dA ##, and volume ## dV##?

BvU
Homework Helper
I see. So rho is constant, but it is a function of one component of the velocity ?
Look at your expression ance again. On the left I see something with the dimension of mass. Then in the middle it is mass/length and on the right we have mass/volume.
No can do.

You want to read up a little on how to deal with this -- it's mainly math and common sense, not complicated, but there is a lot involved.

I can't get the link to post properly (try here if it works), and else google "Anderson Governing Equations of Fluid Dynamics" for a very good expose.

Another good one is Bird, Stewart, Lightfoot: Transport phenomena (3.1 eqn of contimuity)

Ah, no that's not at all what I meant. Sorry. I must have said something confusing :P

When I first wrote the above down, I was imagining the density as just a constant. Looking back I see no problem if ## \rho = \rho(x,y,z)## since ## dm## is infinitesimal. (though $\rho$ must be independent of time). I don't think the position dependence of the density is important for the expression for ## dm##. All I mean to say with ## \vec{v} \cdot \hat{n} ## is the flow out of the surface element.

Embarassingly, as you say, I have just realised that there is an error in the dimensions.
I have:

$$[\rho (\vec{v} \cdot \hat{n} ) dA ] = [ \frac{kg}{m^{-3}} \times \frac{m}{s^{-1}} \times m^{2} ] = [kgs^{-1}]$$

Which is clearly a fault - this is not ## dm ## but ## \frac{dm}{dt} ##

So this resolves all the following issues. The following equalities are false. The expression I have got at the bottom right is an expression for ## \frac{d^{2}m}{dt^{2}} ##

Next time I will check my dimensions! I'm sorry - I'm teaching myself this and was clearly a little muddled when I wrote the initial expression.

The books look useful though. Thank you :)

BvU
Homework Helper
I don't think you can assume ##\rho## is constant. That way you limit your derivation to incompressible fluids only. Note that a fluid is "a substance that has no fixed shape and yields easily to external pressure; a gas or a liquid". Daily language says fluid=liquid, but in physics a fluid is a continuous medium.

And it looks awfully weird if you declare ##\rho## constant and then have ##\int\int\int {d^2\rho\over dt^2}\; dV## (or ##\int\int\int {d\rho\over dt}\; {dV\over dt}## ?) = . . .

Did you pick up the meaning of "Substantial derivative" ?

Chestermiller
Mentor
If should be:
$$\int_V{\frac{\partial ρ}{\partial t}dV}=-\int_S{(ρ\vec{v})\centerdot \vec{n}dS}$$
Now apply the divergence theorem:

Chet