Sei sulla pagina 1di 45

Introduction to Model Order Reduction

I.2.b Assembling Models from


Partial Differential Equation Solvers

Luca Daniel

Thanks to Jacob White, Deepak Ramaswamy,


Michal Rewienski, and Karen Veroy, Jaime Peraire
and Tony Patera
Partial Differential Equation Solvers

• Finite Element Method (FEM)


– Heat Conducting Bar example
– The “hat” basis functions
– The Galerkin scheme
– The FEM linear system
– An FEM Example
• Finite Difference Methods
– Heat Conducting Bar
– Comparing FEM and F-D in 1-D
– 3-D Problems

2
PDE solvers 1-D Example

Incoming Heat

T (1)
T (0)
Near End Far End
Temperature Temperature
Unit Length Rod

Question: What is the temperature distribution along the bar


T

T (0)
T (1)
x
PDE solvers Heat flow example
Normalized 1-D Equation

Normalized Poisson 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 )   ii ( x )
i 1
• Examples
– exponentials e  jx

– cos, sin 1, cos(x ), sin(x )


– piecewise constant – piecewise linear
 (x )  (x )

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 2i  x 
 2  f R  x    i  f  x
x
2
i 1 dx

Force the residual to be “orthogonal” to the basis functions


1

   x  R  x  dt  0
0
l

Generates n equations in n unknowns


1
n 2
d i  x  
0 l  x   i 2
 f  x   dx  0 l   1,..., n
i 1 dx  8
Basis Weights
PDE solvers Galerkin with integration by
parts

Only first derivatives of basis functions


n

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

• Finite Element Method (FEM)


– Heat Conducting Bar example
– The “hat” basis functions
– The Galerkin scheme
– The FEM linear system
– An FEM Example
• Finite Difference Methods
– Heat Conducting Bar
– Comparing FEM and F-D in 1-D
– 3-D Problems

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

• Finite Element Method (FEM)


– Heat Conducting Bar example
– The choice of basis functions
– The Galerkin scheme
– The FEM linear system
– An FEM Example
• Finite Difference Methods
– Heat Conducting Bar
– Comparing FEM and F-D in 1-D
– 3-D Problems

20
21
22
23
Partial Differential Equation Solvers

• Finite Element Method (FEM)


– Heat Conducting Bar example
– The “hat” basis functions
– The Galerkin scheme
– The FEM linear system
– An FEM Example
• Finite Difference Methods
– Heat conducting bar: our “informal” Finite Difference
– Comparing FEM and F-D in 1-D
– 3-D Problems

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

1) Cut the bar into short sections


2) Assign each cut a temperature

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

• Finite Element Method (FEM)


– Heat Conducting Bar example
– The “hat” basis functions
– The Galerkin scheme
– The FEM linear system
– An FEM Example
• Informal Finite Difference Methods
– Heat Conducting Bar
– Comparing FEM and F-D in 1-D
– 3-D Problems

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

• Finite Element Method (FEM)


– Heat Conducting Bar example
– The “hat” basis functions
– The Galerkin scheme
– The FEM linear system
– An FEM Example
• Informal Finite Difference Methods
– Heat Conducting Bar
– Comparing FEM and F-D in 1-D
– 3-D Problems

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

Matrix is Irreducibly Diagonally Dominant


 
 | Aii |   | Aij | 
 j i 

Matrix is symmetric positive definite

Assuming uniform discretization, diagonal is


1 1 1
1  D  2 2, 2  D  2 4, 3  D  2 6,
  
42
Summary
FD Matrix
properties Structural Properties

Matrices in 3-D are LARGE


1  D  m  m, 2  D  m 2  m 2 , 3  D  m3  m3
100x100x100 grid in 3-D = 1 million x 1 million matrix
Matrices are very sparse
Nonzeros per row 1  D : 3, 2  D : 5, 3  D 
: 7

Matrices are banded


1 D Aij  0 |i j|  1 =b
2D Aij  0 |i j|  m = b
3 D Aij  0 | i  j |  m2 = b
43
Summary Assembling Models from
Partial Differential Equation Solvers

• Finite Element Method (FEM)


– Heat Conducting Bar example
– The “hat” basis functions
– The Galerkin scheme
– The FEM linear system
– An FEM Example
• Finite Difference Methods
– Heat Conducting Bar
– Comparing FEM and F-D in 1-D
– 3-D Problems

44
Course Outline

Numerical Simulation Today


Quick intro to PDE Solvers
Quick intro to ODE Solvers Tomorrow
Model Order reduction
Linear systems
Common engineering practice
Optimal techniques in terms of model accuracy Wednesday
Efficient techniques in terms of time and memory
Non-Linear Systems Thursday
Parameterized Model Order Reduction Friday
Linear Systems
Non-Linear Systems

45

Potrebbero piacerti anche