Copyright © IFAC Dynamics and Control of Chemical Reactors (DYCORD+'95), Copenhagen, Denmark, 1995
ALAMBIC - A SOFfWARE PACKAGE FOR OPTIMISING DESIGN AND OPERATION OF BATCH DISTILLATION COLUMNS LM. Mujtaba·, G. Stuart and S. Macd1ietto Centre For Process Systems Engineering Imperial College. London SW7 2BY. UK.
is a window based, interactive and casy·~use software package developed for tile ~ign and opc;tation of batch dish1Jation columns. les features are highlighted. The package ~~ts. the. solu~on C!f a ,,?de range ~f problems eocountered iD multicompooent and reactive batch dis~on. ~diDg gmuJatiOD and opcimal operadoo of a given c:oJumn, and simultaDeous optimisalion of design-operalion. for single and multiple duties, utilising rigorous models. The problem definition is doDe iDtetactively by editing simple menus aDd forma iD multiple windows. Resoles are viewed iD graphical form. A case management tool permits the easy solution of multiple problems. The use of the package is demoastrated by two examples from the literature.
Abstract: ALAMBIC o~g
Key Words: batch disri l1ation. simulation, oprimisatioo. design, mullicompooent, reactive design, iii) the detemlination of optimal design (e.g. no. of plates) and operation (e.g. reooveries, purities. reflux ratio profiles) decision variables. iv) the developcmcnt of optimal recycle policies. Much of this work is summarised in a review paper by MacrlJieUo and Mujtaba (1992).
1. IN1RODUcnON Batch distillatiou is the most frequent separation method used iD batch processes, iD particular iD the production of eme chemicals and speciality products. The operation is iuhen:ody dynamic aDd has many degrees of freedom. Operation decisions must be made on the structure of the opmWOD (sequence of product and intermediate cuts, recycles, etc.) and the control profiles (reflux ratio, possibly pressure) and times for each cut. Furthermore, the same column is typically used for a variety of separaDon duties and the problem arises of selecting the best column to meet all requiremenes. Design and opcraDon c:boices iDtcr'8Ct very strongly and may strongly affect the ovmill economics. Finally, there is often a degree of uncertainty on many process quantities such as the feed oomposition, relative volatility of species, etc.
CQmmercial software packages such as BATCHFRAC (Boston et al.. 1981), BASIS (Simnlatiou SdeDces Inc., 1989) and ProSimBatch (1992) are available but only for simulating batch distillation operation. To our knOWledge,. no commercial package is currently available for optimising the design and operation of geoeral batch columns using rigourous column models and tbcnnopbysical properties models. Diwekar and Madbavan (1991) developed the BATCH·DIST package which includes computer codes for limnlation. opti:maI design and operation of cooventioual column configurations. for a single separaQoo duty and using short-cut models. The authors swe that the package is efficient for rapid analysis of the column behaviour. for rapid Sjmlltatjoo of large oolumns and that it is suitable for preli!"inary design. Data input to the package is provided through a keyword language in an input file. Problem data must be given in a fixed order (e.g. o~on policy, thermodynamic option, column specification, terminating condition etc.). The package however does not deal with
Many sbJdies have appeared iD the lite:ramre (e.g. Farbal et al., 1990; Logsdoo et al., 1990; Mujtaba and Macchietto, 1993, 1994a,b) which address individual aspeccs of the process, for example, i) the dynamic simulation of a given operation for a given column, ii) the development of optimal profiles of key control variables (e.g. reflux ratio) for a fixed • Current address: Depuuneut of Qanical &linecri n" Univcnily of Br.dfc.d. Br.dfCll'd BD7 IDP, &gland. UK. 135
(with a bottom feed and the products obtained from the top), alternative configurations (collectively called "unronventional columns") have been found, in some cases, to be more advantageous and are indeed used in practice. These include the so called inverted (feed at the top, products from the bottom) and complex (middle feed/product vessel, distillate and boUoms products withdrawn simultaneously) batch disti.l1a1ion columns, which, although known since the mid sixties, have regained some attention lately, in particular, for separating azeotropic mixtures. A comparative study (Mujtaba and Macchietto, 1994a) shows that distinct configurations may be better for different feed conditions and/or product specifications. Thus, it is sometimes essential to consider these alternative configurations. Accordingly, ALAMBIC permits selecting (and optimising) either a conventional. inverted or complex column roofiguratioo.
unconventional column configurations. multiple separation duties and multiple case studies. Optimisation is only performed with short-cut models. Here. a software package. ALAMBIC. is introduced, which is designed to address a much wider class of ba1cb distillation problems, including non conventional column configurations. rigorous rolumn and physical property models witblwithout chemical reaction, single duty multiperiod operaDOO and multiple duties multiperiod operation. Since many more degrees of freedom are allowed than in other fonnulations. the design of a suitable problem defmition interface and software aspects become more important. Simple keyword orientated languages are no longer sufficient The overall objective here is to aeate a user friendly and easyto-use canputer software package which will:
2 1 2 Bald! DistiJJatioo Model
1. Carry out simulatioo and optimjsation of operatioo and design for general batch di.~;natioo p'Oblems. 2. Ease problem formulation 3. Simplify input specifications 4. Detect automatically invalidfmronsist.eot specifications S. Allow geoezal user supplied thennophysical propeay and reaction models 6. Facilitate multiple case studies
Available models range from very simple to more detailed (e.g. Mujtaba, 1989, Mujtaba and MBccbietto, 19948).10 ALAMBIC a column model consists of a general system of differential and algebraic equations (DABs) denoted by f(x, x', t, u, v) 0, where x are the state variables, x' their time derivatives, u a vector of time varying control variables aDd v a ~ of constant parameters. The model consists of mass and energy balances and phase equilibrium relations, with thermophysical property variables such as entbalpy, density and Kvalues calculated from a general purpose thermodynamic package, for multicomponent ideal and nonideal mixtures. Main suboptions include constant molar or volumetric holdup. There is also the option of a simpler DAE model based on equimolar overflow and constant relative volatility assumptions. There are no hydrodynamic models at present, although simple correlations could be readily added. The correct equations are generated autnmatical)y for eacb model option.
=
The package functionality, user interface and architecture are briefly desaibed in secUoo 2, while two illustrative application problems are swnmarised in sectioo 3.
2. ALAMBIC - OVERVIEW 21 SCQllC ALAMBIC is a software package being developed at Imperial College for the optimisation of design
and operation of batch distillation colUIDDS. A unique feature of this package is Chat it can address a number of novel problems within the same environment Its main features are outlined in the following and are summarised in Table 1. The general approach followed is to model the batch distillation process in terms of fairly rigorous models. to use standard thermophysical propelt)' models through a well defined interface, and to use powerful numerical techniques developed in-house for the solution of numerical integration and dynamic optimisation problems. Table 1 also lists the original references where problem fonnuIations and solutioo techniques are given in more detail. All equations and numerical aspects are however handled behind the scenes, and all user-program int.eractioos are through high level interfaces.
213Pmblem= A batch distillation column can be used for separating several fractions of a single feed mixture (single duty) and for processing several mixtures in the same rolumn (multiple duties). For each duty, a sequence of product and recycle cuts may be specified, with specifications on product fractions given in engineering terms (amounts, purities and recoveries). For oper.ltions problems, it is possible to maximise the recovery of specified species. to mjnjmise energy requirements or to minimise the time required for the entire oper.ltion. 10 fact, it is possible to muimise an economic objective fuoctj(lD, with user-given unit costs of energy and of each iDput, main product and by-product material. It is also possible to optimise an ecooomic function wheD Cbe column is used for multiple duties, given a producU(lD horizon, the fraction of time allocated to each rolumn and the demand for each product. To meet these requirements the optimal column
2.1.1 Batch Column Conti&,ntions Allhough batcb distillation is often CODSidc:red in the context of a conventional column configuration 136
operation (typically reflux ratio, amounts/recoveries and times for each cut) are calculaled by solving an optimal control problem. Design problems additionally include the optimisation of just (at the moment) the number of stages, utilising an annualised profit function with user specified cost parameters (Mujtaba and Macchietto 1993, 1994b).
functions involving a fmite number of parameters. In particular, a piecewise constant representation of the coottols is typically used, as shown in Figure I, resulting in two parameters per subinterval (a CODtrol level and intelVal end-time). The discretised control parameters, other constant parameters and possibly some design parametezs make up the vector d of decision variables to be optimised. Each "functioo cvaluatioo" in the optimiser requires a full integration of the DAE system and this is achieved by using a Backward Differentiation Formula (BDF) method with special features to handle discontinuities. Solution of the optimization problem requires calculating the derivatives of the objective function and constIaints with respect to all the optimisation variables. These are evaluated in an efficient way using adjoint variables. The constrained nonlinear optimisation problem is solved using an efficient and robust Successive Quadratic Programming (SQP) technique (Chen, 1988). Multiperiod and multiple duties problems are solved using a multi-level formulation, thus allowing the easy mix of different models and model opUoos within the same problem.
Simulation problems are viewed as special cases of an optimisation problem with no degrees of freedom. At the time of writing, the interfaces are being expanded to incorporate the treatment of uncertain parameters, utilising the solution procedure of Walsb et al. (1995). Table 1: Features of ALAMBIC Problem Type
References·
1. Simulation 2. Optimal Recycle Policybinary mixture 3. Optimal Recycle Policymulticomponent mixture 4. Optimal operation with reactive distillation 5. Single duty multiperiod operatioo 6. Multiple duties multiperiod design and qxntion 7. Optimal operation with uncooventional columns 8. Optimal operation with uncertainty
=
A (1989) B (1988)
B (1992) B (1992)
o
C (1992), B (1993)
!
B (1994b)
-=~
piecewise constant
~
B (1994a)
time
D (1995)
=
tp
Figure 1. Disaetization of Controls
B Mujtaba and MacchieUo • A Mujtaba C =Macchieuo and Mujtaba D =Walsb, Mujtaba and MacchieUo
2 3 Software Enyimnment 2.2 Numerical Tr4mjgues used in ALAMBIC
ALAMBIC is a window based software package consist.ing of three main components: a problem definition part, a set of solution routines and a grapbical results presentation part For portability and ease of software maintenance reasons the problem definition and results parts are developed using Open Windows Developer's Guide (DevgWde), a tool for the design, prototyping and productioo of user interfaces using the X-Windows standard. Problem defmition is performed by utilising simple menus and forms. For example, Fagure 2 shows the main menu. By pulling down sub-menus ODe can easily choose one or more Case studUs, Edit a problem, Run the case study and produce Rtpons. The solution routines consist of the computez codes written in standard FOR1RAN
The underlying numerical techniques used in ALAMBIC have been presented in detail in earlier work and are therefore discussed only briefly here. Since batch distillation process is inherently a dynamic process, the optimal design and/or operation of such process results in an optimal control problem which can be represented as: Min J (objective functioo) d (decision variables)
s.l
h= 0 (equality constraints) g ~ 0 (inequality constraints) f(x. x', t, u, v) 0 (DAE model)
=
77. Using the ALAMBIC problem definition facilities it is possible to: 1. Edit any menu, sub-menu. form in any order 2. Rcuieve, edit, save ODe or multiple menus and forms so as to geoerare and run different problems Case maoagement facilities are thus provided. These togethCl' with a built in check for invalid and
with suitable initial and tennioation cooditions. This optimal control problem is posed as a DooUnear programming problem by approximating the controls (e.g. the reflux ratio profile) by a finite dimensional representation. The time interval of interest, say [to. tp] is divided into a finite DUIIlbeI' of subintervals, each associated with a set of basis 137
inconsistent specifications give the user a great freedom and make the software easy-to-use.
.!J
..... 4ktlIwt.e.~. ...I •
qc:lat.x.w
The EdiJ sub-menu (Fig. 2) allows the user to select (i) the problem type (e.g. simulatioo or optimisatioo etc.) (ii) column configuration (conventional, inverted or complex) (ill) model type (simple, based on constant relative volatility, or more detailed based 00 differential mass and energy balances. with sub-options for constant molar or volume boldup, etc.) (iv) equipnent parameters (no. of plates, initial column profiles, etc.) (v) no. of compooents and their identification, models for physical properties calculations (simple constant relative volatility or rigorous) (vi) operation policy (i.e. sequence of product cuts) (vii) cost functions (column, reboiler and condenser cost, steam cost, feed/product materials unit values etc.) for use in optimisation. Eacb of these sub-menus can be edited independently.
c-
S ..............
_,_~) . .....
tI1rn:p [dl<
,~(1'~ 1 . Pl"Gbl . .
~
I
Run~) study
~
_1_
~
-=t~~1
n-twptMW t.ol~ ~r.~'on
Repor~s~)
)
Exa)
1
r
~rnar"\l . 8
,.
6f" _ _
~tri§iRJ !.l-.al.~I:rabl" ~ ~~
"'-le:..1
___
~'"
Cl"u .. , _.uon Cl"....1 _,.., ..... _u,,,,,
apo.o.tlan pol"",
Some Edit sub-menus are simple forms to be filled in to define various activities. Fcx' example Figure 3 shows the f
FJgure 2: Some ALAMBIC Menus for Problem Definition
---
N .... ber ell arts/off..cr. • CoIt_.....:
Editing menus, sub-menus, forms etc. in the front end aeates an input data specificatioo file needed to solve the specific problem defined. Specifications are checked for completeness and (as far as is possible a priori) for consistency. The approacb taken is to automatically assume a user will wish to specify all degrees of freedom available. For optimjsation problems the user is asked to identify any decision variable to be relaxed and thus optimised and to give lower and upper bounds of these decision variables. For example, in Figure 3 minimum and maximum values of a cyc10bexane recovery specification are given. Bounds are used to generate linear coostraints for the problem, based on mass balances. These in turn are used during subsequent problem definition steps for simple feasibility checks, as and when further specificatioos are entered. We found this extremely useful to detect (common) specification mistakes and to avoid at source some infeasible optjrnisation problems. For example, it is all too easy to specify amounts and purities in a series of product cuts which tocal more than the amount of a species in the feed charge.
_.-
-
r.r~~~~==== r-: ...... - ....
........ ,........... . , ................ -...-J --=~,
,...~
~
' .............. 1............,,_1
-. . ----"
~- Mia: ......,.....-..c!.!!!!....
,
_
Moo:_
~-
...,....-...,...,1 ...... 1
Figure 3: Some ALAMBIC Forms for Problem Definition exlerDal routines (tbermopbysical properties and models); (ii) compile those codes and (ill) run the poblem. reacUClIl
When the numerical solution is completed the
Rtpons sub-menu can be used to select the form of the presenWioo of the results. 10 the current version all graphics have been implemented using the Mallab package. A sub-menu allows the user to choose different f
The Run sub-menu allows the user to run the job on the same romputer or ClIl a remote computer Ovel' a network or in the bacqrotmd as a batch job. Ooce the appropriale optioo is cbosen the run c:omrnand will (i) retrieve the appropriale computer c:odcs required to solve the problem. A translator gcucraICS the required model equations for each problem, together with all (analytic) derivatives and calls to
The software architecture is represented in FJgure 4.
138
I
3.2 Optimal Design and Operation A single duty multiperiod design and operation example (Mujtaba and Macchietto, 1994b) is used to demonstrate the capabilities of the package on more complex problems. As in the base case (Nad and Spiegel. 1987). a conventional column is used. There are 4 distillation tasks in the operation, producing 3 main products (01.02. Bf) and 2 off· cut byproducts {RI. R2} from a ternary feed FO in the sequence FOID1IRIID2IR2-Bf. The product specif'lC8lioos are as in the original work. The problem is to find the optimal design of the column (number of internal plates) and the optimal operalioo policy (reflux ratio) which will maximize the overall profit for this multiperiod operation. The input data, problem specifications and cost coefficients given in Table 2 are defined in ALAMBIC by filling the interactive menus and forms as shown in Figures 2-3. This design and operation problem is formulated and solved as a two level optimisation problem. The main design and operating decision variables are shown in Table 2 with initial values and bounds.
Results
Sub-
Forms
SOLUTION
Figure 4: Schematic architecture of ALAMBIC
3. CASE S1lJDIES 3 1 Simnlatjoo
Table 2: Input Data, Product Specifications and Decision Variables. Recoveries Reia,b are defmed as: amount of component j in state a I amount of component j in stale b.
A simple binary batch distillation operation at atmospberic pressure is simulated. Results are compared with the experimental results of Domenecb and Eojalbert (1974). The column has 4 internal plates (75% efficieDcy). a reboiler (constant 3KW input) and toIal coodenser. The feed contains 62% mole Cyclobexane and 38% mole Toluene. The total initial charge is 200 gmols of which 2.5 gmols are in the coodenser and 7.5 gmols in the total boldup on plates (equally distributed). The column composition profile is initialised with that of toIal reflux operation and is operated using a constant internal reflux ratio of 0.75 (external reflux ratio = 3. as used by Domenecb and Eojalbert). The rigorous column model and SRK thennodynamic model are used to simulate the operation. with constant molar boldup. Simulation (Figure S) and experimental results are in good agreement
Column-
=
Coofiguratioo Cooventiooal Still c.paaty =Bau:h size., FO, kmol Condeuser Vapor Load, V. kmollbr Condeuser Holdup Iotcma1 PIatea Holdup (total) tion Scguencc' 0IIRIID2JR2-Bf
cmm
=2.93 = 2.75 =1.2%ofFO = 1.9% ofFO
Feq:I Mixtnn:;·
Compooeou:l. Cyclobexaoe. 2. o-Heptaoe, 3. Toluene Campo5"xro. mole fnctioo = <0.407, 0.394. 0.199> Models' Column model: Rigouroua, coDlt.. molar boldup 1beunodyoamic model: SRK equatioo of state SmQfiationsa Cyclobexaoe mole fraction iD 01. x 101 o-Heptaoe mole fraction iD D2, x2n2 Tolueoe mole fractioo iD Br. X3sf Cyclobexaoe recoveIY iD RI. Re l Rl.B1
=0.895 =0.863 =0.990 =0.95
Main Decision yllriables: Mljmlll·tiOU·al.....V.!.lalIlluilll:e'-----Ibo~uAllpdus NumbcrofP1ates, N 16 <13, 21> Cyclobexaoe recoveIY iD 01: <0.80, 0.92> ReI01,FO = 0.85 Cyclobexaoe mole fraction iD RI : <0.35, 0.45> x 1Rl =0.40 Tolueoe recovery iD 02: <0.60, 0.92> 0.85 Tolueoe mole fractioo iD R2: <0.30,0.40> x~ =0.30
=
Re2m.s2
=
~
COl = 30.0 $/kmol, CO 2 = 26.0 $Ikmol, CRI - CR2 - - 1.0 SIkmol CBr c 24.0 SIkmol. CFO 2.0 SIkmol, eau
Figure 5: Conpn$itioo vs Amount of Distillate Simulation and Experimental results
=
139
=0.0
The optimal operation results in Figure 6 show typical proflles of species mole fractions in the distillate product accumula10r tank and the optimal (piecewise constant) reflux ratio proflle for the whole operation.
simulalioo ofbalcb distillation operation. FOCAPD,2. 203. CbeD, Cl... (1988). A class of successive quadratic programming methods for flowsbeet optimisation. PhD Thesis. Imperial College. Diwekar, U.M. and K.P. Madbavan (1991). BAl'OI-DIST: A comprehensive package for simulatioo, design, optimjzation and optimal cootrol of multiromponent mu1tifraction batch distillation columns. Comp. Cllem. Engng., II (12), 833. Dnmenecb. S. and M. Enjalbett (1974). Modele matbematique d'uoe colooe de rectification
The profit with the optimal design and operation is 35% higher than that for the base case coulmnloperation of Nad and SpiegeI. calcula1ed using the same cost model. 1be optimal column has 17 theoretical stages while chat of Nad and Spiegel. has 20 stages. Oo1y 6 rdlux intervals are required as compared to 20 reflux changes in the base case. There is no need foc initial total rdlux in the oplimal operatioo as required in the base case (for 2.54 brs).
discontinue. Chem. Ellg. Sci.. 22. 1529. Farbat, S .. M. Czemicki. L. Pibouleau and S. DnmC".OC'dl (1990). Optimization of multiple fraction balcb distillation by nonlinear programming. AlChE Jounuzl, 36(9), 1349. Logsdon, J.S., U.M. Diwekar and L.T. Biegler (1990). On the simultmeous optimal design and operation of balcb distillation. Trans lChemE, ~ Part A, 434. Macx:hieUo. S. and I.M. Mujtaba (1992). Design of operation policies for balcb disfj11at ion.
Detailed optimisation results are given in Mujtaba and Macchieuo (1994b).
----.....:~ .- . -- -
..-.-.-...
~1
1·7.:.:::::;:-·;;-;'· ::-::~···-··
. t
•
......... 2
•
t
,,
io.&
I~
'i '. "
1°·4 iSG.3 , "i
Proceedings 0/NATO ASlolI Batch Processing Engineering, Antalya, Turkey. May 29-1une 7
, i , i
'
!
I
.
......... 3
~o ~ I ~' 0.1 ~ ...... - - - - - - - - ' c ' __ ._. I()
°
(1992). Mujtaba, I.M. (1989). Optimal operational policies in batch disti11atioo. PhD Thesis, Imperial college, London. Mujtaba, I.M. and S. Macchieuo (1992). An oplimal recycle policy for multicomponent batch di.diJlation. Comp. Cbem. Engllg., .lD(S), p-
i , i ' i
I
-'- ' - ' - '~
23.
TWE(Hr.)
S
678
S273. Mujtaba, I.M. and S. Macdlieuo (1993). Optimal operation of mll1tirompooent balcb distillationMutiperiod Formulatioo and Solution. Comp. Chem. Engng•• 11(12), 1191. Mujtaba, I.M. and S. Macdlieuo (19948). Optimal design and operation of balcb distillatioo- a comparati.ve SWdy using CODveo1iooal and DODCODVC:Zllional colUDlDS. Proceedings
Figure 6: Accumulaled Disti1Jale Composition
Profile 4. CONCLUSIONS ALAMBIC offers an interactive, user friendly and easy-to-use software package for simulating and
ADCHEM'94-1FAC Symposium 011 Advanced ColllTol o/Chemical Processes, p415, Kyoto,
optimising the design and operation of batch distillation columns. The window based front end permits the def"mition of all problems and specifications in the same environment, through simple mc:nus and forms which are easy to edit and in any sequence. Results are presented in graphical form. ALAMBIC also allows interfacing with user supplied column and thermodynamic models and supports multiple case studies and model management Many of the problems types bandied are not available in currently available softwares.
Japan, 25 - 27 May. Mujtaba, I.M. and S. Macdlieuo (1994b). Optimal design of IDlIltjrompooent batch distillation columns- single and multiple separation duties.
Proceedings PSE'94- 45h IntertllJlional Symposium 011 Process Systems Engineering, Voll. pl79. Kyongju, Korea. 30 May - 3 June. Nad, M. and L. Spiegel (1987). Simulation of batch distillation by COOlputer and comparison with experimcDL Proceedings CEF'87, Taormina,
Italy, 737. Simulatioo Sciences Inc.• (1989). BASIS User Mannual. Fulb1on, CA. ProSimBatdl (1992). Manual UriJisateur. Prosim
ACKNOWLEDGMENTS
SA. Toulouse.
This work was supported by a grant from FPSRC.
Walsh, S .. I.M. Mujtaba and S. Maccbieuo (1995). Optimal design of operatiDg proa.dure foc batch distillation column with unc:enainty. submitted to ESCAP&5 CODfen:occ, SloVCDia.
Boston J.F., ID. Britt, S. JinIpongpban and V.B. Shah (1981). An advanced system foc the 140