Chapter 10.02 Parabolic Partial Differential...
Transcript of Chapter 10.02 Parabolic Partial Differential...
10.02.1
Chapter 10.02 Parabolic Partial Differential Equations After reading this chapter, you should be able to:
1. Use numerical methods to solve parabolic partial differential equations by explicit, implicit, and Crank-Nicolson methods.
The general second order linear PDE with two independent variables and one dependent variable is given by
02
22
2
2
=+∂∂
+∂∂
∂+
∂∂ D
yuC
yxuB
xuA (1)
where CBA ,, are functions of the independent variables, x , y , and D can be a function of
xuuyx∂∂,,, and
yu∂∂ . If 042 =− ACB , Equation (1) is called a parabolic partial differential
equation. One of the simple examples of a parabolic PDE is the heat-conduction equation for a metal rod (Figure 1)
tT
xT
∂∂
=∂∂
2
2
α (2)
where =T temperature as a function of location, x and time, t
in which the thermal diffusivity, α is given by
Ckρ
α =
where =k thermal conductivity of rod material, =ρ density of rod material, =C specific heat of the rod material.
10.02.2 Chapter 10.02
Figure 1: A metal rod
Explicit Method of Solving Parabolic PDEs To numerically solve parabolic PDEs such as Equation (2), one can use finite difference approximations of the partial derivatives so that the dependent variable, T is now sought at particular nodes ( x -location) and time ( t ) (Figure 2). The left hand side second derivative is approximated by the central divided difference approximation as
( )211
,2
2 2x
TTTxT j
ij
ij
i
ji ∆+−
≅∂∂ −+ (3)
where =i node number along the −x direction, ni ,....,1,0= ,
j = node number along the time, x∆ = distance between nodes.
Figure 2: Schematic diagram showing the node representation in the model
For a rod of length L which is divided into 1+n nodes,
nLx =∆ (4)
The time is similarly broken into time steps of t∆ . Hence jiT corresponds to the temperature
at node i , that is, ( )( )xix ∆=
and time, ( )( )tjt ∆= ,
where =∆t time step.
x
1−i i 1+i
x∆ x∆
Parabolic Partial Differential Equations 10.02.3 The time derivative of the right hand side of Equation (2) is approximated by the forward divided difference approximation
tTT
tT j
ij
i
ji ∆−
≅∂∂ +1
,
(5)
Substituting the finite difference approximations given by Equations (3) and (5) in Equation (2) gives
( ) tTT
xTTT j
ij
ij
ij
ij
i
∆−
=∆
+− +−+
1
211 2
α
Solving for the temperature at the time node 1+j , gives
( )ji
ji
ji
ji
ji TTT
xtTT 112
1 2)( −+
+ +−∆∆
+= α
Choosing
2)( xt
∆∆
=αλ (6)
( )ji
ji
ji
ji
ji TTTTT 11
1 2 −++ +−+= λ (7)
Equation (7) can be solved explicitly because it can be written for each internal location node of the rod for time node 1+j in terms of the temperature at time node j . In other words, if we know the temperature at node 0=j , and knowing the boundary temperatures, which is the temperature at the external nodes, we can find the temperature at the next time step. We continue the process by first finding the temperature at all nodes 1=j , and using these to find the temperature at the next time node, 2=j . This process continues till we reach the time at which we are interested in finding the temperature. Example 1
A rod of steel is subjected to a temperature of C°100 on the left end and C°25 on the right end. If the rod is of length m05.0 , use the explicit method to find the temperature distribution in the rod from 0=t and 9=t seconds. Use mx 01.0=∆ , st 3=∆ . Given:
KmWk−
= 54 , 37800mkg
=ρ , Kkg
JC−
= 490 .
The initial temperature of the rod is C°20 . Solution
Ckρ
α =
4907800
54×
=
sm /104129.1 25−×= Then
( )2xt
∆∆
= αλ
10.02.4 Chapter 10.02
( )2
5
01.03104129.1 −×=
4239.0=
Number of time steps=ttt initialfinal
∆
−
3
09 −=
3=
Figure 3: Schematic diagram showing the node distribution in the rod
The boundary conditions
3,2,1,0allfor25
100
5
0 =
°=
°=j
CTCT
j
j
(E1.1)
The initial temperature of the rod is C°20 , that is, all the temperatures of the nodes inside the rod are at C°20 when time, sec0=t except for the boundary nodes as given by Equation (E1.1). This could be represented as
1,2,3,4 allfor ,200 =°= iCTi . (E1.2) Initial temperature at the nodes inside the rod (when t=0 sec)
(E1.1)Equationfrom10000 CT °=
(E1.2)Equationfrom
20
20
20
20
04
03
02
01
°=
°=
°=
°=
CTCTCTCT
(E1.1)Equationfrom2505 CT °=
Temperature at the nodes inside the rod when t=3 sec Setting 0=j and 5,4,3,2,1,0=i in Equation (7) gives the temperature of the nodes inside the rod when time, sec3=t .
0=i 1 2 3 4 5
m01.0
CT °= 25CT °=100
Parabolic Partial Differential Equations 10.02.5
(E1.1)ConditionBoundary10010 CT °=
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
912.53912.3320
804239.020100)20(2204239.020
2 00
01
02
01
11 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
20020
04239.02020)20(2204239.020
2 01
02
03
02
12 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
20020
04239.02020)20(2204239.020
2 02
03
04
03
13 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
120.221195.220
54239.02020)20(2254239.020
2 03
04
05
04
14 λ
(E1.1)ConditionBoundary251
5 CT °= Temperature at the nodes inside the rod when t=6 sec Setting 1=j and 5,4,3,2,1,0=i in Equation (7) gives the temperature of the nodes inside the rod when time, sec6=t
(E1.1)ConditionBoundary10020 CT °=
10.02.6 Chapter 10.02
( )( )( )
C
TTTTT
°=+=+=
+−+=+−+=
073.591614.5912.53
176.124239.0912.53100)912.53(2204239.0912.53
2 10
11
12
11
21 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
375.34375.1420
912.334239.020912.53)20(2204239.020
2 11
12
13
12
22 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
899.2089867.020
120.24239.02020)20(2120.224239.020
2 12
13
14
13
23 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
442.22032220.0120.22
76.04239.0120.2220)120.22(2254239.0120.22
2 13
14
15
14
24 λ
(E1.1)ConditionBoundary252
5 CT °= Temperature at the nodes inside the rod when t=9 sec Setting 2=j and 5,4,3,2,1,0=i in Equation (7) gives the temperature of the nodes inside the rod when time, sec9=t
(E1.1)ConditionBoundary10030 CT °=
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
953.658795.6073.59
229.164239.0073.59100)073.59(2375.344239.0073.59
2 20
21
22
21
31 λ
Parabolic Partial Differential Equations 10.02.7
( )( )( )
C
TTTTT
°=+=+=
+−+=+−+=
132.397570.4375.34
222.114239.0375.34073.59)375.34(2899.204239.0375.34
2 21
22
23
22
32 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
266.27367.6899.20
019.154239.0899.20375.34)899.20(2442.224239.0899.20
2 22
23
24
23
33 λ
( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
872.224303.0442.22
0150.14239.0442.22899.20)442.22(2254239.0442.22
2 23
24
25
24
34 λ
(E1.1)ConditionBoundary253
5 CT °= To better visualize the temperature variation at different locations at different times, temperature distribution along the length of the rod at different times is plotted in the Figure 4.
Figure 4: Temperature distribution from explicit method
10.02.8 Chapter 10.02 Implicit Method for Solving Parabolic PDEs In the explicit method, one is able to find the solution at each node, one equation at a time. However, the solution at a particular node is dependent only on temperature from neighboring nodes from the previous time step. For example, in the solution of Example 1, the temperatures at node 2 and 3 artificially stay at the initial temperature at 3=t seconds. This is contrary to what we would expect physically from the problem.
Also the explicit method does not guarantee stability which depends on the value of the time step, location step and the parameters of the elliptic equation. For the PDE
tT
xT
∂∂
=∂∂
2
2
α ,
the explicit method is convergent and stable for
21
)( 2 ≤∆∆x
tα (8)
These issues are addressed by using the implicit method. Instead of the temperature being found one node at a time, the implicit method results in simultaneous linear equations for the temperature at all interior nodes for a particular time. The implicit method to solve the parabolic PDE given by equation (2) is as follows. The second derivative on the left hand side of the equation is approximated by the central divided difference scheme at time level 1+j at node i as
( )2
11
111
1,2
2 2x
TTTxT j
ij
ij
i
ji ∆+−
≈∂∂ +
−++
+
+
(9)
The first derivative on the right hand side of the equation is approximated by backward divided difference approximation at time level 1+j and node i as
tTT
tT j
ij
i
ji ∆−
≈∂∂ +
+
1
1,
(10)
Substituting Equations (9) and (10) in Equation (2) gives
( ) tTT
xTTT j
ij
ij
ij
ij
i
∆−
=∆
+− ++−
+++
1
2
11
111 2
α
giving j
ij
ij
ij
i TTTT =−++− ++
++−
11
111 )21( λλλ (11)
where
( )2xt
∆∆
= αλ
Now Equation (11) can be written for all nodes (except the external nodes), at a particular time level. This results in simultaneous linear equations which can be solved to find the nodal temperature at a particular time. Example 2
A rod of steel is subjected to a temperature of C°100 on the left end and C°25 on the right end. If the rod is of length m05.0 , use the implicit method to find the temperature distribution in the rod from 0=t to 9=t seconds. Use mx 01.0=∆ and st 3=∆ .
Parabolic Partial Differential Equations 10.02.9 Given
KmWk−
= 54 , 37800mkg
=ρ , Kkg
JC−
= 490 .
The initial temperature of the rod is C°20 . Solution
Ckρ
α =
4907800
54×
=
sm /104129.1 25−×= Then
( )2xt
∆∆
= αλ
( )2
5
01.0310412.1 −×=
4239.0=
Figure 5: Schematic diagram showing the node representation in the model
The boundary conditions
3,2,1,0for25
100
5
0 =
°=
°=j
CTCT
j
j
(E2.1)
The initial temperature of the rod is C°20 , that is, the temperatures of all the nodes inside the rod are at C°20 when time, 0=t except for the boundary nodes where the temperatures are given by satisfying the Equation (E2.1). This could be represented as
4321for ,200 ,,,iCTi =°= . (E2.2) Initial temperature at the nodes inside the rod (when t=0 sec)
(E2.1)Equation from10000 CT °=
0=i 1 2 3 4 5
m01.0
CT °=100 CT °= 25
10.02.10 Chapter 10.02
(E2.2)Equationfrom
20
20
20
20
04
03
02
01
°=
°=
°=
°=
CTCTCTCT
(E2.1)Equationfrom2505 CT °=
Temperature at the nodes inside the rod when t=3 sec
(E2.1)ConditionBoundary25
1001
5
10
°=
°=
CTCT
For all the interior nodes, putting 0=j and 4,3,2,1=i in Equation (11) gives the following equations i=1
204239.08478.139.42
20)4239.0()4239.021()1004239.0(
)21(
12
11
12
11
01
12
11
10
=−+−
=−×++×−
=−++−
TTTT
TTTT λλλ
390.624239.08478.1 12
11 =− TT (E2.3)
i=2 0
21
312
11 )21( TTTT =−++− λλλ
204239.08478.14239.0 13
12
11 =−+− TTT (E2.4)
i=3 0
314
13
12 )21( TTTT =−++− λλλ
204239.08478.14239.0 14
13
12 =−+− TTT (E2.5)
i=4
20598.108478.14239.0
20)254239.0(8478.14239.0
)21(
14
13
14
13
04
15
14
13
=−+−
=×−+−
=−++−
TTTT
TTTT λλλ
598.308478.14239.0 14
13 =+− TT (E2.6)
The simultaneous linear equations (E2.3) – (E2.6) can be written in matrix form as
=
−−−
−−−
598.302020390.62
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
14
13
12
11
TTTT
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
Parabolic Partial Differential Equations 10.02.11
=
477.21438.21792.24451.39
14
13
12
11
TTTT
Hence, the temperature at all the nodes at time, sec 3=t is
=
25477.21438.21792.24451.39
100
15
14
13
12
11
10
TTTTTT
Temperature at the nodes inside the rod when t=6 sec
(E2.1)ConditionBoundary25
1002
5
20
°=
°=
CTCT
For all the interior nodes, putting 1=j and 4,3,2,1=i in Equation (11) gives the following equations i=1
451.394239.08478.139.42
451.394239.0)4239.021()1004239.0(
)21(
22
21
22
21
11
22
21
20
=−+−
=−×++×−
=−++−
TTTT
TTTT λλλ
841.814239.08478.1 22
21 =− TT (E2.7)
i=2 1
22
32
22
1 )21( TTTT =−++− λλλ 792.244239.08478.14239.0 2
32
22
1 =−+− TTT (E2.8) i=3
13
24
23
22 )21( TTTT =−++− λλλ
438.214239.08478.14239.0 24
23
22 =−+− TTT (E2.9)
i=4
477.21598.108478.14239.0
477.21)254239.0(8478.14239.0
)21(
24
23
24
23
14
25
24
23
=−+−
=×−+−
=−++−
TTTT
TTTT λλλ
075.328478.14239.0 24
23 =+− TT (E2.10)
The simultaneous linear equations (E2.7) – (E2.10) can be written in matrix form as
10.02.12 Chapter 10.02
=
−−−
−−−
075.32438.21792.24841.81
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
24
23
22
21
TTTT
The solution of the above set of simultaneous linear equation is
=
836.22876.23669.30326.51
24
23
22
21
TTTT
Hence, the temperature at all the nodes at time, sec 6=t is
=
25836.22876.23669.30326.51
100
25
24
23
22
21
20
TTTTTT
Temperature at the nodes inside the rod when t=9 sec
(E2.1)ConditionBoundary25
1003
5
30
°=
°=
CTCT
For all the interior nodes, setting 2=j and 4,3,2,1=i in Equation (11) gives the following equations i=1
326.514239.08478.139.42
326.51)4239.0()4239.021()1004239.0(
)21(
32
31
32
31
21
32
31
30
=−+−
=−×++×−
=−++−
TTTT
TTTT λλλ
716.934239.08478.1 32
31 =− TT (E2.11)
i=2 2
23
33
23
1 )21( TTTT =−++− λλλ 669.304239.08478.14239.0 3
33
23
1 =−+− TTT (E2.12) i=3
23
34
33
32 )21( TTTT =−++− λλλ
876.234239.08478.14239.0 34
33
32 =−+− TTT (E2.13)
i=4
Parabolic Partial Differential Equations 10.02.13
836.22598.108478.14239.0
836.22)254239.0(8478.14239.0
)21(
34
33
34
33
24
35
34
33
=−+−
=×−+−
=−++−
TTTT
TTTT λλλ
434.338478.14239.0 34
33 =+− TT (E2.14)
The simultaneous linear equations (E2.11) – (E2.14) can be written in matrix form as
=
−−−
−−−
434.33876.23669.30716.93
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
34
33
32
31
TTTT
The solution of the above set of simultaneous linear equation is
=
243.24809.26292.36043.59
34
33
32
31
TTTT
Hence, the temperature at all the nodes at time, sec 9=t is
=
25243.24809.26292.36043.59
100
35
34
33
32
31
30
TTTTTT
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 in Figure 6.
10.02.14 Chapter 10.02
Figure 6: Temperature distribution in rod from implicit method Crank-Nicolson Method The Crank-Nicolson method provides an alternative scheme to implicit method. The accuracy of Crank-Nicolson method is same in both space and time. In the implicit method,
the approximation of 2
2
xT
∂∂ is of 2)( xO ∆ accuracy, while the approximation for
tT∂∂ is of
)( t∆ accuracy. The accuracy in the Crank-Nicolson method is achieved by approximating the derivative at the mid point of time step. To numerically solve PDEs such as Equation (2), one can use finite difference approximations of the partial derivatives. The left hand side of the second derivative is approximated at node i as the average value of the central divided difference approximation at time level 1+j and time level j .
( ) ( )
∆+−
+∆
+−≈
∂∂ +
−++
+−+2
11
111
211
,2
2 2221
xTTT
xTTT
xT j
ij
ij
ij
ij
ij
i
ji
(12)
The first derivative on the right side of Equation (2) is approximated using forward divided difference approximation at time level 1+j and node i as
tTT
tT j
ij
i
ji ∆−
≈∂∂ +1
,
(13)
Substituting Equations (12) and (13) in Equation (2) gives
( ) ( ) tTT
xTTT
xTTT j
ij
ij
ij
ij
ij
ij
ij
i
∆−
=
∆+−
+∆
+−•
++−
+++−+
1
2
11
111
211 22
21α
(14) giving
ji
ji
ji
ji
ji
ji TTTTTT 11
11
111 )1(2)1(2 +−
++
++− +−+=−++− λλλλλλ (15)
where
( )2xt
∆∆
= αλ
Now Equation (15) is written for all nodes (except the external nodes). This will result in simultaneous linear equations that can be solved to find the temperature at a particular time. Example 3
A rod of steel is subjected to a temperature of C°100 on the left end and C°25 on the right end. If the rod is of length m05.0 , use Crank-Nicolson method to find the temperature distribution in the rod from 0=t to 9=t seconds. Use mx 01.0=∆ , st 3=∆ . Given
KmWk−
= 54 , 37800mkg
=ρ , Kkg
JC−
= 490 .
The initial temperature of the rod is C°20 .
Parabolic Partial Differential Equations 10.02.15 Solution
Ckρ
α =
4907800
54×
=
sm /104129.1 25−×= Then
( )2xt
∆∆
= αλ
( )2
5
01.0310412.1 −×=
4239.0=
Figure 7: Schematic diagram showing the node representation in the model
The boundary conditions are
3,2,1,0for25
100
5
0 =
°=
°=j
CTCT
j
j
(E3.1)
The initial temperature of the rod is C°20 , that is, all the temperatures of the nodes inside the rod are at C°20 at, 0=t except for the boundary nodes given by Equation (E3.1). This could be represented as
1,2,3,4for ,200 =°= iCTi . (E3.2) Initial temperature at the nodes inside the rod (when t=0 sec)
(E3.1)Equationfrom10000 CT °=
(E3.2)Equationfrom
20
20
20
20
04
03
02
01
°=
°=
°=
°=
CTCTCTCT
0=i 1 2 3 4 5
m01.0
10.02.16 Chapter 10.02
(E3.1)Equationfrom2505 CT °=
Temperature at the nodes inside the rod when t=3 sec
(E3.1)ConditionBoundary25
1001
5
10
°=
°=
CTCT
For all the interior nodes, setting 0=j and 4,3,2,1=i in Equation (15) gives the following equations i=1
478.8044.2339.424239.08478.239.42
20)4239.0(20)4239.01(2100)4239.0(4239.0)4239.01(2)1004239.0(
)1(2)1(2
12
11
12
11
02
01
00
12
11
10
++=−+−
+−+=−++×−
+−+=−++−
TTTT
TTTTTT λλλλλλ
30.1164239.08478.2 12
11 =− TT (E3.3)
i=2
20)4239.0(20)4239.01(220)4239.0(4239.0)4239.01(24239.0
)1(2)1(21
312
11
03
02
01
13
12
11
+−+=−++−
+−+=−++−
TTTTTTTTT λλλλλλ
000.404239.08478.24239.0 13
12
11 =−+− TTT (E3.4)
i=3
20)4239.0(20)4239.01(220)4239.0(4239.0)4239.01(24239.0
)1(2)1(21
41
312
04
03
02
14
13
12
+−+=−++−
+−+=−++−
TTTTTTTTT λλλλλλ
000.404239.08478.24239.0 14
13
12 =−+− TTT (E3.5)
i=4
598.10044.23478.8598.108478.24239.0
25)4239.0(20)4239.01(220)4239.0(25)4239.0()4239.01(24239.0
)1(2)1(2
14
13
14
13
05
04
03
15
14
13
++=−+−
+−+=−++−
+−+=−++−
TTTT
TTTTTT λλλλλλ
718.528478.24239.0 14
13 =+− TT (E3.6)
The coefficient matrix in the above set of equations is tridiagonal. Special algorithms such as Thomas’ algorithm are used to solve equation with tridiagonal coefficient matrices
=
−−−
−−−
718.52000.40000.4030.116
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
14
13
12
11
TTTT
The above matrix is tridiagonal. Solving the above matrix we get
Parabolic Partial Differential Equations 10.02.17
=
607.21797.20746.23372.44
14
13
12
11
TTTT
Hence, the temperature at all the nodes at time, sec3 t = is
=
25607.21797.20746.23372.44
100
15
14
13
12
11
10
TTTTTT
Temperature at the nodes inside the rod when t=6 sec
(E3.1)ConditionBoundary25
1002
5
20
°=
°=
CTCT
For all the interior nodes, putting 1=j and 4,3,2,1=i in Equation (15) gives the following equations i=1
066.10125.5139.424239.08478.239.42746.23)4239.0(372.44)4239.01(2100)4239.0(
4239.0)4239.01(2)1004239.0(
)1(2)1(2
22
21
22
21
12
11
10
22
21
20
++=−+−
+−+=−++×−
+−+=−++−
TT
TTTTTTTT λλλλλλ
971.1454239.08478.2 22
21 =− TT (E3.7)
i=2
8158.8360.27809.184239.08478.24239.0797.20)4239.0(746.23)4239.01(2372.44)4239.0(
4239.0)4239.01(24239.0
)1(2)1(2
23
22
21
23
22
21
13
12
11
23
22
21
++=−+−
+−+=−++−
+−+=−++−
TTT
TTTTTTTTT λλλλλλ
985.544239.08478.24239.0 23
22
21 =−+− TTT (E3.8)
i=3
1592.9962.23066.104239.08478.24239.0607.21)4239.0(797.20)4239.01(2746.23)4239.0(
4239.0)4239.01(24239.0
)1(2)1(2
24
23
22
24
23
22
14
13
12
24
23
22
++=−+−
+−+=−++−
+−+=−++−
TTT
TTTTTTTTT λλλλλλ
187.434239.08478.24239.0 24
23
22 =−+− TTT (E3.9)
i=4
10.02.18 Chapter 10.02
598.10896.248158.8598.108478.24239.025)4239.0(607.21)4239.01(2797.20)4239.0(
25)4239.0()4239.01(24239.0
)1(2)1(2
24
23
24
23
15
14
13
25
24
23
++=−+−
+−+=−++−
+−+=−++−
TT
TTTTTTTT λλλλλλ
908.548478.24239.0 24
23 =+− TT (E3.10)
The simultaneous linear equations (E3.7) – (E3.10) can be written in matrix form as
=
−−−
−−−
908.54187.43985.54971.145
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
24
23
22
21
TTTT
Solving the above set of equations, we get
=
730.22174.23075.31883.55
24
23
22
21
TTTT
Hence, the temperature at all the nodes at time, sec6 t = is
=
25730.22174.23075.31883.55
100
25
24
23
22
21
20
TTTTTT
Temperature at the nodes inside the rod when t=9 sec
(E3.1)ConditionBoundary25
1003
5
30
°=
°=
CTCT
For all the interior nodes, setting 2=j and 4,3,2,1=i in Equation (15) gives the following equations i=1
173.13388.6439.424239.08478.239.42075.31)4239.0(883.55)4239.01(2100)4239.0(
4239.0)4239.01(2)1004239.0(
)1(2)1(2
32
31
32
31
22
21
20
32
31
30
++=−+−
+−+=−++×−
+−+=−++−
TT
TTTTTTTT λλλλλλ
34.1624239.08478.2 32
31 =− TT (E3.11)
i=2
Parabolic Partial Differential Equations 10.02.19
8235.9805.35689.234239.08478.24239.0174.23)4239.0(075.31)4239.01(2883.55)4239.0(
4239.0)4239.01(24239.0
)1(2)1(2
33
32
31
33
32
31
23
22
21
33
32
31
++=−+−
+−+=−++−
+−+=−++−
TTT
TTTTTTTTT λλλλλλ
318.694239.08478.24239.0 33
32
31 =−+− TTT (E3.12)
i=3
635.9701.26173.134239.08478.24239.0730.22)4239.0(174.23)4239.01(2075.31)4239.0(
4239.0)4239.01(24239.0
)1(2)1(2
34
33
32
34
33
32
24
23
22
34
33
32
++=−+−
+−+=−++−
+−+=−++−
TTT
TTTTTTTTT λλλλλλ
509.494239.08478.24239.0 34
33
32 =−+− TTT (E3.13)
i=4
598.10190.268235.9598.108478.24239.025)4239.0(730.22)4239.01(2174.23)4239.0(
25)4239.0()4239.01(24239.0
)1(2)1(2
34
33
34
33
25
24
23
35
34
33
++=−+−
+−+=−++−
+−+=−++−
TT
TTTTTTTT λλλλλλ
210.578478.24239.0 34
33 =+− TT (E3.14)
The simultaneous linear equations (E3.11) – (E3.14) can be written in matrix form as
=
−−−
−−−
210.57509.49318.6934.162
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
34
33
32
31
TTTT
Solving the above set of equations, we get
=
042.24562.26613.37604.62
34
33
32
31
TTTT
Hence, the temperature at all the nodes at time, sec 9=t is
=
25042.24562.26613.37604.62
100
35
34
33
32
31
30
TTTTTT
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 in Figure 8.
10.02.20 Chapter 10.02
Figure 8: Temperature distribution in rod from Crank-Nicolson method
Parabolic Partial Differential Equations 10.02.21 Analytical Method Appendix A The parabolic heat conduction equation given by Equation (2) is formulated as
0,05.002
2
><<∂∂
=∂∂ tx
tT
xTα
with boundary conditions CT °= 100 at 0,0 >= tx (16)
CT °= 25 at 0,05.0 >= tx (17) and initial conditions
CT °= 20 at 05.00,0 <<= xt (18) We split the problem into a steady state problem and a transient (homogeneous) problem. The solutions of the steady state problem and transient problem are found separately and by applying the principle of superposition, the final solution would be obtained. This formulation can be represented as
),()(),( txTxTtxT hs += (19) where
sT = solution for steady state problem,
hT = solution for transient problem. Steady State Solution
Since the temperature at steady state is not changing, 0=∂∂
tT , the steady state problem is
formulated as
05.00,02
2
<<= xdx
Td s (20)
with boundary conditions CTs °= 100 at 0=x (21)
CTs °= 25 at 05.0=x (22) The solution to Equation (20) is given by integrating it on both sides to give
AdxdTs =
where A is a constant of integration and by integrating again to give BAxTs += (23)
where B is another constant of integration. By substituting the boundary condition (21), we obtain
100100)0(
==+
BBA
By substituting the boundary condition (22), we obtain
10.02.22 Chapter 10.02
150005.075
25100)05.0(
−=
−=
=+
A
A
Plugging back the values of A and B in Equation (23), we get the steady state solution as 1001500 +−= xTs (24)
Transient Solution The transient problem is formulated as
05.00,2
2
<<∂∂
=∂∂
xt
TxT hhα (25)
with boundary conditions CTh °= 0 at 0=x (26) CTh °= 0 at 05.0=x (27)
Note: from Equation (19), ),()(),( txTxTtxT hs +=
and by substituting Equations (21) and (22), the boundary conditions of hT are obtained. Initial conditions for the transient problem are hence given by
05.00,0,20 <<=−= xtTT sh )1001500(20 +−−= x
100150020 −+= x 05.00,0,801500 <<=−= xtx (28)
To obtain solution for the transient problem, let us assume ),( txTh is function of the product of a spatial function and a temperature function. That is
)().(),( txXtxTh τ= (29) Substituting Equation (29) in Equation (25), we get
dtdX
dxXd τατ =2
2
dtd
dxXd
Xτ
ατ11
2
2
= (30)
The left hand side of Equation (30) represents the spatial term and the right hand side represents the temporal (time) term. We will attempt to find the solutions of the spatial and temporal term independently. To do so, let us assume that both the left hand side and the right hand side of the Equation (30) is equal to a constant 2β− (say)
22
2 11 βτατ
−==dtd
dxXd
X (31)
Spatial solution Taking just the spatial term from Equation (31), we have
22
21 β−=dx
XdX
Parabolic Partial Differential Equations 10.02.23
022
2
=+ Xdx
Xd β (32)
The Equation (32) is a homogeneous second order ordinary differential equation. These type of equations have the solution of the form mxexX =)( . Substituting mxexX =)( in Equation (32) we get,
0)(0
22
22
=+
=+
β
β
meeem
mx
mxmx
022 =+ βm ββ iimm −= ,, 21
From the values of 1m and 2m , the solution of )(xX is written of the form )sin()cos()( xDxCxX ββ += (33)
Temporal solution Taking just the temporal term from Equation (31), we have
21 βτατ
−=dtd
02 =+ατβτdtd (34)
The above equation is a homogeneous first order ordinary differential equation. These type of equations have the solution of the form mtet =)(τ . Substituting mtet =)(τ in Equation (34) we get
0)(0
2
2
=+
=+
αβ
αβ
meeme
mt
mtmt
02 =+αβm 2αβ−=m
From the value of m , the solution of )(tτ is written as tEet
2
)( αβτ −= (35) Substituting Equations (33) and (35) in Equation (29), we have
[ ])sin()cos(),(2
xDxCEetxT th ββαβ += −
[ ])sin()cos(),(2
xGxFetxT th ββαβ += − (36)
Substituting boundary condition represented by Equation (26) in Equation (36) gives [ ] 0)0.sin()0.cos(
2
=+− ββαβ GFe t [ ]
0][
00.1.2
2
=
=+−
−
Fe
GFet
t
αβ
αβ
Since, te2αβ− cannot be zero, 0=F . Now substituting 0=F in Equation (36) gives
)sin(),(2
xGetxT th βαβ−= (37)
Substituting boundary condition represented by Equation (27) in Equation (37) gives
10.02.24 Chapter 10.02
0)4.0sin(2
=− βαβ tGe 0)05.0sin( =β
πβ n=05.0
05.0πβ n
=
πn20= Substituting the value of β in Equation (37) gives
)20sin(),(2)20( xnGetxT tn
h ππα−= As the general solution can have any value of n ,
∑∞
=
−=1
)20( )20sin(),(2
n
tnnh xneGtxT ππα (38)
Substituting the initial condition CxxTh °−= )801500()0,(
from Equation (28) in Equation (38)
801500)20sin(1
−=∑∞
=
xxnGn
n π
Multiplying both sides by )20sin( xmπ and integrating from 0 to 05.0 gives
∫ ∫
∑ ∫∫
∫∑ ∫
∫∑ ∫
−
=
+−−
−=
−=
∞
=
∞
=
∞
=
05.0
0
05.0
0
1
05.0
0
05.0
0
05.0
01
05.0
0
05.0
01
05.0
0
)20sin(80)20sin(1500
))(20cos())(20cos(2
)20sin()801500()20sin()20sin(22
)20sin()801500()20sin()20sin(
dxxmdxxmx
dxxnmdxxnmG
dxxmxdxxmxnG
dxxmxdxxmxnG
n
n
n
n
nn
ππ
ππ
πππ
πππ
Substituting the following in the above equation,
mdxxnm
nmdxxnm
nmdxxnm
anyfor,0))(20cos(
,05.0))(20cos(
,0))(20cos(
05.0
0
05.0
0
05.0
0
=+
==−
≠=−
∫
∫
∫
π
π
π
we get
∫ ∫−=05.0
0
05.0
0
)20sin(80)20sin(150005.02
dxxmdxxmxGm ππ
Parabolic Partial Differential Equations 10.02.25
∫∫ −
+
−=
05.0
0
05.0
0
05.0
0
)20sin(80)20cos(20
120
)20cos(1500 dxmdxmmm
mx ππππ
π
∫∫ −
+
−=
05.0
0
05.0
0
05.0
0
)20sin(80)20cos(20
120
)20cos(1500 dxmdxmmm
mx ππππ
π
−−+
+−
=ππ
πmm
m m
201)1(80
200)cos(05.01500
[ ]1)1(160)1(150−−+
−−= m
m
m mmG
ππ
πm
m 160)1(10 −−= (39)
Substituting Equation (39) in Equation (38), we get [ ]∑
∞
=
−
−−
=1
5.2 )5.2sin(160)1(10),(2
m
tmm
h xmem
txT ππ
πα (40)
Substituting Equations (40) and (24) in Equation (19) we have [ ]∑
∞
=
−
−−
++−=1
20 )20sin(160)1(101001500),(2
m
tmm
xmem
xtxT ππ
πα (41)
Now
Ckρ
α =
4907800
54×
=
sm /104129.1 25−×= and substituting the value of α in Equation (40) gives
[ ]∑∞
=
×− −
−−
++−=1
20104129.1 )20sin(160)1(101001500),(25
m
tmm
xmem
xtxT ππ
π (42)
Equation (42) is the analytical solution of the problem. Substituting the values of x and t gives the temperature inside the rod at a particular location and time. For example using the analytical solution, we will find the temperature of the rod at the first node, that is,
mx 01.0= when 9=t secs.
C
mem
T m
m
m
°=
−−
++−= ××−∞
=
−
∑510.62
)2.0sin(160)1(10100)01.0(1500)9,01.0( 9]20[104129.1
1
25
ππ
π
Similarly using Equation (42), the temperature of the rod at any location at any time can be found by substituting the corresponding values of x and t .
10.02.26 Chapter 10.02 Comparison of the three numerical methods To compare all three numerical methods with the analytical solution, the temperature values obtained at all the interior nodes at time, 9=t sec are presented in the Table 1. From Table 1, it is clear that among the numerical methods used to solve partial differential equations, Crank-Nicolson method provides better accuracy compared to the other two numerical methods ( Explicit Method and Implicit Method) explained in this chapter. Table 1: Comparison of temperature obtained at interior nodes using different methods discussed in this chapter (absolute true error is given in parenthesis)
Temperature at Nodes
Explicit Method
( C° )
Implicit Method ( C° )
Crank-Nicolson Method
( C° )
Analytical Solution
( C° ) 3
1T 65.953(3.443) 59.043(3.467) 62.604(0.094) 62.510 3
2T 39.132(2.048) 36.292(0.792) 37.613(0.529) 37.084 3
3T 27.266(1.422) 26.809(0.965) 26.562(0.282) 25.844 3
4T 22.872(0.738) 24.243(0.633) 24.042(0.432) 23.610
PARTIAL DIFFERENTIAL EQUATIONS Topic Parabolic Differential Equations Summary Textbook notes for the parabolic partial differential equations Major All engineering majors Authors Autar Kaw, Sri Harsha Garapati Date March 17, 2011 Web Site http://numericalmethods.eng.usf.edu