Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Luca Daniel
2
PDE solvers 1-D Example
Incoming Heat
T (1)
T (0)
Near End Far End
Temperature Temperature
Unit Length Rod
T (0)
T (1)
x
PDE solvers Heat flow example
Normalized 1-D Equation
T ( x) u ( x) 2
hs f ( x)
x x x 2
u xx ( x) f ( x)
Using Basis The two key steps!
Functions
Partial Differential Equation form
u 2
2 f u (0) 0 u (1) 0
x
Step 1: Choose Basis Functions to represent the solution
n
u x uh x i i x
i 1
Basis Functions
Step 2: Generate equations for the basis functions weights
setting residual orthogonal to some test functions
d i x
1 n 2
x R x dt 0
0
l R x i
i 1 dx 2
f x
Test Functions
5
Step1. Basis Functions
• Basis for vector space N
1 , 2 , , N is a basis if N
i i
i 1
• Basis functions for functional vector space
1 ( x ), 2 ( x ), is a basis if function ( x ) ( x ) ii ( x )
i 1
• Examples
– exponentials e jx
x x6
Step 1. 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 Piecewise linear Space
2 4 6
1 3 5
7
Step 2.
PDE solvers
Galerkin Scheme
u 2 n
d 2i x
2 f R x i f x
x
2
i 1 dx
x R x dt 0
0
l
d i i x
1
d l x 1
0 dx i 1
dx i x f x dx 0
dx 0
l 1,..., n
9
Partial Differential Equation Solvers
10
Basis Weights
PDE solvers The FEM linear system
d l d i
n 1 1
i 1
i 0 dx dx dx ( x ) f ( x )dx
l
0
Al ,i Fl
1 F1
F
2 2
A
n Fn
11
12
13
14
15
Basis Weights
FEM The FEM linear system
d l d i
n 1 1
i 1
i 0 dx dx dx ( x ) f ( x )dx
l
0
Al ,i Fl
2 1 1 F1
1 2 1 F
1 2 2
1 2
x
1
1 2 n Fn
16
(SPD=Symmetric Positive Definite)
17
Gershgorin Circle Theorem Statement
Theorem Picture of Gershgorin
Im
Eigenvalues are in the
ith circle union of all the disks
radius
m
j i
i, j
Re
ith circle mi ,i
center
18
19
Partial Differential Equation Solvers
20
21
22
23
Partial Differential Equation Solvers
24
Demonstration Heat Conducting Bar
Example
lamp power u t
Lamp Input of
Interest
T0 0
Tend
Output of
Interest
25
Heat Flow 1-D
Example
Discrete Representation
T (1)
T (0)
T1 T2 TN 1 TN
26
Heat Flow 1-D
Example
Equation Formulation
Ti 1 Ti
Incoming Heat (hs ) hi 1,i heat flow
x
hi 1,i hi ,i 1 hs x
Ti 1 hi ,i 1 Ti hi 1,i Ti 1
x Incoming
Heat in Heat out
from left from right heat per
unit length
Limit as the sections become vanishingly small
h( x) T ( x)
lim x 0 hs ( x)
x x x 27
Finite Difference approximation
28
Heat Conducting Bar
Demonstration
Example Basic Equations
Heat In
T0 0
Tend
x
• Temperature Differential Equation
T ( x, t ) T x, t
2
h x u t
specific
t thermal x 2
conductivity scalar
heat input
• Spatial Discretization (except at end)
dTˆi
dt
x
2
T
ˆ 2Tˆ Tˆ h x u t
i 1 i i 1 i
29
Heat Conducting Bar
Demonstration
Example Input-Output Discrete
Equations
Heat In
T0 0
Tend
x
dTˆi
dt
x
2
T i 1 i
ˆ 2Tˆ Tˆ h x u t i 1, , N 1
i 1 i
dTˆi
dt
x
2
Tˆ Tˆ
N
N 1 h xN u t
Tend TˆN
30
Heat Conducting Bar
Demonstration
Example State-Space Description
Heat In
T0 0
Tend
x
dx t
A x t b u t T
y
(t ) c x t
dt NxN Nx1
scalar Nx1
scalar
input output
2 1 0 0 h x1 0
1
2 h x
2
Given the A A 0 0 b c
right scaling 2 1 0
0 0 1 1 h xN 1
31
Partial Differential Equation Solvers
32
FD and FEM (hat basis)
Comparing 1D problem
2 1 1 1 ( x ) f ( x ) dx
1
1 2 10
FEM
1 2 2 ( x ) f ( x ) dx
x 1 0
1 ( x ) f ( x ) dx
1 2 n n
0
2 1 uˆ1 f ( x1 )
FD 1 2 uˆ f ( x )
1 2 2
x
2
1
ˆ
1 2 un f ( xn )
33
Partial Differential Equation Solvers
34
Structural Analysis of
Automobiles
• Equations
– Force-displacement relationships for mechanical
elements (plates, beams, shells) and sum of forces = 0.
– Partial Differential Equations of Continuum Mechanics
35
Drag Force Analysis of
Aircraft
• Equations
– Navier-Stokes Partial Differential Equations.
36
Engine Thermal
Analysis
Picture from
www.adina.com
• Equations
– The Poisson Partial Differential Equation.
37
2-D Discretized Problem
FD Matrix
properties Discretized Poisson
m
x1 x2 xm
m xm 1 x2m
u j 1 2u j u j 1 u j m 2u j u j m
- - f (x j )
x y
2 2
u u
xx yy
38
2-D Discretized Problem
FD Matrix
properties Matrix Nonzeros, 5x5 example
39
3-D Discretization
FD Matrix
properties Discretized Poisson
m x j m
m x j m2
x j 1 xj
m
x j 1
x j m2
x j m
uˆ j 1 2uˆ j uˆ j 1 uˆ j m 2uˆ j uˆ j m uˆ j m2 2uˆ j uˆ j m2
- - - f (x j )
(x) 2
(y ) 2
( z ) 2
u xx u yy u zz
40
3-D Discretization
FD Matrix
properties Matrix nonzeros, m = 4 example
41
Summary
FD Matrix
properties Numerical Properties
44
Course Outline
45