You are on page 1of 19

Chapter 5

The Advection-Diusion Equation


Now that we have a strong foundation in understanding and solving the diusion equation
(Chapter 4), lets consider the eects of advection on both analytical and numerical
solutions.
5.1 Analytical Solutions of the ADE
We can nd some analytical solutions for the advection-diusion equation (ADE) if we
have incompressible ow, Fickian diusion, and uniform diusivities. Under these con-
ditions, the ADE simplies to
C
t
+ u
C
x
+ v
C
y
+ w
C
z
= D
x

2
C
x
2
+ D
y

2
C
y
2
+ D
z

2
C
z
2
(5.1)
Eqn. 5.1 is equivalent to Eqn. 2.30 without a source term see Chapter 2 for its derivation.
5.1.1 Instantaneous Point Source
Moving Coordinates
Lets consider the 1D case rst. If the coordinate system is chosen such that cross-stream
and vertical velocities are zero (v = w = 0), and if mixing in the y and z directions is
fast compared to longitudinal advection and diusion, then Eqn. 5.1 simplies to
C
t
+ u
C
x
= D
x

2
C
x
2
(5.2)
If we release scalar mass per unit area M/A at location x = x
0
and time t = t
0
, it
spreads due to diusion. The only eect of advection is to carry the cloud downstream
113
114
as it diuses. In fact, if we oat along in a boat moving at velocity u (the same velocity
as the uid), the cloud will appear to evolve just like it would have without any advection
at all because the center of mass will not move relative to us. To describe the evolution
of the cloud from this perspective, lets dene the moving coordinate, , to be in the
same direction as x but with its origin in the moving boat as illustrated below:
If the boat starts at time t = 0 and location x = 0, its location is given by x = ut, and
the moving coordinate must be related to the stationary coordinate x by the equation
= x ut (5.3)
to ensure that = 0 in the boat at all times. From the perspective of the boat, the
concentration distribution simply follows the diusion equation (with zero advection),
for which the solution is
C(, t) =
M/A
_
4D
x
(t t
0
)
exp
_

(
0
)
2
4D
x
(t t
0
)
_
(5.4)
where
0
= x
0
ut
0
is the location of the point source from the perspective of the boat.
Eqn. 5.4 is equivalent to Eqn. 4.11, but with taking the place of x.
We found Eqn. 5.4 from our intuitive understanding of advection as a process that simply
carries a diusing scalar cloud downstream. The more rigorous way to show that Eqn. 5.4
is the solution of Eqn. 5.2 is to transform Eqn. 5.2 to moving coordinates and show that
we obtain the diusion equation, whose solution is given by Eqn. 5.4. We can transform
the Eqn. 5.2 from stationary coordinates (x, t) to moving coordinates (, t) using the
chain rule as follows
C(x, t)
t
=
C((x, t), t)

t
u
+
C((x, t), t)
t
t
t
1
= u
C(, t)

+
C(, t)
t
C(x, t)
x
=
C((x, t), t)

x
1
=
C(, t)

2
C(x, t)
x
2
=

_
_
_
C((x, t), t)

x
1
_
_
_

x
1
=

2
C(, t)

2
Advection and Diusion 115
Substituting into Eqn. 5.2, we nd

u
C

+
C
t
+

u
C

= D
x

2
C

2

C
t
= D
x

2
C

2
which is, indeed, the diusion equation, which for an instantaneous point source in an
unbounded domain has the solution given by Eqn. 5.4 (recall, we found this solution
using the similarity approach in Section 4.1.1). Note that by dening similar moving
coordinates in the y and z directions, we may tranform the 2D and 3D ADE to the
diusion equation as well.
1D Solution
Transforming back to stationary coordinates, i.e., plugging in = x ut, we nd the
following solution to the 1D ADE for an instantaneous point source of mass M/A released
at location x
0
and time t
0
C(x, t) =
M/A
_
4D
x
(t t
0
)
exp
_

(x x
0
u(t t
0
))
2
4D
x
(t t
0
)
_
(5.5)
2D Solution
The solution for 2D advection and diusion of an instantaneous point source of mass per
unit length M/L released at location (x
0
, y
0
) and time t
0
is
C(x, y, t) =
M/L
z
4(t t
0
)
_
D
x
D
y

exp
_

(x x
0
u(t t
0
))
2
4D
x
(t t
0
)

(y y
0
v(t t
0
))
2
4D
y
(t t
0
)
_
(5.6)
3D Solution
The solution for 3D advection and diusion of an instantaneous point source of mass M
released at location (x
0
, y
0
, z
0
) and time t
0
is
C(x, y, t) =
M
[4(t t
0
)]
3/2
_
D
x
D
y
D
z

exp
_

(x x
0
u(t t
0
))
2
4D
x
(t t
0
)

(y y
0
v(t t
0
))
2
4D
y
(t t
0
)

(z z
0
w(t t
0
))
2
4D
z
(t t
0
)
_
(5.7)
116
Spatial and Temporal Records for a 1D Instantaneous Point Source
In this section, we will examine spatial and temporal distributions of concentration for
1D advection and diusion of an instantaneous point source released at location x
0
and
time t
0
. The spatial distribution of concentration is fairly intuitve by now a Gaussian
scalar cloud spreads via diusion such that the standard deviation is given by

x
=
_
2D
x
(t t
0
)
The cloud is carried downstream by advection such that the center of mass is given by
x
c
= x
0
+ u(t t
0
)
This spatial distribution of concentration is plotted below at times t t
0
= L
2
/D
x
for
= 10, 30, and 50 at Peclet numbers of 0.1 (diusion dominating) and 10 (advection
dominating):
0 100 200 300 400 500
0
0.02
0.04
0.06
0.08
(x!x
0
)/L
C
(
x
)

L
A
/
M


Pe = 0.1
Pe = 10
Figure 5.1: Some spatial concentration distributions for 1D advection and diusion.
The peak concentration over all space at a given time for a 1D point source under the
inuence of both advection and diusion is
C
max
(t) =
M/A
_
4D
x
(t t
0
)
(5.8)
This is the same maximum as for diusion alone (see p. 75). Let us dene x
max
, the
location of maximum concentration, such that C
max
(t) C(x
max
, t). When there is no
advection, the maximum concentration occurs at the location of the release, x
max
= x
0
.
However, when there is advection, the maximum concentration occurs at location
x
max
= x
0
+ u(t t
0
)
Advection and Diusion 117
which moves downstream over time. Since the concentration distribution is symmetric
about x
max
at any given time, the maximum concentration over all space coincides with
the center of mass of the cloud.
Using aerial photography or various laboratory visualization techniques, we can measure
the spatial distribution of concentration C(x) at a given time, and for an instantaneous
point source, we will obtain nice Gaussian concentration distributions like the ones in
Figure 5.1. However, in the eld, it is more common to obtain a time history of con-
centration C(t) from a stationary instrument. Therefore, we need to understand the
temporal evolution of concentration at a xed point in space as well as the more intuitive
spatial distribution of concentration at a given point in time.
The temporal record of concentration at a point in space depends on the Peclet number
in a more complicated way than the spatial record of concentraiton at a point in time, so
lets work with the dimensionless form of Eqn. 5.5. Recall from Section 3.4 that there are
two ways to scale the 1D ADE: using the diusive time scale T = L
2
/D
x
(appropriate
when diusion is important, at low to moderate Peclet numbers) and using the advective
time scale T = L/u (appropriate when advection is important, at moderate to high Peclet
numbers). Lets dene dimensionless variables so that the coordinate system is centered
at the point of the release as follows:
x


x x
0
L
, t


t t
0
T
, C


CLA
M
The Peclet number is dened by
Pe =
uL
D
x
Using the diusive time scale, T = L
2
/D
x
, we nd the nondimensional solution
C(x

, t

) =
1

4t

exp
_

(x

Pe t

)
2
4t

_
(5.9)
and alternatively, using the advective time scale T = L/u, we nd the nondimensional
solution
C(x

, t

) =
_
Pe
4t

exp
_
Pe
(x

)
2
4t

_
(5.10)
Time histories of concentration at location x = x
0
+ L are plotted on the next page
for the diusive scaling (Figure 5.2) and the advective scaling (Figure 5.3) for some
dierent Peclet numbers. To t all of these curves on the same gure, we have normalized
concentration by C
max
(x
0
+ L), the maximum concentration measured over all time at
x = x
0
+ L.
118
0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
D
x
(t!t
0
) /L
2
C
(
x
0
+
L
,
t
)

/

C
m
a
x
(
x
0
+
L
)
Figure 5.2: Concentration time histories C(t) measured at location x = x
0
+L for some
dierent Peclet numbers Pe = uL/D
x
. Time is normalized by the diusive time scale.
0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
u(t!t
0
) /L
C
(
x
0
+
L
,
t
)

/

C
m
a
x
(
x
0
+
L
)
Figure 5.3: Concentration time histories C(t) measured at location x = x
0
+L for some
dierent Peclet numbers Pe = uL/D
x
. Time is normalized by the advective time scale.
Setting the time derivative of Eqn. 5.5 to zero, we nd that C
max
(x), the maximum
concentration measured over all time at location x, occurs at time
t
max
= t
0

D
x
u
2
+

_
D
x
u
2
_
2
+
_
x
u
_
2
= t
0
+
(x x
0
)
2
D
x
_
1 +
_
1 + Pe
2
x
Pe
2
x
_
= t
0
+
(x x
0
)
u
_
1 +
_
1 + Pe
2
x
Pe
x
_
(5.11)
Advection and Diusion 119
where we have dened a new Peclet number based on L = x x
0
Pe
x

u(x x
0
)
D
x
We may nd the following two limiting solutions using Taylor series expansion about
Pe
x
= 0 and 1/Pe
x
= 0, respectively:
t
max
= t
0
+
_

_
x
2
2D
x
for Pe
x
0.1
x
u
for Pe
x
1000
(5.12)
These limiting solutions are clearly visible in Figures 5.2 and 5.3 with L = x x
0
.
Plugging t
max
into the solution of the 1D ADE for an instantaneous point source (Eqn. 5.5),
we nd C
max
(x), the maximum concentration measured over all time at location x. The
result is a rather ugly function of Pe
x
. Since this function ugly, we will not write it out,
but it is plotted below vs. Pe
x
and also vs.

Pe
x
.
5 10 15
0.2
0.4
0.6
0.8
1
Pe
x
C
m
a
x
(
x
)

L
A
/
M
1 2 3 4
0.2
0.4
0.6
0.8
1
Pe
x
1/2


general solution
limiting solution for small Pex
limiting solution for large Pex
Figure 5.4: Maximum concentration over all time at a given point in space, as a function
of Peclet number and its square root. Limiting cases for small and large Peclet number
are also plotted.
Also included in this plot are the limiting solutions for small and large values of Pe
x
.
These are given by
C
max
(x)
_

_
M
AL
_
1
2e
0.242
M
AL
for Pe
x
0.1
M
AL
_
Pe
x
4
0.282
M
AL
_
Pe
x
for Pe
x
1000
(5.13)
120
5.1.2 Advection and Diusion of a Concentration Front in 1D
Now consider 1D advection and diusion of an initially sharp concentration front. For
example, consider uid with concentration C
0
displacing uid with zero concentration in
a pipe where the velocity is u. The governing equation is
C
t
+ u
C
x
= D
x

2
C
x
2
At time t = 0, there is a sharp front so that
C(x, 0) =
_
C
0
for x 0
0 for x > 0
The center of the front will travel at velocity u as the front is smoothed out by diusion
as illustrated below.
Again, it is useful to imagine riding the front as it moves with the water velocity. From
this perspective, advection is zero, and the problem looks a lot like one we solved in
Chapter 4. Transforming to moving coordinates, = xut and t, the governing equation
and initial conditions become
C
t
= D
x

2
C

2
C(, 0) =
_
C
0
for 0
0 for > 0
This is the mirror image of the problem we solved in Section 4.1.2, for which the solution
is given by Eqn. 4.22. Adjusting for the mirror image eect
1
, and plugging in the moving
coordinates, we nd
C(x, t) =
C
0
2
erfc
_
x ut

4D
x
t
_
(5.14)
1
To adjust for the mirror image eect, we may transform to C

= C C
0
to obtain a problem that
looks exactly like the one solved by Eqn. 4.1.2. We also make use of the equality 1 + erf(u) = erfc(u)
to nd the solution.
Advection and Diusion 121
5.1.3 Lateral Mixing of Two Streams
Now consider the lateral mixing of two streams with dierent concentrations of some
chemical, as might occur when two rivers converge. This problem is illustrated below:
For now, lets neglect the eects of boundaries in the lateral direction (you can add them
later using the method of images). Assume that concentration is fully mixed across the
river depth, so the problem is 2D. Also assume the solution has reached steady state.
Consider the result far downstream of the convergence point so that the Peclet number is
large. Under all these assumptions, the governing equation may be simplied as follows:

7
0
C
t
+ u
C
x
=

>
0
D
x

2
C
x
2
+ D
y

2
C
y
2
+

>
0
D
z

2
C
z
2
and we are left with
u
C
x
= D
y

2
C
y
2
We may convert this equation into the 1D diusion equation
C

= D
y

2
C
y
2
using the following coordinate transformation:
=
x
u
The initial conditions are given by
C(y, = 0) =
_
C
0
for y 0
0 for y > 0
122
The solution is apparent from Section 5.1.2 if we recognize the equivalence of and y
and of t and
C(x, y) =
C
0
2
erfc
_
y
_
4D
x
x/u
_
(5.15)
5.1.4 Concentration Specied at a Fixed Point in Space
For the problems we have considered thus far, it was possible to transform to some
coordinate system in which the advection-diuison problem became simply a diusion
problem. In the case of concentration specied at a xed point in space, this is not
possible. Consider 1D advection and diusion
C
t
+ u
C
x
= D
x

2
C
x
2
where the initial concentration at time t = 0 is zero everywhere, i.e.
C(x, 0) = 0
and after time t = 0, the concentration at x = 0 is set to a constant concentration C
0
C(0, t) = C
0
For x > 0, the solution is given by
C(x, t) =
C
0
2
_
erfc
_
x ut

4D
x
t
_
+ erfc
_
x + ut

4D
x
t
_
exp
_
ux
D
x
__
(5.16)
This solution is important for soil column studies, as illustrated below:
Note that for small Peclet number (common in soils), the second term is small.
Advection and Diusion 123
5.1.5 Steady, Continuous Point Source
It is common for pollutants to be released steadily from a pipe into a river. Consider
euent released into a river at rate

M and at location (x
0
, y
0
, z
0
). As you saw in Home-
work 2, an euent plume in steady state will travel through three zones. In zone 1, the
plume will spread in 3D until it is fully mixed over the depth of the river. Then, in zone
2, it will spread in 2D until it is mixed over the width as well. Finally, in zone 3, the
plume is fully mixed over the river cross-section, and the concentration is constant in x
due to mass conservation. These three zones are illustrated below:
124
Steady, Continuous Point Source in 3D
In 3D, with coordinates chosen so that advection is in the x direction, the steady-state
advection-diusion equation is

7
0
C
t
+ u
C
x
=

>
0
D
x

2
C
x
2
+ D
y

2
C
y
2
+ D
z

2
C
z
2
As you saw in Homework 2, the Peclet number is quite large in rivers, except very near
to the source, so the longitudinal diusion term is small, and our governing equation can
be simplied to
u
C
x
= D
y

2
C
y
2
+ D
z

2
C
z
2
A sheet of water having width x passes the continuous point source within time t =
x/u. Within this small time, it picks up mass M =

Mt =

Mx/u. Since there
is very little diusion in the x direction, mass within a sheet of water having width x
spreads like an instantaneous point source in 2D (in y and z) as it is carried downstream.
The mass per unit width in a given sheet is M/x =

M/u. Plugging this mass per unit
width into the solution for a point source diusing in 2D (Eqn. 4.16), and noting that
the mass within a sheet located at x has been spreading for time t t
0
= (x x
0
)/u, we
nd the following solution for a 3D, steady, continuous point source located at (x
0
, y
0
, z
0
)
C(x, y, z) =

M
4(x x
0
)
_
D
y
D
z
exp
_

u(y y
0
)
2
4D
y
(x x
0
)

u(z z
0
)
2
4D
z
(x x
0
)
_
(5.17)
This is the solution for an unbounded domain. Once the plume has traveled far enough
downstream that it reaches the water surface and the bed, image sources are necessary
to meet the vertical boundary conditions. Eventually, concentration becomes well-mixed
across the depth and the plume enters zone 2.
Advection and Diusion 125
Steady, Continuous Point Source in 2D
In zone 2, where the plume has become fully mixed across the depth of the river, it will
continue to spread in the y direction as it travels downstream. Since Peclet number is
large (even bigger in zone 2 than in zone 1), the steady-state advection-diusion equation
in 2D becomes
u
C
x
= D
y

2
C
y
2
Sheets of water having width x pick up mass

Mx/u as they pass the source. These
sheets have cross-sectional area L
z
x perpendicular to the direction of spreading (y)
where L
z
is the depth of the stream, so the mass per unit area within a single sheet is

M/(uL
z
). The mass within a single sheet spreads like an instantaneous point source in
1D (spreading in y), resulting in the following solution for a 2D, steady, continuous point
source located at (x
0
, y
0
)
C(x, y) =

M/L
z
u
_
4D
y
(x x
0
)/u
exp
_

u(y y
0
)
2
4D
y
(x x
0
)
_
(5.18)
This is the solution for a domain unbounded in y. Image sources are required to satisfy
the boundary conditions once the plume spreads to the banks of the river.
Steady, Continuous Point Source in 1D
Once the plume has mixed fully across the depth and the width of the river, concentration
becomes uniform. Using a control volume approach, we may nd the following solution
for the steady state concentration far downstream from a continuous point source
C =

M
uA
=

M
Q
(5.19)
where A is the cross-sectional area of the river and Q = uA is the ow rate.
126
5.1.6 Unsteady, Continuous Point Source in 1D
If a 1D continuous point source is turned on at time t = t
0
, so that

M(t)/A =
_
0 for t < t
0

M/A for t t
0
slabs of uid having thickness x that pass the point source at times t > t
0
will pick up
mass

Mx/u.
These slabs have volume xA, and in the 1D case, we can assume that mass instantly
mixes across the slabs. Thus, the slabs pick up concentration C
0
=

M/(uA) as they pass
the point source. Since the slabs that passed the point source before it was turned on
have zero concentration, there is a sharp front located at x = x
0
+ u(t t
0
).
The solution for the evolution of such a sharp front under the inuence of advection and
diusion is given by Eqn. 5.14 for the special case of x
0
= t
0
= 0. Generalizing this
solution for x
0
and t
0
, and plugging in C
0
=

M/(uA), we nd the following solution for
a continuous point source located at x = x
0
that releases mass at rate

M beginning at
time t = t
0
C(x, t) =

M
2uA
erfc
_
x x
0
u(t t
0
)
_
4D
x
(t t
0
)
_
(5.20)
Advection and Diusion 127
Note that it takes some time for the source to build up the long region of constant
concentration C
0
=

M/(uA) behind the front, and as the source builds up the front,
diusion erodes it. If the distance over which diusion has eroded the front is longer
than the region of constant concentration behind the front, there is no well-dened front,
and our solution is not valid. The length of the region of constant concentration is about
equal to u(tt
0
), and the distance over which the front has diused is about
_
D
x
(t t
0
).
Thus, our solution is valid only when u(t t
0
) >>
_
D
x
(t t
0
). Rearranging, we nd
that Eqn. 5.20 is valid for times
t t
0
>>
D
x
u
2
At smaller times, the solution is more complicated. You can nd it using the method
of superposition you will obtain an integral that must be evaluated using discrete
integration.
5.1.7 Unsteady Velocity
The solutions developed in this chapter using moving coordinates = x ut may be
easily adapted for the the case of unsteady velocity by replacing u(t t
0
) with the more
general form
_
t
t
0
u()d
For example, this is appropriate in the case of an instantaneous point source, a concen-
tration front, or an unsteady continuous point source. Moving coordinates in the y and
z directions may be generalized in a similar manner using velocities v and w.
128
5.2 Finite Dierence Solutions of the ADE
We may discretize the most general form of the 3D advection-diusion equation
C
t
+
(uC)
x
+
(vC)
y
+
(wC)
z
=

x
_
D
x
C
x
_
+

y
_
D
y
C
y
_
+

z
_
D
z
C
z
_
by plugging in Taylor series approximations of the derivatives, in the same way that we
discretized the diusion equation in Section 4.3. However, in this chapter, for simplicity
and the sake of illustration, we will only model the 1D advection-diusion equation for
incompressible ow and uniform diusivity
C
t
+ u
C
x
= D
x

2
C
x
2
(5.21)
5.2.1 FTCS Scheme
Discrete Equation for the FTCS Scheme
Using the FTCS (forward time, central space) discretization scheme, we obtain the fol-
lowing discrete, nite dierence equation:
C
n+1
i
=
_
s +
c
2
_
C
n
i1
+
_
1 2s
_
C
n
i
+
_
s
c
2
_
C
n
i+1
(5.22)
where the dimensionless number
c
ut
x
(5.23)
is called the Courant number, and recall that the dimensionless number
s
D
x
t
x
2
(5.24)
is called the diusion number.
Stability of the FTCS Scheme
Just as we did for the discrete diusion equation in Section 4.3.6, we may perform Von
Neumann stability analysis on the FTCS form of the discrete advection-diusion equation
(Eqn. 5.22). We nd that the FTCS scheme is stable if
c
2
2s 1 (5.25)
Advection and Diusion 129
Note that the requirement c
2
1 can be written c 1, or plugging in the denition of c
and rearranging,
t
x
u
This is known as the Courant-Friedrichs-Lewy or CFL condition. The CFL condtion
requires that the time step be shorter than the time it takes uid to travel between grid
points. This makes a lot of sense, physically, since we are trying to predict concentrations
at grid point i from concentrations at immediately adjacent grid points i 1.
Accuracy of the FTCS Scheme
Remember that when we used Taylor series to approximate the derivatives in Eqn. 5.21
(see Section 4.3.1), we truncated the Taylor series. We know that the truncation error is
O(t) in time and O(x
2
) for the FTCS scheme because the terms we truncated were
multiplied by t and x
2
.
We can calculate the truncation error much more precisely by plugging the Taylor series
into the discrete equation (Eqn. 5.22) to nd the partial dierential equation that the
FTCS scheme actually models. Plugging
C
n+1
i
= C
n
i
+
_
C
t
_
n
i
t +
_

2
C
t
2
_
n
i
t
2
2
+ ...
C
n
i1
= C
n
i

_
C
x
_
n
i
x +
_

2
C
x
2
_
n
i
x
2
2

_

3
C
x
3
_
n
i
x
3
6
+ ...
C
n
i+1
= C
n
i
+
_
C
x
_
n
i
x +
_

2
C
x
2
_
n
i
x
2
2
+
_

3
C
x
3
_
n
i
x
3
6
+ ...
into the discrete equation (Eqn. 5.22), we nd
C
n
i
+
_
C
t
_
n
i
t +
_

2
C
t
2
_
n
i
t
2
2
=
_
s +
c
2
__
C
n
i

_
C
x
_
n
i
x +
_

2
C
x
2
_
n
i
x
2
2

_

3
C
x
3
_
n
i
x
3
6
_
+
_
1 2s
_
C
n
i
+
_
s
c
2
__
C
n
i
+
_
C
x
_
n
i
x +
_

2
C
x
2
_
n
i
x
2
2
+
_

3
C
x
3
_
n
i
x
3
6
_
Grouping terms, canceling, plugging in the denitions of c and s, and dropping the
subscripts and superscripts to be more concise, we nd the following partial dierential
equation:
C
t
+ u
C
x
= D
x

2
C
x
2

t
2

2
C
t
2

ux
2
6

3
C
x
3
+O(x
3
, t
2
) (5.26)
130
Eqn. 5.26 is easier to interpret if we write the second time derivative in terms of spatial
derivatives. We can do this by taking /t and /x of Eqn. 5.26, obtaining

2
C
t
2
= u

2
C
xt
+ ... and (5.27)

2
C
xt
= u

2
C
x
2
+ ... (5.28)
respectively. Substituting Eqn. 5.28 into Eqn. 5.27, we nd

2
C
t
2
= u
2

2
C
x
2
+ ... (5.29)
Finally, plugging Eqn. 5.29 into Eqn. 5.26, we nd
C
t
+ u
C
x
=
_
D
x

u
2
t
2
_

2
C
x
2

ux
2
6

3
C
x
3
+O(x
3
, t
2
) (5.30)
Eqn. 5.30 is called the modied equation for the FTCS scheme. It is the dierential
equation that the discrete FTCS equation (Eqn. 5.22) actually solves. But we intended
to solve Eqn. 5.21, not Eqn. 5.30! Obviously, there will be some error in our numerical
solution due to solving the wrong equation. This is called the truncation error because
it arises from truncation of the Taylor series approximation of the governing equation.
Note that truncation error is distinct from the rounding error that results from using
oating point numbers on a computer. Rounding error causes instability and leads solu-
tions to blow up if not kept under control (as discussed in Section 4.3.6) while truncation
error is usually more mild.
The leading order truncation error due to the forward time discretization is

u
2
t
2

2
C
x
2
This error results in less diusion than we intended. Because it modies the eective value
of the diusion coecient in Eqn. 5.30, the coecient -u
2
t/2 is called the numerical
diusion coecient.
The leading order truncation error due to the centered spatial discretization is

ux
2
6

3
C
x
3
If x is too big, this error can result in ringing of the solution because it causes waves
of dierent frequencies to travel at dierent speeds. This phenomenon of dierent waves
traveling at dierent speeds is known as dispersion; thus, the coecient ux
2
/6 is
called the numerical dispersion coecient.
As we predicted, the leading order error terms for the FTCS scheme are O(x
2
, t).
Because we truncated the modied equation at O(x
3
, t
2
), we do not see the higher
Advection and Diusion 131
order error terms such as multiples of
4
C/x
4
,
5
C/x
5
, etc. However, these terms do
contribute to the truncation error. Each term with even-order x-derivatives (
4
C/x
4
,

6
C/x
6
, etc.) results in numerical diusion, i.e., an incorrect amount of spreading of the
solution. All of the terms with odd-order x-derivatives (
5
C/x
5
,
7
C/x
7
, etc.) result
in numerical dispersion, i.e., modication of wave speeds that can result in ringing.
As t and x become smaller and smaller, the error terms in the modied equation also
become smaller and smaller, and the modied equation converges to the equation we
intended to solve. When the modied equation converges to the equation we intended to
solve in the limit of t = x = 0 we say that the discrete equation is consistent with
the governing equation.
5.2.2 Crank-Nicolson Scheme
Since the C-N scheme is centered in space, there is no rst order numerical diusion due
to advection, and thus the C-N scheme is more accurate for advection-diusion problems
than the FTCS scheme. With advection, the discrete equation for the C-N scheme
becomes

_
s
2
+
c
4
_
C
n+1
i1
+
_
1 + s
_
C
n+1
i

_
s
2

c
4
_
C
n+1
i+1
=
_
s
2
+
c
4
_
C
n
i1
+
_
1 s
_
C
n
i
+
_
s
2

c
4
_
C
n
i+1
(5.31)
This is a matrix equation which must be solved at each time step. Boundary conditions
are applied in the same manner as illustrated in Section 4.3.5 for the diusion equation.

You might also like