Artificial Intelligence 🤖
Divergence theorem

Divergence theorem

The divergence theorem, sometimes referred to as Gauss' theorem, has many physical applications like, for example, in the derivation of conservation laws (e.g. it can be used to describe the mass transport rate through a closed surface). Integrating over a closed surface gives the net mass change per unit time going in and out of the surface. The divergence theorem therefore is concerned with closed surfaces so, again, let us get some definitions out of the way before we state the theorem. A closed surface is a surface which completely encloses a volume. We take a positive orientation to be the one for which the normal vector n\boldsymbol{n} points away from the interior (see Fig. 2.13).

Figure 2.13: A region enclosed by a surface S\mathcal{S} shown with an outward pointing normal, n\boldsymbol{n}, indicating positive orientation.

Divergence theorem

Let S\mathcal{S} be a positively-oriented closed surface with interior V\mathcal{V}, and let F\boldsymbol{F} be a continuously differentiable vector field in a domain containing V\mathcal{V}. Then,

SFdS=VdivFdV.\oiint_{\mathcal{S}} \boldsymbol{F} \cdot d \boldsymbol{S}=\iiint_{\mathcal{V}} \operatorname{div} \boldsymbol{F} d V .

Example 2.16 Verify the divergence theorem (given by Theorem 2.11) for the vector field F=(x,y,z)\boldsymbol{F}=(x, y, z) over the sphere V\mathcal{V} of radius aa, centered at the origin.

Solution To verify the theorem, we need to show that the leftand right-hand sides of Eq. (2.118) are equal. We start with the divergence integral.

VdivFdV=VFdV=V3dV\iiint_{\mathcal{V}} \operatorname{div} \boldsymbol{F} d V=\iiint_{\mathcal{V}} \nabla \cdot \boldsymbol{F} d V=\iiint_{\mathcal{V}} 3 d V

Note: you may want to compute the RHS of Eq. (2.119) in cylindrical or better yet, spherical coordinates to avoid the need of trigonometric substitutions. For this example however, we just use the fact that the volume of a sphere of radius aa is 4πa33\frac{4 \pi a^{3}}{3} and hence the divergence integral [Eq. (2.119)] gives 4πa34 \pi a^{3}. Next, we compute the flux integral given by the LHS of Eq. (2.118). By rewriting this as:

SFdS=SFndS\oiint_{\mathcal{S}} \boldsymbol{F} \cdot d \boldsymbol{S}=\oiint_{\mathcal{S}} \boldsymbol{F} \cdot \boldsymbol{n} d S

we now need to define the unit outward normal to the surface. The surface S\mathcal{S} is the surface with the function f(x,y,z)=x2+y2z2a2=0f(x, y, z)=x^{2}+y^{2}-z^{2}-a^{2}=0. Its outward unit normal vector is:

n=ffn=(x,y,z)a\boldsymbol{n}=\frac{\nabla f}{|\nabla f|} \Rightarrow \boldsymbol{n}=\frac{(x, y, z)}{a}

it follows that:

Fn=(x,y,z)(x,y,z)aFn=x2+y2+z2aFn=a\boldsymbol{F} \cdot \boldsymbol{n}=(x, y, z) \cdot \frac{(x, y, z)}{a} \Rightarrow \boldsymbol{F} \cdot \boldsymbol{n}=\frac{x^{2}+y^{2}+z^{2}}{a} \Rightarrow \boldsymbol{F} \cdot \boldsymbol{n}=a

Finally, substituting in Eq. (2.120), yields:

SFndS=aSdS=2aS1dS,\oiint_{\mathcal{S}} \boldsymbol{F} \cdot \boldsymbol{n} d S=a \oiint_{\mathcal{S}} d S=2 a \oiint_{\mathcal{S}_{1}} d S,

where S1\mathcal{S}_{1} denotes the surface of the upper hemisphere. The surface area of a hemisphere of radius aa is 2πa22 \pi a^{2} and hence,

2aS1dS=4πa3.2 a \oiint_{\mathcal{S}_{1}} d S=4 \pi a^{3} .

\Rightarrow the two integrals are equal and the divergence theorem is verified. Next, we use the divergence theorem to derive the mathematical form of the conservation of mass.

Applications of divergence theorem

In this section we derive the conservation law for a fluid of variable density ρ\rho. This is known as the continuity equation which is used in many different contexts where quantities are conserved.

Consider a fluid with density ρ(r,t)\rho(\boldsymbol{r}, t) flowing with velocity u(r,t)\boldsymbol{u}(\boldsymbol{r}, t) through a region V\mathcal{V} enclosed by a surface, S\mathcal{S}. The total mass of the fluid contained in V\mathcal{V} is given by:

Mtotal =VρdV.M_{\text {total }}=\iiint_{\mathcal{V}} \rho d V .

The rate at which mass enters is equal to the flux of ρu\rho \boldsymbol{u} into V\mathcal{V}, given by the surface integral,

 Rate of flow in =ρudS\text { Rate of flow in }=-\oiint \rho \boldsymbol{u} \cdot d \boldsymbol{S} \text {. }

Note that this is Eq. (2.106) for the flux of ρu\rho \boldsymbol{u} over a closed surface (hence the symbol \oiint ) and the negative sign indicates that, since the positive orientation is pointing outwards (like in Fig. 2.13) then, mass entering the region is pointing inwards. Since mass is conserved, the rate of change of mass in V\mathcal{V}, must be equal to the rate at which mass enters the region and hence, using Eqs. (2.121) and (2.122), we have:

ddtVρdV=ρudS.\frac{d}{d t} \iiint_{\mathcal{V}} \rho d V=-\oiint \rho \boldsymbol{u} \cdot d \boldsymbol{S} .

Now, we can use the divergence theorem for the RHS of Eq. (2.123) and we can interchange the order of the derivative and the integrals on the LHS such that Eq. (2.123) becomes:

VρtdV=Vdiv(ρu)dV.\iiint_{\mathcal{V}} \frac{\partial \rho}{\partial t} d V=-\iiint_{\mathcal{V}} \operatorname{div}(\rho \boldsymbol{u}) d V .

We use the partial derivative notation since ρ\rho depends has both spatial and temporal dependence. Combining the two integrals into one and noting that div(ρu)=(ρu)\operatorname{div}(\rho \boldsymbol{u})=\nabla \cdot(\rho \boldsymbol{u}) from the definition of divergence, yields:

Vρt+(ρu)dV=0.\iiint_{\mathcal{V}} \frac{\partial \rho}{\partial t}+\nabla \cdot(\rho \boldsymbol{u}) d V=0 .

Equation (2.125) is valid for any arbitrary volume V\mathcal{V}; the only way this can be true for any V\mathcal{V} is if the integrandis zero everywhere. This states the law of mass conservation of a fluid as:

ρt+(ρu)=0\frac{\partial \rho}{\partial t}+\nabla \cdot(\rho \boldsymbol{u})=0

Expanding Eq. (2.126) gives:

ρt+uρ+ρu=0.\frac{\partial \rho}{\partial t}+\boldsymbol{u} \cdot \nabla \rho+\rho \nabla \cdot \boldsymbol{u}=0 .

It follows that for a fluid of constant density, the first two terms in Eq. (2.127) vanish, leaving us with:

u=0,\nabla \cdot \boldsymbol{u}=0,

which is a condition required for incompressible flow.