Information Technology Reference
In-Depth Information
@
@x
.x
i
;t
`
/;
where
.x
i
;t
`
/
k.x/
@
@x
u
.x
i
;t
`
/;
and thereafter we approximate the inner derivative in . This is the same proce-
dure as we followed on page
318
when deriving finite difference approximations for
second-order derivatives.
The first step involves a centered finite difference around the point x
i
:
`
iC
2
`
i
2
@
@x
.x
i
;t
`
/
:
x
The expression
iC
2
;t
`
/
D
.x
i
C
2
x; t
`
/.Now,x
i
C
2
means .x
x is
iC
2
not a grid point, but this will not turn out to be a problem.
The quantities
iC
2
and
i
2
involve first-order derivatives and must also be
discretized. Using centered finite differences again, we can write
u
iC1
u
i
x
`
iC
2
D
k
iC
2
and
u
i
u
i1
x
i
2
D
k
:
i
2
means k.x
i
C
2
The quantity k
x/ and is straightforward to evaluate if k.x/ is
a known function of x. We will assume that for a while.
Using the time-derivative approximation (
7.88
) and the space-derivative formula
derived above, we can write the discrete version of the heat conduction equation
(
7.82
)as
iC
2
k
C
f
`
i
u
`C1
i
u
i
t
D
1
x
u
iC1
u
i
x
u
i
u
i1
x
i
k
;
(7.114)
iC
2
i
2
where we have introduced the abbreviation
i
for %.x
i
/c
v
.x
i
/. We assume that we
have already computed
u
at time level `, which means that only
u
`C1
i
is an unknown
quantity in this equation. Solving with respect to
u
`C1
i
gives
k
!
C
t
i
u
iC1
u
i
x
u
i
u
i1
x
C
1
i
t
x
u
`C1
i
D
u
i
f
`
i
k
:
(7.115)
iC
2
i
2
This is the finite difference scheme corresponding to the PDE (
7.82
).