06/20/22 http:// numericalmethods.eng.usf.edu 1 Parabolic Partial Parabolic Partial Differential Differential Equations Equations http://numericalmethods.eng.us f.edu Transforming Numerical Methods Education for STEM Undergraduates
Dec 16, 2015
04/18/23http://
numericalmethods.eng.usf.edu 1
Parabolic Partial Parabolic Partial Differential EquationsDifferential Equations
http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM Undergraduates
Defining Parabolic Defining Parabolic PDE’sPDE’s The general form for a second order linear PDE with two
independent variables and one dependent variable is
Recall the criteria for an equation of this type to be considered parabolic
For example, examine the heat-conduction equation given by
Then
thus allowing us to classify this equation as parabolic.
02
22
2
2
Dy
uC
yx
uB
x
uA
042 ACB
, where
0
)0)((4042
ACB
t
T
x
T
2
2
1,0,0, DCBA
Physical Example of an Physical Example of an Elliptic PDEElliptic PDE
The internal temperature of a metal rod exposed to two different temperatures at each end can be found using the heat conduction equation.
t
T
x
T
2
2
Discretizing the Parabolic Discretizing the Parabolic PDEPDE
Schematic diagram showing interior nodes
x
1i i 1i
x x
For a rod of length divided into nodes
The time is similarly broken into time steps of
Hence corresponds to the temperature at node ,that is,
and time
L 1nn
Lx
t
jiT i
xix tjt
The Explicit MethodThe Explicit Method
If we define we can then write the finite central divided difference
approximation of the left hand side at a general interior node ( ) as
where ( ) is the node number along the time.
n
Lx
i
x
1i i 1i
x x
211
,
2
2 2
x
TTT
x
T ji
ji
ji
ji
j
The Explicit MethodThe Explicit Method
The time derivative on the right hand side is approximated by the forward divided difference method as,
x
1i i 1i
x x
t
TT
t
T ji
ji
ji
1
,
The Explicit MethodThe Explicit MethodSubstituting these approximations into the governing equation yields
Solving for the temp at the time node gives
choosing,
we can write the equation as,
.
t
TT
x
TTT ji
ji
ji
ji
ji
1
211 2
1j
jiji
ji
ji
ji TTT
x
tTT 112
1 2)(
2)( x
t
jiji
ji
ji
ji TTTTT 11
1 2
The Explicit MethodThe Explicit Method
•This equation can be solved explicitly because it can be written for each internal location node of the rod for time node in terms of the temperature at time node .
•In other words, if we know the temperature at node , and the boundary temperatures, we can find the temperature at the next time step.
•We continue the process by first finding the temperature at all nodes , and using these to find the temperature at the next time node, . This process continues until we reach the time at which we are interested in finding the temperature.
jiji
ji
ji
ji TTTTT 11
1 2
1jj
0j
1j2j
Example 1: Explicit Example 1: Explicit MethodMethod
Consider a steel rod that is subjected to a temperature of on the left end and on the right end. If the rod is of length ,use the explicit method to find the temperature distribution in the rod from and seconds. Use , .
Given: , ,
The initial temperature of the rod is .
C100C25 m05.0
0t 9tmx 01.0 st 3
Km
Wk
54
37800
m
kg
Kkg
JC
490
C20
0i 1 2 3 4 5
m01.0
CT 25CT 100
Example 1: Explicit Example 1: Explicit MethodMethodRecall,
therefore,
Then,
C
k
4907800
54
sm /104129.1 25
2x
t
25
01.0
3104129.1
4239.0 .
Number of time steps,
Boundary Conditions
All internal nodes are at for This can be represented as,
t
tt initialfinal
3
09
3
.
.
3,2,1,0allfor25
100
5
0
j
CT
CTj
j
C20sec0t .
1,2,3,4 allfor ,200 iCTi
Example 1: Explicit Example 1: Explicit MethodMethodNodal temperatures when , :
We can now calculate the temperature at each node explicitly using the equation formulated earlier,
sec0t
CT 10000
nodesInterior
20
20
20
20
04
03
02
01
CT
CT
CT
CT
CT 2505
0j
jiji
ji
ji
ji TTTTT 11
1 2
Example 1: Explicit Example 1: Explicit MethodMethod
Nodal temperatures when (Example Calculations)
setting
Nodal temperatures when , :
sec3t
ConditionBoundary10010 CT
nodesInterior
120.22
20
20
912.53
14
13
12
11
CT
CT
CT
CT
ConditionBoundary2515 CT
ConditionBoundary10010 CT
C
TTTTT
912.53
912.3320
804239.020
100)20(2204239.020
2 00
01
02
01
11
C
TTTTT
20
020
04239.020
20)20(2204239.020
2 01
02
03
02
12
0i
1i 2i
sec3t 1j
0j
Example 1: Explicit Example 1: Explicit MethodMethod
Nodal temperatures when (Example Calculations)
setting ,
Nodal temperatures when , :
sec6t
ConditionBoundary10020 CT
nodesInterior
442.22
889.20
375.34
073.59
24
23
22
21
CT
CT
CT
CT
ConditionBoundary2525 CT
ConditionBoundary10020 CT0i
1i 2i
sec6t 2j
C
TTTTT
073.59
1614.5912.53
176.124239.0912.53
100)912.53(2204239.0912.53
2 10
11
12
11
21
C
TTTTT
375.34
375.1420
912.334239.020
912.53)20(2204239.020
2 11
12
13
12
22
1j
Example 1: Explicit Example 1: Explicit MethodMethod
Nodal temperatures when (Example Calculations)
setting ,
Nodal temperatures when , :
sec9t
ConditionBoundary10030 CT
nodesInterior
872.22
266.27
132.39
953.65
34
33
32
31
CT
CT
CT
CT
ConditionBoundary2535 CT
2jConditionBoundary1003
0 CT0i
1i 2i
sec9t 3j
C
TTTTT
953.65
8795.6073.59
229.164239.0073.59
100)073.59(2375.344239.0073.59
2 20
21
22
21
31
C
TTTTT
132.39
7570.4375.34
222.114239.0375.34
073.59)375.34(2899.204239.0375.34
2 21
22
23
22
32
Example 1: Explicit Example 1: Explicit MethodMethod
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.
The Implicit MethodThe Implicit MethodWHY:
•Using the explicit method, we were able to find the temperature at each node, one equation at a time.
•However, the temperature at a specific node was only dependent on the temperature of the neighboring nodes from the previous time step. This is contrary to what we expect from the physical problem.
•The implicit method allows us to solve this and other problems by developing a system of simultaneous linear equations for the temperature at all interior nodes at a particular time.
The Implicit MethodThe Implicit Method
The second derivative on the left hand side of the equation is approximated by the CDD scheme at time level at node ( ) as
1j
t
T
x
T
2
2
2
11
111
1,
2
2 2
x
TTT
x
T ji
ji
ji
ji
i
The Implicit MethodThe Implicit Method
The first derivative on the right hand side of the equation is approximated by the BDD scheme at time level at node ( ) as
t
T
x
T
2
2
1j i
t
TT
t
T ji
ji
ji
1
1,
The Implicit MethodThe Implicit Method
Substituting these approximations into the heat conduction equation yields
t
T
x
T
2
2
t
TT
x
TTT ji
ji
ji
ji
ji
1
2
11
111 2
From the previous slide,
Rearranging yields
given that,
The rearranged equation can be written for every node during each time step. These equations can then be solved as a simultaneous system of linear equations to find the nodal temperatures at a particular time.
The Implicit MethodThe Implicit Method
t
TT
x
TTT ji
ji
ji
ji
ji
1
2
11
111 2
ji
ji
ji
ji TTTT
1
111
1 )21(
2x
t
Example 2: Implicit Example 2: Implicit MethodMethod
Consider a steel rod that is subjected to a temperature of on the left end and on the right end. If the rod is of length ,use the implicit method to find the temperature distribution in the rod from and seconds. Use , .
Given: , ,
The initial temperature of the rod is .
C100C25 m05.0
0t 9tmx 01.0 st 3
Km
Wk
54
37800
m
kg
Kkg
JC
490
C20
0i 1 2 3 4 5
m01.0
CT 25CT 100
Example 2: Implicit Example 2: Implicit MethodMethodRecall,
therefore,
Then,
C
k
4907800
54
sm /104129.1 25
2x
t
25
01.0
3104129.1
4239.0 .
Number of time steps,
Boundary Conditions
All internal nodes are at for This can be represented as,
t
tt initialfinal
3
09
3
.
.
3,2,1,0allfor25
100
5
0
j
CT
CTj
j
C20sec0t .
1,2,3,4 allfor ,200 iCTi
Example 2: Implicit Example 2: Implicit MethodMethodNodal temperatures when , :
We can now form our system of equations for the first time step by writing the approximated heat conduction equation for each node.
sec0t
CT 10000
nodesInterior
20
20
20
20
04
03
02
01
CT
CT
CT
CT
CT 2505
0j
ji
ji
ji
ji TTTT
1
111
1 )21(
Example 2: Implicit Example 2: Implicit MethodMethod
Nodal temperatures when , (Example Calculations)
For the interior nodes setting and gives the following,
For the first time step we can write four such equations with four unknowns, expressing them in matrix form yields
sec3t
ConditionBoundary1001
0 CT0i
1i
390.624239.08478.1
204239.08478.139.42
20)4239.0()4239.021()1004239.0(
)21(
12
11
12
11
12
11
01
12
11
10
TT
TT
TT
TTTT
2i204239.08478.14239.0
)21(1
312
11
02
13
12
11
TTT
TTTT
598.30
20
20
390.62
8478.14239.000
4239.08478.14239.00
04239.08478.14239.0
004239.08478.1
14
13
12
11
T
T
T
T
0j 4,3,2,1i
Hence, the nodal temps at are
Example 2: Implicit Example 2: Implicit MethodMethod
598.30
20
20
390.62
8478.14239.000
4239.08478.14239.00
04239.08478.14239.0
004239.08478.1
14
13
12
11
T
T
T
T
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
477.21
438.21
792.24
451.39
14
13
12
11
T
T
T
T
sec3t
25
477.21
438.21
792.24
451.39
100
15
14
13
12
11
10
T
T
T
T
T
T
Example 2: Implicit Example 2: Implicit MethodMethod
Nodal temperatures when , (Example Calculations)
For the interior nodes setting and gives the following,
For the second time step we can write four such equations with four unknowns, expressing them in matrix form yields
sec6t
ConditionBoundary1002
0 CT0i
1i
2i
841.814239.08478.1
451.394239.08478.139.42
451.394239.0)4239.021()1004239.0(
)21(
22
21
22
21
22
21
11
22
21
20
TT
TT
TT
TTTT
792.244239.08478.14239.0
)21(2
32
22
1
12
23
22
21
TTT
TTTT
075.32
438.21
792.24
841.81
8478.14239.000
4239.08478.14239.00
04239.08478.14239.0
004239.08478.1
24
23
22
21
T
T
T
T
1j 4,3,2,1i
Hence, the nodal temps at are
Example 2: Implicit Example 2: Implicit MethodMethod
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
sec6t
075.32
438.21
792.24
841.81
8478.14239.000
4239.08478.14239.00
04239.08478.14239.0
004239.08478.1
24
23
22
21
T
T
T
T
836.22
876.23
669.30
326.51
24
23
22
21
T
T
T
T
25
836.22
876.23
669.30
326.51
100
25
24
23
22
21
20
T
T
T
T
T
T
Example 2: Implicit Example 2: Implicit MethodMethod
Nodal temperatures when , (Example Calculations)
For the interior nodes setting and gives the following,
For the third time step we can write four such equations with four unknowns, expressing them in matrix form yields
sec9t
ConditionBoundary1003
0 CT0i
1i
2i
716.934239.08478.1
326.514239.08478.139.42
326.51)4239.0()4239.021()1004239.0(
)21(
32
31
32
31
32
31
21
32
31
30
TT
TT
TT
TTTT
669.304239.08478.14239.0
)21(3
33
23
1
22
33
32
31
TTT
TTTT
434.33
876.23
669.30
716.93
8478.14239.000
4239.08478.14239.00
04239.08478.14239.0
004239.08478.1
34
33
32
31
T
T
T
T
2j 4,3,2,1i
Hence, the nodal temps at are
Example 2: Implicit Example 2: Implicit MethodMethod
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
sec9t
434.33
876.23
669.30
716.93
8478.14239.000
4239.08478.14239.00
04239.08478.14239.0
004239.08478.1
34
33
32
31
T
T
T
T
243.24
809.26
292.36
043.59
34
33
32
31
T
T
T
T
25
243.24
809.26
292.36
043.59
100
35
34
33
32
31
30
T
T
T
T
T
T
Example 2: Implicit Example 2: Implicit MethodMethodTo 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.
The Crank-Nicolson The Crank-Nicolson MethodMethodWHY:
Using the implicit method our approximation of
was of accuracy, while our approximation of was of
accuracy.
2
2
x
T
2)( xO
t
T
)( tO
The Crank-Nicolson The Crank-Nicolson MethodMethod
One can achieve similar orders of accuracy by approximating the second derivative, on the left hand side of the heat equation, at the midpoint of the time step. Doing so yields
2
11
111
211
,
2
2 22
2 x
TTT
x
TTT
x
T ji
ji
ji
ji
ji
ji
ji
The Crank-Nicolson The Crank-Nicolson MethodMethod
The first derivative, on the right hand side of the heat equation, is approximated using the forward divided difference method at time level ,1j
t
TT
t
T ji
ji
ji
1
,
•Substituting these approximations into the governing equation for heat conductance yields
giving
where
•Having rewritten the equation in this form allows us to descritize the physical problem. We then solve a system of simultaneous linear equations to find the temperature at every node at any point in time.
The Crank-Nicolson The Crank-Nicolson MethodMethod
t
TT
x
TTT
x
TTT ji
ji
ji
ji
ji
ji
ji
ji
1
2
11
111
211 22
2
ji
ji
ji
ji
ji
ji TTTTTT 11
11
111 )1(2)1(2
2x
t
Example 3: Crank-Example 3: Crank-NicolsonNicolson
Consider a steel rod that is subjected to a temperature of on the left end and on the right end. If the rod is of length ,use the Crank-Nicolson method to find the temperature distribution in the rod from to seconds. Use , .
Given: , ,
The initial temperature of the rod is .
C100C25 m05.0
0t9t mx 01.0 st 3
Km
Wk
54
37800
m
kg
Kkg
JC
490
C20
0i 1 2 3 4 5
m01.0
CT 25CT 100
Example 3: Crank-Example 3: Crank-NicolsonNicolsonRecall,
therefore,
Then,
C
k
4907800
54
sm /104129.1 25
2x
t
25
01.0
3104129.1
4239.0 .
Number of time steps,
Boundary Conditions
All internal nodes are at for This can be represented as,
t
tt initialfinal
3
09
3
.
.
3,2,1,0allfor25
100
5
0
j
CT
CTj
j
C20sec0t .
1,2,3,4 allfor ,200 iCTi
Example 3: Crank-Example 3: Crank-NicolsonNicolsonNodal temperatures when , :
We can now form our system of equations for the first time step by writing the approximated heat conduction equation for each node.
sec0t
CT 10000
nodesInterior
20
20
20
20
04
03
02
01
CT
CT
CT
CT
CT 2505
0j
ji
ji
ji
ji
ji
ji TTTTTT 11
11
111 )1(2)1(2
Example 3: Crank-Example 3: Crank-NicolsonNicolson
Nodal temperatures when , (Example Calculations)
For the interior nodes setting and gives the following
For the first time step we can write four such equations with four unknowns, expressing them in matrix form yields
sec3t
ConditionBoundary1001
0 CT0i
1i
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
TT
TT
TTTTTT
30.1164239.08478.2 12
11 TT
718.52
000.40
000.40
30.116
8478.24239.000
4239.08478.24239.00
04239.08478.24239.0
004239.08478.2
14
13
12
11
T
T
T
T
0j 4,3,2,1i
Hence, the nodal temps at are
Example 3: Crank-Example 3: Crank-NicolsonNicolson
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
sec3t
718.52
000.40
000.40
30.116
8478.24239.000
4239.08478.24239.00
04239.08478.24239.0
004239.08478.2
14
13
12
11
T
T
T
T
607.21
797.20
746.23
372.44
14
13
12
11
T
T
T
T
25
607.21
797.20
746.23
372.44
100
15
14
13
12
11
10
T
T
T
T
T
T
Nodal temperatures when , (Example Calculations)
For the interior nodes setting and gives the following,
For the second time step we can write four such equations with four unknowns, expressing them in matrix form yields
Example 3: Crank-Example 3: Crank-NicolsonNicolson
sec6t
ConditionBoundary1002
0 CT0i
1i
066.10125.5139.424239.08478.239.42
746.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
TT
TTTTTT
1j 4,3,2,1i
971.1454239.08478.2 22
21 TT
908.54
187.43
985.54
971.145
8478.24239.000
4239.08478.24239.00
04239.08478.24239.0
004239.08478.2
24
23
22
21
T
T
T
T
Hence, the nodal temps at are
Example 3: Crank-Example 3: Crank-NicolsonNicolson
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
sec6t
908.54
187.43
985.54
971.145
8478.24239.000
4239.08478.24239.00
04239.08478.24239.0
004239.08478.2
24
23
22
21
T
T
T
T
730.22
174.23
075.31
883.55
24
23
22
21
T
T
T
T
25
730.22
174.23
075.31
883.55
100
25
24
23
22
21
20
T
T
T
T
T
T
Example 3: Crank-Example 3: Crank-NicolsonNicolson
Nodal temperatures when , (Example Calculations)
For the interior nodes setting and gives the following,
For the third time step we can write four such equations with four unknowns, expressing them in matrix form yields
sec9t
ConditionBoundary1003
0 CT0i
1i2j 4,3,2,1i
173.13388.6439.424239.08478.239.42
075.31)4239.0(883.55)4239.01(2100)4239.0(
4239.0)4239.01(2)1004239.0(
)1(2)1(2
32
31
32
32
22
21
20
32
31
30
TT
TT
TTTTTT
34.1624239.08478.2 32
31 TT
210.57
509.49
318.69
34.162
8478.24239.000
4239.08478.24239.00
04239.08478.24239.0
004239.08478.2
34
33
32
31
T
T
T
T
Hence, the nodal temps at are
Example 3: Crank-Example 3: Crank-NicolsonNicolson
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
sec9t
210.57
509.49
318.69
34.162
8478.24239.000
4239.08478.24239.00
04239.08478.24239.0
004239.08478.2
34
33
32
31
T
T
T
T
042.24
562.26
613.37
604.62
34
33
32
31
T
T
T
T
25
042.24
562.26
613.37
604.62
100
35
34
33
32
31
30
T
T
T
T
T
T
Example 3: Crank-Example 3: Crank-NicolsonNicolsonTo 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.
Node Explicit ImplicitCrank-
NicolsonAnalytic
al
34
33
32
31
T
T
T
T
042.24
562.26
613.37
604.62
243.24
809.26
292.36
043.59
872.22
266.27
132.39
953.65
Internal Temperatures at Internal Temperatures at 9 sec.9 sec.The table below allows you to compare the results from all three methods discussed in juxtaposition with the analytical solution.
610.23
844.25
084.37
510.62
THE END