Anda di halaman 1dari 6

Computersthem. Engng.Vol. 17. No. 4. pp. 35S360, 1993 009% 1354/93 $6.00 + 0.

Printedin Great Britain.All rightsreserved copyright8 1993 PergamonPressLtd




Chemical EngineeringDepartment, Iowa State University,Ames, IA 50011. U.S.A.

(Received 16 December 199i;_&aI revision received 13 .Wy 1992; received for publication 27 July 1992)

Abstract-In developing an object-oriented process simulator, we found that tearing algorithms that do
not use a cycle matrix might give inconsistent results depending on how ties are resolved. Two recently
published flowsheet tearing algorithms (Gundersen and Li) have been studied in detail and a new tearing
algorithm has been proposed. These algorithms define an optimal tear set as one that has the minimum
tear set weight. Our studies show that Gundersen’s “close-to-optimal” tearing algorithm may produce tear
sets far from optimum depending on how a tie is resolved in the tearing process. We observe that Li’s
algorithm fails to produce optimum tear sets for a number of classical flowsheets. We modified Li’s
algorithm to significantly improve its performance. Based on this modified algorithm we propose a new
tearing algorithm that gives an optimum tear set for all the 13 flowsheets studied.

INTRODUCTION use sequential modular computation, providing

an efficient partitioning and tearing algorithm is
Flowsheet partitioning and tearing is an integral part essential to the success of these simulators in
of sequential modular simulation. In the process of helping chemical engineers simulate practical flow-
flowsheet partitioning and tearing, a computation sheets. In accordance with the work of Gundersen
sequence and the associated set of tear streams are and Hertzberg (1983) and Li et al. (1988), our work
generated. The subject of partitioning and tear stream defines an optimal tear set as one that minimizes the
selection has emphasized the identification of the sum of the stream weights.
optimal tear set for a given flowsheet. The objective At the flowsheet partitioning step, each strong
in identifying an optimal tear set is to minimize the component in a flowsheet is identified. A strong
required computation time in the actual simulation. component in a graph is defined as the largest set of
There have been several criteria used to characterize nodes such that all nodes in the set are strongly
an optimal tear set. The main criteria are: connected. A graph is strongly connected if there
1. Minimize the number of iterated variables. exists a path from II to w and also a path from w to
o for every distinct pair of nodes v and w. Unless the
2. Minimize the sum of stream weights in the tear
strong component consists of only one single node,
we always have a cyclically connected graph in a
3. Minimize the number of times loops are tom.
strong component since we can always revisit the
A tear stream selection algorithm that satisfies the node where we began by traversing the graph through
above three criteria may not minimize the compu- a well-defined path. In order to make the graph
tation time especially when design constraints are acyclic, some streams must be selected as tear
present in the flowsheet. This is because the criteria streams. This is the tearing step or simply the tear
listed above are sometimes mutually exclusive and stream selection step. Most tear stream selection
constraints have varying effects on the convergence algorithms work with the cycle matrix where all loops
behavior. Gros et al. (1977) showed that the numeri- and streams participating in the loops are stored in a
cal method used to converge the tear variables matrix. For flowsheets with just a few cycles, identi-
does not affect the convergence behavior of an uncon- fying all loops is trivial. As noted by Gundersen and
strained flowsheet. Recently, Lau and Ulrichson Hertzberg (1983), this step can be very expensive
j1992) found that the convergence behavior of a when a great number of cycles exist in the flowsheet.
constrained flowsheet is sensitive to the convergence In addition, the required storage for such a cycle
method used in converging the tear streams and it is matrix may be very large. For the heavy water plant
also affected by the type of constraints. Hence, presented by Gundersen and Hertzberg (1983), the
formulating a reliable tearing algorithm is not as easy storage requirement for the full cycle matrix amounts
as it first appears. Since most commercial simulators to approx. 4.5 MB assuming a 2-byte integer space

CACE 17/c-D 355

356 G. V. VARMAet al.

for each element of the matrix. We were not able to and then considers the specific algorithms of Li and
find a tear set for this problem using Aspen Plus the new one as sub-procedures. Li’s algorithm is
(1988) on a DEC 3100 due to the lack of memory. We described to identify the conditions for which the
conclude that tearing algorithms utilizing the cycle algorithm fails to produce an optimal tear set. Then
matrix are impractical when a large number of cycles our algorithm is developed to correct the identified
and units are present. deficiencies. Finally, our new algorithm, Gundersen’s
John and Miiller (1976) developed an algorithm algorithm and Li’s algorithm are applied to 13 classi-
that can produce an optimal tear set as defined by cal flowsheets to determine their reliability.
the optimality condition described above. In their
algorithm, a branch and bound method was used to PARTITIONING ALGORll-HM
reduce the dimension of the combinatorial problem.
This partitioning algorithm partitions a given
This approach required bounds on tear sets of vari-
graph into strong components. Then each strong
ous subproblems. An efficient algorithm like the one
component is examined for tearing. We used Duffs
presented here must be available to produce such
iterative version of Tarjan’s algorithm for partition-
bounds for the success of the branch and bound
ing (Duff and Reid, 1978). Tearing algorithms
method. An excellent review on this subject was done
are described by using italicized names for sub-
by Gundersen and Hertzberg (1983). As discussed
procedures that are defined in the following sections
above, we cannot guarantee that this minimum
of the paper.
tear set requires the minimum computation time.
Furthermore, if the flowsheet has many cycles like the Decompose
heavy water plant, a simpler approach that produces
1. Partition the graph and sequence the strong
a close-to-minimal tear set without requiring large
components. Consider the first strong com-
storage space is acceptable. This new tearing algor-
ponent (SC) in the sequence and call it ISC.
ithm can be used for such a purpose.
2. If there is only one node in ISC, add that node
Gundersen and Hertzberg (1983) introduced a
to the final node sequence (FNS). If that node
tearing algorithm that does not use the cycle matrix.
has a self-loop, add the self-loop to the final tear
Since it is based on a simple heuristic rule that selects
set (FTS). Goto Step 5.
the input streams to a unit that produces the most
3. Extract the sub-graph involving ISC and pass it
output information as tear streams, it does not
to sub -&compose.
consistently produce an optimum tear set. They
4. Add the sub-sequence and sub-tear set returned
described it as a “close-to-optimal” tearing algor-
by sub-decompose to FNS and FTS, respect-
ithm. We observed that depending on which tie node
is selected their algorithm may produce tear sets far
5. Choose the next strong component as ISC and
from optimum. More recently, Li et al. (1988) devel-
go back to Step 2. Repeat until all SCs are
oped a new algorithm that also does not use the cycle
matrix. We implemented their algorithm and found
that it also failed to consistently give an optimum tear
set. Its reliability in finding an optimum tear set was
found to be similar to that of Gundersen’s algorithm. Li’s algorithm starts by arranging the nodes in
Lien and Hertzberg (1990) modified the original descending order of node weights. Since the weight of
Gundersen’s algorithm by introducing a new tearing a node is the sum of the weights of output streams
criterion which requires the cycle matrix. Their minus the sum of the weights of input streams, we get
reported results showed that the new algorithm pro- an initial node sequence that is close to the optimum.
duced the optimal tear set for cases where the original The algorithm then repositions the nodes to minimize
algorithm had failed. As discussed by Lien and the weight of the final tear streams. Reversing the
Hertzberg (1990), this is caused by the lack of a node sequence, it then repeats the node repositioning
tie resolution scheme in the algorithm itself. The procedure. Finally, it obtains the final node sequence
improvement was obtained by sacrificing data storage by reversing the existing node sequence once more.
space and speed since the cycle matrix has to be The tear set is determined during the process of
updated repeatedly. Since we are interested in tearing repositioning. The algorithm L&&compose given be-
algorithms that do not use the cycle matrix, the low is a slight variation of the Li’s original algorithm
improved Gundersen’s algorithm was not considered (Li et al., 1988) in that the graph simplification step
here. is omitted. Since the input to Li-decompose is a strong
Our discussion of partitioning and tearing algor- component, the graph simplification step in the orig-
ithms begins with a general partitioning procedure inal algorithm is not necessary. The original graph
New tiring algorithm for flowsheeting 357

weight. These nodes don’t affect the final node a member of NB, include all the CSs in NB in
sequence and tear set. Instead of performing this the tear set (TS) and quit.
graph simplification step, we opted to include these 5. Treat NB as the new ISN and go back to
nodes in the graph since the step itself may be step 1.
expensive relative to the actual tearing task.
Sub -&compose-reverse
1. If there is no counter-stream (CS) entering ISN,
1. Get the initial node sequence (INS) using order-
quit. A CS leaves a node I and enters a node J,
nodes and put it in the current node sequence
to the right of I in CNS. Node I is a counter-
stream node (CSN).
2. Copy CNS into a reference node sequence
2. If there is no active direct stream (ADS) leaving
(RNS). Choose the second node in RNS as the
ISN, move ISN to the left of the left-most CSN
inspected node (ISN).
(LCN) and quit. A direct stream (DS) leaves a
3. Modify CNS using sub&compose-forward.
node I and enters a node J, to the left of I in
4. Choose the next node in RNS as the new ISN
CNS. Node Jis a direct stream node (DSN). An
and go back to Step 3. Repeat until the last node
ADS is a DS that enters LCN or a node to the
in RNS is processed.
right of LCN.
5. Copy CNS into RNS. Reverse CNS. Choose the
3. Calculate the counter-stream weight (CSW) and
first node in RNS as the new ISN.
the active direct stream weight (ADSW). CSW
6. Modify CNS using sub-c&compose-r.
is the sum of the weights of all CSs entering
7. Choose the next node in RNS as the new ISN
ISN. ADSW is the sum of the weights of all
and go back to Step 6. Repeat until the second
ADSs leaving ISN. If CSW > ADSW, move
node from last in RNS is processed.
ISN to the left of LCN and quit.
8. Reverse CNS again to get the final node se-
4. Move ISN to the right of the right-most active
quence (FNS). Current tear set (IS) is the final
DSN forming a node block (NB) with it. An NB
tear set (FTS).
is a sequence of two or more nodes. If LCN is
Order -no&s a member of NB, include all the CSs in NB in
the tear set (TS) and quit.
Arrange the nodes in descending order of node
5. Treat NB as the new ISN and go back to
weights. The weight of a node (NW) is the sum of the
Step 1.
weights of all its output streams (OSW) minus that of
its input streams (ISW). A tie is said to exist if there In Li’s algorithm, it is often the case that a tie exists
is more than one node with the same weight. when the nodes are ordered in the descending order
of node weights. In the algorithm as published (Li
Sub -decompose-forward
et al., 1988), since there was no mention of the tie, it
1. If there is no counter-stream (CS) leaving ISN, appears that the algorithm should work irrespective
quit. A CS leaves a node I and enters a node J, of the order of the tie nodes. The algorithm does
to the left of I in CNS. Node J is a counter- work for most of the flowsheets when the tie nodes
stream node (CSN). are ordered randomly, but it fails for some flowsheets
2. If there is no active direct stream (ADS) enter- as shown later in this work. We introduced a tie
ing ISN, move ISN to the left of the left-most breaking scheme for Li’s algorithm, or&r-node-deep,
CSN (LCN) and quit. A direct stream (DS) as defined in the next section. This improved the
leaves a node I and enters a node J, to the right performance significantly but it still failed for some
of I in CNS. Node I is a direct stream node cases. This comparison will be part of the discussion
(DSN). An ADS is a DS that leaves LCN or a of the results presented later in Table 3.
node to the right of LCN.
3. Calculate the counter-stream weight (CSW) and
the active direct stream weight (ADSW). CSW
is the sum of the weights of all CSs leaving ISN. In analyzing Li’s algorithm, we notice that if the tie
ADSW is the sum of the weights of all ADSs is “unresolved” as deflned in order-node-deep, the
entering ISN. If CSW > ADSW, move ISN to algorithm fails to consider some counter and direct
the left of LCN and quit. streams relevant to a particular node. We address this
4. Move ISN to the right of the right-most active problem in this new LF tearing algorithm by moving
DSN forming a node block (NB) with it, An NB the node under investigation to both ends of the
is a sequence of two or more nodes. If LCN is current sequemze. Also, in contrast to Li’s algorithm,
358 G. et al.

the new algorithm does not perform tearing in succes-

sion (forward followed by reverse). It performs the
tearing only once, but with each node it does the
repositioning twice (once last and once first) and Fig. 1. SimplifiedBarkley-Motard graph.
selects the best of the two resulting node sequences.
The algorithm finds the tear set only after the tinal
Sub -&compose -left
node sequence is generated.
Same as sub-decompose-forward except in Step
LF-decompose 4 the CSs of an NB are not included in the tear
1. Get the initial node sequence using order-nodes -
Sub -decompose -right
deep and put it in the current node sequence
(CNS). Same as sub-&compose-reverse except the meaning
2. Copy CNS into a reference node sequence of left and right is interchanged and in Step 4 the CSs
(RNS). Choose the first node in RNS as the of an NB are not included in the tear set.
inspected node (ISN). Let us apply LF-decompose to the flowsheet in
3. Copy CNS and pass it to sub-&compose-last to Fig. 1 and its corresponding adjacency matrix in
get a new node sequence (NSL) and a new CSW Fig. 2. The INS is (4, 1,3, 52) and hence the CNS
for ISN (CSWL). is also (4, 1,3,5,2}. Perform sub-decompose-last
4. Copy CNS and pass it to sub -decompose -$rst to by moving node 4 to the end of CNS. CNS is
get a new node sequence (NSF) and a new CSW { 1,3,5,2,4}. Node 4 has three CSs 4-2,4-5,4-l and
for ISN (CSWF). one DS 3-4. Since CSW (3) z=-ADSW (I), make the
5. If CSWF < CSWL, copy NSF to CNS, other- CSs direct by moving 4 to the left of 1. NSL is
wise copy NSL to CNS. (4, 1,3,5,2} and since node 4 has one CS 3-4, CSWL
6. Choose the next node in RNS as the new ISN is 1. Perform sub-&compose -first on the original
and go back to Step 3. Repeat until the last node CNS (4,1,3,5,2} by moving node 4 to the front of
in RNS is processed. CNS. CNS is (4, 1,3,5,2}. Node 4 has one CS 3-4
7. CNS is the FNS. Get the FTS by including all and one ADS 4-l. Since CSW (1) < ADSW (l), form
the CSs for all the nodes in the FNS. an NB (4,l). The NB has two CSs 3-4, 5-l and two
ADSs l-3,1-5. Again, CSW (2) G ADSW (2), so the
Order -nodes -deep NB expands to become {4,1,3}. Repeating the pro-
1. Sequence the nodes using order-no&s. cedure, NSF is (4, 1,3,5,2) and node 4 has one CS
2. If a tie exists and more than one group of 3-4, So CSWF is 1. Since CSWL d CSWF, copy
nodes participates in the tie, repeat Steps 3 NSL to CNS. The new CNS is {4,1,3,5,2} (In this
and 4 below for each group. A group consists case, it is the same as the original CNS). Repeat the
of nodes with equal node weights. A tie is same procedure with node 1, after which CNS is still
said to be “unresolved” if there is only one (4, 1, 3,5,2}. CNS at the end of application for node
group participating in the tie and there is a 3 is (4, 1, 5,2, 3). After the application for nodes 5
stream going from one node to another in that and 2, CNS becomes (4,5, 1,2,3}. The FNS is then
group. {4,5, 1,2,3}. Hence, FTS (3-4, 3-5), which is an
3. Extract the sub-graph that involves all the nodes optimum tear set.
in the group from the parent graph. RESULTS
4. Sequence the nodes using order -nodes-&ep over
the sub-graph. Thirteen flowsheets, which vary in size from 4 to
109 units, were used to test the four different tearing
Sub -&compose -Ias t
12 3 4 6
1. Move ISN to the end of CNS. 1 2
2. Modify CNS using sub-&compose-left. 2 1 135
3. Calculate CSW for ISN and call it CSWL. 2 1 1 1
4 3 3 11
Sub-&compose -first I 2 51EEH 1
1. Move ISN to the front of CNS. a 3 212 111
2. Modify CNS using sub-decompose-right. 0 -20 2 0 0 0 0
3. Calculate CSW for ISN and call it CSWF. Fig. 2. Adjacency matrix for Fig. 1.
New tearing algorithm for flowsheeting 359

Table 1. Classical flowshats Tabk 3. Numba of tear stmuns sakcted

Flowsheet Reference Algorithms
Rubin (1%2) Flc.wshaat 8 I m If
: Forder and Hut&son (1969) 4 2 2
3 Christensen and Rudd (1969) 3
: 3 3
4 Upadhye and Grens (1972) 2
3 2 2 9
C!hristcnscn and Rudd (Graph I) (1969)
4 2 2 2
: Christensen and Rudd (Graph II) (1969) s
S 3 3
7 Sargent and Westarbarg (1964)
6 49 4. 4. s
Shannon et al. (sulfuric acid) (1966)
6 6 6 6
t Gunderscn and Heaherg (heavy water) (1983)
: 6*
10 Pho and Lapidus (1973)
9 1; 13’ 11 11
3arkley and Motard (1972)
10 3. 2 2
t: Jain and Eakman (HF-alkylation) (1971) Y 6
11 8’ &
13 Jain and Eakman (vegetable oil) (1971) 6* 5
13 : 8 8 :
SucCCss (%) 60 60 85 100
algorithms (See Tables 1 and 2). These are typical
lNon-optimum tear set.
flowsheets taken from chemical engineering literature
that have been previously used to assess the perform-
algorithm, more than one initial node sequence (INS)
ance of tear stream selection algorithms. Note that
exists if tie nodes are present and different INSs
only flowsheets 1 and 4 have stream weights other
possibly give different final tear sets. Flowsheets 6, 8
than unity.
and 9 have tie nodes and Li’s algorithm indeed gives
Table 3 presents the number of tear streams
optimum tear sets for some INSs.
selected by the four algorithms for each of the 13
flowsheets. The number of tear streams also gives the
weight of the tear set except for flowshects 1 and 4
which have nonunity stream weights. For flowsheet 1, The new tearing algorithm (LF) developed in this
algorithm g gave a tear set weight of 6 in contrast work has the best performance in that it gives
to 3 given by others. For flowsheet 4, all algorithms an optimum tear set for all 13 of the classical
gave a tear set weight of 4. There are five instances flowsheets studied. Gundersen’s “close-to-optimal”
where algorithm I and g failed to give an optimum tearing algorithm may give tear sets far from opti-
tear set, resulting in a 60% success rate. With a tie mum depending on which tie node is selected for
breaking scheme, the success rate of Li’s algorithm tearing. The Li tearing algorithm is similar in per-
was improved to 85%. Algorithms If produced an formance to Gundersen’s and suffers from the lack
optimum tear set for all the flowsheets studied, for a of a tie resolution scheme for initial node ordering
100% success rate. and from the repositioning procedure used. With
For algorithm g, we obtained 15 and 8 tear streams a tie-breaking scheme, the performance of Li’s
for flowsheets 9 and 11, respectively, as opposed to algorithm was improved significantly.
13 and 7 reported by Gundersen and Hertzberg
(1983). As mentioned earlier, the performance of that
algorithm is inconsistent if tie nodes exist. This aspect
was later discussed by Lien and Hertzberg (1990). Aspen Technology Inc., ASPEN PLUS Introduciory
Mom&. Aspen Tech. Inc., Cambridge, MA (1988).
Gundersen and Hertzberg also reported that their Barkley R. W. and R. L. Motard, Decomposition of nets.
algorithm gave at most one more tear stream than the them. EtlgPtgJ. 3, 265 (1972).
minimum for the flowsheets they tested (flowsheets Christensen J. H. and D. F. Rudd, Structuring design
computations. AIChE JI 15, 94 (1969).
5-13 of the present work). We found that the tear set Duff I. S. and J. K. Reid, An implementation of Tarjan’s
can be far from optimal depending on how the tie is algorithm for the block triangularixationof a matrix.
broken. We also could not reproduce the results ACM Tram Math. Sofrware 4, 137 (1978).
ForderG. J. and H. P. Hutchinson,The analysisof chemical
reported by Li et al. (1988). They obtained optimal plant flowshats. Chem. Engng Sci. 24, 771 (1969).
solutions for all of the nine flowsheets they studied Gros H.. K. Kaijalouto and I. Mattsson, Some new aspects
(flowsheets l-9 of the present work). In Table 3, we on partitioning and tearing in steady-state process simu-
lation.Comprcler Appfications to the Analysis of Chemical
show that Li’s algorithm failed to give an optimum Data and Plants. Vol. 5. SciencePress, Princeton(1977).
tear set for flowsheets 6, 8 and 9. When using Li’s GundersenT. and T. Hertzberg, Partitioningand tearing
of networks-applied to process flowsheeting. Model.
Table 2. Legend for tearing algorithms
r&ltif. Control4 139 (1983).
Jain Y. V. S. and J. M. Eakman, Identificationof process
SymbOl Algorithm ROW networks.AIChE 6Bh National Meeting. Houston,
Gunderscn TX (1971).
7 Li Lau K. H. and D. L. Ulrichson. El&&s of local constrains
Li with order-nodes-deep on the convergencebehaviorof sequentialmodularsimu-
; LF
lators. Computers them. Engns 16, 887-892 (1992).
360 G. V. VARMA et ul.

Li Z., W. Han Zhen and T. Yu Kuo. A new strategy of net Rubin D. I.. Generalbed material balance. Chrm. Engng.
decomposition in process simulation. Computers ckm. Process. symp. ser. fs, 54 (1962).
Engng 12, 583 (1988). Sargent R. W. H. and A. W. Weaterberg, SPEEDUP in
Lien K. M. and T. Hertzberg. An improved heuristic chemical engineering design. Truns. Inst. Chem. &gng 42,
algorithm for selection of tear streams and pm T190 (1964).
ordering in process flowshating computations. MO&. Shannon P. T. er al., Computer simulation of a sulfuric acid
Mentif: Control 4 139 (1990). plant. Ckm. ~%~PQJ Rag. 61 49 (1966).
Pho T. K. and L. Lapidus, An optimum tearing Upadhye R. S. and E. A. Grens II, An el?icient algorithm
algorithm for recycle systems. AZCkE II 19, 1170 for optimum decomposition of recycle systems. AIChE JI
(1973). 1% 533 (1972).