10 02 Parabolic PDE Intro
10 02 Parabolic PDE Intro
02
Parabolic Partial Differential Equations
10.02.1
10.02.2
Chapter 10.02
x 2 i , j
(x )2
where
i 1
i +1
10.02.3
The time derivative of the right hand side of Equation (2) is approximated by the forward
divided difference approximation
T j +1 Ti j
T
(5)
i
t i , j
t
Substituting the finite difference approximations given by Equations (3) and (5) in Equation
(2) gives
T j 2Ti j + Ti j1 Ti j +1 Ti j
=
i +1
t
(x )2
Solving for the temperature at the time node j + 1 , gives
t
(
Ti j +1 = Ti j +
Ti +j1 2Ti j + Ti j1 )
2
(x)
Choosing
t
(6)
=
(x) 2
(7)
Ti j +1 = Ti j + Ti +j1 2Ti j + Ti j1
Equation (7) can be solved explicitly because it can be written for each internal location node
of the rod for time node j + 1 in terms of the temperature at time node j . In other words, if
we know the temperature at node j = 0 , 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 j = 1 , and using these to
find the temperature at the next time node, j = 2 . 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 100C on the left end and 25C 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. Use x = 0.01m , t = 3s . Given:
J
kg
W
, = 7800 3 , C = 490
.
k = 54
kg K
mK
m
The initial temperature of the rod is 20C .
Solution
k
C
54
7800 490
= 1.4129 10 5 m 2 / s
=
Then
(x )2
10.02.4
Chapter 10.02
= 1.4129 10 5
= 0.4239
(0.01)2
t final t initial
t
90
=
3
=3
i=0
T =100 C
T = 25 C
0.01m
T00 = 100C
T10 = 20C
T20 = 20C
T30 = 20C
T40 = 20C
T50 = 25C
10.02.5
= 20 + 0.4239(20 2(20) + 20 )
= 20 + 0.4239(0 )
= 20 + 0
= 20C
= 20 + 0.4239(25 2(20) + 20 )
= 20 + 0.4239(5)
= 20 + 2.1195
= 22.120C
T51 = 25C
10.02.6
Chapter 10.02
T12 = T11 + T21 2T11 + T01
T52 = 25C
10.02.7
10.02.8
Chapter 10.02
2
2
(x)
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 j + 1 at node i as
2T
x 2
i , j +1
(x )2
(9)
The first derivative on the right hand side of the equation is approximated by backward
divided difference approximation at time level j + 1 and node i as
T j +1 Ti j
T
(10)
i
t i , j +1
t
Substituting Equations (9) and (10) in Equation (2) gives
T j +1 2Ti j +1 + Ti j1+1 Ti j +1 Ti j
=
i +1
t
(x )2
giving
(11)
Ti j1+1 + (1 + 2 )Ti j +1 Ti +j1+1 = Ti j
where
t
=
(x )2
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 100C on the left end and 25C on the right
end. If the rod is of length 0.05m , use the implicit method to find the temperature distribution
in the rod from t = 0 to t = 9 seconds. Use x = 0.01m and t = 3s .
10.02.9
Given
J
kg
W
, = 7800 3 , C = 490
.
mK
kg K
m
The initial temperature of the rod is 20C .
Solution
k = 54
k
C
54
7800 490
= 1.4129 10 5 m 2 / s
Then
(x )2
= 1.412 10 5
= 0.4239
i=0
(0.01)2
5
T = 25 C
T = 100 C
0.01m
Figure 5: Schematic diagram showing the node representation in the model
The boundary conditions
T0 j = 100C
(E2.1)
for j = 0,1,2,3
T5 j = 25C
The initial temperature of the rod is 20C , that is, the temperatures of all the nodes inside the
rod are at 20C when time, t = 0 except for the boundary nodes where the temperatures are
given by satisfying the Equation (E2.1). This could be represented as
Ti 0 = 20C , for i = 1,2,3,4 .
(E2.2)
Initial temperature at the nodes inside the rod (when t=0 sec)
T00 = 100C
10.02.10
T10 = 20C
T20 = 20C
T30 = 20C
T40 = 20C
T50 = 25C
Chapter 10.02
i=2
i=3
i=4
(E2.3)
(E2.4)
(E2.5)
(E2.6)
0.4239T31 + 1.8478T41 = 30.598
The simultaneous linear equations (E2.3) (E2.6) can be written in matrix form as
0
0
1.8478 0.4239
T11 62.390
0.4239 1.8478 0.4239
1 20
0
T2 =
0.4239 1.8478 T41 30.598
0
0
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
10.02.11
T11 39.451
1
T2 = 24.792
T31 21.438
1
T4 21.477
Hence, the temperature at all the nodes at time, t = 3 sec is
T01 100
1
T1 39.451
T21 24.792
1 =
T3 21.438
T 1 21.477
41
T5 25
Temperature at the nodes inside the rod when t=6 sec
T02 = 100C
Boundary Condition (E2.1)
T52 = 25C
For all the interior nodes, putting j = 1 and i =1, 2, 3, 4 in Equation (11) gives the following
equations
i=1
i=2
i=3
i=4
(E2.7)
(E2.8)
(E2.9)
(E2.10)
0.4239T32 + 1.8478T42 = 32.075
The simultaneous linear equations (E2.7) (E2.10) can be written in matrix form as
10.02.12
Chapter 10.02
0
0
1.8478 0.4239
T12 81.841
0.4239 1.8478 0.4239
2 24.792
0
T2 =
0
0.4239 1.8478 0.4239 T32 21.438
0
0
0.4239 1.8478 T42 32.075
T2 = 30.669
T32 23.876
2
T4 22.836
Hence, the temperature at all the nodes at time, t = 6 sec is
T02 100
2
T1 51.326
T22 30.669
2 =
T3 23.876
T 2 22.836
42
T5 25
Temperature at the nodes inside the rod when t=9 sec
T03 = 100C
For all the interior nodes, setting j = 2 and i =1, 2, 3, 4 in Equation (11) gives the following
equations
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
i=2
i=3
i=4
(E2.11)
(E2.12)
(E2.13)
10.02.13
(E2.14)
0.4239T33 + 1.8478T43 = 33.434
The simultaneous linear equations (E2.11) (E2.14) can be written in matrix form as
0
0
1.8478 0.4239
T13 93.716
0.4239 1.8478 0.4239
3 30.669
0
T2 =
0
0.4239 1.8478 0.4239 T33 23.876
0
0
0.4239 1.8478 T43 33.434
T2 = 36.292
T33 26.809
3
T4 24.243
Hence, the temperature at all the nodes at time, t = 9 sec is
T03 100
3
T1 59.043
T23 36.292
3 =
T3 26.809
T 3 24.243
43
T5 25
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,
2T
T
the approximation of
is of O(x) 2 accuracy, while the approximation for
is of
2
t
x
(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 j + 1 and time level j .
2T
x 2
i, j
2
(x )2
(x )2
(12)
The first derivative on the right side of Equation (2) is approximated using forward divided
difference approximation at time level j + 1 and node i as
T j +1 Ti j
T
(13)
i
t i , j
t
Substituting Equations (12) and (13) in Equation (2) gives
1 T j 2Ti j + Ti j1 Ti +j1+1 2Ti j +1 + Ti j1+1 Ti j +1 Ti j
i +1
+
=
t
2
(x )2
(x )2
(14)
giving
(15)
Ti j1+1 + 2(1 + )Ti j +1 Ti +j1+1 = Ti j1 + 2(1 )Ti j + Ti +j1
where
t
=
(x )2
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 100C on the left end and 25C on the right
end. If the rod is of length 0.05m , use Crank-Nicolson method to find the temperature
distribution in the rod from t = 0 to t = 9 seconds. Use x = 0.01m , t = 3s .
Given
J
kg
W
, = 7800 3 , C = 490
.
k = 54
mK
kg K
m
The initial temperature of the rod is 20C .
10.02.15
Solution
k
C
54
7800 490
= 1.4129 10 5 m 2 / s
Then
(x )2
= 1.412 10 5
= 0.4239
i=0
(0.01)2
0.01m
Figure 7: Schematic diagram showing the node representation in the model
The boundary conditions are
T0 j = 100C
(E3.1)
for j = 0,1,2,3
T5 j = 25C
The initial temperature of the rod is 20C , that is, all the temperatures of the nodes inside the
rod are at 20C at, t = 0 except for the boundary nodes given by Equation (E3.1). This could
be represented as
Ti 0 = 20C , for i = 1,2,3,4 .
(E3.2)
Initial temperature at the nodes inside the rod (when t=0 sec)
T00 = 100C
T10 = 20C
T20 = 20C
T30 = 20C
T40 = 20C
10.02.16
T50 = 25C
Chapter 10.02
i=2
(E3.3)
i=3
(E3.4)
i=4
(E3.5)
(E3.6)
0.4239T31 + 2.8478T41 = 52.718
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
0
0
2.8478 0.4239
T11 116.30
0.4239 2.8478 0.4239
1 40.000
0
T2 =
0
0.4239 2.8478 0.4239 T31 40.000
0
0.4239 2.8478 T41 52.718
0
The above matrix is tridiagonal. Solving the above matrix we get
10.02.17
T11 44.372
1
T2 = 23.746
T31 20.797
1
T4 21.607
Hence, the temperature at all the nodes at time, t = 3 sec is
T01 100
1
T1 44.372
T21 23.746
1 =
T3 20.797
T 1 21.607
41
T5 25
Temperature at the nodes inside the rod when t=6 sec
T02 = 100C
Boundary Condition (E3.1)
T52 = 25C
For all the interior nodes, putting j = 1 and i =1, 2, 3, 4 in Equation (15) gives the following
equations
i=1
T02 + 2(1 + )T12 T22 = T01 + 2(1 )T11 + T21
(0.4239 100) + 2(1 + 0.4239)T12 0.4239T22 =
(0.4239)100 + 2(1 0.4239)44.372 + (0.4239)23.746
42.39 + 2.8478T12 0.4239T22 = 42.39 + 51.125 + 10.066
i=2
(E3.7)
i=3
(E3.8)
i=4
(E3.9)
10.02.18
Chapter 10.02
(E3.10)
0.4239T + 2.8478T42 = 54.908
The simultaneous linear equations (E3.7) (E3.10) can be written in matrix form as
0
0
2.8478 0.4239
T12 145.971
0.4239 2.8478 0.4239
2 54.985
0
T2 =
0
0.4239 2.8478 0.4239 T32 43.187
0.4239 2.8478 T42 54.908
0
0
Solving the above set of equations, we get
T12 55.883
2
T2 = 31.075
T32 23.174
2
T4 22.730
Hence, the temperature at all the nodes at time, t = 6 sec is
T02 100
2
T1 55.883
T22 31.075
2 =
T3 23.174
T 2 22.730
42
T5 25
Temperature at the nodes inside the rod when t=9 sec
T03 = 100C
Boundary Condition (E3.1)
T53 = 25C
For all the interior nodes, setting j = 2 and i =1, 2, 3, 4 in Equation (15) gives the following
equations
i=1
T03 + 2(1 + )T13 T23 = T02 + 2(1 )T12 + T22
(0.4239 100) + 2(1 + 0.4239)T13 0.4239T23 =
(0.4239)100 + 2(1 0.4239)55.883 + (0.4239)31.075
42.39 + 2.8478T13 0.4239T23 = 42.39 + 64.388 + 13.173
i=2
(E3.11)
10.02.19
i=3
3
1
3
1
(E3.12)
i=4
3
2
3
2
(E3.13)
(E3.14)
0.4239T33 + 2.8478T43 = 57.210
The simultaneous linear equations (E3.11) (E3.14) can be written in matrix form as
0
0
2.8478 0.4239
T13 162.34
0.4239 2.8478 0.4239
3 69.318
0
T2 =
0
0.4239 2.8478 0.4239 T33 49.509
0
0
0.4239 2.8478 T43 57.210
T2 = 37.613
T33 26.562
3
T4 24.042
Hence, the temperature at all the nodes at time, t = 9 sec is
T03 100
3
T1 62.604
T23 37.613
3 =
T3 26.562
T 3 24.042
43
T5 25
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
10.02.21
Analytical Method
Appendix A
The parabolic heat conduction equation given by Equation (2) is formulated as
2T T
2 =
0 < x < 0.05, t > 0
t
x
with boundary conditions
(16)
T = 100C at x = 0, t > 0
(17)
T = 25C at x = 0.05, t > 0
and initial conditions
(18)
T = 20C at t = 0, 0 < x < 0.05
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
(19)
T ( x, t ) = Ts ( x) + Th ( x, t )
where
Ts = solution for steady state problem,
Th = solution for transient problem.
Steady State Solution
Since the temperature at steady state is not changing,
T
= 0 , the steady state problem is
t
formulated as
d 2Ts
(20)
= 0,
0 < x < 0.05
dx 2
with boundary conditions
(21)
Ts = 100C at x = 0
(22)
Ts = 25C at x = 0.05
The solution to Equation (20) is given by integrating it on both sides to give
dTs
=A
dx
where A is a constant of integration and by integrating again to give
(23)
Ts = Ax + B
where B is another constant of integration. By substituting the boundary condition (21), we
obtain
A(0) + B = 100
B = 100
By substituting the boundary condition (22), we obtain
10.02.22
Chapter 10.02
A(0.05) + 100 = 25
75
A=
0.05
= 1500
Plugging back the values of A and B in Equation (23), we get the steady state solution as
(24)
Ts = 1500 x + 100
Transient Solution
The transient problem is formulated as
2T
T
(25)
2h = h ,
0 < x < 0.05
t
x
with boundary conditions
(26)
Th = 0C at x = 0
(27)
Th = 0C at x = 0.05
Note: from Equation (19),
T ( x, t ) = Ts ( x) + Th ( x, t )
and by substituting Equations (21) and (22), the boundary conditions of Th are obtained.
Initial conditions for the transient problem are hence given by
Th = 20 Ts , t = 0, 0 < x < 0.05
= 20 (1500 x + 100)
= 20 + 1500 x 100
(28)
= 1500 x 80, t = 0, 0 < x < 0.05
To obtain solution for the transient problem, let us assume Th ( x, t ) is function of the product
of a spatial function and a temperature function. That is
(29)
Th ( x, t ) = X ( x). (t )
Substituting Equation (29) in Equation (25), we get
d2X
d
=X
2
dt
dx
2
1 d X
1 d
(30)
=
2
dt
X dx
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)
1 d2X
1 d
=
= 2
2
dt
X dx
Spatial solution
Taking just the spatial term from Equation (31), we have
1 d2X
= 2
X dx 2
(31)
10.02.23
d2X
(32)
+ 2X = 0
2
dx
The Equation (32) is a homogeneous second order ordinary differential equation. These type
of equations have the solution of the form X ( x) = e mx . Substituting X ( x) = e mx in Equation
(32) we get,
m 2 e mx + 2 e mx = 0
e mx (m 2 + 2 ) = 0
m2 + 2 = 0
m1 , m2 = i , i
From the values of m1 and m2 , the solution of X (x) is written of the form
X ( x) = C cos( x) + D sin( x)
(33)
Temporal solution
Taking just the temporal term from Equation (31), we have
1 d
= 2
dt
d
(34)
+ 2 = 0
dt
The above equation is a homogeneous first order ordinary differential equation. These type of
equations have the solution of the form (t ) = e mt . Substituting (t ) = e mt in Equation (34)
we get
me mt + 2 e mt = 0
e mt (m + 2 ) = 0
m + 2 = 0
m = 2
From the value of m , the solution of (t ) is written as
(t ) = Ee
(35)
(36)
e t [F .1 + G.0] = 0
2
e t [ F ] = 0
2
(37)
10.02.24
Chapter 10.02
2
Ge t sin(0.4 ) = 0
sin(0.05 ) = 0
0.05 = n
n
=
0.05
= 20n
Substituting the value of in Equation (37) gives
2
Th ( x, t ) = Ge ( 20 n ) t sin( 20nx)
As the general solution can have any value of n ,
Th ( x, t ) = Gn e ( 20 n ) t sin( 20nx)
2
(38)
n =1
G
n =1
Multiplying both sides by sin( 20mx) and integrating from 0 to 0.05 gives
0.05
0.05
n =1 0
Gn
n =1 2
0.05
0.05
Gn
cos(20(m n)x)dx
n =1 2 0
0.05
cos(
20
(
)
)
+
m
n
x
dx
=
0
0.05
1500
0.05
cos(20(m n)x)dx = 0 ,
mn
0.05
m=n
0.05
cos(20(m + n)x)dx = 0,
0.05
for any m
we get
0.05
0.05
Gm
0.05 = 1500 x sin( 20mx)dx 80 sin( 20mx)dx
2
0
0
10.02.25
x cos(20m ) 0.05
1
+
= 1500
20m
20m
0
0.05
0.05
0.05
0.05
x cos(20m ) 0.05
1
+
cos(
20
80
= 1500
m
dx
0 sin(20m )dx
20m
20m 0
0
(1) m 1
0.05 cos(m ) + 0
80
+
= 1500
20m
20m
150(1) m 160
+
(1) m 1
Gm =
m
m
m
10(1) 160
=
m
Substituting Equation (39) in Equation (38), we get
Now
k
=
C
54
=
7800 490
= 1.4129 10 5 m 2 / s
(39)
(40)
(41)
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,
x = 0.01 m when t = 9 secs.
= 62.510C
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
T33
27.266(1.422)
26.809(0.965)
26.562(0.282)
25.844
T43
22.872(0.738)
24.243(0.633)
24.042(0.432)
23.610