mws_gen_pde_ppt_elli..

Download Report

Transcript mws_gen_pde_ppt_elli..

Elliptic Partial Differential
Equations - Introduction
http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM Undergraduates
4/9/2015
http://numericalmethods.eng.usf.edu
1
For more details on this topic
 Go
to http://numericalmethods.eng.usf.edu
 Click on Keyword
 Click on Elliptic Partial Differential Equations
You are free
to Share – to copy, distribute, display and
perform the work
 to Remix – to make derivative works

Under the following conditions
Attribution — You must attribute the work in the
manner specified by the author or licensor (but not
in any way that suggests that they endorse you or
your use of the work).
 Noncommercial — You may not use this work for
commercial purposes.
 Share Alike — If you alter, transform, or build upon
this work, you may distribute the resulting work only
under the same or similar license to this one.

Defining Elliptic PDE’s

The general form for a second order linear PDE with two independent
variables ( x, y ) and one dependent variable ( u) 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 elliptic
B 2  4 AC  0
For example, examine the Laplace equation given by
 2T  2T
 2  0 , where A  1 , B  0 , C  1
2
x
y
then
B 2  4 AC  0  4(1)(1)
 4  0
thus allowing us to classify this equation as elliptic.
Physical Example
of
an
Elliptic
PDE
y
Tt
W
Tr
Tl
x
Tb
L
Schematic diagram of a plate with specified temperature boundary
conditions
T T


0
2
2
x y
2
The Laplace equation governs the temperature:
2
Discretizing the Elliptic PDE
y
Tt
(0, n)
L
x 
m
W
y 
n
x
y
Tl
Tr
(i  1, j )
(i, j )
x
(0,0)
Tb
y
(i, j  1)
x
(i, j )
(i  1, j )
(i, j  1)
(m,0)
 2T
T ( x  x, y)  2T ( x, y)  T ( x  x, y)
( x, y) 
2
2
x
x
 2T
T ( x, y  y)  2T ( x, y)  T ( x, y  y)
( x, y) 
2
2
y
y 
Discretizing the Elliptic PDE
y
Tt
(0, n)
x
y
Tl
(i, j  1)
x
y
Tr
(i  1, j )
(i, j )
(i, j )
(i, j  1)
x
(0,0)
Tb
(i  1, j )
(m,0)
 2T
T ( x  x, y)  2T ( x, y)  T ( x  x, y)
(
x
,
y
)

x 2
x2
 2T
x 2

i, j
Ti 1, j  2Ti , j  Ti 1, j
x 2
Discretizing the Elliptic PDE
y
Tt
(0, n)
x
y
Tl
(i, j  1)
x
y
Tr
(i  1, j )
(i, j )
(i, j )
(i, j  1)
x
(0,0)
Tb
(i  1, j )
(m,0)
 2T
T ( x  x, y)  2T ( x, y)  T ( x  x, y)
(
x
,
y
)

x 2
x2
 2T
T ( x, y  y)  2T ( x, y)  T ( x, y  y)
(
x
,
y
)

y 2
y 2
 2T
x 2
 2T
y 2

Ti 1, j  2Ti , j  Ti 1, j
i, j

i, j
x 2
Ti , j 1  2Ti , j  Ti , j 1
y 2
Discretizing the Elliptic PDE
 2T
 2T

0
2
2
x
y
Substituting these approximations into the Laplace equation
yields:
Ti 1, j  2Ti , j  Ti 1, j
x
2

Ti , j 1  2Ti , j  Ti , j 1
y 
2
0
if,
x  y
the Laplace equation can be rewritten as
Ti 1, j  Ti 1, j  Ti, j 1  Ti, j 1  4Ti, j  0
Discretizing the Elliptic PDE
Ti 1, j  Ti 1, j  Ti, j 1  Ti, j 1  4Ti, j  0
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
THE END
http://numericalmethods.eng.usf.edu
Acknowledgement
This instructional power point brought to you by
Numerical Methods for STEM undergraduate
http://numericalmethods.eng.usf.edu
Committed to bringing numerical methods to the
undergraduate
For instructional videos on other topics, go to
http://numericalmethods.eng.usf.edu/videos/
This material is based upon work supported by the National
Science Foundation under Grant # 0717624. Any opinions, findings,
and conclusions or recommendations expressed in this material are
those of the author(s) and do not necessarily reflect the views of the
National Science Foundation.
The End - Really
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
3 .0 m
100 C
50 C
2 .4 m
x
Example 1: Direct Method
We can discretize the plate by taking,
x  y  0.6m
Example 1: Direct Method
The nodal temperatures at the boundary nodes are given by:
300C
y
T 0,5
T0, 4
75C
T0,3
T1,5
T2,5
T3,5
T4,5
T0, j  75, j  1,2,3,4
T1, 4
T2, 4
T3, 4
T4, 4
100C
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T0,1
T1,1
T2,1
T3,1
T4,1
T0, 0
T1,0
T2, 0
T3,0
T4, 0
T0, 2
Ti ,0  50, i  1,2,3
Ti ,5  300, i  1,2,3
x
50C
T4, j  100, j  1,2,3,4
Example 1: Direct Method
y
T 0,5
T0, 4
T0,3
T0, 2
T0,1
T0, 0
T1,5
T2,5
T3,5
T4,5
T1, 4
T2, 4
T3, 4
T4, 4
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T1,1
T2,1
T3,1
T4,1
x
T1,0
T2, 0
T3,0
T4, 0
Here we develop the equation for the temperature at the node (2,3)
i=2 and j=3
Ti 1, j  Ti 1, j  Ti, j 1  Ti, j 1  4Ti, j  0
T3,3  T1,3  T2,4  T2,2  4T2,3  0
T1,3  T2,2  4T2,3  T2,4  T3,3  0
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?
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
 T1,1  73.8924
T  

93
.
0252
1
,
2
  

 T1,3  119.907
  

T1, 4  173.355
T2,1  77.5443
  

T
103
.
302
 C
Solving yields:  2, 2   
T  138.248
 2,3  

T
198
.
512
 2, 4  

 T  82.9833
 3,1  

T3, 2  104.389
  

T
131
.
271
3
,
3
  

T3, 4  182.446
300
300
300
75
173
199
182
75
120
138
131
93
103
104
74
78
83
75
75
100
100
100
100
x
50
50
50
The Gauss-Seidel Method

Recall the discretized equation
Ti 1, j  Ti 1, j  Ti, j 1  Ti, j 1  4Ti, j  0

This can be rewritten as
Ti , j 
Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1
4
 For the Gauss-Seidel Method, this
equation is solved iteratively for all
interior nodes until a pre-specified
tolerance is met.
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
3 .0 m
100 C
50 C
2 .4 m
x
Example 2: Gauss-Seidel Method
We can discretize the plate by taking
x  y  0.6m
Example 2: Gauss-Seidel Method
The nodal temperatures at the boundary nodes are given by:
300C
y
T 0,5
T0, 4
75C
T0,3
T1,5
T2,5
T3,5
T4,5
T0, j  75, j  1,2,3,4
T1, 4
T2, 4
T3, 4
T4, 4
100C
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T0,1
T1,1
T2,1
T3,1
T4,1
T0, 0
T1,0
T2, 0
T3,0
T4, 0
T0, 2
Ti ,0  50, i  1,2,3
Ti ,5  300, i  1,2,3
x
50C
T4, j  100, j  1,2,3,4
Example 2: Gauss-Seidel Method
•Now we can begin to solve for the temperature at each interior node using
Ti , j 
Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1
4
•Assume all internal nodes to have an initial temperature of zero.
Iteration #1
i=1 and j=1 T1,1 
T2,1  T0,1  T1, 2  T1,0
4
0  75  0  50

4
 31.2500C
i=1 and j=2 T1, 2 

T2, 2  T0, 2  T1,3  T1,1
4
0  75  0  31.2500
4
 26.5625C
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
100
102
135
25
9 .3
37
27
12
39
31
20
43
50 C
100 C
x
Example 2: Gauss-Seidel Method
Iteration #2
i=1 and j=1
T1,1 
T2,1  T0,1  T1, 2  T1,0
4
20.3125  75  26.5625  50

4
 42.9688C
 a 1,1
previous
T1,present

T
 1 present1,1
100
T1,1
42.9688 31.2500
100
42.9688
 27.27%

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
Error Distribution
Temperature Distribution
y
y
300
75
75
300
300
133
156
161
100
25 %
34 %
16 %
56
56
87
100
54 %
83 %
58 %
39
29
56
100
31 %
62 %
32 %
43
37
56
100
27 %
45 %
24 %
75
75
x
50
50
50
x
Example 2: Gauss-Seidel Method
Temperature Distribution in the Plate (°C)
Node
Number of Iterations
1
2
10
T1,1
31.2500
42.9688
73.0239
T1, 2
T1,3
26.5625
38.7695
91.9585
25.3906
55.7861
119.0976
T1, 4
100.0977
133.2825
172.9755
T2,1
20.3125
36.8164
76.6127
T2, 2
T2,3
T2, 4
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
T3,1
T3, 2
T3,3
T3, 4
Exact
The Lieberman Method

Recall the equation used in the GaussSiedel Method,
Ti 1, j  Ti 1, j  Ti , j 1  Ti , j 1
Ti , j 
4

Because the Guass-Siedel Method is
guaranteed to converge, we can accelerate
the process by using over- relaxation. In
this case,
relaxed
i, j
T
 T
new
i, j
 (1  )T
old
i, j
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
3 .0 m
100 C
50 C
2 .4 m
x
Example 3: Lieberman Method
We can discretize the plate by taking
x  y  0.6m
Example 3: Lieberman Method
We can also develop equations for the boundary conditions to define the
temperature of the exterior nodes.
300C
y
T 0,5
T0, 4
75C
T0,3
T1,5
T2,5
T3,5
T4,5
T0, j  75, j  1,2,3,4
T1, 4
T2, 4
T3, 4
T4, 4
100C
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T0,1
T1,1
T2,1
T3,1
T4,1
T0, 0
T1,0
T2, 0
T3,0
T4, 0
T0, 2
Ti ,0  50, i  1,2,3
Ti ,5  300, i  1,2,3
x
50C
T4, j  100, j  1,2,3,4
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 #2
Iteration #1
i=1 and j=1
T1,1 
T2,1  T0,1  T1, 2  T1,0
4
0  75  0  50

4
 31.2500C
relaxed
1,1
T
 T
new
1,1
 (1 )T
old
1,1
 1.4(31.2500)  (1  1.4)0
 43.7500C
i=1 and j=2
T1, 2 
T2, 2  T0, 2  T1,3  T1,1
4
0  75  0  43.75

4
 29.6875C
T1,1relaxed  T1,1new  (1 )T1,1old
 1.4(29.6875)  (1  1.4)0
 41.5625C
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
75 C
146
164
221
41
23
66
42
26
67
44
33
64
50 C
100 C
x
Example 3: Lieberman Method
Iteration #2
i=1 and j=1
T1,1 
T2,1  T0,1  T1, 2  T1,0
4
32.8125 75  41.5625 50

4
 49.8438C
T1,1relaxed  T1,1new  (1 )T1,1old
 1.4(49.8438)  (1  1.4)43.75
 52.2813C
 a 1,1 
previous
T1,present

T
1
1,1
present
1,1
T
100
52.2813 43.7500

100
52.2813
 16.32%
Example 3: Lieberman Method
The figures below show the temperature distribution and absolute
relative error distribution in the plate after two iterations:
Temperature Distribution
y
y
300
75
75
300
Absolute Relative
Approximate
Error Distribution
300
161
216
181
100
9 .6 %
24 %
22 %
87
122
155
100
53 %
81 %
57 %
51
58
76
100
19 %
55 %
13 %
52
54
69
100
16 %
39 %
7 .5 %
75
75
x
50
50
50
x
Example 3: Lieberman Method
Temperature Distribution in the Plate (°C)
Node
Number of Iterations
1
2
9
T1,1
43.7500
52.2813
73.7832
T1, 2
T1,3
41.5625
51.3133
92.9758
40.7969
87.0125
119.9378
T1, 4
145.5289
160.9353
173.3937
T2,1
32.8125
54.1789
77.5449
T2, 2
T2,3
T2, 4
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
T3,1
T3, 2
T3,3
T3, 4
Exact
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
Insulated
3 .0 m
50 C
2 .4 m
x
Alternative Boundary Conditions

The finite difference equation in this case for the right edge for
the nodes (m, j ) for j  2,3,..n  1
Tm1, j  Tm1, j  Tm, j 1  Tm, j 1  4Tm, j  0

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
y
as
(m, j )
T
x

m, j
300 C
Tm1, j  Tm1, j
2(x)
75 C
Insulated
3 .0 m
50 C
2 .4 m
x
Alternative Boundary Conditions

Rearranging this approximation gives us,
Tm1, j  Tm1, j  2(x)

T
x
 Tm, j 1  Tm, j 1  4Tm, j  0
m, j
Recall that is the edge is insulated then,
T
x

m, j
We can then substitute this into the original equation gives us,
2Tm1, j  2(x)

T
x
0
m, j
Substituting this again yields,
2Tm1, j  Tm, j 1  Tm, j 1  4Tm, j  0
Example 3: Alternative
Boundary Conditions
A plate 2.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 0 C. Find the temperatures
at the interior nodes using the direct method.
y
300 C
75 C
Insulated
3 .0 m
50 C
2 .4 m
x
Example 3: Alternative
Boundary Conditions
We can discretize the plate taking,
x  y  0.6m
Example 3: Alternative
Boundary Conditions
We can also develop equations for the boundary conditions to define the
temperature of the exterior nodes.
300C
y
T 0,5
T0, 4
75C
T0,3
T0, 2
T0,1
T0, 0
T1,5
T2,5
T3,5
T4,5
T1, 4
T2, 4
T3, 4
T4, 4
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T1,1
T2,1
T3,1
T4,1
T0, j  75; j  1,2,3,4
Ti , 0  50; i  1,2,3,4
Insulated
x
T1,0
T2, 0
50C
T3,0
T4, 0
Ti ,5  300; i  1,2,3,4
T
x
 0; j  1,2,3,4
4, j
Example 3: Alternative
Boundary Conditions
y
T 0,5
T0, 4
T0,3
T0, 2
T0,1
T0, 0
T1,5
T2,5
T3,5
T4,5
T1, 4
T2, 4
T3, 4
T4, 4
T1,3
T2,3
T3,3
T4,3
T1, 2
T2, 2
T3, 2
T4, 2
T1,1
T2,1
T3,1
T4,1
x
T1,0
T2, 0
T3,0
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
2T3,3  T4, 2  T4, 4  4T4,3  0
2T3,3  T4, 2  4T4,3  T4,4  0
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.8254
T  

 1, 2  99.4444
 T1,3  128.617
  

T1, 4  180.410
T2,1   82.8571
  

T2, 2  117.335
T  159.614
 2,3  

T


Solving yields: 2, 4   218.021 C
T  

 3,1  87.2678
T3, 2  127.426
  

T3,3  174.483
T3, 4  232.060
  

T4,1  88.7882
T  130.617
 4, 2  

T4,3  178.830
  

T4, 4   232.738
y
300
75
75
300
300
180
218
232
233
129
160
174
179
99
117
127
131
77
83
87
89
75
75
x
50
50
50
THE END