Professional Documents
Culture Documents
Chapter 3-2
Chapter 3-2
Chapter 3-2
The general form for a second order linear PDE with two independent
variables and one dependent variable is
2u 2u 2u
A 2 B C 2 D 0
x xy y
Recall the criteria for an equation of this type to be considered parabolic
B 2 4 AC 0
For example, examine the heat-conduction equation given by
2T T
2 , where A , B 0, C 0, D 1
Then x t
B 2 4 AC 0 4( )(0)
0
thus allowing us to classify this equation as parabolic.
Parabolic PDEs
Examples of Parabolic PDEs
x x (3.3)
2 2
Cont.
Using Eqs. 3.2 and 3.3 into Eq. 3.1 leads to
t x
2
t
u n 1
u
n
u
n
2u u
n n
(3.4)
x
i i 2 i 1 i i 1
t
un 1
u
n
u
n
2u u
n n
O(t , x )
2
(3.8)
x
i i 2 i 1 i i 1
t 1
Solution is stable for
x
2
2
Explicit Method: Richardson method
2t x
2
x
i i i i
x x x
2 i 2 i 2 i 1
(3.11)
Explicit Method: DuFort-Frankel
method
This method is of order [(∆t)2, (∆x)2,
(∆t/∆x)2]
Explicit Method: DuFort-Frankel
method
Eq. 3.11 is a modification of the Richardson
method
The value of ui at time level n and n-1 are
required to start the computational
If the value of ui at time level n-1 is only
known, DuFort-Frankel method can be used
to obtain the ui at time level n.
Since the solution at the unknown station
requires data from two previous stations,
computer storage requirement will increases.
Example 1: Explicit Method
Consider a steel rod that is subjected to a temperature of100C on the left
end and25C on the right end. If the rod is of length 0.05m , use the explicit
method to find the temperature distribution in the rod from t 0 and t 9
seconds. Usex 0.01m , t 3s.
W kg J
Given:k 54 , 7800 3 , C 490
mK m kg K
i 0 1 2 3 4 5
T 100 C T 25 C
0.01m
Example 1: Explicit Method
Recall, Number of time steps,
k t final t initial
C t
90
therefore,
3
54
3.
7800 490
1.4129 10 5 m 2 / s. Boundary Conditions
T0n 100C
Then, for all n 0,1,2 ,3
t T5 25C
n
x 2
1.4129 10 5
3 All internal nodes are at 20C
0.01 2
for t 0 sec . This can be
0.4239. represented as,
Ti 0 20C , for all i 1,2,3,4
Example 1: Explicit Method
Nodal temperatures when t 0 sec , n 0 :
T00 100C
T10 20C
T20 20C
Interior nodes
T30 20C
T40 20C
T50 25C
Ti n 1
Ti T 2Ti T
n n
i 1
n n
i 1
Example 1: Explicit Method
Nodal temperatures when t 3 sec (Example Calculations)
i 0 T01 100C Boundary Condition
setting n 0
i 1
T11 T10 T20 2T10 T00 i2
T21 T20 T30 2T20 T10
20 0.423920 2(20) 100 20 0.423920 2(20) 20
20 0.423980 20 0.42390
20 33.912 20 0
53.912C 20C
Nodal temperatures when t 3 sec , n 1 :
T01 100C Boundary Condition
T11 53.912C
T21 20C
Interior nodes
T3 20C
1
T41 22.120C
T51 25C Boundary Condition
Example 1: Explicit Method
Nodal temperatures when t 6 sec (Example Calculations)
i 0 T02 100C Boundary Condition
setting n 1 ,
i 1
T12 T11 T21 2T11 T01 i 2 T22 T21 T31 2T21 T11
53.912 0.423920 2(53.912) 100 20 0.423920 2(20) 53.912
53.912 0.423912.176 20 0.423933.912
53.912 5.1614 20 14.375
59.073C 34.375C
T42 22.442C
T52 25C Boundary Condition
Example 1: Explicit Method
Nodal temperatures when t 9 sec (Example Calculations)
i 0 T03 100C Boundary Condition
setting n 2 ,
i 1 i2
T13 T12 T22 2T12 T02
T23 T22 T32 2T22 T12
59.073 0.423934.375 2(59.073) 100 34.375 0.423920.899 2(34.375) 59.073
59.073 0.423916.229 34.375 0.423911.222
59.073 6.8795 34.375 4.7570
65.953C 39.132C
Nodal temperatures when t 9 sec, n 3 :
T03 100C Boundary Condition
T13 65.953C
T23 39.132C
Interior nodes
T3 27.266C
3
T43 22.872C
T53 25C Boundary Condition
Example 1: Explicit Method
To better visualize the temperature variation at different
locations at different times, the temperature distribution
along the length of the rod at different times is plotted below.
Programing Assignment Report
x x
2 2
Implicit Formulation (Cont)
t x (3.5)
2
x x x
i 1 2 i 1
2
i
(3.6)
Implicit Formulation (Cont)
x x x
2 2
and Dni=-uni
Implicit Formulation (Cont)
i 2 : a2u1 b2u2 c2u3 D2
i 3: a3u2 b3u3 c2u4 D3
i. 4 : a4u3 b4u4 c3u5 D4
.
i IM 2 : aIM 2u IM 3 bIM 2u IM 2 cIM 2u IM 1 DIM 2
i IM 1: aIM 1u IM 2 bIM 1u IM 1 cIM 1u IM DIM 1
Implicit Formulation (Cont)
t x
2
2
Implicit Methods: Crank-Nicolson
Method
Using implicit form of Eq. 3.1 from time level n+1/2 and
n+1
1
n
uin1 ui 2
uin11 2uin1 uin11
(3.15)
t x
2
2
Add Eq.3.14 to 3.15 leads to
W kg J
Given:k 54 , 7800 3 , C 490
mK m kg K
i 0 1 2 3 4 5
T 100 C T 25 C
0.01m
Example 2: Implicit Method
Recall, Number of time steps,
k t final t initial
C t
90
therefore,
3
54
3.
7800 490
1.4129 10 5 m 2 / s. Boundary Conditions
T0n 100C
Then,
t for all n 0,1,2 ,3
T5 25C
n
x 2
1.4129 10 5
3 All internal nodes are at 20C
0.01 2
for t 0 sec . This can be
0.4239. represented as,
Ti 0 20C , for all i 1,2,3,4
Example 2: Implicit Method
Nodal temperatures when t 0 sec , n 0 :
T00 100C
T10 20C
T20 20C
Interior nodes
T30 20C
T40 20C
T50 25C
We can now form our system of equations for the first time step by
writing the approximated heat conduction equation for each node.
T n 1
i 1 ( 1 2 )Ti n 1
T n 1
i 1 Ti n
Example 2: Implicit Method
Nodal temperatures when t 3 sec , (Example Calculations)
i 0 T 100C Boundary Condition
0
1
For the interior nodes setting n 0 and i 1, 2, 3, 4 gives the following,
i 1 T01 (1 2 )T11 T21 T10
(0.4239 100) (1 2 0.4239)T11 (0.4239T21 ) 20
42.39 1.8478T11 0.4239T21 20
1.8478T11 0.4239T21 62.390
1
0 0 0.4239 1.8478 T
4 30.598
Example 2: Implicit Method
1.8478 0.4239 0 0 T11 62.390
0.4239 1.8478 0.4239 0 1 20
T2
0 0.4239 1.8478 0.4239 T3 20
1
1
0 0 0.4239 1.8478 4
T 30.598
The above coefficient matrix is tri-diagonal. Special
algorithms such as Thomas’ algorithm can be used to solve
simultaneous linear equation with tri-diagonal coefficient
matrices. The solution is given by
T01 100
T11 39.451 1
1 Hence, the nodal T
1 39 . 451
T
24 .792
2
temps at t 3 sec are T2 24.792
1
T3 21.438
1
1
1 T3 21 . 438
T4 21.477
T 1 21.477
41
T5 25
Example 2: Implicit Method
Nodal temperatures when t 6 sec , (Example Calculations)
i 0 T 100C Boundary Condition
0
2
For the interior nodes setting j 1 andi 1, 2, 3, 4 gives the following,
i 1 T02 (1 2 )T12 T22 T11
(0.4239 100) (1 2 0.4239)T12 0.4239T22 39.451
42.39 1.8478T12 0.4239T22 39.451
1.8478T12 0.4239T22 81.841
i2 T12 (1 2 )T22 T32 T21
0.4239T12 1.8478T22 0.4239T32 24.792
For the second time step we can write four such equations with four
unknowns, expressing them in matrix form yields
1.8478 0.4239 0 0 T12 81.841
0.4239 1.8478 0.4239 0 2 24.792
T2
0 0.4239 1.8478 0.4239 T32 21.438
2
0 0 0.4239 1.8478 T4 32.075
Example 2: Implicit Method
1.8478 0.4239 0 0 T12 81.841
0.4239 1.8478 0.4239
0 T22 24.792
0 0.4239 1.8478 0.4239 T3 21.438
2
2
0 0 0.4239 1.8478 4
T 32.075
The above coefficient matrix is tri-diagonal. Special
algorithms such as Thomas’ algorithm can be used to solve
simultaneous linear equation with tri-diagonal coefficient
matrices. The solution is given by
T02 100
T12 51.326 2
2 Hence, the nodal T
1 51. 326
T
2 30.669 temps at t 6 sec are T2 30.669
2
T3 23.876
2
2
2
T4 22.836 T3 23 .876
T 2 22.836
42
T5 25
Example 2: Implicit Method
Nodal temperatures when t 9 sec , (Example Calculations)
i 0 T 100C Boundary Condition
0
3
For the interior nodes setting n 2 andi 1, 2, 3, 4 gives the following,
i 1 T03 (1 2 )T13 T23 T12
(0.4239 100) (1 2 0.4239)T13 (0.4239T23 ) 51.326
42.39 1.8478T13 0.4239T23 51.326
1.8478T13 0.4239T23 93.716
i2 T13 (1 2 )T23 T33 T22
0.4239T13 1.8478T23 0.4239T33 30.669
For the third time step we can write four such equations with four
unknowns, expressing them in matrix form yields
1.8478 0.4239 0 0 T13 93.716
0.4239 1.8478 0.4239 0 3 30.669
T2
0 0.4239 1.8478 0.4239 T3 23.876
3
3
0 0 0.4239 1.8478 4
T 33.434
Example 2: Implicit Method
1.8478 0.4239 0 0 T13 93.716
0.4239 1.8478 0.4239 0 3 30.669
T2
0 0.4239 1.8478 0.4239 T3 23.876
3
3
0 0 0.4239 1.8478 T
4 33.434
T3 26.809
3 3
3 T3 26 . 809
T4 24 .243 T 3 24.243
43
T5 25
Example 2: Implicit Method
To better visualize the temperature variation at different
locations at different times, the temperature distribution along
the length of the rod at different times is plotted below.
Programing Assignment 4
Consider a steel rod that is subjected to a temperature of TL on the left end
and TR on the right end. If the rod is of length L , find the temperature
distribution in the rod from t 0 to t tn seconds.
W J
Given: k 54 , 7800 kg3 , C 490
mK m kg K
Take x x m t t s and the initial temperature of the rod is T0 C .
Using:
i) Explicit Method
ii) Implicit method
i 0 i n 1
T TL C T TR C
x m