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

Modeling_Simulation_Lecture6

Uploaded by

zarandluxurey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Modeling_Simulation_Lecture6

Uploaded by

zarandluxurey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

10/12/2019

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

 Pantelides’structural analysis
 Index reduction using dummy derivatives

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

1
10/12/2019

 Initialization of ODEs  t )  f(t , x(t )) = 0


x(
•Initialize states x(t0 )  x 0
OR

•Initialize state derivatives  t0 )  x 0


x(
Provided
OR unique
solution
•Provide equations  t0 ))  0
C (x(t0 ), x(

Always nx degrees of freedom (DOF), in the form of initial conditions


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

 t )) = 0
f(t , x(t ), x(

nx equations 2nx  nx  nx DOF for initialization?


2nx variables

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

2
10/12/2019

 Given DAEs x1  x2  x3  f1


x2  x1  f 2
x2  f3
 How many DOF for initialization?
x3  f1  ( f2  
f3  f3 )
Rewrite DAEs as x  f  f
1 2 3

x2  f3

All algebraic equations  absolutely no degrees of freedom!

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

Index-1 DAE (not semi explicit) I ) y1  y 2  y1  g1 (t )


II ) y2  g 2 (t )

y2 (0) and y 2 (0) are given


Specify y1 (0) or y1 (0)
by g 2 (0) and g 2 (0)

However, specifying y1 (0), we cannot obtain a unique solution for y1 (0)
because y 2 (0) is not known from the DAE.

We need another equation: y 2 (0)  g 2 (0)

This equation was hidden in the DAE and was only revealed after
differentiation of (II).
Copyright © Ali M. Sahlodin, Dept. of Chemical Engineering, AmirKabir Univ. of Tech. 6

3
10/12/2019

 Initial conditions must satisfy both DAE and


its hidden constraints
I) y1 (0)  y 2 (0)  y1 (0)  g1 (0) Original DAE
II) y2 (0)  g 2 (0)
III) y 2 (0)  g 2 (0) Hidden constraint
IV) y1 (0)  a
User-specified condition (degree
of freedom)

Now, we have 4 equations and 4 unknowns  unique solution


for consistent initialization

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

F, C1
dC2
I) (t )  C1 (t )  C2 (t )
dt
II) C2 (t )   (t )

How many DOF for consistent initialization? F, C2

C2 (0)   (0), C 2 (0)   (0)


C 2 (0)  C1 (0)  C2 (0)  C1 (0)  C 2 (0)  C2 (0)   (0)   (0)
C (0)  C (0)  C (0)  C (0)  C (0)  C (0)  (0)   (0)
2 1 2 1 2 2

Both initial concentrations and their derivatives are already determined.

No degrees of freedom!

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

4
10/12/2019

F, C1
Class exercise

dC2
I) (t )  C1 (t )  C2 (t )
dt
II) C1 (t )   (t ) F, C2

How many DOF for consistent initialization?

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

1) Find and differentiate minimal subset of DAEs


to obtain DAEs of index<=1.
2) Form the initialization system by collecting all
differentiated equations together with original
DAEs.
3) Obtain degrees of freedom by comparing total
no. of equations with total number of variables
(including all new eqs. and variables)
4) Specify as many variables as needed.
5) Solve the initialization system.

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

5
10/12/2019

 How many DOF exists here? I) x1  x2  a (t )


 Apply Pantelides’ algorithm II) x1  x22  b(t )
 Only Eq. (II) must be differentiated.
I) x1  x2  a (t )
Collect all equations II) x1  x22  b(t )
III) x1  2 x2 x2  b(t )
Four variables: x1 , x1 , x2 , x2
1 degree of freedom
Three equations

The new Eq. (III) did not introduce any new variables. So, it was a
hidden constraint and reduced DOF by 1.

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

 Verify using Pantelides’ initialization algorithm


that the following DAEs have zero DOF.
x1  x2  x3  f1
x2  x1  f 2
x2  f3

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

6
10/12/2019

 Semi-explicit index 1

0  f(t , x(t ), y(t ), x(


 t )), nx eqs
0  g(t , x(t ), y(t )) ny eqs
2 nx  n y variables nx degrees of freedom

No hidden constraints


Straightforward initialization
•e.g., initialize nx differential variables

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

 Example I) x1  x1  x2
II) 0  x1  2 x2  a(t )
 By observation, x1(0) can be specified.
 Verify by differentiating (II):

I) x1  x1  x2
III) 0  x1  2 x2  a (t )

The new Equation (III) introduces a new variable x2 . So, still one DOF
exists.
Equation (III) did not reveal a hidden constraint.

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

7
10/12/2019

F, C1
dC2
I) (t )  C1 (t )  C2 (t )
 Mixing tank revisited dt
II) C2 (t )   (t )

We already know this system has no DOF. But let’s assume we F, C2


don’t know this and want to specify C2(0)=β≠α(0)

Apply implicit Euler

 C2 (t1 )  C2 (0)  (t1 )  


  C1 (t1 )  C2 (t1 ) C1 (t1 )  + (t1 )
 h h
C2 (t1 )   (t1 )

As the solver reduces h to get better accuracy, α(t1) does not approach β.

Iterations do not converge and the solver fails!

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

 Initial
conditions for DAEs must satisfy both
DAEs and their hidden constraints.
 Hidden constraints can exist for implicit
index-1 and higher index DAEs.
 Inconsistent initial conditions can lead to
convergence problems or solver failure.

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

You might also like