Documente Academic
Documente Profesional
Documente Cultură
Part One:
1. Introduction; Differentiation of a Scalar Field
2. Integration of a Scalar Field
3. Vectors and Vector Fields
4. The Gradient of a Scalar Field
5. The Divergence of a Vector Field
Lecture 1
∂E ∂T
Q̇xin − Q̇xout = = m cv
∂t ∂t
!
∂ qx ∂T
qx A − qx + δ x A = ρ Aδ x cv
∂x ∂t
∂ qx ∂T
= −ρ cv
∂x ∂t
where we have used partial differentials because qx and T are functions of both x and t.
In the above example, we have only allowed for heat flux in one direction, qx . In 3-D, a
similar analysis would lead to,
∂ qx ∂ qy ∂ qz ∂T
+ + = −ρ cv
∂x ∂y ∂z ∂t
2 IBP7 - Vector Calculus and PDEs 2019/20
where qx , qy and qz are the heat fluxes in the three Cartesian coordinate directions.
It is apparent that heat flux is a vector, q, with components qx , qy and qz . The vector q is not
an isolated vector, it is distributed and varies with both space (x, y, z) and time t: it is a vector
field.
Vector calculus provides a set of rules for working with vector fields. For example, we will
learn that we can write our heat flux equation concisely as,
∂T
∇ · q = −ρ cv
∂t
φ = f (x) ,
or,
φ = φ (x) .
This means that for a value of x there is a corresponding value of the dependent variable, φ , and
we can represent this with a curve in 2-D space.
Lecture 1. Introduction; Differentiation of Scalar Fields 3
φ = φ (x, y) .
Now, a pair of values of x and y correspond to the dependent variable φ . This relationship can
be represented by a surface in 3-D space.
We can see that, as δ x → 0, the derivative becomes tangent to the curve of φ (x).
4 IBP7 - Vector Calculus and PDEs 2019/20
!
∂φ φ (x, y + δ y) − φ (x, y)
= lim . (1.1)
∂ y δ y→0 δy
∂ φ /∂ x is the rate of change of φ with x when y is held constant. It is the slope of the curve
formed by slicing the surface φ = φ (x, y) along a plane at constant y.
The notation ∂ φ /∂ x implies that y is held constant. If there is any doubt about what is being
held constant, you should write, !
∂φ
∂x
y
Lecture 1. Introduction; Differentiation of Scalar Fields 5
If φ is a function of three independent variables, φ = φ (x, y, z), the definition of the partial
derivatives is similar (though there is no convenient geometrical representation),
!
∂φ φ (x + δ x, y, z) − φ (x, y, z)
= lim , (1.2)
∂ x δ x→0 δx
!
∂φ φ (x, y + δ y, z) − φ (x, y, z)
= lim , (1.3)
∂ y δ y→0 δy
!
∂φ φ (x, y, z + δ z) − φ (x, y, z)
= lim . (1.4)
∂ z δ z→0 δz
∂ φ /∂ x is now the rate of change of φ with x in a direction such that both y and z are constant.
Returning to φ = φ (x, y), higher order partial derivatives such as,
! !
∂ 2φ ∂ ∂φ ∂ 2φ ∂ ∂φ
2
= , 2
= , (1.5)
∂x ∂x ∂x ∂y ∂y ∂y
! !
∂ 2φ ∂ ∂φ ∂ 2φ ∂ ∂φ
= , = , (1.6)
∂ y∂ x ∂ y ∂ x ∂ x∂ y ∂ x ∂ y
!
∂ 2φ ∂ φ /∂ x(x + δ x, y) − ∂ φ /∂ x(x, y)
2
= lim , (1.7)
∂x δ x→0 δx
!
∂ 2φ ∂ φ /∂ y(x, y + δ y) − ∂ φ /∂ y(x, y)
2
= lim , (1.8)
∂y δ y→0 δy
!
∂ 2φ ∂ φ /∂ x(x, y + δ y) − ∂ φ /∂ x(x, y)
= lim , (1.9)
∂ y∂ x δ y→0 δy
!
∂ 2φ ∂ φ /∂ y(x + δ x, y) − ∂ φ /∂ y(x, y)
= lim . (1.10)
∂ x∂ y δ x→0 δx
If φ = φ (x), the definition of the derivative tells us that the change in φ , δ φ , when we change
x by δ x is given by, !
dφ
φ (x0 + δ x) − φ (x0 ) = δ φ ≈ δx ,
dx
0
If φ = φ (x, y) then we can use partial derivatives to evaluate the contribution to δ φ from both
δ x and δ y,
! !
∂φ ∂φ
φ (x0 + δ x, y0 + δ y) − φ (x0 , y0 ) = δ φ ≈ δx+ δy (1.11)
∂x ∂y
0 0
Example
A type of vortex has a two-dimensional, steady in time, pressure field p = p0 + (x2 + y2 ). Find
an expression for the rate of change
√ of pressure with distance in a direction at an arbitrary angle
θ to the x-axis at the point x = 3, y = 1.
∂p ∂p
δp= δx+ δ y = 2xδ x + 2yδ y
∂x ∂y
! !
dp ∂p ∂p
= cos θ + sin θ = 2x cos θ + 2y sin θ
ds ∂x ∂y
√
At x = 3, y = 1,
dp √
= 2 3 cos θ + 2 sin θ
ds
Imagine we have a probe to measure the temperature and we move the probe from a point
(x, y,t) to a point (x + δ x, y + δ y,t + δ t). We can use the total differential to work out the change
in T between these two points,
∂T ∂T ∂T
δT = δx+ δy+ δt .
∂x ∂y ∂t
δT ∂T δx ∂T δy ∂T
= + + .
δt ∂x δt ∂y δt ∂t
dT /dt is a total derivative because it is associated with the specific path taken by our probe; it is
the rate of change of the temperature as ‘seen’ by the probe as it moves through the temperature
field.
Note that ∂ T /∂ t in the above expression is the rate of change of temperature in time with x
and y held constant; this is the rate of change of temperature at a fixed point in space and would
be the rate of change seen by a stationary probe (Vx = Vy = 0). Even if the temperature field
was steady (∂ T /∂ t = 0) a moving probe would still see a rate of change of temperature given by
Vx ∂ T /∂ x +Vy ∂ T /∂ y.
The path taken by the temperature probe is arbitrary, but if the temperature field is actually a
property of a fluid and we are interested in the temperature of a fluid particle as it moves through
this field, then Vx = Vx (x, y,t) and Vy (x, y,t) are now the components of the fluid’s velocity. In
this case, the total derivative is referred to as the substantive or material derivative, and is usually
written as DT /Dt (“big d by dt”). This derivative is very useful in fluid mechanics. For example,
in Paper 4, you will apply D/Dt to the velocity vector field V to obtain DV/Dt - the acceleration
Lecture 1. Introduction; Differentiation of Scalar Fields 9
and so,
d φ dx
δφ = δu . (1.13)
dx du
In the limit as δ u → 0 we obtain,
dφ d φ dx
= , (1.14)
du dx du
which is the familiar ‘chain rule’ for a scalar function of one variable.
We can follow a similar process if φ is a function of two variables, φ = φ (x, y). We now seek
∂ φ /∂ u and ∂ φ /∂ v where x = x(u, v) and y = y(u, v). We start with the change in φ corresponding
to small changes in x and y,
∂φ ∂φ
δφ = δx+ δy .
∂x ∂y
From x = x(u, v) and y = y(u, v), we know that δ x and δ y are related to δ u and δ v by,
∂x ∂x
δx = δu+ δv ,
∂u ∂v
∂y ∂y
δy = δu+ δv . (1.15)
∂u ∂v
Substituting these into the expression for δ φ we obtain,
! !
∂φ ∂x ∂x ∂φ ∂y ∂y
δφ = δu+ δv + δu+ δv , (1.16)
∂x ∂u ∂v ∂y ∂u ∂v
Now, we know that we can also find the change in φ corresponding to small changes in u and v
using,
∂φ ∂φ
δφ = δu+ δv .
∂u ∂v
∂φ ∂φ ∂x ∂φ ∂y
= + , and (1.18)
∂u ∂x ∂u ∂y ∂u
∂φ ∂φ ∂x ∂φ ∂y
= + . (1.19)
∂v ∂x ∂v ∂y ∂v
Lecture 2
The result of this integration is the “area under the curve”: the area enclosed by the curve, the
x-axis, and the limits of x = a and x = b.
where A is an area on the x − y plane. The result of this integration is the volume enclosed by
the surface φ = φ (x, y), the area A (on the x − y plane), and the ‘vertical curtain’ connecting the
boundary of A with the φ surface.
12 IBP7 - Vector Calculus and PDEs 2019/20
To illustrate that the integration is done over an area A in the x − y plane, and therefore over
two dimensions, x and y, we often use the double integral notation,
ˆ ¨ ˆ y2 ˆ x2 (y)
φ dA = φ dA = φ dx dy . (2.1)
A y1 x1 (y)
The order in which the integration is performed is: first, the inner integral (in this case, φ with
respect to x - note that the limits are functions of y) then the outer.
Example
Consider φ = x2 y. Find
´
A φ dA for the triangular region shown below.
Method 1
Divide the domain of integration into elements of area δ xi δ yi . First sum contributions to a
vertical strip of width δ xi . Then add contributions from all strips.
Lecture 2. Scalar Fields - Integration 13
"ˆ #
ˆ ˆ x2 y2 (x)
I= φ dA = φ dy dx
A x1 y1 (x)
where x1 = 0, x2 = 1, y1 = 0, y2 = ax.
ˆ 1 "ˆ ax
#
I= x2 y dy dx (2.2)
0 0
ˆ 1" ˆ ax
#
= x2 y dy dx
0 0
ˆ 1 h 1 iax
= x2 y2 dx
0 2 0
1
a2
ˆ
1
= x2 (ax)2 dx =
0 2 10
Method 2
We now reverse the order so that we first sum up all elements in a horizontal strip of height
δ yi , and then add up all the strips.
ˆ ˆ y2 "ˆ x2 (y) #
I = φ dA = φ dx dy (2.3)
A y1 x1 (y)
14 IBP7 - Vector Calculus and PDEs 2019/20
ˆ a "ˆ 1
#
I= x2 y dx dy
0 y/a
ˆ a h 1 i1
= y x3 dy
0 3 y/a
a
y4 a2
ˆ
1
= y− dy =
3 0 a3 10
Both methods give the same answer since the order of the summations (the order of doing the
integrations) does not change the total area.
In general, we always have a choice of the order in which we perform the integrations be-
cause:
"ˆ # "ˆ #
ˆ x2 y2 (x) ˆ y2 x2 (y)
I= φ (x, y) dy dx = φ (x, y) dx dy (2.4)
x1 y1 (x) y1 x1 (y)
A final comment on notation, multiple integrals are sometimes written using ‘left-to-right’
notation,
ˆ y2 "ˆ x2 (y) # ˆ x2 (y) ˆ y2
φ (x, y) dx dy = dx dy φ (x, y) . (2.5)
y1 x1 (y) x1 (y) y1
The order of the integration is, again, inner-to-outer. The process is illustrated, for a cuboid
body, in the diagram below. First, the elements of volume are added in the x direction to form a
‘strip’ at constant y and z. All the strips are then added in the y direction, at constant z, to form a
‘plane’. Finally, in the outer-most integral, all the planes are added in the z direction.
Lecture 2. Scalar Fields - Integration 15
Similarly, in two-dimensions, we could evaluate the average height of an area (the average
height of a mountain range, say) using,
¨
h(x, y)dx dy
A¨
h̄ = .
dx dy
A
we may find it more convenient to use a new independent variable u where x = x(u). Since,
dx
dx = du ,
du
16 IBP7 - Vector Calculus and PDEs 2019/20
we may write, ˆ u2
dx
I= φ ( x(u) ) du ,
u1 du
where x(u1 ) = x1 and x(u2 ) = x2 .
it may be easier to switch to new independent variables ˜ u and v such˜that x = x(u, v) and y =
y(u, v). However, just as in one dimension we found that φ (x)dx 6= φ (u)du ˜ (we needed to
multiply du by a ‘scale factor’ of dx/du), it is also true, in two dimensions, that φ (x, y)dxdy 6=
˜
φ (u, v)dudv. We now seek the correct ‘scale factor’ in this case.
The diagram below shows lines of constant u and v in the x − y plane. The shaded area
(bounded by constant u lines that are δ u apart and constant v lines that are δ v apart) is not δ uδ v
because the u and v lines are not perpendicular to each other.
The general expression for the area of a parallelogram is |a × b|. In this case, a is given by
moving δ u in the direction of constant v, and b is given by moving δ v in the direction of constant
u. a and b are defined by,
∂x ∂y
a= δ u i + δ u j , and
∂u ∂u
∂x ∂y
b= δvi+ δvj .
∂v ∂v
Lecture 2. Scalar Fields - Integration 17
This provides our rule for changing the element of area in the (x, y) coordinate system to the
(u, v) coordinate system: we replace dx dy with,
∂x ∂y ∂x ∂y
− du dv .
∂u ∂v ∂v ∂u
The expression inside the | . . .| is called the Jacobian (after the mathematician, Jacobi). It is
sometimes also written,
∂ (x, y)
J= ,
∂ (u, v)
so that our rule is,
∂ (x, y)
dx dy = du dv .
∂ (u, v)
We have seen that the Jacobian, J, is really just the ratio of elemental areas in one coordinate
system (x, y) to another (u, v). It follows from this that the ratio of areas in (u, v) coordinates to
the equivalent in (x, y) coordinates (i.e. making the reverse change in variables) is given by the
reciprocal of the Jacobian,
!−1
∂ (x, y) ∂ (u, v)
J= = .
∂ (u, v) ∂ (x, y)
This is a useful property because, depending on how the relationship between the old and
new set of independent variables is expressed, it may be easier to evaluate ∂ (u, v)/∂ (x, y) than
∂ (x, y)/∂ (u, v).
Example
A common change of independent variable is from Cartesian to polar coordinates. We can use
this example as a way to confirm that the algebraic and geometric interpretations of the Jacobian
yield the same answer.
18 IBP7 - Vector Calculus and PDEs 2019/20
x = r cos θ y = r sin θ
∂x ∂x
= cos θ , = −r sin θ ,
∂r ∂θ
∂y ∂y
= sin θ , = r cos θ .
∂r ∂θ
= r cos2 θ + r sin2 θ = r
where the region A is in the first quadrant, bounded by the x-axis, the y-axis and the circle of
unit radius centred on the origin.
x2 + y2 = r2 ,
dx dy = r d θ dr .
Lecture 2. Scalar Fields - Integration 19
π /2 h
1π π
ˆ i1
= r4 /4 d θ = =
0 0 42 8
20 IBP7 - Vector Calculus and PDEs 2019/20
IBP7 - Vector Calculus and PDEs 2019/20
Lecture 3
1. has a magnitude;
Finite rotations are the classic example of a quantity that has a magnitude, line of action and
sense, but is not a vector. This is because the order in which finite rotations are performed is
important, i.e. the rules of vector addition are not obeyed:
22 IBP7 - Vector Calculus and PDEs 2019/20
Finally, we make the distinction between true vectors and pseudo vectors. True vectors have
the 4 properties listed above and, in particular, their sense is unambiguous. Examples of true
vectors are force, velocity and displacement. Pseudo vectors have the 4 properties listed, but
their sense is ambiguous and we can only treat them as vectors if we all agree on a convention
for the sense (such as the right-hand rule). Examples of pseudo vectors are torque and angular
velocity.
3.2.1 Addition
The parallelogram below shows that,
c = a+b = b+a . (3.1)
This statement is true for all coordinate systems. In Cartesian coordinates, we may write,
c = a + b = (ax i + ay j + az k) + (bx i + by j + bz k)
In Cartesian coordinates,
a · b = ax bx + ay by + az bz .
a · (b + c) = a · b + a · c ,
and commutative,
a·b = b·a .
An example of the use of the scalar product in engineering is the calculation of the work done
W by a force F that moves through a displacement ∆r,
W = F · ∆r . (3.3)
What we are evaluating is the component of F in the direction ∆r̂ (the unit vector in the direction
of ∆r), multiplied by the distance moved in that direction.
where θ is the angle between the two vectors and n̂ is the unit vector perpendicular to the plane
containing a and b with direction determined by the right-hand rule (i.e. direction of a right-
handed screw when turned from a to b). The result of a vector product is, therefore, a vector.
24 IBP7 - Vector Calculus and PDEs 2019/20
In Cartesian coordinates,
i j k
a × b = ax ay az .
bx by bz
a × (b + c) = a × b + a × c ,
An example of the use of the vector product in engineering is the calculation of the moment
M, about the origin, caused by the application of a force F at a point r,
M = r×F . (3.5)
a · (b × c) = b · (c × a) = c · (a × b) , (3.6)
and we can apply the scalar differentiation and integration rules discussed in the first two lec-
tures. The velocity of the fluid is a vector quantity which also varies with space and time. In
Cartesian coordinates,
V = V(x, y, z,t) ,
and we now seek rules for working with this vector field. These new rules are called Vector
Calculus.
Lecture 3. Vectors and Vector Fields 25
But you might say we don’t need new rules, because the velocity field has three components
which are each scalar fields,
so can’t we just work with these scalars? However, the manipulation of these inter-related scalar
fields becomes complicated very quickly (you can imagine lines and lines of partial derivatives
that look similar for each component - it would be easy to make mistakes).
If we specify a vector field using the general position vector r, e.g.
V = V(r,t) , (3.9)
then we don’t need to restrict ourself to one particular coordinate system; equation (3.9) can be
applied to any coordinate system. But remember that if we use V = V(r,t), then V is still a
function of four (not two) independent scalar variables.
Field lines can be constructed from small line elements as follows. Suppose we have a vector
field V that varies in time but is two-dimensional in space, V = V(x, y,t). We freeze the vector
field at a particular instant in time. At a chosen point in space, we draw a small line of length δ s
to represent the direction (not the magnitude) of V at that point and time. We then move to the
end of our short line and repeat the process. As δ s → 0 we end up with a curve that is tangential
to V at every point. This is a field line.
26 IBP7 - Vector Calculus and PDEs 2019/20
If V is a vector field with components Vx , Vy , Vz then the equation of a field line projected
onto the (x, y) plane must satisfy the condition that the slope of the field line is parallel to the
velocity direction in the (x, y) plane,
dy Vy
= . (3.10)
dx Vx
Similarly,
dz Vz dx Vx
= and = . (3.11)
dy Vy dz Vz
A neater way of expressing this is,
dx dy dz
= = .
Vx Vy Vz
Written in a way that is not coordinate system specific, an element of field line that is repre-
sented by vector dr must be parallel to V so that,
Example
Find the equation for, and sketch, the field lines of the 2-D, steady in time, vector field,
V = (kx) i − (ky) j
dx dy
+ =0
x y
ln x + ln y = ln c
xy = c
As an example, consider a particle moving along a specified curve in 3-D space. The position
of the particle is then only a function of time r = r(t).
28 IBP7 - Vector Calculus and PDEs 2019/20
and this will only be tangential to the specified curve if the curve has zero curvature.
The above relationships are true in any coordinate system, but it is usually easiest to prove
them in Cartesian coordinates. For example,
d d
A·B = (Ax i + Ay j + Az k) · (Bxi + By j + Bz k)
ds ds
d
= Ax Bx + Ay By + Az Bz
ds
dB dA
= A· + ·B
ds ds
∂ V/∂ x is therefore a vector representing (in magnitude and direction) the rate of change of V
with x when y and z are both kept constant. We can evaluate ∂ V/∂ x from the components of V,
∂ V ∂ Vx ∂ Vy ∂ Vz
= i+ j+ k .
∂x ∂x ∂x ∂x
The rules for partial derivatives are similar to those given above for ordinary derivatives. For
example,
∂ ∂B ∂A
A·B = A· + ·B . (3.24)
∂x ∂x ∂x
30 IBP7 - Vector Calculus and PDEs 2019/20
IBP7 - Vector Calculus and PDEs 2019/20
Lecture 4
∂ ∂ ∂
∇=i +j +k . (4.1)
∂x ∂y ∂z
We call ∇ an operator because it acts on, or operates on, whatever comes immediately after it.
For example, if φ is a scalar function φ = φ (x, y, z) then,
!
∂ ∂ ∂ ∂φ ∂φ ∂φ
∇φ = i + j + k φ =i +j +k .
∂x ∂y ∂z ∂x ∂y ∂z
∇φ is called the gradient of φ (or ‘grad φ ’) and is a vector. ∇ can only operate directly on a
scalar function, and the result is a vector.
Example
Find the gradient of the scalar field φ = x2 y sin z.
∂φ
= 2xy sin z
∂x
∂φ
= x2 sin z
∂y
∂φ
= x2 y cos z
∂z
Two ‘vector’ identities involving the gradient that are useful are,
∇( f + g) = ∇ f + ∇g (4.2)
∇( f g) = f ∇g + g∇ f (4.3)
where f and g are both scalar fields. The easiest way to prove these is by expanding terms in
Cartesian coordinates.
Example
Prove, ∇( f g) = f ∇g + g∇ f .
∂ ∂ ∂
∇( f g) = i ( f g) + j ( f g) + k ( f g)
∂x ∂y ∂z
! !
∂g ∂g ∂g ∂f ∂f ∂f
=f i +j +k +g i +j +k
∂x ∂y ∂z ∂x ∂y ∂z
= f ∇g + g∇ f
The sketch shows two surfaces, one at φ0 and one at φ1 = φ0 + δ φ . If we move from a point
(x, y, z) on the φ0 surface to a point (x + δ x, y + δ y, z + δ z) on the φ1 surface, we can write,
∂φ ∂φ ∂φ
δφ = δx+ δy+ δz
∂x ∂y ∂z
so that
δ φ = ∇φ · δ r , (4.4)
and this holds for any coordinate system.
If we write δ r as δ s n̂ where n̂ is the unit vector in the direction of δ r,
δ φ = ∇φ · (δ s n̂)
so that, as δ s → 0
dφ
= ∇φ · n̂ . (4.5)
ds
This is known as the ‘directional derivative’ and d φ /ds = ∇φ · n̂ is valid for any coordinate
system. Notice that:
3. the direction of ∇φ is always in the direction of increasing φ (“∇φ always points up hill”)
Heat conduction
Fourier’s law of heat conduction tells us that heat flows down a temperature gradient. For exam-
ple, in a straight metal bar aligned with the x-axis, the heat flow is given by Qx = −λ A∂ T /∂ x
where T is the temperature, A is the cross-sectional area of the bar and λ is the thermal conduc-
tivity of the metal. The heat flux is the heat flow per unit area,
∂T
qx = −λ .
∂x
q = −λ ∇T
Lecture 4. The Gradient of a Scalar Field 35
where q is the heat flux vector. We have derived this expression in Cartesian coordinates (where
q has components qx , qy and qz ), but q = −λ ∇T applies in any coordinate system. A common
assumption is that λ is constant and so we may write q = ∇(−λ T ) and we see that (−λ T ) is the
scalar potential.
Diffusion
Fick’s law governs the diffusion in solids, liquids and gases. In one dimension, the mass transfer
rate of the diffusing species across a plane of area A is given by Mx = −DA∂ c/∂ x where c is
the concentration of the species (mass per unit volume) and D is the diffusion coefficient. The
diffusive mass flux is mx = Mx /A and,
∂c
mx = −D .
∂x
governs our 1-D diffusion. In 3-D, Fick’s law is captured by the vector equation,
m = −D∇c
where m is the diffusive mass flux vector. Just as q is perpendicular to lines of constant T , we
see that m must be perpendicular to lines of constant c.
Current flow
The current flowing in a conductor aligned with the x-axis obeys Ohm’s Law, Ix = σ A∂ V /∂ x
where σ is the electrical conductivity, A is the cross-sectional area and V is the electric potential.
The current per unit cross-sectional area is jx = Ix /A and this is called the current density (the
terminology would be more consistent if jx was known as the current flux). In 1-D, we have
∂V
jx = −σ
∂x
If σ is constant, we see that the scalar potential in this case is (−σ V ) and the current density
vector is everywhere normal to surfaces of constant electric potential.
Example
The concentration of a species is axi-symmetric, c = c(r), and is given by c = c0 − a ln(r/r0 ).
Given that the diffusion coefficient is D (constant), find an expression for the diffusive mass flux
in the radial direction and for the total diffusive mass flow rate crossing radius r = R.
∂c
m = −D∇c so mr = −D
∂r
1
mr = aD
r
where Vx , Vy and Vz are the components of the velocity of the probe. We can use vector notation
to write the first term on the right hand side as a scalar product,
! !
dT ∂T ∂T ∂T ∂T
= Vx i +Vy j +Vz k · i +j +k + ,
dt ∂x ∂y ∂z ∂t
where V = Vx i +Vy j +Vz k is the velocity of the probe. We can see that the combination (V · ∇)
acts on the temperature field, T ,
∂ ∂ ∂
V · ∇ = Vx +Vy +Vz , (4.7)
∂x ∂y ∂z
and is a ‘scalar operator’ (due to the dot product) that can act on either a scalar field (as in the
above example) or a vector field (as in (V · ∇)V used in 1B Paper 4).
Lecture 4. The Gradient of a Scalar Field 37
∂ ∂ ∂
∇=i +j +k . (4.8)
∂x ∂y ∂z
But we can use the result,
δ f = ∇f ·δr , (4.9)
to define ∇ in other coordinate systems.
δ r = δ r er + rδ θ eθ + δ z ez .
∂ 1 ∂ ∂
∇ = er + eθ + ez . (4.10)
∂r r ∂θ ∂z
As a check,
∂f 1∂f ∂f
∇ f · δ r = er + eθ + ez · δ r er + rδ θ eθ + δ z ez (4.11)
∂r r ∂θ ∂z
∂f ∂f ∂f
= δr + δθ + δz = δ f (4.12)
∂r ∂θ ∂z
38 IBP7 - Vector Calculus and PDEs 2019/20
∂ 1 ∂ 1 ∂
∇ = er + eθ + eφ . (4.14)
∂r r ∂θ r sin θ ∂ φ
IBP7 - Vector Calculus and PDEs 2019/20
Lecture 5
∂ Vx ∂ Vy ∂ Vz
= + + ,
∂x ∂y ∂z
Here are two useful identities involving the divergence which can be proved by expanding in
Cartesian form. If A and B are vector fields and φ is a scalar field, then,
∇ · (A + B) = ∇ · A + ∇ · B (5.1)
∇ · (φ A) = φ (∇ · A) + ∇φ · A (5.2)
Example
Calculate the divergence of the field V = x2 z i − 2y3 z2 j + xy2 z k at the point (1, −1, 1).
∂ Vx ∂ Vy ∂ Vz
∇·V = + +
∂x ∂y ∂z
40 IBP7 - Vector Calculus and PDEs 2019/20
at (1, −1, 1) ∇ · V = 2 − 6 + 1 = −3
Example
Calculate the divergence of the vector field formed by the position vectors, V = x i + y j + z k.
∇ · V = 1 + 1 + 1 = 3 (everywhere)
The diagram shows an elemental control volume in Cartesian coordinates. The sides of the
control volume have length δ x, δ y, δ z. The fluid density is a scalar field ρ = ρ (x, y, z) and the
fluid velocity is a vector field V = V(x, y, z). At the centre of the control volume, ρ = ρ0 and
V = Vx0 i +Vy0 j +Vz0 k.
The conservation of mass, in words, is:
net mass flowrate out of volume = rate of decrease of mass within volume
Lecture 5. The Divergence of a Vector Field 41
We proceed by evaluating the mass flowrate on the faces of the element. For Face 1, the flow
of mass in to the control volume is,
!
δ x ∂ (ρ Vx )
ρ1Vx1 δ yδ z ≈ ρ0Vx0 − δ yδ z ,
2 ∂x
where the partial derivative is evaluated at the centre of the element. We can work out the mass
flowrate on Face 2 in the same way, but this is now a flowrate out of the control volume,
!
δ x ∂ (ρ Vx )
ρ2Vx2 δ yδ z ≈ ρ0Vx0 + δ yδ z .
2 ∂x
The net flowrate out of the control volume from Faces 1 and 2 is, therefore,
∂ (ρ Vx )
ρ2Vx2 − ρ1Vx1 δ yδ z ≈ δ xδ yδ z .
∂x
Similarly, the contributions from the pairs of faces perpendicular to the y and z directions are,
∂ (ρ Vy )
ρ4Vy4 − ρ3Vy3 δ zδ x ≈ δ xδ yδ z . (5.3)
∂y
∂ (ρ Vz )
ρ6Vz6 − ρ5Vz5 δ xδ y ≈ δ xδ yδ z . (5.4)
∂z
Taking all the faces into account, the net mass flowrate out of the control volume (the “rate of
mass eflux”) is
!
∂ (ρ Vx ) ∂ (ρ Vy ) ∂ (ρ Vz )
rate of mass efflux = + + δv , (5.5)
∂x ∂y ∂z
where δ v = δ xδ yδ z is our elemental volume. We recognise that we may write this more simply
as,
rate of mass efflux = ∇ · (ρ V)δ v , (5.6)
and this expression holds for any coordinate system.
The mass of the elemental volume is ρδ xδ yδ z = ρδ v. The volume is fixed, so the rate of
decrease of mass is given by,
∂ρ
− δv .
∂t
We can now write our conservation of mass equation for the volume δ v, in Cartesian coordi-
nates, as !
∂ (ρ Vx ) ∂ (ρ Vy ) ∂ (ρ Vz ) ∂ρ
+ + δv = − δv ,
∂x ∂y ∂z ∂t
or,
∂ ρ ∂ (ρ Vx ) ∂ (ρ Vy ) ∂ (ρ Vz )
+ + + =0 . (5.7)
∂t ∂x ∂y ∂z
42 IBP7 - Vector Calculus and PDEs 2019/20
∂ρ
+ ∇ · (ρ V) = 0 .
∂t
Now that the physical interpretation of the divergence has been found – the net rate of efflux
of any vector field A from an elemental volume δ v is given by (∇ · A)δ v – we can easily interpret
the vector form of the mass conservation equation.
In fact, recognising that the mass flux is ρ V, vector calculus allows us to write down ∂ ρ /∂ t +
∇ · (ρ V) = 0 and so obtain the coordinate-free equation without having to go through the lengthy
foregoing analysis.
As an aside, we can see that if ρ is a constant, we must have ∇ · V = 0.
Example
A time steady, incompressible fluid flow field has velocity components Vx = kx (k is a constant)
and Vz = 0. Find Vy and sketch streamlines given that Vy = 0 on the plane y = 0.
∇·V = 0
∂ Vx ∂ Vy ∂ Vx
+ + =0
∂x ∂y ∂z
∂ Vy
k+ +0 = 0
∂y
Lecture 5. The Divergence of a Vector Field 43
∂ Vy
∴ = −k
∂y
Vy = −ky + f (x, z)
Vy = 0 on y = 0 ∴ f (x, z) = 0
∴ Vy = −ky
V = (kx) i − (ky) j
Vr ∂ er Vθ ∂ eθ
eθ · + eθ · (5.10)
r ∂θ r ∂θ
44 IBP7 - Vector Calculus and PDEs 2019/20
Vr Vθ
= eθ · eθ + eθ · −er
r r
Vr
=
r
V = −k∇ψ . (5.14)
∇ · (∇φ ) = 0 .
Note that this operation, div (grad φ ), is acceptable because we are taking the divergence of the
vector field obtained by taking the gradient of a scalar field.
Lecture 5. The Divergence of a Vector Field 45
In Cartesian coordinates,
! !
∂ ∂ ∂ ∂φ ∂φ ∂φ
∇ · (∇φ ) = i +j +k · i +j +k (5.15)
∂x ∂y ∂z ∂x ∂y ∂z
∂ 2φ ∂ 2φ ∂ 2φ
= + + 2 (5.16)
∂ x2 ∂ y2 ∂z
The operator ∇ · ∇ is a second order scalar differential operator and is usual written ∇2 (‘del
squared’) and is known as the Laplacian (the equation ∇2 φ is called Laplace’s equation). In
Cartesian coordinates, the Laplacian is,
∂2 ∂2 ∂2
∇2 = + +
∂ x2 ∂ y2 ∂ z2
The Data Book contains formulae for the Laplacian in cylindrical polar coordinates (r, θ , z),
∂ 2ψ 1 ∂ ψ 1 ∂ 2ψ ∂ 2ψ
∇2 ψ = + + + 2 , (5.17)
∂ r2 r ∂ r r2 ∂ θ 2 ∂z
and in spherical polar coordinates (r, θ , φ ) the Laplacian is,
" # " #
2 1 ∂ 2∂ψ 1 ∂ ∂ψ 1 ∂ 2ψ
∇ ψ= 2 r + 2 sin θ + 2 2 (5.18)
r ∂r ∂r r sin θ ∂ θ ∂θ r sin θ ∂ φ 2
Example
Derive the equation governing heat conduction in a solid.
∂T
ρc δ v = −(∇ · q)δ v
∂t
∂T
ρc = ∇ · (λ ∇T )
∂t
We can now apply this equation to our specific coordinate system. For example, in 2-D Cartesian,
∂ 2T ∂ 2T
+ 2 =0
∂ x2 ∂y
46 IBP7 - Vector Calculus and PDEs 2019/20
" #
1 ∂ 2∂T ρc ∂ T
r = .
r2 ∂ r ∂r λ ∂t