parabolic partial differential equationsdefining parabolic pde’s the general form for a second...
Post on 03-Mar-2021
7 Views
Preview:
TRANSCRIPT
9/15/2011 http://numericalmethods.eng.usf.edu 1
Parabolic Partial Differential Equations
http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM Undergraduates
Defining Parabolic PDE’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
=+∂∂
+∂∂
∂+
∂∂ D
yuC
yxuB
xuA
042 =− ACB
, where
0)0)((4042
=−=− αACB
tT
xT
∂∂
=∂∂
2
2
α 1,0,0, −==== DCBA α
Physical Example of an Elliptic PDE
The internal temperature of a metal rod exposed to two different temperatures at each end can be found using the heat conduction equation.
tT
xT
∂∂
=∂∂
2
2
α
Discretizing the Parabolic PDE
Schematic diagram showing interior nodes
x
1−i i 1+i
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 1+nnLx =∆
t∆
jiT i
( )( )xix ∆= ( )( )tjt ∆=
The 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.
nLx =∆
i
x
1−i i 1+i
x∆ x∆
( )211
,2
2 2x
TTTxT j
ij
ij
i
ji ∆+−
≅∂∂ −+
j
The Explicit Method
The time derivative on the right hand side is approximated by the forward divided difference method as,
x
1−i i 1+i
x∆ x∆
tTT
tT j
ij
i
ji ∆−
≅∂∂ +1
,
The 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,
.
( ) tTT
xTTT j
ij
ij
ij
ij
i
∆−
=∆
+− +−+
1
211 2
α
1+j
( )ji
ji
ji
ji
ji TTT
xtTT 112
1 2)( −+
+ +−∆∆
+= α
2)( xt
∆∆
=αλ
( )ji
ji
ji
ji
ji TTTTT 11
1 2 −++ +−+= λ
The 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.
( )ji
ji
ji
ji
ji TTTTT 11
1 2 −++ +−+= λ
1+jj
0=j
1=j2=j
Example 1: Explicit MethodConsider 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 .
C°100C°25 m05.0
0=t 9=tmx 01.0=∆ st 3=∆
KmWk−
= 54 37800mkg
=ρ KkgJC−
= 490
C°20
0=i 1 2 3 4 5
m01.0
CT °= 25CT °=100
Example 1: Explicit MethodRecall,
therefore,
Then,
Ckρ
α =
490780054×
=α
sm /104129.1 25−×=
( )2xt
∆∆
= αλ
( )25
01.03104129.1 −×=
4239.0= .
Number of time steps,
Boundary Conditions
All internal nodes are at for This can be represented as,
ttt initialfinal
∆
−=
309 −
=
3=
.
.
3,2,1,0allfor25
100
5
0 =
°=
°=j
CTCT
j
j
C°20sec0=t .
1,2,3,4 allfor ,200 =°= iCTi
Example 1: Explicit MethodNodal temperatures when , :
We can now calculate the temperature at each node explicitly using the equation formulated earlier,
sec0=t
CT °=10000
nodesInterior
20
20
20
20
04
03
02
01
°=
°=
°=
°=
CTCTCTCT
CT °= 2505
0=j
( )ji
ji
ji
ji
ji TTTTT 11
1 2 −++ +−+= λ
Example 1: Explicit MethodNodal temperatures when (Example Calculations)
setting
Nodal temperatures when , :
sec3=t
ConditionBoundary10010 −°= CT
nodesInterior
120.22
20
20
912.53
14
13
12
11
°=
°=
°=
°=
CTCTCT
CT
ConditionBoundary2515 −°= CT
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 λ
0=i
1=i 2=i
sec3=t 1=j
0=j
Example 1: Explicit MethodNodal temperatures when (Example Calculations)
setting ,
Nodal temperatures when , :
sec6=t
ConditionBoundary10020 −°= CT
nodesInterior
442.22
889.20
375.34
073.59
24
23
22
21
°=
°=
°=
°=
CTCTCTCT
ConditionBoundary2525 −°= CT
ConditionBoundary10020 −°= CT0=i
1=i 2=i
sec6=t 2=j
( )( )( )
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 λ
1=j
Example 1: Explicit MethodNodal temperatures when (Example Calculations)
setting ,
Nodal temperatures when , :
sec9=t
ConditionBoundary10030 −°= CT
nodesInterior
872.22
266.27
132.39
953.65
34
33
32
31
°=
°=
°=
°=
CTCTCTCT
ConditionBoundary2535 −°= CT
2=jConditionBoundary1003
0 −°= CT0=i
1=i 2=i
sec9=t 3=j
( )( )( )
C
TTTTT
°=+=+=
+−+=+−+=
953.658795.6073.59
229.164239.0073.59100)073.59(2375.344239.0073.59
2 20
21
22
21
31 λ ( )
( )( )
C
TTTTT
°=+=+=
+−+=+−+=
132.397570.4375.34
222.114239.0375.34073.59)375.34(2899.204239.0375.34
2 21
22
23
22
32 λ
Example 1: Explicit MethodTo 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 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 Method
The second derivative on the left hand side of the equation is approximated by the CDD scheme at time level at node ( ) as
1+j
tT
xT
∂∂
=∂∂
2
2
α
( )2
11
111
1,2
2 2x
TTTxT j
ij
ij
i
ji ∆+−
≈∂∂ +
−++
+
+
i
The 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
tT
xT
∂∂
=∂∂
2
2
α
1+j i
tTT
tT j
ij
i
ji ∆−
≈∂∂ +
+
1
1,
The Implicit Method
Substituting these approximations into the heat conduction equation yields
tT
xT
∂∂
=∂∂
2
2
α
( ) tTT
xTTT j
ij
ij
ij
ij
i
∆−
=∆
+− ++−
+++
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 Method
( ) tTT
xTTT j
ij
ij
ij
ij
i
∆−
=∆
+− ++−
+++
1
2
11
111 2
α
ji
ji
ji
ji TTTT =−++− +
+++
−1
111
1 )21( λλλ
( )2xt
∆∆
= αλ
Example 2: Implicit MethodConsider 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 .
C°100C°25 m05.0
0=t 9=tmx 01.0=∆ st 3=∆
KmWk−
= 54 37800mkg
=ρ KkgJC−
= 490
C°20
0=i 1 2 3 4 5
m01.0
CT °= 25CT °=100
Example 2: Implicit MethodRecall,
therefore,
Then,
Ckρ
α =
490780054×
=α
sm /104129.1 25−×=
( )2xt
∆∆
= αλ
( )25
01.03104129.1 −×=
4239.0= .
Number of time steps,
Boundary Conditions
All internal nodes are at for This can be represented as,
ttt initialfinal
∆
−=
309 −
=
3=
.
.
3,2,1,0allfor25
100
5
0 =
°=
°=j
CTCT
j
j
C°20sec0=t .
1,2,3,4 allfor ,200 =°= iCTi
Example 2: Implicit MethodNodal 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.
sec0=t
CT °=10000
nodesInterior
20
20
20
20
04
03
02
01
°=
°=
°=
°=
CTCTCTCT
CT °= 2505
0=j
ji
ji
ji
ji TTTT =−++− +
+++
−1
111
1 )21( λλλ
Example 2: Implicit MethodNodal 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
sec3=tConditionBoundary1001
0 −°= CT0=i
1=i
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
=−
=−+−
=−×++×−
=−++−
TTTT
TTTTTT λλλ
2=i204239.08478.14239.0
)21(1
312
11
02
13
12
11
=−+−
=−++−
TTTTTTT λλλ
=
−−−
−−−
598.302020390.62
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
14
13
12
11
TTTT
0=j 4,3,2,1=i
Hence, the nodal temps at are
Example 2: Implicit Method
=
−−−
−−−
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
=
477.21438.21792.24451.39
14
13
12
11
TTTT
sec3=t
=
25477.21438.21792.24451.39
100
15
14
13
12
11
10
TTTTTT
Example 2: Implicit MethodNodal 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
sec6=tConditionBoundary1002
0 −°= CT0=i
1=i
2=i841.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
=−
=−+−
=−×++×−
=−++−
TTTT
TTTTTT λλλ
792.244239.08478.14239.0
)21(2
32
22
1
12
23
22
21
=−+−
=−++−
TTTTTTT λλλ
=
−−−
−−−
075.32438.21792.24841.81
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
24
23
22
21
TTTT
1=j 4,3,2,1=i
Hence, the nodal temps at are
Example 2: Implicit Method
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
sec6=t
=
−−−
−−−
075.32438.21792.24841.81
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
24
23
22
21
TTTT
=
836.22876.23669.30326.51
24
23
22
21
TTTT
=
25836.22876.23669.30326.51
100
25
24
23
22
21
20
TTTTTT
Example 2: Implicit MethodNodal 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
sec9=tConditionBoundary1003
0 −°= CT0=i
1=i
2=i716.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
=−
=−+−
=−×++×−
=−++−
TTTT
TTTTTT λλλ
669.304239.08478.14239.0
)21(3
33
23
1
22
33
32
31
=−+−
=−++−
TTTTTTT λλλ
=
−−−
−−−
434.33876.23669.30716.93
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
34
33
32
31
TTTT
2=j 4,3,2,1=i
Hence, the nodal temps at are
Example 2: Implicit Method
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
sec9=t
=
−−−
−−−
434.33876.23669.30716.93
8478.14239.0004239.08478.14239.0004239.08478.14239.0004239.08478.1
34
33
32
31
TTTT
=
243.24809.26292.36043.59
34
33
32
31
TTTT
=
25243.24809.26292.36043.59
100
35
34
33
32
31
30
TTTTTT
Example 2: Implicit MethodTo 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 MethodWHY:
Using the implicit method our approximation of was of
accuracy, while our approximation of was of accuracy.2
2
xT
∂∂ 2)( xO ∆
tT∂∂ )( tO ∆
The Crank-Nicolson Method
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 222 x
TTTx
TTTxT j
ij
ij
ij
ij
ij
i
ji
α
The Crank-Nicolson Method
The first derivative, on the right hand side of the heat equation, is approximated using the forward divided difference method at time level ,1+j
tTT
tT j
ij
i
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 descritizethe 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 Method
( ) ( ) tTT
xTTT
xTTT j
ij
ij
ij
ij
ij
ij
ij
i
∆−
=
∆+−
+∆
+− ++−
+++−+
1
2
11
111
211 22
2α
ji
ji
ji
ji
ji
ji TTTTTT 11
11
111 )1(2)1(2 +−
++
++− +−+=−++− λλλλλλ
( )2xt
∆∆
= αλ
Example 3: Crank-NicolsonConsider 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 .
C°100C°25 m05.0
0=t9=t mx 01.0=∆ st 3=∆
KmWk−
= 54 37800mkg
=ρ KkgJC−
= 490
C°20
0=i 1 2 3 4 5
m01.0
CT °= 25CT °=100
Example 3: Crank-NicolsonRecall,
therefore,
Then,
Ckρ
α =
490780054×
=α
sm /104129.1 25−×=
( )2xt
∆∆
= αλ
( )25
01.03104129.1 −×=
4239.0= .
Number of time steps,
Boundary Conditions
All internal nodes are at for This can be represented as,
ttt initialfinal
∆
−=
309 −
=
3=
.
.
3,2,1,0allfor25
100
5
0 =
°=
°=j
CTCT
j
j
C°20sec0=t .
1,2,3,4 allfor ,200 =°= iCTi
Example 3: Crank-NicolsonNodal 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.
sec0=t
CT °=10000
nodesInterior
20
20
20
20
04
03
02
01
°=
°=
°=
°=
CTCTCTCT
CT °= 2505
0=j
ji
ji
ji
ji
ji
ji TTTTTT 11
11
111 )1(2)1(2 +−
++
++− +−+=−++− λλλλλλ
Example 3: Crank-NicolsonNodal 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
sec3=tConditionBoundary1001
0 −°= CT0=i
1=i
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
=
−−−
−−−
718.52000.40000.4030.116
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
14
13
12
11
TTTT
0=j 4,3,2,1=i
Hence, the nodal temps at are
Example 3: Crank-Nicolson
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
sec3=t
=
−−−
−−−
718.52000.40000.4030.116
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
14
13
12
11
TTTT
=
607.21797.20746.23372.44
14
13
12
11
TTTT
=
25607.21797.20746.23372.44
100
15
14
13
12
11
10
TTTTTT
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-Nicolsonsec6=t
ConditionBoundary10020 −°= CT0=i
1=i
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 λλλλλλ
1=j 4,3,2,1=i
971.1454239.08478.2 22
21 =− TT
=
−−−
−−−
908.54187.43985.54971.145
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
24
23
22
21
TTTT
Hence, the nodal temps at are
Example 3: Crank-Nicolson
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
sec6=t
=
−−−
−−−
908.54187.43985.54971.145
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
24
23
22
21
TTTT
=
730.22174.23075.31883.55
24
23
22
21
TTTT
=
25730.22174.23075.31883.55
100
25
24
23
22
21
20
TTTTTT
Example 3: Crank-NicolsonNodal 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
sec9=tConditionBoundary1003
0 −°= CT0=i
1=i2=j 4,3,2,1=i
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
32
22
21
20
32
31
30
++=−+−
+−+=−++×−
+−+=−++−
TT
TTTTTTTT λλλλλλ
34.1624239.08478.2 32
31 =− TT
=
−−−
−−−
210.57509.49318.6934.162
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
34
33
32
31
TTTT
Hence, the nodal temps at are
Example 3: Crank-Nicolson
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
sec9=t
=
−−−
−−−
210.57509.49318.6934.162
8478.24239.0004239.08478.24239.0004239.08478.24239.0004239.08478.2
34
33
32
31
TTTT
=
042.24562.26613.37604.62
34
33
32
31
TTTT
=
25042.24562.26613.37604.62
100
35
34
33
32
31
30
TTTTTT
Example 3: Crank-NicolsonTo 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 Implicit Crank-Nicolson Analytical
34
33
32
31
TTTT
042.24562.26613.37604.62
243.24809.26292.36043.59
872.22266.27132.39953.65
Internal Temperatures at 9 sec.
The table below allows you to compare the results from all three methods discussed in juxtaposition with the analytical solution.
610.23844.25084.37510.62
THE END
top related