7 PDE Basics 2
7 PDE Basics 2
Partial
Differentia
l Equations
-
Introductio
n 1
Defining Elliptic
PDE’s
• The general form for a second order linear PDE with
two independent variables ( x,) yand one
dependent variable A
( ) is u
u u2 2
u2
D
B C 0
• x 2
xy y 2
Recall the criteria for an equation of this type to be
B 2 4AC 0
considered elliptic
W Tl Tr
x
Tb
L
Schematic diagram of a plate with specified temperature
boundary conditions
n) x W (i, j 1)
y n y x
y Tr
Tl (i, j) (i 1, j) (i, j) i 1, j)
(
x (i, j 1)
(0,0)
Tb (m,0)
n) x (i, j 1)
y x
y Tr
Tl (i, j) (i 1, j) (i, j) i 1, j)
(
x (i, j 1)
(0,0)
Tb (m,0)
5
Discretizing the
(0,
y
Elliptic PDE
Tt
n) x (i, j 1)
y x
y Tr
Tl (i, j) (i 1, j) (i, j) i 1, j)
(
x (i, j 1)
(0,0)
Tb (m,0)
6
Discretizing the
Elliptic
TPDE
T
0
2 2
x 2
y 2
Substituting these approximations into the
Laplace equation yields:
2Ti, j 2Ti, j
Ti1, j Ti1, j Ti, j1 Ti, j1
x y 0
2 2
if
,
x y
the Laplace equation can be rewritten as
Ti1, j Ti1, j Ti, j1 Ti, j1
0 7
Discretizing the
Elliptic PDE
Ti1, j Ti1, j Ti, j1 Ti, j1 4Ti, j
0
Once the governing equation has been
discretized there are several numerical
methods that can be used to solve the
problem.
300 C
75 C
3.0 m 100 C
x
50 C
2.4
m
9
Example 1: Direct
Methodtaking,
We can discretize the plate by
x y 0.6m
10
Example 1: Direct
Method
The nodal temperatures at the boundary nodes
are given by:
y 300 C
T0,4
T0, j 75, j
T1,4 T2,4 T3,4 T4,4
1,2,3,4
T 100, j
75C T0,3
100 C 4, j
T4,3
T0,2
T1,3 T2,3 T3,3
1,2,3,4
Ti,0 50, i
T1,2 T2,2 T3,2 T4,2
1,2,3
T0,1
T1,1 T2,1 T3,1 T4,1
T0,0
x Ti,5 300, i
T1,0 T2,0
50 C
T3,0 T4,0
1,2,3
11
Example 1: Direct y
Method T 0,5
T1,5 T2,5 T3,5
T4,5
T0,4 T1,4 T2,4 T3,4 T4,4
T0,3
T1,3 T2,3 T3,3 T4,3
T0,2
T1,2 T2,2 T3,2 T4,2
T4,0
Here we develop the equation for the temperature at
the node (2,3)
i=2 and j=3 4Ti, j
Ti1, j Ti1, j Ti, j1 Ti, j1
4T2,30 0
T3,3 T1,3 T2,4 T2,2
T3,3 1
T1,3 T2,2 4T2,3 T2,4 2
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?
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
T1,1 73.8924
y
T 1,2
300 300 300
93.0252
T1,3 119.907
T
1,4 173.355 75 173 199 182 100
T2,1 77.5443
75 100
T T2,2 103.302
Solving yields: 120 138 131
2,3
138.248
C T2,4 75 100
198.512 93 103 104
T 3,1 82.9833
104.389 75 74 78 83 100
T3,2
T 3,3 131.271 x
T3,4 182.446 50 50 50
14
The Gauss-Seidel
• Recall the discretized
Methodequation
Ti1, j Ti1, j Ti, j1 Ti, j1
0
4Ti, j
• This
Ti, j
canTibe rewritten as
1, j Ti 1, j Ti, j 1 Ti, j
• For the Gauss-Seidel4Method, this
1
equation is
solved iteratively for all interior nodes
until a pre-specified tolerance is met.
15
Example 2: Gauss-Seidel
Method2.4 m 3.t0hmat is subjected to the
Consider a plate
boundary conditions shown below. Find the temperature at the
length
interior nodes using
using th0e.a
G6square grid with
amuss-Siedel a
method. Assume the initial
of
at all interior nodes to 0C
be temperature
.
300 C
y
75 C
3.0 m 100 C
x
50 C
2.4
m 16
Example 2: Gauss-Seidel
Method
We can discretize the plate
by taking
x y 0.6m
17
Example 2: Gauss-Seidel
Method
The nodal temperatures at the boundary nodes
are given by:
y 300 C
T0,4
T0, j 75, j
T1,4 T2,4 T3,4 T4,4
1,2,3,4
T 100, j
75C T0,3
100 C 4, j
T4,3
T0,2
T1,3 T2,3 T3,3
1,2,3,4
Ti,0 50, i
T1,2 T2,2 T3,2 T4,2
1,2,3
T0,1
T1,1 T2,1 T3,1 T4,1
T0,0
x Ti,5 300, i
T1,0 T2,0 T3,0 T4,0
1,2,3
50 C
18
Example 2: Gauss-Seidel
•Now weMethod
can begin to solve for the temperature at each
interior node using
0 75 0
31.2500
4 1
9
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
75 C 25 9.3 37 100 C
27 12 39
31 20 43
x
50 C 2
0
Example 2: Gauss-Seidel
Method
Iteration
#2
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
Temperature Approximate
Distribution y Error
y Distribution
300 300 300
75
133 156 161 100 25% 34% 16%
75
56 56 87 100 54% 83% 58%
75
39 29 56 100 31% 62% 32%
75
43 37 56 100 27% 45% 24%
x x
50 50 50
22
Example 2: Gauss-Seidel
Method
Node
Temperature Distribution in the Plate
(°C)
Number of Iterations
1 2 10 Exact
T1,1 31.2500 42.9688 73.0239
T1,2 26.5625 38.7695 91.9585
T1,3 25.3906 55.7861 119.0976
T1,4 100.0977 133.2825 172.9755
T2,1 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
T3,1 42.5781 56.3477 82.4837
T3,2 38.5742 56.0425 103.7757
T3,3 36.9629 86.8393 130.8056
23
T3,4 134.8267 160.7471 182.2278
The Lieberman
• Recall the equation used in the Gauss-
MethodSiedel Method,
T relaxed
i, j T new
i, j (1 )T old
i, j
24
Example 3: Lieberman
Method
Consider a plate 2.4 m 3.t0hmat is subjected to the
boundary conditions shown below. Find the temperature at the
length nodes
interior using
. Use a w0ea.6square
igmhtinggrid with
factor a in the Lieberman method.
of 1.4
the initial temperature at all interior nodes
of 0C
to be Assume
.
y
300 C
75 C
3.0 m 100 C
x
50 C
2.4
m
25
Example 3: Lieberman
Method
We can discretize the plate
by taking
x y 0.6m
26
Example 3: Lieberman
We canMethod
also develop equations for the boundary
conditions to define the temperature of the exterior nodes.
y 300 C
T0,4
T0, j 75, j
T1,4 T2,4 T3,4 T4,4
1,2,3,4
T 100, j
75C T0,3
100 C 4, j
T4,3
T0,2
T1,3 T2,3 T3,3
1,2,3,4
Ti,0 50, i
T1,2 T2,2 T3,2 T4,2
1,2,3
T0,1
T1,1 T2,1 T3,1 T4,1
T0,0
x Ti,5 300, i
T1,0 T2,0 T3,0 T4,0
1,2,3
50 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.
0 75 0 0 75 0
4 4
50 31.2500
43.75
C 29.6875C
new
(1 )T old
T1,1relaxed
1,1 (1 )T old
new
T1,1relaxed 1,1
T 1,1 T 1,1
1.4(29.6875)
1.4(31.2500)
(11.4)0 (11.4)0 2
8
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.
300 C
75 C 41 23 66 100 C
42 26 67
44 33 64
x
50 C 2
9
Example 3: Lieberman
Method
Iteration
#2
T 1,1
1.4(49.8438)
(11.4)43.75
52.2813C
30
Example 3: Lieberman
Method
The figures below show the temperature distribution
and absolute relative error distribution in the plate
after two iterations:
Absolute
Temperature Relative
Distribution y
Approximate
y
Error
Distribution
300 300 300
75
161 216 181 100 9.6% 24% 22%
75
87 122 155 100 53% 81% 57%
75
51 58 76 100 19% 55% 13%
75
52 54 69 100 16% 39% 7.5%
x x
50 50 50
31
Example 3: Lieberman
Method
Node
Temperature Distribution in the Plate
(°C)
Number of Iterations
1 2 9 Exact
T1,1 43.7500 52.2813 73.7832
T1,2 41.5625 51.3133 92.9758
T1,3 40.7969 87.0125 119.9378
T1,4 145.5289 160.9353 173.3937
T2,1 32.8125 54.1789 77.5449
T2,2 26.0313 57.9731 103.3285
T2,3 23.3898 122.0937 138.3236
T2,4 164.1216 215.6582 198.5498
T3,1 63.9844 69.1458 82.9805
T3,2 66.5055 76.1516 104.3815
T3,3 66.4634 155.0472 131.2525 32
T
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.
300 C
75 C
3.0 m Insulated
x
50 C
3
2.4 3
Alternative Boundary
Conditions
• The finite difference equation in this case for the
node edge for the j 2,3,..n
right f(omr
s
, j) 1 4Tm, j
Tm1, j Tm1, j Tm, j1 Tm, j1
0
• However the (m i1s,njo) t inside the plate. The
boundary condition
node needs to be used to account for
derivative
these additional unknown nodal temperatures on the
right edge. This is done by approximating the derivative
at the (m,
edgej) node y as
300
T Tm1, j Tm1, j C
x 2(x)
m, j
75
C
Insulated
3.0 m
x
50
C
3
2.4 m 4
Alternative Boundary
Conditions
• Rearranging this approximation
gives us,
2(x)
Tm1, j Tm1, j
T m, j
x
• We can then substitute this into the original
equation gives us,
2Tm1, j 2(x) m, j 1 Tm, j 4T m, j
T m, j T 0 1
x
35
Example 3: Alternative
Boundary Conditions
A plate2.4 m 3.0 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 0C.
Find the temperatures at the interior nodes using the direct method.
y
300 C
75 C
3.0 m Insulated
x
50 C
2.4
m 36
Example 3: Alternative
Boundary Conditions
We can discretize the plate
taking,
x y 0.6m
37
Example 3: Alternative
Boundary Conditions
We can also develop equations for the boundary
conditions to define the
temperature of the exterior nodes.
y 300 C
T0,5
T1,5 T2,5 T3,5 T4,5
T0, j 75; j
T0,4
T4,4
1,2,3,4
T 50; i
T1,4 T2,4 T3,4 i,0
75C T0,3
T1,3 T2,3 T3,3 T4,3 Insulate 1,2,3,4
Ti,5 300; i
d
T0,2
T1,2 T2,2 T3,2 T4,2 1,2,3,4
0; j
T0,1
T1,1 T2,1 T3,1 T4,1 T 4, j
x 1,2,3,4
T0,0 T1,0 T2,0 T3,0 T4,0 x
50 C
38
Example 3: Alternative
Boundary Conditions
y
T0,3
T1,3 T2,3 T3,3 T4,3
T0,2
T1,2 T2,2 T3,2 T4,2
T4,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 2T T 4T4,3 0
T
3,3 4,2 4,4
T4,3 178.830
4
232.738
T4,4 0
Ada
Pertanyaan?
4
1