Page 417 - Applied Numerical Methods Using MATLAB
P. 417
406 PARTIAL DIFFERENTIAL EQUATIONS
9.2 PARABOLIC PDE
An example of a parabolic PDE is a one-dimensional heat equation describing
the temperature distribution u(x, t) (x is position, t is time) as
2
∂ u(x, t) ∂u(x, t)
A = for 0 ≤ x ≤ x f , 0 ≤ t ≤ T (9.2.1)
∂x 2 ∂t
In order for this equation to be solvable, the boundary conditions u(0,t) =
b 0 (t) & u(x f ,t) = b xf (t) as well as the initial condition u(x, 0) = i 0 (x) should
be provided.
9.2.1 The Explicit Forward Euler Method
To apply the finite difference method, we divide the spatial domain [0,x f ]into
M sections, each of length x = x f /M, and divide the time domain [0,T ]into
N segments, each of duration t = T/N, and then replace the second partial
derivative on the left-hand side and the first partial derivative on the right-hand
side of the above equation (9.2.1) by the central difference approximation (5.3.1)
and the forward difference approximation (5.1.4), respectively, so that we have
k
u k i+1 − 2u + u k i−1 u k+1 − u k
i
A = i i (9.2.2)
x 2 t
This can be cast into the following algorithm, called the explicit forward Euler
method, which is to be solved iteratively:
t
k
k
k
k+1
u = r(u + u ) + (1 − 2r)u with r = A (9.2.3)
i i+1 i−1 i 2
x
for i = 1, 2,.. . , M − 1
To find the stability condition of this algorithm, we substitute a trial solution
k jiπ/P
k
u = λ e (P is any nonzero integer) (9.2.4)
i
into Eq. (9.2.3) to get
λ = r(e jπ/P + e −jπ/P ) + (1 − 2r) = 1 − 2r(1 − cos(π/P )) (9.2.5)
Sincewemusthave |λ|≤ 1 for nondivergence, the stability condition turns out
to be
t 1
r = A ≤ (9.2.6)
x 2 2

