F1.4ZH2 Numerical Solution of PDEs
Page 15
LTEs (continued)
The first term on the right of the LTE for the FTCS scheme is referred to as the
leading term
of the local truncation error (LTE): for this scheme it is
first order accurate in time
and
2nd
order in space
.
Definition: consistency/order
If the LTE of a scheme
→
0 as Δ
x,
Δ
t
→
0, the scheme is
said to be
consistent
. This is the minimum requirement for any numerical scheme. Furthermore,
if the LTE is of order
O
(Δ
x
p
,
Δ
t
q
), the scheme is said to be of order
p
in space and
q
in time. If
r
is fixed so we can write the LTE as
O
(Δ
x
p
) as in the above expression for the FTCS scheme,
we say more generally that the scheme is
p
th order. So the FTCS scheme for the heat equation
is 2nd order if
r
6
=
1
6
, and 4th order if
r
=
1
6
.
Exercise:
Check that all the 3rd order terms in the LTE for the FTCS scheme vanish.
2.4
Matrix version of FTCS scheme
We have seen that if Δ
x,
Δ
t
are small, then the LTE for the FTCS scheme
→
0 as Δ
x,
Δ
t
→
0.
This is saying that the error is small after one time step, starting with the exact solution.
However this is not enough to guarantee that the scheme gives good results after a large
number of time steps. An example we have previously referred to briefly is the problems that
occur in the FTCS scheme if
r >
0
.
5. Suppose we take the example we looked at above, with
J
= 4, but this time take “triangular” initial conditions
F
(
x
) =
2
x,
x
≤
0
.
5
2(1

x
)
,
x >
0
.
5
(This choice of an IC with a discontinuous derivative, rather than a sin(
πx
), results in the
problems becoming apparent at smaller times.
Similar things happen for sin(
πx
) but take
longer to manifest themselves). With
r
= 0
.
4 (left) and
r
= 0
.
6 (right) we get the two graphs
shown below.
t
0
t
1
t
2
t
3
t
4
t
5
x
0
j=0
x
1
j=1
x
2
j=2
x
3
j=3
x
4
j=4
w
j
n
t
0
t
1
t
2
t
3
t
4
t
5
x
0
j=0
x
1
j=1
x
2
j=2
x
3
j=3
x
4
j=4
w
j
n
Note that when
r
= 0
.
4 the numerical solution decreases smoothly towards zero, in line with
what we would expect in the physical model. But when
r
= 0
.
6 the solution develops spatial
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
F1.4ZH2 Numerical Solution of PDEs
Page 16
oscillations which are increasing in amplitude. If run for further times (try it!), these oscillations
become unbounded, i.e.
w
n
j
→ ∞
as
n
→ ∞
, in contrast to the exact solution which can be
shown to satisfy
→
0 as
t
→ ∞
.
We would regard this as bad.
Even at small times we
find the temperature is becoming negative at some points, physically contradicting the laws of
thermodynamics!
Technically if this sort of bad behaviour occurs we say the scheme
unstable
. We study one way
of analysing this behaviour in this section. To do this we write the FTCS scheme in matrix
form.
Set
w
n
=
w
n
1
w
n
2
.
.
.
w
n
J

1
,
the vector of values of the numerical solution at the internal spatial grid points at time level
t
n
. We know from the initial conditions that
w
0
=
u
0
=
F
(
x
1
)
F
(
x
2
)
.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 sd
 Numerical Analysis, Wj, Partial differential equation, John von Neumann, Von Neumann stability analysis, FTCS scheme

Click to edit the document details