0% found this document useful (0 votes)
182 views9 pages

Numerical Solution For Parabolic Partial Differential Equations

Here are the steps to solve this problem numerically: 1. Define the domain: 0 ≤ x ≤ 1, t ≥ 0 2. Choose uniform node spacings: ∆x = 1/N, ∆t 3. Initialize uj,k at t=0 using the initial condition 4. Calculate μ = γ∆t/(∆x)^2 = 1∆t/(∆x)^2 5. Set up and solve the tri-diagonal system at each time step to update uj+1,k 6. Compare the numerical solution to the exact solution

Uploaded by

Julius Baniqued
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
182 views9 pages

Numerical Solution For Parabolic Partial Differential Equations

Here are the steps to solve this problem numerically: 1. Define the domain: 0 ≤ x ≤ 1, t ≥ 0 2. Choose uniform node spacings: ∆x = 1/N, ∆t 3. Initialize uj,k at t=0 using the initial condition 4. Calculate μ = γ∆t/(∆x)^2 = 1∆t/(∆x)^2 5. Set up and solve the tri-diagonal system at each time step to update uj+1,k 6. Compare the numerical solution to the exact solution

Uploaded by

Julius Baniqued
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Numerical Solution for Parabolic

Partial Differential Equations


CE 28
Lecture Objectives
• Define parabolic differential equations.
• Develop an 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
Heat Equation
𝜕𝑢 𝜕2𝑢
=𝛾 2
𝜕𝑡 𝜕𝑥

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


=𝛾
∆𝑡 (∆𝑥)2

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

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

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


𝑢𝑗+1,2 𝜇 1 − 2𝜇 𝜇 𝑢𝑗,2 0
𝑢𝑗+1,3 𝜇 1 − 2𝜇 𝜇 𝑢𝑗,3 0
𝑢𝑗+1,4 𝜇 1 − 2𝜇 𝜇 𝑢𝑗,4 0
𝑢𝑗+1,5 = 𝜇 1 − 2𝜇 𝜇 𝑢𝑗,5 + 0
𝑢𝑗+1,6 𝑢𝑗,6 0
𝜇 1 − 2𝜇 𝜇
⋮ ⋮ ⋮
⋱ ⋱ ⋱
𝑢𝑗+1,𝑛−1 𝑢𝑗,𝑛−1 𝜇𝛽𝑗
𝜇 1 − 2𝜇
Machine 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