Information Technology Reference
In-Depth Information
where C 1 and C 2 are constants depending on the exact solution u .x; t /. It makes
sense to keep both error terms at the same level, which means that we should choose
t to be proportional to x 2 . Therefore, if we refine the spatial grid (reduce x),
we should also reduce t . In other words, we keep ˛ D t=x 2 constant in a
series of experiments where x is reduced. With the implicit method we can choose
˛>1=2if we want, but to obtain accuracy, we still have the unfavorable situation
where doubling the number of grid points requires reducing the time step by a factor
of four. In other words, both methods should apply t D ˛x 2 , the only difference
being that the implicit method allows for any ˛, while the explicit method will typi-
cally apply ˛ D 0:5. This implies that the implicit method is 2˛ times more efficient
than the explicit method. We strongly emphasize that these considerations are very
rough.
The discussions above are a bit disappointing: We derived a more complicated
implicit scheme, but it is not much more efficient than the explicit scheme. It would
be nice to have an unconditionally stable implicit scheme that allows larger time
steps in a way that makes it more efficient than the explicit scheme. This is the topic
of the next section.
7.5.5
The Crank-Nicolson Scheme
It is easy to increase the accuracy of the explicit and implicit schemes by employing
more accurate finite differences. In both the explicit and implicit methods we used
one-sided differences in time. A central difference can decrease the error in time
to be proportional to t 2 instead of just t . The idea of the following so-called
Crank-Nicolson scheme is to apply a central derivative in time.
We approximate the PDE at the spatial point x i
and the time point t `1=2 .A
centered difference at this time point is
@ u
@t
`1=2
u i
u `1
i
:
t
i
We need to approximate the second derivative,
@ 2 u
@x 2
`1=2
u `1=2
2 u `1=2
i
C u `1=2
iC1
i1
;
x 2
i
A problem arises here: u `1=2
i1
, u `1=2
i
,and u `1=2
iC1
are not quantities at our integer
steps in time. One way out of this problem is to approximate a quantity at time level
` 1=2 by an arithmetic average of the quantity at time levels ` and ` 1.For
example,
u `1
i
:
1
2
u `1=2
i
C u i
 
Search WWH ::




Custom Search