Sunteți pe pagina 1din 48

1BP7 - Vector Calculus and PDEs

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

Dr. Graham Pullan


( gp10006@cam.ac.uk )

Michaelmas Term 2019


IBP7 - Vector Calculus and PDEs 2019/20

Lecture 1

Introduction; Differentiation of Scalar


Fields

1.1 Course Introduction


Modelling of the physical world is a key part of engineering. Engineers rely on such analyses
during the evaluation of design concepts.
Models are often developed from an understanding of the processes at work on a small ele-
ment of the problem. For example, the diagram below shows the one-dimensional heat flow for
a small element of substance,

∂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

and that this equation is valid in any coordinate sytem.


As you become familiar with vector calculus (and the use of ∇φ , ∇ · V and ∇ × V) you will
be able to write down equations like ∇ · q = −ρ cv ∂ T /∂ t without having to derive them from
small elements.
The techniques developed in this course are applicable to the many vector fields that are
found in engineering. Two examples of vector fields are fluid flow and magnetic fields:

(H. Babinsky, CUED) (public domain, commons.wikipedia.org)

1.2 Scalar functions


We express that φ is a function of one independent variable x by writing,

φ = 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

If φ is a function of two independent variables, x and y, we write,

φ = φ (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.

1.3 Differentiation of a scalar function of one variable


If φ is a function of one variable, φ = φ (x), then we are familiar with the following definition of
the derivative,
!
dφ φ (x + δ x) − φ (x)
= lim .
dx δ x→0 δx

We can see that, as δ x → 0, the derivative becomes tangent to the curve of φ (x).
4 IBP7 - Vector Calculus and PDEs 2019/20

1.4 Differentiation of a scalar function of more than one vari-


able
If φ is a function of two variables, φ = φ (x, y), we now have partial derivatives defined as,
!
∂φ φ (x + δ x, y) − φ (x, y)
= lim ,
∂ x δ x→0 δx

!
∂φ φ (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

are defined in a similar way,

!
∂ 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

For example ∂ 2 φ /∂ x∂ y is the rate of change of ∂ φ /∂ y with x, along a line of constant y.


6 IBP7 - Vector Calculus and PDEs 2019/20

1.5 Total differentials

If φ = φ (x), the definition of the derivative tells us that the change in φ , δ φ , when we change
x by δ x is given by, !

φ (x0 + δ x) − φ (x0 ) = δ φ ≈ δx ,
dx
0

and in the limit at δ x → 0 we have,



dφ = dx .
dx

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

As δ x → 0 and δ y → 0 we may write this neatly as,


∂φ ∂φ
dφ = dx + dy (1.12)
∂x ∂y
and d φ is called the total differential.
Lecture 1. Introduction; Differentiation of Scalar Fields 7

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

If δ s is a small distance in the direction of interest,


δ p ∂ p δx ∂ p δy
= + .
δs ∂x δs ∂y δs

! !
dp ∂p ∂p
= cos θ + sin θ = 2x cos θ + 2y sin θ
ds ∂x ∂y


At x = 3, y = 1,
dp √
= 2 3 cos θ + 2 sin θ
ds

Substantive or material derivative


Consider a temperature field T that is a function of two-dimensional space and also time, T =
T (x, y,t)
8 IBP7 - Vector Calculus and PDEs 2019/20

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

Dividing through by the small change in time, δ t, we obtain,

δT ∂T δx ∂T δy ∂T
= + + .
δt ∂x δt ∂y δt ∂t

In the limit as δ t → 0, δ x/δ t → dx/dt = Vx where Vx = Vx (t) is the x-component of the


velocity of the probe. Similarly, δ y/δ t → dy/dt = Vy where Vy = Vy (t) is the y-component of
the velocity of the probe,
dT ∂T ∂T ∂T
= Vx +Vy + .
dt ∂x ∂y ∂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

(vector) of a fluid particle as it moves through a velocity field,


DV ∂ V ∂V ∂V
= +Vx +Vy .
Dt ∂t ∂x ∂y

1.6 Chain rule for functions of more than one variable


Suppose that we know the relationship between φ and an independent variable, x. We now wish
to change the independent variable to u where x = x(u) and find d φ /du. We start from,

δφ = δx .
dx

Since x = x(u), we may write,


dx
δx = δu ,
du

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

and we may collect terms in δ u and δ v so that,


! !
∂φ ∂x ∂φ ∂y ∂φ ∂x ∂φ ∂y
δφ = + δu+ + δv . (1.17)
∂x ∂u ∂y ∂u ∂x ∂v ∂y ∂v
10 IBP7 - Vector Calculus and PDEs 2019/20

Now, we know that we can also find the change in φ corresponding to small changes in u and v
using,
∂φ ∂φ
δφ = δu+ δv .
∂u ∂v

Comparing the previous two expressions, we see that,

∂φ ∂φ ∂x ∂φ ∂y
= + , and (1.18)
∂u ∂x ∂u ∂y ∂u
∂φ ∂φ ∂x ∂φ ∂y
= + . (1.19)
∂v ∂x ∂v ∂y ∂v

1.7 Taylor series for functions of more than one variable


For a function of one independent variable, φ = φ (x), we can use the following Taylor expansion
to find the value of φ (x) close to some known value φ (x0 ),
! !
dφ (x − x0 )2 d2φ
φ (x) = φ (x0 ) + (x − x0 ) + +... (1.20)
dx 2! dx2
0 0
where the derivatives are evaluated at x = x0 .
For a function of two independent variables, φ = φ (x, y), we can use a similar Taylor expan-
sion to find φ (x, y) given knowledge of φ , and the derivatives of φ , at (x0 , y0 ),
! !
∂φ ∂φ
φ (x, y) = φ (x0 , y0 ) + (x − x0 ) + (y − y0 ) +
∂x ∂y
0 0
! ! !
2
(x − x0 ) ∂ φ 2 ∂ φ2 (y − y0 )2 ∂ 2φ
+ (x − x 0 )(y − y0 ) + + . . . (1.21)
2! ∂ x2 ∂ x∂ y 2! ∂ y2
0 0 0

Note that we must now include the “cross-terms” such as ∂ 2 φ /∂ x∂ y.


IBP7 - Vector Calculus and PDEs 2019/20

Lecture 2

Scalar Fields - Integration

2.1 Integration of a function of one variable


If φ is a scalar function of one independent variable, φ = φ (x), we define the integration of φ
between the limits of x = a and x = b as,
ˆ b N
φ (x)dx = lim ∑ φi δ xi .
a δ xi →0 i=1

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.

2.2 Integration of a function of two variables


If φ is a function of two independent variables, φ = φ (x, y), we define the integration as,
ˆ N
φ dA = lim ∑ φi δ Ai
A δ Ai →0 i=1

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

2.3 Integration of a function of three variables


We can also evaluate integrals of three (or more!) variables. For example, if ρ is the density of
an body and varies over the volume, ρ = ρ (x, y, z), then we may find the mass of the body by
summing up the elements of volume δ v (with mass ρδ v),
ˆ N
m=
V
ρ dv = lim ∑ ρiδ vi
δ Vi →0 i=1
. (2.6)

In Cartesian coordinates, δ v = δ x δ y δ z and so,


ˆ "ˆ "ˆ
z2 y2 (z) x2 (y,z)
# #
m= ρ (x, y, z) dx dy dz (2.7)
z1 y1 (z) x1 (y,z)

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

Application of integration to find average values


A useful application of area and volume integrals is in finding averages. For example, we could
define the average density of an object ρ̄ such that,
m = ρ̄ Vtot .

where m is the mass of the object, and Vtot is its volume.


We can use integrations over the volume to evaluate m and Vtot so that the average density is
given by, ˚
ρ (x, y, z) dx dy dz

ρ̄ = .
dx dy dz
V

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

h̄ = .
dx dy
A

2.4 Change of variable and the Jacobian

Functions of one variable


If φ = φ (x) and we would like to evaluate the integral, I,
ˆ x2
I= φ (x)dx , (2.8)
x1

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 .

Functions of two variables


Similarly, if φ is a function of two independent variables, φ = φ (x, y), and we wish to evaluate
the integral, ˆ ˆ y2 x2
I= φ (x, y) dx dy , (2.9)
y1 x1

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

The area of the parallelogram of interest is then



i j k

∂x ∂y
|a × b| = magnitude of 0 δ u δ v

∂u ∂u
∂x ∂y
∂v ∂v 0

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 θ

To evaluate J = ∂ (x, y)/∂ (r, θ ) we need the following partial derivatives,

∂x ∂x
= cos θ , = −r sin θ ,
∂r ∂θ

∂y ∂y
= sin θ , = r cos θ .
∂r ∂θ

So the Jacobian is given by,


∂ (x, y) cos θ sin θ
=
∂ (r, θ ) −r sin θ r cos θ

= r cos2 θ + r sin2 θ = r

We can use this result to evaluate the area integral,


¨
I= (x2 + y2 ) dx dy
A

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.

If we transform to polar coordinates,

x2 + y2 = r2 ,

dx dy = r d θ dr .
Lecture 2. Scalar Fields - Integration 19

We can now evaluate I as follows:


ˆ θ =π /2 ˆ 1
I= r2 r dr d θ
θ =0 r=0

π /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

Vectors and Vector Fields

3.1 What are vectors?


A vector is a quantity that has both magnitude and direction. By ‘direction’, we mean that a
vector has both a line of action and a sense along that line (left or right, for example). We also
require that a vector obeys the rules of vector addition. In summary, a vector:

1. has a magnitude;

2. has a line of action;

3. has a sense along that line of action;

4. obeys the rules of vector addition (a + b = b + a).

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 Properties of vectors

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)

= (ax + bx ) i + (ay + by ) j + (az + bz ) k .

3.2.2 Scalar (or dot) product


The definition of the scalar product is,
a · b = |a| |b| cos θ (3.2)
where θ is the angle between the two vectors from a to b (i.e. in the plane formed by the two
vectors). The result of a scalar product is a scalar.
Lecture 3. Vectors and Vector Fields 23

In Cartesian coordinates,
a · b = ax bx + ay by + az bz .

The scalar product is both distributive,

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.

3.2.3 Vector (or cross) product


The definition of the vector product is,

a × b = |a| |b| sin θ n̂ , (3.4)

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

The vector product is distributive,

a × (b + c) = a × b + a × c ,

but is not commutative,


a × b 6= b × a .

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)

3.2.4 Triple products


The two types of triple product are: the scalar triple product,

a · (b × c) = b · (c × a) = c · (a × b) , (3.6)

and the vector triple product,

a × (b × c) = (a · c)b − (a · b)c . (3.7)

3.3 Vector fields


So far, we have looked at scalar functions of multiple variables (and their differentiation and
integration), and we have reminded ourselves of some fundamental properties of vectors. This
course is principally about vector fields. A vector field is a region of space in which a vector
property varies with position, and, in general, with time. Some examples will help us here.
In fluids, pressure is a scalar variable which varies with space and time. In Cartesian coordi-
nates, we write,
p = p(x, y, z,t) ,

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,

Vx = Vx (x, y, z,t) Vy = Vy (x, y, z,t) Vz = Vz (x, y, z,t) , (3.8)

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.

3.4 Field lines


Field lines are a convenient way to represent a vector field. Field lines are constructed such that
they are tangential to the vector field at a particular instant in time. Field lines therefore show the
direction of the vector field, but not the magnitude.

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,

dr = kV where k is a constant, and, V × dr = 0 . (3.12)

Example
Find the equation for, and sketch, the field lines of the 2-D, steady in time, vector field,

V = (kx) i − (ky) j

where y ≥ 0 and k is a constant.


dy Vy −y
= =
dx Vx x

dx dy
+ =0
x y

ln x + ln y = ln c

xy = c

when x>0 Vx > 0 and


Lecture 3. Vectors and Vector Fields 27

when y < 0 Vy < 0 .

3.5 Differentiation of vectors

3.5.1 Ordinary derivatives


If a vector V is dependent on only one scalar variable, V = V(s), then,
!
dV V(s + δ s) − V(s)
= lim . (3.13)
ds δ s→0 δs

dV/ds is a vector, and δ V = (dV/ds)δ s is not normally in the same direction as V.

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

The velocity vector of the particle is given by,


!
r(t + δ t) − r(t) dr
v(t) = lim = ,
δ t→0 δt dt

and this must be tangential to the specified curve.


The acceleration vector of the particle is given by,
!
v(t + δ t) − v(t) dv d 2 r
a(t) = lim = = 2 , (3.14)
δ t→0 δt dt dt

and this will only be tangential to the specified curve if the curve has zero curvature.

3.5.2 Differentiation formulae


If A, B and C are differentiable vector functions of a scalar variable s, and φ is a differentiable
scalar function of s, then the following formulae apply (note that, as always, the order in the
vector product terms is important):
d  dA dB
A+B = + (3.15)
ds ds ds
d  dB dA
A·B = A· + ·B (3.16)
ds ds ds
d  dB dA
A×B = A× + ×B (3.17)
ds ds ds
d  dA d φ
φA = φ + A (3.18)
ds ds ds
d  dC dB dA
A·B×C = A·B× +A· ×C+ ·B×C (3.19)
ds ds ds ds
d   dC   dB  dA 
A × (B × C) = A × B × +A× ×C + × B×C (3.20)
ds ds ds ds

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

dBx dBy dBz dAx dAy dAz


= Ax + Ay + Az + Bx + By + Bz
ds ds ds ds ds ds
Lecture 3. Vectors and Vector Fields 29

dB dA
= A· + ·B
ds ds

3.5.3 Partial derivatives


If V is a function of more than one scalar variable, for example V = V(x, y, z) then the partial
derivative of V with respect to x is defined by,
!
∂V V(x + δ x, y, z) − V(x, y, z)
= lim . (3.21)
∂ x δ x→0 δx

∂ 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

There are similar expressions for ∂ V/∂ y and ∂ V/∂ z,


!
∂V V(x, y + δ y, z) − V(x, y, z)
= lim , (3.22)
∂ y δ y→0 δy
!
∂V V(x, y, z + δ z) − V(x, y, z)
= lim . (3.23)
∂ z δ z→0 δz

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

The Gradient of a Scalar Field

4.1 The vector operator ‘Del’


You have met the vector operator, ‘del’, in Part IA. We represent ‘del’ by the ‘upside down
triangle’ ∇ (which has nothing to do with big delta, ∆). In Cartesian coordinates, ∇ is defined by,

∂ ∂ ∂
∇=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

∇φ = (2xy sin z) i + (x2 sin z)j + (x2 y cos z)k


32 IBP7 - Vector Calculus and PDEs 2019/20

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

4.2 Physical interpretation of the gradient


The vector gradient is the 3-D equivalent of the slope of a curve in 1-D.
φ = φ (x, y, z) is a scalar field in Cartesian space (for example, the temperature at every point
in space of a 3-D object). We can draw surfaces of constant φ :
Lecture 4. The Gradient of a Scalar Field 33

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

Now, using ∇φ , we can write this, more compactly, as,


!
∂φ ∂φ ∂φ
δφ = i +j +k · (δ x i + δ y j + δ x k)
∂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

= ∇φ · n̂ . (4.5)
ds
This is known as the ‘directional derivative’ and d φ /ds = ∇φ · n̂ is valid for any coordinate
system. Notice that:

1. if n̂ lies on the surface of constant φ , ∇φ · n̂ = d φ /ds = 0

2. the magnitude of d φ /ds is greatest when n̂ is parallel to ∇φ


34 IBP7 - Vector Calculus and PDEs 2019/20

3. the direction of ∇φ is always in the direction of increasing φ (“∇φ always points up hill”)

4.3 Flux-gradient empirical “laws”


For any scalar field φ it is always possible to obtain a vector field V using the relationship
V = ∇φ . However, if we have a particular vector field V0 , it is not always possible to find a
scalar field φ0 such that V0 = ∇φ0 . For cases when we can find the required φ0 field, φ0 is known
as the scalar potential and V0 is the flux vector. Considerable mathematical simplifications then
follow: once we have obtained the scalar potential, we also know all three components of the
vector field.
There are several engineering applications where the flux-gradient approach is used to model
a physical process. Here, we will consider Fourier’s law of heat conduction, Fick’s law of diffu-
sion and Ohm’s law of current flow. Each of these is not actually a law, but rather a model that
has been found to fit empirical data.

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

Similarly, in a three-dimensional problem, we would also have,


∂T ∂T
qy = −λ and qz = −λ .
∂y ∂z

We can express Fourier’s law, concisely, as,

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

and the general, 3-D, expression is,


j = −σ ∇V .
36 IBP7 - Vector Calculus and PDEs 2019/20

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

Total diffusive mass flow rate at r = R,


1
MR = 2π R aD = 2π aD
R

i.e. a constant, irrespective of R.

4.4 A return to the substantive derivative


In Lecture 1 we found the rate of change of temperature, as measured by a probe moving through
a time-varying temperature field T = T (x, y, z,t), was given by the total derivative,
!
dT ∂T ∂T ∂T ∂T
= Vx +Vy +Vz + (4.6)
dt ∂x ∂y ∂z ∂t

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

which we now recognise as,


dT ∂T
= V · ∇T + ,
dt ∂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

4.5 ∇ in non-Cartesian coordinate systems


So far, we have made use of the definition of the ∇ operator in Cartesian coordinates,

∂ ∂ ∂
∇=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.

Cylindrical polar coordinates (r, θ , z)


A cylindrical polar coordinate system (r, θ , z) has base vectors (er , eθ , ez ). The small change in
position vector as we move from (r, θ , z) to (r + δ r, θ + δ θ , z + δ z) is given by,

δ r = δ r er + rδ θ eθ + δ z ez .

In order to satisfy δ f = ∇ f · δ r, we can see that,

∂ 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

Spherical polar coordinates (r, θ , φ )


We can follow the same procedure in spherical polar coordinates (r, θ , φ ). The base vectors are
now (er , eθ , eφ ) and the small change in position vector as we move from (r, θ , φ ) to (r + δ r, θ +
δ θ , φ + δ φ ) is given by,
δ r = δ rer + rδ θ eθ + r sin θ δ φ eφ (4.13)

In order to satisfy δ f = ∇ f · δ r, we must have,

∂ 1 ∂ 1 ∂
∇ = er + eθ + eφ . (4.14)
∂r r ∂θ r sin θ ∂ φ
IBP7 - Vector Calculus and PDEs 2019/20

Lecture 5

The Divergence of a Vector Field

5.1 Definition and useful identities


The divergence of a vector field V is obtained by taking the dot product of the vector operator ∇
with V and is written ∇ · V (or ‘div V’). The divergence of a vector field is a scalar.
In Cartesian coordinates,
! !
∂ ∂ ∂
∇·V = i +j +k · Vx i +Vy j +Vz k
∂x ∂y ∂z

∂ Vx ∂ Vy ∂ Vz
= + + ,
∂x ∂y ∂z

where V = Vx i +Vy j +Vz k .


We now have two uses for ‘del’ (∇): gradient and divergence. It might be helpful to note that:

1. The gradient ( ∇φ ) is a vector obtained by operating on a scalar field;

2. The divergence ( ∇ · V ) is a scalar obtained by operating on a vector field;

3. ∇ · V (the divergence) is quite different from V · ∇ (scalar operator).

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

∇ · V = 2xz − 6y2 z2 + xy2

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)

5.2 Physical interpretation of the divergence


The divergence is an important quantity that is linked to the conservation of physical proper-
ties such as mass, momentum, energy, magnetic flux, etc. With this in mind, we consider the
conservation of mass in fluid mechanics.

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

In vector form, valid for any coordinate system,

∂ρ
+ ∇ · (ρ 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.

5.3 Solenoidal vector fields


A vector field where the divergence is everywhere zero is called a solenoidal field. Thus, for an
incompressible flow, the velocity field V is an example of a solenoidal field. In a solenoidal field,
the net efflux of the vector field from a volume element δ v is zero. The flux entering the volume
element is the same as flux leaving the element: there are no ‘sources’ or ‘sinks’ of the vector
field within the element.

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

5.4 ∇ · V in non-Cartesian coordinate systems

Cylindrical polar coordinates (r, θ , z)


The divergence of a vector field V is defined as ∇ · V. We have already found that ∇ in cylindrical
polar coordinates is,
∂ 1 ∂ ∂
∇ = er + eθ + ez , (5.8)
∂r r ∂θ ∂z
and so we can evaluate ∇ · V. However, we need to be careful because the base vectors are
functions of position, i.e. er and eθ are both functions of θ .
! !
∂ 1 ∂ ∂
∇ · V = er + eθ + ez · Vr er +Vθ eθ +Vz ez (5.9)
∂r r ∂θ ∂z

The dependence of er and eθ on θ means we need to evaluate the ∂ /∂ θ terms as follows,

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

The expression for ∇ · V in cylindrical polar coordinates is therefore


∂ Vr Vr 1 ∂ Vθ ∂ Vz
∇·V = + + + , (5.11)
∂r r r ∂θ ∂z
and that the Maths Data Book simplifies this a little further,
1 ∂ (rVr ) 1 ∂ Vθ ∂ Vz
∇·V = + + . (5.12)
r ∂r r ∂θ ∂z

Spherical polar coordinates (r, θ , φ )


We will not go through the derivation here, but ∇ · V for spherical polar coordinates is also listed
in the Maths Data Book,
1 ∂ (r2Vr ) 1 Vθ sin θ 1 ∂ Vφ
∇·V = 2 + + (5.13)
r ∂r r sin θ ∂ θ r sin θ ∂ φ

5.5 Divergence and gradient combined


We have seen that a range of physical processes can be modelled by equations of the form,

V = −k∇ψ . (5.14)

Three examples given were:

1. Heat conduction (V=heat flux vector, ψ = temperature, k = thermal conductivity )

2. Diffusion (V=mass flux vector, ψ = concentration, k = diffusion coefficient )

3. Current flow (V=current density, ψ = electric potential, k = electrical conductivity )

If k is constant, then V = ∇φ where φ is the scalar potential and φ = −kψ .


Each of the above processes involve conservation of a physical quantity (energy, the mass of
the diffusing species, electric charge). If the situation to be modelled is at a steady-state, with no
sources or sinks, then we know that the vector field V must be solenoidal and ∇ · V = 0.
When the vector field is governed by a scalar potential, and is also solenoidal, it follows that,

∇ · (∇φ ) = 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.

rate of increase of energy in δ v = - net efflux of heat from δ v

∂T
ρc δ v = −(∇ · q)δ v
∂t

∂T
ρc = ∇ · (λ ∇T )
∂t

If steady and λ is constant ∇2 T = 0

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

or if the problem is time-dependent and has radial symmetry and constant λ ,

" #
1 ∂ 2∂T ρc ∂ T
r = .
r2 ∂ r ∂r λ ∂t

S-ar putea să vă placă și