Case Study 1 — Reading a River: Divergence and Curl of a Fluid Flow
Field: Fluid dynamics, environmental engineering, hydrology
A municipal water district has hired you to study a shallow tidal channel where a river meets a bay. Their concern is practical: a sensor moored mid-channel keeps drifting, sediment piles up on one bank, and a dye-tracer study showed plumes that twist as they travel. The district's engineers can measure the surface velocity of the water on a grid, but they cannot interpret it. Your job is to turn a field of velocity arrows into two numbers at every point — divergence and curl — that say, in the local language of the flow, "is water spreading or piling up here?" and "is it spinning here?" This is exactly the work of §34.4 and §34.5, applied to a real channel.
The velocity field
After fitting the gridded measurements, the engineers hand you a smooth model of the surface velocity (in meters per second, with $x$ pointing downstream and $y$ across the channel):
$$\mathbf{u}(x,y) = \langle\, x - y,\ \; x + y \,\rangle.$$
This is deliberately simple — a linear field — because a linear model is the first-order (tangent-plane) approximation to any smooth flow near a point, the multivariable echo of the linear approximation from earlier in the book. If we understand its divergence and curl, we understand the local behavior of every smooth flow, because near any point the flow looks linear.
Before computing anything, look at the arrows. At the origin $\mathbf{u}(0,0) = \langle 0,0\rangle$: the origin is a stagnation point, a place where the water is momentarily still. Just downstream at $(1,0)$, $\mathbf{u} = \langle 1, 1\rangle$ — water moving downstream and toward the far bank. Across the channel at $(0,1)$, $\mathbf{u} = \langle -1, 1\rangle$ — pointing back upstream and across. The arrows seem to both fan outward and wheel around. The whole point of divergence and curl is to separate those two impressions cleanly.
Divergence: is water accumulating?
The divergence of a planar field $\mathbf{u} = \langle P, Q\rangle$ is $\nabla\cdot\mathbf{u} = P_x + Q_y$. With $P = x - y$ and $Q = x + y$,
$$P_x = \frac{\partial}{\partial x}(x - y) = 1, \qquad Q_y = \frac{\partial}{\partial y}(x + y) = 1,$$
$$\nabla\cdot\mathbf{u} = 1 + 1 = 2.$$
The divergence is $+2$ everywhere — a positive constant. Physically, this says every point of the model behaves like a source: more water flows out of any small region than flows in. Recall the balloon picture from §34.4 — a tiny co-moving blob of water swells at a fractional rate equal to the divergence. A divergence of $2$ per second means a small patch of surface expands by roughly $2$ percent in area every hundredth of a second.
Here is the moment to be a careful modeler rather than a calculator. Real water in a shallow channel is very nearly incompressible, and an incompressible two-dimensional flow must have $\nabla\cdot\mathbf{u} = 0$. A constant divergence of $+2$ therefore cannot be the whole story. The resolution is physical: the surface velocity can have positive 2D divergence if water is welling up from below (the surface spreads as fluid rises into it) or, more prosaically, if the channel is shallowing so the same volume flux must spread over a thinner sheet. The math has flagged something real. The positive divergence is the fingerprint of the upwelling the engineers suspected near the river mouth, and it explains the sediment deposition: where the surface flow diverges, suspended sediment slows and drops out.
A modeling flag. We do not silently "fix" the model to make it divergence-free. The nonzero divergence is information. In §34.4 we noted that incompressible flow forces $\nabla\cdot\mathbf{u}=0$; when a fitted surface field violates that, it is telling you the flow is not purely horizontal — there is vertical motion the 2D snapshot cannot show.
Curl: is the water spinning?
The scalar curl of a planar field is $\nabla\times\mathbf{u} = Q_x - P_y$ (the $\mathbf{k}$-component; the only one that survives in 2D, §34.5). With the same $P$ and $Q$,
$$Q_x = \frac{\partial}{\partial x}(x + y) = 1, \qquad P_y = \frac{\partial}{\partial y}(x - y) = -1,$$
$$\nabla\times\mathbf{u} = Q_x - P_y = 1 - (-1) = 2.$$
The curl is $+2$ everywhere as well — positive, so the flow rotates counterclockwise, and (by the §34.5 rule that curl magnitude is twice the local angular speed) the water spins at angular velocity $1$ radian per second about every point. This is the twist the dye study saw: a tracer blob does not just drift, it rotates as it goes, completing a full turn roughly every $2\pi\approx 6.3$ seconds. The moored sensor drifts because it sits in a flow that is simultaneously spreading it outward and carrying it around.
Notice what the two operators have accomplished. The same arrows that looked like a confusing blend of "fanning out" and "wheeling around" decompose into exactly two scalars: divergence $2$ (the spreading) and curl $2$ (the spinning). This is the decomposition promised in §34.5's Math Major Sidebar — the velocity gradient matrix
$$\frac{\partial u_i}{\partial x_j} = \begin{pmatrix} P_x & P_y \\ Q_x & Q_y\end{pmatrix} = \begin{pmatrix} 1 & -1 \\ 1 & 1\end{pmatrix}$$
splits into a symmetric part (whose trace, $P_x + Q_y = 2$, is the divergence — the stretching) and an antisymmetric part (whose off-diagonal, $\tfrac12(Q_x - P_y) = 1$, is the vorticity, half the curl — the rotation). Two numbers, fully read.
Streamlines: where does a particle actually go?
The engineers' deepest question is operational: if a contaminant spills at point $(1,0)$, where does it travel? That is a streamline, the curve $\mathbf{r}(t)$ with $\mathbf{r}'(t) = \mathbf{u}(\mathbf{r}(t))$ from §34.3. Here the system is
$$\dot x = x - y, \qquad \dot y = x + y.$$
We do not need a full solution to read the qualitative answer off divergence and curl. Positive divergence pushes particles outward from the stagnation point; positive curl winds them around it counterclockwise. The combination is an outward-winding spiral. (Solving the linear system confirms it: the coefficient matrix has eigenvalues $1 \pm i$, whose positive real part gives exponential growth in radius — outward — and whose imaginary part gives rotation — the winding. A spilled contaminant spirals outward and downstream.) The district can now predict the plume's path without waiting for another dye release.
Computational check (hand-verified output). Using the §34.10 sympy helpers:
python import sympy as sp x, y = sp.symbols('x y') P, Q = x - y, x + y div = sp.diff(P, x) + sp.diff(Q, y) # divergence crl = sp.diff(Q, x) - sp.diff(P, y) # scalar curl print(div, crl) # 2 2The machine returns2 2, confirming our hand computations of both operators.
What the two numbers bought the district
From a featureless field of arrows, two derivatives extracted an actionable picture. The positive divergence localized the upwelling and explained the sediment deposition — telling the district where to dredge. The positive curl quantified the rotation that the dye study saw and that drags the moored sensor — telling them to re-anchor downstream of the rotational core. And the sign of the two together predicted the spiral streamlines a spill would follow. None of this required solving the full Navier–Stokes equations of §34.11; the local operators were enough. That is the everyday power of divergence and curl: they read the local grammar of any flow.
Discussion Questions
- The model has constant divergence $+2$ and we argued this signals vertical upwelling. What additional measurement would let you confirm that interpretation, and how would a truly incompressible 2D model ($\nabla\cdot\mathbf{u}=0$) look different in the data?
- Suppose a refined model gave $\mathbf{u} = \langle x - y,\ x + y\rangle$ near the mouth but $\mathbf{u} = \langle -y, x\rangle$ far downstream. Compute the divergence and curl of the second field. How does the contaminant's fate differ in the two regions?
- The curl came out $+2$, meaning angular speed $1$. Re-derive why curl is twice the angular speed using the rigid-rotation field $\langle -y, x\rangle$ (which spins at angular velocity $1$ and has curl $2$).
- Is this velocity field conservative? Apply the curl test (§34.6). What does your answer say about whether the flow could come from a velocity potential?
Annotated Further Reading
- Stewart, Calculus: Early Transcendentals, §16.1 and §16.5 — vector fields, then divergence and curl with fluid interpretation; the worked source/rotation fields parallel this case.
- OpenStax Calculus Volume 3, §6.1 and §6.5 — "Vector Fields" and "Divergence and Curl," including the incompressibility condition $\nabla\cdot\mathbf{u}=0$ used above.
- Acheson, Elementary Fluid Dynamics, ch. 1 — vorticity ($\tfrac12\nabla\times\mathbf{u}$) and the strain/rotation decomposition of the velocity gradient, the rigorous version of our "two numbers" split.