Information Technology Reference
In-Depth Information
In our problem we have the functions u .x; t / and f.x;t/, which at the grid points
have the values u i
and f `
i
, respectively, in our more compact notation.
The purpose of a finite difference method is to compute the values u i for i
D
0;:::;nand
`
D
0;:::;m.
Fortunately, you now have an idea of what a grid in x t space is. The second
item in the list of characteristics of the finite difference method is to sample the PDE
at these grid points. To this end, we write the PDE (7.86)as
@t u .x i ;t ` / D @ 2
@
u .x i ;t ` / C f.x i ;t ` /;
(7.87)
@x 2
where i and ` denote points in the computational x t grid.
Finite Difference Approximations
The third step in the list of characteristics of the finite difference method consists
of replacing derivatives by finite differences. Since there are many possible finite
difference approximations for a derivative, this step has no unique recipe. We will
try different approximations of the time derivative later, but for now we use the
specific choices
@t u .x i ;t ` / u `C1
u i
t
@
i
;
(7.88)
u .x i ;t ` / u i1
2 u i
C u iC1
@ 2
@x 2
:
(7.89)
x 2
The finite difference approximation ( 7.88 ) is a one-sided difference, typically like
the fraction
g.t C h/ g.t/
h
you may have seen in the definition of the derivative g 0 .t / in introductory calculus
topics (in that case the limit h ! 0 is a central point; now we have a finite h,ort
as we denote it here).
The finite difference on the right-hand side of ( 7.89 ) is constructed by combining
two centered difference approximations. We first approximate the “outer” derivative
at x D x i
D x i C 2
(and t D t ` ), using a fictitious point x
x to the right and a
iC 2
D x i 2
fictitious point x
x to the left:
i 2
" @ u
@x
# :
@ u
@x
`
`
@ u
@x
`
@
@x
1
x
iC 2
i 2
i
 
Search WWH ::




Custom Search