#05 (06/30/2025)

Divergence

The divergence operator can be defined on a vector, u, by
div u
lim
V→ 0 



S 
n·u dS

V
,
(1)
where n is the normal to the boundary and V is the volume of an object and the integral range is over the surface (boundary) of the object. This definition has an advantage over other definitions as it is independent of the coordinate system.
divergence.jpg

1-D

div_1d.jpg
In 1-D, an interval (x, x + h) is V in eq.(1) and its boundary is the two end points x and x + h. The normal, n, at x + h is +1 and is −1 at x = x. Thereby, eq.(1) becomes

div u
=

lim
h→ 0 
(+1) ×u(x+h) +(−1) ×u(x)

h
(2)
=

lim
h→ 0 
u(x + h) − u(x)

h
(3)
=
u′(x).
(4)
This is of course the ordinary differentiation in 1-D.

2-D

div_2d.jpg
In 2-D, a rectangle is V in eq.(1) and its boundary is the contour integral that surrounds the rectangle. The normals are the normal vectors perpendicular to each side of the rectangle. Therefore, it is necessary to compute eq.(1) in four different segments as

Path A

Along the path A, n = (0,−1) so n·u = − uy(x, y). Thus



A 
=
x + h

x 
uy(x, y) dx → −uy(x, y) h.
(5)

Path B

Along the path B, n = (1, 0) so n·u = ux(x + h, y). Thus



B 
=
y + k

y 
ux(x + h, y) dyux(x + h, y) k.
(6)

Path C

Along the path C, n=(0,1) so n·u = uy(x,y+k). Thus



C 
=
x

x + h 
uy(x, y + k) (−d x) → uy(x, y + k) h.
(7)

Path D

Along the path D, n = (−1, 0) so n·u = −ux(x, y). Thus



D 
=
y

y + k 
ux(x, y) (−dy) → − ux(x, y) k.
(8)
So the contour integral is



A + B + C + D 
= k ( ux(x + h, y)−ux(x, y)) +h ( uy(x, y + k)−uy(x, y)).
(9)
Thus



S 
n·u dS

V
=
ux(x + h, y) − ux(x, y)

h
+ uy(x, y + k) − uy(x, y)

k
(10)
ux

x
+uy

y
   as     h→ 0    and     k→ 0.
(11)

3-D

From the result in 2-D, it is obvious that the divergence operator in 3-D is expressed as
div u = ux

x
+uy

y
+uz

z
.
(12)
The divergence operator, div, is often written as

div u = ∇·u,
(13)
where ∇ 1 is a differential operator defined as
∇ ≡








x

y

z








.
(14)
As will be shown in class, the physical interpretation of the divergence operator is the net flow in the rectangle, i.e. the difference between the flows that comes in and the flow that flows out of the rectangle.

Gradient

Similar to the divergence operator, the gradient operator is defined as

grad u
lim
V→ 0 



S 
n u dS

V
.
(15)
Note that u is a scalar function and the result of gradient is a vector.
By applying this definition to a rectangular element in the Cartesian coordinate system, one can obtain

grad u =







u

x
u

y
u

z








.
(16)
Note that the gradient operator operates on a scalar and the result is a vector. Using a symbol , ∇ (nabla), the gradient on a scalar function, u, can be expressed as
grad u = ∇u,
(17)
where
∇ ≡








x

y

z








.
(18)

Curl

The curl operator is defined on a 3-D vector as

curl u
lim
V→ 0 



S 
n ×u dS

V
.
(19)
Using the nabla operator, the above can be written as

curl u
=
∇×u
(20)
=






i
j
k

x

y

z
ux
uy
uz






.
(21)
Note that the curl is defined on a 3-D vector and the result is also a 3-D vector.
It should be noted that the three differential operators are reduced to an ordinary differentiation in 1-D.

du

dx




∇·u
Divergence
u
Gradient
∇×u
Curl

Physical interpretation of divergence

div_physical.jpg
The amount of flow that goes out from the control volume is

u ·n,2
(22)
where n is the normal (outward) perpendicular to the boundary.
divergence.jpg
Thus, the flow that goes out from the side at x = x is

u ·n  d y =


ux(x, y)
uy(x, y)



·


−1
0



 d y = − ux(x, y) dy,
(23)
and the flow that goes out from the side x = x + dx is

u ·n  d y =


ux(x + d x, y)
uy(x + d x, y)



·


1
0



 d y = ux(x + d x, y) dy,
(24)
so the net flow that goes out from the element in the x-direction is

(ux(x + dx, y) − ux(x, y)) dy
=

ux(x, y) + ux(x, y)

x
dx + …−ux(x, y)
dy
=
ux

x
dx dy.
(25)
Similarly, the net flow that goes out from the element in the y-direction is

uy

y
dx dy.
(26)
Addition of eqs.(25, 26) is the net amount of flow that goes out from the element, i.e.

( ux

x
+ uy

y
) dx dy = ∇·u dx dy.
(27)

Heat conduction

The net heat that goes out of an element is

∇·h dx dy,
(28)
where h is the heat flux vector (heat per second). The rate of heat loss in the element is (note the minus sign)

−ρCp T

t
dx dy,
(29)
where ρ is the mass density and Cp is the specific heat so

∇·h dx dy = −ρCp T

t
dx dy.
(30)
The Fourier law of heat conduction stipulates that the heat flux is proportional to the gradient of the temperature, i.e.

h = − kT,
(31)
where k is the thermal conductivity.
By combining Eq.(30) with Eq.(31), one obtains

∇·( kT) = ρCp T

t
.
(32)
Equation (32) is known as the transient heat conduction equation.

Equation of continuity

The amount of mass that flows out of an element is

∇·(ρv),
(33)
which must be equal to the mass loss per unit time of

∂ρ

t
,
(34)
which yields

∂ρ

t
+ ∇·(ρv) = 0.
(35)
which is known as the equation of continuity.

Directional derivative (gradient)

The directional derivative, ∂u/∂n, of a function, u, in the direction of n is defined as

u

n
≡ ∇u ·n,
(36)
where the vector, n, is a unit vector which represents the direction of the change of rate of v. Note that if n is in the direction of the x axis, ∂u/∂n = ∂u/∂x.
Example: Compute the directional derivative of u=x2 y −3 x z in the direction of (1, −2, 3) at (x, y, z) = (4, 3, −2).
Solution:
n = (1, −2, 3)/

 

14
 
,
and ∇u = (2 x y − 3 z, x2, −3 x) at (4, 3, − 2) is (30, 16, − 12). So
u

n
= 30 − 32 − 36




14
= − 38




14
.

Identities among differential operators


∇·(αu + βv )
=
α∇·u + β∇·v,
(37)
∇( αu + βv)
=
α∇u + β∇v,
(38)
∇×( αu + βv)
=
α∇×u+ β∇×v,
(39)
∇·(u v)
=
u ·v + u ∇·v,
(40)
∇×(u v)
=
u ×v + u ∇×v,
(41)
∇·( u ×v)
=
v ·∇×uu ·∇×v,
(42)
∇×( u ×v)
=
u ∇·vv ∇·u + ( v·∇)u − (u·∇) v,
(43)
∇(u ·v)
=
(u ·∇) v + (v ·∇) u+ u ×( ∇×v) + v ×( ∇×u),
(44)
∇·∇×v
=
0,
(45)
∇×∇u
=
0.
(46)
When proving various identities that involve vectors and their derivatives (the divergence, gradient and curl), it is important to remember that the nabla (∇) works as (1) a vector and as (2) a differential operator ((uv)′ = uv + u v′).

  1. ∇×∇u = 0.
    The vector product of two identical vectors (∇×∇) is identically zero.

  2. ∇·∇×v = 0.
    Using the identities of scalar triple product,
    ∇·∇×v
    =
    v ·∇×∇
    =
    ∇×∇·v
    =
    0.
    (47)

  3. ∇×(u ×v).
    The vector triple product identity is
    ∇×(u ×v)
    =
    (∇·v) u −(∇·u) v.
    (48)
    Note that ∇ in the right hand side operates on both u and v so (u v)′ = uv + u v′ needs to be recursively applied. The first term in the right hand side is expanded as
    u ∇·v + (v ·∇) u,
    and the second term is expanded as
    v ∇·u + (u ·∇) v,
    so the right hand side is
    u ∇·v + (v ·∇) uv ∇·u − (u ·∇) v.

Divergence theorem (Gauss theorem)

Remember the definition of the divergence operator for 2-D as

div u
lim
s→ 0 

(⎜)



S 
n ·u dl

s
,
(49)
where n is the normal to the boundary, ∆s is the surface area of the object, and ∂S is the boundary of the object domain. This definition has an advantage over other definitions as it is independent of the coordinate system.
Equation (49) is approximately written as


(⎜)



S 
n·u dl ∼ ∇·us.
(50)
If Eq.(50) is applied to the two regions below,
gausstheorem.jpg
it follows


(⎜)



s1 
n·u dl
 ∼ 
∇·us1,
(51)

(⎜)



s2 
n·u dl
 ∼ 
∇·us2,
(52)
which can be added together to yield


(⎜)



∂(s1 + s2) 
n·u dl ∼ 

∇·u dS.
(53)
By repeating this for many small cells and taking limit of ∆si → 0, Eq.(53) becomes


(⎜)



S 
n ·u dl =



S 
∇·u dS.
(54)
This is called the Gauss divergence theorem.

Verification

gauss_ex.jpg

u =


x2 y
x + y



.
(LHS) On the boundary, one can set
x
=
a cos θ
(55)
y
=
a sin θ
(56)
and
On the boundary, one can set
nx
=
cos θ,
(57)
ny
=
sin θ,
(58)
so

n·u = a3 cos3  θsin θ+a sinθ(cos θ+sin θ),
(59)
and


(⎜)



S 
n·u dl
=



0 
( a3 cos3  θsin θ+a sinθ(cos θ+ sin θ) )a dθ
=
a2 π3
(60)
(RHS) Use the polar coordinate system, i.e.
x = r cosθ,     y = r sin θ,     dS = r dr dθ.
As

∇·u
=
2 x y + 1,
=
2 r2 cosθsin θ+ 1,
(61)
so





S 
∇·u dS
=




S 
(2 x y + 1) dx dy
=



0 

a

0 
(2 r2 cos θsin θ+1) r dr dθ
=
a2 π.
(62)

Alternative interpretation of Gauss theorem

gauss_1d.jpg
The fundamental theorem of calculus postulates that integrations and differentiations are reciprocal to each other, i.e.


b

a 
f ′(x) dx = [ f ]ab.
(63)
The right hand side of Eq.(63) can be written as
[ f ]ab
=
f |x=a + f |x=b
=
(−1) ×f |x=a + (+1) ×f |x=b
=
na  f |x = a + nb  f |x = b
=
(n f) |x=a + (n f) |x=b
=


boundary 
n f.
(64)
So Eq.(63) can be written as


b

a 
f ′(x) dx =

boundary 
n f.
(65)
Equation (65) can be extended to 2-D as





S 
f  dS =
(⎜)



S 
n f dl.
(66)
Note that both ∇ and n are vectors. If we set f = u (vector), Eq.(66) can be written as





S 
∇·u dS =
(⎜)



S 
n ·u dl,
(67)
which is the Gauss divergence theorem.
Note that most of the usage of the divergence theorem is to convert a boundary integral that contains the normal to the boundary into a volume (area) integral by replacing the normal (n) by a nabla (∇) to be placed in front of the expression.



(⎜)



S 
ndl =



S 
∇…dS.
(68)

Integration by parts

Integrating the both sides of

( u v )′ = u ′ v + u v′,
(69)
yields


b

a 
( u v ) ′d x =
b

a 
 uv dx +
b

a 
 u vdx,
(70)
or

[ u v ]ab =
b

a 
 uv dx +
b

a 
 u vdx,
(71)
or

b

a 
uv dx = [ uv]ab
b

a 
uvdx.
(72)
Equation (72) is the 1-D formula for integration by parts.
Equation (72) can be extended to 2D as




S 
u v dS =
(⎜)



S 
u v n dl



S 
uv dS.
(73)
Example (Green's identity)





S 
(∇u ·∇v + uv) dS =
(⎜)



S 
u v

n
dl.
(74)
Proof:
Rewrite the right hand side of Eq.(74) as

(⎜)



S 
uv ·n d l,
(75)
which is a boundary integral with n. Therefore, according to the Gauss theorem, it follows


(⎜)



S 
uv ·n d l
=




S 
∇·(uv ) d S
=




S 
( ∇u ·∇v + u ∇·∇v) d S
=




S 
( ∇u ·∇v + uv) d S .
(76)
Examples
  1. Heat conduction
    The balance of energy is stated as





    S 
    ρCp T

    t
    dS =
    (⎜)



    S 
    (−n) ·h dl,
    (77)
    where ρ is the mass density, Cp is the specific heat, h is the heat flux across the boundary of the control surface.
    Using the Gauss theorem, the right hand side of Eq.(77) becomes


    (⎜)



    S 
    (−n) ·h dl = −



    S 
    ∇·h dS,
    (78)
    so it follows




    S 
    ρCp T

    t
    dS = −



    S 
    ∇·h dS,
    (79)
    or
    ρCp T

    t
    + ∇·h = 0.
    (80)
    Using Fourier's law,
    h = − kT,
    (81)
    where k is the thermal conductivity, Eq.(80) becomes
    ρCp T

    t
    = ∇·(kT).
    (82)
  2. Equilibrium equation in static elasticity
    The balance of force for continua is stated as


    (⎜)



    S 
    t dl+



    S 
    b dS=0,
    (83)
    where t is the surface traction force and b is the body force. The surface traction force t is the contribution of the stress tensor, σ, in the direction of n as
    t = σ·n,
    (84)
    so Eq.(83) becomes

    (⎜)



    S 
    σ·n dl+



    S 
    b dS=0,
    (85)
    or




    S 
    ∇·σdS +



    S 
    b dS=0,
    (86)
    or

    ∇·σ+ b = 0,
    (87)
    which is known as the equation of equilibrium. For small elastic deformation,
    σ = Cu,
    (88)
    where C is the elastic modulus and u is the displacement, Eq.(87) becomes
    ∇·( Cu) + b=0,
    (89)
    which is known as the Navier's equation 4.
  3. Green's second identity




    S 
    (uvvu) dS =
    (⎜)



    S 

    u v

    n
    v u

    n

    dl.
    From the first Green's identity,



    S 
    (∇u ·∇v + uv) dS
    =

    (⎜)



    S 
    u v

    n
    dl,
    (90)



    S 
    (∇v ·∇u + vu) dS
    =

    (⎜)



    S 
    v u

    n
    dl.
    (91)
    Subtracting Eq.(91) from Eq.(90) gives the second Green's identity. This identity is used to derive solutions to Poisson's equation (∆u = −ρ).


Footnotes:

1 ναβλα (nabla) = harp in Phoenicia (Greek). Also called atled or simply del.
2 u ·n = || u || ||n|| cos θ = u cos θ.
3
Integrate with respect to
from to .

Enter a^4 Cos[x]^3 Sin[x] +a^2 Sin[x]Cos[x]+a^2 Sin[x]^2, x, 0, 2 Pi (you can copy and paste with the mouse.)

4 Each quantity is a tensor.


File translated from TEX by TTH, version 4.03.
On 29 Jun 2025, 08:16.