# Threedimensional divergence

The generalization to the three-dimensional divergence is straightforward. This time the tiny box in the plane becomes a 3D box fixed in the space. Consider a closed surface S. The velocity flux emanating from the enclosed volume is emerging flux = ^v(r) ■ dS. (9.57)

Now let the enclosed volume become very small. For the Cartesian coordinate case take it to be a rectangular parallelepiped whose sides are of lengths dx, dy, dz. Its volume is therefore the product, (d V)S = dx dy dz where the subscript S is used to indicate the surface surrounding the infinitesimal volume element. The divergence of the velocity field is defined to be the emerging flux per unit volume:

This definition of the divergence is actually independent of the shape of the volume for reasonably well-behaved functions v(r). We take it here to be a rectangular parallelepiped for convenience. Note that the divergence is a scalar field defined over the space whose points are designated by r.

While this appears to be a useful concept, so far it seems to be a rather difficult thing to compute. Next we will find a convenient way to compute the divergence. In rectangular coordinates we take the surface to be the rectangular parallelepiped mentioned before.

The integration over the six faces of the box is so similar to the two-dimensional case that we need not repeat it here. The result is

The divergence is then:

dx dy dz

From our earlier notation with the V operator, we can write dvx d vy d vz V-v = — + ^ + — dx dy dz d d d + j "

( d d d\ , , = ([ dx +j dy+k Tz) ■ ^+vyj+vzk. (9.61)

Example 9.15: divergence of the product of scalar and vector We can find the divergence of a product of a scalar field and a vector field by expanding the individual terms into their Cartesian [x, y, z] components. Let G(r) be a scalar field and a(r) be a vector field:

V ■ (G(r)a(r)) = G(r)V ■ a(r) + a(r) ■ VG(r).