Está en la página 1de 44

Parabolic PDE’s

 The general form for a second order linear PDE with two independent
variables and one dependent variable is

 2u  2u  2u
A 2 B C 2  D 0
x xy y
 Recall the criteria for an equation of this type to be considered parabolic
B 2  4 AC  0
 For example, examine the heat-conduction equation given by

 2T T
 2  , where A   , B  0, C  0, D  1
Then x t
B 2  4 AC  0  4( )(0)
0
thus allowing us to classify this equation as parabolic.
Parabolic PDEs
 Examples of Parabolic PDEs

 Boundary layer Eqs


 Parabolized N-S (PNS)Eqs
 Unsteady heat conduction Eq.

• In this chapter the most commonly used CFD


techniques for solving Parabolic PDEs will be
discussed.
FD Formulations

 1st Study model: 2nd order unsteady heat


conduction PDE
u u 2
 2 (3.1)
t x
 Where α=Constant
Time and Diffusion Derivatives

 1st order forward FD can be used for u


t
u uin1  uin
  O  t  (3.2)
t t
 2u
o 2nd order CD can be used for
x 2

 2u uin1  2uin  uin1


  O  x 
2

x  x  (3.3)
2 2
Cont.
 Using Eqs. 3.2 and 3.3 into Eq. 3.1 leads to

uin 1  uin uin1  2uin  uin1


  O  x 
2

t  x 
2

t
u n 1
u 
n
u
n
 2u  u
n n
 (3.4)
 x 
i i 2 i 1 i i 1

Uin+1: Only unknown (EXPLICIT Formulation)


Cont.
Explicit formulation BC

 The BC lag behind computation by one


step
Explicit Method

 FTCS Method (Eq. 3.4)

t
un 1
u 
n
u
n
 2u  u
n n
  O(t ,  x  )
2
(3.8)
 x 
i i 2 i 1 i i 1

 t 1
Solution is stable for 
 x 
2
2
Explicit Method: Richardson method

uin 1  uin 1 uin1  2uin  uin1


 O  t     O  x 
2 2

2t  x 
2

 This method is unconditionally unstable and


therefore, has no practical value
Explicit Method: DuFort-Frankel
method
 CD for Time derivative of 2nd order
 2nd order CD for diffusion term (space
derivative)
 Due to stability consideration, uni in the
diffusion term is replaced by the average
value of un+1i and un-1i
uin 1  uin 1
n
u 2  uin1
uin 1  uin 1 i 1
 O  t    2    (3.9)

2 2
O x
2t  x 
2
Explicit Method: DuFort-Frankel
method
 From which,
t
2  i 1 i 1  (3.10)
n 1 n 1 n 1 n 1
u u  u n
 u  u  u n

 x 
i i i i

This Eq. can be solved explicitly for the


unknown un+1i, thus
 2t  n 1  2t  n 1 2t n
1   u   1   u   u  ui 1 
n

  x     x    x 
2 i 2 i 2 i 1

(3.11)
Explicit Method: DuFort-Frankel
method
 This method is of order [(∆t)2, (∆x)2,
(∆t/∆x)2]
Explicit Method: DuFort-Frankel
method
 Eq. 3.11 is a modification of the Richardson
method
 The value of ui at time level n and n-1 are
required to start the computational
 If the value of ui at time level n-1 is only
known, DuFort-Frankel method can be used
to obtain the ui at time level n.
 Since the solution at the unknown station
requires data from two previous stations,
computer storage requirement will increases.
Example 1: Explicit Method
Consider a steel rod that is subjected to a temperature of100C on the left
end and25C 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.

W kg J
Given:k  54 ,   7800 3 , C  490
mK m kg  K

The initial temperature of the rod is 20C .

i 0 1 2 3 4 5

T 100  C T  25 C

0.01m
Example 1: Explicit Method
Recall, Number of time steps,
k t final  t initial
 
C t
90
therefore, 
3
54
  3.
7800  490
 1.4129  10 5 m 2 / s. Boundary Conditions
T0n  100C 
Then,  for all n  0,1,2 ,3
 
t T5  25C 
n

x 2
 1.4129  10 5
3 All internal nodes are at 20C
0.01 2
for t  0 sec . This can be
 0.4239. represented as,
Ti 0  20C , for all i  1,2,3,4
Example 1: Explicit Method
Nodal temperatures when t  0 sec , n  0 :

T00  100C
T10  20C 

T20  20C 
 Interior nodes
T30  20C 
T40  20C 
T50  25C

We can now calculate the temperature at each node explicitly using


the equation formulated earlier,

Ti n 1
 Ti   T  2Ti  T
n n
i 1
n n
i 1 
Example 1: Explicit Method
Nodal temperatures when t  3 sec (Example Calculations)
i 0 T01  100C  Boundary Condition
setting n  0
i 1 
T11  T10   T20  2T10  T00  i2 
T21  T20   T30  2T20  T10 
 20  0.423920  2(20)  100  20  0.423920  2(20)  20 
 20  0.423980  20  0.42390
 20  33.912  20  0
 53.912C  20C
Nodal temperatures when t  3 sec , n  1 :
T01  100C  Boundary Condition
T11  53.912C 

T21  20C 
 Interior nodes
T3  20C
1

T41  22.120C 
T51  25C  Boundary Condition
Example 1: Explicit Method
Nodal temperatures when t  6 sec (Example Calculations)
i 0 T02  100C  Boundary Condition
setting n  1 ,
i 1 
T12  T11   T21  2T11  T01  i  2 T22  T21   T31  2T21  T11 
 53.912  0.423920  2(53.912)  100  20  0.423920  2(20)  53.912
 53.912  0.423912.176  20  0.423933.912
 53.912  5.1614  20  14.375
 59.073C  34.375C

Nodal temperatures when t  6 sec , n  2 :


T02  100C  Boundary Condition
T12  59.073C 

T22  34.375C 
 Interior nodes
T3  20.889C 
2

T42  22.442C 
T52  25C  Boundary Condition
Example 1: Explicit Method
Nodal temperatures when t  9 sec (Example Calculations)
i 0 T03  100C  Boundary Condition
setting n  2 ,
i 1 i2

T13  T12   T22  2T12  T02  
T23  T22   T32  2T22  T12 
 59.073  0.423934.375  2(59.073)  100  34.375  0.423920.899  2(34.375)  59.073
 59.073  0.423916.229  34.375  0.423911.222
 59.073  6.8795  34.375  4.7570
 65.953C  39.132C
Nodal temperatures when t  9 sec, n  3 :
T03  100C  Boundary Condition
T13  65.953C 

T23  39.132C 
 Interior nodes
T3  27.266C 
3

T43  22.872C 
T53  25C  Boundary Condition
Example 1: Explicit Method
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.
Programing Assignment Report

The Report should contain the following:


 Introduction
 Problem specification
 Governing Equation
 Finite difference equations
 Initial and Boundary Conditions
 Results (Tables, Figures,…)
 Discussion
 Conclusion
 Appendices (computer program,…)
Implicit Formulation
 1st order forward FD can be used for
 u
n 1 t
u ui  uin
  O  t 
t t
o 2nd  2
order CD can be used for u at time level
n+1 x 2

 2u uin11  2uin 1  uin11


  O  x 
2

x  x 
2 2
Implicit Formulation (Cont)

 Unknowns: un+1i-1, un+1i and un+1i+1


Implicit Formulation (Cont)

 Using previous Eqs. 3.3 into Eq. 3.1


leads to
uin 1  uin uin11  2uin 1  uin11
  O  x 
2

t  x  (3.5)
2

Rearrange Eq. 3.5


t n 1
 t  n 1 t n 1
u  1  2 2 i
u  u  u n

 x   x    x 
i 1 2 i 1
2

i
(3.6)
Implicit Formulation (Cont)

 Eq. 3.6 can be rewritten as


n n 1 n n 1 n n 1
au i i 1 b u i i c u i i 1 D i
n
(3.7)
Where
t    t  t
ai 
n
, bi   1  2
n
2
, ci 
n

 x   x    x 
2 2


and Dni=-uni
Implicit Formulation (Cont)
i  2 : a2u1  b2u2  c2u3  D2
i  3: a3u2  b3u3  c2u4  D3
i.  4 : a4u3  b4u4  c3u5  D4
.
i  IM 2 : aIM 2u IM 3  bIM 2u IM 2  cIM 2u IM 1  DIM 2
i  IM 1: aIM 1u IM 2  bIM 1u IM 1  cIM 1u IM  DIM 1
Implicit Formulation (Cont)

 All knows parameter (i=1(lower BC) and


i=IM (upper BC) are boundary conditions
) will be transferred to the RHS of the
previous system of Eqs. (1st and last Eqs
only will be modified )
i  2 : b2u2  c2u3  D2  a2u1
i  IM 1: aIM 1uIM 2  bIM 1uIM 1  DIM 1  cIM 1uIM
Implicit Formulation (Cont

 Now the System of Eqs can be written in


matrix form as
 b2 c2   u2   D2  a2u1 
a b3 c3    
 3  u3   D 3 
 a4 b4 c4   u4   D4 
    
   
    
    
    
 aIM 2 bIM 2 cIM 2  uIM 2   DIM 2 
    
 aIM 1 bIM 1   uIM 1   DIM 1  cIM 1uIM 1 
Implicit Formulation (Cont)
 As showing in matrix applying the BC does not
change the tridiagonal form of the coefficient
matrix
 Solving the matrix for the unknowns u2,u3,
…,uIM2, Uim1 is explained in appendix B.
 In Matlab tridiagonal matrix can be solved
easily
 Fortran: Subroutine to solve tridiagonal matrix
will given during 1st application
 For next time step n+2 the same procedure
can be used.
Implicit Methods: Laasonen Method

 Eq. 3.5 uin 1  uin uin11  2uin 1  uin11


  O  x 
2

t  x 
2

 Lassonen method is simple formulation


of Eq. 3.5 solution procedure is
described from S10 to S15.
 Grid shown in Fig. 3-3 (S 8)
Implicit Methods: Crank-Nicolson
Method
 Diffusion term in Eq. 3.1 is replaced by
the average of the CD at time level n and
n+1 and 2nd order CD of step ∆t/2 for
time
 Using Explicit form of Eq. 3.1 from time
level n and n+1/2
uin 1/ 2  uin uin1  2uin  uin1 (3.14)

t  x 
2

2
Implicit Methods: Crank-Nicolson
Method
 Using implicit form of Eq. 3.1 from time level n+1/2 and
n+1
1
n
uin1  ui 2
uin11  2uin1  uin11
 (3.15)
t  x 
2

2
 Add Eq.3.14 to 3.15 leads to

uin 1  uin 1  uin11  2uin 1  uin11 uin1  2uin  uin1 


     O  ( t ) 2
, ( x ) 2

t  x   x 
2 2
2  
(3.16)
Implicit Methods: Crank-Nicolson
Method

 This implicit method is unconditionally


stable
Example 2: Implicit Method
Consider a steel rod that is subjected to a temperature of100C on the left
end and25C on the right end. If the rod is of length0.05m ,use the implicit
method to find the temperature distribution in the rod from t  0 and t  9
seconds. Usex  0.01m , t  3s .

W kg J
Given:k  54 ,   7800 3 , C  490
mK m kg  K

The initial temperature of the rod is 20C .

i 0 1 2 3 4 5

T 100  C T  25 C

0.01m
Example 2: Implicit Method
Recall, Number of time steps,
k t final  t initial
 
C t
90
therefore, 
3
54
  3.
7800  490
 1.4129  10 5 m 2 / s. Boundary Conditions
T0n  100C 
Then,
t  for all n  0,1,2 ,3
  T5  25C 
n

x 2
 1.4129  10 5
3 All internal nodes are at 20C
0.01 2
for t  0 sec . This can be
 0.4239. represented as,
Ti 0  20C , for all i  1,2,3,4
Example 2: Implicit Method
Nodal temperatures when t  0 sec , n  0 :

T00  100C
T10  20C 

T20  20C 
 Interior nodes
T30  20C 
T40  20C 
T50  25C

We can now form our system of equations for the first time step by
writing the approximated heat conduction equation for each node.

 T n 1
i 1  ( 1  2 )Ti n 1
 T n 1
i 1  Ti n
Example 2: Implicit Method
Nodal temperatures when t  3 sec , (Example Calculations)
i 0 T  100C  Boundary Condition
0
1

For the interior nodes setting n  0 and i 1, 2, 3, 4 gives the following,
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

i2  T11  (1  2 )T21  T31  T20


 0.4239T11  1.8478T21  0.4239T31  20
For the first time step we can write four such equations with four
unknowns, expressing them in matrix form yields
 1.8478  0.4239 0 0  T11  62.390
 0.4239 1.8478  0.4239 0   1   20 
  T2    
 0  0.4239 1.8478  0.4239 T3   20 
1

  1   
 0 0  0.4239 1.8478 T 
 4   30.598 
Example 2: Implicit Method
 1.8478  0.4239 0 0  T11  62.390
 0.4239 1.8478  0.4239 0   1   20 
  T2    
 0  0.4239 1.8478  0.4239 T3   20 
1

  1   
 0 0  0.4239 1.8478   4  
T 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
T01   100 
T11   39.451  1  
 1   Hence, the nodal T
 1  39 . 451 
T
  24 .792 
2
temps at t  3 sec are T2   24.792
1
T3   21.438
1
 1   
 1   T3   21 . 438
T4  21.477  
T 1  21.477 
 41   
T5   25 
Example 2: Implicit Method
Nodal temperatures when t  6 sec , (Example Calculations)
i 0 T  100C  Boundary Condition
0
2

For the interior nodes setting j  1 andi 1, 2, 3, 4 gives the following,
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
i2  T12  (1  2 )T22  T32  T21
 0.4239T12  1.8478T22  0.4239T32  24.792
For the second time step we can write four such equations with four
unknowns, expressing them in matrix form yields
 1.8478  0.4239 0 0  T12   81.841
 0.4239 1.8478  0.4239 0   2  24.792
  T2    
 0  0.4239 1.8478  0.4239 T32  21.438
  2   
 0 0  0.4239 1.8478  T4   32.075 
Example 2: Implicit Method
 1.8478  0.4239 0 0  T12  81.841
 0.4239 1.8478  0.4239  
0  T22  24.792
   
 0  0.4239 1.8478  0.4239 T3  21.438
2

  2   
 0 0  0.4239 1.8478  4  
T 32.075
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
T02   100 
T12  51.326  2  
 2   Hence, the nodal T
 1   51. 326 
T
 2  30.669  temps at t  6 sec are T2  30.669
2
T3  23.876
2
 2  
 2   
T4  22.836 T3   23 .876 
T 2  22.836
 42   
T5   25 
Example 2: Implicit Method
Nodal temperatures when t  9 sec , (Example Calculations)
i 0 T  100C  Boundary Condition
0
3

For the interior nodes setting n  2 andi 1, 2, 3, 4 gives the following,
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
i2  T13  (1  2 )T23  T33  T22
 0.4239T13  1.8478T23  0.4239T33  30.669
For the third time step we can write four such equations with four
unknowns, expressing them in matrix form yields
 1.8478  0.4239 0 0  T13  93.716
 0.4239 1.8478  0.4239 0   3  30.669
  T2    
 0  0.4239 1.8478  0.4239 T3  23.876
3

  3   
 0 0  0.4239 1.8478   4  
T 33.434 
Example 2: Implicit Method
 1.8478  0.4239 0 0  T13  93.716
 0.4239 1.8478  0.4239 0   3  30.669
  T2    
 0  0.4239 1.8478  0.4239 T3  23.876
3

  3   
 0 0  0.4239 1.8478 T 
 4   33.434 

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
T03   100 
T13  59.043 Hence, the nodal
 3  
 3  T
   59 . 043 
 1
T
 2 36. 292  temps at t  9 sec are T2  36.292 
3

T3  26.809
3  3   
 3   T3   26 . 809 
T4   24 .243  T 3   24.243
 43   
T5   25 
Example 2: Implicit Method
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.
Programing Assignment 4
Consider a steel rod that is subjected to a temperature of TL on the left end
and TR on the right end. If the rod is of length L , find the temperature
distribution in the rod from t  0 to t  tn seconds.

W J
Given: k  54 ,   7800 kg3 , C  490
mK m kg  K
Take x  x m t  t s and the initial temperature of the rod is T0 C .

Using:
i) Explicit Method
ii) Implicit method

i 0 i  n 1

T  TL  C T  TR C

x m

También podría gustarte