Escolar Documentos
Profissional Documentos
Cultura Documentos
Introduction
All three steps are repeated in a cyclic manner. The first two tasks
are inverse problems and use suitable versions of the least-squares
function as objective functions. The objective functions for the latter
task usually include maximum current profit and production yield as
well as minimum feedstock and utilities consumption. Equality
constraints arise from the equations describing the flow-sheet.
Inequality constraints typically force the purity of the products to
obey certain minimum requirements of the customer or guarantee
the satisfaction of legal environmental restrictions. An ecient
application of all three steps requires the on-line operation of the
control system and the plant model. On-line operation in this case
comprises data transfer in both directions - from the process to the
plant model and vice versa - at unique user controlled points in
time. The simultaneous optimization of various continuous process
parameters together with integer quantities such as column feed or
side-draw points calls for mixed-integer nonlinear programming
methods in the o-line analysis.
In recent years dynamic simulation has become an increasingly
important tool in the process industries. It is used in a variety of oline applications, i.e. with no direct interactions with the actual
plant, like operability studies or safety and risk analyses. It allows
the investigation of start-up and shut-down procedures and,
together with optimal control techniques, even their systematic
optimization. Most important, dynamic flowsheeting is the basis for
the design of standard and advanced control strategies and a
platform for the preliminary implementation of the control systems.
This is decisive for a stable and ecient operation of a plant.
Furthermore, dynamic simulation models form the heart of
operator training systems. These simulation programs are used long
time before the completion of the plant to implement distributed
control systems and to train future op-erator personnel in
monitoring and controlling the design states of operation as well as
emergency situations. These applications make tough demands on
the eciency and robustness of the integration algorithms. To
represent the behavior of the actual plant the model must be solved
in real-time or faster. Data exchanged with the on-line operating
control system and operator input account for permanent
discontinuities in input values.
Dynamic simulation is increasingly used for dynamic on-line
optimization and identification of process information not directly
available through mea-surements. Both applications are an integral
part of modern model-based con-trol systems. Mathematically,
dynamic process simulation is governed by large systems of
dierentialalgebraic equations with discontinuities.
Principally, simulators for the above mentioned tasks follow two dierent
concepts in setting up and solving the plant simulation model:
Both strategies are compared and discussed e.g. in [2, 17, 26, 32, 43].
Practi4
2.1
OPTISIM
V, y j , h , T , P
Vapor
F, z j , h ,T , P
Feed
M
Heat Q
Liquid
d
dt
d
dt
L;V:
x j:
y j:
h ;h :
molar enthalpies of liquid and vapor,
L
V
T ; T ; T : temperatures in the drum and in the products,
L
V
P ; P : pressures in the products.
The pressure P in the drum, the added heat Q, the molar feed
flowrate
F
F as well as its mole fractions zj and its molar enthalpy h are given.
The number of components is denoted by nc. The row vectors x and y
collect the mole fractions of the liquid and the vapor, respectively:
x = (x1; : : : ; xnc ) ;
y = (y1; : : : ; ync ) :
(2.2)
Equation (2.1a) is the all over material balance, while (2.1b) are
individual material balances for the first nc 1 components. The last
component is de-termined by (2.1c). This equation as well as (2.1d)
expresses the fact, that the mole fractions in liquid and vapor sum
up to 1 . Thermodynamic equilibrium is ensured by (2.1d) and
(2.1e). The latter equations describe the relation between the mole
fractions in the vapor phase and in the liquid phase. The so-called
Kvalues Kj depend on pressure, temperature and mole fractions of
the liquid and vapor phase. They are determined by a physical
property system based on given T , P , x, and y.
It is assumed, that the flowrate L of the liquid leaving the drum is
a known function of the holdup M in the drum (2.1f). Equation
(2.1g) is a total enthalpy balance, with the liquid and vapor molar
enthalpies defined by (2.1h). Both values are also evaluated in a
physical property system from T , P , and x or y, respectively.
Equations (2.1i) equate pressures and temperatures in the product
flows to those in the drum. The system consists of 2nc +10
equations for the same number of unknowns. For variants of the
flash unit and its applications, see [41].
2.2
dt Mi
= Li+1 + Vi1 Li V
7
Xn
xi;j
j=1
Xn c
yi;j
j=1
yi;j
d
dt
Pi Pi+1
d
dt
(M x )
i i;j
Li
(M hL)
1;
1;
= (Mi) ;
L
= Li+1 hi
Figure 3: Distillation
column
+1
+ Vi1 hi
Li hi Vi hi
V
F
+Fi hi + Qi;
L
(Mi+1; Vi) :
(2.4)
xi;j: yi;j:
Ti :
Pi:
temperature at stage i,
pressure at stage i.
The rationale for these equations is the same as that for a single
stage sep-aration (see Sec. 2.1). Only the material and enthalpy
balances have to be modified adequately. Equation (2.3i) expresses
the pressure drop between two consecutive stages in terms of
resistance incurred by the vapor flowing through the holes or valves
in the tray, and also through the static height of liquid on the tray.
The exact forms of the liquid flow function and vapor flow
function
depend on the type and geometry of the trays used. The pressure
drop equa-tion for the top tray i = N is usually formulated in a
dierent way than the pressure drop across an internal tray since
there is no external holdup MN+1. Usually, the number N of trays is
within 10 N 100 , and the number nc of components is restricted
to nc 50 . For a more detailed discussion, see [18] and [31].
2.3
stream 1
metal
stream 2
x=0
h1(x; t); h2(x; t) as well as the temperatures T1(x; t); T2(x; t) of the two
streams depend on the spatial variable x and on time t . The state of
the metal is described by the enthalpy hm(x; t) per unit length and by
the temperature Tm(x; t) . The energy transferred from a fluid to the
metal is given by the heat transfer equation defining the energy flux
per unit length
qi = i i (Ti Tm)
(i = 1; 2):
Here, i = i(Ti; Pi; zi) is the heat transfer coecient between the i-th
stream and the heat exchanger wall. It depends on the flow regime and on
physical properties and hence on temperature Ti, pressure Pi and
composition zi =
(zi;1; : : : ; zi;nc ) of the stream. The quantity i denotes the heat transfer
area per unit length for the i-th stream.
1
v1
@t
@h2
v2
@t
10
@hm
= 1 1 (T1 Tm
@t
The physical property functions hstream and h metal depend on the tempera-ture and in the case
of a stream also on pressure and composition as indicated
2.4
&
%
? cj; T; F
X nc
i;jAj = 0 ; i = 1; : : : ; M :
j=1
dcj
= F (cj;F cj) + V
dt
i;jri ; j = 1; :
=1
Here, ri is the total rate of reaction for the i-th reaction. For many technical
reaction systems it is given by the power law rate equation
ri = ri(c1; : : : ; cnc ; T ) = ki
0
The Arrhenius rate constants ki and ki of the i-th reaction in forward and
backward direction obey the Arrhenius equation:
exp
k = k0
where T is the temperature in the reactor. The constants k0; k0 and E; E are
frequency factors and activation energies, respectively. As usual, R is the gas
law constant. The exponents i;j and i;j denote the order of the i-th
reaction with respect to Aj in forward and backward direction,
respectively. They obey the relation
i;j i;j = i;j :
For a reversible reaction each direction must be considered separately,
whereas for an
irreversible reaction only the forward direction is relevant, hence ki0 =
i;j = 0 :
Let TF denote the temperature in the feed. Then, under reasonable assump-tions (e.g.
constant pressure) an enthalpy balance for the reactor gives
dT
V cp
dt
12
2.5
The model equations require physical property data, e.g. density, enthalpy or
volume. They are given by explicit functions or as solutions of highly
nonlinear implicit equations (thermodynamic state equations). In order to
obtain the physical property data asked for by a unit model, these equations
must be evaluated or solved.
The thermodynamic state equations implicitly relate temperature, pressure
and volume. Often these equations, like the cubic state equation, have
multiple solutions for certain variables. So, the choice of the solution to return
depends on the thermodynamic state of the system. The physical property
equations are solved iteratively in the physical property data system each
time a unit operation model is evaluated. This approach is used in almost all
steady state and dynamic simulation systems.
A flowsheet example
In this section the steps on the way to the simulation model of an actual
process or plant are shown. The small example process in Fig. 6 is first
explained and structured in a flowsheet. The model equations of the unit
operations in the flowsheet are then combined to give the complete
simulation model of the process.
I
-
cA; cB
13
is
A
;R < 0.
Both phases are separated by a selective membrane which is permeable only for
component B. Heat is exchanged between both phases across the membrane.
A0
II
II
of component B is
II
II
c B.
Both phases exchange heat with the cooling water through heat
I
II
streams Q and Q .
For reaction systems some additional modeling assumptions are valid [37]:
The temperature T
dcA
dcB
dt
I
dt
14
stream source
QI
?QI
cI
; cI ; T I ; r0
cI
A
V
0
II
V cp
15
0
0
0
is
II
II
II
x = (c A; c B; T ; r0; c B; T ; Q ; Q ; JQ ; Jm
M T
;B; JH )
Stationary flowsheeting
16
hi(x; t) =
with basis functions k(x) and time dependent coecients i;k(t) are
used for the spatial discretization of the partial dierential equations
(2.5a)(2.5c). Sta-bility requires upwinding within the frame of a Petrov
Galerkin method. This technique takes test functions k(x), which are
dierent from the basis func-tions, and leads to upwinded,
nonsymmetric Galerkin equations (see e.g. [40]).
The first derivative of the physical property function h (enthalpy) is
discon-tinuous at the temperatures T = TBP (BubblePoint) and T = TDP
(Dew Point) due to phase changes. Consequently, the solutions of the
system (2.5) show discontinuities at those locations where the phases
change. Naturally, their positions in the heat exchanger depend on time
t. A discretization, that does not destroy the order of the approximation,
requires the knowledge of these po-sitions xBP (t) and xDP (t) . They
provide valuable information to the process engineer, too. Therefore,
finite elements with moving nodes [28] are used. The principle is outlined
here for a single phase change location xBP (t) . The key is a moving
coordinate system that tracks xBP (t). For example, a time dependent,
piecewise linear coordinate transformation x = x(; xBP (t)) with the
properties
4.1
17
@F
(i)
(i)
(i)
@x (x )x = F (x ; p);
where 2 (0; 1] is the step length [38]. The system of linear
equations in (4.4) is solved iteratively, see below.
Solution of sparse linear equations. A simulation model for the on-line
optimization of an ethylene plant consists typically of about 40.000
equations, the Jacobian has about 200.000 non-zero entries.
Because of stability and com-puting time reasons, the high
dimension of the systems requires sparse matrix methods.
18
19
4.2
h(x; p) = (x xmin) ;
(xmax x) ;
(p pmin) ;
summarize
the inequality conditions and s =
T
; p variables. Then the system
(s)
min ;
(pmax p)
the optimization
(4.6a)
(i+1)
(i)
=s
(0)
20
(i)
F (s ) +
(i)
h(s ) +
is computed. Because this problem may be unbounded, an
additional constraint on the step length is added
k s(i)k (i):
In order to ensure that the
linearization is a good approximation to
(i)
the nonlinear problem is controlled. For details about this trust
region approach, see [14].
In contrast to the SLP method, the objective function in
sequential quadratic programming (SQP) is approximated
quadratically. Starting from a positive definite matrix, the Hessian is
approximated successively using the BFGS-formula [12, 14].
Feasible path and infeasible path methods. Formulation (4.5) suggests the interpretation of the flowsheet equations (4.5b) as
optimization con-straints and to solve them as part of the
optimization
problem.
Therefore,
optimization,
i.e.
the
determination of p, and the solution of flowsheet equa-tions, i.e. the
determination of x for given p, are performed simultaneously in
the infeasible path approach. This can be done eciently only if
the sparsity
structure of the Jacobian
@x
=
@x
@p +
@p :
They can be obtained solving the linear system of equations
dp
@F @x
@x @p
21
Numerical results for the example of the two phase process can be
found in the Appendix.
Dynamic flowsheeting
A1(y;
Let x =
y
z
n n
0 = (x; p; u)
In addition to (5.2a) a set of constraint equations (5.2b) is obtained
defining the solution manifold. Both sub-systems (5.2) are called the
extended system of the DAE system (5.1). A dierent approach to
DAEs is found in [16] leading to the perturbation index.
DAEs in chemical engineering may show an arbitrarily high
index. In case of the index exceeding 2, they cannot be treated
directly and reliably with modern standard integration methods [3].
To reduce the index to 1 or 0 the DAE system must be analyzed to
determine the number of total dierentiations of each equation.
For large scale nonlinear simulation models it is often not
practicable to analyze the DAEs analytically and to reduce the index
symbolically. Structural analysis algorithms have been proposed in
[5, 29, 39] to determine bounds on the index, the number of
dynamic degrees of freedom and the number of total
dierentiations of each equation to reduce the index to 1 or 0. The
actual index reduction is then carried out by automatic
dierentiation [15] or numerical dierentiation [22].
Both, automatic and numerical dierentiation of equations with
the aim to reduce the index of DAE cause a loss of stability in the
numerical solution. This can be avoided using a projection method,
see [11]. Another remedy is an appropriate reformulation of the
model.
The model equations of Sec. 2 and 3 have been analyzed for their index:
V = (P; P
Table 1: Design cases for two phase process and their index
Example:
Another example illustrating the index problem in chemical engineering
are two coupled tanks as shown in Fig. 9
F0
F1
h1
A1
If R and the input stream F0 are given, the unknowns, i.e. the liquid
heights h1; h2 and the flows F1; F2 can be computed. The areas A1; A 2 are
assumed to be given. For R 6= 0 this is an index 1 system. For R = 1,
i.e. the valve is closed completely, the flow F1 becomes zero and the
index remains 1. If the flow resistance R is decreased, the stiness of
the system increases. For R = 0, the levels in both tanks adjust
instantaneously and the index of the system is
2. It is important to see that a direct algebraic coupling of balanced
quantities increases the index of the system.
24
R(t) =
@f
h 2 = 0 =
@f F1 F2
@h2@h2 A2
Two cases must be distinguished:
R =6 0:
25
R = 0:
F0
F1
F2
R1
A2
h1
R2
h2
h3
A1h
A2h
AN
h N
F 0 F 1 = F0 +
h2 h1
F1 F2 = h2 h1 + h3 h2 ;
R1
Aih
R1R2
..
Ri1Ri
..
FN1 FN =
hN hN1
f(hN )
RN1| {z }
:=chN
together with a specification: Determine F0 such that f(hn) = const. This leads to
a system of Hessenberg form of size N + 1 and thus the index is N + 1.
10
CB
h1
C B h2
CB .
C B ..
CB
A @ hN
0
F
26
A3
1
C
C
C
C
C
C
C
A
1
Tanks are only a special case of holdup devices with the output
being an integral of the input. If the input to the first holdup is to
satisfy a specification for the last output, the index is always one
more than the number of storages in series. Some unit models such
as distillation columns and flowsheets in general may contain
numerous coupled holdups. Consequently, the index in a design
task may be arbitrarily high.
5.2
5.3
01
27
3. The right hand side of the equations are changed according to the
new set of signs of the switching functions.
does in general not imply that the algebraic equations are fulfilled at t . Thus,
the values are not consistent initial values for the next interval. It has been
4
proposed to obtain t and the algebraic variable z from
y
g(P (t); z) = 0
y
q(P (t); z) = 0;
y
0
3
4
= yn + (t tn)f(y; z)
= g(y; z)
0 = q(y; z)
P.G. Thomsen, talk at the conference Dierential-algebraic equations: Theory and applications in technical simulation, Oberwolfach June 13-19, 1993.
28
5.4
Consistent initialization
References
[1] R. Aris. Elementary chemical reactor analysis. Butterworth
Publishers, Boston, 1989.
[2] L. T. Biegler. Chemical process simulation. Chemical
Engineering Progress, 85/10, 1989.
[3] K.E. Brenan, S.L. Campbell, and L.R. Petzold. The numerical
solution of initial value problems in ordinary dierentialalgebraic equations. North Holland Publishing Co., 1989.
[4] L. Brull and U. Pallaske. On consistent initialization of
dierential-algebraic
equations
with
discontinuities.
In
Proceedings of the Fourth Eu-ropean Conference on
Mathematics in Industry, pages 213217, Stuttgart, 1991. B.G.
Teubner.
[5] P. Bujakiewicz and P.P.J. van den Bosch. Determination of
perturbation index of a DAE with maximum weighted matching
algorithm. In Proc. of IEEE/IFAC Symposium CACSD 94, Tucson,
AZ, 1994.
[6] P. Burr. The design of optimal air separation and liquefraction
processes with the OPTISIM equation oriented simulator and its
application to on-line and o-line plant optimization. In Proc.
AIChE Spring National Meet-ing, April 1991, Houston, TX, 1991.
29
[7] S.L. Campbell and C.W. Gear. The index of general nonlinear
DAEs. Numer. Math., 72:173196, 1995.
[8] Y. Chung and A. W. Westerberg. Solving a class of near index
problems as perturbations of index problems. Ind. Eng. Chem.
Res., 31:25932603, 1992.
[9] P. Deuflhard, E. Hairer, and J. Zugck. One-step and extrapolation methods
for dierential-algebraic systems. Numer. Math., 51:501516, 1987.
[11]
E.
Eich.
Projizierende
Mehrschrittverfahren
zur
numerischen Losung der Bewegungsgleichungen technischer
Mehrkorpersysteme
mit
Zwangsbedin-gungen
und
Unstetigkeiten. PhD thesis, Institut fur Mathematik, Universitat Augsburg, 1991. VDI-Fortschrittsberichte, Reihe 18,
Nr. 109, VDI-Verlag, Dusseldorf, 1992.
[12]
R. Fletcher. Practical methods of optimization. John Wiley &
Sons, 2nd edition, 1987.
[13]
C. W. Gear. Dierential-algebraic equation index
transformation. SIAM J. Sci. Stat. Comp., 7:3947, 1988.
[14]
P.E. Gill, W. Murray, and M.H. Wright. Practical optimization.
Addison Wesley, 1981.
[15]
A. Griewank and G.F. Corliss, editors. Automatic
dierentiation of al-gorithms: Theory, implementation and
application, Philadelphia, 1991. SIAM.
[16]
E. Hairer and G. Wanner. Solving ordinary dierential
equations II. Springer, 1991.
[17]
M. Hillestad and T. Hertzberg. Dynamic simulation of
chemical engineer-ing systems by the sequential modular
approach. Comput. chem. Engng., 10:377388, 1986.
[18] C.D. Holland and A.I. Liapis. Computer methods for solving dynamic seperation problems. McGraw-Hill, New York, 1983.
[19]
R.B. Jarvis and C.C. Pantelides. A dierentiation-free
algorithm for solving high-index DAE systems. In Proc. AIChE
1992 Annual Meeting, Miami Beach, 1.-6. November 1992 1992.
American Institute of Chemical Engi-neers. Paper 146g.
30
[20]
A. Kroner, P. Holl, W. Marquardt, and E.-D. Gilles. DIVA An
open architecture for dynamic simulation. Comput. chem. Engng.,
14:12891295, 1990.
[21] A. Kroner, W. Marquardt, and E.D. Gilles. Computing consistent initial
conditions for dierential-algebraic equations. Proc. ESCAPE-1, May
1992, Elsinore, Denmark. Comput. chem. Engng., 16, Suppl.:131138,
1992.
[22]
B. Leimkuhler, L. R. Petzold, and C. W. Gear. Approximation
methods for the consistent initialization of dierential-algebraic
equations. SIAM J. Numer. Anal, 28:205226, 1991.
2
[24] D.P. Mahoney and O. Santollani. HYSYS an integrated system for process
engineering and control. Hyprotech, Ltd., Calgary, Alberta, 1994.
[25]
C. Majer, W. Marquardt, and D. Gilles. Reinitialization of
DAEs after dis-continuities. Proc. ESCAPE-5, June 1995, Bled,
Slovenia. Comput. chem. Engng., 19, Suppl.:507512, 1995.
[26] W. Marquardt. Dynamic process simulation - Recent progress and further
challenges. In Proc. Fourth International Conference on Chemical Process Control,
pages 131180, Padre Island, Texas, 1991.
[27]
S. E. Mattsson and G. Soderlind. Index reduction in
dierential-algebraic equations using dummy derivatives. SIAM
J. Sci. Stat. Comput., 14:677 692, 1993.
[28]K. Miller and R.N. Miller. Moving finite elements, Part I. SIAM J.
Numer. Anal., 18:10191032, 1981.
[29] C. C. Pantelides. The consistent initialisation of dierential-algebraic systems. SIAM J. Sci. Stat. Comput., 9:213231, 1988.
[30] C. C. Pantelides. SpeedUp - Recent advances in process simulation. Comput. chem. Engng., 12:745755, 1988.
[31]
C.C Pantelides, D. Gritsis, K.R. Morison, and R.W.H. Sargent.
The math-ematical modelling of transient systems using
dierential-algebraic equa-tions. Comput. chem. Engng., 12:449
454, 1988.
[32]
J.D. Perkins. Equation-oriented flowsheeting. In A.W.
Westerberg and H.H. Chien (eds.): Foundations of computer
aided chemical process design. CACHE publications, Austin, pp.
309-367, 1983.
[33] W.T H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. Numerical
recipes. Cambridge University Press, 1992.
31
[34]
Y. Saad and M. H. Schultz. GMRES: a generalized minimal
residual algo-rithm for solving nonsymmetric linear systems.
SIAM J. Sci. Stat. Comput., 7:856869, 1986.
[35]
W. Schmid, M.Parath, and R.H.W. Hoppe. Application of
iterative meth-ods for solving nonsymmetric linear systems in
the simulation of semicon-ductor processing. Surv. Math. Ind.,
5:126, 1995.
[36] N. L. Schryer. Designing software for one-dimensional partial dierential
equations. ACM Trans. Math. Software, 16:7285, 1990.
[37]
J. M. Smith. Chemical engineering kinetics. McGraw-Hill,
Singapore, third edition, 1981.
[38] J. Stoer and R. Bulirsch. Introduction to numerical analysis. Springer, New
York, 2nd edition, 1993.
[39]
J. Unger, A. Kroner, and W. Marquardt. Structural analysis
of dierential-algebraic equation systems Theory and
applications. Comput. chem. Engng., 19:867882, 1995.
[40] R. Wait and A. R. Mitchell. Finite element analysis and applications. John Wiley &
Sons, Chichester, 1985.
[41]S.M. Walas. Phase equilibria in chemical engineering. Butterworth Publishers, Boston, 1985.
[42] H. F. Walker. Implementation of the GMRES method using Householder
transformations. SIAM J. Sci. Stat. Comput., 9:152163, 1988.
[43] S. E. Zitney and M. A. Stadtherr. Computational experiments in equationbased chemical process flowsheeting. Comput. chem. Engng., 12, 1988.
Authors addresses:
Prof. Dr. Edda Eich-Soellner, Fachbereich Informatik/Mathematik, Fachhochschule Munchen, Lothstr. 34, D80323 Munchen, Germany.
Dr. Peter Burr and Dipl.-Ing. Andreas Kroner, Linde AG, Process
Engineer-ing and Contracting Division, Dr.-Carl-von-Linde-Str. 6-14,
D82049 Hollrie-gelskreuth, Germany
A
A.1
The constant parameters and input variables of the two phase process are:
32
A.2
cA
I
c
B
II
c
B
T II
JM
m;B
Q
II
QM
JQ
JM
r0
33
A.3
10
10 ;
The
problem
is 5
A =
m , V kmol
=4
4 solution
3
II of this
5 optimization
3
I
2
II
2 10
I
10 m , V = 10 m , A = 1:54 m , A = 10 m , c A0 = 0:3
m3 .
34