Explicit and Implicit Method
Explicit and Implicit Method
Explicit Method:
Consider, One dimensional conduction Equation with
constant thermal diffusivity is ,
T 2T
2
t x
𝑇𝑖𝑛+1 − 𝑇𝑖𝑛 𝑛
𝑇𝑖+1 − 2𝑇𝑖𝑛 + 𝑇𝑖−1
𝑛
−𝛼 =0
Δ𝑡 Δ𝑥 2
∆𝑡
𝑊ℎ𝑒𝑟𝑒 𝛾 = 𝛼
∆𝑥 2
𝑇𝑖𝑛+1 = 𝛾 𝑇𝑖+1
𝑛
+ (1 − 2𝛾)𝑇𝑖𝑛 + 𝛾𝑇𝑖−1
𝑛
In an Explicit approach each difference equation contains The Explicit method is simple approach
only one unknown and therefore can be solved explicitly for The Implicit method is Complex approach as it need
this unknown in straightforward manner. to solve large systems of simultaneous algebraic
equations.
For Explicit approach once ∆x is chosen and ∆t is not
In an Implicit approach
independent, ∆t is restricted prescribed by a stability
Write the equations for all the interior grid points. criterion.
Solve the unknowns for all i can be solved simultaneously. For Implicit methods stability can be maintained over
larger values of ∆t than Corresponding Explicit
This is an Implicit Approach.
method.
For Explicit approach in many cases ∆t must be very
An Implicit Approach is one where unknowns must be small to maintain given time interval, this result long
obtained by means of simultaneous solution of the computer running times.
difference equations applied at all the grid points arrayed at For Implicit methods, stability can be maintained
a given time level. over much larger values ∆t considerably fewer time
steps are required.
24-05-2021 4
Explicit and Implicit Method
𝜕𝑢 𝜕 2 𝑢 Given that
Solve the Boundary value Problem = 2 subjected
𝜕𝑡 𝜕𝑥 𝑢 0, 𝑡 = 0 𝑀𝑒𝑎𝑛𝑠 𝑢 is equal to zero for all time at X =0
𝑢 0, 𝑡 = 𝑢 1, 𝑡 = 0, 𝑢 𝑥, 0 = 100𝑥(1 − 𝑥), 0 ≤ 𝑥 ≤ 1.
𝑢 1, 𝑡 = 0 𝑀𝑒𝑎𝑛𝑠 𝑢 is equal to zero for all time at X =1
Find all values of 𝑢 for next time step by taking h = 0.25 using
Crank Nicolson Eqn. 𝑢 𝑥, 0 = 100𝑥(1 − 𝑥), 0 ≤ 𝑥 ≤ 1
𝑀𝑒𝑎𝑛𝑠 ∅ isequal to 100𝑥(1 − 𝑥) for all X at t =0
𝜕𝑢 𝜕2𝑢
General Eqn. is =𝛼 2
𝜕𝑡 𝜕𝑥
So 𝛼 is 1 and let assume 𝛾 =1
Therefore ∆𝑡 = ∆𝑥 2 = ℎ 2 = 0.25 2 =0.0625
Solution From Eqn.1
𝑛+1 1 𝑛 𝑛 𝑛+1 𝑛+1
We know Crank Nicolson Eqn. 𝑇𝑖 = 𝑇𝑖+1 +𝑇𝑖−1 + 𝑇𝑖+1 +𝑇𝑖−1 Eqn.2
4
𝛾
(1 + 𝛾)𝑇𝑖𝑛+1 = (1 − 𝛾)𝑇𝑖𝑛 + 𝑛
𝑇𝑖+1 𝑛
+𝑇𝑖−1 𝑛+1
+ 𝑇𝑖+1 𝑛+1
+𝑇𝑖−1 x 0 0.25 0.5 0.75 1
2
t
Eqn.1
∆𝑡 0 0 18.75 25 18.75 0
𝑊ℎ𝑒𝑟𝑒 𝛾 = 𝛼
24-05-2021
∆𝑥 2 0.0625 0 A B C 0
5
Explicit and Implicit Method
0.0625
1
𝑇0.25 = 𝐴 = 25 + 𝐵 Eqn.3
4
At i = 0.5 and n+1 = 0.0625
A B C 1 0
0.0625 0 0.0625 0.0625
𝑇0.5 = 𝑇0.75 +𝑇0.25 + 𝑇0.75 +𝑇0.25
4
1
𝐵= 18.75 + 18.75+ 𝐶 + 𝐴
4
0.0625 0.0625
𝑇0.75 = 𝑇0.25
C=A
1
𝐵= 37.5+ 2𝐴 Eqn.4
1 𝑛 4
𝑇𝑖𝑛+1 = 𝑛
𝑇𝑖+1 +𝑇𝑖−1 𝑛+1
+ 𝑇𝑖+1 𝑛+1
+𝑇𝑖−1 From Eqn.3 and Eqn.4
4
1 1
𝐵= 37.5+ 2𝑋 25 + 𝐵
At i = 0.25 and n+1 = 0.0625 4 4
1 0 1
0.0625
𝑇0.25 = 𝐴 = 0.0625
𝑇0.5 +𝑇00 + 𝑇0.5 +𝑇00.0625 𝐵= 37.5+ 12.5 + 0.5𝐵
4 4
𝐵 = 12.5 + 0.125𝐵
1
𝐴 = 25 + 0+ 𝐵 + 0
24-05-2021 4 𝐵 = 14.2857 𝐴 = 𝐶 = 9.8214 6
Explicit and Implicit Method
𝜕2 𝑢 𝜕𝑢
Solve the Boundary value Problem𝜕𝑥 2 =16 𝜕𝑡
0 < 𝑥 < 1, t>0
subjected 𝑢 𝑥, 0 = 𝑢 0, 𝑡 = 0, 𝑢 1, 𝑡 = 100𝑡.
Find all values of 𝑢 for next time step using Crank Nicolson
Eqn. A B C
Solution
𝜕𝑢 𝜕2𝑢
General Eqn. is =𝛼 2
𝜕𝑡 𝜕𝑥
So 𝛼 is 1/16 and let assume 𝛾 =1 and h = 1/4
∆𝑡
𝐴𝑠, 𝛾 = 𝛼
∆𝑥 2
1 𝑛
𝑇𝑖𝑛+1 = 𝑛
𝑇𝑖+1 +𝑇𝑖−1 𝑛+1
+ 𝑇𝑖+1 𝑛+1
+𝑇𝑖−1
Therefore ∆𝑡 = 16 ∆𝑥 2 =16 ℎ 2 =16 1/4 2 =1 4
At i = 0.25 and n+1 = 1
x 0 0.25 0.5 0.75 1 1 0
1 1
t 𝑇0.25 = 𝑇0.5 +𝑇00 + 𝑇0.5 +𝑇01
4
0 0 0 0 0 0 1 1
𝑇0.25 = 𝐴 = 4 0 + 0+ 𝐵 + 0 =B/4 Eqn.1
1 0
24-05-2021 A B C 100 7
Explicit and Implicit Method
1
1 0 0 1
𝑇0.75 = 𝑇1 +𝑇0.5 + 𝑇11 +𝑇0.5
4
1 1
𝑇0.75 =𝐶= 0 + 0+ 100 + 𝐵
4
24-05-2021 8
Explicit and Implicit Method
𝜕𝑢 𝜕 2 𝑢 Given that
Solve the Boundary value Problem = 2 subjected
𝜕𝑡 𝜕𝑥 𝑢 0, 𝑡 = 0 𝑀𝑒𝑎𝑛𝑠 𝑢 is equal to zero for all time at X =0
𝑢 0, 𝑡 = 𝑢 1, 𝑡 = 0, 𝑢 𝑥, 0 = 100𝑥(1 − 𝑥), 0 ≤ 𝑥 ≤ 1.
𝑢 1, 𝑡 = 0 𝑀𝑒𝑎𝑛𝑠 𝑢 is equal to zero for all time at X =1
Find all values of 𝑢 for next time step by taking h = 0.25 and k
= 1/64 using Crank Nicolson Eqn. 𝑢 𝑥, 0 = 100𝑥(1 − 𝑥), 0 ≤ 𝑥 ≤ 1
𝑀𝑒𝑎𝑛𝑠 ∅ isequal to 100𝑥(1 − 𝑥) for all X at t =0
𝜕𝑢 𝜕2𝑢
General Eqn. is =𝛼 2
𝜕𝑡 𝜕𝑥
So 𝛼 is 1 and given h = ∆𝑥 =0.25 and k = ∆𝑡 =1/64
∆𝑡 1/64
Therefore 𝛾 = 𝛼 =1 =1/64
∆𝑥 2 1/4 2
Solution
We know Crank Nicolson Eqn.
𝛾
(1 + 𝛾)𝑇𝑖𝑛+1 = (1 − 𝛾)𝑇𝑖𝑛 + 𝑛
𝑇𝑖+1 𝑛
+𝑇𝑖−1 𝑛+1
+ 𝑇𝑖+1 𝑛+1
+𝑇𝑖−1 Solve & Check Answers A=15.94
2
Eqn.1 B =21.9
∆𝑡
𝑊ℎ𝑒𝑟𝑒 𝛾 = 𝛼 C=15.56
24-05-2021
∆𝑥 2 9
Explicit and Implicit Method
𝜕𝑢 𝜕 2 𝑢 Given that
Solve the Boundary value Problem = subjected
𝜕𝑡 𝜕𝑥 2 𝑢 𝑥, 0 = 0 𝑀𝑒𝑎𝑛𝑠 𝑢 is equal to zero for all X at t=0
𝑢 𝑥, 0 = 𝑢 0, 𝑡 = 0, 𝑢 1, 𝑡 = 𝑡 .
𝑢 0, 𝑡 = 0 𝑀𝑒𝑎𝑛𝑠 𝑢 is equal to zero for all time at X =0
Find all values of 𝑢 for next time two step by taking h = 1/2
and k = 1/4 using Crank Nicolson Eqn. 𝑢 1, 𝑡 = 𝑡 𝑀𝑒𝑎𝑛𝑠 𝑢 is equal to t for all time at X =1
𝜕𝑢 𝜕2𝑢
General Eqn. is =𝛼 2
𝜕𝑡 𝜕𝑥
𝛾
(1 + 𝛾)𝑇𝑖𝑛+1 = (1 − 𝛾)𝑇𝑖𝑛 + 𝑛
𝑇𝑖+1 𝑛
+𝑇𝑖−1 𝑛+1
+ 𝑇𝑖+1 𝑛+1
+𝑇𝑖−1 Solve & Check Answers At X= 0.5 and t =0.25 A=0.062
2
Eqn.1 At X= 0.5 and t =0.5 B =0.187
∆𝑡
𝑊ℎ𝑒𝑟𝑒 𝛾 = 𝛼
24-05-2021
∆𝑥 2 10