Dynamic Modeling and Optimizationof Large-Scale Cryogenic Processes
Maria Soledad Diaz
Planta Piloto de Ingeniería Química Universidad Nacional del Sur -CONICET
Bahía Blanca, ARGENTINA
2
Outline
Objective Natural Gas Processing Plants Methodology Mathematical Models Discussion of Results Conclusions and Current Work
3
Objective
Dynamic optimization model for natural gas processing plant units
• Dynamic energy and mass balances• Phase equilibrium calculations with cubic equation of state• Hydraulic correlations• Phase change in countercurrent heat exchanger• Carbon dioxide precipitation in column• Boiler dynamic optimization for controllers parameters
Simultaneous dynamic optimization approach
• Discretization of state and control variables• Resolution of large-scale Nonlinear Programming problem
Analysis of main variables temporal and spatial profiles
4
Natural Gas Processing Plants
Provide ethane as raw material for olefin plants (ethylene) and petrochemical
Technology: Turboexpansion High pressure Cryogenic conditions
5
NATURAL GAS PLANT
Pipelines
DEHYDRATION
TRAIN B
TRAIN A
TRAIN C
Ethane Treatment CO2
Propane
Butane
Gasoline Separation Fractionation
Ethane To Ethylene Plant
Absorption Plant
TRAIN A
TRAIN B
Compression/Recompression
DEHYDRATION
C2 C3 C4
C3
C3
C4
C4
To Recompression
6
Natural gas composition
Component Feed A Feed B
Nitrogen 1.44 1.37
Carbon dioxide 0.65 1.30
Methane 90.43 89.40
Ethane 4.61 4.43
Propane 1.76 2.04
Butanes 0.77 0.96
Pentanes+ 0.34 0.50
7
Cryogenic Sector
Turboexpander
HighPressureSeparator
to deethanizer column
Cryogenic Heat Exchangers
Demethanizer
8
Previous Work
Operating conditions optimization in natural gas processing plants (NLP) (Diaz, Serrani, Be Deistegui, Brignole, 1995)
Automatic design and debottlenecking of ethane extraction plants (MINLP) (Diaz, Serrani, Bandoni Brignole, 1997)
Thermodynamic model effect on the design and optimization of natural gas plants (NLP) (Diaz, Zabaloy, Brignole, 1999)
Flexibility of natural gas processing plants - Dual mode operation (Bilevel NLP) (Diaz, Bandoni, Brignole, 2002)
9
Dynamic Optimization Problem
min (z(tf),y(tf), u(tf), tf , p) z(t),y(t), u(t), tf , p
st
F(dz(t)/dt ,(z(t), y(t), u(t), p, t)=0G(z(t) , y(t), u(t), p, t) = 0
zO = z(0)
z(t) [zl, zu] , y(t) [xl, xu]u(t) [ul, uu] , p [pl, pu]
t, time tf, final timez, differential variables u, control variablesy, algebraic variables p, time independent parameters
General Formulation
10
Dynamic Optimization Strategy
Nonlinear DAE optimization problem
Discretization of Control and State variables
Collocation on finite elements
Large-Scale Nonlinear Programming Problem (NLP)
Interior Point Algorithm
Simultaneous Approach Cervantes, Biegler (1998)
Biegler, Cervantes, Waechter (2002)
11
Simultaneous Dynamic Optimization
Discretization of differential equations (DAEs) and state and control variables
Large-scale nonlinear problem Profile constraints handled directly Direct incorporation of equipment design variables DAE model solved only once Converges for unstable systems
12
Nonlinear Programming Problem
Application of Barrier method
0)(s.t xc
0 x
n
jjslnxfmin
1)(
0)(s.t xc
0 xs
As 0, x*() x*
13
Ts2_i = 322 K
ht
V
ToRecompression
ToTurboexpander
Natural Gas
Residual Gas
To Demethanizing Column
Cryogenic Heat Exchangers and HP Separator
Phase Change
Horizontal High Pressure Separator
Rodriguez, Bandoni, Diaz (2004)
14
Energy Balances: Partial Differential Equations System
)t,z(Tt)t,z(TsL*A*Cp*t
A*hz
)t,z(Ttvtt
)t,z(Tt
tt
supt
HE Model (no Phase Change)
Spatial Discretization: Finite Differences ODE System
)t,z(Ts)t,z(TtL*A*Cp*s
A*hz
)t,z(Tsvst
)t,z(Ts
ss
sups
Tube side
Shell side
15
Energy Balance at cell i
iissi
supsii
ii TsTtL*A*Cp*s
A*hTsTs
zvs
dtdTs
1
HE Model (no Phase Change)
E-1
Ts1 Ts2 Ts3 Ts4 Ts5 Ts6
Ts1 Ts2 Ts3 Ts4 Ts5 Ts6
Tt1 Tt2 Tt3 Tt4 Tt5 Tt6
Cold streamat Tt0
Hot streamat Ts0
iitti
suptii
ii TtTsL*A*Cp*t
A*hTtTt
zvt
dtdTt
1Tube side
Shell side
Multicell model
16
i,jjji,j T*BAz
ji,j
ji,j A*
Fv
i = 1, …, N (cells)j = tube or shell side
Algebraic Equations (no Phase Change)
G
ToRecompression
Natural Gas
Residual Gas
HE model DAE System
i,ji,ji,j T*R*z
P*M
17
Energy Balance at cell i
Algebraic Equations at cell i
tiiiiiiiii
i + Q*H - V*h - L*Hp + Vp*hpLpdt
dE
HE Model (Partial Phase Change on Shell Side)
j,ij,ij,i xKy
iidealii HHH
iidealii hhh
Vj,i
Lj,i
j,iK
i,mli,t T*A*UQ 0
j,i
nc
ji
idealj,i
ideali x)T(hh
1
j,i
nc
ji
idealj,i
ideali y)T(HH
1
j
j,ij
j,i xy 0
Rodriguez, Bandoni, Diaz (2005)
18
Compressibility factor
Residual enthalpies
Fugacity coefficients
HE Model (Partial Phase Change on Shell Side)
)x,Ps,Ts(zz
)y,Ps,Ts(zz
iiiLL
i
iiiVV
i
)x,Ps,Ts(
)y,Ps,Ts(
iiiLL
j,i
iiiVV
j,i
Soave-Redlich-Kwong EoS
Li
iLi
Li
i PmolsTs*R*z*sPs V
i
iVi
Vi
i PmolsTs*R*z*sPs
)x,Ps,Ts(hh
)y,Ps,Ts(HH
iiii
iiii
19
)(
)(**6.02)(
2
iimN
iPV
Tcww
432 )Re()Re()Re()Re()(
iE
iD
iC
iBAiKf
0max *)(*)(
)Re(DiVi
i V
)(**)(*)(*)( iPCRliPBiPAiP cwcs
2
2 )i(V)*i(*)i(Kf*NKa)i(P maxVcc
HE Model (Partial Phase Change on Shell Side)
Bell-Delaware method Pressure drop Pi
20
- VLp+ Vp - Ldt
dM
L
LinV
MLongDVol
2
2
2222
ttt
L
LL hrh
rharccosrr
PmolLongM
VVV VolM LV MMM
r
ttsv
hPPCL
High Pressure Separator
Horizontal tank
21
Turboexpander
Feed: vapor from High Pressure Separator
Polytropic expansion (η = 1.26, natural gas)
Assumption: Static mass and energy balances
Thermodynamic predictions: Soave-Redlich-Kwong
Algebraic equations: Same as Flash
Outlet partially condensed stream: to Demethanizing column
1
e
s
e
s
PP
TT
22
iiiiii LVLVF
dtdM 11
j,iij,iij,iij,iij,iiij xLyVxLyVzF
dtdm
1111 j=1,…,ncomp
iFiiFiiiiiiiiiiii QsrhHFhLHVhLHV
dtdE 11111
Differential Equations at stage i (1 ≤ i ≤ N)
Demethanizing Column
Diaz, Tonelli, Bandoni, Biegler (2003)
N = 8; ncomp = 10
23
Algebraic Equations
Vj,i
Lj,i
j,iK
j,ij,ij,i xKy
iidealii HHH
iidealii hhh
Demethanizing Column
Compressibility factor ( )
Residual enthalpies (Hi, hi)
Fugacity coefficients ( )
Li
Vi zz ,
Lji
Vji ,, ,
SRK
j
j,ij
j,i xy 0
24
Vapor volume
Demethanizing Column
Li
Li
i,plateiV
iMHDVol
2
2
Vi
Vi
Vi VolM
Li
Vii MMM
j,iLij,i
Vij,i xMyMm
Vapor and liquid holdup
Component holdup
)ph(M)pH(ME Li
ii
LiV
i
ii
Vii
Internal energy holdup
Algebraic Equations
25
Liquid holdup and hydraulic correlations
Demethanizing Column
Liii
iLi HwoHwD.M
2
28960
Li
Li
Vi
Vi
iiVi
ii Pmol
PmolCoAhole
V..Ho
2410565
32
3201495030/
iLi
ii
/i Weirl
LFw.Hwo
iii HwoHwHldrop
2111 VKKPP V
TOP Pressure drop
Li
Liiiii PmolHldropHo..PP
5
1 10249170
26
Phase Equilibrium
Carbon dioxide solubility constraints
SCO,i
LCO,i
VCO,i fff 222
Demethanizing Column
SCO,i
LCO,i
VCO,i 222
Assumption
No hydrocarbon in solid phase
To avoid CO2 precipitation
But from VLE calculations at each stage
SCO,i
SCO,i ff 22
SCO,i
VCO,i ff 22
SCO,i
LCO,i ff 22
VCO,i
LCO,i ff 22
27
Solid phase
VCO,i
SCO,i
SCO,i Pf 222
154014114647
13566548014156814
3
2
2
2
22
2
2
2
tCO
it
CO
i
tCO
it
CO
i
i
tCO
tCO
SCO,i
TT.
TT.
TT.
TTln.
TT.
PP
ln
Vapor phase
VCO,iiCO,i
VCO,i Pyf 222
Carbon dioxide solubility constraints SCO,i
VCO,i ff 22
Demethanizing Column
28
Gibbs Free Energy minimization at stage i
Demethanizing Column: Phase Existence
Raghunathan, Diaz, Biegler (2004)
Karush Kuhn Tucker conditions
Raghunathan, Biegler (2003)
MPECs as additional constraints
IPOPT-C under AMPL
29
Demethanizing Column: Phase Existence
Relaxed Equilibrium Conditions
j,ij,ij,iiij,iij,i x)y,x,P,T(Ky
Li
Vii ss 1
0Li
Li Ms
0Vi
Vi Ms
00 Li
Vi s,s
,M,M
M,M
M,M
Vi
Li
Vi
Li
Vi
Li
001
001
001
30
Demethanizing Column: Phase Existence
Liquid Holdup and Hydraulic correlations
0 Li
Li MM
L
iLi
Lii
iLi MMHwD.M
2
28960
Lii
iLi HwoD.M
2
28960
32
3201495030/
iLi
ii
/i Weirl
LFw.Hwo
00 Li
Li M,M
2
3
)M(kL Lidi
31
)K(Tmin)/kmol(Gmin)/kmol(L
System DAE
.stdtTTmin
out
tfSP
3063038058060
20
Alg. Eqns = 403Differ. Eqns = 37
Optimization Problem: HEs + HPS
G
ht
L
T
Tout
(10+8 cells in HEs)
32
Optimization variables: G, L
20 elements
2 collocation points
18274 disc. variables
18 iter. (3 barrier problems)
Numerical Results: HEs + HPS
0 5 10 15 20 25 3065.300
65.305
65.310
65.315
65.320
65.325
65.330
h
Lt
Lt (K
mol
/min
)
time (min)
0.40
0.45
0.50
0.55
0.60
0.65
0.70
0.75
0.80
0.85
0.90
0.95
1.00
h (m
)
33
Numerical Results: HEs + HPS
Optimization variables: G, L
0 5 10 15 20 25 307071727374757677787980818283
Tout
G0
G0 (
Km
ol/m
in)
time (min)
300
301
302
303
304
305
306
307
Tt (K
)
0 5 10 15 20 25 30
211.4
211.5
211.6
211.7
211.8
211.9
212.0
Temperature vs time
Ts (K
)
time (min)
34
Temp. profile, tubes side Temp. profile, shell side (no phase change)
Numerical Results: HEs + HPS
35
Pressure profile, shell side Condensed fraction, shell side
Numerical Results: HEs + HPS
0 211.5 21
30.540 1
23
45
6
55.5
55.8
56.1
56.4
56.7
57.0
57.3
57.6
57.9
58.2
58.5
Ps (bar)
time (min) cells 0 2 11.5 21 30.5 40
12
34
56 0.0
5.0
10.0
15.0
20.0
25.0
30.0
35.0
L (Kmol/min)
time (min)cells
36
SCO,i
VCO,i
CH,B
REB
TOP
tfSPethane
f.f
.xmin)/kJ(Q
)bar(P
System DAE
.stdtmin
22
4
20
900
0080020099
2215
Alg. Eqns = 385Differ. Eqns = 97
Optimization Problem: Demethanizing Column
37
Numerical Results: Demethanizer
0 10 20 30 40 50
16
18
20
P Ethane recovery
Time (min)
Pto
p (b
ar)
70
72
74
76
78
80
82
Ethane recovery (%
)
Optimization variable: PTOP
20 finite elements2 collocation points21357 discretized variables40 iter. (3 barrier problems)ss = 80.9 %
Feed A: Low CO2 content (0.65%)
38
Numerical Results: Demethanizer
0 10 20 30 4016
18
20
P Ethane Recovery
Time (min)
Pto
p (b
ar)
72
76
80
84
Ethane recovery (%
)
Feed B: High CO2 content (2%)
Optimization variable: PTOP
20 finite elements2 collocation points43 iter. (3 barrier problems)
ss = 74.5 %
39
Numerical Results: Demethanizer
0 10 20 30 40 5016
18
20 P Ethane recovery
Time (min)
Pto
p (b
ar)
74
76
78
80
82
84
Ethane recovery (%
)
Feed B (high CO2 content)
No solubility constraints
Optimization variable: PTOP
20 finite elements2 collocation points59 iter. (4 barrier problems)
ss = 76.6 %
40
Numerical Results: Demethanizer
0 5 10 15 20 25 30 35 40162
164
166
168
170
172
174
176
178
QREBOILER
XCH4
Time (min)
Reb
oile
r Hea
t Dut
y (M
J/m
in)
0.003
0.004
0.005
0.006
0.007
0.008
Bottom
methane m
ole fraction
Feed A
Optimization variable:
Reboiler Heat Duty (QR)
20 finite elements2 collocation points57 iter. (5 barrier problems)
ss = 77.8 % (PTOP=19bar)
Active constraint: Methane mole fraction in bottoms
41
Numerical Results: Demethanizer Start Up
MPECs
Optimization variable:
PTOP, QR
Three time periods
Ideal Gas, Ideal solution
Solved in AMPL with IPOPT-C (Raghunathan, Biegler, 2003)
Time (min)
Etha
ne R
ecov
ery
42
Numerical Results: Demethanizer Start Up
MPECs
Optimization variable:
PTOP, QR
3rd time period17944 discretized variables576 complementarity constraints97 iterations
Time (min)
Reb
oile
r Hea
t Dut
y (M
J/m
in)
43
Boiler Dynamic Optimization
Rodriguez, Bandoni, Diaz (2005b)
E-1
CombustionChamber
Natural Gas Furnace Gas
Air
Superheater RISER 1 RISER 2
High Pressure Steam
Flue Gas
Feed Water
Dynamic optimization model to determine controller parameters
Boiler
Combustion chamber
Risers
Superheater
Steam drum
Gas path
PI Controller
(Liquid level in drum)
Manipulated: Feed water flowrate
44
Boiler Dynamic Optimization
DAE Optimization model Differential equations
• Momentum and energy balances in risers and superheater• Mass and energy balances in drum• Integral part of controller and valve equation
Algebraic equations• Friction loss• Mixture properties• Vapor holdup in drum• Gas – temperature distribution equations in furnace, risers ans
superheaters (6 eqns.)• Air / fuel ratio • Drum geometric relations (5 eqns.)• Steam tables correlations for saturated and high pressure steam
density, pressure and enthalpy
45
Boiler Dynamic Optimization
DAE Optimization model Optimization variables
• PI controller parameters
Step change in high pressure steam demand
Additional PI controllers (current work)• Outlet steam pressure (fuel gas flowrate)• Superheated steam temperature (air excess)
0 200 400 600 800 1000
22
24
26
28
30
32
Feed
Wat
er F
low
rate
(lb/
s)
Time (s)0 200 400 600 800 1000
-4
-2
0
2
4
6
Liqu
id L
evel
Dru
m (f
t)
Time (s)
46
Conclusions
Rigorous dynamic optimization models for cryogenic train in Natural Gas Processing plant within a simultaneous approach
Thermodynamic models with cubic equation of state
Carbon dioxide solubility addressed in both liquid and vapor phases as path constraints, at each column stage
Phase detection through the addition of MPECs for Gibbs free energy minimization
Boiler dynamic model for controller parameters
Simultaneous approach provides efficient framework for the formulation and resolution of DAE optimization problems for large-scale real plants
47
References
Biegler, L. T., A. Cervantes, A. Waechter, “Advances in Simultaneous Strategies for Dynamic Process Optimization,” Chem. Eng. Sci., 57, 575-593, 2002
Cervantes, A., L. T. Biegler, “Large-Scale DAE Optimization using Simultaneous Nonlinear Programming Formulations”, AIChE Journal, 44, 1038, 1998
Diaz, S., A. Serrani, R. de Beistegui, E. Brignole, "A MINLP Strategy for the Debottlenecking problem in an Ethane Extraction Plant"; Computers and Chemical Engineering, 19s, 175-178, 1995
Diaz, S., A.Serrani, A. Bandoni, E. A. Brignole, “Automatic Design and Optimization of Natural Gas Plants", Industrial and Engineering Chemistry Research, 36, 2715-2724, 1997
S. Diaz, M. Zabaloy, E. A. Brignole, “Thermodynamic Model Effect on the Design And Optimization of Natural Gas Plants”, Proceedings 78th Gas Processors Association Annual Convention, 38-45, March 1999, Nashville, Tennessee, USA
Diaz, S., A. Bandoni, E.A. Brignole “Flexibility study on a dual mode natural gas plant in operation”, Chemical Engineering Communications, 189, 5, 623-641, 2002
48
References
Diaz, S., S. Tonelli, A. Bandoni, L.T. Biegler, “Dynamic optimization for switching between steady states in cryogenic plants”, Foundations of Computer Aided Process Operations, 4, 601-604, 2003
Diaz, S., A. Raghunathan , L. Biegler, “Dynamic Optimization of a Cryogenic Distillation Column Using Complementarity Constraints”, 449d, AIChE Annual Meeting, San Francisco, Nov. 16-19, 2003. Advances in Optimization
Raghunathan, A., M.S. Diaz, L.T. Biegler, “An MPEC Formulation for Dynamic Optimization of Distillation Operations”, Computers and Chemical Engineering, 28, 2037-2052, 2004
M. Rodríguez, J. A. Bandoni, M. S. Diaz, “Optimal dynamic responses of a heat exchanger/separator tank system with phase change”, submitted to Energy Conversion and Management, 2004
Rodríguez, M., J. A. Bandoni, M. S. Diaz, “Dynamic Modelling and Optimisation of Large-Scale Cryogenic Separation Processes”, IChEAP-7, The Seventh Italian Conference on Chemical and Process Engineering, 15 - 18 May 2005a Giardini Naxos, Italy
Rodríguez, M., J. A. Bandoni, M. S. Diaz, “Boiler Controller Design Using Dynamic Optimisation”, PRES05, 8th Conference on Process Integration, Modelling and Optimisation for Energy Saving and Pollution Reduction, 15 - 18 May 2005b Giardini Naxos, Italy
49
Appendix: Soave Redlich Kwong Equation of State
)bV(TRa
bVVz
g
k
k,j*kjjjj
*j
*j
*j )k(xz;axx;zxa 1
j
cjcjgjj P/TR.b;bb 086640
505022
11427470
.
cjjj
.
cj
cjgj T
Tm;P
TR.a
217605741480 jjj ...m
Compressibility factor for a mixture
Soave modification (Temperature dependence)
)z,z( Vi
Li
50
Appendix: Soave Redlich Kwong Equation of State
zBln
bb
aza
BA)Bzln()z(
bb
ln j*jjjj
j 12
1
j j
j*j
*j
gg
mzx
zBln
TbRTRH
1
111
TRbPB;
TRPaA
gg
22
Fugacity Coeff. for component j in mixture ),( L
j,iV
j,i
Residual enthalpy in mixture )h,H( ii