You are on page 1of 11

Implicit Numerical Solution for

Parabolic Partial Differential


Equations
CE 28
Lecture Objectives
• Develop an implicit algorithm in solving parabolic differential
equations numerically.
• Solve for the solution of the heat equation.
General Form of Second Order Partial Differential
Equations

𝐴𝑢𝑥𝑥 + 𝐵𝑢𝑥𝑦 + 𝐶𝑢𝑦𝑦 + 𝐷𝑢𝑥 + 𝐸𝑢𝑦 + 𝐹𝑢 + 𝐺 = 0

∆ = 𝐵 2 − 4𝐴𝐶

∆=0 – Parabolic
∆>0 – Hyperbolic
∆<0 – Elliptic
Consider Heat Equation
𝜕𝑢 𝜕2𝑢
=𝛾 2
𝜕𝑡 𝜕𝑥
on an interval 0 < x < L, t > 0, γ > 0

Boundary Conditions:
𝑢 𝑡, 0 = 𝛼 𝑡 𝑡>0
𝑢 𝑡, 𝐿 = 𝛽 𝑡 𝑡>0

Initial Conditions:
𝑢 0, 𝑥 = 𝑓 𝑥 0≤𝑥≤𝐿
.
Heat Equation .
.
t7
Notation
𝑢𝑗,𝑘 = 𝑢(𝑡𝑗 , 𝑥𝑘 )
t6
t5

∆𝑡 = 𝑡𝑗+1 − 𝑡𝑗 t4
t3

t2
t1 ∆𝑥 = 𝑥𝑘+1 − 𝑥𝑘
t0
x0 x1 x2 x3 x4 x5 x6 x7 ...
Recall: Finite Difference Approximations

𝑢 𝑥+ℎ −𝑢 𝑥
𝑢 𝑥 = +𝑂 ℎ

𝜕𝑢 𝑢𝑗+1,𝑘 − 𝑢𝑗,𝑘
= + 𝑂(∆𝑡)
𝜕𝑡 ∆𝑡

𝑢 𝑥 − ℎ − 2𝑢 𝑥 + 𝑢(𝑥 + ℎ)
𝑢′′ 𝑥 = + 𝑂(ℎ 2)
ℎ2

𝜕 2 𝑢 𝑢𝑗,𝑘−1 − 2𝑢𝑗,𝑘 + 𝑢𝑗,𝑘+1 2


= + 𝑂(∆𝑥)
𝜕𝑥 2 (∆𝑥)2
Recall: Finite Difference Approximations

𝑢 𝑥 −𝑢 𝑥−ℎ
𝑢 𝑥 = +𝑂 ℎ

𝜕𝑢 𝑢𝑗,𝑘 − 𝑢𝑗−1,𝑘
= + 𝑂(∆𝑡)
𝜕𝑡 ∆𝑡

𝑢 𝑥 − ℎ − 2𝑢 𝑥 + 𝑢(𝑥 + ℎ)
𝑢′′ 𝑥 = + 𝑂(ℎ 2)
ℎ2

𝜕 2 𝑢 𝑢𝑗,𝑘−1 − 2𝑢𝑗,𝑘 + 𝑢𝑗,𝑘+1 2


= + 𝑂(∆𝑥)
𝜕𝑥 2 (∆𝑥)2
Heat Equation
𝜕𝑢 𝜕 2𝑢
=𝛾 2
𝜕𝑡 𝜕𝑥

𝑢𝑗,𝑘 − 𝑢𝑗−1,𝑘 𝑢𝑗,𝑘−1 − 2𝑢𝑗,𝑘 + 𝑢𝑗,𝑘+1


=𝛾
∆𝑡 (∆𝑥)2

𝛾∆𝑡
𝑢𝑗−1,𝑘 = −𝑢𝑗,𝑘−1 + 2𝑢𝑗,𝑘 − 𝑢𝑗,𝑘+1 + 𝑢𝑗,𝑘
(∆𝑥)2

𝛾∆𝑡
𝑢𝑗,𝑘 = −𝑢𝑗+1,𝑘−1 + 2𝑢𝑗+1,𝑘 − 𝑢𝑗+1,𝑘+1 + 𝑢𝑗+1,𝑘
(∆𝑥)2

𝛾∆𝑡
𝑙𝑒𝑡 𝜇 =
(∆𝑥)2 Boundary Conditions:
𝑢𝑗,0 = 𝛼𝑗 𝑡>0
𝑢𝑗,𝑘 = −𝜇𝑢𝑗+1,𝑘−1 + 1 + 2𝜇 𝑢𝑗+1,𝑘 − 𝜇𝑢𝑗+1,𝑘+1
𝑢𝑗,𝑛 = 𝛽𝑗 𝑡>0
Heat Equation

1 + 2𝜇 −𝜇 𝑢𝑗+1,1 𝑢𝑗,1 𝜇𝛼𝑗+1


−𝜇 1 + 2𝜇 −𝜇 𝑢𝑗+1,2 𝑢𝑗,2 0
−𝜇 1 + 2𝜇 𝜇 𝑢𝑗+1,3 𝑢𝑗,3 0
−𝜇 1 + 2𝜇 −𝜇 𝑢𝑗+1,4 𝑢𝑗,4 0
𝑢𝑗+1,5 = 𝑢𝑗,5 + 0
−𝜇 1 + 2𝜇 −𝜇
𝑢𝑗+1,6 𝑢𝑗,6 0
−𝜇 1 + 2𝜇 −𝜇
⋮ ⋮ ⋮
⋱ ⋱ ⋱
𝑢𝑗+1,𝑛−1 𝑢𝑗,𝑛−1 𝜇𝛽𝑗+1
−𝜇 1 + 2𝜇
Advantage
By John von Neumann stability analysis, implicit method is
unconditionally stable.
Exercise
𝜕𝑢 𝜕2𝑢
=𝛾 2
𝜕𝑡 𝜕𝑥
Fix the diffusivity 𝛾 = 1.
Initial Condition: 𝑢 0, 𝑥 = 6 sin(𝜋𝑥)
Boundary Conditions: 𝑢 𝑡, 0 = 𝑢 𝑡, 1 = 0.
Compare it with the exact solution:
−𝜋2 𝑡
𝑢 𝑡, 𝑥 = 6 sin 𝜋𝑥 𝑒
Try uniform node spacings.

You might also like