Tutorials › Calculus III › From Local Sources to Net Boundary Flux

Flux and Circulation Applications · Tutorial 976 of 999

From Local Sources to Net Boundary Flux

Learn how integrating the divergence of a velocity field gives the net outward flux across a bounded solid’s boundary, and what that balance says about local sources and sinks.

Advanced 10 min read

What You'll Learn

  • Interpret divergence as local net outflow per unit volume.
  • State the conditions needed to apply the divergence theorem to a velocity field.
  • Relate integrated divergence to signed net boundary flux.
  • Compute source strength and boundary flux for bounded solids.
  • Distinguish a zero net flux from the absence of local sources and sinks.

From Local Flow to a Boundary Balance

A fluid velocity field describes motion at each point, but many questions concern the whole fluid inside a bounded region: Is more fluid flowing out than in? Are there sources adding fluid within the region, or sinks removing it? The divergence theorem connects these local and global views. It says that the net outward flow across a closed boundary equals the total source strength inside.

The word net matters. Flow leaving the region counts positively, while flow entering counts negatively. If different parts of the boundary carry flow in opposite directions, their contributions can cancel.

Divergence as Local Source Strength

Let \(\mathbf{v}=(v_1,v_2,v_3)\) be a velocity field in three-dimensional space. Its divergence at a point is the sum of the rates of change of each velocity component in its own coordinate direction.

Definition: If the component functions have continuous first partial derivatives, the divergence of \(\mathbf{v}\) is \(\nabla\cdot\mathbf{v}=\frac{\partial v_1}{\partial x}+\frac{\partial v_2}{\partial y}+\frac{\partial v_3}{\partial z}\). For a fluid velocity field, divergence is the local net outward volume flow per unit volume, in the limiting sense.

Positive divergence indicates local net outflow: more fluid leaves a sufficiently small region around the point than enters it. Negative divergence indicates local net inflow. Zero divergence means that the local net outflow per unit volume is zero; it does not by itself say that the velocity is zero.

To see why divergence has this interpretation, consider a small rectangular box centered at \((x,y,z)\), with side lengths \(\Delta x,\Delta y,\Delta z\). The outward flux through its two faces perpendicular to the \(x\)-axis is the velocity component \(v_1\) on the right face minus its value on the left face, multiplied by the face area. For a small box, the difference in those values is approximately \(\frac{\partial v_1}{\partial x}\Delta x\). Thus the net contribution from this pair of faces is approximately \(\frac{\partial v_1}{\partial x}\Delta x\Delta y\Delta z\). The two other pairs contribute approximately \(\frac{\partial v_2}{\partial y}\Delta x\Delta y\Delta z\) and \(\frac{\partial v_3}{\partial z}\Delta x\Delta y\Delta z\). Dividing the total by the box volume and taking the limit as the box shrinks gives \(\nabla\cdot\mathbf{v}\).

The Global Flux Balance

Let \(E\) be a bounded solid with a piecewise smooth, closed boundary \(\partial E\). Assume \(\mathbf{v}\) has continuous first partial derivatives on an open region containing \(E\). Let \(\mathbf{n}\) be the outward unit normal on the boundary, and let \(dS\) denote a surface area element. The divergence theorem then gives the total outward flux through the boundary as the volume integral of divergence.

Theorem: Under these conditions,
$$ \iint_{\partial E}\mathbf{v}\cdot\mathbf{n}\,dS = \iiint_E \nabla\cdot\mathbf{v}\,dV. $$

The integrand \(\mathbf{v}\cdot\mathbf{n}\) measures the velocity component perpendicular to the boundary, with outward flow positive and inward flow negative. Consequently, the surface integral is a signed net boundary flux, not the total amount of motion along the boundary.

The local-to-global connection can also be understood by dividing the solid into small pieces. Each piece has local net outflow described by its divergence. When the fluxes of all pieces are added, the contributions across every shared interior face cancel: the two adjacent pieces have opposite outward normals on that face. Only the flux across the external boundary remains. This is the cancellation behind the global balance.

Interpretation: For a fluid velocity field, \(\iiint_E\nabla\cdot\mathbf{v}\,dV\) is the signed total source strength inside \(E\). It equals the net volume flow rate out through \(\partial E\). Both sides have units of volume per time when velocity is measured in length per time.

This is a signed total. A region may contain places with positive divergence and places with negative divergence. Their contributions can partly or fully cancel in the integral. Therefore, the integral records the net source strength, not the sum of all source and sink magnitudes.

Worked Examples

Worked Example: Uniform Expansion Inside a Cube

Let \(\mathbf{v}=(x,y,z)\), and let \(E=[0,1]\times[0,1]\times[0,1]\). Find the net outward flux and verify it by checking the boundary faces.

First compute the divergence:

$$ \nabla\cdot\mathbf{v} = \frac{\partial x}{\partial x} + \frac{\partial y}{\partial y} + \frac{\partial z}{\partial z} = 1+1+1=3. $$

The cube has volume \(1\), so its total source strength is

$$ \iiint_E 3\,dV = 3(1)(1)(1) = 3. $$

To check the boundary flux directly, consider the two faces perpendicular to the \(x\)-axis. At \(x=1\), the outward normal is \((1,0,0)\), so \(\mathbf{v}\cdot\mathbf{n}=1\) over a face of area \(1\); the flux is \(1\). At \(x=0\), the outward normal is \((-1,0,0)\), but \(v_1=0\), so the flux is \(0\). The \(y=1\) and \(z=1\) faces each contribute \(1\), while the \(y=0\) and \(z=0\) faces each contribute \(0\). Thus the boundary total is \(1+1+1=3\), agreeing with the volume integral.

Worked Example: A Nonuniform Source Field in a Box

Let \(\mathbf{v}=(x^2,y,2z)\), and take \(E=[0,1]\times[0,2]\times[0,1]\). Find the total source strength, then check the result by summing the face fluxes.

The divergence is

$$ \nabla\cdot\mathbf{v} = 2x+1+2 = 2x+3. $$

Integrating over the box, first in \(x\), gives

$$ \iiint_E(2x+3)\,dV = \int_0^1(2x+3)\,dx \int_0^2dy \int_0^1dz = \left[x^2+3x\right]_0^1(2)(1) = 4(2) = 8. $$

Now check the boundary. On \(x=1\), the outward normal is \((1,0,0)\), so \(\mathbf{v}\cdot\mathbf{n}=1\). That face has area \(2\cdot1=2\), giving flux \(2\). On \(x=0\), the normal component is \(v_1=0\), so the flux is \(0\). On \(y=2\), the outward normal is \((0,1,0)\), and \(v_2=2\); the face area is \(1\cdot1=1\), giving flux \(2\). On \(y=0\), the flux is \(0\). On \(z=1\), \(v_3=2\) and the face area is \(1\cdot2=2\), giving flux \(4\). On \(z=0\), the flux is \(0\). The sum is \(2+0+2+0+4+0=8\), as required.

Worked Example: Local Sources and Sinks with Zero Net Flux

Let \(\mathbf{v}=(x^2,0,0)\) on \(E=[-1,1]\times[0,1]\times[0,1]\). Find the net outward flux and explain how it can be zero despite nonzero divergence.

The divergence is

$$ \nabla\cdot\mathbf{v} = \frac{\partial x^2}{\partial x} = 2x. $$

Therefore, the total source strength is

$$ \iiint_E 2x\,dV = \int_{-1}^{1}2x\,dx \int_0^1dy \int_0^1dz = \left[x^2\right]_{-1}^{1}(1)(1) = (1-1) = 0. $$

For a boundary check, the face \(x=1\) has outward normal \((1,0,0)\), and the flux density is \(1\); its area is \(1\), so its flux is \(1\). The face \(x=-1\) has outward normal \((-1,0,0)\). There \(v_1=1\), so the flux density is \(-1\); its area is \(1\), giving flux \(-1\). All four faces perpendicular to the \(y\)- and \(z\)-axes have zero normal velocity because the corresponding velocity components are zero. The boundary total is \(1-1=0\), agreeing with the integral.

Where \(x>0\), divergence is positive, so the field has local net outflow. Where \(x<0\), divergence is negative, so it has local net inflow. These signed contributions cancel across this solid.

A Common Sign and Meaning Mistake

In the last example, a common error is to give the face \(x=-1\) the normal \((1,0,0)\). That is not the outward normal there: the solid lies to the right of that face, so outward points in the negative \(x\)-direction. Using the incorrect normal would give flux \(+1\) at both \(x\)-faces and a false total of \(2\). The correct normal is \((-1,0,0)\), giving flux \(-1\) on \(x=-1\) and the correct net total \(0\).

Another mistake is to replace divergence by its absolute value when computing the net balance. In this example, integrating \(|2x|\) gives \(2\), but that is not the net outward flux. It counts the magnitudes of the source and sink contributions without allowing them to cancel. The signed integral of \(2x\), which is \(0\), is the quantity in the divergence theorem.

Why This Balance Matters

The theorem gives two ways to determine the same global quantity. If the velocity field is simple on the boundary but its divergence is complicated in the volume, the boundary integral may be the more direct route. If the divergence and the shape of the solid are simple, a volume integral may be easier. In either case, the result has a physical interpretation: it is the net rate at which fluid volume leaves the solid.

Keeping the local and global meanings distinct prevents overinterpretation. A positive net flux means that total outward flow exceeds total inward flow; it does not mean every point is a source. A zero net flux means the signed contributions balance; it does not mean the velocity vanishes everywhere or that sources and sinks are absent. The theorem relates the signed volume-wide total to the signed boundary total.

Check Your Understanding

Use the definitions and the global balance to answer these questions.

  1. For a velocity field, what does positive divergence indicate locally?
  2. What assumptions about the solid and the velocity field are needed for the stated divergence theorem?
  3. Why do flux contributions across interior faces cancel when a solid is divided into smaller pieces?
  4. Can a region have both positive and negative divergence while its net boundary flux is zero? Explain.
  5. Why is integrating the absolute value of divergence generally not the way to find net outward flux?