Introduction to Simulation - Lecture 19 Laplace’s Equation – FEM Methods

advertisement
Introduction to Simulation - Lecture 19
Laplace’s Equation – FEM Methods
Jacob White
Thanks to Deepak Ramaswamy, Michal Rewienski,
and Karen Veroy, Jaime Peraire and Tony Patera
Outline for Poisson Equation Section
• Why Study Poisson’s equation
– Heat Flow, Potential Flow, Electrostatics
– Raises many issues common to solving PDEs.
• Basic Numerical Techniques
– basis functions (FEM) and finite-differences
– Integral equation methods
• Fast Methods for 3-D
– Preconditioners for FEM and Finite-differences
– Fast multipole techniques for integral equations
SMA-HPC ©2003 MIT
Outline for Today
• Why Poisson Equation
– Reminder about heat conducting bar
• Finite-Difference And Basis function methods
– Key question of convergence
• Convergence of Finite-Element methods
– Key idea: solve Poisson by minimization
– Demonstrate optimality in a carefully chosen norm
SMA-HPC ©2003 MIT
Drag Force Analysis
of Aircraft
• Potential Flow Equations
– Poisson Partial Differential Equations.
SMA-HPC ©2003 MIT
Engine Thermal
Analysis
• Thermal Conduction Equations
– The Poisson Partial Differential Equation.
SMA-HPC ©2003 MIT
Capacitance on a microprocessor Signal Line
• Electrostatic Analysis
– The Laplace Partial Differential Equation.
SMA-HPC ©2003 MIT
HeatFlow
1-D Example
Incoming Heat
T (1)
T (0)
Near End
Temperature
Unit Length Rod
Far End
Temperature
Question: What is the temperature distribution along the bar
T
T (0)
T (1)
x
1-D Example
HeatFlow
Discrete Representation
1) Cut the bar into short sections
2) Assign each cut a temperature
T (1)
T (0)
T1
T2
TN −1 TN
1-D Example
HeatFlow
Constitutive Relation
Heat Flow through one section
∆x
Ti
Ti +1 hi +1,i
Ti +1 − Ti
= heat flow = κ
∆x
hi +1,i
Limit as the sections become vanishingly small
∂T ( x )
lim ∆x → 0 h ( x ) = κ
∂x
1-D Example
HeatFlow
Conservation Law
Two Adjacent Sections
“control volume”
Incoming Heat (hs )
Ti −1 hi ,i −1
Ti
hi +1,i Ti +1
∆x
Heat Flows into Control Volume Sums to zero
hi +1,i − hi ,i −1 = − hs ∆ x
1-D Example
HeatFlow
Conservation Law
Heat Flows into Control Volume Sums to zero
In co m in g H eat ( h s )
hi +1,i − hi ,i −1 = − hs ∆ x
Ti − 1 hi , i − 1
Ti
∆x
hi + 1, i Ti + 1
Heat in
from left
Heat out
from right
Incoming
heat per
unit length
Limit as the sections become vanishingly small
∂h ( x ) ∂ ∂T ( x )
κ
lim ∆x → 0 hs ( x ) =
=
∂x
∂x
∂x
1-D Example
HeatFlow
CircuitAnalogy
Temperature analogous to Voltage
Heat Flow analogous to Current
1 κ
=
R ∆x
T1
+
-
vs = T (0)
SMA-HPC ©2003 MIT
is = hs ∆x
TN
+
-
vs = T (1)
HeatFlow
1-D Example
Normalized 1-D Equation
Normalized Poisson Equation
∂ ∂T ( x )
∂ u ( x)
= − hs ⇒ −
= f ( x)
κ
2
∂x
∂x
∂x
2
− u xx ( x ) = f ( x )
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
Residual Equation
Using Basis
Functions
Partial Differential Equation form
∂u
− 2 = f
∂x
2
u (0) = 0 u (1) = 0
Basis Function Representation
n
u ( x ) ≈ uh ( x ) = ∑ ω i ϕ i ( x )
{
i =1
Basis Functions
Plug Basis Function Representation into the Equation
d ϕi ( x )
R ( x ) = ∑ ωi
+ f ( x)
2
dx
i =1
n
SMA-HPC ©2003 MIT
2
Example Basis functions
Using Basis
Functions
n
Introduce basis representation u ( x ) ≈ uh ( x ) = ∑ ωi ϕi ( x )
{
i =1
Basis Functions
⇒ u h ( x ) is a weighted sum of basis functions
The basis functions define a space
n


X h = v ∈ X h | v = ∑ β iϕi for some β i 's 
i =1


Example
“Hat” basis functions
ϕ4 ϕ6
ϕ2
ϕ1
ϕ3 ϕ5
SMA-HPC ©2003 MIT
Piecewise linear Space
Using Basis
functions
Basis Weights
Galerkin Scheme
Force the residual to be “orthogonal” to the basis functions
1
∫ ϕ ( x ) R ( x ) dt = 0
l
0
Generates n equations in n unknowns


d ϕi ( x )
ωi
+ f ( x )  dx = 0 l ∈ {1,..., n}
2
∫0 ϕl ( x ) ∑
dx
i =1

1
n
SMA-HPC ©2003 MIT
2
Basis Weights
Using Basis
Functions
Galerkin with integration by
parts
Only first derivatives of basis functions
n
d ϕl ( x )
∫0 dx
1
d ∑ ωiϕ i ( x )
i =1
dx
1
dx − ∫ ϕi ( x ) f ( x ) dx = 0
0
l ∈ {1,..., n}
SMA-HPC ©2003 MIT
Convergence
Analysis
The
question
is
u
uh
How does u − uh decrease with refinement?
123
error
• This time – Finite-element methods
• Next time – Finite-difference methods
SMA-HPC ©2003 MIT
Convergence Analysis
Heat Equation
Overview of FEM
Partial Differential Equation form
∂u
− 2 = f
∂x
2
u (0) = 0 u (1) = 0
“Nearly” Equivalent weak form
∂u ∂v
∫Ω ∂x ∂x dx = Ω∫ f v dx for all v
14243 1
424
3
a(u,v)
l (v )
Introduced an abstract notation for the equation u must satisfy
a (u , v) = l (v)
SMA-HPC ©2003 MIT
for all v
Convergence Analysis
Heat Equation
Overview of FEM
n
Introduce basis representation u ( x ) ≈ uh ( x ) = ∑ ωi ϕi ( x )
{
i =1
Basis Functions
⇒ u h ( x ) is a weighted sum of basis functions
The basis functions define a space
n


X h = v ∈ X h | v = ∑ β iϕi for some β i 's 
i =1


Example
“Hat” basis functions
ϕ4 ϕ6
ϕ2
ϕ1
ϕ3 ϕ5
SMA-HPC ©2003 MIT
Piecewise linear Space
Heat Equation
Convergence Analysis
Overview of FEM
Key Idea
a(u , u ) defines a norm a (u, u ) ≡ u
U is restricted to be 0 at 0 and1!!
Using the norm properties, it is possible to show
If a (uh , ϕ i ) = l (ϕ i ) for all ϕ i ∈ {ϕ1 , ϕ 2 ,..., ϕ n }
Then
u − uh = min wh ∈X h u − wh
1
424
3
1
424
3
Pr ojection
Solution
Error
Error
SMA-HPC ©2003 MIT
Heat Equation
Convergence Analysis
Overview of FEM
The question is only
u
uh
How well can you fit u with a member of Xh
But you must measure the error in the ||| ||| norm
For piecewise linear:
SMA-HPC ©2003 MIT
1
u − uh = O  
1
424
3
n
error
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
SMA-HPC ©2003 MIT
Summary
• Why Poisson Equation
– Reminder about heat conducting bar
• Finite-Difference And Basis function methods
– Key question of convergence
• Convergence of Finite-Element methods
– Key idea: solve Poisson by minimization
– Demonstrate optimality in a carefully chosen norm
SMA-HPC ©2003 MIT
Download