0% found this document useful (0 votes)
5 views58 pages

6 PDE Basics

Uploaded by

Mumtaza Harez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views58 pages

6 PDE Basics

Uploaded by

Mumtaza Harez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 58

Introduction to

Partial Differential
Equations

Analisis
Numerik

1 1
What is a Partial Differential
Equation
⚫ ? Equations have only one
Ordinary Differential
independent variable
dy
3 dx  5y 2  3ex , y(0) 
⚫ Partial Differential Equations have more than one
5
independent variable
 2u  2
32 2    y2
u
x y
x 2
subject to certain conditions: where u is the dependent variable, and
x and y are the independent variables.

2
Example of an Ordinary
Differential Equation

Spherical
Ball
Hot Water

hA  a   mC
dt
d Ball is a lumped
⚫ Assumption:
system.
⚫ Number of Independent variables:
One (t) 3
Example of an Partial
Differential Equation

Spherical
Ball
Hot Water

k  T
k   2 T   2 k   sin T    C , t  0, T (r, ,,0) 
r
2
T 2
r 2 r   r sin       r sin   T
2
t
r⚫ Assumption: Ball is not a lumped
2

system.
⚫ Number of Independent variables:
Four (r,θ,φ,t) 4
Classification of 2nd Order Linear
PDE’s
 2u  
A2 2  B  C2 D
u
x xy yu
2
0

where A, B, and C are

functions ofx and y,and D


is a function of
u u
x, y,u and , .
x y 5
Classification of 2nd Order Linear
PDE’s
 2u  
A2 2  B  D
u
x
2
u
2
C xy y 0
can be:
⚫ Elliptic
⚫ Parabolic
⚫ Hyperbol
ic
6
Classification of 2nd Order Linear
PDE’s:
Elliptic
 2u  
A2 2  B  C2 D
u
x xy yu
2
0
2
If B  4AC  0,then
equation is elliptic.

7
Classification of 2nd Order Linear
PDE’s:
Elliptic
 2u  
A2 2  B  D
u
x u
2

2
C xy y 0
Exampl  2T  2T

e: 0

where, A  2 B  0,C
x 1, y 2  1
B 2  4AC  0  4(1)(1)  4 
giving
0
therefore the equation is
elliptic.
8
Classification of 2nd Order Linear
PDE’s:
Parabolic
 2u  
A2 2  B  C2 D
u
x xy yu
2
0
2
If B  4AC  0 ,then
the equation is
parabolic.

9
Classification of 2nd Order Linear
PDE’s:
Parabolic
 2u  
A2 2  B  D
u
x u
2

2
C xy y 0
Exampl T  
k
e: 2t
T x 2

where, A  k, B  0,C  0
Bgiving
2
 4AC  0  4(0)(k) 
therefore the equation is
0
parabolic. 10
Classification of 2nd Order Linear
PDE’s:
Hyperbolic
 2u  
A2 2  B  C2 D
u
x xy yu
2
0
2
If B  4AC  0 ,then
the equation is
hyperbolic.

11
Classification of 2nd Order Linear
PDE’s:
Hyperbolic
 2u  
A2 2  B  D
u
x u
2
C xy
2
y 0
Exampl  2y 1  2
e: x2  c 2 t
y2
1
where, A  1, B  0,C  2
c
giving
2 1  4  0
B  4AC  0  4(1)( 2 ) 2
c
therefore the equation is c
12
Parabolic Partial
Differential
Equations

12/3/202 http://numericalmethods.eng.usf.e 1 1
4 du 3
Defining Parabolic

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

A
u u
2 2
u
2
D
B C 0
⚫ x 2
xy y 2
Recall the criteria for an equation of this type to be
2  4AC parabolic
considered 
B
⚫ 0
For example, examine the heat-conduction
equation
 2T given by
  , A   , B  0,C  0, D
T2
x t wher  1
The e
n 2  4 AC  0  4( )
B
(0)
 0us to classify this equation as
thus allowing
parabolic.
14
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.
T 2

 2 
T
x
t 15
Discretizing the Parabolic PDE
x
x x

i 1 i i 1
Schematic diagram showing interior
nodes
For a rod of length L divided into n 1 nodes x n
L
The time is similarly broken into time
steps of t
Hence Ti j corresponds to the temperature at node

x  ix
i ,that is,
and time t
16
The Explicit Method
x
x x

i 1 i i 1
L
If we define x  we can then write the finite central divided
difference
n
approximation of the left hand side at a general interior

node ( i ) as T
2
j
T i1  2T j  T j
i i1

x2 i, j
x
2
where ( j ) is the node number along
the time. 17
The Explicit Method
x
x x

i 1 i i 1

The time derivative on the right hand side is


approximated by the forward divided difference
method as,
 T ij1  T j
i
T  t
i, j
t
18
The Explicit Method
Substituting these approximations into the governing
equation yields
j
Ti1  2T j  T j T j 1
 T j
 x
i i1
 i
t
i

Solving for the temp at the time node j


t
1
T
gives j1
T j

(x)2
T j
i1  2T i j  Ti1j
i 

i
choosing,
t

 (x) 2

we can write the


equation as,

j1
j
 2T i  Ti1
j

 T
T  i1
j .
19
The Explicit
Method
T i j1
Ti   
T j
i1  2T
j
i
j
 Ti1
j


This equation 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 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 j  1 , and using these to find the
temperature at the next time node, j  2 .This process
continues until we reach the time at which we are interested
in finding the temperature.
20
Example 1: Explicit Method
Consider a steel rod that is subjected to a temperature of 100C
on the left end and 25C on the right end. If the rod is of
length0.05m ,use the explicit method to find the temperature
distribution in the rod from t  0 and t  9 seconds. Use x 
W J
t  C
Given: k  m . K ,   7800 kg
,
0.01m 3s
490 kg  K
m3
54
,
The initial temperature of the rod
is 20C .
i0 2 3 4 5

1 T  25
C
T 100  C 0.01m

21
Example 1: Explicit Method
Recall, Number of time
steps,
k t final  tinitial
  C  t

therefor 90
 3
e,
54 
  7800  490
3.
 1.4129 m /
2
Boundary
105 Conditions
s. T 0j 
 25C
100C  forall j 
 
Then, T 5j
  0,1,2,3
t
3 
All internal nodes are
x
 1.4129
2 5

10 0.01 2
at 20C for t  0sec. This
 can be represented as,
 0.4239.
T i0  20C, for all i 
1,2,3,4
22
Example 1: Explicit Method
Nodal temperatures when t  0sec , j
0: T00 100C
T1 0 
0

T2 
20C C
 Interior nodes
20
0
T3  C 
T40  C 
20
20
T0 
5
25C
We can now calculate the temperature at each node
explicitly using the equation formulated earlier,

T j1


  T  2T i j  Ti1j
j
i1

T ji  23
i
Example 1: Explicit Method
Nodal temperatures when t  3sec (Example

iCalculations)
T0  100C  Boundary Condition
1

0 setti j
i Tng1  T
1
1
0
 020T  2T1 0  T00 i  T21  T2 0  30T  2T20  T10
1   20  0.423920  2(20)   20  0.423920  2(20) 
2 
100 20
 20  0.423980  20  0.42390
 20  33.912  20  0
 53.912C  20C
Nodal temperatures when t  3sec ,
T01  100C Boundary Condition
j  1:
T1 1  53.912C

T21   Interior nodes

20C
T3 
1

20C
1
T4  
C
T22.120
5
1
 25C Boundary Condition

24
Example 1: Explicit Method
Nodal temperatures when t  6sec (Example

iCalculations)
T0 100C  Boundary Condition
2

0 setting j 
i T12  T11  T21  2T 11  T01 T  T21  T 31  2T 21 T11
i2
1  1 , 53.912  0.423920  2(53.912)  2

  20  0.4239 20  2(20) 
100 53.912
2

 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  6sec ,
T02 100C Boundary Condition
j  2:
T1 2  59.073C
2

T2  C
 Interior nodes
34.375
2
T3  C
20.889
T42  C 
T22.442
2
 25C Boundary Condition
5

25
Example 1: Explicit Method
Nodal temperatures when t  9sec (Example

iCalculations)
T0 100C  Boundary Condition
3

0 setting
i j2 , i
T113  T1 2  T22  2T12  T02 2T2
3

 T22   T32  2T 22  T12
  59.073  0.423934.375  2(59.073)   34.375  0.423920.899  2(34.375) 
100 59.073
 59.073  0.423916.229  34.375  0.423911.222
 65.953C
59.073  6.8795  39.132C
34.375  4.7570
Nodal temperatures
t  9sec, j  3 :
when 3
T0  100C BoundaryCondition
T1 3  65.953C
3

T2  C
 Interior nodes
39.132
3
T3  C
27.266
T43  C 
T22.872
5
3
 25C Boundary
Condition
26
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.

27
The Implicit Method
WHY:

•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.
28
The Implicit Method
 2
T T
 
 x 2
The second derivative on the left hand side of the
equation is approximated by the C D D scheme at
time level j  1 at node
(i ) t
as  T
2
j1
T i1  2T j1
T j1
i i1
x 2  x
i, j1
2

29
The Implicit Method
 2
T T
 
 x 2
The first derivative on the right hand side of the
equation is approximated by the B D D scheme at
a
time level j 1 at node ( i )
s t
T T i j1  T j
i
t  t
i, j1

30
The Implicit Method
 2 T2 T
 x  t

Substituting these approximations into the heat


conduction equation yields

j 1 j 1
T i1  2T j1
T Ti j 1  T ij
 x
i i1
 t
2

31
The Implicit Method
From the previous
slide,
j 1 j 1 j 1
Ti1  2T i
T i1
T ij 1  T ij
 x  t
2
Rearranging
yields
 T i1j1  (1 i
j1
 T i1j1  i
j

given
2)T T
that,
t

 x
The rearranged equation
2 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.
32
Example 2: Implicit Method
Consider a steel rod that is subjected to a temperature of 100C
on the left end and 25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 
W J
t  C
Given: k  m . K ,   7800 kg
,
0.01m 3s
490 kg  K
m3
54
,
The initial temperature of the rod
is 20C .
i0 2 3 4 5

1 T  25
C
T 100  C 0.01m

33
Example 2: Implicit Method
Recall, Number of time
steps,
k t final  tinitial
  C  t

therefor 90
 3
e,
54 
  7800  490
3.
 1.4129 m /
2
Boundary
105 Conditions
s. T 0j 
 25C
100C  forall j 
 
Then, T 5j
  0,1,2,3
t
3 
All internal nodes are
x
 1.4129
2 5

10 0.01 2
at 20C for t  0sec. This
 can be represented as,
 0.4239.
T i0  20C, for all i 
1,2,3,4
34
Example 2: Implicit Method
Nodal temperatures when t  0sec , j
0: T00 100C
T1 0 
0

T2 
20C C
 Interior nodes
20
0
T3  C 
T40  C 
20
20
T0 
5
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 j1
i1  (1 )Ti j1
 T j1
i1  i
j

2 T
35
Example 2: Implicit Method
Nodal temperatures when t  3sec , (Example
i T 1
 100C
Calculations)
0  Boundary Condition
0 the interior nodes setting j  0 and i 1, 2,3, 4 gives the
For
ifollowing,
  T 1  (1 )T 1  T 1  0
0 1 2 1
1 2
(0.4239 T  (1 2  0.4239)T 1  (0.4239T 1 ) 
100)
20
1
2
 42.39 1.8478T 1  0.4239T 1  20
1 2

1 1  0.4239T
1.8478T  62.390
1 1
1 1 2 0
i2  T 1  (1 2)T 2  T 3  2
 0.4239T 11 1.8478T 21  0.4239T 31 
T
20
For the first time step we can write four such
equations with four unknowns, expressing them in
matrix
 1.8478 form yields
 0.4239 0
0 T 11  62.390
  0.4239 1.8478  0.4239  1 
 20 
 0 
T2 
 0  1.8478   20 
 0.4239 
3  
 1.8478   T41 30.598
 3
 
Example 2: Implicit Method
 1.8478  0.4239 0
0 T 11  62.390
  0.4239 1.8478  0.4239  1 
 20 
 0 
T2 
 0  1.8478   20 
 0.4239 3  
 1.8478  T41 30.598
  
0
The 0above coefficient matrix
0.4239  is tri-diagonal. Special
algorithms such as Thomas’ algorithm can be used
T 1  linear equation with tri-
to solve simultaneous
diagonal coefficient matrices.The solution is given
 0.4239
by T 1   
T 11  39.451  0
100 
 Hence, the  T1  
1 39.451
 24.792 
 T 21  nodal temps at t 
 T 21  24.792
T 3  21.438
1 3sec are 1 
   T
 3  21.438
T41  21.477
T 1  21.477
4
  25 
T51   
3
Example 2: Implicit Method
Nodal temperatures when t  6sec , (Example
i T 2
100C
Calculations)
0  Boundary Condition
0 the interior nodes setting j  1 and i 1, 2,3, 4 gives
For
ithe
 following,
 T 2  (1 )T 2  T 2  1
0 1 2 1
1 2
(0.4239 T  (1 2  0.4239)T 2  0.4239T 2 
100)
39.451
1
2
 42.39 1.8478T 2  0.4239T 2  39.451
1 2
1.8478T2 1  0.4239T  81.841
2 2
i  T 1  (1 2)T2  T 32  221
2

2 T
 0.4239T 12 1.8478T 22  0.4239T 32 
For the 24.792
second time step we can write four such
equations with four unknowns, expressing them in
matrix
 1.8478 form yields
 0.4239 0 0 12  
  0.4239 1.8478  T  24.792 
81.841   
 T 2
  22   

 0   0.4239 0  T3 21.438
 0.4239   2   
 1.8478  0.4239  T 4  32.075 3
Example 2: Implicit Method
 1.8478  0.4239 0 0 12 
 T 81.841
  0.4239 1.8478   2   24.792 
  T2  
 0  0.4239
 0  T 2   


3 21.438
0.4239 1.8478  0.4239 T 2  
   4  32.075
0  0.4239 1.8478
The 0above 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 T 02   
T 12  51.326  
100 
 30.669  Hence, the nodal  T1  
2 51.326 
T2 
2

 temps at t  6sec  T2 
2
 T3  
 2   30.669
2
are
  23.876
T42  22.836  T3   
 T 2  23.876
 4  22.836
T52   25 
3
Example 2: Implicit Method
Nodal temperatures when t  9sec , (Example
i T 3
100C
Calculations)
0  Boundary Condition
0 the interior nodes setting j  2 andi 1, 2,3, 4 gives the
For

ifollowing,
 T 03  (1 )T13  T 23  12
1 2
(0.4239 T  (1 2  0.4239)T 3  (0.4239T 3 ) 
100)
51.326
1
2
 42.39 1.8478T 3  0.4239T 3  51.326
1 2

i 1.8478T 3
 0.4239T 3
3  93.716
 T 1  (1
3
1 2)T2  T 3  2 2
3 2

2 T
 0.4239T 13 1.8478T 23  0.4239T 33 
30.669
For the third time step we can write four such
equations with four unknowns, expressing them in
 1.8478form
matrix yields
 0.4239 0 3
0  T 1  93.716
  0.4239 1.8478  0.4239  3 
 30.669 
 0  T 2   
 0  1.8478 
 0.4239 3  
 1.8478  T 43 
33.434 4
Example 2: Implicit Method
 1.8478  0.4239 0 0  13
  0.4239  T  93.716
1.8478  0.4239 0  3  30.669 
 
T2 
 0  1.8478 
 0.4239 
3  
 1.8478   T43  33.434

  
0
The0 above coefficient matrix
0.4239  is tri-diagonal. Special
algorithms such as Thomas’ algorithm can be used
T 3  linear equation with tri-
to solve simultaneous
diagonal coefficient matrices.The solution is given
by T 3   
23.876 100 0 
  59.043
T13 Hence, the nodal  13 
T   59.043 
3
36.292  0.4239
temps at t  9sec
T
 2 3   T 23  36.292
3
are
T3
 3  26.809  T3   26.809 
 T4  24.243
T 4  24.243
3

T53   25 
41
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.

42
The Crank-Nicolson Method
WHY
:
2 T O(x)2
Using the implicit method our was
x2
approximation of T of
accuracy, while our approximation
t of was of
O(t) accuracy.

43
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 T    T j
i1
 2Ti
j
 Ti1
T j1
i1
 2T j 1
i
 T j 1
i1

jx2   x    x  
i, j 2 
2 2

44
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 j1,

 Ti j1
T j
i
T  t
i, j
t

45
The Crank-Nicolson Method
• Substituting these approximations into the
governing equation for heat conductance yields

 Ti1j  2T ji  T i1
j j 1
T i1  2T j i1  T j i1
1 
Ti j 1  T ij
2
 x  x 
 t
2 2
givin
g
 T i1j1  2(1 i
j1
 T i1j1  Ti1j  2(1 )T i j  Ti1j
)T 
where
t

 x
2
• 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.

46
Example 3: Crank-Nicolson
Consider a steel rod that is subjected to a temperature of 100C
on the left end and 25C on the right end. If the rod is of
length0.05m ,use the Crank- Nicolson method to find the
temperature distribution in the rod from t
0 to W J t
kg C
Given: k 
9 seconds. mUse ,   7800
 K x 0.01m , t490
 3s. kg  K
m3
54
,
The initial temperature of the rod
is 20C .
i0 2 3 4 5

1 T  25
C
T 100  C 0.01m

47
Example 3: Crank-Nicolson
Recall, Number of time
steps,
k t final  tinitial
  C  t

therefor 90
 3
e,
54 
  7800  490
3.
 1.4129 m /
2
Boundary
105 Conditions
s. T 0j 
 25C
100C  forall j 
 
Then, T 5j
  0,1,2,3
t
3 
All internal nodes are
x
 1.4129
2 5

10 0.01 2
at 20C for t  0sec. This
 can be represented as,
 0.4239.
T i0  20C, for all i 
1,2,3,4
48
Example 3: Crank-Nicolson
Nodal temperatures when t  0sec , j
0: T00 100C
T1 0 
0

T2 
20C C
 Interior nodes
20
0
T3  C 
T40  C 
20
20
T0 
5
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 i1j1  2(1 i
j1
 T i1j1  j
i1  2(1 )T i j  Ti1j
)T T 

49
Example 3: Crank-Nicolson
Nodal temperatures when t  3sec , (Example

iCalculations)
T01  100C  Boundary Condition
0
For the interior nodes setting j  0 and i 1, 2,3, 4 gives the

following
 T 01  2(1 )T11  T 21  T00  2(1 )T 10  20

i(0.4239
T 1 100)  2(1 0.4239)T 1  0.4239T 1  (0.4239)100  2(1 0.4239)20 
1 2
(0.4239)20
 42.39  2.8478T 1  0.4239T 1  42.39  23.044  8.478
1 2

2.8478T 1  0.4239T 1  116.30


1 2

For the first time step we can write four such


equations with four unknowns, expressing them in
 2.8478form
matrix yields
 0.4239 0
0 T 11  116.30
  0.4239 2.8478  0.4239  1 
 40.000 
 0  T 2   
 0  2.8478 
 0.4239 3
 T41 
 
 2.8478 5
52.718
Example 3: Crank-Nicolson
 2.8478  0.4239 0 0 T 11  116.30
  0.4239 2.8478  0.4239  1 
 40.000 
 0 T
 2   

 0  2.8478
 0.4239  
3
1  
 2.847  T 
  4  52.718
0  8
The 0above coefficient matrix
0.4239  is tri-diagonal. Special
algorithms such as Thomas’ algorithm can be used
to solve simultaneous T 1  linear equation with tri-
diagonal coefficient matrices.The solution is given
by T 1   
 T11 40.000  0
100 44.372 
 1   44.372  Hence, the nodal  T1  
1

T2  at t  3sec
23.746 temps T 1  23.746
  are  21    
T 31  20.797  0.4239 T
 3  20.797 
1  
 T4   21.607  T 1  21.607
4
  25 
T5  
1

5
Example 3: Crank-Nicolson
Nodal temperatures when t  6sec , (Example

iCalculations)
T02 100C  Boundary Condition
0
 the interior nodes setting j  1 and i 1, 2,3, 4 gives the
iFor
1following,
 T 02  2(1 )T12  T 22  T01  2(1 )T11  21
T
(0.4239 100)  2(1 0.4239)T1 2  0.4239T2 2
 (0.4239)100  2(1 0.4239)44.372  (0.4239)23.746
 42.39  2.8478T 2  0.4239T 2  42.39  51.125 10.066
1 2

2.8478T 2  0.4239T 2  145.971


1 2

For the second time step we can write four such


equations with four unknowns, expressing them in
matrix
 2.8478form yields
 0.4239 0 0 12  145.971
  0.4239  T 
 

2.8478   2  54.985
   T2 


 0   0.4239 0  T 2  
3  43.187 
 0.4239 2.8478  0.4239  T  
2 
   4  54.908
5
Example 3: Crank-Nicolson
 2.8478  0.4239 0 0 12
  0.4239  T  145.971
2.8478   2  54.985 
 T2 
 0  0.4239
 0  T 2   

3  43.187 
0.4239 2.8478  0.4239 T 2  
   4   54.908 
0  0.4239 2.8478
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 
2
T 0  
2
T 12  55.883 Hence, the nodal 100   
 31.075  
temps at t  6sec T 55.883
 T 22  31.075
2
 T 2   
2 12

are
T3  T3   23.174 
 2  23.174
 T4  22.730 T 2  22.730
   4
  25 
T52   

5
Example 3: Crank-Nicolson
Nodal temperatures when t  9sec , (Example
i T 3
100C
Calculations)
0  Boundary Condition
For
0 the interior nodes setting j  2 and i 1, 2,3, 4 gives the
following,
i T13  2(1 )T 3  T 3  T02  2(1 )T 12  2
0 1 2 2
T
(0.4239 100)  2(1 0.4239)T2 3  0.4239T23
 (0.4239)100  2(1 0.4239)55.883  (0.4239)31.075
 42.39  2.8478T 3  0.4239T 3  42.39  64.388 13.173
1 2

2.8478T 3  0.4239 T 3  162.34


1 2

For the third time step we can write four such


equations with four unknowns, expressing them in
matrix
 2.8478form yields
 0.4239 0 0  13  162.34
  0.4239 2.8478  0.4239  T 
 

0  3  69.318
 T
 2   

 0  2.8478
 0.4239 3  
 2.8478  T43  5
57.210
Example 3: Crank-Nicolson
 2.8478  0.4239 0 3

  0.4239
0    162.34
T1
2.8478  0.4239  3  69.318 
 0 
T2 
 0  2.8478 
 0.4239  
3
3  
 2.8478   T4  57.210
0 
The 0 0.4239
above coefficient 
matrix is tri-diagonal. Special
algorithms such as Thomas’
3
algorithm can be used
T linear equation with tri-
to solve simultaneous
diagonal coefficient matrices.The solution is given
by  100
49.509 
T 03 
   62.604 
T13  62.604 Hence, the nodal
3   temps
 0.4239
at t  9sec
 T13   
T 37.613  T   37.613 
3
 
 T33     23    
2
are
T
 3  26.562
  26.562 
T43   24.042 T 3  24.042
4
  25 
T53   
55
Example 3: Crank-
Nicolson
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.

56
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.
Crank-
Node Explicit Implicit Analytic
Nicolso
al
n
T3
1 65.953 59.043 62.604 62.510
3
T
2 39.132 36.292 37.613 37.084
3
T
3
3
27.266 26.809 26.562 25.844
T
4 22.872 24.243 24.042 23.610

57
Ada
Pertanyaan?

58

You might also like