Mws Gen Pde TXT Parabolic
Mws Gen Pde TXT Parabolic
Mws Gen Pde TXT Parabolic
02
Parabolic Partial Differential Equations
The general second order linear PDE with two independent variables and one dependent
variable is given by
2u 2u 2u
A B C D0
x 2 xy y 2
(1)
where A, B, C are functions of the independent variables, x , y , and D can be a
u u
function of x, y , u , and y . If B 2 4 AC 0 , Equation (1) is called a parabolic
x
partial differential equation. One of the simple examples of a parabolic PDE is the heat-
conduction equation for a metal rod (Figure 1)
2T T
2
x t
(2)
where
T temperature as a function of location, x and time, t
in which the thermal diffusivity, is given by
k
C
where
k thermal conductivity of rod material,
density of rod material,
C specific heat of the rod material.
10.02.1
10.02.2 Chapter 10.02
x
x x
i 1 i i 1
Figure 2: Schematic diagram showing the node representation in the model
t time step.
The time derivative of the right hand side of Equation (2) is approximated by the forward
divided difference approximation
T Ti j 1 Ti j
(5)
t i, j t
Substituting the finite difference approximations given by Equations (3) and (5) in Equation
(2) gives
Ti j1 2Ti j Ti j1 Ti j 1 Ti j
x 2 t
Solving for the temperature at the time node j 1 , gives
t
Ti j 1 Ti j
( x ) 2
Ti j1 2Ti j Ti j1
Choosing
t
(x) 2
(6)
Ti j 1 Ti j Ti j1 2Ti j Ti j1 (7)
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:
W kg J
k 54 , 7800 3 , C 490 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
t
x 2
10.02.4 Chapter 10.02
3
1.4129 10 5
0.01 2
0.4239
t final t initial
Number of time steps=
t
90
3
3
i0 1 2 3 4 5
T 100 C T 25 C
0.01m
The initial temperature of the rod is 20C , that is, all the temperatures of the nodes inside
the rod are at 20C when time, t 0 sec except for the boundary nodes as given by
Equation (E1.1). This could be represented as
Ti 0 20C , for all i 1,2,3,4 .
(E1.2)
Initial temperature at the nodes inside the rod (when t=0 sec)
T10 20C
T20 20C
from Equation (E1.2)
T30 20C
T40 20C
T50 25C from Equation (E1.1)
Parabolic Partial Differential Equations 10.02.5
T11 T10 T20 2T10 T00
20 0.4239 20 2(20) 100
20 0.4239 80
20 33.912
53.912C
T31 T30 T40 2T30 T20
20 0.4239 20 2( 20) 20
20 0.4239 0
20 0
20C
T12 T11 T21 2T11 T01
53.912 0.4239 20 2(53.912) 100
53.912 0.423912.176
53.912 5.1614
59.073C
10.02.6 Chapter 10.02
T32 T31 T41 2T31 T21
20 0.4239 22.120 2( 20) 20
20 0.4239 2.120
20 0.89867
20.899C
T42 T41 T51 2T41 T31
22.120 0.4239 25 2(22.120) 20
22.120 0.4239 0.76
22.120 0.032220
22.442C
T13 T12 T22 2T12 T02
59.073 0.4239 34.375 2(59.073) 100
59.073 0.423916.229
59.073 6.8795
65.953C
T23 T22 T32 2T22 T12
34.375 0.4239 20.899 2(34.375) 59.073
34.375 0.423911 .222
34.375 4.7570
39.132C
Parabolic Partial Differential Equations 10.02.7
T33 T32 T42 2T32 T22
20.899 0.4239 22.442 2( 20.899) 34.375
20.899 0.423915.019
20.899 6.367
27.266C
T43 T42 T52 2T42 T32
22.442 0.4239 25 2( 22.442) 20.899
22.442 0.42391.0150
22.442 0.4303
22.872C
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 .
Given
W kg J
k 54 , 7800 3 , C 490 kg K .
mK m
The initial temperature of the rod is 20C .
Solution
k
C
54
7800 490
Parabolic Partial Differential Equations 10.02.9
1.4129 10 5 m 2 / s
Then
t
x 2
3
1.412 10 5
0.01 2
0.4239
i0 1 2 3 4 5
T 100 C T 25 C
0.01m
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)
T10 20C
T20 20C
from Equation (E2.2)
T30 20C
T40 20C
T50 25C from Equation (E2.1)
10.02.10 Chapter 10.02
T01 100C
Boundary Condition (E2.1)
T5 25C
1
For all the interior nodes, putting j 0 and i 1, 2, 3, 4 in Equation (11) gives the
following equations
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
(E2.3)
i=2
T11 (1 2 )T21 T31 T20
0.4239T11 1.8478T21 0.4239T31 20
(E2.4)
i=3
T21 (1 2 )T31 T41 T30
0.4239T21 1.8478T31 0.4239T41 20
(E2.5)
i=4
T31 (1 2 )T41 T51 T40
0.4239T31 1.8478T41 (0.4239 25) 20
0.4239T31 1.8478T41 10.598 20
0.4239T31 1.8478T41 30.598
(E2.6)
The simultaneous linear equations (E2.3) (E2.6) can be written in matrix form as
1.8478 0.4239 0 0 T11 62.390
0.4239 1.8478 0.4239
0 T21 20
0 0.4239 1.8478 0.4239 T31 20
0 0 0.4239 1.8478 T41 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
Parabolic Partial Differential Equations 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
T02 100C
Boundary Condition (E2.1)
T5 25C
2
For all the interior nodes, putting j 1 and i 1, 2, 3, 4 in Equation (11) gives the
following equations
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
(E2.7)
i=2
T12 (1 2 )T22 T32 T21
0.4239T12 1.8478T22 0.4239T32 24.792
(E2.8)
i=3
T22 (1 2 )T32 T42 T31
0.4239T22 1.8478T32 0.4239T42 21.438
(E2.9)
i=4
10.02.12 Chapter 10.02
T03 100C
Boundary Condition (E2.1)
T5 25C
3
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
1.8478T13 0.4239T23 93.716
(E2.11)
Parabolic Partial Differential Equations 10.02.13
i=2
T13 (1 2 )T23 T33 T22
0.4239T13 1.8478T23 0.4239T33 30.669
(E2.12)
i=3
T23 (1 2 )T33 T43 T32
0.4239T23 1.8478T33 0.4239T43 23.876
(E2.13)
i=4
T33 (1 2 )T43 T53 T42
0.4239T33 1.8478T43 (0.4239 25) 22.836
0.4239T33 1.8478T43 10.598 22.836
0.4239T33 1.8478T43 33.434
(E2.14)
The simultaneous linear equations (E2.11) (E2.14) can be written in matrix form as
1.8478 0.4239 0 0 T13 93.716
0.4239 1.8478 0.4239
0 T23 30.669
0 0.4239 1.8478 0.4239 T33 23.876
0 0 0.4239 1.8478 T43 33.434
The solution of the above set of simultaneous linear equation is
T13 59.043
3
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
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
x 2
t
( 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 1 Ti j1 2Ti j Ti j1 Ti j11 2Ti j 1 Ti j11
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 Ti j 1 Ti j
t i, j t
(13)
Substituting Equations (12) and (13) in Equation (2) gives
1 T j 2Ti j Ti j1 Ti j11 2Ti j 1 Ti j11 Ti j 1 Ti j
i 1
2 x 2 x 2 t
(14)
giving
Ti j11 2(1 )Ti j 1 Ti j11 Ti j1 2(1 )Ti j Ti j1 (15)
where
Parabolic Partial Differential Equations 10.02.15
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
W kg J
k 54 , 7800 3 , C 490 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
t
x 2
3
1.412 10 5
0.01 2
0.4239
i0 1 2 3 4 5
0.01m
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)
T10 20C
T20 20C
from Equation (E3.2)
T3 20C
0
T40 20C
T50 25C from Equation (E3.1)
T01 100C
Boundary Condition (E3.1)
T5 25C
1
For all the interior nodes, setting j 0 and i 1, 2, 3, 4 in Equation (15) gives the
following equations
i=1
T01 2(1 )T11 T21 T00 2(1 )T10 T20
(0.4239 100) 2(1 0.4239)T11 0.4239T21 (0.4239)100 2(1 0.4239) 20 (0.4239) 20
42.39 2.8478T11 0.4239T21 42.39 23.044 8.478
2.8478T11 0.4239T21 116 .30
(E3.3)
i=2
T11 2(1 )T21 T31 T10 2(1 )T20 T30
0.4239T11 2(1 0.4239)T21 0.4239T31 (0.4239) 20 2(1 0.4239) 20 (0.4239) 20
0.4239T11 2.8478T21 0.4239T31 40.000
(E3.4)
i=3
T21 2(1 )T31 T41 T20 2(1 )T30 T40
0.4239T21 2(1 0.4239)T31 0.4239T41 (0.4239)20 2(1 0.4239)20 (0.4239)20
0.4239T21 2.8478T31 0.4239T41 40.000
(E3.5)
Parabolic Partial Differential Equations 10.02.17
i=4
T31 2(1 )T41 T51 T30 2(1 )T40 T50
0.4239T31 2(1 0.4239)T41 (0.4239)25 (0.4239) 20 2(1 0.4239) 20 (0.4239)25
0.4239T31 2.8478T41 10.598 8.478 23.044 10.598
0.4239T31 2.8478T41 52.718
(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
2.8478 0.4239 0 0 T11 116 .30
0.4239 2.8478 0.4239
0 T21 40.000
0 0.4239 2.8478 0.4239 T31 40.000
0 0 0.4239 2.8478 T41 52.718
The above matrix is tridiagonal. Solving the above matrix we get
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
T02 100C
BoundaryCondition (E3.1)
T5 25C
2
For all the interior nodes, putting j 1 and i 1, 2, 3, 4 in Equation (15) gives the
following equations
i=1
10.02.18 Chapter 10.02
T02 100
2
T1 55.883
T22 31.075
2
T3 23.174
T 2 22.730
42
T5 25
T03 100C
BoundaryCondition (E3.1)
T5 25C
3
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.8478T 0.4239T23 42.39 64.388 13.173
1
3
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
x t
with boundary conditions
T 100C at x 0, t 0
(16)
T 25C at x 0.05, t 0
(17)
and initial conditions
T 20C at t 0, 0 x 0.05 (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
T ( x, t ) Ts ( x ) Th ( x, t )
(19)
where
Ts = solution for steady state problem,
Th = solution for transient problem.
Steady State Solution
T
Since the temperature at steady state is not changing, 0 , the steady state problem is
t
formulated as
d 2Ts
0, 0 x 0.05 (20)
dx 2
with boundary conditions
Ts 100C at x0
(21)
Ts 25C at x 0.05
(22)
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
Ts Ax B (23)
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
Parabolic Partial Differential Equations 10.02.23
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
Ts 1500 x 100
(24)
Transient Solution
The transient problem is formulated as
2Th Th
2 , 0 x 0.05 (25)
x t
with boundary conditions
Th 0C at x0
(26)
Th 0C at x 0.05
(27)
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
1500 x 80, t 0, 0 x 0.05 (28)
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
Th ( x, t ) X ( x ). (t )
(29)
Substituting Equation (29) in Equation (25), we get
d2X d
2
X
dx dt
1 d X2
1 d
(30)
X dx 2
dt
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 (31)
X dx 2
dt
Spatial solution
Taking just the spatial term from Equation (31), we have
10.02.24 Chapter 10.02
1 d2X
2
X dx 2
d2X
2X 0 (32)
dx 2
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
2 0 (34)
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
2 t
(t ) Ee
(35)
Substituting Equations (33) and (35) in Equation (29), we have
Th ( x, t ) Ee t C cos( x ) D sin( x)
2
F cos(x) G sin(x)
2
Th ( x, t ) e t
(36)
Substituting boundary condition represented by Equation (26) in Equation (36) gives
e t F cos( .0) G sin( .0) 0
2
F .1 G.0 0
2
e t
2t
e [F ] 0
Since, e 2 t
cannot be zero, F 0 . Now substituting F 0 in Equation (36) gives
Parabolic Partial Differential Equations 10.02.25
2
Th ( x, t ) Ge t sin( x )
(37)
Substituting boundary condition represented by Equation (27) in Equation (37) gives
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,
G e ( 20 n )
2
Th ( x, t ) n
t
sin( 20nx )
n 1
(38)
Substituting the initial condition
Th ( x,0) (1500 x 80)C
from Equation (28) in Equation (38)
G
n 1
n sin( 20nx ) 1500 x 80
Multiplying both sides by sin( 20mx) and integrating from 0 to 0.05 gives
0.05 0.05
n 1 0
Gn sin(20nx) sin(20mx)dx (1500 x 80) sin( 20mx)dx 0
0.05 0.05
Gn
n 1 2
2 sin(20nx) sin( 20mx)dx (1500 x 80) sin( 20mx)dx
0 0
Gn 0.05 0.05
cos( 20(m n)x)dx
n 1 2 0
cos(20(m n)x)dx
0
0.05 0.05
1500
0
x sin( 20mx )dx 80 sin( 20mx )dx
0
cos(20(m n)x)dx 0 ,
0
mn
0.05
0.05
cos(20(m n)x)dx 0,
0
for any m
we get
10.02.26 Chapter 10.02
0.05 0.05
Gm
0.05 1500 x sin(20mx )dx 80 sin(20mx) dx
2 0 0
x cos(20m ) 0.05 1
0.05
0.05
Gm
150(1) m 160
m
m
(1) m 1
10(1) m 160
m
(39)
Substituting Equation (39) in Equation (38), we get
10( 1) m 160 2.5 m 2 t
Th ( x, t )
m 1 m
e sin(2.5mx)
(40)
Substituting Equations (40) and (24) in Equation (19) we have
10(1) m 160 20 m 2 t
T ( x, t ) 1500x 100 e sin(20mx)
m 1 m
(41)
Now
k
C
54
7800 490
1.4129 10 5 m 2 / s