Calculus
Gauss's Divergence Theorem
Fill a lumpy region with little boxes and ask each one the same question: how much more flow leaves you than enters you? Every inner wall is shared by two boxes, so whatever leaves one enters the other and the pair cancels. Add every box and only the outer skin is left.
a few big oneshundreds of tiny ones
Flow out through the skin—
Leak added over the boxes—
Box you picked—
…its divergence—
Gap between the two—
Click any box to open it up on the right. Red walls are flow leaving, blue walls are flow entering, and both numbers are measured from the field itself.
What to observe
- Click a box. The panel on the right opens it up and puts an arrow through each wall: red where flow pours out, blue where it pours in. Out minus in is that box's leak, and divided by its size it isdivergence, which is all divergence ever was.
- In the region itself only the skin carries arrows, because the skin is the only place the flow can actually get out. Every wall on the inside is shared by two boxes: the flow leaving one is exactly the flow entering the other.
- Tick cancel the shared walls and watch that happen. The whole grid dissolves in pairs and leaves only the outer skin, the walls with nobody on the far side. That is the theorem, and the two numbers below the picture never move while it happens.
- The number on the left never moves: it is what crosses the real boundary of the region. Drag boxes and the sum on the right creeps up to meet it, because a pile of boxes only approximates a lumpy shape until the boxes get small.
- Choose uniform: the flow marches straight through, every box is perfectly balanced, and nothing leaks out of the skin. Choose swirl: the flow is anything but boring, yet still nothing accumulates anywhere.Spinning is not spreading.
- Choose hot spot, where all the divergence sits in one lump near the middle. Only the boxes covering the lump light up, but the skin far away still reports every drop of it, because there is nowhere else for the flow to go.
Shortcuts: space run/pause · s step · r reset · f fullscreen