# Volumetric flow in a pipe from velocity

I think I'm missing something important here.

For a fluid with a velocity $$u$$ in a pipe with cross section area $$S$$, the volumetric flow rate is equal to:

$$Q_v = uS$$

If we now consider vectors, the volumetric flow rate is:

$$Qv = \int \vec{u} ·\vec{n} dS$$

Where $$\vec{n}$$ is the normal vector to the cross sectional area. For example putting numbers, considering only one axis $$x$$:

$$\vec{u} = 10 \vec{i} \qquad \vec{n} = \vec{i} \qquad S = 10 \\ Qv = 100$$

However from the divergence theorem we know that:

$$\int \vec{u} · \vec{n} dS = \int \nabla · \vec{u} dV$$

And for incompressible fluids $$\nabla · \vec{u} = 0$$, so it would give $$Q_v = 0$$.

Obviously i'm doing something very wrong here, but I cannot see what. Am I considering something wrong in these equations? Is the normal vector in the divergence theorem refering to another surface in this case, or to both surfaces, these being, both $$\vec{n} = \vec{i}$$ and $$\vec{n} = -\vec{i}$$?

The divergence theorem only applies to a closed surface that encloses the volume $$V$$.
If you construct a closed surface by "shrink wrapping" a section of pipe and closing off both ends, enclosing a volume $$V$$, the volumetric flow out the complete surface is zero, because the flow into one end is equal and opposite to the flow into of the other end - i.e. whatever goes into one end must come out of the other end.
• I see, so in the possible clossed surface, the normal vector would be both $\vec{i}$ and $-\vec{i}$, and so it would give 0 as well. Thank you :) Jan 5 '19 at 22:49