gproms pres (1)

24
Princeton University A Stability/Bifurcation Framework For Process Design C. Theodoropoulos 1 , N. Bozinis 2 , C. Siettos 1 , C.C. Pantelides 2 and I.G. Kevrekidis 1 1 Department of Chemical Engineering, Princeton University, Princeton, NJ 08544 2 Centre for Process System Engineering, Imperial College, London, SW7 2BY, UK

Upload: mruet04

Post on 11-Jul-2016

84 views

Category:

Documents


4 download

DESCRIPTION

GProms

TRANSCRIPT

Page 1: Gproms Pres (1)

Princeton University

A Stability/Bifurcation FrameworkFor Process Design

C. Theodoropoulos1, N. Bozinis2, C. Siettos1,

C.C. Pantelides2 and I.G. Kevrekidis1

1Department of Chemical Engineering,Princeton University, Princeton, NJ 08544

2 Centre for Process System Engineering, Imperial College, London, SW7 2BY, UK

Page 2: Gproms Pres (1)

Princeton University

Motivation• A large number of existing scientific, large-scale legacy codes

–Based on transient (timestepping) schemes. • Enable legacy codes perform tasks such as bifurcation/stability analysis

–Efficiently locate multiple steady states and assess the stability of solution branches.–Identify the parametric window of operating conditions for optimal performance–Locate periodic solutions

•Autonomous, forced (PSA,RFR)–Appropriate controller design.

• RPM: method of choice to build around existing time-stepping codes.–Identifies the low-dimensional unstable subspace of a few “slow” eigenvalues–Stabilizes (and speeds-up) convergence of time-steppers even onto unstable steady-states.–Efficient bifurcation analysis by computing only the few eigenvalues of the small subspace.•Even when Jacobians are not explicitly available (!)

parameter

bif.

quan

tity

Page 3: Gproms Pres (1)

Princeton University

Recursive Projection Method (RPM)

• Recursively identifies subspace of slow eigenmodes, P

Subspace P of few slow eigenmodes

Subspace Q =I-P

Reconstruct solution:u = p+q = PN(p,q)+QF

Pica

rdite

ratio

ns Newtoniterations

• Treats timstepping routine, as a “black-box”

– Timestepper evaluates un+1= F(un)Initial state un

TimesteppingLegacy Code

Convergence?

Final state uf

F(un)

YES

Picard iteration

NO

• Substitutes pure Picard iteration with–Newton method in P–Picard iteration in Q = I-P

• Reconstructs solution u from sum of the projectors P and Q onto subspace P and its orthogonal complement Q, respectively:

–u = PN(p,q) + QF

F.P.I.

Page 4: Gproms Pres (1)

Princeton University

gPROMS:A General Purpose Package

gPROMS

gPROMS Model

Steady-state &

Dynamic Simulatio

n

Steady-state &

Dynamic Optimisatio

n

Parameter Estimatio

n Data Reconciliation

Nonlinear algebraic equation solvers

Differential algebraic equation solvers

Dynamic optimisation

solvers

Maximum likelihood estimation

solvers

Nonlinear programming

solvers

Page 5: Gproms Pres (1)

Princeton University

Mathematical solution methods in gPROMS• Combined symbolic, structural & numerical techniques

symbolic differentiation for partial derivatives automatic identification of problem sparsity structural analysis algorithms

• Advanced features: exploitation of sparsity at all levels support for mixed analytical/numerical partial derivatives handling of symmetric/asymmetric discontinuities at all levels

• Component-based architecture for numerical solvers open interface for external solver components hierarchical solver architectures

• mix-and-match• external solvers can be introduced at any level of the hierarchy

•well-posedness•DAE index analysis•consistency of DAE IC’s•automatic block triangularisation

Page 6: Gproms Pres (1)

Princeton University

FitzHugh-Nagumo: An PDE-based Model

• Reaction-diffusion model in one dimension• Employed to study issues of pattern formation

in reacting systems – e.g. Beloushov-Zhabotinski reaction– u “activator”, v “inhibitor” – Parameters: – no-flux boundary conditions – , time-scale ratio, continuation parameter

• Variation of produces turning points and Hopf bifurcations

0.2,03.0,0.4δ 10 aa

)(εδ 012

32

avauvv

vuuuu

t

t

Page 7: Gproms Pres (1)

Princeton University

Bifurcation Diagrams

<u>

Around Hopf Around Turning Point

Page 8: Gproms Pres (1)

Princeton University

Eigenspectrum Around Hopf

Page 9: Gproms Pres (1)

Princeton University

Eigenvectors= 0.02

Page 10: Gproms Pres (1)

Princeton University

Arc-length continuation with gPROMS

),(y pyfdtd

System:

0

]*);([y

pyfDet

Solve (1) & (2)

p

y

),( pyf0 (1)Pseudo – arc length condition

0)()()()(1

011

01

Spp

Sppyy

Syy T

(2)

continuation(II)

throughFORTRAN

F.P.Icontinuation

(I)within

gPROMS

Page 11: Gproms Pres (1)

Princeton University

System Jacobian

R.P.M.through

FORTRAN

F.P.I

Getting systemJacobian

through an FPI

F.P.IContinuation

within gPROMS

xg

yg

yf

xf

1

Stability matrix

xpxf

),(

Jacobian of the ODE

DAEs :),,( pyxf

dtdx

),,( pyxg0)(* xyy ),( px

dtdx fODEs :

Cannot get “correct”Jacobian from augmented system

Obtain “correct”Jacobian of leading eigenspectrum

Page 12: Gproms Pres (1)

Princeton University

Tubular Reactor: A DAE system

Dimensionless equations:

]/1

exp[)1(2

21

121

21

11

xxxDa

zx

zxPe

tx

wxxxxBDax

zx

zxPe

tx

22

212

222

21

22 ]

/1exp[)1(

Boundary Conditions:

0),0(11

1 xPez

tzx 0),0(22

2 xPez

tzx

0),1(1 z

tzx 0),1(2

z

tzx

(1)

(4)

(2)

(3)

Eqns (1)-(4): system of DAEs. Can also substitute to obtain system of ODEs.

Page 13: Gproms Pres (1)

Princeton University

Bifurcation/Stability with RPM-gPROMS

0

0.2

0.4

0.6

0.8

1

0.1 0.11 0.12 0.13 0.14

Da

x1

Hopf pt.

•Model solved as DAE system•2 algebraic equations @ each boundary

•101-node FD discretization•2 unknowns (x1,x2) per node •State variables: 99 (x 2) unknowns at inner nodes•Perform RPM-gPROMs at 99-space to obtain correct Jacobian

Page 14: Gproms Pres (1)

Princeton University

Eigenspectrum

-1

-0.5

0

0.5

1

-1 -0.5 0 0.5 1 1.5

-1

-0.5

0

0.5

1

-1 -0.5 0 0.5 1 1.5

Da=0.110021

Da=0.1217380.00E+00

1.00E-02

2.00E-02

3.00E-02

4.00E-02

5.00E-02

6.00E-02

0 20 40 60 80 100 120

0.00E+00

5.00E-03

1.00E-02

1.50E-02

2.00E-02

2.50E-02

3.00E-02

3.50E-02

0 20 40 60 80 100 120

Re

Im

Page 15: Gproms Pres (1)

Princeton University

+

)(yq)(yAq kk

SYSTEM AROUND STEADY STATE

y(k)

)(yy kk 1

C h o o s e 1q w i t h 11 q

F o r j = 1 U n t i l C o n v e r g e n c e D O

( 1 ) C o m p u t e a n d s t o r e jAq

( 2 ) C o m p u t e a n d s t o r e jtqAqh tjjt ,...2,1,,,

( 3 )

j

ttjtjj qhAqr

1,

( 4 ) 2/1,1 , jjjj rrh

( 5 ) jjjj hrq ,11 /

E n d F o r

ε q

LeadingSpectrum

-1

-0.5

0

0.5

1

-1 -0.5 0 0.5 1

Matrix-free ARNOLDI

Large-scale eigenvalue calculations(Arnoldi using system Jacobian):R.B. Lechouq & A.G. Salinger, Int. J. Numer. Meth.(2001)

Stability Analysis without the Equations

Page 16: Gproms Pres (1)

Princeton University

•Isothermal operation•Modeling Equations (Nilchan & Pantelides)

Step 1 : Pressurisation

Step 2: Depressurisation

Rapid Pressure Swing Adsorption1-Bed 2-Step Periodic Adsorption Process

t=0 to T/2

Ci(z=0)=PfYf/(RTf)

P(z=0)=Pf

z=0

z=L

t= T/2 to T

P(z=0)=Pw

0)0( z

zCi

)(

)1(180

)(

3

2

2

1

2

2

iiiii

b

b

p

n

ii

ii

iib

it

qpmktq

dv

zP

CRTP

zCD

zvC

tq

tC

Mass balance in ads. bed

Darcy’s law

Rate of ads.

Page 17: Gproms Pres (1)

Princeton University

Rapid Pressure Swing Adsorption1-Bed 2-Step Periodic Adsorption Process

Production of oxygen enriched air

Zeolite 5A adsorbent (300m)

Bed 1m long, 5cm diameter

Short cycle

–1.5s pressurisation, 1.5s depressurisation

– T= 3s

Low feed pressure (Pf = 3 bar)

Periodic steady-state operation

–reached after several thousand cycles

q ,c (t=0) q , c (t=T/2)

q , c (t=T)

Must obtain:q , c (t=T) = q , c (t=0)

Page 18: Gproms Pres (1)

Princeton University

Typical RPSA simulation results(Nilchan and Pantelides, Adsorption, 4, 113-147, 1998)

20

25

30

35

40

45

50

0 50 100 150 200

c1(z=0.5) (mol/m3)

Time (s)

-1

-0.5

0

0.5

1

-1 -0.5 0 0.5 1

Page 19: Gproms Pres (1)

Princeton University

PRM-gPROMS Spatial Profiles (t=T)

q1 mol/kg

0

0.1

0.2

0.3

0 0.2 0.4 0.6 0.8 1x

q2 mol/kg

0

0.1

0.2

0.3

0 0.2 0.4 0.6 0.8 1x

c1 mol/m3

0

10

20

30

0 0.2 0.4 0.6 0.8 1x

c2 mol/m3

0

30

60

90

0 0.2 0.4 0.6 0.8 1x

z z

z z

Page 20: Gproms Pres (1)

Princeton University

Leading Eigenvectors, =0.99484

c1

c2

q1

q2

0

0.04

0.08

0.12

0.16

0

0.0004

0.0008

0.0012

-0.15

-0.1

-0.05

09 0 1 0 0 1 1 0 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 1 7 0

-6.00E-04

-4.00E-04

-2.00E-04

0.00E+00

c1

c2 q2

q1

Page 21: Gproms Pres (1)

Princeton University

Conclusions• Can construct a RPM-based computational framework around large-scale

timestepping legacy codes to enable them converge to unstable steady states and efficiently perform bifurcation/stability analysis tasks. – gPROMS was employed as a really good simulation tool– communication with wrapper routines through F.P.I.

• Both for PDE and DAE-based systems. • Have “brought to light” features of gPROMS for continuation around turning

points and information on the Jacobian and/or stability matrix at steady states of systems.

• Employed matrix-free Arnoldi algorithms to perform stability analysis of steady state solutions without having either the Jacobian or even the equations!

• Used the RPM-based superstructure to speed-up convergence and perform stability analysis of an almost singular periodically-forced system

• Have enabled gPROMS to trace autonomous limit cycles• Newton-Picard computational superstructure for autonomous limit cycles.

Page 22: Gproms Pres (1)

Princeton University

gPROMS

• General purpose commercial package for modelling, optimization and control of process systems.

• Allows the direct mathematical description of distributed unit operations• Operating procedures can be modelled

– Each comprising of a number of steps• In sequence, in parallel, iteratively or conditionally.

• Complex processes: combination of distributed and lumped unit operations– Systems of integral, partial differential, ordinary differential and algebraic equations

(IPDAEs). – gPROMS solves using method of lines family of numerical methods.

• Reduces IPDAES to systems of DAEs.– Time-stepping or pseudo-timestepping.

• Jacobians NOT explicitly available. – Cannot perform systematic bifurcation/stability analysis studies.

Page 23: Gproms Pres (1)

Princeton University

Tracing Limit Cycles

continuation(I)

within gPROMS

continuation(II)

throughFORTRAN

F.P.I

R.P.Mthrough

FORTRAN

F.P.I

Getting systemJacobian

through an FPI

F.P.I

Tracing limit cycles

tracinglimit cycles

within gPROMS

Page 24: Gproms Pres (1)

Princeton University

Tracing Limit CyclesTracing limit cycles

),(y pyfdtd

SYSTEM:

Periodic Solutions: y(t+T)=y(t)

Period T not known beforehand

0),(

ypyf

dtdTdtd

0)()0y( Ty

( (0), ) 0G y p

( (0), ) (0) 0iG y p y a (0)( (0), ) 0idyG y p

dt