Lecture notes 15 - Math for business | Trường Đại học Quốc tế, Đại học Quốc gia Thành phố HCM

Lecture notes 15 - Math for business | Trường Đại học Quốc tế, Đại học Quốc gia Thành phố HCM được sưu tầm và soạn thảo dưới dạng file PDF để gửi tới các bạn sinh viên cùng tham khảo, ôn tập đầy đủ kiến thức, chuẩn bị cho các buổi học thật tốt. Mời bạn đọc đón xem!

12/16/2021
1
12/16/2021
Elliptic PDE - Introduction
Son Dao, PhD (C) 1
Defining Elliptic 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 elliptic
For example, examine the Laplace equation given by
then
thus allowing us to classify this equation as elliptic.
0
2
22
2
2
D
y
u
C
yx
u
B
x
u
A
04
2
ACB
0
2
2
2
2
y
T
x
T
, where , ,
1
A
0
B
1
C
04
)1)(1(404
2
ACB
y
x
,
u
Son Dao, PhD (C) 2
1
2
12/16/2021
2
Physical Example of an Elliptic PDE
b
T
l
T
t
T
r
T
L
W
x
y
Schematic diagram of a plate with specified temperature boundary
conditions
The Laplace equation governs the temperature:
0
2
2
2
2
y
T
x
T
Son Dao, PhD (C) 3
Discretizing the Elliptic PDE
t
T
r
T
x
),( ji ),1( ji
)1,(
ji
),1( ji
)1,(
ji
)0,0(
)0,(m
),0( n
b
T
l
T
),( ji
x
y
x
y
m
L
x
n
W
y
22
2
),(),(2),(
),(
x
yxxTyxTyxxT
yx
x
T
22
2
),(),(2),(
),(
y
yyxTyxTyyxT
yx
y
T
Son Dao, PhD (C) 4
3
4
12/16/2021
3
Discretizing the Elliptic PDE
t
T
r
T
x
),( ji ),1( ji
)1,(
ji
),1( ji
)1,(
ji
)0,0(
)0,(m
),0( n
b
T
l
T
),( ji
x
y
x
y
2
,1,,1
,
2
2
2
x
TTT
x
T
jijiji
ji
22
2
),(),(2),(
),(
x
yxxTyxTyxxT
yx
x
T
Son Dao, PhD (C) 5
Discretizing the Elliptic PDE
t
T
r
T
x
),( ji ),1( ji
)1,(
ji
),1( ji
)1,(
ji
)0,0(
)0,(m
),0( n
b
T
l
T
),( ji
x
y
x
y
2
,1,,1
,
2
2
2
x
TTT
x
T
jijiji
ji
2
1,,1,
,
2
2
2
y
TTT
y
T
jijiji
ji
22
2
),(),(2),(
),(
x
yxxTyxTyxxT
yx
x
T
22
2
),(),(2),(
),(
y
yyxTyxTyyxT
yx
y
T
Son Dao, PhD (C) 6
5
6
12/16/2021
4
Substituting these approximations into the Laplace equation
yields:
if,
the Laplace equation can be rewritten as
Discretizing the Elliptic PDE
0
22
2
1,,1,
2
,1,,1
y
TTT
x
TTT
jijijijijiji
yx
04
,1,1,,1,1
jijijijiji
TTTTT
0
2
2
2
2
y
T
x
T
Son Dao, PhD (C) 7
Once the governing equation has been
discretized there are several numerical
methods that can be used to solve the problem.
We will examine the:
Direct Method
Gauss-Seidel Method
Lieberman Method
Discretizing the Elliptic PDE
04
,1,1,,1,1
jijijijiji
TTTTT
Son Dao, PhD (C) 8
7
8
12/16/2021
5
Example 1: Direct Method
Consider a plate that is subjected to the boundary conditions
shown below. Find the temperature at the interior nodes using a square
grid with a length of by using the direct method.
C
50
C
75
C
300
C
100
m4.2
m0.3
x
mm 0.34.2
m6.0
Son Dao, PhD (C) 9
Example 1: Direct Method
We can discretize the plate by taking,
myx 6.0
Son Dao, PhD (C) 10
9
10
12/16/2021
6
y
0,0
T
0,1
T
0,2
T
0,3
T
0,4
T
1,0
T
2,0
T
3,0
T
4,0
T
5,0
T
1,1
T
1,2
T
1,3
T
1,4
T
2,1
T
2,2
T
2,3
T
2,4
T
3,1
T
3,2
T
3,3
T
3,4
T
4,1
T
4,2
T
4,3
T
4,4
T
5,1
T
5,2
T
5,3
T
5,4
T
Example 1: Direct Method
The nodal temperatures at the boundary nodes are given by:
3,2,1,300
3,2,1,50
4,3,2,1,100
4,3,2,1,75
5,
0,
,4
,0
iT
iT
jT
jT
i
i
j
j
C
300
C
100
C
50
C
75
Son Dao, PhD (C) 11
Example 1: Direct Method
x
0,0
T
0,1
T
0,2
T
0,3
T
0,4
T
1,0
T
2,0
T
3,0
T
4,0
T
5,0
T
1,1
T
1,2
T
1,3
T
1,4
T
2,1
T
2,2
T
2,3
T
2,4
T
3,1
T
3,3
T
3,4
T
4,1
T
4,2
T
4,3
T
4,4
T
5,1
T
5,2
T
5,3
T
5,4
T
3,2
T
Here we develop the equation for the temperature at the node (2,3)
04
3,22,24,23,13,3
TTTTT
04
3,34,23,22,23,1
TTTTT
i=2 and j=3
04
,1,1,,1,1
jijijijiji
TTTTT
Son Dao, PhD (C) 12
11
12
12/16/2021
7
Example 1: Direct Method
We can develop similar equations for every interior node leaving us
with an equal number of equations and unknowns.
Question: How many equations would this generate?
Son Dao, PhD (C) 13
Example 1: Direct Method
We can develop similar equations for every interior node leaving us
with an equal number of equations and unknowns.
Question: How many equations would this generate? Answer: 12
Solving yields:
C
T
T
T
T
T
T
T
T
T
T
T
T
446.182
271.131
389.104
9833.82
512.198
248.138
302.103
5443.77
355.173
907.119
0252.93
8924.73
4,3
3,3
2,3
1,3
4,2
3,2
2,2
1,2
4,1
3,1
2,1
1,1
x
y
75
75
75
75
50 50 50
100
100
100
100
300300
300
173
120
93
74
199
138
103
78
182
131
104
83
Son Dao, PhD (C) 14
13
14
12/16/2021
8
The Gauss-Seidel Method
Recall the discretized equation
This can be rewritten as
For the Gauss-Seidel Method, this
equation is solved iteratively for all
interior nodes until a pre-specified
tolerance is met.
04
,1,1,,1,1
jijijijiji
TTTTT
4
1,1,,1,1
,
jijijiji
ji
TTTT
T
Son Dao, PhD (C) 15
Example 2: Gauss-Seidel Method
Consider a plate that is subjected to the boundary conditions
shown below. Find the temperature at the interior nodes using a square
grid with a length of using the Gauss-Siedel method. Assume the
initial temperature at all interior nodes to be .
C
50
C
75
C
300
C
100
m4.2
m0.3
x
mm 0.34.2
m6.0
C
0
Son Dao, PhD (C) 16
15
16
12/16/2021
9
Example 2: Gauss-Seidel Method
We can discretize the plate by taking
myx 6.0
Son Dao, PhD (C) 17
y
0,0
T
0,1
T
0,2
T
0,3
T
0,4
T
1,0
T
2,0
T
3,0
T
4,0
T
5,0
T
1,1
T
1,2
T
1,3
T
1,4
T
2,1
T
2,2
T
2,3
T
2,4
T
3,1
T
3,2
T
3,3
T
3,4
T
4,1
T
4,2
T
4,3
T
4,4
T
5,1
T
5,2
T
5,3
T
5,4
T
Example 2: Gauss-Seidel Method
The nodal temperatures at the boundary nodes are given by:
3,2,1,300
3,2,1,50
4,3,2,1,100
4,3,2,1,75
5,
0,
,4
,0
iT
iT
jT
jT
i
i
j
j
C
300
C
100
C
50
C
75
Son Dao, PhD (C) 18
17
18
12/16/2021
10
Example 2: Gauss-Seidel Method
Now we can begin to solve for the temperature at each interior node using
Assume all internal nodes to have an initial temperature of zero.
i=1 and j=1
4
0,12,11,01,2
1,1
TTTT
T
4
500750
C
2500.31
i j=1 and =2
4
1,13,12,02,2
2,1
TTTT
T
4
2500.310750
C
5625.26
Iteration #1
4
1,1,,1,1
,
jijijiji
ji
TTTT
T
Son Dao, PhD (C) 19
Example 2: Gauss-Seidel Method
After the first iteration, the temperatures are as follows. These will now be
used as the nodal temperatures for the second iteration.
x
y
31 20 43
27
12
39
25 3.9 37
100 102
135
C
300
C
100
C
50
C
75
Son Dao, PhD (C) 20
19
20
12/16/2021
11
Example 2: Gauss-Seidel Method
i j=1 and =1
Iteration #2
4
0,12,11,01,2
1,1
TTTT
T
4
505625.26753125.20
C
9688.42
%27.27
100
9688.42
2500.319688.42
100
1,1
1,11,1
1,1
present
previouspresent
a
T
TT
Son Dao, PhD (C) 21
Example 2: Gauss-Seidel Method
x
y
300 300 300
75
75
75
75
133
156
161 100
56 10056
87
39 29 56 100
43 37 56 100
50 50 50
x
y
%25
%34
%16
%54 %83
%58
%31 %62 %32
%27 %45 %24
The figures below show the temperature distribution and absolute
relative error distribution in the plate after two iterations:
Temperature Distribution
Absolute Relative
Approximate
Error Distribution
Son Dao, PhD (C) 22
21
22
12/16/2021
12
Node
Temperature Distribution in the Plate (°C)
Number of Iterations
1 2 10 Exact
31.2500 42.9688 73.0239
26.5625 38.7695 91.9585
25.3906 55.7861 119.0976
100.0977 133.2825 172.9755
20.3125 36.8164 76.6127
11.7188 30.8594 102.1577
9.2773 56.4880 137.3802
102.3438 156.1493 198.1055
42.5781 56.3477 82.4837
38.5742 56.0425 103.7757
36.9629 86.8393 130.8056
134.8267 160.7471 182.2278
Example 2: Gauss-Seidel Method
1,1
T
2,1
T
3,1
T
4,1
T
1,2
T
2,2
T
3,2
T
4,2
T
1,3
T
2,3
T
3,3
T
4,3
T
Son Dao, PhD (C) 23
The Lieberman Method
Recall the equation used in the Gauss-
Siedel Method,
Because the Guass-Siedel Method is
guaranteed to converge, we can accelerate
the process by using over- relaxation. In
this case,
4
1,1,,1,1
,
jijijiji
ji
TTTT
T
old
ji
new
ji
relaxed
ji
TTT
,,,
)1(
Son Dao, PhD (C) 24
23
24
12/16/2021
13
Example 3: Lieberman Method
Consider a plate that is subjected to the boundary conditions
shown below. Find the temperature at the interior nodes using a square
grid with a length of . Use a weighting factor of 1.4 in the Lieberman
method. Assume the initial temperature at all interior nodes to be .
C
50
C
75
C
300
C
100
m4.2
m0.3
x
mm 0.34.2
m6.0
C
0
Son Dao, PhD (C) 25
Example 3: Lieberman Method
We can discretize the plate by taking
myx 6.0
Son Dao, PhD (C) 26
25
26
12/16/2021
14
y
0,0
T
0,1
T
0,2
T
0,3
T
0,4
T
1,0
T
2,0
T
3,0
T
4,0
T
5,0
T
1,1
T
1,2
T
1,3
T
1,4
T
2,1
T
2,2
T
2,3
T
2,4
T
3,1
T
3,2
T
3,3
T
3,4
T
4,1
T
4,2
T
4,3
T
4,4
T
5,1
T
5,2
T
5,3
T
5,4
T
Example 3: Lieberman Method
We can also develop equations for the boundary conditions to define the
temperature of the exterior nodes.
3,2,1,300
3,2,1,50
4,3,2,1,100
4,3,2,1,75
5,
0,
,4
,0
iT
iT
jT
jT
i
i
j
j
C
300
C
100
C
50
C
75
Son Dao, PhD (C) 27
Example 3: Lieberman Method
Now we can begin to solve for the temperature at each interior node using
the rewritten Laplace equation from the Gauss-Siedel method.
Once we have the temperature value for each node we will apply the over
relaxation equation of the Lieberman method
Assume all internal nodes to have an initial temperature of zero.
i j=1 and =1
4
0,12,11,01,2
1,1
TTTT
T
4
500750
C
2500.31
Iteration #1
1,1 1,1 1,1
(1 )
relaxed new old
T T T
C
7500.43
0)4.11()2500.31(4.1
Iteration #2
i=1 and j=2
4
1,13,12,02,2
2,1
TTTT
T
4
75.430750
C
6875.29
1,1 1,1 1,1
(1 )
relaxed new old
T T T
C
5625.41
0)4.11()6875.29(4.1
Son Dao, PhD (C) 28
27
28
12/16/2021
15
Example 3: Lieberman Method
After the first iteration the temperatures are as follows. These will be used
as the initial nodal temperatures during the second iteration.
x
y
44
33 64
42
26
67
41
23
66
146 164
221
C
300
C
100
C
50
C
75
Son Dao, PhD (C) 29
Example 3: Lieberman Method
i j=1 and =1
Iteration #2
4
0,12,11,01,2
1,1
TTTT
T
C
8438.49
4
505625.41758125.32
%32.16
100
2813.52
7500.432813.52
100
1,1
1,11,1
1,1
present
previouspresent
a
T
TT
1,1 1,1 1,1
(1 )
relaxed new old
T T T
C
2813.52
75.43)4.11()8438.49(4.1
Son Dao, PhD (C) 30
29
30
12/16/2021
16
Example 3: Lieberman Method
x
y
%6.9
%24
%22
%53
%81
%57
%19 %55 %13
%16 %39 %5.7
The figures below show the temperature distribution and absolute
relative error distribution in the plate after two iterations:
Temperature Distribution
x
y
300 300 300
75
75
75
75
161
216
181 100
87
122
155
100
51 58 7 6 100
52 54 69 100
50 50 50
Absolute Relative
Approximate
Error Distribution
Son Dao, PhD (C) 31
Example 3: Lieberman Method
Node
Temperature Distribution in the Plate (°C)
Number of Iterations
1 2 9 Exact
43.7500 52.2813 73.7832
41.5625 51.3133 92.9758
40.7969 87.0125 119.9378
145.5289 160.9353 173.3937
32.8125 54.1789 77.5449
26.0313 57.9731 103.3285
23.3898 122.0937 138.3236
164.1216 215.6582 198.5498
63.9844 69.1458 82.9805
66.5055 76.1516 104.3815
66.4634 155.0472 131.2525
220.7047 181.4650 182.4230
1,1
T
2,1
T
3,1
T
4,1
T
1,2
T
2,2
T
3,2
T
4,2
T
1,3
T
2,3
T
3,3
T
4,3
T
Son Dao, PhD (C) 32
31
32
12/16/2021
17
Alternative Boundary Conditions
In Examples 1-3, the boundary conditions on the plate had a
specified temperature on each edge. What if the conditions are
different ? For example, what if one of the edges of the plate is
insulated.
In this case, the boundary condition would be the derivative of
the temperature. Because if the right edge of the plate is
insulated, then the temperatures on the right edge nodes also
become unknowns.
C
50
C
75
C
300
m4.2
m0.3
x
y
Insulated
Son Dao, PhD (C) 33
Alternative Boundary Conditions
The finite difference equation in this case for the right edge for
the nodes for
However the node is not inside the plate. The
derivative boundary condition needs to be used to account for
these additional unknown nodal temperatures on the right edge.
This is done by approximating the derivative at the edge node
as
1,..3,2
nj
04
,1,1,,1,1
jmjmjmjmjm
TTTTT
),1( jm
),( jm
)(2
,1,1
,
x
TT
x
T
jmjm
jm
C
50
C
75
C
300
m4.2
m0.3
x
y
Insulated
),( jm
Son Dao, PhD (C) 34
33
34
12/16/2021
18
Alternative Boundary Conditions
Rearranging this approximation gives us,
We can then substitute this into the original equation gives us,
Recall that is the edge is insulated then,
Substituting this again yields,
jm
jmjm
x
T
xTT
,
,1,1
)(2
04)(22
,1,1,
,
,1
jmjmjm
jm
jm
TTT
x
T
xT
0
,
jm
x
T
042
,1,1,,1
jmjmjmjm
TTTT
Son Dao, PhD (C) 35
Example 3: Alternative
Boundary Conditions
A plate is subjected to the temperatures and insulated boundary
conditions as shown in Fig. 12. Use a square grid length of . Assume the
initial temperatures at all of the interior nodes to be . Find the temperatures
at the interior nodes using the direct method.
mm 0.34.2
m6.0
C
0
C
50
C
75
C
300
m4.2
m0.3
x
Insulated
Son Dao, PhD (C) 36
35
36
12/16/2021
19
Example 3: Alternative
Boundary Conditions
We can discretize the plate taking,
myx 6.0
Son Dao, PhD (C) 37
y
0,0
T
0,1
T
0,2
T
0,3
T
0,4
T
1,0
T
2,0
T
3,0
T
4,0
T
5,0
T
1,1
T
1,2
T
1,3
T
1,4
T
2,1
T
2,2
T
2,3
T
2,4
T
3,1
T
3,2
T
3,3
T
3,4
T
4,1
T
4,2
T
4,3
T
4,4
T
5,1
T
5,2
T
5,3
T
5,4
T
Example 3: Alternative
Boundary Conditions
We can also develop equations for the boundary conditions to define the
temperature of the exterior nodes.
C
300
C
50
C
75
4,3,2,1;0
4,3,2,1;300
4,3,2,1;50
4,3,2,1;75
,4
5,
0,
,0
j
x
T
iT
iT
jT
j
i
i
j
Insulated
Son Dao, PhD (C) 38
37
38
12/16/2021
20
Example 3: Alternative
Boundary Conditions
x
y
0,0
T
0,1
T
0,2
T
0,3
T
0,4
T
1,0
T
2,0
T
3,0
T
4,0
T
5,0
T
1,1
T
1,2
T
1,3
T
1,4
T
2,1
T
2,2
T
2,3
T
2,4
T
3,1
T
3,3
T
4,1
T
4,2
T
4,3
T
4,4
T
5,1
T
5,2
T
5,3
T
5,4
T
3,2
T
3,4
T
Here we develop the equation for the temperature at the node (4,3),
to show the effects of the alternative boundary condition.
i j=4 and =3
042
3,44,42,43,3
TTTT
042
4,43,42,43,3
TTTT
Son Dao, PhD (C) 39
Example 3: Alternative
Boundary Conditions
The addition of the equations for the boundary conditions gives us a
system of 16 equations with 16 unknowns.
Solving yields:
C
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
T
738.232
830.178
617.130
7882.88
060.232
483.174
426.127
2678.87
021.218
614.159
335.117
8571.82
410.180
617.128
4444.99
8254.76
4,4
3,4
2,4
1,4
4,3
3,3
2,3
1,3
4,2
3,2
2,2
1,2
4,1
3,1
2,1
1,1
x
y
300 300 300
75
75
75
75
180
218
232 233
129
160 174
179
99 117 127 131
77
83
87 89
50 50 50
Son Dao, PhD (C) 40
39
40
| 1/20

Preview text:

12/16/2021 Elliptic PDE - Introduction 12/16/2021 Son Dao, PhD (C) 1 1 Defining Elliptic PDE’s
 The general form for a second order linear PDE with two independent
variables ( ) and one dependent variable ( ) u is x , y 2 2 2  u  u  A  B  u C  D  0 2 2 x   x y y 
Recall the criteria for an equation of this type to be considered elliptic 2 B  4 AC  0
 For example, examine the Laplace equation given by 2 2  T   T  0 , where A 1  , B  0 , C  1 2 2 x y then 2 B 4 AC  0  ) 1 ( 4 ( ) 1  4  0
thus allowing us to classify this equation as elliptic. Son Dao, PhD (C) 2 2 1 12/16/2021
Physical Example of an Elliptic PDE y Tt W T T l r x Tb L
Schematic diagram of a plate with specified temperature boundary conditions 2 2  T  T
The Laplace equation governs the temperature:  0 2 2 x y Son Dao, PhD (C) 3 3 Discretizing the Elliptic PDE L y x  T m t , 0 ( n) W x  y  ( , i j  ) 1 n y  x  y  Tr (i  , 1 j) (i, j) (i , 1 j) l T (i, j) x ( , i j  ) 1 ) 0 , 0 ( Tb (m ) 0 , 2  T T (x  x
 , y)  2T (x, y) T (x  x  , y) (x, y )  2 x   2 x 2  T
T (x, y  y)  2T (x, y)  T (x, y  y  ) ( , x y)  2 y   y  2 Son Dao, PhD (C) 4 4 2 12/16/2021 Discretizing the Elliptic PDE y t T , 0 ( n) x  ( , i j  ) 1 y  x  y  r T T (i  , 1 j) (i, j) (i , 1 j) l (i, j) x ( , i j  ) 1 ) 0 , 0 ( T (m ) 0 , b 2 2  T T ( x   , x y)  2T( , x ) y  T( x   , x y)  T T   2T  T i , 1 j i, j i  , 1 j (x, y )   2 2 x   x  2 x x  ,  2 i j Son Dao, PhD (C) 5 5 Discretizing the Elliptic PDE y Tt , 0 ( n) x  ( , i j  ) 1 y  x  y  Tr (i  , 1 j) (i, j) (i , 1 j) l T (i, j) x ( , i j  ) 1 ) 0 , 0 ( Tb (m ) 0 , 2 2  T
T x  x y  T x y  T x  x y T ( , ) 2 ( , ) ( , )  T  2T  T i  , 1 j i, j i  , 1 j (x, y )   2 2 x   x  2 x  x  2 , i j 2 2 T  T
T (x , y  y ) 2T (x , y ) T (x , y  y )  T  2T  T i, j 1  i, j i, j 1 ( , x ) y    2 2  y  y  2 y y 2 i , j Son Dao, PhD (C) 6 6 3 12/16/2021 Discretizing the Elliptic PDE 2 2  T   T  0 2 2 x  y
Substituting these approximations into the Laplace equation yields: T  2T  T T  2T  i  T , 1 j i, j i  , 1 j , i j 1  , i j , i j 1     2 x y 0 2 if, x   y 
the Laplace equation can be rewritten as T  T T T  4T  0 i , 1 j i , 1 j i, j 1  i , j 1  i, j Son Dao, PhD (C) 7 7 Discretizing the Elliptic PDE T  T  T  T  4T  0 i  , 1 j i , 1 j i , j 1  i , j 1  i , j
Once the governing equation has been
discretized there are several numerical
methods that can be used to solve the problem. We will examine the: •Direct Method •Gauss-Seidel Method •Lieberman Method Son Dao, PhD (C) 8 8 4 12/16/2021 Example 1: Direct Method Consider a plate 2 . 4 m  3 . 0
m that is subjected to the boundary conditions
shown below. Find the temperature at the interior nodes using a square grid with a length of 0 6 . m by using the direct method. y 300 C  75 C 100 C  3.0 m x 50C 2 4 . m Son Dao, PhD (C) 9 9 Example 1: Direct Method
We can discretize the plate by taking, x   y   6 . 0 m Son Dao, PhD (C) 10 10 5 12/16/2021 Example 1: Direct Method
The nodal temperatures at the boundary nodes are given by: 30  y 0 C T T T T T , 1 5 2,5 , 3 5 4,5 0,5 T  7 , 5 j  , 1 , 3 , 2 4 T 0, j 0,4 T T T T , 1 4 2,4 3,4 4,4 T 10 , 0 j  , 1 2 , 3 , 4 T 100 C  4,j 0,3 75 C  T T T T , 1 3 2,3 , 3 3 4,3 T T  5 , 0 i  , 1 3 , 2 0,2 , i 0 T T T T , 1 2 2,2 3,2 4,2 T  30 , 0 i  , 1 3 , 2 T , i 5 0 1 , T T T T 1 , 1 2 1 , 3 1 , 4 1 , x T0,0 T T T T , 1 0 2,0 , 3 0 4,0 50 C  Son Dao, PhD (C) 11 11 Example 1: Direct Method y T T T T , 1 T 5 2,5 , 3 5 4,5 0,5 T0,4 , 1 T 4 T2,4 T T 3,4 4,4 0 T ,3 , 1 T 3 2 T,3 T ,33 T4,3 0 T ,2 , 1 T 2 T T T 2,2 3,2 4,2 0 T 1, T T T T 1 , 1 2 1 , 1 , 3 4 1 , x T0,0 T T T , 1 T 0 2,0 3,0 4,0
Here we develop the equation for the temperature at the node (2,3) i=2 and j=3 T  T  T  T T i j i j i j  i j  4  0  , 1 , 1 , 1 , 1 , i j T  T  T  T  4T  0 , 3 3 , 1 3 2, 4 2,2 , 2 3 T  T  4T T T  0 , 1 3 2,2 2,3 2,4 3,3 Son Dao, PhD (C) 12 12 6 12/16/2021 Example 1: Direct Method
We can develop similar equations for every interior node leaving us
with an equal number of equations and unknowns.
Question: How many equations would this generate? Son Dao, PhD (C) 13 13 Example 1: Direct Method
We can develop similar equations for every interior node leaving us
with an equal number of equations and unknowns.
Question: How many equations would this generate? Answer: 12 y  T  1 , 1 73 8 . 92  4   T    300 300 300 , 1 2  9 . 3 025  2 T  119 9 . 0  7  ,13    T  ,14  173 3 . 5  5 75 100  173 182 T    77 5 . 443 199  1, 2   
Solving yields:  T2,2  103 3 . 0  2 100   C 75  120 138 131 T     2,3  138 2 . 4  8 T 75 100 2,4  198 5 . 1  2   93 103 104 T    1, 3  82 9 . 83  3 T  104 3 . 8  9 75 100 74 78 83  3,2    T  ,33  13 . 1 27  1 x T  182 4 . 4   3,4    6 50 50 50 Son Dao, PhD (C) 14 14 7 12/16/2021 The Gauss-Seidel Method
 Recall the discretized equation T  T  T  T  4T  0 i  , 1 j i , 1 j , i j 1  i, j 1  i, j  This can be rewritten as T  T  T  T i  , 1 j i  , 1 j i, j 1  i , 1  T  j i , j 4
 For the Gauss-Seidel Method, this
equation is solved iteratively for all
interior nodes until a pre-specified tolerance is met. Son Dao, PhD (C) 15 15 Example 2: Gauss-Seidel Method Consider a plate 2 . 4 m  3 . 0
m that is subjected to the boundary conditions
shown below. Find the temperature at the interior nodes using a square grid with a length of 0 6 .
m using the Gauss-Siedel method. Assume the
initial temperature at all interior nodes to be 0  C . y 300 C  75 C 100 C  3.0 m x 50 C . 2 4 m Son Dao, PhD (C) 16 16 8 12/16/2021 Example 2: Gauss-Seidel Method
We can discretize the plate by taking x   y  6 . 0 m Son Dao, PhD (C) 17 17 Example 2: Gauss-Seidel Method
The nodal temperatures at the boundary nodes are given by: 300  y C T T T T T , 1 5 2,5 , 3 5 4,5 0,5 T  7 , 5 j  , 1 , 3 , 2 4 T 0, j , 0 4 T T , 1 4 2,4 T T , 3 4 4,4 T 100 C  10 , 0 j  , 1 2 , 3 , 4 T0,3 4,j 75 C  T T T , 1 3 2,3 , 3 T 3 4,3 T T  5 , 0 i  , 1 3 , 2 , 0 2 , i 0 T T T T , 1 2 2,2 , 3 2 4,2 T  30 , 0 i  , 1 3 , 2 T0 1, T T T T , i 5 1 , 1 2 1 , 3 1 , 4 1 , x T0,0 T T T T , 1 0 2,0 , 3 0 4,0 50 C  Son Dao, PhD (C) 18 18 9 12/16/2021 Example 2: Gauss-Seidel Method
•Now we can begin to solve for the temperature at each interior node using T T T T i j  i j  i j   , 1  , 1 , 1  i, 1 T  j , i j 4
•Assume all internal nodes to have an initial temperature of zero. Iteration #1 T T T T i=1 and j=1 1 , 2 0 1 , , 1 2 , 1 0 T  1 , 1 4 0  75  0  50  4  31 2 . 50  0 C T  T  T  T i=1 and j=2 2,2 0,2 1,3 1 , 1 T  1,2 4 0  75 0 3 . 1 2500  4  26 5 . 625 C  Son Dao, PhD (C) 19 19 Example 2: Gauss-Seidel Method
After the first iteration, the temperatures are as follows. These will now be
used as the nodal temperatures for the second iteration. y 300 C  100 102 135 25 9 3 . 37 75  C 100 C  27 12 39 31 20 43 x 50 C  Son Dao, PhD (C) 20 20 10 12/16/2021 Example 2: Gauss-Seidel Method Iteration #2 i=1 and j=1 present T  previous T T T T T 1 , 1 1 , 1 2 1 , 0 1 , , 1 2 , 1 0    T  100 a 1 , 1 1 , 1 present 4 T 1, 1 20 3 . 125 75 26 5 . 625  50  42 9 . 688 31 2 . 500  1  00 4 42 9 . 688  42 9 . 68  8 C  27 2 . % 7 Son Dao, PhD (C) 21 21 Example 2: Gauss-Seidel Method
The figures below show the temperature distribution and absolute
relative error distribution in the plate after two iterations: Absolute Relative Approximate Temperature Distribution Error Distribution y y 300 300 300 75 133 156 161 100 25% 3 % 4 1 % 6 75 56 56 87 100 5 % 4 83% 5 % 8 75 39 29 56 100 3 % 1 62% 3 % 2 75 43 37 56 100 2 % 7 45% 24% x x 50 50 50 Son Dao, PhD (C) 22 22 11 12/16/2021 Example 2: Gauss-Seidel Method
Temperature Distribution in the Plate (°C) Node Number of Iterations 1 2 10 Exact T 1, 1 31.2500 42.9688 73.0239 T ,12 26.5625 38.7695 91.9585 T ,13 25.3906 55.7861 119.0976 T ,14 100.0977 133.2825 172.9755 T 1, 2 20.3125 36.8164 76.6127 T2,2 11.7188 30.8594 102.1577 T2,3 9.2773 56.4880 137.3802 T2,4 102.3438 156.1493 198.1055 T 1, 3 42.5781 56.3477 82.4837 T3,2 38.5742 56.0425 103.7757 T3,3 36.9629 86.8393 130.8056 T3,4 134.8267 160.7471 182.2278 Son Dao, PhD (C) 23 23 The Lieberman Method
 Recall the equation used in the Gauss- Siedel Method, T  T  T  T i , 1 j i , 1 j , i j 1  i, 1  T  j i, j 4
 Because the Guass-Siedel Method is
guaranteed to converge, we can accelerate
the process by using over- relaxation. In this case, relaxed new old T  T  1 (   T ) i, j i, j i ,j Son Dao, PhD (C) 24 24 12 12/16/2021 Example 3: Lieberman Method Consider a plate 2 . 4 m  3 . 0
m that is subjected to the boundary conditions
shown below. Find the temperature at the interior nodes using a square grid with a length of 0 6 .
m . Use a weighting factor of 1.4 in the Lieberman
method. Assume the initial temperature at all interior nodes to be 0 C  . y 300 C  75 C 100 C  3.0 m x 50 C . 2 4 m Son Dao, PhD (C) 25 25 Example 3: Lieberman Method
We can discretize the plate by taking x   y   6 . 0 m Son Dao, PhD (C) 26 26 13 12/16/2021 Example 3: Lieberman Method
We can also develop equations for the boundary conditions to define the
temperature of the exterior nodes. 300  y C T T T T T , 1 5 2,5 , 3 5 4,5 0,5 T  7 , 5 j  , 1 , 3 , 2 4 T 0, j , 0 4 T T T T , 1 4 2,4 , 3 4 4,4 T 10 , 0 j  , 1 2 , 3 , 4 T 100 C  4,j 0,3 75 C  T T T T , 1 3 2,3 , 3 3 4,3 T T  5 , 0 i  , 1 3 , 2 , 0 2 , i 0 T T T T , 1 2 2,2 , 3 2 4,2 T  30 , 0 i  , 1 3 , 2 T , i 5 0 1 , T T T T 1 , 1 2 1 , 3 1 , 4 1 , x T0,0 T T T T , 1 0 2,0 , 3 0 4,0 50 C Son Dao, PhD (C) 27 27 Example 3: Lieberman Method
•Now we can begin to solve for the temperature at each interior node using
the rewritten Laplace equation from the Gauss-Siedel method.
•Once we have the temperature value for each node we will apply the over
relaxation equation of the Lieberman method
•Assume all internal nodes to have an initial temperature of zero. Iteration #1 Iteration #2 T  T  T  T T T  T T 1 , 2 1 , 0 , 1 2 , 1 0 2, 2 0,2 , 1 3 1 , 1 i=1 and j=1 T  T  1 , 1 i=1 and j=2 , 1 2 4 4 0  75  0  50 0  75 0  43 7 . 5   4 4  31 2 . 500 C   29 6 . 875 C  relaxed new   (1 ) old T T T relaxed new    (1 ) old T T T 1,1 1,1 1,1 1,1 1,1 1,1  4 . 1 3 ( 1 2 . 50 ) 0  1 (  ) 4 . 1 0  4 . 1 (29 6 . 87 ) 5  1 (  ) 4 . 1 0  4 . 3 7500 C   4 . 1 5625 C  Son Dao, PhD (C) 28 28 14 12/16/2021 Example 3: Lieberman Method
After the first iteration the temperatures are as follows. These will be used
as the initial nodal temperatures during the second iteration. y 300 C  146 164 221 41 23 66 75  C 100 C  42 26 67 44 33 64 x 50 C  Son Dao, PhD (C) 29 29 Example 3: Lieberman Method Iteration #2 i=1 and j=1 present T  previous T T T T T 1 , 1 1 , 1 2 1 , 0 1 , , 1 2 , 1 0    T  100 a 1 , 1 present 1 , 1 T 4 1 , 1 3 . 2 8125 75 41 5 . 625  52 2 . 813 43 7 . 500  50  100 4 52 2 . 813  49 8 . 438 C   16 3 . % 2 relaxed new  (1   ) old T T T 1,1 1,1 1,1  ( 4 . 1 4 . 9 843 ) 8  1 (  ) 4 . 1 43 7 . 5  5 . 2 2813 C  Son Dao, PhD (C) 30 30 15 12/16/2021 Example 3: Lieberman Method
The figures below show the temperature distribution and absolute
relative error distribution in the plate after two iterations: Absolute Relative Temperature Distribution Approximate Error Distribution y y 300 300 300 75 161 9. % 6 216 181 100 2 % 4 2 % 2 75 87 122 155 100 5 % 3 8 % 1 5 % 7 75 51 58 76 100 1 % 9 5 % 5 1 % 3 75 52 54 69 100 1 % 6 3 % 9 7 5 . % x x 50 50 50 Son Dao, PhD (C) 31 31 Example 3: Lieberman Method
Temperature Distribution in the Plate (°C) Node Number of Iterations 1 2 9 Exact T 1, 1 43.7500 52.2813 73.7832 T ,12 41.5625 51.3133 92.9758 T ,13 40.7969 87.0125 119.9378 T ,14 145.5289 160.9353 173.3937 T 1, 2 32.8125 54.1789 77.5449 2 T ,2 26.0313 57.9731 103.3285 T2,3 23.3898 122.0937 138.3236 T2,4 164.1216 215.6582 198.5498 T 1, 3 63.9844 69.1458 82.9805 T3,2 66.5055 76.1516 104.3815 T3,3 66.4634 155.0472 131.2525 T Son Dao, PhD (C) 32 3,4 220.7047 181.4650 182.4230 32 16 12/16/2021
Alternative Boundary Conditions
 In Examples 1-3, the boundary conditions on the plate had a
specified temperature on each edge. What if the conditions are
different ? For example, what if one of the edges of the plate is insulated.
 In this case, the boundary condition would be the derivative of
the temperature. Because if the right edge of the plate is
insulated, then the temperatures on the right edge nodes also become unknowns. y 300C 75 C  0 . 3 m Insulated x 50 C  4 . 2 m Son Dao, PhD (C) 33 33
Alternative Boundary Conditions
 The finite difference equation in this case for the right edge for the nodes ( m , j ) for j  3 , 2 , . . n 1 T  T  T  T  4T  0  m , 1 j m , 1 j m, j 1  , m j 1  m, j  However the node ( m  , 1 j
) is not inside the plate. The
derivative boundary condition needs to be used to account for
these additional unknown nodal temperatures on the right edge.
This is done by approximating the derivative at the edge node as (m, j) y 300C  T  T   m , 1 T j m  , 1 j   x ( 2 x  ) , m j 7  5 C m 0 . 3 Insulated x 5  0 C . 2 m 4 Son Dao, PhD (C) 34 34 17 12/16/2021
Alternative Boundary Conditions
 Rearranging this approximation gives us, T  T   2( )  , 1 T  ,1 x m j m j  x m,j
 We can then substitute this into the original equation gives us, T 2T  ( 2  ) x  T  T  4T  0  m , 1 j m, j 1  m, j 1  m,  j x , m j
 Recall that is the edge is insulated then, T  0 x ,m j
 Substituting this again yields, 2T  T  T  4T  0 m 1  , j m , j 1  m , j 1  m, j Son Dao, PhD (C) 35 35 Example 3: Alternative Boundary Conditions A plate 4 . 2 m  0 . 3
m is subjected to the temperatures and insulated boundary
conditions as shown in Fig. 12. Use a square grid length of . 0 6 m . Assume the
initial temperatures at all of the interior nodes to be 0 C  . Find the temperatures
at the interior nodes using the direct method. y 300 C  75 C  0 . 3 m Insulated x 50 C  4 . 2 m Son Dao, PhD (C) 36 36 18 12/16/2021 Example 3: Alternative Boundary Conditions
We can discretize the plate taking, x y  . 0 6m Son Dao, PhD (C) 37 37 Example 3: Alternative Boundary Conditions
We can also develop equations for the boundary conditions to define the
temperature of the exterior nodes. 30  y 0 C T T T T T , 1 5 2,5 , 3 5 4,5 0,5 T  7 ; 5 j  , 3 , 2 , 1 4 0, j T ,04 T T T  5 ; 0 i  , 1 , 3 , 2 4 , 1 4 2,4 T T , 3 4 4,4 i ,0 T0,3 75 C  T T T Insulated T  i  , 1 3 2,3 , 3 T 3 30 ; 0 , 1 , 3 , 2 4 4,3 i ,5 T ,02 T T T T , 1 2 2,2 , 3 2 4,2 T  ; 0 j  , 3 , 2 , 1 4 T0 1, T T T T 1 , 1 2 1 , 3 1 , 4 1 , x x 4, j T0,0 T T T T , 1 0 2,0 , 3 0 4,0 50 C  Son Dao, PhD (C) 38 38 19 12/16/2021 Example 3: Alternative Boundary Conditions y T T T , 1 5 2 T ,5 , 3 5 4 T ,5 , 0 5 T0,4 T T 1,4 2,4 T T , 3 4 4,4 T0,3 T T T , 1 3 2,3 3,3 T4,3 T0,2 T T T T 1,2 2,2 3,2 4,2 T0,1 T T T T , 1 1 2,1 3,1 4,1 x T0,0 , 1 T 0 T T T 2,0 , 3 0 4,0
Here we develop the equation for the temperature at the node (4,3),
to show the effects of the alternative boundary condition. i=4 and j=3 2 T  T  T 4  T 0  , 3 3 , 4 2 4,4 4,3 2T T  4T  T  0 3,3 4,2 4,3 4,4 Son Dao, PhD (C) 39 39 Example 3: Alternative Boundary Conditions
The addition of the equations for the boundary conditions gives us a
system of 16 equations with 16 unknowns. T1, 1  76 8 . 25  4     T  ,12  99 4 . 444 y T  , 1 3 12 . 8 617     300 300 300 T  ,14  180 4 . 10 T    2 1 , 82 8 . 57    1   T 75  2,2 11 . 7 335 180 218 232 233 T      2,3 159 6 . 14 75 Solving yields: T   129 160 174 179 2,4 21 . 8 021      C  T  3 1, 87 2 . 678 75 T   99 117 127 131 , 3 2 127 4 . 26     T 75  3,3 174 4 . 83 77 T  83 87 89 3,4      23 . 2 060   x T  4 1,  88 7 . 882 50 50 50 T      4,2 13 . 0 617 T   4,3 178 8 . 30     T  4,4 23 . 2 738 Son Dao, PhD (C) 40 40 20