Sie sind auf Seite 1von 17

Compufers & Chemical Engineering Vol. 6, No. 1, pp. B-95, 1982 0098-1354/82/02owe17so3.

0010
Printed in Great Britain. @ 1982 Pergamon Press Ltd.

REVIEW

EQUATION ORIENTED APPROACH TO PROCESS


FLOWSHEETING

M. SHACHAM*
Ben-Gurion University of the Negev, Department of Chemical Engineering, Beer-Sheva, Israel 84120

and

S. MACCHIETTO, L. F. STUTZMAN and P. BABCOCK


Department of Chemical Engineering, University of Connecticut, Storrs, CT 06268,U.S.A.

(Received 24 March 1980;final revision received 4 March 1981)

Scope-Process flowsheeting has become, in recent years, an accepted tool for the design 4F
chemical processes. Most of the flowsheeting programs use the “modular approach”. It is bCcomirg
apparent that this approach has several limitations especially when dealing with design and
optimization problems. It was suggested that an “equation oriented” (EO) approach may overcorn:
the limitations of the modular flowsheeting program. Several EO programs are currently u&r
development. The programs ASCEND (Carnegie Mellon University), FLOWSIM (University of
Connecticut) and SPEEDUP (Imperial College) are in the most advanced state of development
The objective of this paper is to characterize the different techniques for process tkwstie~, to
give a state of art review on the EO approach and to pinpoint the remaining difidulies which still
prevent the large scale use of this method.
The paper starts with definition of the types of problems that can be solved usin: flowsheeting
programs, namely simulation, design, and optimization problems. The flowsheetirg techniques:
Sequential Modular, Design Oriented Modular and Equation Oriented are described.
Linear EO programs which have arrived at advanced state of development b@ have limited
applicability, are reviewed.
The discussion of the general EO flowsheeting program is divided into sectons, the major
subjects being: Data input and verification, Equation Generation, Analysis of the systm: reordering,
decomposition and tearing, Thermodynamic data interface, and Nonlinear iteration procedures. A
detailed description of one of the EO programs currently under development (FLOWSIM) is given in
Appendix A.
It is concluded that even though feasibility of using EO programs for small prcblems has been
demonstrated, their implementation for large scale optimization or design problems will require
development of technology, mainly in the following areas: Verification of the input data, Ordering of
the equations for solution, Initialization of the vector of the unknowns, and Delrelopment of a
standardized thermodynamic interface.

1. INTRODUCTION of the plant does not coincide with the flow of materials
Process flowsheeting (or steady state process simulation) in the physical plant. Several authors, consequently,
has become, in recent years, an accepted tool for the have suggested the use of an equation-oriented (or
design of chemical processes and has been used exten- simultaneous) approach to overcome these difficulties.
sively in engineering education as well. The objective of this paper is to characterize the
This field of process flowsheeting has been recently different techniques for process flowsheeting, to give a
reviewed by Rosen[l], Hlavacek[2], Motard d a1.[3], state of art review on the equation-oriented approach
and Flower and Whitehead [4,5]. Some textbooks on the and to pinpoint the remaining difficulties which still
subject are already available (Westerberg et a1.[6], prevent the large-scale use of this method.
Crowe et aL[7], Wells and Robson[8], while Evans and The structure of this article is as follows: in Section 2,
Seider[9] summarized the requirements of an advanced different types of flowsheeting problems and techniques
flowsheeting program and Evans ef a1.[10] described are characterized; in Section 3, linear, equation-oriented
such a program currently under development. In most of flowsheeting programs are described; in Section 4, the
these publications the emphasis is mainly on the so- structure and the techniques used in general equation-
called “modular approach” for process flowsheeting. It is oriented flowsheeting programs are discussed.
becoming increasingly apparent, however, that this ap-
proach has several limitations, especially with problems
where the flow of information in the mathematical model AND CHARACTERIZATIONOF THE
2. DESCRIPTION
PROCESSFLOWSliJlETINGTECHNIQUES
Steady state operation of a chemical plant can be
*Authorto whom correspondence should he addressed. represented by a system of nonlinear algebraic equa-
CACE Vol. 6. No. 2-A
19
80 M. SHACHAMet al.

tions, culation can no longer be sequential, but some simple


iterative schemes can be used. This “sequential modu-
f(x) = 0, (1) lar” approach has some clear advantages for process
flowsheeting. They are:
1. The models of the different units can be prepared
#wheref is the vector of functions and x is the vector of and tested separately, while the unit model can be
variables. Here the variables are the flow rates of expressed as a computer program subroutine.
different components in or out of a particular unit (tem- 2. The solution method for a single unit, i.e. the solu-
peratures, pressures and design parameters of the units, tion of Eq. (3) can be optimized.
such as reflux ratio for distillation column, area of heat 3. Because of rigid requirements, input data can be
exchanger, etc.). These functions are obtained using the quite easily checked for completeness and consistency.
basic physical and chemical laws concerning conser- 4. Because of the modular structure, new units are
vation of mass and energy, phase and chemical equili- easily added to the tlowsheeting program.
brium, etc. In the light of these advantages, it is quite under-
In the case of an industrial chemical plant, the system standable why the modular approach has been preferred
of Eqs. (1) may contain several thousand functions and over the simultaneous approach. This is especially true
variables. Thus, it may be difficult to build a sound model when dealing with simulation problems. The modular
of the plant without using a systematic approach. The approach, however, loses some of its attractiveness
accepted technique is to write balance equations when dealing with design and optimization problems.
separately for the different units. In this case, the system There are three types of problem that can be solved
(1) takes the following form: using a flowsheeting program.
In the simulation problem, the variables associated
with the feed streams and the design variables of the
fi(I)=O, i=l,2 ,..., n., (2) units should be specified. The unknowns are the vari-
ables associated with all the additional streams.
‘where fi is the sub vector of functions associated with The design problem is similar to the simulation prob-
unit i and n, is the. number of units in the plant. It should lem except that some of the design variables left un-
be noted that this approach eliminates the possibility of specified and constraints are imposed on some of the
using general balance equations for several units together stream variables (only equality constraints). The number
OKfor the whole plant. (The elimination of these equa- of constraints is equal to the number of unspecified
tions may lead to same unexpected consequences, such design variables.
as the total material balance being far off for “con- In the optimization problem, variables associated with
verged” solutions [ 111). the feed streams and design variables may be left un-
When the model representing the operation of the specified and a cost function is added to the model Eq.
chemical plant in the form of (2) has been obtained, its (1). The unspecified variables are determined so as to
solutions still may pose adifficult problem. minimize the cost function. In this case, both equality
With the “modular structure’ several assumptions are and inequality constraints may be present and their
made which allow for easier and more efficient solutions. number may be different from the number of the un-
The assumptions are: specified parameters.
1. The variables associated with the units (design For the design and optimization problem, the assump-
variables) should always be defined and should not be tions used to simplify the process model for the simula-
treated as unknowns. The same assumption is made for tion case no longer apply and the use of the modular
variables associated with streams entering the plant from approach becomes cumbersome. Usually, repetitive solu-
the outside (feed streams). tion of the simulation program may lead to prohibitively
2. The information flow in the mathematical model long computer times [12].
coincide with the material flow in the chemical plant. To overcome this difficulty several new techniques for
This assumption makes it possible to group the variables process flow-sheeting have been proposed. There is a lot
to subvectors associated with the material flow of confusion regarding the names given to the various
“streams” and to select for each function an output approaches, but we can clearly differentiate among three
variable associated with an output stream leaving the of them:
unit. Sequential modular: The program structure is modular
Using the above assumptions, system (2) can be writ- and the variables iterated upon are recycle (tear) stream
ten in the following form: variables.
Design oriented modular: The program structure is
modular. The variables that are iterated upon are both
xpU*= F&l”), I = I, z, . . . , n., (3) the recycle (tear) stream variables and the unspecified
design variables [13,14].
where xi“‘” is the subvector of x representing the vari- Equation oriented (simultaneous): The complete
ables associated with the output stream(s) of unit i and model of the plant is expressed in the form of one large
xp is a subvector of x representing the variables asso- system of algebraic equations. The iteration is simul-
ciated with the input stream(s) to the same unit. taneously done upon all the unknowns.
Since the input stream to one unit is either, (a) A A more detailed discussion and somewhat different
stream entering the plant from outside; or (b) an output classification of the flowsheeting techniques can be
stream from another unit, the computation of the vari- found in the book by Westerberg et a/.[6]. Further dis-
ables can be done sequentially using Eq. (3) as long as no cussion in this article will be limited to the equation-
recycling exists. If there are recycle streams, the cal- oriented approach (EO).
Equationoriented approachto processflowsheeting 81

3. LINEAR EO PROGRAMS process model can be solved, in this case, using one of the
Representing a chemical process by a system of linear following approaches:
equations was quite popular in the early days of process 1. Iterative solution of the recycle streams
simulation[l5-181. Even today several people argue that (Agarwal[l9]).
this method most effectively carries out material 2. Simultaneous solution of one linear system that
balances in the early stages of process design[l%221. represents the operation of the whole process
Basically, there is, in linear flowsheeting programs, a (Hutchison [20]).
linear relationship between the variables associated with 3. The breaking down of the system of equations into
the input stream(s) and output stream(s). Every process a small number of separate equation sets according to
unit, therefore, can be represented by one or more the number of recycle streams present (Shacham and
“transformation matrix” which converts the input Motard[23], Sood et al. [2l]).
stream(s) into output stream(s). The only unit that does The first approach (iterative solution of the recycle
not have a transformation matrix is the mixer whose streams) is the same approach used with respect to
output stream is the sum of the input streams. It is nonlinear flowsheeting programs. A detailed discussion
further assumed that all the units except the mixer have of this approach can be found in the review by Motard et
only one input stream. Because of this assumption it may aL[3]. It should be noted, however, that when using the
be necessary to divide one physical unit into several Newton-Raphson method for convergence acceleration
parallel models with separate input and output streams and the matrix of partial derivatives is calculated
and transformation matrices. This should be done usu- numerically, the correct solution is obtained within
ally, to absorbers and strippers. n,nc t 2 evaluation of the process model (where n, is the
Figure 1 shows a multiple output process unit. The number of tear streams and n, is the number of variables
linear model representing this unit is per tear stream). When using Broyden’s Quasi-Newton
method for convergence acceleration, the iteration at
most converges in 2n,n, iterations for a linear non-
Yi,i= Ti.ixi (4) singular system. This last observation was recently sug-
gested by Gay[24].
where Ti,j is the transformation matrix which converts When using the second approach for solution, from the
the input stream xi to the output stream yi.t list above, first a large linear system, which consists of
The form of the transformation matrix depends on the the number of the unknown streams times the number of
unit simulated. In linear material balance programs the variables per stream, is expressed as a set of equations.
following units are used [ 18, 19,211: (1) Mixer, (2) Stream This system can then be solved either by applying a
splitter, (3) Separator and (4) Converter. direct standard solution method such as Gauss elimina-
The model of the mixer has been discussed already. In tion or by using a special method of solution which can
the stream splitter a stream is divided into two or more take advantage of the sparseness of the system. Such
streams of equal composition and the matrix T is a sparse solution methods will be further discussed in the
diagonal matrix with equal entries on the main diagonal. next section.
In the separator the input stream is divided into two or The third approach for solution can be best explained
more streams of different composition; in this case, the with reference to Fig. 2. The composition and amount of
matrix T is diagonal and the diagonal entries correspond the recycle stream (Ye.,)can be calculated applying Eq.
to the fraction of a certain species in the input stream (4) sequentially for units I, 2 and 3 to yield:
which appears in the output stream No. j. Those entries
are often called “separation factors”. Komatsu [ 181 ~3.1 = T3.,T~,,Tdx,., +x,.2); 0)
showed how the separation factors can be calculated for
units like Flash Separator, Fractionator, Adsorber and but since y3,, =x1.*, Eq. (5) can be rewritten as
Stripper. The converter or reactor is the only unit with a
transformation matrix that is non-diagonal. The elements (R-1)x,.2 = -Rx,.,, (6)
of this matrix are determined by the conversion of a
limiting component and the stoichiometric factors of all where I is the unity matrix and R is the matrix product
the components. Sood and Reklaitis[21] introduced a (T3.1 T2.1 T 1.1).
systematic procedure for deriving transformation If x,., and all the unit transformation matrices are
matrices for reactors. defined, Eq. (6) can be solved to yield the value for x1.*;
If the process input streams and all the unit trans- after that, all the other unknown streams can be cal-
formation matrices are specified the problem becomes a culated sequentially by matrix vector multiplication.
“simulation problem”, the type of problem that most When applying this approach to a more complicated
program developers have investigated so far. The resulting process we get n, separate systems with n, variables in

Y3.1=5.2
r
& I
UNIT UNIT UNIT
Xl.1 ii,, ‘52 J&l ‘X3 h
> 2 - > 3
PRODUCT
J

Fig. 1. A multiple output process unit. Fig. 2. Linear model of a simple recycle system.
82 M. SHACHAM elal.

each one of them. These systems should be solved and p additional specifications/constraints are given in
sequentially or simultaneously depending on whether equation form. For this case, Sood and Reklaitis[22]
they are part of an “irreducible subset” or not. (The term developed a systematic procedure for solution. Accord-
“irreducible subset” will be discussed in the next sec- ing to their method, the process model is first evaluated
tion). p t 1 times to obtain a general parametric solution. If all
The three different approaches can be compared ac- the p constraints/specifications are linear, the parametric
cording to the following criteria: solution can be introduced directly into the constraints’
1. Can the consistency of input data be checked? equations and the p x p system of linear equations can
2. What is the amount of computer effort required to be solved for the missing design parameters. (It should
solve a problem? be noted that this approach is equivalent to an iterative
3. Can the approach accommodate design and opti- approach in which the Newton-Raphson method is used
mization problems? for convergence acceleration and the matrix of partial
When the linear process model is solved using a noni- derivatives is calculated numerically.)
terative approach, the rank of the coefficients matrix (or If the constraints are nonlinear, the parametric solu-
matrices) can be checked to determine whether the tion can still be introduced, but the p constraints have to
problem is well-defined. If the rank of the coefficient’s be solved iteratively.
matrix is equal to the rank of the augmented coefficient’s Sood and Reklaitis[22] have solved problems contain-
matrix (where the vector of feed flowrates has been ing up to 1600linear equations and 13 linear or nonlinear
augmented to the coefficient’s matrix) then the system constraints and have found that the computation time is
has at least one solution. If the ranks of these two directly proportional to the number of constraints for
matrices are different, no solution that satisfies all the problems of the same size.
equations can be found. Such a situation indicates that Optimization problems can be solved using nonlinear
there may be some mistakes in the process models. optimization (mainly search) methods whenever the
However, even if a solution is found, this does not mean process is represented by linear or nonlinear models [25].
that the model is sound. The solution has to be checked for No published effort has been made so far to take ad-
physical reality, meaning that no negative flowrates can vantage of the linearity of the flowsheeting program to
exist. make the solution of the optimization problem more
Shacham and Motard[23] investigated the convergence efficient.
properties of the “direct substitution” iterative method
for linear process models. They showed that for specific
type of systems this method should always converge, but Extension to nonlinear flowsheeting programs
this must not be generally true. There have been several attempts to implement
We may conclude at this point that all the solution methods used in linear flowsheeting for nonlinear
methods except the iterative methods, provide infor- process models. The nonlinear model can be locally
mation regarding the consistency of the input data for a linearized and the solution of the linearized model used to
linear model. If no solution can be found or if the solution is provide an improved estimate for the solution of the
unfeasible, either the model or the input data is erroneous. nonlinear model.
Solution of a linear model of a chemical process may The linearization approach can be simplified by
take a very short time compared to the time required assuming that the unit transformation matrix is a
when using more sophisticated and complicated models. diagonal matrix. This assumption is the basis of the “split
Even so, the efficiency of the solution method may be fraction” method. Using this approach, the exact (non-
quite important especially when dealing with repetitive linear) unit models are first used to calculate the unit’s
solutions of the same problem. Sood et a/.[211 compared output streams. Then the flowrate of a component in one
the computational effort involved when using direct or output stream is divided by the inlet flowrate into the
iterative methods of solution. For a flowsheet comprised same unit of the same component. After repeating this
of 105 streams and 17 species, the direct solution ap- process for all the components in all of the streams,
proach was 5-10 times faster than the iterative approach diagonal transformation matrices for all the units are
(direct solution required 9.8 set, iterative solution obtained. The resulting linear system can be solved for
without acceleration took 120set, and iterative solution the unknown recycle streams. The updated recycle
using bounded Wegstein acceleration took 60 set). stream flowrates are used as improved initial estimates
Can the different approaches handle design and opti- for the second iteration of the split fraction method. This
mization problems? The answer is yes, but all of these iterative process is continued until the solution is
methods have to be revised to handle such problems; and achieved with the desired accuracy.
even after revision they will not solve all possible types The “split fraction” concept was very successful in
of design problems, because even if linear models are application for separation processes [26,27], but it cannot
used for representing the plant, some set of be used for flowsheets that contain reactors or other
specifications may require the solution of nonlinear units with strong connections among the different com-
equations [22]. ponents.
It is always possible to use an iterative approach to There were several attempts to overcome this lirnita-
solve the design problem. The unknown design tion. Henley and Rosen[281 suggested the addition or
parameters are assumed and then the process model is elimination of components from reactors by means of
evaluated to determine whether the design specifications fictitious feed and product streams. Shacham and
or constraints have been met. If not, the unknown design Motard[23] suggested the calculation of full transfor-
parameters are updated and the iteration continues until mation matrices for some of the units using perturbation
the design specifications are met. techniques. These methods have not been tested yet on
Let us assume that p design parameters are unknown large-scale problems.
Equation oriented approach to process flowsheeting a3

4.THESTRUCTUREOFTAEEOFJ2OWSHRETING more efficient. Solution of the system is done iteratively


PROGRAM when the thermodynamic properties are updated be-
There are several equation oriented flowsheeting pro- tween the iterations via the “therm0 interface”. The
grams under development at the moment: ASCEND]291 pertinent thermodynamic data is taken from the thermo-
at the Carnegie-Mellon University, FLOWSIM [Ap- library.
pendix A] at the University of Connecticut and SPEED- When the solution is complete the final results are
UP [30] at the Imperial College. All of these programs are reported by the Report Generator.
currently being used “in house” for research and in- A more detailed discussion of the different parts of the
struction but none of them has been released yet for the EO flowsheeting program follows.
general user. Since descriptions of those programs have
not yet been published in a form that is readily accessible DATAINPUTANDVFBIFICATION
by the readers we have included a detailed description of The data required by all the flowsheeting programs
the FLOWSIM program in Appendix A. includes:
A commercial flowsheeting program (FLOWPACK 1. Process topology.
II[31]) which includes analysis of the process model at 2. Feed stream information.
the equation level is available. The analysis is done via 3. Design parameters of the units.
the “subnetworking” option that is included in this pro- Input can be entered in either batch or interactive mode
gram and it reportedly increases the computational (FLOWSIM). The interactive mode is superior since it
efficiency of the solution[31]. This option puts FLOW- allows on-line data verification and corrections.
PACK II somewhere in between the modular and the The above data requirements may not be suitable for
equation oriented approach. design and optimization problems. For this type of prob-
The discussion concerning the structure of the EO lem, the input should be much more flexible. It should
programs will be divided into two sections: allow input of some internal or product stream variables
1. The structure of the programs representing the cur- and avoid the definition of some design parameters or
rent state of art. some information concerning the feed streams.
2. The structural changes required for making EO Flexible input makes the data verification a much more
flowsheeting programs an efficient design and optimiza- difficult task. Any configuration of the input data should
tion tool. be accepted as long as it completely defines the process.
Such a discrimination is necessary since the existing Thus the number of equations is equal to the number of
programs have a limited capability in design and opti- unknowns and each equation contains at least one un-
mization problems. The structure of a typical EO pro- known. But over- or under-determination should be
gram (FLOWSIM) is shown in Fig. 3. rejected and the user should be informed of the missing
Data concerning the process topology, input stream or superfluous data.
and unit design parameters is entered via the Data input Data verification can be done if a Newton-Raphson-
section. This data is verified for consistency and com- type solution method (which requires evaluation of the
pleteness. Using a unit module library (which contains matrix of the partial derivatives) is used. In this case, the
the equations necessary to represent the different units) rank of the Jacobian matrix can be tested. This approach
and the process topology data, a system of equations has already been discussed. FLOWSIM (Appendix A)
which defines the whole process is generated. Since uses such an approach for data verification. It should be
many of the equations are nonlinear, an initial estimate stated, however, that the results of this verification may
for all the unknowns is also generated. Considering that be nonconclusive in some cases. It is possible that the
the system of equations is typically sparse, an ordering Jacobian matrix is singular at a given starting point but
of the equations is necessary to make the solution step nonsingular at the solution. In such cases a better start-
ing point should be selected or special techniques should
be used (Gorczynski and Hutchison[26]).
There is a real need for the development of a more
general approach for data verification for design- and
optimization-type problems.

EQUATIONCENRRATION
The system of equations representing the steady state
operation of the plant can be generated either in the form
of Eq. (1) (Kubicek et a1.[321)or in the form of Eq. (3)
[Flowsim (Appendix A) Gorczynski et al. [33]].
According to the Kubicek et a/.[321 the following
information is generated:
1. Expressions to calculate f(x) for a specified value of
X.
2. Expressions to calculate the matrix of partial
derivatives: [(aflax) the Jacobian matrix] for a specified
value of x.
3. Topology of the Jacobian matrix (the location of the
zero and non-zero elements).
A better estimate for the solution can be calculated
from Eq. (7),
Fig. 3. The structure of an EO flowsheeting program.
xlr+l = xt - J;‘f(xt), (7)
84 M. SHACHAMetal.

where k is the iteration number and J is the Jacobian and some of them have been implemented in connection
matrix. Equation (7) is one of the forms of the Newton- with chemical process modeling.
Raphson method. The sparse techniques may be used either with the
In FLOWSIM or Quasilin, a linearized form of an original nonlinear system of equations or with the linear
equation similar to Eq. (3) is generated and the topology Jacobian or the approximation of the Jacobian matrix.
of this linearized system of equations is stored. The reordering operations, which can be carried out in
Equation (3) can be rewritten in a more general form, order to solve systems of equations more effectively, are
shown in Table 1.
x = F(x), (8) More detailed discussion of the different operations
follows.
the linearized form of this equation being
DECOMPOSITlONBYPARTITIONING
x = F(0) t Jx. (9) The concepts involved in decomposition can best be
demonstrated with reference to a system of equations
Note that in this case the Jacobian matrix is not the same shown in Fig. 4. This system represents a flow and
as in Eq. (7). pressure drop balance in a pipeline network. (For the
Different iterative schemes can be used in connection sake of simplicity, the influence of the flowrate on the
with Eq. (9). The equivalent to the Newton-Raphson friction factor has been neglected.)
method above is Most of the stages of the partitioning process can be
conveniently carried out using the “occurrence” matrix
(I - Jrh+~ = F(O). w M of the system, which has a row for each equation and
a column for each variable. Its elements are defined by
Other schemes are described in Westerberg et al.[6].
Local linearization techniques, which use derivatives, if variable j appears in equation i
have been implemented successfully for computation of otherwise.
single or multiple distillation columns [34-371. There have
also been suggestions to use similar methods for com-
putation of multiple effect evaporators]381 and flash
drums [39].
It should be noted that equations can be linearized
without using derivatives, the computation of which can x4 x6 % XII
be expensive in terms of computer time. Gorczynski and
Hutchison[26] have discussed some of the possible \y W
x3 x5 x9 XI0
linearization techniques; however, the experience with ‘6
$37
such techniques is very limited at this time. Furthermore,
any linearization technique that does not have a sound
mathematical basis will probably have difficulties in
convergence when used in large-scale problems.
In existing programs, the equations are generated by
the means of unit module subroutines. In an earlier
version of FLOWSIM, for example, the subroutine
FLASH would generate both the linearized equations
and their topology matrix. This structure requires that
the options for different unknown sets be built into the
program, because the unknown should appear in the
lefthand side of the equations and derivatives with res-
pect to the unknown should be calculated.
There is a restriction on the thermodynamic cor-
relations that can be used, since partial derivatives of
these correlations with respect to temperature, pressure,
or concentration should be taken. The types of the
thermodynamic correlations, therefore, should also be
built into the program. Fig. 4. A pipeline network and its representative equations.

Table 1. Reordering operations for sparse systems of equations


ANALYSISOFTHESYSTEMREORDERING, -~~
AND TEARING
DECOMPOSITION
System Type
A system of equations representing the steady state No. Reordering operation Nonlinear Linear
operation of a chemical plant may contain from several
thousand to 100,000 linear and nonlinear equations[2]. 1 Partitioning X X
The number of the unknowns is usually equal to the 2 Tearing X X
number of equations, but a single equation rarely con- 3 Grouping linear and X -
tains more than 5-10 unknowns. In order to make the nonlinear equations
4 Sparse storage and - X
system solvable at all, in some cases, or solvable
elimination
economically, in other cases, sparse techniques should -
5 Pivot selection and fill-in X
be used. minimization
Many sparse matrix techniques have been proposed
Equation oriented approach to process flowsheeting 85

The occurrence matrix of the system in Fig. 4 is shown tion) and is not given in enough detail in order to
in Fig. 5. program it.
By partitioning a system of equations we mean reor- Hernandez and Sargent [40] proposed an algorithm
dering the rows and the columns of the occurrence which carries out partitioning and tearing simultaneously.
matrix in order to get a block triangular form. The Ledet and Himmelblau[43] and Kevorkian and
partitioned form of the occurrence matrix is shown in Snoek[44] published some data with regard to the com-
Fig. 6. It can be seen from the partitioned form of the puter time required in order to partition small- to
occurrence matrix that the 12 equations should not be medium- sized problems. Part of their data is given in
solved simultaneously. It is possible to solve Eqs. (l)-(3) Fig. I.
and (10) simultaneously to yield the value of the un- It can be seen from this figure that computation time
knowns x1, x2, x3 and x4; then Eq. (4) can be solved for versus the number of equations can be correlated fairly
x5. The remaining equations have to be solved simul- accurately with a straight line on a log-log scale. This
taneously. Intuitively, one can assume that it is less indicates that the computation time is proportional to n8
expensive (in terms of computer time) to solve several where /3 is a constant. Through least square analysis we
smaller systems sequentially than to solve a whole sys- found this constant varying between 2.3 < p < 2.6 for
tem simultaneously. Hernandez and Sargent [40] the different methods.
analyzed the effort required to solve the same problem Gustavson[46] described several partitioning al-
with and without partitioning. They concluded that “it gorithms where the number of arithmetic operations is
will usually be advantageous to partition the linear function of the number of equations plus the
system.. . the cost will usually be minimized by par- number of nonzero elements of the matrix. These al-
titioning into irreducible subsets and solving these gorithms should be much more effective in partitioning
sequentially”. large scale problems than the ones that have been des-
Here, “irreducible subsets” means a subset that cannot cribed in the previous paragraph. Unfortunately, we
be further partitioned. Arriving at the above conclusion, could not find data in the literature which indicates how
Hernandez and Sargent [40] made the assumptions that these algorithms perform in process flowsheeting
the number of nonzero elements is a convex function of environment.
the number of equations, and that the number of itera-
tions required to solve the system is a non-decreasing TEARING
function of the number of the equations. The irreducible subsystem can be further decomposed
Partitioning can be carried out by inspection only for by “tearing”. Using this technique the number of vari-
small systems; for large systems a systematic approach, ables, which should be iterated upon, can be reduced.
one that can be utilized on computer, is required. The subset of equations is rearranged by tearing into one
The more recent developments in partitioning and of the following forms:
tearing were described in detail by Sargent [41]. 1. Closed cycle of information in which each equation
Kehat and Shacham[42] reviewed the partitioning al- is solved in turn for one of the unknowns (method A).
gorithms extant at this time. Ledet and Himmelblau[43] 2. Smaller system of equations in which the number of
compared several algorithms for partitioning and tearing,
and their publication contains a complete computer pro- I 1 I

gram for carrying out these operations. 1


Kevorkian and Snoek[44] introduced a partitioning SO - O- Slwcwd*
algorithm which Kevorkian[45] later claimed to be one O- Billinpsley’ +
of the most efficient ones. This algorithm, however, first
+ - Bodron Powd
requires selection of output variables (see the next sec- 20 -
A- Kevorkhn B Snoek

Variables
123456719Dlll2

Fig. 5. Occurrence matrix of the system of equations from Fii.


4.
+
Variables 0.2
00
I23456719011!2
t
0.11 1^ I I I
IO 20 SO 100 200
NUMBER OF EPUATIONS

‘The times for CDC 6600 for the tist three methods and
are
for RXDS SIGMA7 for the last one.
*Details of these methods can be found in Ledet and
Himmelblau[43].
Fig. 6. Partitioned form of the occurrence matrix. Fig. 7. Computation times for partitioning.
86 M. SHACHAMet al.

the equations that have to be solved simultaneously selected and the number of tear variables can be
equal the number of the “tear” variables (method B). different, too. The best tear set is usually considered to
Referring to the examples in Fig. 4, it was shown that be the one that contains the minimal number of vari-
Eqs. (l)-(3) and (10) comprise an irreducible subset. ables.
Instead of solving these four equations simultaneously, a Many algorithms for tear variable selection have been
value can be assumed for x,; then Eq. (1) can be solved published. They were most recently reviewed by
for x2, Eq. (2) for x3, Eq. (3) for x4, and Eq. (10) for xl. Hlavacek[2], and a computer program for them can be
The new value of xl is then introduced into Eq. (1) and a also found in the literature[43]. It should be pointed out
new iteration is started. Such an approach was proposed that most of the tearing algorithms deal with recycle
by Steward [47]. systems, not with systems of equations. But after selec-
It is customery to denote the variable for which a ting output variables, a system of equations can be
certain equation has to be solved as the “output vari- represented by the same type of directed graph as a
able” of this equation. In the present case, x2 is the recycle system, so the same tearing algorithms can be
output variable of Eq. (l), x3 is output variable of Eq. (2), used in both cases.
etc. There is some data available regarding the com-
Using Method B, x2, x3 and x, are calculated the same putation time involved in output set selection and tearing
way, but the last equation is written in a function form: for large system of equations[43,45]. The computation
time for output set selection is of the order of 1 second
f(x,) = k,~,~ t k4x; - k3x32 - k2x; = 0. (on a CDC 6600 computer) for 100 equations, increasing
proportionally to n’.* with the number of equations. The
computation time for tearing depends very much on the
Such an approach was proposed by Hernandez and sparse structure of the system and no clear conclusion
Sargent [40] and by Shacham and Kehat [48]. can be drawn regarding the connection between the size
Figure 8 shows the rearrangement for tearing of the of the problem and its computation time. For systems of
second irreducible subset from the system of equations between 100 and 150 equations Ledet and Himmelblau
shown in Fig. 4. reported computation times of between 3.6 and 88.6 sec.
It was pointed out[49] that the tearing of systems of on a CDC 6600 computer.
nonlinear equations tend to make them more nonlinear
and consequently more difficult to solve. For systems SEPARATIONOF THE LINEARAND
comprising both linear and nonlinear equations this NONLINEARSUBSYSTEMS
difficulty can be overcome, as will be shown later. For The observation that tearing may make a system more
systems comprising solely of linear equations this nonlinear, and more difficult to solve, brought several
difficulty does not exist. investigators to the conclusion that the degree of non-
Hernandez and Sargent [40] investigated whether tear- linearity of the equations should be taken into con-
ing is preferable to the simultaneous solution of irre- sideration.
ducible subsets. Their comparison was based on a count Soylemez and Seider[50) proposed to classify four
of the number of arithmetic operations required for the degrees of nonlinearity and to introduce the less non-
solution using the different methods. Their results, linear equations into the more nonlinear ones, thus
however, were hardly conclusive since it become ap- reducing the number of equations and unknowns. They
parent that many factors have to be taken into account, prepared a FORTRAN program to carry out the system
such as the linearity or nonlinearity of the system, the rearrangement [51], but admitted that there is a need for
solution method used, etc. improvement in their algorithm, mainly regarding the
In many cases, different sets of tear variables can be definition of the nonlinearity.
Hernandez and Sargent[40] suggested that tear vari-
ables be selected so that the remaining systems become
linear functions of the non-tear variables to enhance the
advantage of tearing in that way. They proposed the use
of a computer language that allows for algebraic
manipulation, SYMBOLANG[52] for instance, to carry
out the system analysis. This method has not been im-
plemented so far; and is doubtful whether it can be
implemented successfully for large-scale systems at
present, since it is well known[40] that automatic al-
gebraic manipulation is still expensive with regard to
computing time.

SPARSESTORAGEANDELIMINATION
When solving an equation-oriented process model,
most of the solution methods will require the solution of
a large sparse system of linear equations, and some of
them will require matrix vector multiplications.
If the matrix is sparse, only the non-zero elements
where: should be stored and operated upon. Jennings[R] des-
4 - unman CalCUldted
I” apreviour
step cribes several sparse storage schemes. The most simple
Eqq-l0- “b.T”Yarl.blel is the “random packing” scheme where the matrix is
Fii. 8. Rearrangement by tearing of the second irreducible sub- stored in three vectors. One of them (a real array)
set from the system in Fig. 4. contains the value of the non-zero elements; two integer
Equation oriented approach to process flowsheeting 87

vectors specify their row and column numbers in the mization are described in the literature (see for
corresponding locations. Matrix vector multiplication can example[57]), but a few of them were tested in large-
be carried out efficiently using this storage scheme (see scale process simulation problems [6,58,59].
for example[53], p. 86), since the structure of the matrix A simple algorithm which was highly recommended by
does not change during the computation and the multi- its developers (Westerberg et al.[6J) can be described as
plication of the different terms can be carried out in any follows.
order. Let us assume that the pivot element has been selected
Although some attention was given to iterative solu- for i rows and that the coefficients of the elements
tion methods[54], the system of linear equations is usu- x,, x,, . . . , Xi have been selected as pivot elements. The
ally solved using Gauss elimination or one of its Gauss elimination process is carried out using these
modifications. pivots, and pivot element number it I should be selec-
During the elimination, new nonzero elements (fill-ins) ted. Let us denote Si+I as the number of non-zero
are generated and they can be conveniently added to the elements in the row in which the pivot element candidate
end of the list. The elimination process, however, is located, and yi+l as the number of nonzero elements in
requires the location of elements in specified row and its column (not counting elements in the first i rows). The
column positions. When using the random packing next pivot is selected as follows:
storage scheme, this process requires the scanning of 1. Select a possible candidate by minimizing (St+, -
both index vectors for locating one element, which is I) x (X+1 - 1).
clearly impractical. For row-wise or column-wise scan- 2. Check whether the element so selected is greater
ning, additional index vectors should be added to the than a specified minimum value; if not, eliminate this
basic scheme. These vectors contain a linked list of the variable from further consideration as pivot and go back
addresses of the elements in the same row or in the same to I.
column. It was proposed[59] that pivot selection and fill-in
Bending and Hutchison [55] proposed the generation of minimization be carried out symbolically the first time
linked lists of element addresses required to generate a the linear system has to be solved and that the com-
new element during elimination. Generation of this list is putation order be stored for later reference. The disad-
quite expensive in terms of computer time, but it is more vantage of this method is apparent for strongly nonlinear
than justified when linear systems of the same structure problems where the magnitude of the elements may
should be solved several times (as in iterative solution of change considerably from one iteration to another. In
chemical process models). This method has been suc- this case, the pivot element selected at the beginning may
cessfully implemented in different types of process obtain very small value later. The pivot should be tested
computation problems [6]. in every iteration and if it is too small a new pivot
Shacham and Kehat[481 introduced a solution method sequence must be found.
for linear systems which is based on tearing of the Brandon[58] compared several pivot-selection and fill-
system. This method can efficiently utilize the sparse in minimization methods on the basis of computer time
storage scheme, since it requires only row-wise scanning used. His results showed that methods attempting to find
of the matrix, while the matrix structure remains un- a computation order that gives the absolute minimum of
changed during the computation; The method was used the fill-ins are very expensive in terms of computer time.
successfully in solution of sparse systems containing up Simple algorithms, like the one described earlier, which
to 500 equations[56], but has not been implemented for reduce the number of fill-ins, but does not guarantee
process simulation as of yet. Details of this method are locating the absolute minimum, may require 10 times less
given in Appendix B. computer time than the complicated algorithms. Similar
results were indicated by Lin and Mah[57].
Even when using the more simple algorithms, the time
PIVOT SELECTION AND MINIMIZATION required for ordering is quite extensive. Ordering may
OF FILL-INS require 5-10 times more computer time than elimination
When the Gauss-elimination or one of its modifications according to results that were reported by Lin and
is used for the solution of a system of linear equations in Mah[57].
process simulation, the matrix of coefficients should be
reordered in order to achieve numerical stability and to
minimize the number of fill-ins generated. INITIALIZATION
The numerical stability of an elimination method can To start the solution process, an initial estimate for all
be achieved by bringing the elements of maximal ab- the unknowns should be specified. Since, in the case of
solute value into the main diagonal (pivot). Minimization EO flowsheeting program, we are dealing with several
of the fill-ins is more complicated. thousands of unknowns, it would not be practical to ask
The problem of fill-in generation can be demonstrated the user to specify these values, so they should be
with reference to the largest irreducible subset shown in generated by the computer.
Fig. 6. If the elimination is carried out in the order 5,6,7, Gorzynski and Hutchison[26] suggested that the non-
8, II, 12, 9 (row numbers), only two new nonzero ele- linear equations be converted into linear ones for the first
ments will be. generated in the upper tirangular part of iteration. The conversion is accomplished by specifying a
this matrix. But if the elimination is carried out in the value for the partial derivatives. For some types of
order 12, 11, 5, 6, 7, 8, 9, all of the upper triangular part equations, this conversion is easier than estimating an
of this matrix (except one element) will contain nonzero initial value for the unknowns; in other cases, however,
elements. This is undesirable since the fill-ins require it can be more difficult.
additional storage space and additional arithmetic opera- We feel that the development of a systematic method
tions. of generation of initial values is an absolute necessity for
Several algorithms for pivot selection and fill-in mini- making equation-oriented flowsheeting feasible.
88 M. SHACHAMet al.

THERMODYNAMIC DATA INTERFACE Table 2. Nonlineariteration methodsfor systemsof equations


Process flowsheeting requires the calculation of ther-
modynamic properties (mainly phase equilibrium k- No. Method References
values and enthalpies) for the different components at
different temperatures, pressures and compositions. There Newton-Raphson(NR) [32,36,63-67]
see additional
are estimations [60,61] of physical property evaluation
referencesin [2]
amounting to 75% of the computer time required for the Brovden’sOuasi-Newton 13.13.68-721
simulation of separation units. The excessive computer Shnbert’ssparse modification il4,73-751 -
time is required to give accurate results for a wide range of Broyden’smethod
of temperatures, pressures and compositions. Also, the Brown’smodificationof 176,771
correlation methods for the different properties have to NR method
be rather complicated; some of them may even require Relaxationand Continuation [78-W
iterative solution. Minimization D.811
The structure of the thermodynamic package is des-
cribed in detail elsewhere[3]. Here we would like to
elaborate more on the special requirements of the equa- not go into a detailed description of them. We will only
tion-oriented flowsheeting program regarding an inter- compare their relative merit as equation-solvers for an
face between the main program and the thermodynamic EO flowsheeting program,
package. An equation-oriented flowsheeting program Among the methods shown in Table 2, the Newton-
requires derivatives of the properties with respect to Raphson method is the most widely used in huge-scale
temperature, pressure, etc. The complicated ther- process calculation. It is used for computation of multi-
modynamic correlations cannot be analytically differen- stage separation processes [32,36,63-66] and pipeline
tiated. This difficulty can be overcome by using local network calculations[67], although it was utilized for
thermodynamic correlations that may have much simpler flowsheeting programs as well(21.
form, but are applicable for a relatively narrow range of This method is locally convergent, and its convergence
temperatures, pressures and compositions. is second order:
Leesley and Heyen[60] suggested the use of the fol-
lowing equations for local approximation of phase equil- lint (Jlrl;+l = C,
(12)
ibrium k-values: k- llxt-x*11
Inf=a,InP,(T)ta,-a*InP, (11) where x* is the solution, C is a constant and (I*)(
represents some norm of the vector.
where P, is the vapor pressure of a reference com- For our purposes, second-order convergence means
ponent, T is the temperature, P is the pressure, and aO, that close to the solution the number of correct
a, and a2 are constants that can be calculated using three significant digits of the unknowns is multiplied by two in
accurate sets of k, T, P provided by the thermodynamic every iteration.
package. Leesley and Heyen[60] reported very high ac- The following disadvantages of the NR method are
curacy using this equation in predicting the k-values for frequently cited:
low pressure and narrow ranges of temperature and 1. The matrix of partial derivatives has to be evaluated
pressure. It is not known, however, how accurately the in every iteration.
equation may predict derivatives of the k-value. 2. A system of linear equations has to be solved in
Barrett and Walsh[62] proposed similar models for every iteration.
vapor and liquid fugacity, activity coefficients, and liquid 3. Starting far from the solution the method may
and gas enthalpies. diverge.
Such local approximation methods should be made 4. It cannot be used when the Jacobian matrix is
part of the thermodynamic data inferface of the EO singular.
flowsheeting program in order to reduce computation The necessity to calculate partial derivatives is the
time and to allow analytical calculation of derivatives. most severe limitation of the NR method in EO
Further investigation is required, however, in order to flowsheeting programs. If the derivatives can be analy-
determine how often the local approximations should be tically calculated, the NR method can be used; but if
updated, especially when a rapidly convergent solution most of the derivatives have to be calculated by numeri-
method (like the Newton-Raphson) is used. cal perturbations, the use of the NR method becomes
Another important function of the thermodynamic impractical in many cases.
data inferface is to allow the connection of different The Quasi-Newton-type methods were developed in
thermodynamic packages to the flowsheeting program. order to eliminate the necessity of evaluating the Jaco-
Different thermodynamic packages may be needed when bian matrix, which is instead approximated. The Quasi-
working with different types of compounds or extremely Newton method, according to Broyden[69], raised quite
high pressure or temperatures. The possibility of con- a bit of interest in the chemical engineering literature
necting different packages exists, for example, in the (see Table 2 for references), but it has not been im-
FLOWSIM program (Appendix A). plemented yet for large-scale flowsheeting problems.
As with the NR method, Broyden’s method is locally
NONLINEAR ITERATION PROCEDURES convergent. Its convergence, however, is only super-
The nonlinear iteration methods that can be used in linear:
connection with the EO flowsheeting program are shown
in Table 2.
Most of these methods are well documented in the
chemical engineering literature. For this reason we will
liip$f=o.
Equation oriented approach to process flowsheeting 89

This means that the convergence is accelerated near netted distillation system with 4 components and a total
the solution, which is much better than the linear con- of 47 plates. Shacham [SO] solved several steady state
vergence of, for instance, the successive substitution reactor problems using a more general form of this
method. But the convergence is usually slower than for approach. Johnson[78] used a similar method to solve a
the NR method. counter current, heat exchanger, energy balance prob-
Broyden’s method actually updates the inversed lem. The high degree of stability in convergence that can
Jacobian matrix so that there is no need to solve systems be achieved using this method can certainly be of great
of linear equations for every iteration. There is one value for an EO flowsheeting program.
drawback to this method. When used for solution of If the Jacobian matrix is singular the NR method
large scale systems, the approximate to the inversed cannot be used, since the Jacobian cannot be inverted. It
Jacobian tends to be a dense matrix even when the was proposed [28] that the Marguard’s algorithm be used,
Jacobian matrix is very sparse. since it combines the NR method and the steepest
Schubert’s [75] modification of Broyden’s method descent minimization method. For this method, Eq. (7) is
shares the local and superlinear convergency of this modified:
method[74], but it updates the sparse Jacobian matrix
instead of its inverse. Mahalec et a/.[141 have recently (JkTJk t AJ)Axl,= - Jkf(xk), (14)
tested this method in small flowsheeting problems with
favorable results. where Ax, = xk+I -xk and h is a scalar parameter. For
We see the most serious limitation of the Quasi-New- A = 0, Eq. (14) is identical to the NR method, but in-
ton methods, for implementation in EO flowsheeting creasing the value of A changes the direction of the
programs, in the way the first approximation for the movement toward the steepest descent direction. West-
Jacobian is calculated. The use of numerical perturbation erberg and Director[81] modified this method in order to
is mostly recommended for this purpose, but this ap- eliminate the necessity of solving a linear system of
proach is impractical for a large-scale system containing equation with JTJ as coefficient matrix (since this matrix
several hundreds or thousands of variables. Several ap- may be more dense than J alone) and proposed to find
proaches have been proposed to overcome this the best value of A by a single variable minimization.
difficulty [ 141: None of these minimization methods have yet been
1. Using an identity matrix as an initial estimate of the implemented for large scale flowsheeting problems. It is
Jacobian. well known, however, that the convergence of the
2. Using diagonal perturbation (assuming that the steepest descent method is much slower than the con-
Jacobian matrix is diagonal). vergence of the NR method.
3. Using diagonal perturbation for some of the vari- A more serious question regarding the use of these
ables and full perturbations for the rest of them. “singularity safe” methods is whether they can be used
No mathematical analysis of the convergence of without first investigating the cause of the singularity.
Quasi-Newton methods using such initial estimates has Singularity is most often the result of badly posed equa-
been yet carried out, and the uumerical experience with tions or input data sets. In this case, it is much more
them is very limited. It is difficult to say at this moment important to correct the cause of the singularity than
whether this modification of the Quasi-Newton methods trying to find a solution that cannot be correct, since the
may make them more suitable for use in an EO simu- model is incorrect in the first place. Another frequent
lator. cause of singularity is divergence during the solution
Brown[78] proposed a completely different approach process. When one or more of the variables approaches
for reducing the computational effort associated with the infinity, the Jacobian matrix most probably will become
NR method. According to this method only the upper singular, and switching to the steepest descent method
triangular part of the Jacobian matrix is used; therefore, will not help.
only about half of the partial derivatives should be
evaluated and there is no need to solve a system of linear REPORTGENERATION
equations in every iteration. The method also retains the The report generated by an EO flowsheeting program
quadratic convergence property of the NR method. is not different from the report generated by a modular
Seader and Sontag[77] have discussed Brown’s method program (Appendix A). The structure of this report is
and some of its modification. They tested it on a small well documented (see, for example, [3]).
recycle system, but could not come to a clear conclusion When a converged solution cannot be obtained, there
regarding the superiority of this method over the NR is a major difference between the two types of programs.
method. The final values obtained from the modular simulator in
The difficulty to converge from bad starting points was this case may contain useful information regarding the
cited as another limitation of the NR method. The con- cause of the nonconvergence. Because of the different
tinuation- or relaxation-type methods were quite suc- solution methods used in the EO program, nonconverged
cessful in overcoming this limitation. Using these results will be very difficult to interpret, and the typical
methods, the system of nonlinear algebraic equations is user (chemical engineer with no background in numerical
transformed into a system of differential equations which analysis) will not be able to extract useful information
is then “integrated” using an implicit integration method. from them. This problem can be eliminated, however, by
At each integration step a modified form of the algebraic using an appropriate solution method (such as the con-
system is solved using the NR method. Convergence can tinuation method).
be always achieved by reducing the step size of in-
tegration. It should be kept in mind, however, that step 5. SUMMARYANDCONCLUSIONS
size reduction increases the computational effort. In this article the current state of the art of EO
Ketchurn adopted this method for distillation flowsheeting programs was reviewed and the techniques
computation and solved in 15 iterations an intercon- associated with this type of programs described.
90 M. SHACHAMet al.

It was shown that this approach has already acquired k phase equilibrium coefficients
some stature in certain types of flowsheeting problems M occurrence matrix
such as linear material balances and multiple distillation mij element of the occurrence matrix
n number of rows and columns in the occurrence matrix
columns. The feasibility of using EO programs for more
n" number of process units
general problems has been also demonstrated. number of tear streams
nt
Implementation of EO programs for the solution of nc number of variables per tear stream
large scale optimization or design problems will require 4 flow rate
development of technology in the following areas: pressure
1. Data input to the flowsheet will need to be verified p' vapor pressure of a reference component
for correctness. The user should be advised as early in d product of several transformation matrices
the simulation process as possible of the identification of T temperature
T transformation matrix
errors which cause the resulting mathematical model to
x vector of variables, input stream to a unit
be either under or over determined. A degree of freedom
Y output stream from a unit
analysis of some sophistication appears to be called for.
2. The ordering of the equations (or the units) in a Subscripts
large system of equations is a critical factor in obtaining i number of unit
an economic solution. Simultaneous pre-ordering of the i number of stream associated with a unit
equations appears to be a better approach than employ- k iteration number
ing a sparse matrix pivot strategy during the elimination
procedure. The special “bordered block triangular” Greek symbols
structure of the Jacobian matrix[73,82,83] suggests the /3 exponent
A scalar parameter
strategy to be developed.
3. The Jacobian matrix will have to be represented
REFERENCES
using a sparse matrix notation if the large systems of
equations are to be solved efficiently. Although several 1. E. M. Rosen, Steady State Simulation Review. Paper presen-
such methods are available, it would appear that the row ted at 178thACS National Meeting, Washington, DC, lo-13
Sept. (1979).
directed methods are the most promising. A row directed 2. V. Hlavacek, Analysis of a complex plant steady-state and
sparse matrix elimination method is therefore also transient behavior. Comput. Cheh. E&ng 1,75 (i977).
required. 3. R. L. Motard. M. Shacham & E. M. Rosen. Steadv state
4. A systematic approach to initialize the vector of chemical pro&s simulation. AICHE J. 21(l), 417 (197s).
unknowns needs to be developed. The initial guesses for 4. J. R. Flower & B. D. Whitehead, Computer-Aided Design: A
all of the unknowns must result in stable and rapid survey of flowsheeting programs-Part I. Chem. Engng
progress toward the problem’s solution. The user should (London) 272,208 (1973).
not be burdened with this task. 5. J. R. Flower C B. D. Whitehead, Computer-Aided Design: A
survey of flowsheeting programs-Part II. Chem. Engng
5. At present, the Newton-Raphson method using
(London) 273,271 (1973).
analytical derivatives seems more suitable for im- 6. A. W. Westerberg, H. P. Hutchison, R. L. Motard & P.
plementation in EO flowsheeting programs than any of Winter, Process Flowsheeting. Cambridge University Press,
the Quasi-Newton methods. In order to improve its Cambridge (1979).
stability, a continuation-type version is recommended. 7. C. M. Crowe, A. E. Hamielec, T. W. Hoffman, A. I. Johnson,
The use of this method can be feasible only if most of P. T. Shannon and R. W. Woods, Chemical Plant Simulation.
the partial derivatives are calculated analytically. Prentice-Hall, Englewood Cliffs, New Jersey (1971).
6. A standardized thermodynamics interface should be 8. G. L. Wells Jz P. M. Robson, Computation for Process
used in an EO program. One of several different ther- Engineers. Wiley, New York (1973).
modynamics packages could then be connected to and 9. L. B. Evans & W. D. Seider, The requirements of an ad-
vanced computing system, Chem. Engng Progr. 72(6), 80
used with the EO program. This would also allow a (1976).
flexible thermodynamics package which would supply 10. L. B. Evans, J. F. Boston, H. I. Britt,P. W. Gallier, P. K. Gupta,
several methods of calculation for each property to be B. Joseph, V. Mahalec, E. Ng, W. D. Seider and H. Yagi.
interfaced with the EO program, one at a time, without Aspen: An advanced system for process engineering. Comput.
the need for modification of the EO program. Chem. Engng. (1979).
Most of the technology mentioned in the above con- 11. M. E. Leesley & H. S. Pollicoff, Comparing CONCEPT and
clusions already exists. Additional development is FLOWTRAN using a process simulator evaluator. Comp.
required. The first generation of truly functional EO Aid. Des. 10(5),289 (1978).
programs for chemical process flowsheet simulation will 12. L. D. Gaines & J. L. Gaddy, Process optomization by flow
need to address all of the above desirable features of an sheet simulation. ZEC Proc. Deu. 15(l), 206 (1970).
13. J. D. Perkins, Efficient solution of design problems using a
EO program. The FLOWSIM package described in Ap- sequential-modularflowsheetingprogramme.Comput. Chem.
pendix A is an example of an attempt to arrange the Engng 3,375 (1979).
existing technology into a working EO program. 14. V. Mahalec, H. Kluiik & L. B. Evans, Simultaneous modular
algorithm for steady state flowsheet simulation and design.
Acknowledgement-The financial support of the Control Data Comput. Chem. Engng 3,373 (1979).
Corporation to the UCOM Computer Aided Design project is
15. M. F. Nagiev, Material balance in complex and multistage
sincerely appreciated. recycle chemical processes. Chem. Engng Progr. 53(6), 297
NOMENCLATURE (1957).
Symbols 16. M. A. Vela, Use fractions for recycle balances. Hydro. Proc.
f vector of implicit functions 40(6), 189 (l%l).
F vector of explicit function 17. E. M. Rosen, A machine computation method for performing
I unity matrix material balances. Chem. Engng Progr. 58(10), 69 (1962).
J matrix of partial derivatives, Jacobian matrix 18. S. Komatsu, Application of linearization to design of a
k oressure droo coefficient hydro-dealkylation plant. IEC 60(2), 36 (1%8).
Equation oriented approach to process flowsheeting 91

19. J. C. Agarwall, I. V. Klumpar & F. D. Zybert, A simple structural analysis in partitioning, disjointing and construc-
material balance model. Chem. Engng Progr. 74(6),68 (1978). ting hierarchical systems. In Decomposition of Large Scale
20. H. P. Hutchison, Plant simulation by linear methods. Trans. Problems (Edited by D. M. Himmelblau). North-Holland,
ICHE 52.287 (1974). Amsterdam (1973).
21. M. K. Sdod, G. V: Reklaitis & J. M. Woods, Solution of 45. A. J. Kevorkian, A decomposition algorithm for the solution
material balances for flowsheets modelled with elementary of large systems of linear algebraic equations. IEEE Proc.
modules: the unconstrained case. AZCHEJ. 25(2),209 (1979). 75, 116,ISCAS (1975).
22. M. K. Sood & G. V. Reklaitis, Solution of meterial balances 46. F. A. Gustavson, Sparse Matrix Methods. Presented at the
for Aowsheets modeled with elementary modules: the con- conference on Foundations of Computer Aided Design,
strained case. AICHE J. W(2), 220 (1979). New England College, Henniker, New Hampshire, Cl 1July
23. M. Shacham & R. L. Motard, Applications of the Theory of (1980).
Linear Recycle Sysfems. Presented at 78th AICHE Meeting, 47. D. W. Steward, On an approach to the techniques for the
Salt Lake City, Utah, 18-21 August (1974). analysis of the structures of large systems of equations.
24. D. M. Gay, Some convergence properties of Broyden’s SIAM Rev. 4,321 (1962).
method. SIAM J. Numer. Anal. 16(4),623 (1979). 48. M. Shacham & E. Kehat, A direct method for the solution of
25. K. R. Jinkerson & .I. L. Gaddy, Ethylene process optimisa- large sparse systems of linear equations. Camp. J. 19(4),353
tion, constraint relaxation and bounds adjustment. IEC Proc. (1976).
Des. Develop. 18(4),579 (1979). 49. R. S. H. Mah, Structural Decomposition in Chemical
26. E. W. Gorczynski & H. P. Hutchinson, Towards a quasi- Engineering Computation. Paper presented at 72nd AICHE
linear process simulator-I. Fundamental ideas. Comput National Meeting, St. Louis, MO, 21-24 May (1972).
Chem. Engng 2(4), 189(1978). 50. S. Soylemez & W. D. Seider, A new technique for
27. A. J. Weisenfeld & R. E. Olson, Solving recycle streams in precedence ordering chemical process equation sets.
multicomponent distillation. Chem. Engng Progr. 76(l), 40 AZCHEJ. 19(5),934 (1973).
(1980). 51. S. Solyemez & W. D. Seider, Computer generated FOR-
28. E. J. Henley & E. M. Rosen, Material and Energy Balance TRAN programs to prepare material and energy balances for
Computations. Wiley, New York (1%9). process units. AICHE Chec. Workshop Series 2, 162 (1972).
29. hi. H. Locks, S. Kuru, P. A. Clark and A. W. Westerberg, 52. N. U. Findler, J. L. Pfaltz & H. J. Bernstein, Four High Level
ASCEND 11: An Advanced System for Chemical Engineer- Extensions of FORTRAN IV, SLIP, AMPPL-II,
ing Design. Presented at the 11th annual Pittsburg con- TREETRAN, SYMBOLANG. Spartan Books, New York
ference on Modeling and Simulation, University of Pittsburg, (1972).
1-2 May (1980). 53. A. Jennings, Matrix Computation for Engineers and Scien-
30. R. W. H. Sargent, Private communications (1981). tists. Wiley, New York (1977).
31. F. Berger and F. A. Perris: FLOWPACK II-A new genera- 54. E. Gabbrielli & G. Spadoni, The iterative solution of large
tion of system for steady state process flowsheeting. Com- systems of linear equations: some new empirical criteria and
put. Chem. Engng 3(1-4), 309 (1979). tests. Comput. Chem. Engng l(2), 113(1977).
32. M. Kubicek, V. Hlavacek & F. Prochaska, Global modular 55. M. J. Bendie and H. P. Hutchison. The calculation of steadv
Newton-Raphson technique for simulation of an intercon- state incompressible flow in large’networks of pipes. Chem.
nected plant applied to complex reactification columns. Engng Sci. 28, 1857(1973).
Chem. Engng Sci. 31,277 (1976). 56. M. Shacham, MinimizingRound-of Error in Direct Solution
33. E. W. Gorczynski, H. P. Hutchinson & A. R. M. Wajih, of Large Sparse Systems of Linear Equations. Paper
Development of a modularly organized equation-oriented presented at 178thNational ACS Meeting, Washington, DC.,
process simulator. Comput. Chem. Engng 3,353 (1979). IO-13 September (1979).
34. D. W. Browne, Y. Ishii & F. D. Otto, Solving multicolumn 57. T. D. Lin & R. S. H. Mah, Hierarchial partitioning-A new
equilibrium stage operations by total linearization. Can. J. optimal pivoting algorithm. Mafh. Prog. 12, 260 (1977).
&em. Engng 6,307 (1977). 58. D. M. Brandon, The implementation and use of sparse matrix
35. H. P. Hutchinson & C. F. Shewchuk. A comoutational techniques in general simulation programs. Camp. J. 17(2),
method for multiple distillation towers. Trnas. ICHE 52, 325 165(1974).
(1974). - 59. T. D. Lin & R. S. H. Mah, A sparse computational system
36. L. M. Naphtali & D. P. Sandholm, Multicomponent separa- for process design and simulation, Parts 1 and 2. AICHE .I
tion calculations by linearization. AZCHEJ. 17(l), 148(1971). 24(5), 830 (1978).
37. J. C. Noh & E. S. Lee, Invariant imbedding, iterative 60. M. E. Leesley & G. Heyen, The dynamic approximation
linearization and multistage processes-II. Multicomponent method of handling vapor-liquid equilibrium data in com-
distillation and quasilinearization. AICHE 1. 17(4), 886 puter calculations for chemical process. Compuf. Chem.
(1971). Engng l(2), 109(1977).
38. G. Stewart & G. S. G. Beveridge, Steady-state cascade 61. E. M. Rosen L A. C. Pauls, Computer aided chemical
simulation in multiple effect evaporation. Comput. Chem. process design: the FLOWTRAN System. Comput. Chem.
Engng 1, 3 (1977). Engng 1, 11(1977).
39. T. Umeda & M. Nishio, Comparison between sequential and 62. A. Barrett & J. J. Walsh, Improved chemical process simula-
simultaneous approaches in process simulation. IEC Proc. tion using local thermodynamic approximations. Comput.
Des. Deoelop. 11(2), 153(1972). Chem. Engng 3,397 (1979).
40. R. Hernandez & R. W. H. Sargent, A New Algorithm for 63. L. J. Christiansen, M. M. Michelsen & A. Fredenslund,
Process Flowsheeting. Presented at CACE 12th Symposium, Naphtali-Sandholm distillation calculations for NGL mix-
Montreux, Switzerland, 8-l 1April (1979). tures near the critical region. Submitted for publication to
41. R. W. H. Sargent, The decomposition of procedures and Comput. Chem. Engng.
algebraic equations (Edited by G. A. Watson). Numerical 64. S. E. Gallun & C. D. Holland, Solve more distillation prob-
Analysis-Proceedings, Biennial Conference, Dundee 1977, lems. Hydro. Proc. 55(l), 137(1976).
Lecture Notes in Mathematics 630, pp. 158-178. Springer- 65. R. P. Goldstein & R. P. Stainfeld, Flexible method for the
Verlag, Berlin (1978). solution of distillation design problems using the Newton-
42. E. Kehat & M. Shacham, Partitioning and tearing flowsheets. Raphson technique. IEC Proc. Des. Develop. 9(l), 78 (1970).
Process. Techn. Inter. 18(3), 115(1973). 66. B. S. Hofeling & J. D. Seader, A modified Naphtali-Sand-
43. W. P. Ledet & D. M. Himmelblau, Decomposition pro- holm method for general systems of interlinked, multistaged
cedures for the solving of large scale systems. Adu. Chem. separators. AICHE J. 24(6), 1131(1978).
Engng 8, 185(1970). 67. R. S. H. Mab & M. Shacham, Pipeline network design and
44. A. K. Kevorkian & J. Snoek, Theory and applications of synthesis. Adu. Chem. Engng 10, 125(1978).
92 M. SHACHAM et al.

68. M. A. Soliman, Quasi Newton methods for convergence Each of these development stages was to result in a fully
acceleration of cyclic systems. Can. /. Chem. Bngng 57(5), operational computer package, the capabilities of which would
643 (1979). grow from stage to stage. The first three stages reflect a method
69. C. G. Broyden, A class of methods for solving nonlinear of increasing the mathematical complexity of the models as well
simultaneous equations. Math Camp. 19, 577 (1%5). as the physical dependence of physically real constrains.
70. S. E. Gallun & C. D. Holland, Modifications of Broyden's Stage 1 contains the basic equations describing the rigorous
Method for the Solution of Distillations Problems involving formulation of the model of a given unit operation in terms of
Highly -Non Ideal Solutions. Presented at ICHE 86th conservation equations and characteristic unit behavior.
National Meetine. Houston. Texas. l-5 Anril (1979). Stage 2 allows for the inclusion of operating conditions that
71. S. R. Metcalf gL_J.D. Perkins, Information flow in modular alter the characteristic unit behavior. In general, these include
flowsheeting systems. Trans. ICHE 56, 210 (1978). thermodynamic restrictions such as adiabatic, isothermal and/or
72. J. F. Tomich, A new simulation method for equilibrium stage isobaric operation, plus various split (ratio) and driving-force kinds
process. AICHE J. 16(2),229 (1970). of arguments.
73. V. Mahalec L L. B. Evans, SimultaneousModular Algorithm Stage 3 includes the use of design variables and equations that
for Steady State Plowsheet Simulation and Design. Paper determine operating conditions (parameters), which, in turn,
presented at AICHE 71st Annual Meeting, Miami, 12-16 modify the unit’s characteristic behavior.
November (1978). Stage 4 is intended to allow the user to specify certain operat-
74. E. Marwill, Convergence results for Schubert’s method for ing and design objectives and have the design and operating
solving sparse nonlinear equations. SIAM. .J Numer. Anal. conditions necessary to meet these objectives determined by the
16(4),588 (1979). flowsheet simulator. Differentiation between this task and that of
75. L. K. Schubert, Modification of a quasi-Newton method for Stage 3 is necessary because this “redesign” capability may alter
nonlinear equations with sparse Jacobian. Math. Camp. 24, the type and the number of equations which describe the
27 (1970). Aowsheet.
76. R. hf. Brown, A quadratically convergent Newton like Stage 5 is possible in this approach to flowsheet simulation
method based upon Gauss elimination. SIAM J. Numer. because of the unique solution algorithm used to solve the
Anal. 6, 560 (1%9). resulting sparse matrix problem, as well as the equation format
77. J. D. Seader & J. L. Sonntag, Convergence of Material and used. One additional equation per process unit (or stage) is
Energy Balances for Processes InvolvingRecycle. Presented required, but the remainder of the equations can be altered from
at AICHE 72nd Annual Meetinn. San Fransicso. CA. 25-29
I.
algebraic to differential (as is warrented) by changing a desig-
November (1979). nator flag associated with each equation.
78. A. Johnson, The solution of systems having optionally selec-
ted output sets-I. An application of the method of con- A2.SIMULATOR STRUCTURE
tinuity. Chem. Engng Sci. 28, 1913(1973). FLOWSIM differs markedly from both the modular flowsheet
79. R. G. Ketchum, A combined relaxation Newton like method programs, and the early equation-oriented flowsheet program
as a global approach to the computation of thermal proces- oatterned after the modular form. FLOWSIM aonears like a
ses. Chem. Engng Sci. 34,387 (1979). modular approach to the user. For instance, all process units are
80. M. Shacham, Solution of steady state reactor models using in the form of easily identifiable unit operations which the user
the continuation metbod and feasible starting point. Comput. may link together to construct a model of a chemical or physical
Chem. Engng 2, 197(1978). process.
81. A. W. Westerberg & S. W. Director, A Modified Least Until all intermediate tasks required in an equation-oriented
Squares Algorithm for SolvingSparse N*N Sets of Non- solution are complete, the internal workings of the FLOWSIM
linear Eauations. De&n Research Center Reoort No. DRC- simulator are entirely different from those in a modular simula-
06-5-79,Carnegie-Meli& University (1979). L tor. FLOWSIM then again takes the appearance of a modular
82. A. W. Westerberg & T. J. Berna, Decomposition of very approach to complete the report generation phase. FLOWSIM’s
large-scale Newton-Raphson based flowsheeting problems. stages of defining setup, solving and displaying the results of a
Comput. Chem. Engng 2(l), 61 (1978). flowsheet simulator are shown in Fig. 3.
83. A. W. Westerberg & T. J. Berna, Lascala-A Language for
Large Scale Linear Algebra. Report DRCO6-4-79,Design Data input and verification
Research Center, Carnegie-Mellon University, Pittsburgh, The first stage in this simulation requires input similar to the
Pennsylvania (1979). input of other chemical process flowsheet simulators. An ad-
84. L. B. Evans, B. Joseph & W. D. Seider; System structures for ditional feature is available in the form of graphical input. The
process simulation. AICHE J. u(5), 658 (1977). user may construct a schematic diagram of the process to be
simulated using a library of available units. The user directs the
pictures of the units desired to relative positions on the graphics
terminal screen. Stream lines are then constructed on the screen
to connect the units in the way the user desires. This graphics
APPENDIXA system, GODAS V2.0, was developed at the University of Con-
DRSCRlFTlONOFFLOWS~,AN~~WS~~GPR~~M, necticut and Control Data Corporation; it is currently being used
UNDERDEVEUIPME~ATTHEUNIVERSITYOFCONNECTlCUT in conjunction with Simulation Sciences 100 modular flowsheet
AI.DEYELOPMRNTPRILOSOPHY simulator, and is marketed on Control Data computers based in
Development of a fully equation-oriented flowsheet simulator Houston and Minneapolis.
was begun at the University of Connecticut in February 1975. The user may also describe a flowsheet using batch input.
The development was inspired by the lack of success of most Batch input from the user goes through a verification scheme to
modular flowsheet simulators at that time, as well as the im- insure that the process units and all streams are correctly
plementation of a new sparse matrix solution algorithm[58] specified, and that sufficient data are introduced to be able to
capable of solving several thousand equations without the aid of solve the Bowsheet.
virtual computer memory. The graphics system has its own verification scheme, and so
The development was to take place in 5 stages: the one in the simulation package is bypassed. Also, the graphics
1. An equation-oriented steady state chemical process system has built into it the capability of asking questions about
flowsheet simulator. the Aowsheet being constructed and about the operation and/or
2. Addition of operating condition type behavioral equations. design or each of the units pictured. The question and answer
3. Addition of design equations. session is set up to ask the user only for the information that is
4. Addition of optimization (or redesign) capability. required. Superfluous questioning is avoided.
5. Modification to allow unsteady state simulation. This method of the equation-oriented approach also lends itself
Equation oriented approach to process flowsheeting 93

to the concept of macros. A macro is a combination of unit 3. An overdetermined system.


operations arranged into a mini-flowsheet to create a new process The equations generated are converted into a sparse matrix
unit. The user may use any of the system-defined macros, or topology. The topology is analyzed and the equations are reor-
create his own. dered in an attempt to create a matrix with a nonzero diagonal,
For instance, a macro containing the description of a triple given the order of the variables in the solution vector. Equations
effect evaporator can be created and inserted in the flowsheet. are ordered to ensure that each equation contains an element
The macro is treated just like any of the simple unit processes corresponding to the numerical position (row of that equation in
until the program moves from the Stage 1 modular appearance to the matrix).
the Stage 2 equation orientation. A system of equations is considered determined when a matrix
The macro then expands into a full set of descriptive equations with a valid diagonal is found. A system is underdetermined
of the smaller unit operation which define the macro. This ability when either there are fewer equations than variables, or it is
to group sections of a plant together into a single “unit” (macro) impossible to arrange sufficient equations in an order that yields a
without losing any of the rigorousness of the definition allows valid diagonalized matrix.
complex flowsheets to be built conveniently from larger blocks The condition of overdetermination is also feasible. Equation
of units. hierarchy, however, may allow for the elimination of enough of
the equations in the overdetermined system to yield a determined
System of equations generation system. This will occur unless there are ambiguous equations
The verified description of the flowsheet from the first stage is generated because of earlier user instructions.
fed to the second stage in three files of data. These are: When a set of equations is ordered and verified as representing
1. Unit Description File. a determined system, the equations and corresponding data are
2. Stream Description File. written to a flowsheet description file for transfer to the solution
3. Flowsheet Design and Operating Characteristics File. stage. A separate file containing the order sparse matrix topology
The second stage contains two passes through each of these for the system is also written and passed.
files. The lirst pass allows rearrangement of the stream descrip In addition, a main FORTRAN IV program is written indicat-
tion fde to streamline later operations. During this first pass, ing the amount of storage required for the simulation of the
stream and equation reference numbers associated with both the flowsheet. This main program will be compiled and loaded to
streams and units are developed. execute the next stage of the FLOWSIM Aowsheet simulator.
Multistage units are expanded stage for stage where rigorous
stage-to-stage calculations have been indicated by the user. A System initialization
newly reordered stream file is created and written. Several items of importance are accomplished during the in-
Data files are rewound and a second pass is performed in itialization step. Fist, the sparse matrix topology of the equation
which all the equations are written. Each unit operation can be set is read into the solution algorithm from the matrix topology
described by a number of conservation, rate, and equilibrium file written by the previous stage. This task also includes genera-
equations. These equations will normally be required regardless tion of the fill-in matrix elements required to solve a general
of any real or idealized constraints on the design or operation of sparse matrix problem.
the unit. Other equations are required to completely determine The second event is the initialization of data storage for the
the behavior of the unit operation. The number of degrees of physical property constants required by the user’s choice of
freedom varies from unit to unit, but can easily be determined thermodynamic correlations. The thermodynamic data base lin-
and programmed to be sensed automatically. The degrees of ked with this simulator minimizes the amount of computer
freedom to be. resolved are classified as one of three types of storage and time required for physical properties generation,
equations: although any data base can be linked to the simulator by pro-
1. Unilateral specification. gramming an interface routine to match subroutine call names.
2. Operating condition specification. The third event in the initialization procedure is the initial
3. Design specification. filling of the matrix elements with a special set of coefficients to
Unilateral specification means that a state variable describing insure a stable starting point for further calculations. The parti-
the condition of a stream is specified, i.e. temperature is set for cular procedure here is still proprietary and therefore, we will not
500°K or pressure is set at 17 pascals. discuss it further other than to say it is the key to obtaining a
Operating conditions specification allows for the description of valid matrix solution starting vector.
certain behavior for the units operation, e.g. adiabatic, isother-
mal, etc. This specification in turn affects the output stream Thermodynamicinterface
variables resulting from the unit’s operation. The thermodynamic calculations and the routines that generate
Design specification places the unit’s design as a controlling the physical properties used by them are kept as separate items.
factor in the unit’s operation and therefore the outlet stream At the beginning of each matrix solution step, the state variable
variable values. Each level of specification brings the simulation data for each stream is located and analyzed. The proper calls to
closer to a model of the physical system being simulated. the thermodynamic calculations routines, which determine the
Additional complexity is introduced when the information in- state of the material in the stream (if required), are executed
put to the flowsheet being modeled is not the material input to based on the results of this analysis.
the physical process. This situation results in the possibility of The thermodynamic routines then call the physical property
one unit being underdetermined and an adjoining unit (not generation routines as required through the physical property
necessarily adjacent) being overdetermined, but still yielding a interface routine. The presence of the interface routine allows
fully determined and solvable flowsheet. This is perhaps the the simulator to be linked to any physical property generation
greatest advantage of an equation-oriented simulator over its package of the user’s choice. The interface routine call state-
modular counterparts. ments can be altered by the user to meet his or her needs.
Internal specifications that are valid but unacceptable in a The important physical data returned through the ther-
modular system are fully acceptable in an equation-oriented modynamic routines is stored in vector form in space used by the
simulator. This would allows, for instance, the outputs of a matrix solution algorithm. After each solution, this space is not
flowsheet to be specified, and the inputs calculated. being used while physical properties are being calculated and it is
taken advantage of to reduce overall storage requirements. Data
Verificationof the system of equations on each stream from the flowsheet description file is also read
This stage reviews all of the equations generated in the pre- and placed in matrix space for later use.
vious stage. A hierarchy of equations is developed and the initial
scan of the generated equations flags one of three conditions: Date fill-in
1. A determined system. After all physical properties are calculated and stored, the task
2. An underdetermined system. of entering the value of the matrix elements (partial derivatives)
94 M. SHACHAM et 01.

ana the augmented vectors is undertaken. Data fill-in is done Let us rewrite Eq. (B2) and define j(x,):
equation by equation, with each equation’s code identifier being
retrieved from the matrix space used for storage. The equation x2= S-‘(b, -TX,) (B3)
code directs the program to the correct set of instructions to
calculate the right partial derivative value to place in each f(x,) = F,x, + F2x2- br (B4)
element in the equation. This task is accomplished in one FOR-
TRAN IV subroutine about two hundred (200) lines long for all where f(x,) is a vector of m functions.
equations used in all units. The system consisting of Eqs. (B3) and (B4) can be solved as
While data fill-in is being accomplished, automatic checks for follows:
singularity or other matrix difficulties are also being done. Trou- 1. Assume an initial value for the tear variables (x10).
ble flags are tripped and appropriate action is taken to avoid an 2. Compute x2’ from Eq. (B3), (note that this can be done by
anticipated problem during the actual solution of the matrix. substitution since S is lower triangular).
These checks ensure that the matrix will remain positively 3. Compute f(x,o) from Eq. (B4).
definite, and progress towards a steady state solution will pro- 4. Compute Vf(x,“) where Vf(x,‘) is the mxm matrix of partial
ceed rapidly. derivatives of f(x,) with respect to x, (the method of calculating
this matrix is given below).
5. Use Newton iteration to compute
Matrix solution
The matrix resulting from data fill-in is decomposed into a x,’ = x,a - Vf(x,4_‘f(x,0). (B5)
Crout L-U set of factors with the IMP solution package[58].
Developed with full sparse matrix capability, IMP has proven an 6. Compute x2’ from x2’= S-‘(b, -TX,‘).
excellent and flexible tool for solving large matrices. For in- 7. The vector (x,,, x2’)is the solution of system (Bl).
stance, IMP will solve up to IO,000equations of the type typic- The matrix of partial derivatives is calculated numerically
ally found in flowsheet work in the central memory of a CDC column by column by setting b = 0; x,, x2,. . , xj_,xj+,, . . . , x,,, =
Cyber 175. Addition of the virtual memory option for IMP or 0; xi# 0, calculating f(x,) using Eqs. (B3) and (B4) and then the
solution in a virtual memory computer theoretically removes all derivatives from Eq. (B6)
limits from the number of equations that can be solved in a single
matrix. afi_fi(x,)
ax, xj .

Convergencealgorithm The use of this algorithm requires (m + I) times of computation


The equation-oriented method of flowsheet simulation has its of the system (B3) and (B4) and solution of an (mxm) linear
major advantage in that the major nonlinearities that occur, do so system of equations. (In Eq. (BS)).The storage requirements are
because of the nonlinear nature of thermodynamic properties. mainly the sparse storage for the matrix A and storage for the
The iterative convergence required here is used for the purpose mxm dense matrix of the derivatives.
of successive linearization of physical property values. Each Since the matrix A remains unchanged during the solution
better estimate of the stream flow state variables allows a more process (after the rearrangement) and only row-wise scanning
accurate appraisal of the physical properties exhibited by the operations have to be carried out, a “systematic packing” storage
stream. scheme can be used.
The use of this algorithm and the method of storage are
demonstrated in the following example:
Batch report generation
A batch report generator lists the steady state results by
process unit and by stream. The units description is read from
the flowsheet description file and displayed in an appropriate
format. All streams in and out of the unit are listed along with a
simple mole (mass) balance to check for unit convergence. The

! 111
r1
report generator provides a self-check to make sure that all the
correct equations were generated and used. Inconsistencies Xl 100 0 6 ctla No.

detected are listed to alert the user of problems. 0 3 -1 -cmff.


"2
x3= o 5 -1
The stream description is also available with each stream and
0
4
-10 -1
-I
-10
4 -1
-14
0 -10o-1
4-l -I0
0 4 d
-14,
0 100 -6--f.
its state variables listed. X4
0 0 3
X5
0 3 4
%
6 -1

SHACAAMANDICERAT'S[48]
APPENDMB
DIRRCTMETRODFORSOLUTIONOF
LARGESPARSESYSTRMSOFLINEAREQUATIONS
After rearrangenent:
var. No.: 3

Fq.
6 -1
5

-1 / 4
6 2

0 0
4 I

0 x3 0
II
_1__-1..

6
0
5

2
-1
4
5

-1
3 4 o;-I -1 0 0 0
3.
The linear system of equations 5 0 41-I -1 -1 0 x5 0 A_--1
4 0 -1 ; 0 0 4 -1 x2 100 0 4
5 -1
Ax=b (Bl) 1 0 0; 0 -1 -1 4 x4 100
4 4
2 -1 -1 ; 0
l----------l!
4 0 -1 x,
1 i-l 1 -1
is restructured by tearing so as to arrive at the following
equivalent system: Row-ui se pKti”g” storage > _Z_:lOO
0 1I
2 -1
4 -1
W) 14
Variable ti0.-_7_~po

where x, E R” and x2E Rnmmare subjectors of x, b, E Rnem and ounnyelement~ 0 2


3 -1
b E R” are subvectors of b, S is an (n - m)(n - m) lower trian-
5 -1
gular submatrix of A with non-zero main diagonal; T, F, and Fr 6 4
are (n - m)xm, mxm and mx(n - m) submatrices of A, respec- 1 -1
tively. :
Equation oriented approach to process flowsheeting 95

Calculation of

I! (Li'land
2-
vf(zs,)'

, 6
1 114 I 0 1.762

i ,I4 1 , 1 1.266

5 -1 0.5 0.2! 0.25 1.762


.___ __ ___. ___ ._____
13
3 4
5 -1
z -1 3.5 3.7'
5 -0125 4.266
.__. _ __ __- __. .___--

3 5
5 4
6 -1
2 -1
P -1 0 4 4 6.096
___. _ __ ___ __. ______

D 4
5 -1
4 4
1 -1 -10, -16 -1:
7 -100 CL!= b=(
*i*i.i:: _i: iii=ii iiiiii !._!
_._.:&;;I

0 1
2 -1
If
4 -I "'1; r
fl' 1x5
14 .5137.5 !zt75 ~6.25
7 -100
___. _ __
(p = 0)
__
:$ = !
_ _
ax3 = 3.762 .,x5 = 13.266

0 2 x; = 1 + 3.762 = 4.762
3 -1
"fi ;fi x; i 1 + 13.286 = 14.266
5 -1 f2= ax3 1%
6 4 113 M. 17. Calculation of 5:
1 -1
-

CACE Vol. 6. No. 2-B

Das könnte Ihnen auch gefallen