steady state analysis - uniwersytet rolniczy · steady state analysis paweł ptaszek process...

37
Steady state analysis Pawel Ptaszek Process Dynamics Steady state analysis Pawel Ptaszek Cracov University of Technology February 26, 2013 1 / 30

Upload: others

Post on 22-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Steady state analysis

Paweł Ptaszek

Cracov University of Technology

February 26, 2013

1 / 30

Page 2: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

We will analyze situation when t →∞, derivative ∂x∂t = 0.

Our chemical engineerig objects will be in steadystate. Forlumped objects like CSTR’s we obtain nonlinear algebraicsystem of equestions in the folowing form (good example forfurther analysis):

1ταA − rA(αA,T ) = 0

(T0 − T ) + (∆Tad) · rA(αA,T )− U(T − Tq) = 0

We can’t solute this system of equations analytically but wehave numerical methods ...

2 / 30

Page 3: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Newton method:

f1 =1ταA − rA(αA,T )

f2 =1τ

(T0 − T ) + (∆Tad) · rA(αA,T )− U(T − Tq)

x =

[αAT

]f =

[f1f2

]∂f∂x

=

[∂f1∂αA

∂f1∂T

∂f2∂αA

∂f2∂T

]iteration scheme (staring from aproximation solution x0):

xi+1 = xi −(∂f∂x

)−1· f

This method is not comfortable because on each iteration stepwe must invert the Jacobi matrix.

3 / 30

Page 4: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

More flexible is Newton-Krylov method:

xi+1 = xi − c

on each iteration we must solve system of equations, wherevector c is unknown: (

∂f∂x

)· c = f

This modification is much faster than classical Newton methodand is very good for sparse problems.

4 / 30

Page 5: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Using described methods we obtain only one solution. Sometimes we need the family of solutions as a function of theselected parameter (λi ). In our case (CSTR) vector of controlparameters looks like as folow:

λ =

τT0

∆TadUTq

Then we tabulated our solutions as parameter function. Itcould happen that it exists more solutions for one valueparameter. Then we have a problem ...

5 / 30

Page 6: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Continuation methods:The simplest case implicit function derivative. We shouldreduce our CSTR model to one equation: We must expressmass balance as a function αA = g(T , τ)and heat balance:

(T0 − T ) + (∆Tad) · rA(αA,T )− U(T − Tq) = 0

in compact form:Ψ(T , λi ) = 0

Now we calculate implicit function Ψ(T , λi ) derivative (fromdefinition):

dλidT

= −∂Ψ∂T∂Ψ∂λi

6 / 30

Page 7: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Last equation can be regarded as nonlinear initial valueproblem and can be integrate well known methods: Euler, Gear,Runge-Kutta, etc.The initial condition is any steadystate λi (T̄ ) = λ̄i0.Drawback of presented method is singularity when thederivations (denominator) ∂Ψ

∂λi= 0.

To solve this problem there are several methods:Predictors:

ODE-methods, including tangent (DERPAR); doi:10.1145/355666.355674polynominal extrapolation

Parametrizations:the parametrization as additional equationarclength and pseudoarclenght (AUTO):http://indy.cs.concordia.ca/autolocal parametrization (PITCON); doi:10.1145/357456.357461

7 / 30

Page 8: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Using continuation method we obtain bifurcation diagram:

300

350

400

450

500

550

300 310 320 330 340 350 360 370 380 390 400

T,K

T0

Turning point

Turning point

Steady state curve

Steady state diagram

, K

8 / 30

Page 9: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Analysis of bifurcation diagram gives information about:

structure of steady states,

range of occurrence of multiple steady states,

number of steady states,

location of turning points (static bifurcations).

9 / 30

Page 10: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Analysis of bifurcation diagram gives information about:

structure of steady states,

range of occurrence of multiple steady states,

number of steady states,

location of turning points (static bifurcations).

9 / 30

Page 11: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Analysis of bifurcation diagram gives information about:

structure of steady states,

range of occurrence of multiple steady states,

number of steady states,

location of turning points (static bifurcations).

9 / 30

Page 12: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Analysis of bifurcation diagram gives information about:

structure of steady states,

range of occurrence of multiple steady states,

number of steady states,

location of turning points (static bifurcations).

9 / 30

Page 13: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Analysis of bifurcation diagram gives information about:

structure of steady states,

range of occurrence of multiple steady states,

number of steady states,

location of turning points (static bifurcations).

9 / 30

Page 14: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

When we made continuation as a function of another controlparameter, we obtained the structure called: fold.

4060

80100

120140

160180

Tad, K

300320

340360

380400

T0, K

0

100

200

300

400

500

600

700

T, K

thre

e st

eady

stat

es

... but this procedure is very computer time consuming, so wemake continuation of the turning points (static bifurcations)and obtain catastrophic cross section

10 / 30

Page 15: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

More complex example: cascade of n nonisothermal CSTR withrecycle and A→B reaction:

(ξαn − αi ) + τi ri (αi , θi ) = 0

(ξθn − θi ) + τiηri (αi , θi )− τiwi (θi − θq) = 0

ri = (1− αi )k0 exp(− γ

1 + θi

)i = 1, · · · , n − 1

Now: n = 4, η = 0.333, γ = 28, k0 = 109s−1, wi = 0.0055,θq = 0, ξ = 0.05, τi = τ

11 / 30

Page 16: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

0.00

0.05

0.10

0.15

0.20

0.25

0 20 60 100 140 1800.00

0.05

0.10

0.15

0.20

0.25

0 20 60 100 140 1800.00

0.05

0.10

0.15

0.20

0.25

0 20 60 100 140 1800.00

0.05

0.10

0.15

0.20

0.25

0 20 60 100 140 180

0.00

0.10

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

0 20 60 100 140 1800.00

0.10

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

1.00

0 20 60 100 140 1800.00

0.10

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

1.00

0 20 60 100 140 1800.00

0.10

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

1.00

0 20 60 100 140 180

CSTR-1 CSTR-2 CSTR-3 CSTR-4

, s

12 / 30

Page 17: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

0.325

0.33

0.335

0.34

0.345

20 40 60 80 100 120 140 160

, s

0.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7

0 20 40 60 80 100 120 140 160

, s

1

3

5

7

9

5

3

1

1

13 / 30

Page 18: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Analysis of steady states in distributed objects (BVP problems).Nonisothermal tubular reactor with longitudinal dispersion(A→ B):

1Pem

d2αdz2− dαdz

+ τ r(α, θ) = 0

1Peq

d2θdz2− dθdz

+ τηr(α, θ)− Q(θ − θQ) = 0

α(0)− 1Pem

dα(0)

dz= 0,

dα(1)

dz= 0

θ(0)− 1Peq

dθ(0)

dz= 0,

dθ(1)

dz= 0

14 / 30

Page 19: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

After substitutions α = u1, dαdz = u2, θ = u3, dαdz = u4:

du1dz

= u2

du2dz

= Pem[u2 − τ r(u1, u3)]

du3dz

= u4

du4dz

= Peq[u4 − τηr(u1, u3)] + Q(u3 − θQ)]

Bondary conditions:

Pemu1(0)− u2(0) = 0, u2(1) = 0

Pequ3(0)− u4(0) = 0, u4(1) = 0

15 / 30

Page 20: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Backward shooting method: Assume values of u1(1), u3(1)

u2(1) = 0

u4(1) = 0

Backward integrate model of our reactor from z = 1 to z = 0and On the begining we have system of nonlinear algebraicequations conjugated with initial value problem:

f1 = Pemu1(0)− u2(0) = 0

f2 = Pequ3(0)− u4(0) = 0

If f1 and f2 cerates system of algebraic equations we will usecontinuation methods.

16 / 30

Page 21: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

0.6

0.7

0.8

0.9

1

1.1

1 2 3 4 5 6 7 8

, s

3 - stady states

1 - stady state

1 - stady state

5 - stady states

3 - stady states

3 - stady states

17 / 30

Page 22: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

0.00

0.20

0.40

0.60

0.80

1.00

0 1 2 3 4 5 6 7

, s

(1)

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

0.45

0.50

0 1 2 3 4 5 6 7

, s

(1)

18 / 30

Page 23: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

1

2

3

4

5

z

stable

unst

able

stable

stable

unsta

ble

0.00

0.20

0.40

0.60

0.80

1.00

0 1 2 3 4 5 6 7

�, s

�(1)

19 / 30

Page 24: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

0

0.1

0.2

0.3

0.4

0.5

0.6

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1z

1

2

3

4

5

stable

unsta

ble

stable

unstable

stable

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

0.45

0.50

0 1 2 3 4 5 6 7

�, s

�(1)

20 / 30

Page 25: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Other aplications of continuations methods in chemicalengineerig:

homothopy method for finding azeotropy points,

polymer-polymer-solvent equlibria,

least squares method for parameter estimations.

21 / 30

Page 26: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Other aplications of continuations methods in chemicalengineerig:

homothopy method for finding azeotropy points,

polymer-polymer-solvent equlibria,

least squares method for parameter estimations.

21 / 30

Page 27: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Other aplications of continuations methods in chemicalengineerig:

homothopy method for finding azeotropy points,

polymer-polymer-solvent equlibria,

least squares method for parameter estimations.

21 / 30

Page 28: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Other aplications of continuations methods in chemicalengineerig:

homothopy method for finding azeotropy points,

polymer-polymer-solvent equlibria,

least squares method for parameter estimations.

21 / 30

Page 29: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Homotopy method for finding azeotropes points.Azeotropes of an Nc component system satisfy the folowingsystem of nonlinear equations:

xo − y = 0

feq(xo , y ,T ,P) = 0

Nc∑i=1

yi − 1 = 0

T ,P, xoi , yi ­ 0

where xo is the liquid composition, y is vapor composition, andfeq is some equlibrium relationship between the liquid and thevapor.

22 / 30

Page 30: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Now we entroduce homotopy:

h(x , λ) = λ(xo − y) + (1− λ)(xo − y id)

where: λ ∈ [0, 1] is the homotopy parameter,first part of this sum is describing real (nonideal) vapor-liquidequlibrium:

xo − y = 0

second part describing ideal vapor-liquid equlibrium:

xo − y id = 0

and from Raoult’s law: y idi =PsatjP xoj

23 / 30

Page 31: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

By writing out the vapor-liquid equlibrium and sumation ofmole fractions explicitly, this system of equations can bereformulated as:

xo − y∗ = 0

y∗j − [λK oj + (1− λ)PsatjP

]xoj = 0

Nc∑i=1

y∗i − 1 = 0

where the nonideal vapor-liquid equlibrium is described by thefolowing expresion: K oj (y∗, xo ,T ,P). We have 2Nc + 1equations with 2Nc + 3 variables (xo , y∗,T ,P, λ). When wefixed pressure we obtain 2Nc + 2 variables. When λ iscontinuation parameters we have 2Nc + 1 equations with2Nc + 1 variables. y∗ is ”perturbed” vapor composition.

24 / 30

Page 32: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

We calculate the K oj using UNIFAC method (activitycoefficients), and saturated vapor pressure using Antoine’aequation in form:

log(Psati ) = A− BC + T

Our system: water, acrylic acid, methanol, methyl acrylate.

25 / 30

Page 33: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Polymer-polymer-solvent equlibria (Flory-Huggins theory):

∆µ1 = RT[

ln(φ1) +

(1− 1x2

)φ2 +

(1− 1x3

)φ3 + ζ1

]ζ1 = φ2φ3(χ12 + χ13 − χ23 + χ12φ

22 + χ13φ

23)

∆µ2 = RT[

ln(φ2) +

(1− x2x3

)φ3 + (1− x2)φ1 + ζ2

]ζ2 = x2(χ23 + φ23 + χ12φ

21 + φ1φ3(χ12 + χ23 − χ13)

∆µ3 = RT[

ln(φ3) +

(1− x3x2

)φ3 + (1− x3)φ1 + ζ3)

]ζ3 = x3(χ23 + φ22 + χ13φ

21 + φ1φ2(χ13 + χ23 − χ12)

26 / 30

Page 34: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

where: φ1 - volume fraction of solvent, φ2 - volume fraction ofpolymer 1, φ3 - volume fraction of polymer 2, χ12, χ13, χ23 areFlory -Huggins coefficients, and

xi =MiνiM1ν1

i = 1, 2, 3

νi - specific volume, Mi - molar massPhase equlibria conditions:

∆µα1 −∆µβ1 = 0

∆µα2 −∆µβ2 = 0

∆µα3 −∆µβ3 = 0

α and β are phases.27 / 30

Page 35: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

We have three equations with six variables (φαi and φβi ,i = 1, 2, 3). But φα,β3 = 1− (φα,β1 + φα,β2 ), and φα1 iscontinuation parameter. Finaly we obtain three equations withthree variables.The problem is to find one solutions to start our continuationprocedure.Numerical example:

x2 = 4 · 103

x3 = 103

χ12 = 0.4

χ13 = 0.048

χ23 = 0.00199

28 / 30

Page 36: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Solvent

Polymer 1 Polymer 2

II - phases

I - phaseI- phase

0.5

1

0.5

I- phase

29 / 30

Page 37: Steady state analysis - Uniwersytet Rolniczy · Steady state analysis Paweł Ptaszek Process Dynamics We will analyze situation when t →∞, derivative ∂x ∂t = 0. Our chemical

Steady stateanalysis

Paweł Ptaszek

Process Dynamics

Least squares method for parameter estimations.Homework !!

30 / 30