From Local Flow to Boundary Flux
A velocity field describes the motion of fluid at each point. Its divergence measures a local tendency for flow to spread outward or converge inward. This gives a precise test for incompressibility: in the usual constant-density setting, an incompressible velocity field has zero divergence at every point in the region of interest.
The same local quantity also determines the total outward flux through a closed boundary. The Divergence Theorem converts the flux across that boundary into a volume integral of divergence. Thus a pointwise condition on the velocity field has a direct consequence for the net flow across any suitable closed surface surrounding a fluid region.
Each derivative pairs a component with the coordinate in its own direction: the \(x\)-component is differentiated with respect to \(x\), the \(y\)-component with respect to \(y\), and the \(z\)-component with respect to \(z\). Divergence is a scalar field, so its value may vary from point to point.
What the Zero-Divergence Condition Says
Incompressibility is a local, pointwise condition. At each point, the sum of the three indicated partial derivatives must be zero. A positive divergence indicates a local outward tendency; a negative divergence indicates a local inward tendency. Zero divergence means there is no net local source or sink of volume flow.
This statement concerns the velocity field, not whether the fluid is stationary. A fluid can move rapidly while having zero divergence. Nor does zero divergence require each derivative in the sum to vanish separately: nonzero contributions can cancel.
Why Divergence Determines Closed-Boundary Flux
For a closed surface \(S\) bounding a solid region \(E\), let \(\mathbf{n}\) denote the outward-pointing unit normal. The outward flux of \(\mathbf{v}\) across \(S\) is the surface integral of \(\mathbf{v}\cdot\mathbf{n}\). If \(\mathbf{v}\) has continuous first partial derivatives on an open set containing \(E\), and \(S\) is a piecewise-smooth closed boundary, the Divergence Theorem applies:
The theorem explains the connection: the total outward flow across the boundary equals the accumulated divergence throughout the enclosed volume. If divergence is zero everywhere in \(E\), the volume integral is zero, so the net outward flux is zero. Individual parts of the boundary can still have nonzero flux; the positive and negative contributions balance.
Differentiate each component with respect to its matching coordinate and add the results.
Check whether the resulting scalar is zero at every point of the region.
When the Divergence Theorem hypotheses hold, integrate divergence over the enclosed volume to obtain net outward flux.
This implication also has a useful local converse. Suppose a continuously differentiable field has zero net outward flux across the boundary of every sufficiently small subregion around each interior point. By the Divergence Theorem, the integral of its divergence over each such subregion is zero. If divergence were positive at some point, continuity would make it positive in a small neighborhood, giving a positive integral there; negative divergence would similarly give a negative integral. Both contradict zero integral. Therefore the divergence must vanish at every interior point.
Worked Examples
Worked Example: A Linear Incompressible Field
Test \(\mathbf{v}(x,y,z)=\langle 2x,-2y,3\rangle\) for incompressibility, then determine its net outward flux across the box \(E=[0,1]\times[0,2]\times[0,3]\).
Here \(P=2x\), \(Q=-2y\), and \(R=3\). Differentiate in the matching coordinates:
The divergence vanishes everywhere, so the field is incompressible. The box has a piecewise-smooth closed boundary, and the field is continuously differentiable there. Its volume is \(1\cdot2\cdot3=6\), so the Divergence Theorem gives
Check by adding the face fluxes. On \(x=1\), the outward flux is \(2\) times the face area \(2\cdot3=6\), giving \(12\); on \(x=0\), it is \(0\). On \(y=2\), the \(y\)-component is \(-4\), and the outward normal points in the positive \(y\)-direction, giving flux \(-4(1\cdot3)=-12\); on \(y=0\), it is \(0\). On \(z=3\), the flux is \(3(1\cdot2)=6\); on \(z=0\), it is \(-3(1\cdot2)=-6\). The total is \(12-12+6-6=0\), as predicted.
Worked Example: A Nonlinear Incompressible Field
Test \(\mathbf{v}(x,y,z)=\langle x^2,-2xy,0\rangle\) on the unit cube \(E=[0,1]^3\), and find the net outward flux through its boundary.
The components are \(P=x^2\), \(Q=-2xy\), and \(R=0\). Thus
The field is incompressible throughout the cube. Since the cube has volume \(1\), the Divergence Theorem gives net outward flux \(\iiint_E0\,dV=0\).
For a direct check, on \(x=1\) the outward flux is \(\int_0^1\int_0^1 1\,dy\,dz=1\); on \(x=0\), it is \(0\). On \(y=1\), the outward flux is \(\int_0^1\int_0^1(-2x)\,dx\,dz=-1\); on \(y=0\), it is \(0\). The field has zero \(z\)-component, so both \(z\)-face fluxes are zero. Adding gives \(1-1=0\), confirming the theorem’s result.
Worked Example: Nonzero Divergence and Positive Net Flux
For \(\mathbf{v}(x,y,z)=\langle x,y,z\rangle\), determine the divergence and net outward flux from the unit cube.
Each component differentiates to \(1\) in its matching coordinate:
The field is not incompressible. The Divergence Theorem gives
Check directly: the face \(x=1\) contributes \(1\), while \(x=0\) contributes \(0\). The faces \(y=1\) and \(z=1\) each contribute \(1\), and the faces \(y=0\) and \(z=0\) each contribute \(0\). Their sum is \(1+1+1=3\), matching the volume calculation.
Zero Net Flux Does Not Always Mean Incompressibility
It is important not to reverse the main implication carelessly. Zero divergence throughout a region guarantees zero net flux through its closed boundary. But zero net flux for one particular region does not guarantee zero divergence throughout that region. Divergence can take both positive and negative values whose volume integrals cancel.
Worked Example: Zero Net Flux with Nonzero Divergence
Consider \(\mathbf{v}(x,y,z)=\langle x^2/2,0,0\rangle\) on \(E=[-1,1]\times[0,1]\times[0,1]\). Its divergence is
This is not identically zero, so the field is not incompressible on \(E\). Nevertheless, its volume integral is
because \(\int_{-1}^1x\,dx=0\). The Divergence Theorem therefore gives net outward flux zero. Directly, the face \(x=1\) contributes \(1/2\), and \(x=-1\) contributes \(-1/2\), since its outward normal points in the negative \(x\)-direction. The other four faces contribute zero because their normal directions are perpendicular to the field. The total is \(1/2-1/2=0\), even though divergence is nonzero at most points in the region.
A Common Error: Adding Components Instead of Derivatives
Divergence is not the sum of the velocity components. For example, take \(\mathbf{v}(x,y,z)=\langle x,-x,0\rangle\). A mistaken calculation might add the component expressions and conclude \(x+(-x)+0=0\). But that is not the definition of divergence. The correct calculation is
The field is not incompressible. The correction is to differentiate each component with respect to its own coordinate before adding. The \(y\)-component \(-x\) has no dependence on \(y\), so its contribution is zero, even though its value is not generally zero.
Why the Test Matters
The divergence test translates the qualitative idea of an incompressible flow into a calculation that can be checked point by point. Once zero divergence is established, the Divergence Theorem immediately supplies the net-flux result for every appropriate closed boundary in the region. Conversely, a computed net flux can reveal the accumulated divergence inside a solid, while not by itself proving that the field is incompressible at every point.
Check Your Understanding
Use the definition of divergence and the closed-boundary flux connection to answer these questions.
- Compute the divergence of \(\mathbf{v}(x,y,z)=\langle 3x,-y,2z\rangle\). Is the field incompressible?
- If a continuously differentiable field has zero divergence everywhere inside a box, what is its net outward flux across the box boundary, and which theorem justifies the conclusion?
- For \(\mathbf{v}(x,y,z)=\langle x^2,-2xy,0\rangle\), show which two terms cancel in the divergence calculation.
- Why does zero net flux across one closed boundary fail to prove that divergence vanishes at every point inside?
- For \(\mathbf{v}(x,y,z)=\langle x,-x,0\rangle\), identify the incorrect component-sum calculation and compute the correct divergence.