Vector calculus was built largely to describe fluids. A moving fluid has a velocity field $\mathbf{v}$, and the ideas of this course become physical laws: flux is the volume of fluid crossing a surface per second, divergence measures sources, and curl measures spin, which engineers call vorticity.
Key idea
For a fluid with velocity $\mathbf{v}$ and density $\rho$:
- Volume flow rate through $S$: $\iint_S \mathbf{v} \cdot d\mathbf{S}$. Mass flow rate: $\iint_S \rho\mathbf{v} \cdot d\mathbf{S}$.
- Conservation of mass (continuity equation): $\dfrac{\partial \rho}{\partial t} + \nabla \cdot (\rho\mathbf{v}) = 0$.
- Incompressible flow (constant density): $\nabla \cdot \mathbf{v} = 0$. Irrotational flow: $\nabla \times \mathbf{v} = \mathbf{0}$, so $\mathbf{v} = \nabla\phi$ on a region without holes.
- Both at once: $\nabla \cdot \nabla\phi = \phi_{xx} + \phi_{yy} + \phi_{zz} = 0$, Laplace's equation.
Why it works
Continuity equation: take any fixed region $E$ with surface $S$. The mass inside, $\iiint_E \rho\,dV$, changes only because mass flows across $S$:
$$\frac{d}{dt}\iiint_E \rho\,dV = -\iint_S \rho\mathbf{v} \cdot d\mathbf{S} = -\iiint_E \nabla \cdot (\rho\mathbf{v})\,dV$$
by the divergence theorem. So $\iiint_E \left[\rho_t + \nabla \cdot (\rho\mathbf{v})\right] dV = 0$ for every region $E$, and a continuous function with zero integral over every small region is ${}0$.
Worked examples
Worked example: Flow through a window
Water moves with constant velocity $\mathbf{v} = \langle 1, 2, 3 \rangle$ m/s. How much crosses the square $[0, 1] \times [0, 1]$ in the plane $z = 0$, upward, each second?
- Normal $\mathbf{k}$, area ${}1$: flow rate $= \mathbf{v} \cdot \mathbf{k} \times 1 = 3$ m$^3$/s.
- The other components run along the square and carry nothing through it.
Answer: ${}3$ m$^3$/s
Worked example: An ideal flow
Is $\mathbf{v} = \langle x, -y, 0 \rangle$ incompressible? Irrotational? Find a velocity potential.
- $\nabla \cdot \mathbf{v} = 1 - 1 + 0 = 0$: incompressible.
- $\nabla \times \mathbf{v} = \langle 0, 0, 0 - 0 \rangle = \mathbf{0}$: irrotational.
- $\phi = \frac{1}{2}(x^2 - y^2)$ has $\nabla\phi = \mathbf{v}$ and $\phi_{xx} + \phi_{yy} = 1 - 1 = 0$.
Answer: yes, yes, $\phi = \frac{1}{2}(x^2 - y^2)$
Worked example: Net outflow from a box
For $\mathbf{v} = \langle x^2, y^2, z^2 \rangle$, find the net rate at which fluid leaves the unit cube $[0, 1]^3$.
- Divergence theorem: net outflow $= \iiint (2x + 2y + 2z)\,dV$.
- Each of ${}2x$, ${}2y$, ${}2z$ averages to ${}1$ over the cube, so the answer is ${}3$.
- Positive: this flow is not incompressible; fluid must be created inside (or the density must be dropping).
Answer: ${}3$