You are on page 1of 7

Computers & Chemical Engineering. Vol. 3, pp. 375 -3X1. 1979 KISS-1354/79/040375-07$02.

03/O
Pnnted in Great Brilam. All nghls reserved. Copyright Q 1981 Pergamon Press Ltd.

Paper 6B.l

EFFICIENT SOLUTION OF DESIGN PROBLEMS


USING A SEQUENTIAL-MODULAR
FLOWSHEETING PROGRAMME

J. D. PERKINS
Department of Chemical Engineering and Chemical Technology, Imperial College, London SW7, England

(Received 5 November 1979)

Abstract-In this paper, a simple modification to sequential-modular flowsheeting programmes


is proposed. The modification, which involves the incorporation of Broyden’s method for the
iterative solution of sets of nonlinear equations, allows the user of the programme to pose design
problems, where some equipment parameters are left unspecified, and values for them are found
which meet desired specifications on the process. The modified programmes will solve such
problems efficiently, and also will identify those which are badly posed, i.e. the equations
describing the problem do not form an independent set.
Some examples of design problems are solved using a programme based on CHESS. The
results show the power of the proposed method ; comparisons with the traditional control block
approach are given.

Scope-This article is concerned with steady-state chemical process simulation or process


Aowsheeting. A review of this field may be found in Motard et al. [l].
The most widely used structure for flowsheeting programmes is the sequential-modular
structure. Each processing step is represented by a separate mathematical model (unit module)
which calculates its physical outputs from its physical inputs. The modules are calculated
sequentially starting from the known feed conditions to determine the intermediate and product
streams. Recycle streams in the process are torn, and their values are iterated on.
One disadvantage of this approach is that it is difficult to deal with design problems efficiently.
In order to use the sequential-modular method, it is necessary to specify the feed conditions and
the unit modules completely, by giving values for their equipment parameters. For a design
study, it is likely that some of these equipment parameters are unknown, and the user is interested
in finding values of them which meet the required product specifications. The usual approach to
this difficulty is via iterated simulation. Either the whole process is simulated, with the iterations
controlled by the user, or there are local iterations inside the simulation using control blocks.
The control blocks are unit modules which manipulate specific design variables to meet the design
requirements. These blocks often introduce extra levels of iteration into the simulation. For each
guess for the torn recycle streams, the control blocks iterate to convergence on the design
requirements. These iterations can be very time consuming.
The implementation of an alternative method for dealing with design problems using CHESS
(Motard & Lee [2]), a typical fixed structure sequential-modular flowsheeting programme, is
described in this paper. The idea is to use a general nonlinear equation solving algorithm
(Broyden’s method, Broyden 131) to solve simultaneously those equations resulting from torn
recycle streams and those resulting from design specifications. The advantages of this approach
are that there is only one level of iteration, and that the interactions between stream variables
and equipment parameters are taken into account, thus avoiding conflicting iterations.
In Section 1, the details of the modifications are presented. In Section 2 some features of
Broyden’s method are described which enable the identification of badly posed flowsheeting
problems, and in Section 3 some examples are presented showing the potential of the modified
programme, and comparing its performance with that of the control block approach.

Conclusions and Significance-This paper has been concerned with a simple modification to
sequential-modular flowsheeting programmes which greatly increases their power. The modifi-
cation involves the incorporation of Broyden’s method to handle simultaneously those
equations resulting from torn recycle streams, and those resulting from design specifications.
Examples have shows that the incorporation of design variables and specifications involves only
a small overhead when they are handled by the new method. The new method compares
favourably in efficiency with the more traditional approach using control blocks, and also
provides a facility for the identification of badly posed problems.

CACE 3: 1-4 - Y 375


316 J: D. PERKINS

1. IMPLEMENTATION This principle can obviously be extended to the case


Although the basic idea of the modification is ap- where relationships between stream variables are
plicable to any equation solving algorithm which desired.
requires only function values, we will discuss it in the Since it is clear that a torn recycle stream contributes
context of Broyden’s algorithm, which is one of the as many variables as equations to the problem, there
more common ‘sophisticated’ convergence procedures must be as many design specifications as unspecified
used in flowsheeting (Batstone et al.[4], Genna & equipment parameters in a well-posed flowsheeting
Motard[5], Metcalfe & Perkins[6]. The algorithm calculation of the type considered in this paper.
solves iteratively the set of N equations in the N-vector In order to be able to use the method advocated
of unknowns, x : here, there are two prerequisites for the flowsheeting
programme involved :
f(x) = 0 (1) (i) Access to the equipment parameters and stream
variables. This is so that guessed values for the
It requires a procedure which computes values of the
variables can be set into their relevant locations, and so
function f(x) for given values of x. For the flowsheeting
that function values corresponding to torn recycle
calculations considered in this paper, there are two
streams and design specifications can be calculated. In
sources of elements of the vectors f(x) and x :
CHESS, for example, this access is provided by access
(i) from torn recycle streams. Each variable in a torn to the COMMON blocks where the variables are
recycle stream contributes one element to the vector x.
stored. Once a set of guesses has been generated by
Once the flowsheet has been calculated using these
Broyden’s method in its local working space, the
guesses, a new set of values for the torn stream
values are set into the stream variable matrix using the
variables is computed. A requirement for the correct
torn stream number or into the equipment parameter
guesses is that the new values should be the same as the
matrix. The equipment number and parameter
guesses. This requirement provides an element of f(x)
number are stored to facilitate this transfer. Once the
as follows. Let gi(x) be the calculated new value for unit modules comprising the flowsheet have been
stream variable i based on guesses x. Then we require : executed, the function values can readily be calculated
fi(x) = xi - g,(x) = 0. if the locations of the torn recycle streams and stream
(2)
variables on which specifications are made are stored.
Each unknown in a torn recycle stream provides an (ii) A facility to calculate the unit modules in a
equation in the form of Eq. (2). However, not all of the specified sequence. In CHESS this facility is provided
stream variables in a torn stream should be included as by subroutine RCYCLE which normally controls
unknowns in Eq. (1). Only a set of variables necessary iterative recycle calculations. Some modifications are
and sufficient to define the state of the stream should be necessary to the way CHESS controls the sequencing
included, otherwise the set of equations defining the of unit module calculations when design problems are
problem will not be independent. In our implemen- considered. This is because CHESS begins the calcu-
tation, the flow of each component and the stream lation of any flowsheet by the calculation of unit
temperature and pressure are used to define the modules which do not appear in recycles, and are not
stream. An isothermal flash calculation establishes the downstream of recycles. For example, if we consider
resulting stream enthalpy and vapour fraction; the the simple ethylene plant shown in Fig. 1, CHESS
total flow is computed by summing the component would calculate units 1-3 before commencing the
flows. iterative calculation necessary to handle the recycle.
(ii) each unspecified equipment parameter con- This may not be desirable if, for example, the conver-
tributes one element to the vector f(x). For example, sion in unit 3 were a design variable. It would then be
suppose we wish to fix the flow of some component in a necessary to recalculate unit 3 each time a new guess
product stream, and let the desired flow be d. A for the required conversion was generated. Thus, the
calculation of the flowsheet for a given set of torn criterion for whether a unit module can be executed
stream variables and design variables, x, gives a once for all at the beginning of a calculation (or at the
product flow of y(x). We require: end of a calculation) is not simply that it does not
appear in a recycle, but also that it does not have
,h(x) = y(x) - d = 0. (3) unspecified equipment parameters.

__--__
FEED,
[cll,”

Required for cases 4,5 and 6~1~.

Fig. 1. Simple ethylene plant.


Efficient solution of design problems using a sequential-modular flowsheeting programme 371

A common source of design variables is the feed posed problems can be identified, since such problems
streams to a plant. For instance, the required product give rise to singular Jacobian matrices, as is shown by
rate may be known, and it is necessary to find the feed the following well-known result (see e.g. Courant [8]):
rate to produce it. For many flowsheeting pro-
grammes, including CHESS, the specification of feeds Theorem
is by specification of the relevant stream variables. To Let the set of functions f(x) be continuous in x and
fit the convention adopted in this work, it is necessary have continuous first partial derivatives. Then, there
to provide a facility for the specification of feed stream is a nontrivial functional relation of the form :
variables as equipment parameters. Then, these
variables can be iterated upon if required to satisfy F(f(x)} = 0 (7)
design specifications. A simple unit module called if and only if
FEED has been developed for this purpose, and
incorporated into our modified version of CHESS. IJWI = 0 (8)
Although some of the above modifications seem to where 1J(x) 1is the determinant of the Jacobian of f(x).
represent a major change, it should often be possible to The above theorem implies that a functionally
incorporate them as extensions to a flowsheeting singular Jacobian indicates that the set of equations
package. With CHESS, for example, our modified f(x) = 0 is not an independent set, since their left hand
version handles all problems which the old version sides are related.
would handle with no change to the data specifi- Now, the occurrence of a numerically singular
cations, but in addition, the new version handles a wide Jacobian approximation will cause failure of the
range of design problems. Some examples are given in inversion algorithm in the initialisation procedure.
Section 3. Such an occurrence does not necessarily imply that the
problem under consideration is illdefined. An unlucky
2. BROYDEN’S METHOD AND ITS
choice of the initial point x” or of the finite difference
INlTlALISATlON
increments may also cause singularity of the Jacobian
Broyden’s method for solving Eq. (1) is as follows : approximation. However, the most likely reason for
Given x”,Wo the failure of the procedure is that the problem is
Xk+l badly posed. Thus, a failure of the inversion algorithm
= Xk + Wkf(xk) (4) (we have used Gauss-Jordan inversion with a
(Pk+ Wkyk)PkTWk maximum pivot strategy, since no extra working
wk+ ,
-
_ wk _

space is required for its implementation) is likely to


pkTWkyk
indicate that the required specifications cannot be
where met.
pk = Xk+ l - xk; yk = f(Xk+ 1) - f(Xk).
(6)
Example I
In addition to a rule which generates a new guess (1) A simple ethylene plant. This problem is based
xk+l from the last one xk, there is also a recursive on example 3 in the CHESS User’s Guide. The plant
relation for an N x N matrix Wk which is an ap.- flowsheet is shown in Fig. 1, and the details of the
proximation to the inverse of the Jacobian matrix of problem specification are given in Table 1. With no
the function f(x). The main problem to be considered design specifications, there is only the recycle iteration
in this section is the choice of a suitable value for W”. to be considered. The performance of Broyden’s
Since Wk is an approximation to the negative inverse method, which took twelve flowsheet evaluations to
of the Jacobian matrix of f(xk), an obvious way of converge the calculation, does not compare favourably
establishing W” is to approximate the Jacobian at x0 with the performance of Wegstein’s method, which
by finite difference methods and then to invert the took only six. It is often the case that the more
resulting matrix. This procedure was recommended by sophisticated method takes more iterations on a
Broyden himself, but it has one major disadvantage: simple problem such as this. Note that the problem
the matrix inversion necessary involves the incorpor- involves seven components, and hence nine variables
ation of extra code into an implementation of for Broyden’s method, so that we are bound to
Broyden’s method. To avoid the need for this extra consume ten flowsheet evaluations for initialisation
code some authors have suggested using the identity purposes. (The problem is in fact linear in the recycle
matrix for W” (Rosen [7]), or have developed special variables so once the initial inverse Jacobian has been
initialisation procedures relying on the structure of estimated, Broyden’s method steps to the solution,
problem they consider (Genna & Motard [S]). There taking one extra evaluation to confirm it.)
is some numerical evidence (Metcalfe & Perkins [6]) The effect of adding design specifications to the
that it is worthwhile generating an initial matrix by problem is shown in Table 2. As well as the number of
finite difference methods for flowsheeting problems, flowsheet evaluations required, the ratio of the com-
but of course the efficiency of numerical methods puter time necessary to that used for the problem with
depends critically on the size of problem considered, only the recycle iteration (the ideal case) is presented.
on the degree of nonlinearity and on the proximity of Some interesting points emerge from these results.
the initial guess to the desired solution. For very large First, we note that the addition of extra design
problems, it seems unlikely that the ‘extra’ function variables and specifications has only a small effect on
evaluations necessary to establish the initial Jacobian the rate of convergence of the method. Thus, the
are justified on the ground of computational overhead in handling these extra specifications is
efficiency ! small. Second, the choice of torn stream in cases 1 and
However, one advantage of establishing an initial 2 appears to have anomalous effect. When stream 38 is
Jacobian by finite difference methods is that badly torn, the reactor conversion only affects those function
378 J. D. PERKINS

Table 1. Problem specification for simple ethylene plant values associated with the torn stream. (The relation
between these function values and the conversion is
Feed stream : Temperature 53O”R nonlinear.) However, the torn stream variables appear
Pressure 600 psia in the design specification equation linearly, so that
Vapour fraction 0
this equation is linear in the guessed variables.
Composition :
80 Mol./hr
Broyden’s method automatically satisfies linear sub-
GH,
120 Mol./hr. sets of Eq. (l), so that the search in this case is confined
CsHs
The process diagram of the plant consisting of the to a subspace containing the solution. In the case
following equipments is shown in Fig. I. where stream 37 is torn, all the equations are nonlinear
UNIT 1 Valve and the search is in the full space of the variables. This
, reduces pressure to 90 psia is why the choice of stream 38 as the torn stream leads
UNIT 2 & 9 Fired Heaters to faster convergence.
raise temperature to 620”R By generalising the above argument, it would
rated dutv = I.5 M BTUihr
appear that the torn streams should be chosen so as to
pressure drop = 10 psia
UNIT 3 Reactor
minimise the number of equations which the design
3C,H,+6C,H,-+4H,+4CH, variables influence, thus reducing the nonlinearity of
+ X,H, + 2C,H, + C,H,, the problem. Of course, the number of torn streams
90% conversion of C,H, should be minimal, since the amount of work involved
UNIT 4 Mixer in one iteration of Broyden’s method increases with the
UNIT 5 Pump/compressor number of variables ; the above rule only applies when
no. of stages = 3 there is a choice between different minimal tear sets.
work capacity = 1.2 x lo6 BTU/hr Cases 5 and 6 are examples of badly posed problems
pressure out = 600 psia which were identified by the modified initialisation
motive power = steam
procedure described in Section 4. For case 5, it is not
enthalpy of entering steam= 1190 BTU/lb
enthalpy of leaving-steam = 1134 BTU/lb
possible to make independent specifications for the
UNIT 6 Simole distillation three chosen product flows, since they are related by
takes 100% H, and CH, overhead the stoichiometry of the process chemical reactions.
UNIT 7 Simple distillation For case 6, since the key component in unit 3 is
takes 997, C,H, and 5;; C,H, overhead propane, the amount of ethane in the feed has no effect
UNIT 10 Reactor on the extent of reaction in unit 3. Thus, the propane
4&H, + 2H, + 2CH, + 3C,H, and propylene requirements overspecify the conver-
80% conversion of CsH,
sion required in unit 3.

Table 2. Performance of Broyden’s method on the simple ethylene plant

CP
Time

Torn No. of CP
Design Design recycle flowsheet Time
Case variables specifications stream evaluations ‘ideal’

1 Conversion in Flow of ethylene in 38 14 1.11


REAC 10 stream 16
2 Conversion in Flow of ethylene in 37 16 1.21
REAC 10 stream 16
3 Conversion in Flow of ethylene in
REAC 10 stream I6
Conversion in Flow of propylene
REAC 3 in stream 19 37 17 1.40
4 Conversion in Flow of ethylene in
REAC IO stream 16
Conversion in Flow of methane in
REAC 3 stream 10 37 20 2.34
Total Feed Flow Ratio of propane/
butane in stream 19
5 Conversion in Flow of ethylene in
REAC 10 stream 16
Conversion in Flow of propylene
REAC 3 in stream 19 BADLY POSED
Total Feed Flow Flow of methane in
stream IO
6 Conversion in Flow of ethylene in
REAC IO stream I6
Conversion in Flow of propylene
REAC 3 in stream 19 BADLY POSED
Flow of ethane Flow of ethane in
in feed stream 19
Efficient solution of design problems using a sequential-modular flowsheeting programme 319

1 2 Fig. 2, and the complete problem specification appears


in Table 3. The reboiler may be modelled as a control
block (CTRL) which iterates on the temperature
necessary to achieve the specification on the bottom
product. Alternatively, we may model the unit as
a fired heater (FHTR) and consider its outlet
temperature as a design variable to be handled
simultaneously with the torn recycle stream (stream 4)
using Broyden’s method. The results of using these two
approaches are shown in Table 4. The method used to
handle the recycle iteration when the control block
(FHTR or CTRL(ABDF)) was used was resubstitution. It was found that the use
of more sophisticated methods (either Wegstein or
Broyden) for this purpose caused a marked deterior-
Fig. 2. Stripping column with reboiler. ation in performance.
It can be seen that the new procedure is a marked
improvement on the control block approach when a
high accuracy of solution is required. This advantage
Table 3. Problem specification-stripping column with becomes less marked at lower accuracies, and, at the
reboiler lowest accuracy considered, the control block ap-
proach does better. However, it should be noted that a
Feed stream : Temperature: 430”R
convergence criterion of 0.01 gives a fairly crude
Pressure: 415 psia
Composition:
estimate of the true solution for this problem.

CO* 0.088
N, 0.149 Example 3
CH, 28.786 A nitric acid plant. This example is based on a
CJ, 20.103 problem used by Sood and Reklaitis (Sood and
CJ, 24.977 Reklaitis [9, lo]) to illustrate the performance of the
GH 1o 2.832 MBP-II programme for material balance compu-
10.221 tations. The flowsheet is shown in Fig. 3, and the
2.224
problem specification is given in Table 5. Since only a
2.396
3.589
material balance is required, all the components may
be modelled as methane for physical property calcu-
Total 95.365 lb. Mole./hr lations. Of course, such calculations will still take
place, even though the results are not used, and thus
Flow of methane the use of CHESS to solve the problem is inefficient in
Bottom product requirement: ---__~- = 0.02. terms ofcomputer time when compared with the use of
Flow of ethane
The process diagram consisting of the following units is a system specially designed for such problems.
shown in Fig. 2 However, the example is useful in that it contains a
Unit 1 Stripper relatively large number of design constraints (ten).
number of stages = 15 The performance of the new procedure for dealing
Unit 2, Temperature controller using equilibrium with design constraints may be assessed by comparing
flash/ADBF the computer time necessary to solve the problem as
Objective: component ratio C,/Cz = 0.02 specified in Table 5 with that necessary to solve the
Tolerance (varied)
‘ideal’ problem with all the equality constraints re-
Temperature range : 600-620”R
Unit 2, Fired heater
moved. The ratio of the two computer times for this
problem is 3.5. The complete problem is solved in
thirty-two flowsheet evaluations; the ‘ideal’ problem
takes fourteen, which is to be expected since the ‘ideal
Example 2
problem is linear in the eleven recycle variables.
Stripper column with reboiler. This problem is
based on example 7 in the CHESS User’s Guide, and
allows a direct comparison of the new method with the Acknowledgement-The Author wishes to thank Mr. A.
use of control blocks. The plant flowsheet is shown in Ciuksza for his help in programming the FEED module.

Table 4. Performance of the methods on example 2

Number of
Convergence flowsheet CP timet Number of
criterion CP time? using evaluations using evaluations
(DERROR) CTRL (Sec.) using CTRL Broyden using Broyden

0.01 33.0 16 59.0 27


0.001 78.7 26 46.3 18
0.0001 142.5 36 65.5 19
______
ton a CDC 6500.
380 J. D. PERKINS

Methane
feed

Fig. 3. Nitric acid plant.

Table 5. Problem specification for Nitric acid plant Table 5. (Contd)

The process diagram of the plant consisting of the following Design constraints
equipment is shown in Fig. 3. There are ten unknown equipment parameters. The ten
Unit 1 Simple distillation design constraints are:
takes 100% N, and H, overhead
takes unknown amount of NH, overhead 1. Flow of HNO, in stream 4 is 0.952
Unit 2 Feed 2. Flow of H,O in stream 4 is 2.222
feeds unknown amount of air (79 % N,, 3. 99.2% of flow in stream 6 is N2
21% 0,) to plant 4. 1% of flow in stream 8 is 0,
Unit 3 Mixer 5. Flow of 0, in stream 11 is 0.0
Unit 4 Reactor 6. Flow of H,O in stream 11is 0.0
NH, + 202 -+ HNO, + Hz0 I. Flow of CH., in stream 11 is 0.0
100 Y; conversion of NH, 8. 91% of flow in stream 12 is CO2
Unit 5 Feed 9. 25% of flow in stream 14 is N,
feeds unknown amount of H,O to plant 10. 75% of flow in stream 14 is H,
Unit 6 Mixer
Unit 7 Simple distillation
takes 100% HNO, and H,O overhead
Unit 8 Simple distillation
takes unknown amounts of N, and 0,
ovel;head
REFERENCES
Unit 9 Feed
feeds unknown amount of H,O to plant 1. R. L. Motard, M. Shacham & E. M. Rosen, Steady state
Unit 10 Feed chemical process simulation. AIChEJ 21,417 (1975).
feeds unknown amount of CH, to plant 2. R. L. Motard & H. M. Lee, CHESS User’s Guide, 3rd
Unit 11 Mixer Edn., Department of Chemical Engineering, University
Unit 12 Reactor of Houston (1971).
H,0-+HZ+$002 3. C. G. Broyden, A class of methods for solving nonlinear
unknown conversion of Hz0 simultaneous equations. Math. Camp. 19, 577 (1965).
Unit 13 Reactor 4. D. B. Batstone, G. Fenton & R. G. H. Prince, The steady
2CH, + 0, -+ 2C0 + 4H, state simulation of chemical plant of arbitrary configur-
unknown conversion of 0, ation. IFAC Symp. on Digital Simulation of Continuous
Unit 14 Reactor Processes, Gyor, Hungary (1971)
CH, + 0, --* CO, + 2H, 5. P. L. Genna & R. L. Motard, Optimal decomposition of
unknown conversion of 0, process networks. AIChE J. 21,656 (1975).
Unit 15 Simple distillation 6. S. R. Metcalfe & J. D. Perkins, Information flow in
takes 100% CO and CO1 overhead modular flowsheeting systems. Tram I. Chem. E. 56,210
Unit 16 Simple distillation (1978).
takes 100% N, and NH, and 99x, H, overhead 7. E. M. Rosen, A review of quasi-Newton methods in
Unit 17 Mixer nonlinear equation solving and unconstrained optimis-
Unit 18 Reactor ation. Proc. 2lst ACM Nat. Meet., Washington, DC.
NZ + 3H, --t 2NH, (1966).
25 “/, conversion of N, 8. R. Courant, Difirential and Integral Calculus. Vol. II, pp.
154-6, Blackie & Son, London (1961).
Efficient solution of design problems using a sequential-modular flowsheeting programme 381

9. M. K. Sood & G. V. Reklaitis, Material balance balances for flowsheets modelled with elementary
program-II: User manual. School of Chemical modules: the constrained case. AIChE 85th Nat.
Engineering, Purdue University (1977). Meet., Philadelphia (1978).
10. M. K. Sood & G. V. Reklaitis. Solution of material

You might also like