0% found this document useful (0 votes)
3 views

Modeling_Simulation_Lecture4

Uploaded by

zarandluxurey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Modeling_Simulation_Lecture4

Uploaded by

zarandluxurey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

10/8/2019

Ali M. Sahlodin
Department of Chemical Engineering
AmirKabir University of Technology
1397 S.H

 Local truncation errors in DAEs


 Differential index of DAEs and its
implications
 Handling high-index DAEs
 Index reduction

 Next: Advantages of DAE forms

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 2

1
10/8/2019

 Original DAE form is


 More natural
 Easier to interpret
 Easier to troubleshoot

x
mxT 0
L
y
my mg T 0
L
x 2  y 2  L2 0

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 3

 Plantmodel generated by a simulation


program.
 Model automatically fed into the solver
 Manual modifications and index reduction
may break the automation

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 4

2
10/8/2019

What is sparsity?
2 8 0 0 1
0 5 0 3 0 •9 nonzero elements
  •16 zero elements
0 0 6 0 0 •64% sparse
 
0 0 0 4 1
0 0 0 0 5 

 Zero elements are identically zero


 Sparsity occurs frequently in physics and
engineering models
Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 5

Why are sparse systems common?

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 6

3
10/8/2019

 Identify sparse structure


 Structural analysis
 Keep a list of structurally zero elements
 Exclude zero elements from calculations
 Reduced computational cost
 Very important in large-scale simulations

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 7

F, C1
Index 2 DAE Index reduction

dC2 F dC2 F
(t )   C1 (t )  C2 (t )   0 (t )   C1 (t )  C2 (t )   0
dt V dt V
C2 (t )   (t )  0 dC1 F V
(t )   C1 (t )  C2 (t )   (t )  0 F, C2
dt V F

Before After
 F F 
f  F F  V V 
 V V   
x    F
0 1  1
 V 
Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 8

4
10/8/2019

 Differentiation replaces algebraic constraints


with differential equations.
 Numerical solution of differential equations
can drift off the algebraic constraints.

 The pendulum example:


x
mxT 0
L
y
my mg T 0
L Physical constraint
x 2  y 2  L2 0 should hold at all times

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 9

 Simulation of index-0 pendulum (ode45)

Simulation goes crazy!

Algebraic constraint violated!

X2+y2=L2

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 10

5
10/8/2019

 Add the algebraic constraints back to the


system after index reduction is done.
 Resulting system is over-determined.

Index reduction

f (t , x, x )  0 x  f ( x, t )
Introduce
x  f ( x, t ) new variables
x  f ( x, t )  g Tx 
0  g ( x, t )
0  g ( x, t )
Over-determined

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 11

The constraint stabilized system


 has the same analytical solution as the original
DAE.
 is an index 2 DAE (check it!)
 Ensures the physical constraint remains satisfied
despite truncation errors in state calculations.

x  f ( x, t )  g Tx 
0  g ( x, t )

Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 12

You might also like