Divergence & Gauss’s Theorem

Required math: vectors, calculus

Required physics: none

A vector field is a vector function of position in space. For example, a function giving the wind speed and direction at all points in the atmosphere is a vector field, since at each point we must specify the wind as a vector whose magnitude gives the speed and whose direction gives the wind direction.

The air in the atmosphere is a compressible fluid, so we can also define a scalar field called the density. The density of the air in the atmosphere, measured in mass per unit volume, can also be specified as a function of position, but this time there is only a magnitude, hence the term ‘scalar’.

Suppose we define the wind velocity as {\mathbf{v}} and the air density as {\rho}. Now consider an infinitesimal cube in the atmosphere, with side lengths of {dx}, {dy} and {dz} and with one corner of the cube placed at the origin, with the cube itself contained within the positive octant. What is the rate of flow of air into the cube on the side lying in the plane {x=0}?

To calculate this, we need only the component of {\mathbf{v}} in the {x} direction, since the other two components measure flow parallel to the plane {x=0} and do not cross the plane, so can’t contribute to flow across the plane. In time {dt}, therefore, a block of air of volume {(v_{x}dt)(dy)(dz)} flows into the cube. Since the density is {\rho} the mass of air that flows into the cube is {\rho(v_{x}dt)(dy)(dz)} and the rate of flow is this quantity divided by {dt} or

\displaystyle  rate_{x=0}=\rho v_{x}dydz \ \ \ \ \ (1)

Now the rate of flow out of the cube on the other side, through the plane {x=dx}, can be found by realizing that {\rho} and {v_{x}} are functions of position, so to first order in {x} we have

\displaystyle  rate_{x=dx}=\rho v_{x}dydz+\left[\frac{\partial}{\partial x}(\rho v_{x})dx\right]dydz \ \ \ \ \ (2)

The net flow into (or out of, if the quantity is negative) the cube through the two faces is the difference between these two quantities, so

\displaystyle  net\; flow_{x}=\left[\frac{\partial}{\partial x}(\rho v_{x})dx\right]dydz \ \ \ \ \ (3)

The same argument can be applied to the {y} and {z} directions, so the total net flow into the cube from all three directions is

\displaystyle   net\; flow_{total} \displaystyle  = \displaystyle  \left[\frac{\partial}{\partial x}(\rho v_{x})dx\right]dydz+\left[\frac{\partial}{\partial y}(\rho v_{y})dy\right]dxdz+\left[\frac{\partial}{\partial z}(\rho v_{z})dz\right]dxdy\ \ \ \ \ (4)
\displaystyle  \displaystyle  = \displaystyle  \left[\frac{\partial}{\partial x}(\rho v_{x})+\frac{\partial}{\partial y}(\rho v_{y})+\frac{\partial}{\partial z}(\rho v_{z})\right]dxdydz \ \ \ \ \ (5)

The quantity in brackets can be written in a shorthand notation as

\displaystyle  \nabla\cdot\left(\rho\mathbf{v}\right)\equiv\frac{\partial}{\partial x}(\rho v_{x})+\frac{\partial}{\partial y}(\rho v_{y})+\frac{\partial}{\partial z}(\rho v_{z}) \ \ \ \ \ (6)

This is known as the divergence, since it measures the net flow into or out of an incremental volume in a fluid.

Now suppose we consider some volume that is simply connected (that is, a volume that doesn’t contain any holes), and divide it up into a large number of infinitesimal cubes. Suppose we define some vector field {\mathbf{A}} over this volume. In the case of the atmosphere, we could have {\mathbf{A}=\rho\mathbf{v}}, but we’re considering a general vector field that could represent any number of things (it could be electric field, for example). Each face of a little cube can have an area element {d\mathbf{\sigma}} defined, which is a vector whose magnitude is the area of that face, and whose direction is perpendicular to and faces outwards from the face. The normal component of {\mathbf{A}} at a given face of the cube multiplied by the area of the face is then {\mathbf{A}\cdot d\mathbf{\sigma}} and the result above is equivalent to saying

\displaystyle  \sum_{all\; faces}\mathbf{A}\cdot d\mathbf{\sigma}=\nabla\cdot\mathbf{A}d\tau \ \ \ \ \ (7)

where {d\tau} is the volume of the cube: {d\tau=dxdydz}.

Now if we add up this quantity for all the little cubes in the overall volume, we can see that in the interior of the volume where each face of a cube adjoins a face of a neighbouring cube, the contributions of the two joined faces will be equal and opposite. In other words, what flows out of one face must flow into the face that it lies next to. So all contributions from adjoining internal faces will cancel, and we are left with only those faces that lie on the surface of the volume; faces that do not have any adjoining faces. Any flow out of such faces represents fluid lost by the volume, and any flow into such faces represents fluid gained by the volume.

So the sum on the left reduces to a sum over only those faces that lie on the surface of the volume, which is a surface integral. That is, we get the result

\displaystyle  \int_{S}\mathbf{A}\cdot d\mathbf{\sigma}=\int_{V}\nabla\cdot\mathbf{A}d\tau \ \ \ \ \ (8)

In other words, the surface integral of the normal component of a vector field {\mathbf{A}} is equal to the volume integral of the divergence of that field. This result is known as the divergence theorem, or sometimes as Gauss’s law or Gauss’s theorem.

6 thoughts on “Divergence & Gauss’s Theorem

  1. Pingback: Gauss’s Law « Physics tutorials

  2. Pingback: Work and energy – continuous charge « Physics tutorials

  3. Pingback: Dirac delta function in three dimensions « Physics tutorials

  4. Pingback: Probability current in 3-d « Physics tutorials

  5. Pingback: Vector area | Physics tutorials

  6. Pingback: Maxwell’s equations in matter: boundary conditions | Physics pages

Leave a Reply

Your email address will not be published. Required fields are marked *