Home

Advanced Process Analysis System - Minerals Processing Research

image

Contents

1. dco teda 24 B Reactor System ra ea musasasa a Satuan d estu LCS DELI ud 26 C Absorber Tower Section deeem tee stu sega a be e Rau qn k Ue deu 30 D Overall Material Balance 30 Getting Started With Advanced Process Analysis System 32 Usine FIOWSIM oso Sa nt aman a auda tumet tad a S wD usa 34 Using On line Optimization Program eese 52 Using Heat Exchanger Network Program icem tetro 74 Using Pollution Index PrOgrarn eid deo es Lee edid dee doas 94 Using Chemical Reactor Analysis Program 101 Optimization Solver GAMS ou pu tec tst lenses e Tid os 112 Acknowledescmielits x sus u qi Pr Ds edit Die dau Ss NS 0 RS S tees ate 129 XII Reference Soana saku haasi eee euo dee eee Appendix A Constraint Equations for the Aniline Process Appendix B Full Output File for On Line Economic Optimization Disclaimer The Mineral Processing Research Institute MPRI makes no warranties express or implied including without limitation the implied warranties of merchantability and fitness for particular purpose regarding the MPRI software MPRI does not warrant guarantee or make any representation regarding the use or the results of the use of the MPRI software in terms of its correctness accuracy rel
2. Inequalities Economic Egn Equality Constraints x Scaling Factor 14 4 Equality Constraints 0 of 0 gt Go Tio Record Close Help Required Figure 26 a Equalities Tab in the Global Data Window iw Global Data Iof x Measured Vars Unmeasured Vars Plant Params Equalities Inequalities Economic Eqn Economic Equation profit e ffprod mwprod cstacid fshp1 fshp2 csthpsteam f50 cstsulfur fsbfw cstfeedw fdw cstdilutud El Scaling Factor KKI Equations 0 of 0 gt ni Close Help Figure 26 b The Economic Equations Tab of Global Data 45 The last tab in the Global Data window is for the Economic Equations These are equations which can be used as the economic model and the left hand side of one of these equations is specified in on line optimization as discussed in Section VI For the aniline process let us enter the equation that defines the profit function for the whole process Click on the Add button and enter the equation shown in Figure 26 b The variable profit will be used later to specify the objective function for economic optimization As seen in Figure 26 b the profit function is equal to the product stream flowrates lb hr multiplied by their sales coefficients 1b subtracted by the input stream flowrates Ib hr multiplied by their cost coefficients 1b B Tables If there are constant coefficients used in the c
3. Figure 5 The Composite Curves for Hot Streams on the left side and Cold Streams on the right side for The Simple Process Figure 6 The Grid Diagram The amount for minimum hot and cold utilities calculated by the Heat Exchanger Network Program is compared with the existing amount of utilities being used in the process If the existing amounts are greater than the minimum amounts the process has potential for reduction in operating cost The network grid diagram synthesized by THEN can be used to construct a heat exchanger network that achieves the target of minimum utilities The savings in operating costs are compared with the cost of modification of the existing network and a decision is made about the implementation of the solution proposed by THEN The aniline process will be used to demonstrate the use and capabilities of the THEN program This is described in Section VII 10 E The Pollution Index Program The final step in the Advanced Process Analysis System is the assessment of the pollution impact of the process on the environment This has become an important issue in the design and optimization of chemical processes because of growing environmental awareness The pollution assessment module of the Advanced Process Analysis System is called The Pollution Index Program It is based on the Waste Reduction Algorithm Hilaly 1994 and the Environmental Impact Theory Cabezas et al 1997 E 1 Waste Reduction
4. The input part of the program is now over TO BE ABLE TO RUN THE REST OF THE HEAT EXCHANGE PROGRAM YOU MUST NOW SAVE THE INFORMATION ENTERED SO FAR So save the information entered by clicking the Save button The program displays the Save As window shown in Figure 79 Save the model as aniline hen in the Examples subdirectory of the program folder Now click the Run button on the Build Model window The program uses all of the information entered above and appiles concepts of pinch analysis to the aniline process The next window that appears on the screen is the Output Window shown in Figure 80 Clicking the first button View and Save the GCC on the Output Window displays the Grand Composite Curve on the screen This is shown in Figure 81 It is a plot of enthalpy flows in the system versus temperature The units for temperature and enthalpy are the same as for the input data entered The temperatures are in Rankine and enthalpies are in Btu hr As seen in Figure 81 the curve touches the temperature axis at one point Since the process extends above and below this point it needs a cold external utility and a hot external utility The amount of cold utility is the enthalpy coordinate of the lowest point of the curve This is about 4 1 MMBtu hr as seen in the diagram The amount of hot utility is the enthalpy coordinate of the highest point of the curve This is about 3 1 MMBtu hr as seen in
5. Units streams physical prop DataBase of APAS PFD units amp streams Unit local variables EM eiie ae Specification Sean aedon On Line PFD units streams physical properties Streams global variables Plant data Property enthalpy function density viscosity parameters Temp flow rates mox Seca aie a eei enthalpy function Reactor FS simulation data Analysis OLO optimal setpoints W bean data i Temp flow rates matea parameters enthaloy function i RA reactor comparison Py Pinch Key word index best reactor for the Analysis Unit ID Stream ID process Component ID PA _ best heat exchanger Property ID network Flow rates composition Pollution Pl pollution information Pollution information Index E Advanced Process Analysis System File Process Help ci advsys temptuntitled ioo 81 98 4 12 PM Flowsheet Simulation Optimization Mineral Processing Research Institute Louisiana State University Advanced Process Analysis System User s Manual and Tutorial for the Aniline Process Kedar Telang Steven Reynolds Ralph W Pike Jack R Hopper Janardhana R Punuru Carl L Yaws Copyright 2001 Louisiana State University March 1 2001 I III lt VII VIII TABLE OF CONTENTS Introduction and Methodology essent 1 JC TSO VE SHES EIT AAEE E nte
6. VAR F14 VAR F16 VAR F17 VAR F18 VAR F19 VAR F20 VAR F21 Economic Optimization Program VAR F23 VAR F24 VAR F25 VAR F26 VAR F27 VAR F28 VAR F29 VAR F31 VAR F32 VAR F33 VAR FCW1 VAR FCW2 VAR FCW3 VAR FCW4 VAR FCW5 VAR FCW6 VAR FCW7 VAR FCW8 VAR T03 VAR T04 VAR T07 VAR T08 VAR T09 VAR T10 VAR T11 VAR T12 VAR T13 VAR T14 VAR T16 VAR T17 VAR T18 VAR T19 VAR T20 VAR T21 VAR T23 VAR T24 R T25 R T26 R T27 VAR T28 R R gt T29 AR T31 VAR T32 VAR T33 Economic Optimization Program VAR TCW1 VAR TCW2 VAR TCW3 VAR TCW4 VAR TCW5 VAR TCW6 VAR TCW7 VAR TCW8 VAR OBJ VAR VAR EFF_AN VAR EFF DPA VAR EFF H2 VAR EFF H20 VAR EFF N2 VAR EFF NH3 VAR EFF PH VAR F03NH3 VAR FO4PH VAR FO7AN VAR FO7DPA VAR F07H2 VAR F07H20 VAR F07N2 VAR FO7NH3 VAR FO7PH VAR FO8AN VAR FOBDPA 4240 0000 4242 9999 4300 0000 3890 0000 3892 8210 3950 0000 3850 0000 3850 0000 3900 0000 0 1171 3850 0000 3850 0000 3900 0000 40 0000 42 8210 45 0000 330 0000 347 2487 360 0000 170 0000 178 1740 190 0000 170 0000 178 1740 190 0000 12 0000 13 0600 14 0000 02 1
7. To implement the Advanced Process Analysis System for the Aniline process described in earlier section the first step is to develop the process model using the Flowsim program The Flowsheet Simulation button should be now clicked to open the Flowsim program V USING FLOWSIM Upon clicking the Flowsheet Simulation button in Figure 11 the FlowSim window is displayed with the General Information box In the space for model name let us enter Aniline In the process description box let us enter Ammonolysis of phenol simulation The General Information box with this information is shown in Figure 12 By clicking the OK button the main screen of FlowSim is displayed This is the screen where the user draws the flowsheet diagram The Model menu shown in Figure 13 provides the various commands used to draw the flowsheet diagram The menu commands are divided into two groups The first group has commands for drawing the flowsheet diagram whereas the second group has commands for entering various kinds of process information The Add Unit command should be used to draw a process unit The Add Stream command should be used to draw a process stream between two process units The program requires that every stream be drawn between two units However the input and output streams of a process only have one unit associated with them To solve this problem the FlowSim program provides an additional ty
8. or Delete 48 D Constant Properties The Constant Property window is where a list of constants is stored Clicking on the Constants option in the model menu opens the Constant Property window as shown in Figure 31 To create a set of constant properties click on the Add New button in Constant Property window to activate the window As soon as the Add New button is clicked the caption of the Add New button changes to Save and that of Delete changes to Cancel Then the general information of a constant property the name and an optional description must be entered in the Constant Property window After entering the constant property information the Save button should be clicked to save the changes To enter the data in the constant property window click on the Edit button The Edit Constant Property window is opened for entering the name of the constant the corresponding numerical value and an optional description The Edit Constant Property window is shown in Figure 32 w Constant Properties Figure 31 Constant Properties Window w Edit Constant Properties Scalar3 Figure 32 Edit Constant Property Window 49 E Molecular Weight Table The Molecular Weight Table window is where the molecular weights of the components are stored Clicking on the Molecular Weight option in the model menu opens the Molecular Weight Table window as shown in Figure 33 The
9. 0 where hO CT a T OT PT aT i PH DPA s32 all chemicals use liquid enthalpy coefficients Or aos 7 U ios Ac a AM 0 Heat T coo Transfer AT LU Tew Cha Tews In dT Gas Towa 138 Table 33 The Constraint Equations for the Absorption Tower T 100 Material Balances CR ye n qom f Overall AEO f Ae fi fea E ee AES Ki Hj _ gb _ BC Ju 0 N3 g N3 13 12 FA 0 qo cogo ap f 0001 f9 0 Species F9 0 10 FG 0 FEP 090 f 0 PH PH _ 18 J12 0 AN AN _ fis PT fo 0 DPA DPA _ 18 J12 0 Energy Balances AO T aP T AT T aT Enthalpy E N NH B O PH AN DPA k 138 Function s13 all chemicals use gaseous enthalpy coefficients s18 all chemicals use gaseous enthalpy coefficients 139 Table 34 The Constraint Equations for the Drying Column T 101 Material Balances CP y as x RP 4 f fo db oH ys Overall NH3 H30 PH AN DPA Gis faa fis fis fs 0 fo Gy te ee qp 0 9999 f quus 0 4 9 00001 059 Species t du O00 f O x OMG h 0 fe OB e peg 8 23 qn ginti 0 25 18 Energy Balances h T adPT aP T aP T a T i NH H O PH AN DPA k 18 19 25 Enthalpy A Bd f Function s18 all chemicals use liquid enthalpy coefficients s19 all chemicals use gaseous enthalpy coefficients s25 all chemicals use liquid enthalpy coefficients 140 Table 35 Th
10. AN gp AN _ 09 08 0 DPA DPA _ 09 08 0 Energy Balances fe ho gt fi hi Qg i t Qu 0 where h T a T aT aT aT i H N NH H O PH AN DPA k 08 09 s08 all chemicals use gaseous enthalpy coefficients s09 all chemicals use gaseous enthalpy coefficients 134 Table 29 The Process Constraint Equations for the Reactor Product Cooler E 102 Material Balances FPP ALP 99 REO REP RUP FP o A A Overall Ce du Aure i i he nas ve A 0 tie fewi O where CW cooling water b ies 0 y 7 d 0 ies z oe 0 H20 A290 _ Species NEL uU and Jowa foin 0 a 0 oe 7 TON 0 f gno B DPA 0 Energy Balances L Sow Mews 228 Fewer O10 Goss 0 where how gy a T a T aT a a through a are for liquid water j 12 Overall gt Jur Sh Ha Qi 0 where h T aT aT aT aT i H N NH H O PH AN DPA sll H N NH and H O use gaseous enthalpy coefficients PH AN and DPA use liquid enthalpy coefficients H Qc a 7 Ug a Ag ip AT 0 eat Transfer AT E fj Tew Vn Towi Inq Toyo I D Tow 135 Table 30 The Process Constraint Equations for the Drying Column Cooler E 103 Material Balances O H O PH AN 399 999 FP F99 99 p 999 pP gy Overall Sipe See O where CW cooling water ee x po 0 fu gt fe 0 Species fewa7 fow3 9 Pe x A 0 D peo Energy Balances yy F c
11. EPS EQU EQU182 304 2000 EQU EQU183 i i 304 2000 EQU EQU184 z 304 2000 EQU EQU185 I EPS EQU EQU186 i EPS Economic Optimization Program 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 LOWER LEVEL UPPER MARGINAL EQU EQU187 304 2000 EQU EQU188 z 304 2000 EQU EQU189 i i 304 2000 EQU EQU190 a EPS EQU EQU191 EPS EQU EQU192 EPS EQU EQU193 s EPS EQU EQU194 i EPS EQU EQU195 s 4 304 2000 EQU EQU196 j 1 0000 EQU EQU197 7 EPS EQU EQU198 s EPS EQU EQU199 EPS EQU EQU200 A EPS EQU INEQU1 15 0000 19 8879 INF EQU INEQU2 75 0000 75 0000 INF EPS EQU INEQU3 60 0000 60 0000 INF EPS EQU INEQU4 30 0000 30 0000 INF EPS EQU INEQU5 0 1284 INF EQU INEQU6 10 0000 10 0000 INF EPS EQU INEQU7 0 6914 INF EQU INEQU8 0 2348 INF EQU INEQU9 50 0000 50 0000 INF EPS EQU INEQU10 I j EQU OBJ NAME i 1 0000 LOWER LEVEL UPPER MARGINAL VAR F03 200 0000 205 0000 205 0000 9 0390 VAR F04 160 0000 165 3950 170 0000 VAR F07 4240 0000 4240 3949 4300 0000 VAR F08 4240 0000 4240 3949 4300 0000 VAR F09 4240 0000 4240 3949 4300 0000 VAR F10 4240 0000 4242 9999 4300 0000 VAR F11 4240 0000 4242 9999 4300 0000 158 20 21 VAR F12 VAR F13
12. 112 program which requests the display of the value of a variable or if an execution error is encountered Table 9 A List of Reference Types Reference Description This is where the identifier is declared as to type This must be DECESBED the first appearance of the identifier This is the line number where an initialization a table or a data DEFINED list between slashes or symbol definition equation starts for the symbol This is when values are replaced because the identifier appears on the left of an assignment statement This is an implicit assignment an equation or variable will be IMPL ASN updated as a result of being referred to implicitly in a solve statement This refers to the use of a set as the driving index in an CONTROL assignment equation loop or other indexed operation sum prod smin or smax This is a reference the symbol has been referenced on the right of an assignment in a display in an equation or in a model or solve statement ASSIGNED C Output produced by a Solve Statement Brooke et al 1996 The output triggered by a solve statement includes the equation listing the column listing the model statistics solver report the solution listing report summary and file summary as shown in the GAMS output file in Section X All of the output produced as a result of a SOLVE statement is labeled with a subtitle identifying the model its type and the line number of the solve statement
13. 20 3804 INF VAR H21 9999 0000 0 2229 INF VAR H23 9999 0000 0 2229 INF VAR H24 9999 0000 16 8330 INF VAR H25 9999 0000 9 2943 INF VAR H26 9999 0000 7 4851 INF VAR H27 9999 0000 7 4851 INF VAR H28 9999 0000 6 2547 INF VAR H29 9999 0000 0 5404 INF VAR H31 9999 0000 0 5463 INF VAR H32 9999 0000 0 1053 INF VAR H33 9999 0000 0 0759 INF VAR PROFIT 0 0001 1402 2768 INF VAR Q100 9999 0000 25 0965 INF VAR Q101 9999 0000 4 9090 INF VAR Q102 9999 0000 8 5545 INF VAR Q103 9999 0000 3 4356 INF VAR Q104 9999 0000 1 2304 INF VAR Q105 9999 0000 0 0294 INF VAR TE100 j 70 0896 INF VAR TE102 90 5340 INF VAR TE103 63 2991 INF VAR TE104 55 2908 INF VAR TE105 181 9381 INF F03 F04 F07 F08 Economic Optimization Program F09 F11 F12 F14 F16 F17 F18 F19 F20 F21 F23 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 161 26 21 Economic Optimization Program 02 12 01 09 49 34 PAGE 28 GAMS 2 50A Windows NT 95 98 OBJ VAR objective or profit function EFF_NH3 EFF_PH FO3NH3 FO4PH FO7AN FO7DPA FO7H2 F07H20 F07N2 F07NH3 F07PH F08AN FO8DPA FO8H2 F08H20 F08N2 F08NH3 F08PH F09AN FOODPA F09H2 F09H20 Economic Optimization Program 02 12 01 09 49 34 PAGE 29 GAMS 2 50A Windows NT 95 98 F09N2 F09NH3 F09P
14. For each reaction the stoichiometry and reaction rate expressions also need to be supplied The physical properties for Reactor Homogeneous Heterogeneous Gas Phase Liquid Phase Catalytic Gas Liquid Gas Liquid Gas Liquid CSTR Bubble Reactor PER Ll Packed Bed CSTR Batch Reactor z Fixed Bed Reactor Trickle Bed Fluidised Bed Reactor Fixed Bubble Bed CSTR Slurry Bubble Slurry 3 Phase Fluidised Bed Figure 4 The Reactor Analysis Program Outline the chemical species can be retrieved from Flowsim The kinetic data needed for the reactor system includes the number of reactions taking place in the reactor and the number of chemical species involved For each reaction the stoichiometry and reaction rate expressions also need to be supplied The physical properties for the chemical species can be retrieved from Flowsim The feed stream for the reactor is obtained from Flowsim and its temperature pressure flowrate and composition are retrieved using the results from on line optimization Finally the dimensions of the reactor and heat transfer coefficients are supplied All of this data is used with various types of reactors to predict their performance and select the best one The reactant concentration conversion temperature and pressure are calculated as function of reactor length or space time The results can be viewed in both tabular and graphical form As the operating process conditions change the performance of the reactors
15. INCH LOCATED INCH TEMPERATURE 1162 500000 ALL STRMS EXHAUSTE 0 1 0 0 45937 0 0 1162 5 0 HEAT FXCHANGER SUMMARY ABOVE THE PINCH HEX CS HS HEAT THIN THOUT CPH CPC AREA HEATER SUMMARY ABOVE THE P HEATER CNO HEAT TCIN TCOUT CPC 1 0 2756222 0 1125 0 1185 0 45937 0 ALL STRMS EXHAUSTE 0 1 0 0 45937 0 0 662 1 i 0 0 45937 0 662 1 rmm 82 5 1162 5 49505 3 0 oO OO O0 O 92 HEAT EXCHANGER SUMMARY BELOW PI HEX CS HS CPH CPC HEAT THIN AREA Pu s07 46E 05 s10 230E 08 46E 05 1200 0 11810 820 699 60 COOLER SUMMARY BELOW THE PINCH COOLER CNO HEAT THIN THOUT 1 0 4624910 0 700 5 600 0 NO LOOPS PRESENT IN THIS NETWORK THE MINIMUM HOT UT TY REQUIREMENT THE MINIMUM COLD UT TY REQU REMENT 93 624 60 1125 0 CPH 46019 5 3044976 000000 4903696 000000 VIII USING THE POLLUTION INDEX PROGRAM Upon clicking the Pollution Index button in the Advanced Process Analysis Desk the first window presented to the user is the Process window shown in Figure 84 The table Stream List shows the list of all input and output streams in the process This list is entered by the user The first column of the table gives the stream name the second column gives the total flowrate
16. Ka jm b KS K10 p nr p J nr Constants are in units Min Psia Ibmole and ft 3 T in Deg R E BTU Lbmol A 1 987 BTU Lbmol R _ K5 o Je RT Ke o Je font K7 o ej nr ka ole o nr r e b e Figure 101 Reaction Rate Constants Window Click the Exit button to return to the Reaction Rate window Click on the Exit button in the Reaction Rate window to return to the main window Next let us enter the Reaction Rate constants Click on the Reactor Constants icon in the main window to open the Reaction Rate Constants window The forward reaction constant K1 and the equilibrium constant Kel may be entered in this window according to an Arrhenius type equation Ki2Ag Kel Ael e F RT Let us enter the forward reaction constants for the first two reactions as 0 0191887 and 9 69127E 05 as shown in Figure 101 The final reaction is temperature dependent as shown by Figure 101 The first constant for the reaction rate in the third equation is 2 4E 14 while the second constant is 118790 Click on the Close button to return to the main window after entering all forward reaction constants and equilibrium constants The Reactor Analysis program needs the reactor dimensions such as length diameter and input volumetric flow rate To enter this data click on the Reactor Spec icon in the toolbar of the main window Clicking on the Reactor Spec button opens the Reactor Specification
17. Reactor Analysis Model Information window is displayed This window is shown in Figure 91 Since we are using the Reactor Analysis program for the first time click on the New Model button Once the New Model button is clicked the FlowSheet window of the Reactor Analysis program is displayed This window is shown in Figure 92 The flowsheet diagram for the aniline process model is shown in this window along with a list of units in the model Choose the reactor unit by clicking on the unit in the flowsheet or from the list Let us choose the reactor in the model The selected reactor unit name CRV 100 appears in the text box Clicking the Close button closes this window and displays the Reactor Analysis Main window mw Reactor Analysis Model Information Figure 91 The Reactor Analysis Model Information Window 101 REACTOR FLITW SHEET Flow Sheet Diagram Choose a Reactor from the fst or by clicking on the unit in the Flowsheet diagram m Lut ot Unis iri he mode i Figure 92 Flowsheet Window REACTOR FLOWSHEET V REACTOR FLOWSHEET v Plug Flow zi felle ele prre rien V Gas Homogeneous Figure 93 Reaction and Reactor Type Menus The phase of the reaction should be selected from the Reaction menu which is shown in Figure 93 Let us choose Gas Homogeneous as the phase of the reaction Next we have to choose the reactor type from the Reactor Type
18. The first list in the output produced by the SOLVE statement is the Equation Listing which is marked with that subtitle in the output file The Equation Listing is an extremely useful debugging aid It shows the variables that appear in each constraint and what the individual coefficients and right hand side value evaluate to after the data manipulations have been made Normally the first three equations in every block are listed Most of the listing is self explanatory The name text and type of constraints are shown The four dashes are useful for mechanical searching All terms that depend on variables are collected on the left and all the constant terms are combined into one number on the right with any necessary sign changes made For example a equation x 5y 10z 20 e 0 is rearranged as x 5y 10z e 20 Four places of decimals are shown if necessary but trailing zeroes following the decimal point are suppressed E format is used to prevent small numbers being displayed as zero By 113 default the equation listing will not appear in the output file unless specified by the user in the Output File Format Specification Window The general format in the equation listing was described above However the nonlinear terms in an equation are treated differently from the linear terms If the coefficient of a variable in the Equation Listing is enclosed in parentheses then the variable corresponding to this coefficient is no
19. and the model what the solution looks like are characterized in solver status and model status The model status and solver status are listed in Table 10 and Table 11 respectively The next section is the solver report which is the solve summary particular to the solver program that has been used Also there will be diagnostic messages in plain language if anything unusual was detected and specific performance details as well In case of serious trouble the GAMS listing file will contain additional messages printed by the solver which may help identify the cause of the difficulty Solution listing is a row by row then column by column listing of the solutions returned to GAMS by the solver program Each individual equation and variable is listed with four pieces of information The four columns associated with each entry are listed in Table 12 For variables the values in the LOWER and UPPER columns refer to the lower and upper bounds For equations they are obtained from the constant right hand side value and from the relational type of the equation EPS means very small or close to zero It is used with non basic variables whose marginal values are very close to or actually zero or in nonlinear problems with super basic variables whose marginal values are zero or very close to it A superbasic variable is the one between its bounds at the final point but not in the basis 114 For models that do not reach an optimal solution some
20. coeff2 power T 23 ord coeff2 power 536 67 ord coeff2 1000000 e 0 348 EQU140 f24nh3 0 930 f20nh3 e 0 349 EQU141 f24h20 0 970 f20h20 e 0 350 EQU142 f24ph 0 695 f20ph e 0 351 EQU143 f24an 0 140 f20an e 0 352 EQU144 T24 T20 e 0 353 EQU145 f24 f24nh3 f24h20 f24ph f24an e 0 354 EQU146 H24 f24nh3 hfnh3 sum coeff2 enth_liq nh3 coeff2 power T 24 ord coeff2 power 536 67 ord coeff2 1000000 355 f24h20 hfh20 sum coeff2 enth lig h20 Coeff2 power T24 ord coeff2 power 536 67 ord coeft2 1000000 356 f24ph hfph sum coeff2 enth_liq ph coeff2 power T 24 ord coeff2 power 536 67 ord coeff2 1000000 357 f24an hfan sum coeff2 enth liq an coeff2 power T24 ord coeff2 power 536 67 0rd coeff2 1000000 e 0 358 EQU147 f25h20 0 0001 f18h20 f23h20 e 0 359 EQUI468 f25ph 0 940 f18ph f23ph e 0 360 EQU149 f25an 0 949 fl8an f23an e 0 361 EQU150 f25dpa fl8dpa e 0 362 EQUI51 f25 f25h20 f25ph f25an f25dpa e 0 363 EQU152 H25 f25h20 hfh20 sum coeff2 enth_liq h20 coeff2 power T25 ord coeff2 power 536 67 0rd coeff2 1000000 364 f25ph hfph sum coeff2 enth liq ph coeff2 power T25 ord coeff2 power 536 67 ord coeff2 1000000 365 f25an hfan sum coeff2 enth_liq an coeff2 power T25 ord coeff2 power 536 67 ord coeff2 1000000 366 f25dpa hfdpat sum coeff2 enth liq dpa coeff2 power T25 ord co
21. me caf amp 9 Model Description Tables Measured Variables Unmeasured Variables Plant Parameters Equality Constraints Inequality Constraints Optimization Algorithms Constant Properties s Beg onsrarie Soa P Una Shear gt f10ph 1 conv1 f03ph F A 0an f09an 0 985 cor is 100 f dpa f Sdpa 0 005 c CRV 100 H10 H09 e 0 CRV 100 T10T092e 15 CRv100 HMOffl h2 lOn241O0nF D f11h2 f10h2 e 0 E 100 fl 1n2 f10n2 e 0 f11nh3 f10nh3 e 0 f11h2o f1 h2o e 0 fl1ph fl0ph e 0 Aant 0an e 0 fiidpafi dpa e 0 TE1004 T10 TO8H T11 Include SCALING OPTION for equations Figure 42 Equality Constraints Window 57 I Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste Mi Eg JD File View Help 81 x gi w aj v Model Description Tables Measured Variables Unmeasured Variables Plant Parameters Equality Constraints Inequality Constraints Optimization Algorithms Constant Properties Constant Properties Scalar1 Description Heat Exchanger Areas View Constant Properties 1 of 4 Figure 43 Constant Properties Window w Flow Diagram File Edit Options gt s ES Figure44 Flowsheet Diagram Window 58 The next step is the Constant Properties window The c
22. window The Reactor Specification window is given in Figure 102 Let us enter 8 5 for the reactor diameter 85 for reactor length and 586 for the input flow rate 108 m REACTOR SPECIFICATION reo fame 2 Figure 102 The Reaction Specification Window w FEED CONDITIONS 1 93306E 03 452E 05 100238 B37E 05 715015E 02 27053E 03 0000024 Figure 103 Initial Feed Composition Window Clicking on the FEED button in this window opens the Feed Composition window The initial feed composition for the components are entered here Let us enter the initial feed composition for the components A B C D E F and G as given in Figure 103 Click on the Exit button to return to the Reactor Specification window Click on the Close button in the Reactor Specification window to return to the main window All the information required by the Reactor Analysis program has been entered The information can also be entered step by step starting from the Global Options window and proceeding through the other windows in a sequential fashion using the Next and Back icons in the main window 109 To run the model click on the Run icon in the toolbar of the main window The total reactor length will be divided by the number of increments as specified in Figure 95 and the calculations will be performed for each increment The results will be displayed graphically as shown in Figure 104 Figure 104 sho
23. 0 0001 584 f17h2 LO 0 0001 f17h20 LO 0 0001 f17n2 LO 0 0001 585 f17nh3 LO 0 0001 fl8an LO 0 0001 f18dpa LO 0 0001 586 f18h20 LO 0 0001 f18nh3 LO 0 0001 f18ph LO 0 0001 587 f19an LO 0 0001 f19h20 LO 0 0001 f19nh3 LO 0 0001 588 f19ph LO 0 0001 f20an LO 0 0001 120h20 L0 0 0001 589 f20nh3 LO 0 0001 f20ph LO 0 0001 f21an LO 0 0001 590 21h20 LO 0 0001 f21nh3 LO 0 0001 f21ph LO 0 0001 591 f23an LO 0 0001 23h20 LO 0 0001 f23nh3 LO 0 0001 592 f23ph LO 0 0001 f24an LO 0 0001 f24h20 LO 0 0001 593 f24nh3 LO 0 0001 f24ph LO 0 0001 f25an LO 0 0001 594 f25dpa LO 0 0001 f25h20 LO 0 0001 f25ph LO 0 0001 595 f26an LO 0 0001 f26h20 LO 0 0001 f26ph LO 0 0001 596 f27an LO 0 0001 f27h20 LO 0 0001 f27ph LO 0 0001 597 f28an LO 0 0001 f28h20 LO 0 0001 f28ph LO 0 0001 598 f29an LO 0 0001 f29dpa LO 0 0001 f29ph LO 0 0001 599 f31an LO 0 0001 f31dpa LO 0 0001 f31ph LO 0 0001 600 f32an LO 0 0001 f32dpa LO 0 0001 f32ph LO 0 0001 Economic Optimization Program 02 12 01 09 49 34 PAGE 14 GAMS 2 50A Windows NT 95 98 601 f33an LO 0 0001 f33dpa LO 0 0001 f33ph LO 0 0001 602 feed_an LO 0 0001 feed dpa LO 0 0001 feed h2 LO 0 0001 603 feed h20 LO 0 0001 feed n2 L0 0 0001 feed nh3 LO 0 0001 604 feed ph LO 0 0001 H03 LO 9999 H04 LO 9999 605 H07 LO 9999 H08 LO 9999 H09 LO 9999 606 H10 LO 9999 H11 LO 9999 H12 LO 9999 607 H13 LO 9999 H14 LO 9999 H16 LO 9999 608 H17 LO 9999
24. 1 the coefficient for E phenol is 1 the coefficient for F aniline is 1 and the coefficient for D H20 is 1 Clicking on the Display button in the Stoichiometry window opens the Reaction Stoichiometry window The reactions for the given stoichiometric coefficients can be viewed in the form of equations in the Reaction Stoichiometry window The Reaction Stoichiometry Equations window is shown in Figure 97 Proceed to the next window by clicking on the Rate icon in the toolbar The window displayed is the Reaction Rate window This is shown in Figure 101 The first equation in the window represents the rate expression for the aniline reaction Cc Cd Ce and Cf represent the concentrations of NH3 H gt O phenol and aniline respectively The rate exression is to be entered by filling in the powers of these concentration terms m REACTION STOICHIOMETRY 1 10 1E gt 1D 1F 2 1C 2E gt 2D 1G 3 2C 34 1B 4 gt 5 gt B gt 7 gt 8 gt 9 gt 10 gt Figure 97 The Reaction Stiochiometry Equations Window 105 m REACTION RATE 1 m ki Cc Ce T Kel Cd Cf I2z2k2 Cc Ce 1 Ke2 Cd Cg 3 k3 Cc 1 Ke3 Ca Cb r4 k4 i5 2 kb 16 ke r k7 r8 k8 r3 k3 r1 k10 Figure98 The Reaction Rate Window Next let us enter the order of each reaction with respect to each component that cont
25. 102 Btwft2 hrR juw13 0795 7141414103 Btwf2 hrR w104 719 X9 9 7L1704233E104 Bat HR M105 90 8078474E 05 Btu hr Figure 52 Estimated Values of Plant Parameters in Final Report 64 EZ Output Ele View m D Values of Unmeasured Variables 0 05197 1 75416 16 56396 0 05207 Biel x 11 16 00 11 16 00 4M 0 76021 0 02274 96 9051 1 0 85524 205 165 0172 165 39497 13 27365 13 30226 0 0393 0 03938 421 76778 461 47279 140 58926 153 82426 3474 8497 3421 77 329 171 58922 172 05332 13 27365 13 30226 0 0393 0 03938 421 76778 461 47279 17 89109 17 92966 Output File View am meme mA maman Figure 53 Reconciled Values for Unmeasured Variables alele m Ble sess ene em Data Validation results based on Stream No E Measured Variable Units of Process Variables 4240 Ib mol hr S07 614 9541 R 421 76778 Ib mol hr 140 58326 Ib mol hr 3474 8497 Ib mol hr 17 83103 Ib mol hr 171 58322 Ib mol hr 13 27365 Ib mol hr 0 0333 Ib mol hr 73 52363 MMBtu hr Figure 54 Information based on Stream Number 65 11 16 00 11 16 00 4M E Output olx File Edt View gij amp w moel meje al Economic Optimization Outp
26. 109 1000 000 ITERATION COUNT LIMIT 18 100 155 EVALUATION ERRORS CONOPT Wintel version 2 042F 003 035 Copyright C ARKI Consulting and Development A S Bagsvaerdvej 246 A DK 2880 Bagsvaerd Denmark Using default control program Optimal solution Reduced gradient less than tolerance CONOPT time Total of which Function evaluations Derivative evaluations 0 36 Mbytes Work length Estimate Max used EQU EQU1 EQU EQU2 EQU EQU3 EQU EQU4 EQU EQU5 EQU EQU6 EQU EQU7 EQU EQU8 EQU EQU9 EQU EQU10 0 36 Mbytes 0 16 Mbytes LOWER 15 0000 Economic Optimization Program EQU EQU11 EQU EQU12 EQU EQU13 EQU EQU14 EQU EQU15 EQU EQU16 EQU EQU17 EQU EQU18 EQU EQU19 EQU EQU20 EQU EQU21 EQU EQU22 EQU EQU23 EQU EQU24 EQU EQU25 EQU EQU26 EQU EQU27 EQU EQU28 EQU EQU29 EQU EQU30 EQU EQU31 EQUE 2 EQU EQU33 EQU EQU54 LOWER Economic Optimization Pro EQU EQU55 LOWER gram 0 059 seconds 0 000 0 0 0 000 0 0 LEVEL 15 0000 LEVEL LEVEL UPPER UPPER UPPER 15 0000 EPS MARGINAL 37 3272 45 2379 304 2000 EPS EPS 10 5257 10 5257 10 5160 0 0175 02 12 01 09 49 34 PAGE 17 GAMS 2 50A Windows NT 95 98 MARGINAL 37 3272 45 2379 304 2000 EPS EPS EPS EPS E
27. 475 476 477 478 479 480 481 482 484 485 487 488 489 490 491 492 493 494 f08 LO 4240 f09 LO 4240 f10 LO 4240 f11 LO 4240 f12 LO 4240 f13 LO 3890 f14 LO 3850 f16 LO 3850 f17 LO 40 f18 LO 330 f19 LO 170 f20 LO 170 f21 LO 12 f23 LO 12 f24 LO 160 f25 L0 170 f26 LO 160 f27 LO 160 f28 LO 160 f29 LO 10 f31 LO 10 f32 LO 0 8 f33 LO 0 8 fCW1 LO 22000 fCW2 LO 22000 fCW3 LO 9600 fCW4 LO 9600 fCW5 LO 3350 fCW6 LO 3350 fCW7 L0 75 fCW8 LO 75 T03 LO 540 T04 LO 560 T07 LO 605 T08 LO 1120 T09 LO 1175 T10 LO 1195 T11 LO 670 T12 LO 590 T13 LO 590 T14 LO 590 T16 L0 620 T17 LO 590 T18 LO 815 T19 LO 665 T20 LO 560 T21 LO 560 T23 LO 560 T24 LO 560 T25 LO 840 T26 LO 715 T27 LO 715 T28 LO 545 T29 LO 820 T31 L0 825 T32 LO 1000 T33 LO 580 TCW1 LO 535 TCW2 LO 555 TCW3 LO 535 TCW4 L0 555 TCW5 LO 535 TCW6 LO 555 TCW7 LO 535 TCW8 LO 555 f03 UP 205 f04 UP 170 f07 UP 4300 f08 UP 4300 f09 UP 4300 f10 UP 4300 f11 UP 4300 f12 UP 4300 f13 UP 3950 f14 UP 3900 f16 UP 3900 f17 UP 45 f18 UP 360 f19 UP 190 f20 UP 190 f21 UP 14 f23 UP 14 f24 UP 190 25 UP 190 f26 UP 165 f27 UP 165 28 UP 165 f29 UP 20 f31 UP 20 32 UP 1 f33 UP 1 fCW1 UP 24000 fCW2 UP 24000 fCW3 UP 9800 fCW4 UP 9800 153 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 11 495 496 497 498 499 500 501 502 503 504 505 506 507 508 fCW5 UP 3450 fCW6 UP 3450 fCW7
28. 573 574 575 576 577 578 H21 L 0 2 H23 L 0 2 H24 L 17 H25 L 9 H26 L 7 5 H28 L 6 2 H29 L 0 5 H31 L 0 5 TE102 L 90 TE103 L 65 TE104 L 55 TE105 L 180 eff_an LO 0 0001 eff_dpa LO 0 0001 eff_h2 LO 0 0001 eff_h20 LO 0 0001 eff n2 L0 0 0001 eff_nh3 LO 0 0001 eff_ph LO 0 0001 f03nh3 LO 0 0001 f04ph LO 0 0001 f07an LO 0 0001 f07dpa LO 0 0001 f07h2 f07h20 LO 0 0001 f07n2 LO 0 0001 f07nh3 LO 0 0001 f07ph LO 0 0001 f08an LO 0 0001 f08dpa f08h2 LO 0 0001 f08h20 LO 0 0001 f08n2 f08nh3 LO 0 0001 f08ph LO 0 0001 f09an f09dpa LO 0 0001 f09h2 LO 0 0001 f09h20 LO 0 0001 f09n2 LO 0 0001 f09nh3 LO 0 0001 fO9ph f10an LO 0 0001 f10dpa LO 0 0001 f10h2 f10h20 LO 0 0001 f10n2 LO 0 0001 f10nh3 LO 0 0001 f10ph LO 0 0001 fllan LO 0 0001 f11dpa f11h2 LO 0 0001 f11h20 LO 0 0001 f11n2 f11nh3 LO 0 0001 fllph LO 0 0001 f12an f12dpa LO 0 0001 f12h2 LO 0 0001 f12h20 LO 0 0001 LO 0 0001 LO 0 0001 LO 0 0001 LO 0 0001 LO 0 0001 LO 0 0001 LO 0 0001 LO 0 0001 LO 0 0001 02 12 01 09 49 34 PAGE 12 GAMS 2 50A Windows NT 95 98 02 12 01 09 49 34 PAGE 13 GAMS 2 50A Windows NT 95 98 154 579 f12n2 LO 0 0001 f12nh3 LO 0 0001 f12ph LO 0 0001 580 f13h2 LO 0 0001 f13h20 LO0 20 0001 f13n2 LO 0 0001 581 f13nh3 LO 0 0001 f14h2 LO 0 0001 f14h20 LO 0 0001 582 f14n2 L0 0 0001 f14nh3 LO 0 0001 fl6h2 LO 0 0001 583 f16h20 LO 0 0001 fl6n2 LO 0 0001 f16nh3 LO
29. Exchanger Network Program Grand Composite Curve amp View Print Save Print Options Help Close Grand Composite Curve 1000 1500 2000 2500 3000 3500 Enthalpy 1000 Figure 81 The Grand Composite Curve V The Network Grid Diagram Figure 82 The Network Grid Diagram 88 OF BOT STREAMS ICER SUMMARY ABOVE THE F Figure 83 The Output Data Window The third button in the output window the View and Save the Output Data button shows the output text file in a window as shown in Figure 83 Using horizontal and vertical scroll bars the user can see the entire output text The Print button at the top of the window prints output file to the default printer On clicking the Save button the program opens the Save As window and requests the user to specify the filename Let us save the output as file out dat in the Examples subdirectory of the program folder Click the Close button to go back to the Output Menu window The execution of the THEN program is complete The results have been displayed in the grand composite curve network grid diagram and the output data file forms Let us look at the results more closely and interpret the solution generated by THEN Using the Results from THEN The Grand Composite Curve GCC The GCC for the aniline process is shown in Figure 81 It is a plot of temperature on the Y axis versus the enthalpy flow on the X axis If the curve touches the temperature axis exce
30. Model Refer to Figure 8 the Process Model Diagram MIX 102 E 100 E 101 CRV 100 E 102 T 100 TEE 100 K 100 T 101 E 102 V 100 P 102 T 102 P 104 E 104 P 103 E 105 Feed and recycle mixer Cross heat exchanger Process heater Reactor Reactor product cooler Absorption tower Purge recycle splitter Ammonia recycle compressor Drying column condenser Three phase separator Separator recycle pump Product column Aniline product pump Aniline product cooler Drying column Phenol recycle pump DPA product cooler 22 Table 2 Process Streams in the Aniline Process Model Refer to Figure 8 the Process Model Diagram Name of Stream Description Mixed stream Reactor effluent T 100 overhead Gaseous purge Separator feed Water product High pressure aniline product s31 High pressure phenol recycle 532 riobuom SSS sooo o prame 0L oi water to reactor product cooler CW Cooing ater om reactor poco 23 A Heat Exchanger Network As shown in Figure 8 the heat exchanger network in the aniline process includes the cross heat exchanger E 100 the heater E 101 and the product cooler E 102 The inlet component flowrates are equal to the outlet component flow rates for both sides The energy balance states that the decrease of the enthalpy 10 Btu hr in the hot side is equal to the increase of enthalpy in cold side plus the heat loss i e a E Hoe Hout E Her Peres Qioss III 1 For the c
31. NH3 _ fo fos x fis 0 1 H 0 m0 _ Species eoe mde m PH PH PH _ fo fos Ja 0 AN AN _ 07 T J31 0 DPA DPA _ foi e fa 0 Energy Balances i pCi NH3 NH3 PH PH i D Overall X Jo tay Jou Avda Da gt fs hzi Qos O i i h T aT a T aT aT i H N NH H O PH AN DPA k 03 04 07 16 31 s03 NH3 uses liquid enthalpy coefficients Enthalpy s04 PH uses liquid enthalpy coefficients Function s07 H2 N2 NH3 and H2O use gaseous enthalpy coefficients PH AN and DPA use liquid enthalpy coefficients all chemicals use gaseous enthalpy coefficients all chemicals use liquid enthalpy coefficients 143 Table 38 The Constraint Equations for the Splitter TEE 100 Material Balances UP ETUR IL NG ei tie JU Ge road u J t tae 0 H ur t du no 0 N i5 ex ae 0 I NH3 NH3 NH3 _ NH D4 OL FO SO 14 7 Species HO gps que Energy Balances H 0989 f i 0 H 0011 Y fj 0 Enthalpy i Function h T OT aT aT aP T 3 1 2 i H N NH H O s13 all chemicals use gaseous enthalpy coefficients Table 39 The Process Constraint Equations for the Compressor K 100 Material Balances Overall ee Fe Ae fom f T tia ieee fu 0 H2 f2 _ B 16 fia 0 N fum fo 0 25 16 14 Species up S 3 D NH 16 14 0 H50 _ H20 _ H O fis pm 0 Energy Balances hE T aT aP T aP T
32. Record 4 Delete Close Help Required Figure 25 Plant Parameters tab in the Unit Data window The Unit Data window has an extra tab for entering the parameters in the model which are associated with that particular unit Let us enter the parameter for the cross heat exchanger Double click on the unit to open the Unit Data window In the Unit Data window click on the Plant Params tab Then click on the Add button The parameter name and the initial point are required Enter uE100 as the parameter name This is the overall heat transfer coefficient of the exchanger The bounds description and the unit of the parameter are optional The Unit Data window with the parameter information is shown in Figure 25 A Global Data If there are variables parameters and equations that do not belong to either a unit or a stream then they can be entered in the Global Data window This includes the economic model and the equations to evaluate emissions and energy use To enter this global data double click on the background of the flowsheet diagram or click on the Global Data option in the Model menu The Global Data window in Figure 26 a shows the equality constraints in the Global Data section for the aniline process model There are no equality constraints in the Global Data section for an aniline process so the window in Figure 26 a shows empty in the equality constraint section 44 w Global Data Iof x
33. The symbol cross reference lists the identifiers symbols in the model in alphabetical order identifies their type shows the line numbers where the symbols appear and classifies each appearance The complete list of data types is given in Table 8 Next in the listing is a list of references to the symbols grouped by reference type and identified by the line number in the output file The actual references can then be found by referring to the echo print of the program which has line numbers on it The complete list of reference types is given in Table 9 The symbol reference maps do not appear in the output files by default However it can be included in the output files by changing the default setting in Output File Format Specification window Table 8 A List of Data Types Entry in symbol reference table GAMS data type set parameter variable equation model B Execution Output The execution output follows the compilation output and is also found in the GAMS output file If a display statement is present in the GAMS program then data requested by the display statement is produced in the execution output while GAMS performs data manipulations Also if errors are detected because of illegal data operations a brief message indicating the cause and the line number of the offending statement will appear in the execution output The execution output will be shown in the GAMS output file if a display statement is present in the GAMS
34. Units and a Stream 37 WA FlowSim C Program Files amp Advanced Process Analysis System Examples aniline ioo File Model Edit Options Help alalt eoll e v gt Figure 18 The Flowsim Screen with the Complete Process Diagram for Aniline Process Model The Edit menu at the top of the FlowSim screen provides various options for editing the diagram It is shown in Figure 19 To use the Edit commands a unit in the flowsheet diagram has to be selected first by clicking on it The cut copy and paste commands can be used for both units as well as streams The Delete command can be used to permanently remove a unit or a stream from the diagram The Rename command can be used to change the unit ID for a unit or to change the stream ID for a stream The Properties command can be used to change the appearance of a unit or a stream 38 Ps FlowSim C Program Files Advanced Process Analysis SystemXE xamples aniline ioo File Model Edit Options Help mi S ie Cut Ctrlex Copy Ctrl C Delete Del Rename Ctrl R Data Properties Figure 19 The Edit Menu The Options menu in the FlowSim screen is shown in Figure 20 The zoom option can be used to change the magnification by zooming in and out The zoom to fit option will automatically select the appropriate magnification so that the diagram occupies the entire screen The Grid Lines command can be used to display grid lines o
35. also can vary to a significant extent The reactor design program provides a tool to develop an understanding of these relationships It provides a wide range of different types of reactors which can be examined and compared to decide the best reactor configuration for economic benefits and waste reduction The aniline process will be used to demonstrate the use and capabilities of the chemical reactor analysis program This is described in Section IX D The Heat Exchanger Network Program The optimization of the chemical reactors is followed by the heat exchanger network optimization as shown in the onion skin diagram in Figure 2 Most chemical processes require the heating and cooling of certain process streams before they enter another process unit or are released into the environment This heating or cooling requirement can be satisfied by matching of these streams with one another and by supplying external source of heating or cooling These external sources are called as utilities and they add to the operating cost of the plant The Heat Exchanger Network program aims at minimizing the use of these external utilities by increasing energy recovery within the process It also synthesizes a heat exchanger network that is feasible and has a low investment cost There are several ways of carrying out the above optimization problem Two of the most important ones are the pinch analysis and the mathematical programming methods Pinch analysis is
36. and can link applications over a local area network Also Visual Basic supports the Object Linking and Embedding technology in OLE2 This feature allows the programs to exchange information regardless of the physical or logical location or data type and format Visual Basic 5 0 was used to develop windows interface for Flowsim the on line optimization program the chemical reactor design program THEN the heat exchanger network design program and the pollution index program As mentioned earlier sharing of process economic and environmental data is the key to integration of these programs into one package Storing the output data of all these programs in different files had many disadvantages Both storage and retrieval of data would be inefficient Also exchange of information between the programs would require reading data from a number of files thus reducing the speed As a result it was decided to use a database to store all of the necessary information to be shared by the component programs as shown in Figure 1 A database is nothing but a collection of information in form of tables The information in a table is related to a particular subject or purpose A number of database formats are in use in industry We have chosen Microsoft Access as the database system for this project A table in Microsoft Access consists of rows and columns which are called Records and Fields respectively in the database terminology Each Field can store infor
37. based on thermodynamic principles whereas the mathematical methods are based on mass and energy balance constraints The Heat Exchanger Network Program abbreviated as THEN is based on the method of pinch analysis Knopf 1989 The first step in implementation of THEN is the identification of all the process streams which are important for energy integration These important streams usually include streams entering or leaving heat exchangers heaters and coolers The flowsheeting diagram of Flowsim can be an important aid in selection of these streams The next step in this optimization task involves retrieval of the necessary information related to these streams Data necessary to perform heat exchanger network optimization includes the temperature the flowrate the film heat transfer coefficient and the enthalpy data The enthalpy data can be in the form of constant heat capacities for streams with small temperature variations For streams with large variations it can be entered as temperature dependent enthalpy coefficients The film heat transfer coefficients are needed only to calculate the areas of heat exchangers in the new network proposed by THEN The temperature and flowrates of the various process streams are automatically retrieved from the results of online optimization The setpoints obtained after the plant economic optimization are used as the source data The physical properties such as the heat capacities enthalpy coefficients
38. chemicals use gaseous enthalpy coefficients 29 C Absorber Tower Section This section includes the absorption tower the drying column and the product column These units involve the separation of aniline and diphenylamine from the other non scalable reactor products In Table 6 the material balance equations are given for the absorption tower and the drying column In Table 6 the first tow rows give the total and component mole balances for the absorption tower whereas the next row gives the energy balance function for the streams associated with the absorption tower D Overall Material Balance The overall material balance relates the flow rates of raw materials to the production of products and wastes The overall material balance also creates some constraints over the system There are five constraints of this system The first constraint for the process is the molar ratio of ammonia and phenol in stream 7 Goel ga ald IIL 11 The second and constraint is the necessary weight fraction of aniline in the product stream X 2 099 III 12 where x is the weight fraction of aniline The third and fourth constraints are the necessary weight fractions of phenol and aniline in the phenol recycle stream xi 2 030 IIL 13 xi gt 065 III 14 where 3i and x are the weight fractions of phenol and aniline respectively The final constraint is the necessary weight fraction of diphenylamine in the DPA product x62 gt 09
39. component names along with their Molecular Weight and Description are entered as shown in Figure 33 After clicking on the Close button this window is closed mw Molecular Weight Table Figure 33 Molecular Weight Table Save Model As Figure 34 Save Model As Dialog Box 50 After entering all of the above information the model is complete Save the changes by clicking on the Save option in the File menu If you click Exit without saving the model a message is displayed asking whether you want to save the changes or not The Print option in the File menu when clicked prints the flowsheet diagram When the Exit button is clicked the FlowSim window is closed and the user is taken back to the Advanced Process Analysis Desk The development of the process model using FlowSim has been completed The equations parameters and constants have been stored in the database as shown in Figure 1 Save the model using the Save As option in the File menu A Save Model As dialog box as shown in Figure 34 is opened Save the model as Aaniline ioo in the Examples subdirectory of the program folder The process model developed above needs to be validated to make sure that it is representing the actual process accurately and it does not have any mistakes This can be done by using the model to carry out a simulation and then comparing the results with the design data for the process If the design data is not ava
40. constraints may be marked with the flags shown in Table 13 The final part of solution listing is the report summary marked with four asterisks It shows the count of rows or columns that have been marked INFES NOPT UNBND The sum of infeasibilities will be shown if the reported solution is infeasible The error count is only shown if the problem is nonlinear The last piece of the output file is the file summary which gives the names of the input and output disk files If work files have been used they will be named here as well D Error Reporting The last part in the output file is error reporting All the comments and descriptions about errors have been collected into this section for easy reference Errors are grouped into the three phases of GAMS modeling in the on line optimization system compilation execution and model generation which includes the solution that follows They will be illustrated in the section Error Reporting Table 10 A List of Model Status in GAMS Output Files 1 Optimal This means that the solution is optimal It only applies to linear problems or relaxed mixed integer problems RMIP 2 Locally Optimal This message means that a local optimal for nonlinear problems since all that can guarantee for general nonlinear problems is a local optimum 3 Unbounded That means that the solution is unbounded It is reliable if the problem is linear but occasionally it appears for difficult nonlinear problem that l
41. equal to rhs E Equality Ihs must equal to rhs N Norelationships enforced between Ihs and rhs This type is rarely used Additionally GAMS provides the numerical relationships and logical operators used to generate logical conditions for evaluating values of True or False A result of zero is treated as a logical value of False while a non zero result is treated as a logical value of True A complete numerical relationship operators and logical operators are listed in the Table 21 and Table 22 respectively 122 Table 20 A List of Standard Arithmetic Operators sek Exponentiation Multiplication and division Addition and subtraction unary and Table 21 A List of Numerical Relationship Operators Operator Description It Strictly less than le lt Less than or equal to eq Equal to ne lt gt Not equal to ge gt Greater than or equal to gt gt Strictly greater than Table 22 A List of Logical Operators And Inclusive or Exclusive or Table 23 The Truth Table Generated by the Logical Operators X o e a em TR 0 0 0 1 0 0 0 0 1 0 non zero 1 1 1 Non zero 0 1 1 0 Non zero non zero 1 0 0 123 Table 24 The Operator Precedence Order in case of Mixed Logical Conditions Exponentiation Numerical Operators Multiplication Division Unary operators Plus Minus Binary operators Addition Subtraction Numerical Relationship Operators lt lt lt gt gt gt
42. impacts of out all non products Rate of Emission of Pollutants per Unit Product is y M y a NP _ j 1 12 BE Indices 1 and 4 can be used for comparison of different designs on an absolute basis whereas indices 2 3 5 and 6 can be used to compare them independent of the plant size Higher values of indices mean higher pollution impact and suggest that the plant design is inefficient from environmental safety point of view E 3 Steps in Using the Pollution Index Program The first step in performing pollution analysis is the selection of relevant streams Environmental impact of a chemical process is caused by the streams that the process takes from and emits to the environment Therefore only these input and output streams are considered in performing the pollution index analysis Other streams which are completely internal to the process are excluded In the Pollution Index Program this selection of input output streams is automatically done based on the plant information entered in Flowsim 14 The next step in the pollution index analysis is the classification of the output streams into product and non product streams All streams which are either sold as product or which are used up in a subsequent process in the production facility are considered as product streams All other output streams which are released into the environment are considered as non product streams All non product streams are considered as pol
43. in Figure 46 After entering the required information let us proceed to execute the model To execute the model click on the Execute option in the File menu or click on the Execute button the button with the triangle in the toolbar Once the Execute option is clicked the Model Summary and Execute window as shown in Figure 47 is opened This window gives the summary of the aniline process When the Execute button in the Model Execute and Summary window is clicked the program first extracts the model information from the database Based on this information it generates the GAMS input files and calls the GAMS solver The progress of the GAMS program execution is shown in Figure 48 This window is automatically closed as soon as the execution is over When the execution of the program is completed it displays the results of the on line optimization in the Output window 60 Model Summary amp Execute Summary of Aniline Plant model Nonlinear Economic model Nonlinear Maximizing Parameter estimation algorithm Least Squares Method small gross errors Data validation algorithm Tjoa Biegler Method moderate gross errors Description Ammonolysis of phenol simulation Conduct D V P E E O in sequence Measured variables 68 Unmeasured variables 162 Plant parameters 7 Tables 2 Equality constraints 200 l4 Iv Data Validation Iv Parameter Estimation Iv Economic Optim
44. is a message which says if all the streams were exhausted or not If the message is all streams exhausted THEN has successfully generated the heat exchanger network If the message is Error not all streams exhausted THEN has failed to solve the problem In this case the order of the streams in the input data should be changed For example the data for stream s10 should be entered before stream s07 The program uses a solution method that is sensitive to the order in which the stream data is entered To summarize the aniline process is a pinched process and it needs one heat exchanger one cooler and one heater for maximum energy utilization The minimum amount of hot utility is 3044976 Btu hr and the minimum amount of cold utility is 4903696 Btu hr This concludes the implementation of the Heat Exchanger Network program in the Advanced Process Analysis System The next step of the Advanced Process Analysis System is calculation of pollution indices Click on the Pollution Index button in the Advanced Process Analysis Desk to call the pollution index program 91 Table 6 THEN Solution for the Contact Process Output Data File LS OF HOT STREAMS ST NAME FLOWRATE MCP INLET T OUTLET T F l COEFF 1200 600 0 LS OF COLD STREAMS ST NAME FLOWRATE MCP INLET T OUTLET T FL COEFF s07 4240 4 10 8 624 6 NIMUM DELTA T FOR THE MATCHES
45. of the stream and the third column gives the type of the stream As discussed in Section I the streams important for pollution index calculations are the input and output streams and the output streams are further divided into product and non product streams To enter a stream into the list click on the Add Stream to list button This will bring up a Please enter a stream name prompt Click OK Enter the stream name and the stream type This is shown in Figure 84 Click on the Add Stream to list button again At this point the total flowrate column shows 0 To enter the total flowrate choose the Mass Mole Fractions of Components radio button The Load Data into Total Flow rate for stream button will appear Click on the Total Flowrate variable in the Variables table Then click on the Load Data into Total Flow rate for stream button to enter the value into the Total Flowrate window This is shown in Figure 85 Click on the Update Stream Information button to load the value into the stream list table Figure 84 Stream List Table of the Pollution Index Program 94 Pollution Index Program Process a 204 97843 Figure 85 The Process screen with Stream S03 Calculation of pollution indices requires the composition of the process streams The composition can be specified either in terms of molar flowrates or mole fractions These values can be conveniently retrieved from the results of on line optimization Let us
46. on line optimization program This is described in Section VI C The Chemical Reactor Analysis Program Having optimized the process operating conditions for the most current state of the plant the next step in the Advanced Process Analysis System is to evaluate modifications to improve the process and reduce emission and energy consumption First the chemical reactors in the process are examined The reactors are the key units of chemical plants The performance of reactors significantly affects the economic and environmental aspects of the plant operation The formulation of constraints in these types of units is very important and complicated owing to the various types of reactors and the complex reaction kinetics Unlike a heat exchanger whose constraints are similar regardless of types of equipment there is a great variation in deriving the constraints for reactors The chemical reactor analysis program of the Advanced Process Analysis System is a comprehensive interactive computer simulation that can be used for modeling various types of reactors such as Plug Flow CSTR and Batch reactors This is shown in Figure 4 Reaction phases included are homogeneous gas homogeneous liquid catalytic liquid gas liquid etc The options for energy model include isothermal adiabatic and non adiabatic The kinetic data needed for the reactor system includes the number of reactions taking place in the reactor and the number of chemical species involved
47. phenol forming streams 5 and 6 In addition to ammonia the ammonia recycle has small amounts of hydrogen nitrogen and water The phenol recycle stream consists of phenol aniline and diphenylamine Streams 5 and 6 are then mixed together MIX 102 forming stream 7 Stream 7 is at a temperature of 156 F and at a pressure of 255 psia The ratio of ammonia to phenol in stream 7 is 20 1 This stream is heated in a cross exchanger E 100 with the reactor effluent stream 10 The exchanger has an approach temperature between stream 10 and stream 8 of 75 F along with a pressure drop of 5 psia Stream 8 emerges at 650 F and 250 psia The reactor inlet stream 9 needs to be at 710 F and 245 psia so stream 8 passes through a heater E 101 17 UA FlowSim C Program Files Advanced Process Analysis System Examples aniline ioo File Model Edit Options Help Hleri ele 8 e 2 Figure 7 Process Flow Diagram Aniline Process The reactor section includes the adiabatic reactor CRV 100 that consists of a bed packed with a silica alumina catalyst In the reactor three reactions occur Phenol NH 3 Aniline HO 2 Phenol NH gt Diphenylamine 2 WO 2 NH lt gt 3 Ho N The conversion of phenol in the reactor is 95 with a 99 selectivity to aniline as shown in the first reaction The second reaction forms another salable product in diphenylamine while the third reaction is the decomposition of ammonia The reaction set is slightly ex
48. retrieve the values for the first stream in the list s03 Click on the stream s03 in the table Stream List in Figure 88 Choose the radio button with the option Flowrates of Components to specify the composition Now let us retrieve the flowrates of the individual components in stream s03 as described below In Figure 85 the table Variables on the right hand side at the top shows the names and descriptions of all the measured and unmeasured variables in the aniline process model Select the radio button for the option data only for the current stream When this option is selected the table Variables only shows the variables that are associated with that stream The screen view now is shown in Figure 85 The variables associated with stream s03 can be seen in the table Variables in Figure 85 Stream s03 is the ammonia feed stream and it contains only ammonia In the Variables table f03nh3 is the molar flowrate of ammonia in stream s03 Let us enter these values in the Components Data table as described below In the Component Data table enter NH3 in the first row of the component name column Now click on the variable f03nh3 in the Variables table The value field below the Variables table now shows the value of f03nh3 obtained as a result of economic optimization To take this value as the molar flowrate of NH3 click the button Load Data into Mass Mole Flowrate for Component T
49. the diagram The exact amount of the cold and hot utilities can be seen in the output file which is explained later 85 Save in 3 Examples Tl c E File name aniline Save as type Hen Model Files hen Cancel A Figure 79 The Save As Window uM Figure 80 The Output Window 86 The menu bar at the top of the diagram provides options for viewing and printing the diagram Clicking the View button displays the commands to turn off the grid and show the data points The Print Options button can be used to set the number of copies and change the printer orientation Clicking the Print button will print the diagram to the default system printer Click the Save button to save the diagram in a Windows Metafile format The Help button will display a brief description about the Grand Composite Curve Closing the window brings the user back to the Output Window The second button View and Save the Grid Diagram on the Output Window displays the Network Grid Diagram This is shown in Figure 82 It is a graphical representation of the network solution designed by the program It shows the arrangement of heat exchangers heaters and coolers in the system Red lines going from left to right represent hot streams and blue lines going from right to left represent cold streams A red circle on a blue line means a heater and a blue circle on a red line is a cooler Green circles joined by a vertical gr
50. the global economic equation Figure 26 b Let us choose the optimization direction to be Maximizing and the Economic Model type to be Linear When you click on the View menu in the Optimization Algorithm window a pulldown menu is displayed as shown in Figure 36 The View menu includes commands for the Optimization Algorithm mode the All Information mode and Flowsheet diagram The Optimization Algorithm mode displays the model description window The All Information mode contains the different windows combined together into one switchable window The Flowsheet diagram option is used to view the flowsheet diagram which is drawn using the flowsheet simulation program Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste M Eg lll File View Help 81 x Data Validation Algorithm T joa Biegler Method moderate gross errors Parameters Estimation Algorithm Least Squares Method small gross errors Economic Optimization Objective Function profit Optimization Direction Maximizing Economic Model Type Nonlinear Figure 35 Online Optimization Algorithm Window 52 J Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste M Eg lil File view Help l xl mi gt v Optimization Algorithms All Info Flowsheet Options Data Validation Algorithm Tjoa Biegler Method moderate gr
51. 0 326 EQU124 TE103 T19 TCW4 T20 TCW3 log T19 TCW4 T20 TCW3 e 0 327 EQU125 Q103 areaE103 uE103 TE103 1000000 e 0 328 EQU126 f20 f20nh3 f20h2o f20ph f20an e 0 329 EQU127 f21nh3 0 070 f20nh3 e 0 330 EQU128 f21h2o 0 030 f20h2o e 0 331 EQU129 f21ph 0 305 f20ph e 0 332 EQU130 f21an 0 860 f20an e 0 333 EQU131 f21 f21nh3 f21h2o f21ph f21an e 0 334 EQU132 H21 f21nh3 hfnh3 sum coeff2 enth liq nh3 coeff2 power T21 ord coeff2 power 536 67 Bea Le TD 1000000 335 f21h20 hfh20 sum coeff2 enth_liq h2o coeff2 power T21 ord coeff2 power 536 67 ord coeff2 1000000 336 f21ph hfph sum coeff2 enth liq ph coeff2 power T21 ord coeff2 power 536 67 ord coeff2 1000000 337 f2lan hfan sum coeff2 enth liq an coeff2 power T21 ord coeff2 power 536 67 0rd coeff2 1000000 e 0 338 EQU133 T21 T20 e 0 339 EQU134 f23nh3 f21nh3 e 0 340 EQU135 f23h2o f21h2o e 0 341 EQU136 f23ph f21ph e 0 342 EQU137 f23an f21an e 0 343 EQU138 f23 f23nh3 f23h2o f23ph f23an e 0 344 EQU139 H23 f23nh3 hfnh3 sum coeff2 enth liq nh3 coeff2 power T23 ord coeff2 power 536 67 ord coeff2 1000000 345 f23h2o hfh2o sum coeff2 enth_liq h2o coeff2 power T23 ord coeff2 power 536 67 MASA MER EM Md 346 f23ph hfph sum coeff2 enth liq ph coeff2 power T23 ord coeff2 power 536 67 ord coeff2 1000000 347 f23an hfan sum coeff2 enth liq an
52. 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 461 4728 INF 17 9297 INF 153 8243 INF 3421 7733 INF 172 0533 INF 13 3023 INF 0 0394 INF 461 4728 INF 17 9297 INF 153 8243 INF 3421 7733 INF 172 0533 INF 174 2130 INF 0 8562 INF 466 6054 INF 181 2908 INF 155 5351 INF LEVEL UPPER 3255 8072 INF 8 6921 INF 174 2130 INF 0 8562 INF 466 6054 INF 181 2908 INF 155 5351 INF 3255 8072 INF 8 6921 INF 174 2130 INF 0 8562 INF 466 6054 INF 181 2908 INF 155 5351 INF 3255 8072 INF 8 6921 INF 466 6054 INF 18 1291 INF 155 5351 INF 3252 5514 INF 461 4728 INF 17 9297 INF 153 8243 INF 3216 7733 INF 461 4728 INF 17 9297 INF 153 8243 INF 3216 7733 INF 5 1327 INF 0 1994 INF 7109 INF 35 7781 INF 174 2130 INF 0 8562 INF 163 1617 INF 0 3256 INF 8 6921 INF 9 1020 INF 168 1906 INF 0 3501 INF 0 5312 INF 9 1020 INF 168 1906 INF 0 3501 INF LEVEL UPPER 0 5312 INF 7 8278 INF 5 0457 INF 0 0245 INF 0 1620 INF 7 8278 INF 5 0457 INF 0 0245 INF 0 1620 INF 1 2743 INF 163 1449 INF 0 3256 INF 0 3692 INF 172 7567 INF 0 8562 INF 0 0168 INF 8 3229 INF 159 4544 INF 0 0168 INF 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 MARGINAL 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 MARGINAL 160 24 25 VAR F26PH 0 0001 1 6230 INF VAR F27AN 0 0001
53. 02 3 347561E 03 1 387796E 02 4 2 46275E 05 9 666928E 02 3 662024E 03 0 0135635 4 245 1 899089E 03 2 462962E 05 9 636487E 02 3 967959E 03 1 325756E 02 5 DATA GRID GRAPHS Figure 105 Reactor Analysis Results in Tabular Form Save the file as a REC file using the Save As option in the File menu of the main window Exit the program by clicking on the End option in the File menu of the main window This concludes the use of the reactor analysis program for the example problem 111 XI OPTIMIZATION SOLVER GAMS A Compilation Output Brooke et al 1996 The compilation output is produced during the initial check of the program and it is often referred to as a compilation It includes two or three parts the echo print of the program an explanation of any errors detected and the symbol reference maps The echo print of the program is always the first part of the output file If errors had been detected the explanatory messages would be found at the end of the echo print The echo print of the GAMS program for the economic optimization of the contact process is included in the GAMS output file in Section X The symbol reference maps follow the echo print and they include the symbol cross reference and the symbol listing map These are extremely useful if one is looking into a model written by someone else or if one is trying to make some changes in their own model after spending time away from it
54. 04 f07 f08 f09 f10 f11 f12 51 f13 f14 f16 f17 f18 f19 f20 f21 52 f23 f24 f25 f26 f27 f28 f29 f31 53 f32 f33 fCW1 fCW2 fCW3 fCW4 fCW5 fCW6 54 fCW7 fCW8 T03 T04 T07 T08 T09 T10 55 T11 T12 T13 T14 T16 T17 T18 T19 56 T20 T21 T23 T24 T25 T26 T27 T28 57 T29 T31 T32 T33 TCW1 TCW2 TCW3 TCW4 58 TCW5 TCW6 TCW7 TCW8 60 VARIABLE ObjVar objective or profit function 61 The following are the Unmeasured Variables 62 VARIABLES 63 eff an eff dpa eff h2 eff h20 eff n2 eff nh3 eff ph f03nh3 64 f04ph f07an f07dpa f07h2 f07h20 f07n2 f07nh3 f07ph 65 f08an fO8dpa f08h2 f08h2o f08n2 fO8nh3 fO8ph fO9an 66 f09dpa f09h2 f09h2o f09n2 fO9nh3 fO9ph f10an f10dpa 67 f10h2 f10h2o f10n2 f10nh3 flOph fllan flldpa fllh2 68 fllh2o flln2 fllnh3 fllph fl2an fl2dpa f12h2 f12h2o 69 f12n2 f12nh3 fl2ph f13h2 f13h20 f13n2 f13nh3 f14h2 70 f14h20 fl4n2 f14nh3 f16h2 f16h20 f16n2 f16nh3 f17h2 71 f17h20 f17n2 f17nh3 f18an f18dpa f18h20 f18nh3 f18ph 148 f19an f19h20 f19nh3 f19ph f20an f20h20 f20nh3 f20ph f21an f21h2o f21nh3 f21ph f23an f23h20 f23nh3 f23ph f24an f24h2o f24nh3 f24ph f25an f25dpa f25h2o f25ph f26an f26h2o f26ph f27an f27h2o f27ph f28an f28h20 f28ph f29an f29dpa f29ph f31an f31dpa f31ph f32an f32dpa f32ph f33an f33dpa f33ph feed an feed dpa feed h2 feed h2o feed n2 feed nh3
55. 1 EQ EQU173 EQU174 EQU175 EQU176 EQU177 EQU178 EQU179 EQU180 EQU181 EQU182 EQU183 EQU184 EQU185 EQU186 EQU187 EQU188 EQU189 EQU190 EQU191 EQU192 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 149 3 4 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 EQU 182 183 184 185 186 187 EQU193 EQU194 EQU195 EQU196 EQU197 EQU198 EQU199 EQU200 INEQU1 INEQU2 INEQU3 INEQUA INEQU5 INEQU6 INEQU7 INEQU8 INEQU9 INEQU10 ObjName ObjName ObjVar E profit EQU1 f10ph 1 conv1 f09ph e 0 EQU2 f10an f09an 0 985 conv1 f09ph e 0 EQU3 f10dpa f09dpat 0 005 conv1 f09ph e 0 EQUA H10 H09 e 0 EQU5 T10 T09 e 15 EQU6 f10 f10h2 f10n2 f10nh3 f10h20 f10ph fl0an fl0dpa e 0 EQU7 f11h2 f10h2 e 0 EQU8 f11n2 f10n2 e 0 EQU9 f11nh3 f10nh3 e 0 EQU10 f11h20 f10h20 e 0 EQU11 f11ph f10ph e 0 EQU12 fllan fl0an e 0 EQU13 flldpa fl0dpa e 0 EQU14 TE100 T10 T08 T11 T07 log T10 T08 T11 T07 e 0 EQU15 Q100 areaE100 uE100 TE100 1000000 e 0 EQU16 Q100 H10 H11 e 0 EQU17 f11 f11h2 f11n2 f11nh3 f11h20 fllph fllan fl1dpa e 0 18 H11 f11h2 hfh2 sum coeff1 enth gas h2 coeff1 power T11 PE DOM er S oe cot Roo 1009090 f11n2 hfn2 sum coeffl enth_gas n2 coeffl power T11 ord coeff1 power 536 67 or
56. 100 to separate the aqueous product and the liquid organic product The organic product stream 21 is recycled to the column Stream 21 consists of 7 of the ammonia 3 of the water 30 596 of the phenol and 8646 of the aniline in stream 20 Because stream 21 is below the pressure of the top stage pressure P 102 is used to bring the pressure in stream 23 up to 15 psia The aqueous product stream 24 from V 100 is a non product output stream This stream will be sent through wastewater treatment and released off site The bottoms stream stream 25 is the feed to the next column The final column is the product column T 102 It is a 75 stage column fed on stage 35 The pressure at the top of the column is 2 707 psia while the pressure at the bottom of the column is 21 46 psia This column also has a side draw on stage 50 Due to a high boiling azeotrope between phenol and aniline the main component in the distillate stream 26 is aniline Stream 26 contains all of the water 19 5 of the phenol and 92 3 of the aniline from stream 25 Stream 26 must be at least 99 wt aniline for industrial use Because there is a 10 psia pressure drop for liquids in coolers stream 26 needs to be pumped up to a pressure of 12 71 psia by P 104 The resulting stream stream 27 is cooled by E 104 Stream 28 a product stream emerges from the cooler at 90 F and 2 707 psia The azeotrope between phenol and aniline is 19 taken off on stage 50 and recycled This
57. 102 1000000 e 0 EQU31 f12 f12h2 f12n2 f12nh3 f12h20 f12ph fl2an fl2dpa e 0 EQU32 f13h2 f12h2 e 0 EQU33 f13n2 f12n2 e 0 EQU34 f13nh3 0 999 f12nh3 e 0 EQU35 f03 f03nh3 e 0 EQU36 H03 f03nh3 hfnh3 sum coeff2 enth_liq nh3 coeff2 power T03 ord coeff2 power 536 67 ord coeff2 1000000 e EQU37 f04 f04ph e 0 EQU38 f07h2 f16h2 e 0 EQU39 f07n2 f16n2 e 0 EQU40 f07nh3 f03nh3 f16nh3 e 0 EQU41 f07h20 f16h20 e 0 EQU42 f07ph eee EQUA43 f07an f31an e 0 EQUAA f07dpa f31dpa e 0 EQU45 H04 f04ph hfoh sum coeff2 enth_liq ph SA aaa ia ord coeff2 power 536 67 ord coeff2 1000000 e 0 EQU46 f07 f07h2 f07n2 f07nh3 f07h2o f07ph f07an f07dpa e 0 EQU47 H07 f07h2 hfh2 sum coeff1 enth_gas h2 Coeff1 power T07 ord coeff1 power 536 67 0rd coeff1 1000000 f07n2 hfn2 sum coeffl enth gas n2 coeff1 power TO07 ord coeff1 power 536 67 0rd coeff1 1000000 f07nh3 hfnh3 sum coeffl enth gas nh3 coeff1 power T07 ord coeff1 power 536 67 0rd coeff1 1000000 4 f07h20 hfh20 sum coeff1 enth gas h20 coeff1 power TO7 ord coeff1 power 536 67 0rd coeff1 1000000 f07ph hfph sum coeff2 enth liq ph Coeff2 power TO7 ord coeff2 power 536 67 0rd coeff2 1000000 f07an hfan sum coeff2 enth liq an coeff2 power TO7 ord coeff2 power 536 67 0rd coeff2 1000000 fO7dpa hfdpat sum coeff2 enth_liq d
58. 159 4544 IN VAR F27H20 0 0001 0 0168 INF VAR F27PH 0 0001 1 6230 INF VAR F28AN 0 0001 159 4544 INF VAR F28H20 0 0001 0 0168 INF VAR F28PH 0 0001 1 6230 INF VAR F29AN 0 0001 13 3023 INF VAR F29DPA 0 0001 0 0394 INF VAR F29PH 0 0001 6 6583 INF VAR F31AN 0 0001 13 3023 INF VAR F31DPA 0 0001 0 0394 INF VAR F31PH 0 0001 6 6583 INF VAR F32AN 0 0001 0 0425 INF VAR F32DPA 0 0001 0 8168 INF VAR F32PH 0 0001 0 0416 INF VAR F33AN 0 0001 0 0425 INF VAR F33DPA 0 0001 0 8168 INF VAR F33PH 0 0001 0 0416 INF VAR FEED_AN 0 0001 1 2655 INF VAR FEED_DPA 0 0001 0 0024 INF VAR FEED H2 0 0001 1 8990 INF VAR FEED H20 0 0001 0 0754 INF VAR FEED N2 0 0001 0 0246 INF VAR FEED_NH3 0 0001 100 2370 INF Economic Optimization Program LOWER LEVEL UPPER VAR FEED PH 0 0001 17 1589 TINF VAR H03 9999 0000 3 9924 INF VAR H04 9999 0000 6 5790 INF VAR H07 9999 0000 72 1825 INF VAR H08 9999 0000 49 9070 INF VAR H09 9999 0000 44 9980 INF VAR H10 9999 0000 44 9980 INF VAR H11 9999 0000 70 0944 INF VAR H12 9999 0000 78 6489 INF VAR H13 9999 0000 63 9998 INF VAR H14 9999 0000 63 2958 INF VAR H16 9999 0000 62 3089 INF VAR H17 9999 0000 0 7040 INF VAR H18 9999 0000 7 0107 INF VAR H19 9999 0000 16 9449 INF VAR H20 9999 0000
59. 2 01 09 49 34 PAGE 22 GAMS 2 50A Windows NT 95 98 LOWER LEVEL UPPER MARGINAL 12 0000 13 0600 14 0000 160 0000 165 1140 190 0000 170 0000 181 9526 190 0000 160 0000 161 0942 165 0000 160 0000 161 0942 165 0000 160 0000 161 0942 165 0000 10 0000 20 0000 20 0000 10 0000 20 0000 20 0000 0 8000 0 9009 1 0000 0 8000 0 9009 1 0000 22000 0000 23751 7907 24000 0000 22000 0000 23751 7907 24000 0000 I 9600 0000 9600 0000 9800 0000 EPS 9600 0000 9600 0000 9800 0000 3350 0000 3416 2254 3450 0000 3350 0000 3416 2254 3450 0000 75 0000 80 0000 85 0000 EPS 75 0000 80 0000 85 0000 I 540 0000 550 0000 560 0000 EPS 560 0000 570 0000 580 0000 EPS 605 0000 624 6017 625 0000 1120 0000 1125 0000 1130 0000 EPS 1175 0000 1185 0000 1195 0000 1195 0000 1200 0000 1205 0000 I 670 0000 690 0000 690 0000 EPS 590 0000 600 0000 610 0000 590 0000 600 0000 610 0000 EPS 590 0000 600 0000 610 0000 620 0000 630 0000 640 0000 EPS 590 0000 600 0000 610 0000 815 0000 825 0000 835 0000 EPS 665 0000 675 0000 685 0000 EPS 560 0000 570 0000 580 0000 560 0000 570 0000 580 0000 560 0000 570 0000 580 0000 EPS 560 0000 570 0000 580 0000 840 0000 850 0000 860 0000 EPS 715 0000 725 0000 735 0000 EPS 715 0000 725 0000 735 0000 EPS 545 0000 550 0000 555 0000 EPS 820 0000 830 0000 840 0000 EPS 825 0000 835 0000 845 0000 EPS 1000 0000 1010 0000 1020 0000 EPS 580 0000 590 0000 600 0000 02 12 01 09 49 34 PAGE 23 GAMS 2 50A Windows NT 95 98 LOWER LEVEL UPPER MARGINA
60. 21 986 2 6508E 03 5 1857E 06 5 4745E 09 ph 9 2247 7 2870E 02 6 1180E 05 2 3346E 08 an 15 116 6 5655E 02 5 7950E 05 2 3852E 08 dpa 17 304 9 6945E 02 7 2647E 05 2 4965E 08 EQUATIONS The Constraints EQUI EQU2 EQU3 EQU4 EQU5 EQU6 EQU7 EQU8 EQU9 EQU10 EQU11 EQU12 EQU13 EQU14 EQU15 EQU16 EQU17 EQU18 EQU19 EQU20 EQU21 EQU22 EQU23 EQU24 EQU25 EQU26 EQU27 EQU28 EQU29 EQU30 EQU31 EQU32 EQU33 EQU34 EQU35 EQU36 EQU37 EQU38 EQU39 EQU40 EQU41 EQU42 EQU43 EQU44 E QU46 EQU47 EQU48 EQU49 EQU50 EQU51 EQU52 EQU53 EQU54 EQU55 EQU56 EQU57 EQU58 EQU59 EQU60 EQU61 EQU62 E QU64 EQU65 EQU66 EQU67 EQU68 EQU69 EQU70 EQU71 EQU72 EQU73 EQU74 EQU75 EQU76 EQU77 EQU78 EQU79 EQU80 EQU81 EQU82 EQU83 EQU84 EQU85 EQU86 EQU87 EQU88 EQU89 EQU90 EQU91 EQU92 EQU93 EQU94 EQU95 EQU96 EQU97 EQU98 EQU99 EQU100 EQU101 EQU102 EQU103 EQU104 EQU105 EQU106 EQU107 EQU108 EQU109 EQU110 En I EQU116 EQU121 EQU122 EQU111 EQU112 EQU113 EQU EQU117 EQU118 EQU119 EQU120 EQU123 EQU124 EQU125 EQU FOUIDT EQU128 EQU129 EQU130 EQU131 EQU132 EQU133 EQU134 EQU135 EQU136 EQU137 EQU138 EQU139 EQU140 EQU141 EQ EQU143 EQU144 EQU145 EQU146 EQU147 EQU148 EQU149 EQU150 EQU151 EQU152 EQU153 EQU154 EQU155 EQU156 EQU157 EQU158 EQU159 EQU160 EQU161 EQ EQU163 EQU164 EQU165 EQU166 EQU167 EQU168 EQU169 EQU170 EQU17
61. 45 111 15 where x5 is the weight fraction of diphenylamine This concludes the discussion of model formulation for the aniline process Having understood the methodology of Advanced Process Analysis System and the aniline process model we are now ready to use the Advanced Process Analysis System program The following section gives detailed instructions on using the program 30 Table 6 The Constraint Equations for the Absorption Tower T 100 Material Balances Grek ye n JOB 0898 Overall FS f A fip f Co a Ore ee Hy f _ BC fz 0 N gt g N3 13 12 FA 0 E 20 FL 0001 f9 0 Species gt fE 0 10 f29 0 i0 090 f 0 PH PH _ 18 J12 0 AN AN _ fis a fo 0 DPA DPA _ 18 J12 0 Energy Balances h T aA T AT aT at T Enthalpy HN NH H O PH AN DPA k 138 Function s13 all chemicals use gaseous enthalpy coefficients s18 all chemicals use gaseous enthalpy coefficients 3l IV GETTING STARTED WITH THE ADVANCED PROCESS ANALYSIS SYSTEM Upon running the Advanced Process Analysis System the first window presented to the user is the Advanced Process Analysis Desk This is shown in Figure 9 By default the Advanced Process Analysis System opens a new model named untitled ioo in the program directory The complete filename for this new model is shown in the bottom left corner of the window The bottom right corner shows the date and
62. 75 276 277 278 EQU57 f09h2 f08h2 e 0 EQU58 f09n2 f08n2 e 0 EQU59 f09nh3 f08nh3 e 0 EQU60 f09h20 f08h20 e 0 EQU61 f09ph f08ph e 0 EQU62 f09an f08an e 0 EQU63 f09dpa f08dpa e 0 EQU64 Q101 H09 H08 e 0 EQU65 f09 f09h2 f09n2 f09nh3 f09n2o f09pn t09an f09dpa e 0 EQU66 H09 f09h2 hfh2 sum coeff1 enth_gas h2 coeff1 foower T09 ord coeff1 power 536 67 0rd coeff1 1000000 f09n2 hfn2 sum coeffl enth_gas n2 coeff1 power TO9 ord coeff1 power 536 67 0rd coeff1 1000000 f09nh3 hfnh3 sum coeffl enth gas nh3 coeff1 power TO9 ord coeff1 power 536 67 0rd coeff1 1000000 fO9h20 hfh2 sum coeff1 enth gas h20 coeff1 power TO9 ord coeff1 power 536 67 0rd coeff1 1000000 f09ph hfph sum coeff1 enth gas ph coeff1 power TO9 ord coeff1 power 536 67 0rd coeff1 1000000 f09an hfan sum coeff1 enth gas an coeff1 power TO9 ord coeff1 power 536 67 0rd coeff1 1000000 fO9dpa hfdpat sum coeff1 enth_gas dpa coeff1 power T09 ord coeff1 power 536 67 0rd coeff1 1000000 e 0 EQU67 f10nh3 1 conv2 f09nh3 0 3257 conv a e 0 68 f10h2o f09h2o conv1 f09ph e 0 69 f10h2 f09h2 1 S conv2 f09nh3 0 70 f10n2 f09n2 0 5 conv2 f09nh3 e 0 71 feed_h2 1000 f09h2 dens_ h2 f09 h2 e 72 feed n2 1000 f09n2 dens n2 f09 n2 e 73 feed nh3 1000 f09nh3 dens nh3 f09 nh3 feed h20 1000 f09h20 d
63. 8 g 75 INEQU3 T12 TCW1 g 60 INEQUA T20 TCW3 g 30 INEQU5 f26an 0 989 f26h20 h20 f26ph ph f26an an an g INEQU6 T28 TCW5 g 10 INEQU7 f29ph 0 300 f29ph ph f29an an f29dpa dpa ph NEON eee ee QU9 133 TCW7 g INEQU10 f32dpa 0 945 f32ph ph f32an an f32dpa dpa dpa g 0 0 0 0 1 g g f03 L 203 f04 L 165 7 f07 L 4250 f08 L 4250 f09 L 4250 f10 L 4250 f11 L 4250 f12 L 4250 f13 L 3900 f14 L23860 f16 L 3860 f17 L 43 f18 L 345 f19 L 180 f20 L 180 f21 L213 f23 L 13 f24 L 170 TE105 T32 TCW8 T33 TCW7 log T32 TCW8 T33 TCW7 e 0 profit price an f28 an price dpa f33 dpa price nh3 f03 nh3 price ph f04 ph e 0 f25 L2180 f26 L 162 4 f27 L 162 4 f28 L2162 4 f29 L 15 f31 L 15 32 L 0 9 f33 L20 9 fCW1 L fCW2 L 22900 fCW3 L 9700 fCW5 L 3400 fCW6 L 3400 fCW8 L 80 T03 L 550 T04 T07 L 615 T08 L 1125 T09 T10 L 1200 T11 L 680 T12 L 630 L 675 T13 L 600 T14 L 600 T16 T17 L 600 T18 L 825 T19 22900 fCW4 L 9700 fCW7 L 80 L 570 L 1185 L 600 T20 L 570 T21 L 570 T23 L 570 T24 L 570 T25 L 850 T26 T27 L 725 T28 L 550 T29 L 725 L 830 T31 L 835 T32 L 1010 T33 L 590 TCW1 L 540 TCW2 L 560 TCW3 L 540 TCW4 L 560 TCW5 L 540 TCW6 L 560 TCW7 L 540 TCW8 L 560 f03 LO 200 f04 L0 160 f07 L0 4240 Economic Optimization Program 463 464 466 467 469 470 471 472 473 474
64. Algorithm The WAR algorithm is based on the generic pollution balance of a process flow diagram Pollution Accumulation Pollution Inputs Pollution Generation Pollution Output 1 1 It defines a quantity called as the Pollution Index to measure the waste generation in the process This pollution index is defined as I wastes products GOut GFugitive GP 1 2 This index is used to identify streams and parts of processes to be modified Also it allows comparison of pollution production of different processes The WAR algorithm can be used to minimize waste in the design of new processes as well as modification of existing processes E 2 The Environmental Impact Theory The Environmental Impact Theory Cabezas et al 1997 is a generalization of the WAR algorithm It describes the methodology for evaluating potential environmental impacts and it can be used in the design and modification of chemical processes The environmental impacts of a chemical process are generally caused by the energy and material that the process takes from and emits to the environment The potential environmental impact is a conceptual quantity that can not be measured But it can be calculated from related measurable quantities The generic pollution balance equation of the WAR algorithm is now applied to the conservation of the Potential Environmental Impact in a process The flow of impact J in and out of the process is related to mass and en
65. EQU96 EPS EQU EQU97 EPS EQU EQU98 s EPS Economic Optimization Program 02 12 01 09 49 34 PAGE 19 GAMS 2 50A Windows NT 95 98 LOWER LEVEL UPPER MARGINAL EQU EQU99 EPS EQU EQU100 A j EPS EQU101 EPS EQU102 EPS EQU103 i EPS EQU104 EPS EQU105 y h z 0 0047 EQU106 I 37 3272 EQU107 s 45 2379 EQU108 304 2000 EQU109 EPS EQU110 EPS EQU111 EPS EQU112 i 0 0001 EQU113 11 3848 EQU114 i f 38 9046 EQU115 EPS EQU116 EPS EQU117 i EPS EQU118 i 0 0001 EQU119 i i 11 3848 EQU120 i p 38 9046 EQU121 I EPS EQU122 i n EPS EQU123 i i EPS EQU124 EPS EQU125 EPS EQU126 j E EPS EQU127 i EPS EQU128 z i 5 0 0047 EQU129 37 3272 EQU130 i 45 2379 EQU131 EPS EQU132 EPS EQU133 EPS EQU134 y EPS EQU135 0 0047 EQU136 37 3272 EQU137 i i 45 2379 EQU138 i EPS EQU139 EPS EQU140 i y EPS EQU141 i EPS 157 EQU EQU142 EPS Economic Optimization Program 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 LOWER LEVEL UPPER MARGINAL EPS EPS EPS EPS 45 5700 38 9831 45 6193 304 2000 EPS EPS 45 5700 45 5700 45 5700 EPS EPS 45 5700 45 5700 45 5700 EPS EPS 45 5700 45 5700 45 5700 EPS EPS EPS EPS EPS 45 5700 35 7200 45 2379 304 2000 EPS EPS 35 7200 45 2379 304 2000 EPS E i
66. H F10AN F10DPA 162 F10H2 F10H20 F10N2 F10NH3 F10PH F11AN F11DPA F11H2 F11H20 F11N2 F11NH3 F18NH3 F18PH F19AN Economic Optimization Program 02 12 01 09 49 34 PAGE 30 GAMS 2 50A Windows NT 95 98 Economic Optimization Program 02 12 01 09 49 34 PAGE 31 163 GAMS 2 50A Windows NT 95 98 FEED H2 FEED H20 FEED N2 FEED NH3 FEED PH H03 H04 H07 H08 H09 H10 H11 H12 H13 H14 H16 H17 H18 H19 H20 H21 H23 H24 H25 H26 H27 H28 H29 H31 H32 H33 PROFIT Q100 Q101 Q102 Q103 Q104 Q105 TE100 TE102 TE103 TE104 TE105 Economic Optimization Program 02 12 01 09 49 34 PAGE 32 GAMS 2 50A Windows NT 95 98 REPORT SUMMARY 0 NONOPT 0 INFEASIBLE 0 UNBOUNDED 0 ERRORS EXECUTION TIME 0 060 SECONDS 0 7 Mb WIN 18 097 USER Ralph W Pike G990726 1450AP WIN Louisiana State University Department of Chemical EngineeriDC267 FILE SUMMARY INPUT C PROGRAM FILES ADVANCED PROCESS ANALYSIS SYSTEM GAMS25 DO_ECON OUTPUT _ C PROGRAM FILES ADVANCED PROCESS ANALYSIS SYSTEM GAMS25 DO_ECON LST SAVE C PROGRAM FILES ADVANCED PROCESS ANALYSIS SYSTEM GAMS25 PUT_DATA G0 164
67. H18 LO 9999 H19 LO 9999 609 H20 LO 9999 H21 LO 9999 H23 LO 9999 610 H24 L0 9999 H25 LO 9999 H26 LO 9999 611 H27 L0 9999 H28 LO 9999 H29 LO 9999 612 H31 LO 9999 H32 LO0 9999 H33 LO 9999 613 profit LO 0 0001 Q100 LO 9999 Q101 LO 9999 614 Q102 L0 9999 Q103 LO 9999 Q104 LO 9999 615 Q105 LO 9999 TE100 LO 0 TE102 LO 0 616 TE103 LO 0 TE104 LO 0 TE105 LO 0 617 618 619 MODEL Aniline ALL 620 OPTION LIMCOL 0 621 OPTION LIMROW 0 622 OPTION ITERLIM 100 623 OPTION DOMLIM 0 i OPTION RESLIM 1000 626 OPTION NLP CONOPT aoe SOLVE Aniline Using NLP Maximizing ObjVar COMPILATION TIME 0 060 SECONDS 0 8Mb WIN 18 097 Economic Optimization Program 02 12 01 09 49 34 PAGE 15 Model Statistics SOLVE ANILINE USING NLP FROM LINE 627 GAMS 2 50A Windows NT 95 98 MODEL STATISTICS BLOCKS OF EQUATIONS 211 SINGLE EQUATIONS 211 BLOCKS OF VARIABLES 231 SINGLE VARIABLES 231 NON ZERO ELEMENTS 653 NON LINEAR N Z 163 DERIVATIVE POOL 12 CONSTANT POOL 85 CODE LENGTH 7545 GENERATION TIME 0 050 SECONDS 1 5Mb WIN 18 097 EXECUTION TIME 0 050 SECONDS 1 5Mb WIN 18 097 _Economic Optimization Program 02 12 01 09 49 34 PAGE 16 GAMS 2 50A Windows NT 95 98 SOLVE SUMMARY MODEL ANILINE OBJECTIVE OBJ VAR TYPE NLP DIRECTION MAXIMIZE SOLVER CONOPT FROM LINE 627 SOLVER STATUS 1 NORMAL COMPLETION MODEL STATUS 2 LOCALLY OPTIMAL OBJECTIVE VALUE 1402 2768 RESOURCE USAGE LIMIT 0
68. L 535 0000 540 0000 545 0000 EPS 555 0000 560 0000 565 0000 EPS 535 0000 540 0000 545 0000 EPS 555 0000 559 8727 565 0000 535 0000 540 0000 545 0000 I 555 0000 560 0000 565 0000 EPS 535 0000 540 0000 545 0000 EPS 555 0000 560 4050 565 0000 I INF 1402 2768 INF 0 0001 16 5640 INF 0 0001 0 0521 INF 0 0001 1 9190 INF 0 0001 0 7617 INF 0 0001 0 0249 INF 0 0001 95 3167 INF 0 0001 0 8663 INF 0 0001 205 0000 INF 0 0001 165 3950 INF 0 0001 13 3023 INF 0 0001 0 0394 INF 0 0001 461 4728 INF 0 0001 17 9297 INF 0 0001 153 8243 INF 0 0001 3421 7733 INF 0 0001 172 0533 INF 0 0001 13 3023 INF 0 0001 0 0394 INF 159 VAR F08H2 VAR F08H20 VAR F08N2 VAR F08NH3 VAR F08PH VAR F09AN VAR FO9DPA VAR F09H2 VAR F09H20 VAR F09N2 VAR F09NH3 VAR FO9PH VAR F10AN VAR F10DPA VAR F10H2 VAR F10H20 VAR F10N2 0 0001 Economic Optimization Program lt gt nn m o 2 I w inn m m m mnnn mnnn nnnm VAR F20AN VAR F20H20 2 VAR F20NH3 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 Economic Optimization Program VAR F20PH VAR F21AN VAR F21H20 VAR F21NH3 VAR F21PH VAR F23AN VAR F23H20 VAR F23NH3 VAR F23PH VAR F24AN VARF VA VA VA VA VA VAR F26AN VAR F26H20 R R R VAR F25AN R R R LOWER 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0 0001 0
69. Logical Operators Not And Or xor The functions of the logical operators are expressed in Table 23 For the mixed logical conditions the default operator precedence order used by GAMS in the absence of parenthesis is shown in Table 24 in decreasing order For the formulation of equations variables can appear on the left or right hand side of an equation or on both sides The system can automatically convert the equation to its standard form variables on the left no duplicate appearances before calling the GAMS solver For the convenience of input the system also provides several special notations such as summation sum and product prod minimum value smin maximum value smax E 3 Functions Predefined in the System There are two types of functions based on the type of argument exogenous or endogenous For exogenous arguments the arguments are known and examples are parameters and variable attributes The expression is evaluated once when the model is set up All functions except the random distribution functions uniform and normal are allowed With endogenous arguments the arguments are variables and are therefore unknown The function will be evaluated many times at intermediate points while the model is being solved The occurrence of any function with endogenous arguments implies that the model is not linear and the use of the functions of uniform and normal are forbidden in an equation definition Some bui
70. More difficult to solve than NLP Not recommended to use RMIP Relaxed mixed integer programming Can contain discrete variables but the integer and binary variables can be any values between their bounds Mixed integer programming Like RMIP but the discrete requirements are enforced the discrete variables must assume integer values between their bounds Relaxed mixed integer nonlinear programming Can contain both discrete variables and general nonlinear terms The discrete requirements are relaxed Same difficulty as NLP MINLP Mixed integer nonlinear programming Characteristics are the same as for RMINLP but the discrete requirements are enforced Mixed Complementarily Problem Constrained Nonlinear System E 2 Equation Formulation Besides the rules introduced above the equations as the main part of the input information have their own specific requirements The mathematical definitions of equations can be written in one or multiple lines Blanks can be inserted to improve readability and expressions can be arbitrarily complicated The standard arithmetic operations for the equations are listed in Table 20 The arithmetic operations listed in Table 20 are in order of precedence which determines the order of evaluation in an equation without parentheses The relational operators in the equations are L Less than left hand side Ihs must be less than or equal to right hand side rhs G Greater than lhs must be greater than or
71. PS 10 5257 10 5257 10 5160 0 0175 37 3272 45 2379 304 2000 EPS EPS EPS EPS EPS EPS 10 5257 10 5257 10 5265 10 5265 EPS 35 7200 10 5257 10 5257 10 5265 0 0175 35 7200 45 2379 304 2000 EPS EPS EPS 10 5257 10 5257 10 5265 0 0175 35 7200 45 2379 304 2000 02 12 01 09 49 34 PAGE 18 GAMS 2 50A Windows NT 95 98 MARGINAL EPS 156 EQU EQU56 z EPS EQU EQU57 10 5257 EQU EQU58 j 10 5257 EQU EQU59 10 5265 EQU EQU60 0 0175 EQU EQU61 i 35 7200 EQU EQU62 45 2379 EQU EQU63 304 2000 EQU EQU64 EPS EQU EQU65 EPS EQU EQU66 EPS EQU EQU67 i i 10 5160 EQU EQU68 0 0175 EQU EQU69 10 5257 EQU EQU70 i 10 5257 EQU EQU71 EPS EQU EQU72 T EPS EQU EQU73 y EPS EQU EQU74 EPS EQU EQU75 EPS EQU EQU76 I EPS EQU EQU77 EPS EQU EQU78 A EPS EQU EQU79 EPS EQU EQU80 EPS EQU EQU81 P I 0 1331 EQU EQU82 EPS EQU EQU83 i i EPS EQU EQU84 10 6428 EQU85 i 10 6428 EQU86 j 10 6436 EQU EQU87 A 0 1346 EQU EQU88 f EPS EQU EQU89 EPS EQU EQU90 0 1171 EQU EQU91 s 10 5257 EQU EQU92 i 10 5257 EQU EQU93 10 5265 EQU EQU94 0 0175 EQU EQU95 EPS EQU
72. S FOR ANILINE PROCESS In this section the constraint equations are listed for each of the units in the aniline process shown in Figure 8 The material and energy balances as well as the reaction rate equations for the reactor are shown in Table 26 The material and energy balances as well as heat transfer equations for the heat exchangers are shown in Tables 27 through 32 In all of the heat exchangers Qioss is assumed to be zero The material and energy balance equations for the distillation columns are shown in Tables 33 through 35 Tables 36 through 42 give the material and energy balances for the three phase separator the mixer the splitter the compressor and the pumps in the process The material balance inequalities are shown in Table 43 131 Table 26 The Process Constraint Equations for the Reactor CRV 100 Material Balances foo Ft f PD pH fF Qo fOD PAN p DPA fro FED Fh FP FLO 4 FD 4 FAN poa feedconc gt feed i effconc gt eff _ i H N NH H O PH AN DPA O3 fu 15 cony2 fo 0 0 fog OS Conv 2 fO 0 OM 1 conv2 fis 0 995 conv1 fr figo uno _ tu 0 OP 1 cow f FP ANE E s DPA fo fo 005 convl Rn aus 1000 f density eff _i 1000 density Jos MW fio MW i H N NH HO PH AN DPA Overall Species Energy Balances overall LAO L fM Oyu 0 h T aT aT OT aT Enthalpy i H N NH H O PH AN DPA k 10 11 Fun
73. Similarly the list of parameters and constants in the model can be viewed by choosing Parameters and Constants respectively from the list The value of the selected variable can be loaded as the molecular weight or the heat capacities of a particular species To do this click on the grid cell where you want the value to be loaded Select the variable or parameter or constant and then click on the button Load Value 103 U g asbIrcU2e1 3 8TU Abget Figure 95 Reactant Properties Window w REACTIONS E JLIE TL IL TL IL TIE JE e EJLILTL B A E JLIE TL IE TL IL TL IPTE s E JL IEEE TL IE TL IL IE TS A A A A A A E Reaction Reaction Reaction Reaction Reaction Reaction Reaction Reaction O O N c amp WN Reaction O U Reaction Figure 96 Stoichiometry Window 104 After the molecular weights and heat capacities for all seven species have been entered click on the Close button to return to the main window Clicking on the Stoichiometry icon in the toolbar of the main window opens up the Stoichiometry window The Stoichiometry window is shown in Figure 96 The reaction stoichiometry coefficients can be entered in this window A negative stoichiometric coefficient indicates that this component is acting as a reactant species for the current reaction while a positive coefficient indicates a reaction product In Reaction 1 of Figure 98 the coefficient for C NH3 is
74. UP 85 fCW8 UP 85 T03 UP 560 T04 UP 580 T07 UP 625 T08 UP 1130 T09 UP 1195 T10 UP 1205 T11 UP 690 T12 UP 610 T13 UP 610 T14 UP 610 T16 UP 640 T17 UP 610 T18 UP 835 T19 UP 685 T20 UP 580 T21 UP 580 T23 UP 580 T24 UP 580 T25 UP 860 T26 UP 735 T27 UP 735 T28 UP 555 T29 UP 840 T31 UP 845 T32 UP 1020 T33 UP 600 TCW1 UP 545 TCW2 UP 565 TCW3 UP 545 TCW4 UP 565 TCW5 UP 545 TCW6 UP 565 TCW7 UP 545 TCW8 UP 565 Economic Optimization Program 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 f03nh3 L 203 f04ph L 165 f07h2 L 480 f07n2 L 160 f07nh3 L 3450 f07ph L 170 f08h2 L 480 f08n2 L 160 f08nh3 L 3450 f09h2 L 480 f09n2 L 160 f09nh3 L 3450 f10h2 L 485 f10nh3 L 3280 f11n2 L 162 f11nh3 L 3280 f12n2 L 162 f12nh3 L 3280 f13h2 L 485 f13n2 L 160 f13nh3 L 3279 f14h2 L 480 f14n2 L 160 f14nh3 L 3240 f16h2 L 480 f16n2 L 160 f16nh3 L 3240 f17n2 L 1 8 f17nh3 L236 1 f23ph L 0 1 f26ph L 1 6 f27ph L 1 6 f28ph L 1 6 f29an L 10 f31ph L 5 HO3 L 4 H04 L 6 5 HO7 L 73 H08 L 50 H09 L 46 H10 L 46 H13 L 65 H14 L 64 H16 L 63 H17 L 1 H18 L 7 Economic Optimization Program 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572
75. Wait Plant Steady 1minute Selected plant key measurements Plant Model Measurements Equality constraints Data Validation Validated measurements Plant Model gt Parameter Estimation Equality constraints Updated parameters Plant model Economic Optimization Economic model Controller limits Plant Steady Selected plant measurements amp controller limits Implement Optimal Line Out Period Setpoints 90 minutes Figure 58 Implementation procedure for On line Optimization after Kelly et al 1996 69 manipulating data from a DCS Steady state detection and data exchange will be illustrated with plant data for the contact process As shown in Figure 58 on line optimization executes economic optimization and generates a set of optimal set points Then these set points are transferred to the coordinator program or the operators as an Excel spreadsheet file These optimal set points can be sent directly to the distributed control system or viewed by operators before they are sent to the DCS Before the optimal set points are implemented the steady state detection program is run to ensure the process is at steady state To incorporate the capability for steady state detection an Excel worksheet program was prepared steady xls and it is included in the files with the on line optimization program The aniline process is used to illustrate the use of this program for time series analysis for steady state detecti
76. a T Enthalpy i H N NH H O k 14 16 Function s14 all chemicals use gaseous enthalpy coefficients s16 all chemicals use gaseous enthalpy coefficients 144 Table 40 The Process Constraint Equations for the Drying Column Recycle Pump P 102 Material Balances Overall gv ioe T Joe i x Ow T T E T for yu 0 NH3 _ NH3 _ NH 23 Sa 0 HO fo PU 0 I 27 23 21 Species Log BE PH a Jn O i AN AN _ AN foz Ja 0 Energy Balances h T a T PT a T aT Enthalpy i NP H O PH AN k 21 23 Function s21 all chemicals use liquid enthalpy coefficients s23 all chemicals use liquid enthalpy coefficients Table 41 The Process Constraint Equations for the Phenol Recycle Pump P 103 Material Balances Overall UP f 09 tfm Rm ES gps 0 PH JER X 0 Species AN FOP f 0 DPA ORA a feo 0 Energy Balances AO T T aT a T aT Enthalpy i PH AN DPA k 2931 Function s29 all chemicals use liquid enthalpy coefficients s31 all chemicals use liquid enthalpy coefficients 145 Table 42 The Process Constraint Equations for the Aniline Product Pump P 104 Material Balances Overall Ga Ju f Ge fa Jo 0 H O Jaa Po 0 Species PH eh SO AN ee 7 ov 0 Energy Balances h T aT a T aT aT Enthalpy i H O PH AN k 2627 Function s26 all chemicals use liquid enthalpy coefficients s27 all chemicals use liquid enthalpy c
77. ack some strategically paced bounds to limit the variables to sensible values Infeasible This means that he linear problem is infeasible 5 Locally This message means that no feasible point could be found for Infeasible the nonlinear problem from the given starting point It does not necessarily mean that no feasible point exists Intermediate The current solution is not feasible the solver program stopped Infeasible either because of a limit iteration or resource or some sort of difficulty Intermediate This is again an incomplete solution but it appears to be Nonoptimal feasible Integer An integer solution has been found to a MIP mixed integer Solution problem Intermediate This is an incomplete solution to a MIP An integer solution Noninteger has not yet been found 10 Integer There is no integer solution to a MIP This message should be reliable 11 Error Unknown There is no solution in either of these cases Error no Solution 115 1 Table 11 A List of Solver Status in GAMS Output Files Solver status Normal Completion Iteration Interrupt Resource Interrupt Terminated by Solver Evaluation Error Limit Unknown Error Preprocessor s Error Setup Failure Error Solver Failure Error Internal Solver Error Error Post Processor This means that the solver terminated in a normal way i e it was not interrupted by an iteration or resource limit or by internal difficulties The
78. al process streams These values help in identification of the streams that contribute more to the overall pollution impact of the process Suitable process modifications can be done to reduce the pollutant content of these streams Every run of on line optimization for the process is followed by the pollution index calculations The new pollution index values are compared with the older values The comparison shows how the change in process conditions affects the environmental impact Thus the pollution index program can be used in continuous on line monitoring of the process The aniline process will be used to demonstrate the use and capabilities of the pollution index program This is described in Section VIII 15 F Windows Interface An important part of the advanced process analysis system is development of the Graphical User Interface GUI It was necessary to have a programming language which could integrate all of above applications into one program It should also be able to exchange information between these programs without the intervention of the process engineer There are four competitive object oriented rapid applications development tools with GUI windows that have the above capabilities These are Microsoft s Visual Basic Borland s Delphi32 IBM s Visual Age and Powersoft s Powerbuilder We have chosen Visual Basic as the interface development language It is integrated with Windows 95 98 and Windows NT has a low cost
79. and film heat transfer coefficients are retrieved from the Flowsim The third step in the heat exchanger network optimization is classification of streams into hot streams and cold streams A hot stream is a stream that needs to be cooled to a lower temperature whereas a cold stream is a stream that needs to be heated to a higher temperature Usually streams entering a cooler or the hot side of a heat exchanger are the hot streams whereas streams entering through a heater or the cold side of a heat exchanger are the cold streams The final step in this problem requires the specification of the minimum approach temperature This value is usually based on experience Having completed all of the above four steps the heat exchanger network optimization is now performed using THEN Thermodynamic principles are applied to determine the minimum amount of external supply of hot and cold utilities The Composite Curves and the Grand Composite Curve are constructed for the process These curves show the heat flows at various temperature levels Illustrations of the composite curves are given in Figure 5 A new network of heat exchangers heaters and coolers is proposed which features the minimum amount of external utilities This network drawn in a graphical format is called the Network Grid Diagram An example of a network grid diagram is given in Figure 6 Detailed information about the network can be viewed using the interactive features of the user interface
80. as shown in Figure 53 Three options are available in the Stream Number menu as shown in Figure 50 The three options are Data from Data Validation Data from Parameter Estimation and Optimal Setpoints Let us click the Data from Data Validation option An input box appears Let us enter s07 and click Ok The Measured Variables and Unmeasured variables which are associated with the stream s07 with their reconciled values from Data Validation are displayed as shown in Figure 54 63 Roa 0 1 0 0 0225 amp 1 205 4 6016539495 16533437 8 pus 1 G 44039394 amp h 1 424039457 9 424033434 424033437 ji 424299991 1 424299994 pn d d4eesms 424299994 i2 1 424299991 1 1 422339894 FA 1 389282103 3832 82103 pna 9 3MB y fe n 42 82103 fig 347 24865 347 2486 fig 1817401 178 17402 f0 17817401 178 17402 1 13 0600 3 1306001 165 1140 181 95263 25 I fe 0 161 0942 27 I 161 0942 161 9471 naa E E E E E E E E n z Initial Point Estimated Value Process UnilD Unit of Parameter 0 94948 ERV 100 o 085 o G0009 DOH CRV juzi 533 8518333 E100 But HR ui 554 5477626E
81. at Exchanger Network Model Information window is displayed This window is shown in Figure 64 Since we are using the THEN program for the first time click the New Model button Once the Work on Current Model button is clicked the Welcome Screen of the Heat Exchanger Network program is displayed This screen is shown in Figure 65 The message at the center confirms that you are working on the process model aniline ioo in the Examples subdirectory The HEN model you are working on is an untitled new model A HEN model is an input file created by the heat exchanger network program to apply pinch analysis to the process model A HEN model is stored as a file with a hen extension e g sample hen The menu at the top of the background window is the main menu of THEN It is available at all times during the execution of the program The Help button can be used to access online help The About button gives the copyright information The Exit button can be used to quit the program at any time and go back to the Advanced Process Analysis Desk 15 x E Advanced Process Analysis System File Process Help im Heat Exchanger Network Model Information File Name E 0 7 y New Model Others Im Run Pinch Analysis 87 98 11 30 AM Figure 64 The Heat Exchanger Network Model Information Window 74 M vsic core ty Hes Piped fer hanger Menmsi Cve qrome w ane meang oe ses
82. ata window 66 w Stream Data Iof x Stream ID s04 Measured Vars Unmeasured Vars Name Plant Data DV Val PE Valbtmal Set_Point Unit 4240 38497 4240 39494 Ib mol hr X B14 9541 614 57 624 60171 R Figure 56 Stream Data Window Clicking the Close option in the file menu of the Output window returns the user to the main screen which was shown in Figure 35 The model information can be exported as an Excel file using the Export option in the file menu of the main window Save the optimization results using the Save option in the file menu The results including the full output files are stored along with the model When the Exit button is clicked the Interactive On line Optimization main window is closed and the user is taken back to the Advanced Process Analysis Desk Steady State Detection and Execution Frequency On line optimization executes economic optimization and generates a set of optimal set points Then these set points are transferred to the coordinator program or the operators as an Excel spreadsheet file These optimal set points can either be sent directly to the distributed control system or viewed by operators before they are sent to the DCS Before the optimal set points are implemented the steady state detection program is run to ensure the process is at steady state The following gives detailed information about steady state detection and execution frequ
83. ates nearly all of the process units found in chemical plant and refineries including packed bed catalytic chemical reactors distillation columns and heat exchangers among others The next section gives a detailed description of the simulation of the aniline process The contact process for sulfuric acid manufacture process D train at IMC Agrico Convent Louisiana is described in a separate manual II EXAMPLE ANILINE PROCESS DESCRIPTION The aniline plant is a simulation of a 55 000 metric tons yr process for ammonolysis of phenol The desired yield of aniline in the process is 95 based on phenol and 80 based on ammonia The aniline plant uses a three step process that produces aniline diphenylamine and water from phenol and ammonia The process flow diagrams are shown in Figures 7 and 8 and the process consist of the following three sections the feed preparation section the reactor section and the purification section In the feed preparation section the ammonia and phenol feed streams are combined with the ammonia and phenol recycle streams and heated to the required reactor temperature The ammonia feed stream stream 1 consists of 203 Ib mol hr liquid ammonia at 90 F The phenol feed stream stream 2 supplies 165 8 Ib mol hr liquid phenol at 110 F and atmospheric pressure The two feed streams are pumped to a pressure of 255 psia before they are mixed with their respective recycle streams stream 16 for ammonia and stream 31 for
84. azeotrope stream 29 contains 33 wt phenol 65 wt aniline and 2 wt diphenylamine These weight percents account for 80 of the phenol 7 7 of the aniline and 4 696 of the diphenylamine in stream 25 Stream 29 is below the pressure of stream 4 therefore it is pumped to a pressure of 255 psia by P 103 Stream 31 emerges at 373 F and 255 psia The bottoms product stream 32 consists of 5 of the phenol and 95 4 of the diphenylamine in stream 25 Stream 32 must be at least 95 wt diphenylamine for industrial use This stream is then cooled by E 105 Stream 33 a product stream emerges from E 105 at 130 F and 11 46 psia This concludes the description of the aniline process The next section explains the development of the process model III PROCESS MODEL FOR THE ANILINE PROCESS A process model of a chemical engineering process is a set of constraint equations which represents a mathematical model of relationships between the various plant units and process streams Before the constraint equations are formulated it is important to note that in order to have an accurate model of the process it is essential to include the key process units such as reactors heat exchangers and absorbers These units affect the economic and pollution performance of the process to a significant extent Certain other units are not so important and can be excluded from the model without compromising the accuracy For the aniline process the five heat exchangers th
85. cedure should be repeated for all of the streams listed on left side of the screen For each of the streams the temperature and flowrate will be automatically retrieved The enthalpy coefficients should be calculated as done for stream s07 The film heat transfer coefficient values for all the streams should be 51 9 The data retrieval part for the aniline model is now complete and the Finish button at the bottom of the screen should now be clicked When the Finish button is clicked the Build Model window appears on the screen This is shown in Figure 76 In this Build Model window the final step of dividing process streams into pairs of hot and cold streams is performed This classification of streams constitutes the THEN model In a THEN model a hot stream is a stream that needs to be cooled and a cold stream is a stream that needs to be heated The table on the left side of the screen shows the list of process streams selected earlier in the program for heat integration It shows the stream names as well as the descriptions The two pairs of lists on the right side of the screen display the hot and cold streams in the stream model Let us build the stream model for the aniline process 82 Figure 76 The Build Model Window 83 Figure77 The Build Model Window with one Cold Stream Figure 78 The Build Model with all the Hot an Cold Streams 84 From our knowledge of the aniline process we know that
86. coeff2 1000000 f18an hfant sum coeff2 enth_liq an coeff2 power T18 ord coeff2 power 536 67 0rd coeff2 1000000 f18dpa hfdpa sum coeff2 enth lla dpa coeff2 power T18 ord coeff2 power 536 67 0rd coeff2 1000000 ze EQU111 f19nh3 f18nh3 f23nh3 e 0 U112 f19h20 0 9999 f18h20 f23h20 e 0 EQU113 f19ph 0 060 f18ph f23ph e 0 EQU114 f19an 0 050 f18an f23an e 0 EQU115 f19 f19nh3 f19h20 f19ph fl9an e 0 EQU116 H19 f19nh3 hfnh3 sum coeffl enth_gas nh3 coeffl power T19 ord coeff1 power 536 67 Or 0 eo ert HH 200000 f19h20 hfh20 sum coeff1 enth gas h20 coeff1 power T19 ord coeff1 power 536 67 ord coeff1 100000 0 f19ph hfph sum coeff1 enth Q8 ph coeff1 power T19 ord coeff1 power 536 67 ord coeff1 1000000 t f19an hfan sum coeffl enth gas an coeff1 power T19 ord coeff1 power 536 67 0rd coeff1 1000000 e 0 EQU117 f20nh3 f19nh3 e 0 EQU118 f20h20 f19h20 e 0 EQU119 f20ph f19ph e 0 EQU120 f20an f19an e 0 EQU121 fCW4 fCW3 e 0 EQU122 Q103 fCW4 hfh20 sum coeff2 enth_lig h20 coeff2 power TCW4 ord coeff2 power 536 67 Aes RM 000009 fCW3 hfh20 sum coeff2 enth liq h20 coeffZ power TCW3 ord coeff2 power 536 67 ord coeft2 1000000 e 0 Economic Optimization Program 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 151 325 EQU123 H20 H19 Q103 ze
87. column that appears to cause the problem to be unbounded E GAMS Input Model Brooke et al 1996 The basic components of a GAMS input model include e Sets e Data Parameters Tables Scalar e Variables e Assignment of bounds and or initial values e Equations e Model and Solve statements e Display Put statement The overall content of GAMS output file is e Echo Print e Reference Maps e Equation Listings e Status Reports e Results 117 E 1 Format for Entering System Information The GAMS input code generated by the interactive on line optimization system is based on the information provided by the user Although the user usually does not need to consider the format of the GAMS program there are some regulations about the format related to GAMS that must be followed to properly enter information about the plant The input must be in correct format for an accurate GAMS input file to be generated automatically by the on line optimization system Most of the characters and words are allowable for the input information however the letters in the input information are case insensitive A few characters are not allowed for the input because they are illegal or ambiguous on some machines Generally all unprintable and control characters are illegal Most of the uncommon punctuation characters are not part of the language but can be used freely In Table 14 a full list of legal characters is given Besides characters th
88. ction s09 all chemicals use gaseous enthalpy coefficients s10 all chemicals use gaseous enthalpy coefficients 132 Table 27 The Process Constraint 2 7 oem for the Cross Heat Exchanger E 100 Material Balances US Balances gu f fn JEO fo fo fie fu Fart Tg Fo Yo vw Fant fa Overall f fin JEI fO fi Ya AN pupa Geo fto Jua qus fov Ju Jury Toe d 0 L Tes 0 Ww LO s f Ja fo 0 f f 0 Species xe SOs quus dE hae 0 a ES 55 0 n MP Y 0 AMP f 0 DPA _ DPA 0 fom a DPA 0 Energy Balances QAO RD SQ fehu fo EO S 0 where h T aT a T APT a T i H N NH H O PH AN DPA k 07 08 10 11 s07 H N NH and H O use gaseous enthalpy coefficients Overall PH AN and DPA use liquid enthalpy coefficients s08 all chemicals use gaseous enthalpy coefficients s10 all chemicals use gaseous enthalpy coefficients sll H N NH and H O use gaseous enthalpy coefficients PH AN and DPA use liquid enthalpy coefficients Heat Oz 100 7 U p p Ag i A Tj 0 ea Transfer AT hor Tog Fis fa In Ti h 15 7 15 133 Table 28 The Process Constraint Equations for the Heater E 101 Material Balances o A DPA Chast T T T i F do 5 F Sos p foo zi o f fa e ftm qa fma FPP 0 Overall Tm Sos fox 0 N3 2 09 08 0 fT E Sor 0 H O H O Species 2 fe 0 PH PH _ 09 Phi 0
89. d coeff1 1000000 f11nh3 hfnh3 sum coeff1 enth_gas nh3 coeff1 power T11 ord coeff1 power 536 67 0rd coeff1 1000000 f11h20 hfh20 sum coeffl enth gas h20 coeffl power T11 ord coeff1 power 536 67 dei rae t f11ph hfph sum coeff2 enth_liq ph coeff2 power T11 ord coeff2 power 536 67 ord coeff2 1000000 fllan hfant sum coeff2 enth_liq an coeff2 power T11 ord coeff2 power 536 67 ord coeff2 1000000 flldpa hfdpa sum coeff2 enth liq dpa coeff2 power T11l ord coeff2 pee 67 0201 1000000 e Economic Optimization Program 02 12 01 09 49 34 PAG 188 189 190 191 192 193 194 195 196 EQU 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 GAMS 2 50A Windows NT 95 98 EQU19 f12h2 f11h2 e 0 EQU20 f12n2 flln2 e 0 EQU21 f12nh3 fllnh3 e 0 EQU22 f12h20 fllh20 e 0 EQU23 f12ph fllph e 0 EQU24 f12an fllan e 0 EQU25 f12dpa flldpa e 0 EQU26 fCW2 fCW1 e 0 27 Q102 fCW2 hfh20 sum coeff2 enth liq h20 coeff2 power TCW2 ord coeff2 power 536 67 nee n E fCW1 hfh20 sum coeff2 enth liq h20 coeff2 power TCW1 ord coeff2 power 536 67 ord coeff2 1000000 e 0 EQU28 H12 H11 Q102 e 0 EQU29 TE102 T11 TCW2 T12 TCW1 log T11 TCW2 T12 TCW1 e 0 EQU30 Q102 areaE102 uE102 TE
90. dac bas uid tales a ge 1 A 1 Formulation of Constraints for Process Units 1 A 2 Classification of Variables and Determination Of Parameters aS amu u w u umuq im uie as 3 A 3 Flowsim Interface 3 B The On line Optimization Program 4 B 1 Combined Gross Error Detection and Data ReconeiatlI s n D a SS ipea eese NS 6 B 2 Simultaneous Data Reconciliation and Parameter SUITE u a tua vede o ua Rm Su st 6 B 3 Plant Economic Optimization 7 C The Chemical Reactor Analysis Program 7 D The Heat Exchanger Network Program 8 E The Pollution Index Program 11 E 1 Waste Reduction Aleorithm 11 E 2 The Environmental Impact Theory 11 E 3 Steps in Using the Pollution Index Program 14 F Windows Interface isis csiduasvaisasaseseeaavscadessebenetanvacaataoesnncoassnscageseeenes 16 GS Ure eere ui diem cH 17 Example Aniline Process Description 17 Process Model for the Aniline Process 20 A Heat Exchanger Network
91. del To sa tha average erthalpy costlicierts tor the aream cick the Calculate Averagas buton THEN wil calodete the averago contents bersd onthe costicients of the each of the components and their male factions For componen h Iba fa kwa nig enthalpy craffcserts vere found an fe aie J 7 2 2 0 000127 m 000000 ste 125247 Buhalpy a0 al T a2 TO a3 TY ad TN vo ibq kaykata y a Calcelate Averages Cancel Figure 72 The Enthalpy Coefficients for Ho To calculate the average enthalpy coefficients of the stream the stream composition and the enthalpy coefficients of the individual chemical components are needed The enthalpy coefficients of the chemical components were entered in the FlowSim program These can be viewed in the Enthalpy window of Figure 71 by simply clicking on the component name in the table Components present in this stream For example click on the first component Hh The bottom part of the window now shows the enthalpy coefficients for Fb This view is shown in Figure 72 Similarly the enthalpy coefficients for all the other components can be viewed The second column of the table Components present in this stream displays the molar flowrate or molar fraction of the component in the stream As explained before the average coefficients depend on the composition of the stream The composition can be specified either in terms of molar flowrates of all the components or their molar fractio
92. e Unit ID E 100 and description Cross heat exchanger With these two units the screen looks like in Figure 15 HA FlowSim C PROGRAM FILES ADVANCED PROCESS ANALYSIS SYSTEM temp Un Bifa Ed File Model Edit Options Help mlale sec lel 5 2 Unit ID Mi 102 Description and Recycle Mixed 4 necem EC Figure 14 The Unit Window 35 uS FlowSim C PROGRAM FILESXADVANCED PROCESS ANALYSIS SYSTEM temp Un Pd xi File Model Edi Options Help Figure 15 Flowsheet Screen with two Units Now let us add the stream that leaves the mixer and enters the cross heat exchanger To do this select the Add stream command from the Model menu The cursor changes to a small circle Position the cursor on the MIX 102 unit and drag the cursor to the E 100 unit The program now displays a small box shown in Figure 16 Let us enter the stream ID s07 and the description Mixed stream With units MIX 102 and E 100 and stream s07 the FlowSim screen looks as shown in Figure 17 In this way the entire process flow diagram for the sulfuric acid process can be drawn using the Model menu commands After drawing the complete diagram the FlowSim Screen Looks like as shown in Figure 18 a FlowSim C PROGRAM FILES ADVANCED PROCESS ANALYSIS SYSTEM temp Un _ ni xi Edit Options Help alSle reom 5 m Stream Figure 16 The Stream Window 36 LYSIS SYST Figure 17 FlowSim Screen with two
93. e Constraint Equations for the Product Column T 102 Material Balances JEO 4 FED 4 FO y fPD fN gomma FEP FAD L OP fy fPD p L f DPA 0 H O fi 010f40 2 z0 PH 0195f 5 0 XP _ Ogof L 0 XP 0005f 0 Species AM 0 92364 0 feP oo077fi 0 d m den M FO 0 046 f 2 fA 9954f P 0 Energy Balances h T aT T a T aT i H O PH AN DPA k 25 26 29 32 Enthalpy s25 all chemicals use liquid enthalpy coefficients Function s26 all chemicals use liquid enthalpy coefficients s29 all chemicals use liquid enthalpy coefficients s32 all chemicals use liquid enthalpy coefficients 141 Table 36 The Process Constraint Equations for the Three Phase Separator V 100 Material Balances for pur ou MB n uq UT pgs Overall H0 _ fn do H50 E n Species or ee Energy Balances 9 9 g 1 0 fin 21 dan _ 24 007 f M 0 0936 0 0 0 03 f P 097 f 0 030577 e 0 695 A 086f 01474 HO T APT AT AT aT i NH H O PH AN k 21 24 Function s21 all chemicals use liquid enthalpy coefficients Enthalpy s24 all chemicals use liquid enthalpy coefficients 142 Table 37 The Constraint Equations for the Mixer MIX 102 Material Balances 0 A A 3 Gu Por qoum qan qna OP nsi i a ES Ge fue Lo 5 tee Uu dan 0 Hj _ f 07 ig 20 Overall N3 g N3 07 16 E 0 NH3 NH3
94. e three distillation columns three of the five pumps the reactor the compressor the splitter and the three phase separator were identified as the important units to be included in the model whereas the two feed pumps were excluded from the model The process model diagram with these units and streams is shown in Figure 8 The complete list of the process units and process streams included in the model is given in Tables 1 and 2 Having selected the process units and streams the next step is to develop the constraint equations The constraint equations are entered in Flowsim using the format of the GAMS language They become the process model which is used to reconcile plant measurements estimate parameters optimize the profit and minimize emissions from the plant The constraint formulation techniques are very similar for process units of the same type Therefore this section is divided into four sub sections heat exchanger network reactors absorption towers and overall balance for the plant Each of these sub sections explains how constraints material and energy balances are written for that particular type of unit For each type detailed constraint equations are shown for a representative unit 20 3l P 103 14 17 P 102 21 T 100 V 100 12 CWS TES P 104 CW2 26 21 CW6 T 102 CW7 29 E 105 32 33 CWS Figure 8 The Process Model Diagram for Aniline Process 21 24 Table 1 Process Units for the Aniline Process
95. eam j a sum is taken over all the chemical species Knowing the input and output rate of impact from the equations I 5 and L6 the generation rate can be calculated using equation L4 Equations L5 and L6 need values of potential environmental impacts of chemical species The potential environmental impact of a chemical species P is calculated using the following expression Y L i 1 7 where the sum is taken over the categories of environmental impact is the relative weighting factor for impact of type 1 independent of chemical k Q ku is the potential environmental impact of chemical k for impact of type 1 Values of Q for a number of chemical species can be obtained from the report on environmental life cycle assessment of products Heijungs 1992 There are nine different categories of impact These can be subdivided into four physical potential impacts acidification greenhouse enhancement ozone depletion and photochemical oxidant formation three human toxicity effects air water and soil and two ecotoxicity effects aquatic and terrestrial The relative weighting factor allows the above expression for the impact to be customized to specific or local conditions The suggested procedure is to initially set values of all relative weighting factors to one and then allow the user to vary them according to local needs More information on impact types and choice of weighting factors can be obtained from the report on environme
96. ecommended because it has the highest priority Execution Errors The second type of error is an execution error Execution errors are usually caused by illegal arithmetic operations such as division by zero or taking the log of a negative number GAMS prints a message on the output file with the line number of the offending statement and continues execution A GAMS program should never abort with an unintelligible message from the computer s operating system if an invalid operation is attempted GAMS has rigorously defined an extended algebra that contains all operations including illegal ones The model library problem CRAZY contains all non standard operations and should be executed to study its exceptions GAMS arithmetic is defined over the closed interval INF INF and contains values EPS small but not zero NA not available and UNDF the result of an illegal operation The results of illegal operations are propagated through the entire system and can be displayed with standard display statements The model cannot be solved if errors have been detected previously 127 Solve Errors The last type of error is a solve error The execution of a solve statement can trigger additional errors called MATRIX errors which report on problems encountered during transformation of the model into a format required by the solver Problems are most often caused by illegal or inconsistent bounds or an extended range value being used as a matrix c
97. ed without a decimal point it is still stored as a real number In addition the system uses an extended range arithmetic that contains special symbols for infinity INF negative infinity INF undefined UNDP epsilon EPS and not available NA as shown in Table 17 One cannot enter UNDF it is only produced by an operation that does not have a proper result such as division by zero All other special symbols can be entered and used as if they were ordinary numbers Table 16 A List of Non alphanumeric Symbols for GAMS GAMS uses a small range of numbers to ensure that the system will behave in the same way on a wide variety of machines A general rule is to avoid using or creating numbers with 119 absolute values greater than 1 0e 20 A number up to 10 significant digits can be entered on all machines and some machines can even support more than that However if a number is too large it may be treated by the system as undefined UNDF and all values derived from it in a model may be unusable It is recommended to always use INF or INF explicitly for arbitrarily large numbers When an attempted arithmetic operation is illegal or has undefined results because of the value of arguments division by zero is the normal example an error is reported and the result is set to undefined UNDF Afterwards UNDF is treated as a proper data value and does not trigger any additional error messages Thus the system will not solve a model if a
98. een line represent a heat exchanger between the streams on which the two circles lie The network grid diagram offers a very convenient way of understanding the solution network Clicking on a unit in the diagram displays a small box which shows all the necessary information for that unit For example clicking on a green circle will display the relevant information for the heat exchanger that it represents This information includes the names of the hot and cold streams flowing through it the heat load of the exchanger and the area of the exchanger Clicking on a heater or a cooler will show the name of the stream flowing through it and its heat load Similarly clicking on a horizontal line will display the temperature mass flowrate and average heat capacity of that stream In Figure 85 the heat exchanger with index 1 has been selected by clicking and the box at the bottom right side is showing the information for that heat exchanger Information about the grid diagram can be obtained as online help by clicking the Help button in the menu bar at the top of the diagram Other buttons in the menu bar are to set the view and print options The Zoom button allows the user to change the zoom of the diagram The View button can be used to display the printer lines The Print button will open the printer dialog box and print the diagram to the selected printer Closing the window will take the user back to the Output Window 87 The Heat
99. eff2 power 536 67 0rd coeff2 1000000 e 0 367 EQUI53 f26h20 f25h20 e 0 368 EQU154 f26ph 0 195 f25ph e 0 369 EQUI55 f26an 0 923 f25an e 0 370 EQU156 f26 f26h20 f26ph f26an e 0 Economic Optimization Program 02 12 01 09 49 34 PAGE 9 GAMS 2 50A Windows NT 95 98 371 EQUI157 H26 f26h20 hfh20 sum coeff2 enth liq h20 coeff2 power T 26 ord coeff2 power 536 a 1 60el12 1 1000000 372 f26ph hfph sum coeff2 enth liq ph coeff2 power T26 ord coeff2 power 536 67 0rd coeff2 1 00 373 f26an hfan sum coeff2 enth_liq an coeff2 power T 26 ord coeff2 powarts36 67 ord cocft2 11 1000000 374 EQU158 f27h20 f26h20 e 0 375 EQU159 f27ph f26ph e 0 376 EQU160 f27an f26an e 0 377 EQU161 f27 f27h20 f27ph f27an e 0 378 EQU162 H27 f27h20 hfh20 sum coeff2 enth liq h20 coeff2 power T27 ord coeff2 power 536 67 oro tcoett2 1090000 379 f27ph hfph sum coeff2 enth liq ph coeff2 power T27 ord coeff2 power 536 67 ord coeff2 1000000 380 f27an hfan sum coeff2 enth lig an coeff2 power T27 ord coeff2 power 536 67 0rd coeff2 1000000 381 EQU163 f28h20 f27h20 e 0 382 EQU164 f28ph f27ph e 0 383 EQU165 f28an f27an e 0 384 EQU166 fCW6 fCW5 e 0 385 EQU167 Q104 FCW6 hfh20 sum coeff2 enth liq h20 coeff2 power TCW6 ord coeff2 power 536 67 0rd coeff2 1000000 386 Un prc CE enth liq h20 coeff2 power TCW5 ord coeff2 p
100. ency The execution frequency for optimization is the time between conducting on line optimization of the process and it has to be determined for each of the units in the process It depends on the settling time i e the time required for the units in the process to move from one set of steady state operating conditions to another This settling time can be estimated from the time constant determined by process step testing The time period between two on line optimization executions must be longer than the settling time to ensure that the units have returned to steady state operations before the optimization is conducted again This is illustrated in Figure 57 after Darby and White 1988 The figure shows that execution frequency for optimization in Figure 57 a was satisfactory for the process but the execution frequency in Figure 57 b was too rapid for the process In Figure 57 a the process has returned to steady state operations and held that position until the next optimization However in Figure 57 b the process did not have enough time to return to steady state operations before the optimization altered the operating conditions The process would continue on an unsteady state path and 67 operator intervention would be required The settling time for an ethylene plant is four hours according to Darby and White 1988 and this time for the sulfuric acid contact process is twelve hours according Hertwig 1997 optimization optimizati
101. ens h20 f09 h20 75 feed ph 1000 f09ph dens ph f09 ph e 76 feed an 1000 f09an dens an f09 an e 0 71 feed dpa 1000 f09dpa dens dpa f09 dpa e 0 EQU78 eff_h2 1000 f10h2 dens_h2 f10 h2 e 0 EQU79 eff_n2 1000 f10n2 dens_n2 f10 n2 e 0 EQU80 eff_nh3 1000 f10nh3 dens_nh3 f10 nh3 e 0 EQU81 f13h20 0 100 f12h20 e 0 EQU82 f13 f13h2 f13n2 f13nh3 f13h20 e 0 EQU83 H13 f13h2 hfh2 sum coeffl enth gas h2 coeff1 power T13 ord coeff1 power 536 67 ord coeff1 1000000 f13n2 hfn2 sum coeff1 enth_gas n2 coeffl power T13 ord coeff1 power 536 67 ord coeff1 1000000 f13nh3 hfnh3 sum coeff1 enth gas nh3 coeff1 power T13 ord coeff1 power 536 67 ord coeff1 1000000 f13h20 hfh20 sum coeff1 enth_gas h2o0 coeff1 power T13 ord coeff1 power 536 67 0rd coeff1 1000000 e 0 EQU84 f14h2 0 989 f13h2 e 0 EQU85 f14n2 0 989 f13n2 e 0 EQU86 f14nh3 0 989 f13nh3 e 0 EQU87 f14h20 0 989 f13h20 e 0 D 0 uA o 0 0 m o CC C CC CCC CC M AB Economic Optimization Program 02 12 01 09 49 34 PAGE 7 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 EQ 311 312 313 314 315 316 317 318 319 320 321 322 323 324 GAMS 2 50A Windows NT 95 98 EQU88 H14 0 989 H13 e 0 EQU89 T14 T13 e 0 EQU90
102. ent heavier than the heavy key will appear in the bottoms product Thus all of the phenol aniline and diphenylamine go to stream 18 As for the key components 99 9 of the ammonia and 10 of the water go to the distillate From the absorption column stream 13 goes to a splitter The splitter sends 98 996 of the stream to stream 14 which is the ammonia recycle stream Since the recycle stream is not at the same pressure as stream 3 it is passed through a compressor Stream 16 emerges at 170 F and 255 psia The splitter also sends 1 196 of stream 13 to the gaseous purge stream 17 The purge is necessary to avoid any pressure build up in the process Stream 17 is a non product stream but it is used as fuel for the heater The bottoms stream stream 18 is one of the feeds to the next column The second column in the purification section is the drying column T 101 The column has 25 stages and is fed at the top stage by streams 18 and 23 The pressure at the top of the column is 15 psia and the pressure at the bottom of the column stage is 21 25 psia The key components are water and phenol However some aniline is lost in the distillate because aniline is soluble in water The distillate contains 99 99 of the water 6 of the phenol and 5 of the aniline fed to the column streams 18 and 23 The distillate stream 19 is cooled by E 103 to a temperature of 110 F with a pressure of 10 psia Stream 20 is then sent to a three phase separator V
103. ents in enthalpy equations are constants The heat loss is 0 for this simulation The equations for the other heat exchangers are shown in Appendix A B Reactor System The reactor system in this plant includes a fixed bed catalytic reactor The following describes the constraint equations for reactor When a chemical reaction is involved in the process it is convenient to use the mole balance to describe relationship of input and output flow rates of a unit for each component Also the overall mole balance is obtained from the component mole balances i e the summation of component mole balances gives the overall mole balance The aniline process involves three reactions i e The formation aniline the formation of diphenylamine and the the decomposition of ammonia Mole balances are used to describe the material balances of the units in the process i e all material balance equations for the aniline process are written with mole balance relations Moles are conserved when there is no reaction and the change in the number of moles for a component is determined by the reaction rate and stoichiometric coefficients when there are reactions 26 Table 4 Enthalpy Coefficients for Gases and Liquids Gases al a2 a3 a4 ar O Liquids As shown in Figure 8 the input to the reactor is a stream s09 mixed with all the components at the design operating temperature 710 F and pressure 245 psia One molecule phenol reacts with one
104. ents shown in equation list of the GAMS output file so that all coefficients will be in the range of 0 01 to 100 after scaling The column variables and equation lists are very important for nonlinear problems when scaling the variables and equations It provides initial values of all variables and linearized constraint coefficients which can be used to determine the scale factors for both variables and equations It is suggested that the user turn off the scaling option for both variables and equations before GAMS is initiated 125 Table 25 A List of Functions Predefined in the On line Optimization System Function Description Classification Exogenous Endogenous Classification mol type Arctan Ceil Cos Errorf Exp Floor Log Log10 Mapval Max Min Mod Normal Power Round Sign Sin Sqr Sqrt Absolute value Arctangent Ceiling Cosine Error function Exponential Floor Natural log Common log Mapping function Largest value Smallest value Remainder Normal random Integer power Rounding Sign Sine Square Square root Truncation Uniform random Non smooth Smooth Smooth Discontinuous Smooth Smooth Discontinuous Smooth Smooth Discontinuous Non smooth Non smooth Discontinuous Illegal Smooth Discontinuous Discontinuous Smooth Smooth Smooth Discontinuous Illegal NLP Illegal Illegal DNLP DNLP Illegal Illegal NLP Illegal Illegal Illegal Illegal After the program end
105. ere are some reserved words and non alphanumeric symbols with predefined meanings in GAMS which can not be used in input information The reserved words and non alphanumeric symbols are listed in Table 15 and Table 16 respectively Table 14 A List of Full Set of Legal Characters for GAMS alphabet alphabet Numerals ampersand double quote pound sign asterisk equals question mark at greater than semicolon back slash less than single quote Colon minus slash comma parenthesis space Dollar square brackets underscore Dot braces exclamation mark Plus percent circumflex 118 abort acronym acronyms alias all and assign binary card display eps eq equation equations Table 15 A List of All Reserved Words for GAMS ge gt inf integer le loop It maximizing minimizing model models na ne Negative Not Option Options Or Ord Parameter Parameters Positive Prod Scalar Scalars Set Sets Smax smin sos sos2 sum system table using variable variables xor yes repeat until while if then else semicont semiint file files putpage puttl free no solve for In the on line optimization system numeric values are entered in a style similar to that used in other computer languages Blanks cannot be used in a number because the system treats a blank as a separator The common distinction between real and integer data types does not exist If a number is enter
106. ergy flows but is not equivalent to them The conservation equation can be written as dl dt where Z is the potential environmental impact content inside the process I is the input rate of L ku Pm I 3 impact 7 is the output rate of impact and I 1 the rate of impact generation inside the out process by chemical reactions or other means At steady state equation I 3 reduces to 11 O L La t To 1 4 Application of this equation to chemical processes requires an expression that relates the conceptual impact quantity to measurable quantities The input rate of impact can be written as iLi E uE as J j k L5 where the subscript in stands for input streams The sum over j is taken over all the input streams For each input stream j a sum is taken over all the chemical species present in that stream Mj is the mass flow rate of the stream J and the xk is the mass fraction of chemical k in that stream Qx is the characteristic potential impact of chemical k The output streams are further divided into two different types Product and Non product All non product streams are considered as pollutants with positive potential impact and all product streams are considered to have zero potential impact The output rate of impact can be written as i b MU a 1 6 j j k where the subscript out stands for non product streams The sum over j is taken over all the non product streams For each str
107. esses Ph D Dissertation Louisiana State University Baton Rouge LA Darby M L and D C White 1988 On Line Optimization of Complex Process Units Chemical Engineering Progress Vol 84 No 8 p 51 59 Felder R M and R W Rousseau 1986 Elementary Principles of Chemical Engineering Second Ed John Wiley and Sons New Year p 423 Harris J L and J R Norman 1972 Temperature Dependent Kinetic Equation for Catalytic Oxidation of Sulfur Dioxide nd Eng Chem Process Des Develop Vol 11 p 564 Heijungs R Final Ed Guinee J B Huppes G Lankreijer R M Udo de Haes H A and Wegener S A 1992 Environmental Life Cycle Assessment of Products Guide October 1992 Center of Environmental Science Leiden Hertwig T 1997 Private Communication Hilaly A K and Sikdar S K 1994 Pollution Balance A New Methodology for Minimizing Waste Production in Manufacturing Processes J Air and Waste Manage Assoc Vol 44 p 1303 1308 Kelly D N F C Fatora and S L Davenport 1996 Implementation of a Closed Loop Real Time Optimization System on a Large Scale Ethylene Plant Private Communication Knopf F C Pethe Singh Bhargava and Dhooper 1989 THEN User s Manual McBride B J S Gordon and M A Reno 1993 Coefficients for Calculating Thermodynamic and Transport Properties of Individual Species NASA Technical Memorandum 4513 130 Appendix A CONSTRAINT EQUATION
108. f14 f14h2 f14n2 f14nh3 f14h20 e 0 EQU91 f16h2 f14h2 e 0 EQU92 f16n2 f14n2 e 0 EQU93 f16nh3 fl4nh3 e 0 EQU94 f16h20 f14h20 e 0 EQU95 f16 f16h2 f16n2 f16nh3 f16h20 e 0 EQU96 H16 f16h2 hfh2 sum coeffl enth gas h2 coeff1 power T16 ord coeff1 power 536 67 ord coeff1 1000000 f16n2 hfn2 sum coeff1 enth gas n2 coeff1 power T16 ord coeff1 power 536 67 0rd coeff1 1000000 f16nh3 hfnh3 sum coeff1 enth_gas nh3 coeff1 power T16 ord coeff1 power 536 67 0rd coeff1 1000000 f16h20 hfh20 sum coeffl enth gas h20 coeff1 power T16 ord coeff1 power 536 67 0rd coeff1 1000000 e 0 EQU97 f17h2 0 011 f13h2 e 0 EQU98 f17n2 0 011 f13n2 e 0 EQU99 f17nh3 0 011 f13nh3 e 0 EQU100 f17h20 0 011 f13h20 e 0 EQU101 H17 0 011 H13 e 0 EQU102 T17 T13 e 0 EQU103 f17 f17h2 f17n2 f17nh3 f17h20 e 0 EQU104 f18nh3 0 0001 f12nh3 e 0 EQU105 f18h20 0 900 f12h20 e 0 EQU106 f18ph fl2ph e 0 EQU107 f18an f12an e 0 f f EQU108 f18dpa f12dpa e 0 EQU109 f18 Hignh34f18h204f18ph f18an f18dpa e 0 EQU110 H18 f18nh3 hfnh3 sum coeff2 enth_liq nh3 coeff2 power T18 ord coeff2 power 536 67 0rd coeff2 1000000 f18h20 hfh20 sum coeff2 enth lig h20 coeff2 power T18 ord coeff2 power 536 67 Mies MR 000000 f18ph hfph sum coeff2 enth liq ph coeff2 power T18 ord coeff2 power 536 67 ord
109. feed ph H03 H04 R07 H08 H09 H10 H11 H12 H13 H14 H16 H17 H18 H19 H20 H21 H23 H24 H25 H26 H27 H28 H29 H31 H32 H33 profit Q100 Q101 Q102 Q103 Q104 Q105 TE100 TE102 TE103 TE104 TE105 The following are the Parameters in the Model SCALARS convi 0 94948 conv2 0 001 uE100 51 89313 uE102 54 77626 uE103 71 41481 uE104 71 78423 uE105 80 78474 Economic Optimization Program 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 145 146 148 149 150 151 153 154 155 Economic Optimization Program VARIABLES ObjVar Objective function using algorithm SETS coeffl al a2 a3 a4 comp h2 n2 nh3 h20 ph an dpa 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 coeff2 al a2 a3 a4 comp2 nh3 h2o ph an dpa TABLE enth gas compi coeff1 E T a h2 6 7762 1 2745E 04 3 1784E 08 1 2545E 11 n2 6 9872 1 9897E 04 2 2049E 07 3 4903E 11 nh3 6 5140 1 7334E 03 2 4376E 07 6 9535E 11 h20 7 8055 4 7750E 05 3 4883E 07 5 0150E 11 ph 3 4274 3 1755E 02 7 2633E 06 6 7130E 10 an 2 8491 3 3895E 02 8 0960E 06 8 1465E 10 dpa 19 242 7 0815E 02 1 8014E 06 1 9146E 09 TABLE enth lig comp2 coeff2 al a2 a3 a4 nh3 43 507 2 2304E 01 3 5380E 04 2 0857E 07 h20
110. h sum coeff2 enth_liq ph coeff2 power T32 ord coeff2 power 536 67 ord coeff2 1000000 410 f32an hfan sum coeff2 enth_lig an coeff2 power T32 ord coeff2 power 536 67 0rd coeff2 1000000 152 411 412 413 414 415 416 f32dpa hfdpa sum coeff2 enth lig dpa coeff2 power T32 ord coeff2 power 536 67 0rd coeff2 1000000 EQU187 f33ph f32ph e 0 EQU188 f33an f32an e 0 EQU189 f33dpa f32dpa e 0 EQU190 fCW8 fCW7 e 0 EQU191 Q105 fCW8 hfh20 sum coeff2 enth_liq h20 coeff2 power TCW8 ord coeff2 power 536 67 ord coeff2 1000000 10 Economic Optimization Program 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 INE 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 02 12 01 09 49 34 PAGE GAMS 2 50A Windows NT 95 98 Mood ee onsen ee ey coeff2 power TCW7 ord coeff2 power 536 67 0rd coeff2 1000000 e EQU192 H33 H EQU193 EQU194 Q105 areaE105 uE105 TE105 1000000 e 0 EQU195 f33 f33ph f33an f33dpa e 0 EQU196 EQU197 EQU198 32 Q105 e eff h20 1000 flO0h20 dens h20 fl0 h20 e 0 eff ph 1000 flOph dens ph flO ph e 0 EQU199 eff an 1000 fl0an dens an fl0 an e 0 EQU200 eff dpa 1000 f10dpa dens dpa flO dpa e 0 INEQUI f07nh3 f07ph g 15 INEQU2 T10 T0
111. hanger as an example of process constraint equations for all heat exchanger units The first two rows of the Table 3 under material balance give the overall mass balance and all of the species mass balances The overall mass balance is the summation of all species mass balances Therefore if all of the species mass balances are used to describe the process then the overall mass balance does not need to be included since it is redundant The species mass balances are used to describe the relationship of the input and output flow rate variables 24 Table 3 The Constraint Equations for the Cross Heat Exchanger E 100 Material Balances fus fae fu SAO f fea fup foe fa fo T fo T Jo f fo 0 Overall f fE 209 fA Pm f f 2 fio fast fame fa t fa ft fi Hy _ p Ob _ Hy _ Hy _ 08 07 0 10 0 11 X E 0 Jd qM 20 ie egere HS f 0 10 H0 _ g H50 _ H0 _ g H 0 _ Species si emu O hig re O PH PH _ un PH _ 08 S07 _ 0 fu AN f AN _ AN FAN 08 0T Lu 0 m 10 0 A A A A i Ja F as 0 fn _ 2 0 Energy Balances loss OLOR 25 Ox l Figa amp j i re s f Fight Sj I Poh KON Overall where i EA E l i l i l i h nb R a Tea Te T7 Tea T 90 Sb i SO SO O2 N3 k 13 14 19 20 Heat Transfer h Poh hay Fio io its U 6666 T 0 25 In the constraints of Table 3 f denotes the compo
112. he approximate expected values for some of the variables in the model are not available these values can be found in the column list of the corresponding GAMS output file The scale factor will not change the values of variables in the solution seen by users GAMS uses the scale factor to scale variables and transfer the model into a well scaled model for optimization algorithm When the optimal solution is found GAMS will rescale the variables and transfer them back to user s notation The effect of scal ing can only be viewed in the Column and Equation lists of the GAMS output files The scale factor for an equation is dependent on the order of magnitude of the equation coefficients It is slightly different from the determination of scale factor for a variable that 1s dependent on the magnitude of the variable An equation usually contains several terms and it has several coefficients that may not be in the same order If the equation is linear the coefficients of this equation is known If the equation is nonlinear then the equation is linearized first using the initial values However the linearized coefficients must be obtained from the equation list Users can obtain the values of the linearized equation coefficients for nonlinear constraints from the equation list of the corresponding GAMS output file To appropriately assign the scale factor for an equation users need to carefully select the value of the scale factor based on the coeffici
113. he enthalpy coefficients of the individual components the average enthalpy coefficients for the stream can be calculated Click the Calculate Averages button at the bottom of the window The program now calculates the average enthalpy coefficients for stream s07 and displays them in the bottom left part of the screen Also the OK button at the bottom of the window now becomes visible This view is shown in Figure 74 If you want to accept the average coefficient values calculated by the program click OK If the values do not appear to be in the expected range and are not acceptable click the Cancel button For the stream s07 we will accept the calculated values and click the OK button The screen view now goes back to the Retrieving stream data window shown in Figure 69 The fields for the average coefficients at the bottom of this window are now filled with the values calculated by the program This view is shown in Figure 75 Now the temperature flowrate and enthalpy coefficients data for stream s07 have been entered and can be seen in the Figure 75 The final piece of information is the film heat transfer coefficient value For the aniline model an average film coefficient value of 51 9 Btu ft F hr is estimated for all the process streams by the on line optimization program Change the default value of 100 to 51 9 as the film coefficient for stream s07 This completes the data retrieval for stream s07 This pro
114. he Pinch Analysis and Reactor Analysis parts of the Advanced Process Analysis program also utilize the coefficients from the Enthalpy table It is recommended that separate tables be used for different phases of the same component 47 w Enthalpy tables Figure 29 Enthalpy Window mw Enthalpy Table enthgas Figure 30 Edit Enthalpy Table Window Let us create a new enthalpy table for the Aniline model Click on the Enthalpies option in the model menu to open the Enthalpy Tables window which is shown in Figure 31 Then click on the Add New button in the Enthalpy Tables window to activate the window As soon as Add New button is clicked the caption of the Add New button changes to Save and that of Delete changes to Cancel Then the general information of a table the name of the enthalpy table the description of the enthalpy table the row name and the column name must be entered After entering the table information the Save button should be clicked to save the changes To enter data in an enthalpy table click on the Edit button The Edit Table window is opened to enter names and numerical values for the constant coefficients The edit table window for the table enthgas is shown in Figure 30 Clicking the Close button will update the table and close the Edit table window An existing table can be edited or deleted by selecting the table and then clicking Edit
115. he components of the stream s03 have been entered and the 95 composition of stream s03 is now completely specified The stream type of stream s03 is input as entered by the user The screen view now is shown in Figure 86 The above changes made to the composition data for stream s03 need to be updated Click on the Update Stream Information button to save the changes Repeat the same procedure for all the other streams in the Stream List table Click on each stream in the table Enter the component names and retrieve their flowrates from the Variables table If you do not see the required variable in the table choose the all data option For the output streams change the default type from product to non product wherever necessary In the aniline process the stream s17 the gaseous purge and the stream s24 the water product and the streams CW2 CW4 CW6 and CWS the cooling water products are the non product streams For each stream after the changes are done click the Update Stream Information button When the composition information for all the streams in the Stream List table has been entered click the Proceed button The Components window is now displayed on the screen This is shown in Figure 87 This window is used to enter the specific environmental impact potentials of the various components in the process As discussed in Section I there are nine categories of environmental
116. he process streams are represented as lines with arrows between these units Each process unit and stream included in the flowsheet must have a name and a description Process information is divided into the following six categories equality constraints inequality constraints unmeasured variables measured variables parameters and constants The information in the first five categories is further classified by associating it with either a unit or a stream in the flowsheet For example for a unit that is a heat exchanger the relevant information includes the mass balance and heat transfer equations limitations on the flowrates and temperatures if any the heat transfer coefficient parameter and all the intermediate variables defined for that exchanger For a stream the information includes its temperature pressure total flowrate molar flowrates of individual components etc Also information not linked to any one unit or stream is called the Global Data For example the overall daily profit of the process is a global unmeasured variable The sixth category of constants can be grouped into different sets based on their physical significance For example constants related to heat exchangers can be placed in one group and those related to reactors into another group Flowsim also has a seventh category of information called as the enthalpy coefficients This stores the list of all the chemical components in the process and thei
117. he stream s07 in the list on the left side of the screen On the right side of the screen the stream name and stream description labels now show s07 and Mixed stream respectively As can be seen in Figure 68 the temperatures and flowrate values for stream s07 have been automatically retrieved and displayed The heat capacity and film coefficient values are initialized to the defaults which are 0 and 100 respectively The enthalpy data for any stream can be entered as either constant heat capacity coefficients or temperature dependent enthalpy coefficients The variation in temperature is large for the streams in the aniline model So the temperature dependent enthalpy coefficients are used for all the streams To enter these coefficients for stream s07 select the Enthalpy coefficients option Once this option is selected the button for modifying enthalpy data becomes enabled and a small frame for the average enthalpy coefficients of stream s07 can now be seen This view is shown in Figure 69 The frame also shows the enthalpy formula used in the program The Meat Exchanger Network Progean LL EL tj SAVE S CAO HELP ABOUT EMT al x Steam Nome 507 Stream Desonpton Mixed stream Steams Gre heal integuation modal Tenceyun toe 87171 Fiva ste 4240 20404 10 Han Coast H Him Con cent usai Toe h shean uam Wem 4240 35454 f Caoraten Neat Capelle Seach vx 7 Entra comiticterts C d
118. iability currentness or otherwise The entire risk as to the results and performance of the MPRI software is assumed by you In no event will MPRI its director officers employees or agents be liable to you for any consequential incidental or indirect damages including damage for loss of business profits business interruption loss of business information and the like arising out of the use or inability to use the MPRI software even if MPRI has been advised of the possibility of such damages I INTRODUCTION AND METHODOLOGY The Advanced Process Analysis System is a powerful tool for use by process and plant engineers to perform comprehensive and in depth evaluations of economic environmental safety and hazard analysis projects This system is based on chemical engineering fundamentals such as stoichiometry thermodynamics fluid dynamics heat transfer mass transfer reactor design and optimization It helps identify pollutants in chemical processes and petroleum refineries and develop innovative economically viable designs to eliminate their generation It aims at waste minimization and pollution prevention in chemical plants in addition to increased profit and improved efficiency of operations The framework of the Advanced Process Analysis System is shown in Figure 1 The main components of this system are a flowsheeting program for process material and energy balances an on line optimization program a chemical reactor analysis prog
119. ibuted Control System Each of the above three optimization problems in on line optimization has a similar mathematical statement as following Optimize Objective function Subject to Constraints from plant model where the objective function is a joint distribution function for data validation or parameter estimation and a profit function economic model for plant economic optimization The constraint equations describe the relationship among variables and parameters in the process and they are material and energy balances chemical reaction rates thermodynamic equilibrium relations and others SEIS plant measurements controllers Distributed Control System sampled plant data f Gross Error optimal setpoint Detection operating targets and conditions Data Reconcilation reconciled data plant model parameters Plant Model Parameter Estimation Optimization Algorithm Economic Model Plant Model economic model parameters Figure 3 Simplified Structure of Online Optimization To perform data reconciliation there has to be more measurements than necessary to be able to rectify errors in instruments For redundancy the number of measurements to determine the unmeasured variables is given by the degree of freedom which is calculated using the following equation Degree of freedom Total number of variables Total number of equality constraints Number of chemical reactions Also the unmeasu
120. ilable an alternative solution is to use the combined gross error detection and data reconciliation step of on line optimization to check the model validity The plant operating data obtained from the distributed control system can be used for this purpose The reconciled data obtained is compared with the plant data and if the values agree within the accuracy of the data the model is an accurate description of the actual process For the aniline process this strategy is used to validate the model The combined gross error detection and data reconciliation is the first step of on line optimization and will be explained in the next section The next step of the Advanced Process Analysis System is on line optimization The On line Optimization button in Figure 9 should be now clicked to open the On line Optimization program 51 VI USING ONLINE OPTIMIZATION PROGRAM Upon clicking the On line Optimization button the On line Optimization main window is displayed with the Optimization Algorithm window as shown in Figure 35 This window includes the algorithms for Data Validation and Parameter Estimation the Objective function for Economic Optimization the Optimization direction and the Economic Model type The default options are Tjoa Biegler s method for data validation and Least Squares method for Parameter Estimation In the Economic Optimization for the aniline process the objective function is profit as defined in Section V for
121. impacts The specific environmental impact potential values have to be entered for each component for each of the nine types of impact Figure 86 The Composition Data for Stream S03 96 D TIT Index Progiam Compenents Relative Weeghtng Fectors AWE et T RWF Ck 1 E coterocty Ella ctvcasabc 1 Specific Environmental Impact Potentials SE P sutra Human Towk y Erlectt a 1 For Component an Ecotoscay Elects ici Ecoecty Elect Tenet _ Calculate Indices Greerhoute Enhancenernt Hunn Tomy Efsti o Back to Stream Data Hune Toeic y Effect od Hanan Testy Efedi abe Figure 87 The Components Window The Choose Component table gives a list of all the components present in the input and output streams of the model The impact potentials values for the components of the aniline process were obtained from the report on environmental life cycle assessment of products Heijungs 1992 published by the EPA The chemicals with non zero environmental impact potentials aniline phenol ammonia and diphenylamine for the aniline process are shown in Table 7 Hb No and H2O have zero environmental impact potentials for all categories Since the default values of all impact potentials in the program are zero the values for NH3 phenol aniline and diphenylamine need to be changed Scroll down in the component list and select NHs Now click on the S E I P specific environmental impact potentials col
122. in Figure 67 is displayed A stream name and a description must be entered Clicking the OK button will add the stream to the list For the aniline model we do not want to add any streams So click the Cancel button to go back to the Stream List window Having selected all the important streams in the Stream List window click the OK button to continue The next window displayed on the screen is the Retrieving Stream Data window shown in Figure 68 A vertical line divides this window into two parts The left side of the screen displays a list This list contains all the streams which were selected earlier in the Stream List window As can be seen from Figure 68 the four streams that were chosen as the important streams are present in the list 76 The heat exchanger network program needs certain information for each stream in order to apply pinch analysis This information includes temperature flowrate enthalpies and film heat transfer coefficient The values of all of these variables have to be retrieved for each of the selected streams The values for temperature and flowrate are automatically retrieved by the program from the results of economic optimization carried out earlier through the Advanced Process Analysis System The values for enthalpies and film heat transfer coefficients have to be entered by the user To understand how the data is retrieved let us enter the data for the stream s07 Click on t
123. ing the Time Series Graphs of the Data program On this diagram the Save Steady State Data button is clicked and the program has the user designate the time interval of the data which is saved to the third spreadsheet a single column of data that is not shown here as a figure The user is now ready to transfer this steady state data to the on line optimization program Return to the Declaration Window for Measured Variables which is shown in Figure 39 and pull down the File menu This is shown in Figure 61 and then select Import Plant Data This action brings up the window shown in Figure 62 and in this window the name of the Excel file is designated which contains the steady state plant data that was selected with the Excel time series program Clicking the Open button will replace the plant data currently in the program Now having the new data in place the on line optimization program can be executed to generate the new set of optimal points for the distributed control system The execution of the on line optimization program generates the set points for the distributed control system These values can be exported from the on line optimization program using the same procedure as importing data The file menu in these windows has a line Export Plant Data which when clicked gives a screen similar to the one in Figure 63 to specify the Excel file to transfer this data The on line optimization program requires the standard deviation of the measu
124. ions for all components are given in Appendix A The reactor in the aniline plant is an adiabatic plug flow reactor that converts phenol and ammonia to aniline and water in an exothermic chemical reaction Along with this reaction there are two side reactions that occur in the reactor The kinetic model for the aniline reaction was formulated by using data from patents and making a pseudo first order assumption for the formation of aniline Below are the kinetic equations for the process where the constants have units consistent with the units in the Reactor Analysis program r 0 0191887 c r 29 69127E 05 c III 10 r 2 4E14 exp 59784 T Cyu 28 Table 5 The Process Constraint Equations for the Reactor CRV 100 Material Balances foo T fo 4 oa fno ym quu y faz fog Toa LA n Jona fo n fe Fae feedconc gt feed i effconc gt eff _ i H N NH H O PH AN DPA fS f 15 conv2 f O9 0 it fis 05 conv2 f 0 f 1 conv2 fo 0995 conyl f 0 fic AIL cap E RU e 07 1 conv fo 20 CAN u 0 99 conv1 fF DPA fy fs 005 convl e 1000 density off _iz density fo MW fi MW i H N NH H O PH AN DPA Species feed i Energy Balances Overall L fy ho E fa hy Ors 0 h T aT aT a T y aT Enthalpy M N NH H O PH AN DPA k 10 11 Function s09 all chemicals use gaseous enthalpy coefficients s10 all
125. ization Close Previous Result Figure 47 Model Execution Summary Window 2 GMSCO_NX OF x C Program Files Advanced Process Analysis System Gams25 gt gams exe do_data save p ut_data pagesize 50 GAMS 2 508 Copyright CC 1987 1999 GAMS Development All rights reserved Licensee Ralph W Pike 6990726 1450AP WIN Louisiana State University Department of Chemical Engineering Starting compilation DO_DATAC 684 1 Mb Starting execution DO_DATAC682 1 Mb Generating model ANILINE DO_DATAC683 2 Mb 201 rows 231 columns and 696 non zeroes Executing CONOPT CO O HO P T Wintel version 2 042F 003 035 Copyright CC ARKI Consulting and Development A S Bagsvaerdvej 246 A DK 2880 Bagsvaerd Denmark Using default control program Reading data Figure 48 GAMS Program Execution Window 61 Bi Output LL IBEX File View z m m exe me un se m Economic Objective 1402 27634 Figure 49 Final Report in the Output Window After the three programs have been executed three detailed GAMS output files will be generated by GAMS for the three optimization problems These files give detailed solutions of the optimization problems for Data Validation Parameter Estimation and Economic Optimization Also a final report is generated by the Interactive On line Optimization system In the final report the estimated values of the parameters the reconciled values of process variables the op
126. k on the add button on the Unit Data window Enter the equation in the box provided and click Update Note the use of e in place of as required by the GAMS programming language The screen now looks as shown in Figure 24 a Let us enter the heat transfer equation for the cross heat exchanger This equation is also given in Section XII The Equality constraints tab in the Unit Data window for the cross heat exchanger with this equation is shown in Figure 24 b 42 ig Unit Data lel XI Unit ID E 1 00 Measured Vars Unmeasured Vars Plant Params Equalities Inequalities Equality Constraints 10100 areaE 100 uE100 TE100 1000000 e 0 E Scaling Factor 14 4 Equality Constraints 8 of 17 gt gt il GoTo Record Close Help Required Figure 24 a Equality Constraints Tab in the Unit Data Window ig Unit Data Iof XI Unit ID E 1 00 Equality Constraints 19100 H10 H11 e x Scaling Factor M Equality Constraints 10 of 17 b ni Close Help Go To Record Required Figure 24 b Equality Constraints Tab in the Unit Data Window 43 iw Unit Data Iof x Unit ID E 1 00 Plant Parameter po Initial Point 33 Lower Bound D Upper Bound ho Unit pwr zhrR Description E 100 Overall Heat Transfer Coefficient KIKI Plant Parameters 1 of 1 gt ni Go To
127. les which follow on the next two pages The heater summary above the pinch shows that we need one heater in the system The heating load for the heater on the stream s07 is 2 8 MMBtu hr Stream s07 enters the heater at 1125 R and leaves at 1185 R 90 The heat exchanger summary below the pinch shows that there should be one heat exchanger between streams s07 and s10 For exchanger 1 the heat transfer rate will be 23 0 MMBtu hr Also it gives the inlet and outlet temperatures for both the streams Note that the area of the heat exchanger 11810 820 ft has been calculated using the film heat transfer coefficient supplied in the data Next comes the cooler summary below the pinch It shows that we need one cooler in the system The cooling load for the cooler on the stream s10 is 4 6 MMBtu hr Stream s10 enters the cooler at 700 5 R and leaves at 600 R Next comes the information about the loops identified in the network A loop is any path in the heat exchanger network that starts at some point and returns to the same point For the aniline process there are no loops in the network Finally the last two lines of output give the minimum hot and cold utilities needed for this process Thus for the aniline process 3044976 Btu hr of heat needs to be added by use of an external hot utility Similarly 4903696 Btu hr of heat needs to be removed by use of an external cold utility Note that just above the printout of the solution array
128. ll the parameters entered in the Unit and the Global Data window of the FlowSim program The Plant Parameters window is shown in Figure 41 Then proceed to the Equality Constraints window This window has four columns for displaying the constraints scaling factor process unitID and stream number All of the equality constraints entered in the FlowSim program are listed in this window The Equality Constraints window is shown in Figure 42 The next step is the Inequality Constraints window which is similar to the Equality Constraints window The Inequality Constraints window has three columns for displaying the constraints process unitID and stream number Scaling factors are not available for inequality constraints 56 Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste M Eg H File View Help 8 x fel gt ue oa pt amp 2 Equality Constraints Inequality Constraints Optimization Algorithms Constant Properties Model Description Tables Measured Variables Unmeasured Variables Plant Parameters Plant Parameters a er Pts a T Plant_Parameter Initial Point Process LlnitlD Btu ft 2 hrR Bf 2hrRo Btu ft 2 hrR Btu ft 2 hr R Btu ft 2 hr R Figure 41 Plant Parameters Window Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste Mi Eg JHI File View Help x Ri gt
129. lt in functions are listed in Table 25 E 4 Scaling Option for Variables and Equations To facilitate the translation between a natural model no scaling to a well scaled model GAMS introduces the concept of a scale factor for variables and equations with a scaling option 124 This feature is incorporated in the interactive on line optimization system to provide a well scaled optimization problem for GAMS to solve To use the scaling option in the interactive on line optimization the user must highlight the scaling option in the variable declaration and the equations declaration windows Then the user must enter the values of the scale factors for the variables and equations that need to be scaled The following describes how the scale factor is incorporated in the GAMS program and how to determine the value of a scale factor The scale factor on a variable V is used to relate the variable as seen by user in natural model V to the variable as seen by the optimization algorithm in well scaled model V as follows vi V V This means that the scaled variable V will become around 1 if the scale factor V is chosen to represent the order of magnitude of the user variable V If the approximate expected value for a variable in the model is known then the magnitude of this variable value is used as the scale factor of the variable The scale factor can be specified by users through the Measured or Unmeasured Variables window If t
130. lutant streams whereas all product streams are considered to have zero environmental impact Pollution index of a stream is a function of its composition The composition data for the streams is retrieved from the results of on line optimization performed earlier This can be either in terms of the molar flowrates or fractions Additional data such as the specific environmental impact potential values for the chemical species is available in the report on environmental life cycle assessment of products The last piece of information required is the relative weighting factors for the process plant These values depend on the location of the plant and its surrounding conditions For example the weighting factor for photochemical oxidation is higher in areas that suffer from smog Having finished all of the above prerequisite steps the pollution index program is now called to perform the analysis Mass balance constraints are solved for the process streams involved and the equations of the Environmental Impact Theory are used to calculate the pollution index values The pollution indices of the six types discussed earlier are reported for the process Three of these are based on internal environmental efficiency whereas the other three are based on external environmental efficiency Higher the values of these indices higher the environmental impact of the process The pollution index program also calculates pollution indices for each of the individu
131. mation of a particular kind e g a table Stream Data can have a field called Temperature which stores all the stream temperatures Another table can have a field called Prices which has the prices of all the reactants and products Each Record is a data entry which fills all the fields of a table So the Stream Data table in the above example can have a record for stream S1 which has values for temperatures pressure flowrates etc entered in the respective fields Microsoft Access is an interactive database system Using Access you can store data in tables according to the subject This makes tracking of data very efficient Also you can specify relationships between different tables Consequently it is easy to bring together information related to various topics Microsoft Access takes full advantage of the graphical power of windows Also it is fully compatible with Microsoft s Visual Basic and Microsoft Excel which is a significant advantage for this application 16 G Summary The Advanced Process Analysis System offers a combination of powerful process design and modification tools The Visual Basic interface integrates all of these into one system and makes the application very user friendly The best way to understand the application of the Advanced Process Analysis System is to apply it to a relatively simple plant The simulation of the aniline process has been selected as the example process This process incorpor
132. menu which is also shown in Figure 93 Let us choose Plug Flow as the type of reactor Let us proceed to enter the global options Click on the Global Options icon in the main window to open the Global Options window which is show in Figure 94 Let us enter the number of reactions to be 3 the number of species to be 7 the inlet temperature needs to be 725 and the inlet pressure to be 245 102 w GLOBAL OPTIONS Number of Reactions Total No of Species in Reaction Mixture Inlet Temperature F nlet Pressure Psia Total No of Increment NON ISOTHERN Figure 94 Global Options Window Choose the Energy Model to be Non Isothermal from the list Let the Total Number of Increments be 50 Click on the Close button to close this window and return to the main window Let us proceed to the Reactant Properties step Click on the Reactants icon on the toolbar of the main window to open the Reactant Properties window which is shown in Figure 95 There are seven components in the reacting gases of CRV 100 These are hydrogen nitrogen ammonia water phenol aniline and diphenylamine These components with their molecular weights and heat capacity coefficients are automatically retrieved from FlowSim The table Variables on the right hand side shows the list of all the measured and unmeasured variables in the aniline model The value corresponding to the selected variable is shown below the table
133. model status describes the characteristics of the accompanying solution This means that the solver was interrupted because it used too many iterations Use option iterlim to increase the iteration limit if everything seems normal This means that the solver was interrupted because it used too much time Use option reslim to increase the time limit if everything seems normal This means that the solver encountered difficulty and was unable to continue More detail will appear following the message Too many evaluations of nonlinear terms at undefined values You should use bounds to prevent forbidden operations such as division by zero The rows in which the errors occur are listed just before the solution All these messages announce some sort of unanticipated failure of GAMS a solver or between the two Check the output thoroughly for hints as to what might have gone wrong 116 Table 12 A List of Solution Listing Types Heading in listing file Description LOWER Lower Bound 1o LEVEL Level Value 1 UPPER Upper Bound up MARGINAL Marginal m Table 13 A List of Constraint Flags The row or column is infeasible This mark is make for any entry whose LEVEL value is not between the UPPER and LOWER bounds The row or column is non optimal This mark is made for any non basic entries for which the marginal sign is incorrect or superbasic ones for which the marginal value is too large UNBND The row or
134. molecule of ammonia to produce aniline but a side reaction causes two molecules of phenol to react with one molecule of ammonia to produce diphenylamine Another side reaction causes ammonia to decompose into hydrogen and nitrogen Research has shown that the selectivity of the phenol and ammonia reactions to aniline is 99 while less than 1 of the ammonia decomposes to hydrogen and nitrogen These values are incorporated in the mass and energy balances of this unit The mole and energy balance equations for the reactor are given in Table 5 The two rows of this table under mole balance give the overall mole balance and component mole balances The mole balance for each component is established based on the conservation law The steady state mole balance for a component is written as Fin 1 Fout i Fgen i 0 III 6 where i represents the names of components For the sulfur burner H i Fou G and Fyen i are input air flow rate F06 1 output flow rate F07 1 and generation rates of components from reaction r i The overall mole balance is the summation of all component mole balance equations 27 Three reactions take place in this unit i e reaction one of phenol and ammonia to aniline and water reaction two of phenol and ammonia to diphenylamine and water and reaction three of ammonia to hydrogen and nitrogen The first two reactions are based on the conversion of phenol and the selectivity of the reaction The conversion of
135. ms physical propert Flowsheet fg C i Simulation data Simulation Units streams physical property plant data On Line Optimal setpoints Optimization reconciled data parameters Temp flow rates enthalpy function Reactor le c Reactor comparison Analysis Temp flow rates enthalpy function Pinch Best heat exchanger Analysis network Flow rates compositio Pollution Pollution information Index Figure 1 The Framework of the Advanced Process Analysis System Chemical Reactor Separation and Recycle Heat Exchanger Network Utilities Figure 2 The Onion Skin Diagram for Organization of a Chemical Process and Hierarchy of Analysis The process models used in Advanced Process Analysis System belong to the type of mechanistic models because they are based on conservation laws as well as the physical and chemical attributes of its constituents A typical chemical plant includes hundreds of process units such as heat exchangers reactors distillation columns absorption towers and others The constraints for these units are either based on conservation laws mass and energy balances or they are based on some other laws of nature which include models for chemical phase equilibrium kinetic models etc Mathematically the constraints fall into two types equality constraints and inequality constraints Equality constraints deal with the e
136. n error has been detected but it will terminate with an error condition The string definition such as the variable s name in the system has to start with a letter followed by more letters or digits It can only contain alphanumeric characters and up to 10 characters long The comment to describe the set or element must not exceed 80 characters Basically there are five possible types of variables that may be used which are listed in Table 18 The type of mathematical programming problem must be known before the problem is solved The on line optimization system can only solve linear and nonlinear optimization problems However GAMS can solve a large number of optimization problems which are summarized in Table 19 As the interactive on line optimization system writes all the required GAMS input files for the user most of the components in the GAMS input model are automatically formulated from the information provided in the input windows If the user can follow the explicit rules introduced above the GAMS input file can be generated automatically After the user enters all the plant information through the input windows the GAMS source codes will be generated Table 17 A List of Special Symbols for GAMS N Plus infinity A very large positive number Minus infinity A very large negative number Not available Used for missing data Any operation that uses the value NA will produce the result NA Undefined The result of an undefined o
137. n manufacturing a unit gen mass of all the products This can be obtained from dividing 7 by the rate at which the process outputs products Specific Impact generated based on Potential Environmental Impact is I re E I I gen out in 1 9 Tub ub where Y P is the total rate of output of products P 3 MY This is a measure of the mass efficiency of the process i e the ratio of mass gen converted to an undesirable form to mass converted to a desirable form This can be P calculated from Z E by assigning a value of 1 to the potential impacts of all non products n 13 4 5 6 Rate of Generation of Pollutants per Unit Product is out NP gn NP Y MY x Y MUY x NP __ j k j k M 1 10 gt P The indexes in the second category emission are as follows i This measures the the total rate at which the process outputs potential environmental out impact due to nonproducts This is calculated using equation I 6 7 NP p products This is obtained from dividing j by the rate at which the process outputs out products Specific Impact Emission based on Potential Environmental Impact is This measures the potential impact emitted in manufacturing a unit mass of all the 7 NP p ze L11 oui gt P P p MV This is the amount of pollutant mass emitted in manufacturing a unit mass of product This can be calculated from 7 by assigning a value of 1 to the potential
138. n stream C1 indicates that this stream requires a heater There is one pair of green circles numbered 1 joined by vertical green lines This represents the main heat exchanger in the process The exchanger exchanges heat between the two streams on which the two circles lie For example heat exchanger 1 the pair of green circles with number 1 is exchanging heat between hot stream s10 and cold stream s07 Thus it can been seen from the grid diagram that the aniline process needs one heat exchanger one heater and one cooler in the new network solution The Output Data File Now let us examine the output data generated by THEN The complete output file for the above problem is given in Table 6 In Table 6 the first two sections Details of Hot Streams and Details of Cold Streams list a summary of the input information entered by the user This consists of the data for hot and cold streams followed by the specified minimum approach temperature for the matches The input summary is followed by the results for the simple process The first three lines of the output show that the given problem was a pinched problem This is followed by a matrix of values which is the solution array generated by THEN for the problem above and below the pinch These values can help in understanding the matches made by the program to arrive at the solution However the most important part of the output is the Heat Exchangers Heaters and Coolers summary tab
139. n the FlowSim screen to change the spacing between the grid lines and to change the grid line and background colors The Object settings command is useful to change the appearance of all the units and streams in the FlowSim screen The object settings window is shown in Figure 21 To change settings for all the streams click on the streams tab To change settings for all the environment I O units click on the Environment I O tab If you want the changes to remain effective even after you close the application you must select Save the palette for future uses box 39 UA FlowSim C Program Files Adyvanced Process Analysis System Examples aniline ioo File Model Edit Options Help E e Grid Lines Object Settings Fit To Page Figure 20 The Options Menu iw Object Settings x Units Environment 1 0 Stream Text Color _ BakCoe ack Color J Unit v E the Palette for future uses ces Figure 21 Object Settings Window 40 Once you have drawn a stream the data associated with the stream can be entered by clicking on the data option in the edit menu or by double clicking on the stream Let us enter the data associated with the stream s07 When you double click on this stream a data form is opened This is shown in Figure 22 To enter the measured variables associated with the stream the add button should be clicked When the add button is clicked the caption of the Refresh b
140. ne Optimization All option for the optimization objective The model type of the plant model must be specified as either Linear or Nonlinear from the drop down list Let us choose Nonlinear as the model type for the aniline model When the information for the Model Description window is completed you can proceed to the next window by clicking on the tab to move to any other window Let us proceed to the Tables window by clicking on the Tables tab The Tables window is shown in Figure 38 it contains information about the tables that were entered in the FlowSim program Let us proceed to the Measured Variables window by clicking the Measured Variables tab The Measured Variables window has a table with twelve columns which display the name plant data standard deviation initial point scaling factor lower and upper bounds stream number process unitID the unit and a short description of the measured variables The Measured Variables window lists all the measured variables that are associated with all the units and streams in the process model and the global measured variables that were entered in the FlowSim program The column Process UnitID has the name of the process unit and the column Stream Number has the name of the stream with which the variable is associated The Measured Variables window is shown in Figure 39 In this window information can only be viewed All of the data entered in FlowSim can only be viewed usi
141. nent molar flow rate Ib mol hr and its superscript i and subscript k denote the component names and stream numbers respectively h s in the equations represent the species enthalpies of streams 10 Btu Ib mol and Qioss is the heat loss from the exchanger 10 Btu Ib mol T is the stream temperature CR and Tim is the logarithmic mean temperature difference CR between hot and cold sides of the exchanger In the heat transfer equation U and A are the overall heat transfer coefficient and heat transfer area respectively The two rows in Table 3 under energy balances give the overall energy balance and heat transfer equation In addition the enthalpy for each species h T expressed as a polynomial function of the stream temperature is also given in the table The enthalpy equations for gases and liquids follow Equation IIL5 ih RA SY qu AEQUO III 5 ide h T a T aT aT aT i H N NH H O PH AN DPA Table 4 shows the enthalpy coefficients ai a a3 and a4 for gases and liquids In these equations the total flow rates species flow rates or composition and temperatures of streams are the measurable variables Species enthalpies and the mean temperature difference are also measurable variables because they can be calculated from other measurable variables such as temperatures and flowrates The heat transfer coefficients are the process parameters to be estimated The heat transfer area heat loss and coeffici
142. ng the screens of on line optimization To change the data the user has to go back to the FlowSim program Then proceed to the Unmeasured Variables window by clicking on the Unmeasured Variables tab The Unmeasured Variables window has nine columns for displaying the name initial point scaling factor lower and upper bounds stream number process unitID unit and description of the unmeasured variables The Unmeasured Variables window lists all the unmeasured variables which were entered in the FlowSim program The Unmeasured Variables window is shown in Figure 40 Optimization programs need to have all the variables in the same numerical range and it may be necessary to scale the variables by adjusting the scaling factors To scale variables using the Scaling Option provided by the system the scale factors must be entered in the FlowSim program and the icon Include SCALING OPTION for variables at the bottom of Figure 39 for measured variables or Figure 40 for unmeasured variables should be checked A description of scaling factors and their use is given in Section XI 54 Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste M Eg li File View Help la x alje caf 9 Equality Constraints Inequality Constraints Optimization Algorithms Constant Properties Model Description Tables Measured Variables Unmeasured Variables Plant Parameters Table Name ew ga
143. nlinear in the constraint equation and the value of the coefficient depends on the activity levels of one or more of the variables This coefficient is not algebraic but it is the partial derivative of each variable evaluated at their current level values initial points For an equation x 2y 10 e 0 with current level values x 2 and y 1 this equation is listed in the equation listing as x 6 y e 12 where the coefficient of y is the partial derivative of the equation with respect to y evaluated at y 1 i e 6 6 The right hand side coefficient 12 is the sum of constant in the equation 10 and the constant 2 from the linearization of the nonlinear term 2y using Taylor expansion evaluated at y 1 x in this equation is linear and its coefficient is shown as 1 without the parentheses Next the column listing gives the individual coefficients sorted by column rather than by row The default shows the first three entries for each variable along with their bound and level values The format for the coefficients is the same as in the equation listing with the nonlinear ones enclosed in parentheses and the trailing zeroes dropped The order in which the variables appear is the order in which they were declared The final information generated while a model is being prepared for solution is the statistics block to provide details on the size and nonlinearity of the model The status for the solver the state of the program
144. ns These values have to be retrieved manually by the user Let us retrieve the molar flowrates of the chemical components in stream s07 The values we want to use for molar flowrates are from the results of on line optimization These values can be conveniently retrieved using the table List of variables in the model on the right hand side of the widow This window shows a list of all the variables measured and unmeasured with their descriptions When a variable in this table is clicked the value for that variable obtained as a result of economic optimization appears in the box titled Value of the selected variable The variable corresponding to molar flowrate of Fb in stream s07 is f07h2 Search for this variable in the table The measured variables in the model are listed first followed by the unmeasured variables both in alphabetical order When the variable f07h2 is clicked in the table its value appears in the adjacent box Now click on the hand button to take this value as the molar flowrate of H gt in stream s07 The value is now copied into the table Components present in this stream in the second column of the first row Repeat this procedure for the seven components in stream s07 The screen now looks like Figure 73 80 Figure 73 The Molar Flowrates in Stream S07 Figure 74 The Average Enthalpy Coefficients of Stream S07 81 Now that we have the composition of stream s07 in terms of molar flowrates and t
145. ns With GAMS process tab Number of Iterations 100 Number of Domain Errors Pc C Amount of time used 1000 Use Defaults Advanced Options Ges ue 59 is Advanced Solver Parameters Options IDE x Solver Parameters Figure 46 Advanced Parameters Options Window Clicking on the Options item in View menu opens the Options window as shown in Figure 45 General GAMS Process options are set in the GAMS Process tab as shown in the first window of Figure 45 The format for the GAMS output can be specified in the Output Format tab as shown in second window of Figure 45 LP and NLP values for the Solver can be set in the Solver tab as shown in the third window of Figure 45 The default values are CONOPT for both LP and NLP These default values can be restored by clicking on the Use Defaults button Solver Parameters like Number of Iterations Number of Domain Errors and Amount of Time Used can be specified in the Solver Parameters tab as shown in the fourth window of Figure 45 The recommended values for the Solver Parameters of the aniline process are Number of iterations 100 Domain Errors 0 and Amount of time Used 1000 sec The default values for Number of iterations 1000 Number of Domain Errors 0 and Amount of time used 1000 sec can be restored by clicking on the Use Defaults button Other advanced options can be set by clicking on the Advanced Options button which brings up the window shown
146. nt model meet the requirements for the demand of the product and availability of raw materials and meet the restriction on pollutant emission This optimization can be achieved by maximizing the economic model objective function subject to the process constraints The objective function can be different depending on the goals of the optimization The objectives can be to maximize plant profit optimize plant configuration for energy conservation minimize undesired by products minimize the waste pollutant emission or a combination of these objectives The result of the economic optimization is a set of optimal values for all the measured and unmeasured variables in the process These are then sent to the distributed control system DCS to provide setpoints for the controllers The on line optimization program of the Advanced Process Analysis System retrieves the process model and the flowsheet diagram from Flowsim Additional information needed to run online optimization includes plant data and standard deviation for measured variables initial guess values bounds and scaling factors for both measured and unmeasured variables and the economic objective function The program then constructs the three optimization problems and uses GAMS General Algebraic Modeling System to solve them Results of all three problems can be viewed using the graphical interface of Flowsim The aniline process will be used to demonstrate the use and capabilities of the
147. ntal life cycle assessment of products Heijungs 1992 12 To quantitatively describe the pollution impact of a process the conservation equation is used to define two categories of Impact Indexes The first category is based on generation of potential impact within the process These are useful in addressing the questions related to the internal environmental efficiency of the process plant i e the ability of the process to produce desired products while creating a minimum of environmental impact The second category measures the emission of potential impact by the process This is a measure of the external environmental efficiency of the process i e the ability to produce the desired products while inflicting on the environment a minimum of impact Within each of these categories three types of indexes are defined which can be used for comparison of different processes In the first category generation the three indexes are as follows 1 T This measures the the total rate at which the process generates potential environmental impact due to nonproducts This can be calculated by subtracting the input Total rate of Impact generated based out rate of impact Z from the output rate of impact i on Potential Environmemtal Impact is I edo gen in out 1 8 where I yn 18 calculated using equation L5 and I is calculated using Equation I 6 out 2 This measures the potential impact created by all nonproducts i
148. oblem GAMS checks the input source code for program syntax rearranges the information in the source code and solves the optimization problem At every step GAMS records any error encountered and reports it in the GAMS output file The following describes error reporting during solving the optimization problems Compilation Errors The first type of error is a compilation error When the GAMS compiler encounters an error in the input file it inserts a coded error message inside the echo print on the line immediately following the scene of the offense The message includes a symbol and an error number printed below the offending symbol usually to the right This error number is printed on a separate line starting with four asterisks If more than one error occurs on a line the signs may be suppressed and the error number is squeezed GAMS programs are generated by the system and no serious compilation errors are expected to appear The most common error will be a spelling error i e the variables defined in the equations may be mistyped and mismatch while declaring the variables This will result in variable undefined error GAMS will not list more than 10 errors on any single line At the end of the echo print a list of all error numbers encountered together with a description of the probable cause of each error will be printed The error messages are self explanatory and will not be listed here Checking the first error is r
149. oefficient Some solve statement require the evaluation of nonlinear functions and the computation of derivatives Since these calculations are not carried out by the system but by other subsystems not under its direct control errors associated with these calculations are reported in the solution report If the solver returns an intermediate solution because of evaluation errors then a solution will still be attempted The only fatal error in the system that can be caused by a solver program is the failure to return any solution at all If this happens as mentioned above all possible information is listed on the GAMS output file but the solution will not be given 128 XII Acknowledgments We gratefully acknowledge the Gulf Coast Hazardous Substance Research Center and the Environmental Protection Agency for support of this work Also the assistance of Ms Gayathri Srinivasan Mr Tai Lee Mr Huitao Liu and Ms Qing Chen in Visual Basic programming was invaluable in developing the program 129 XIII References Brooke A D Kendrick and A Meeraus 1996 GAMS User s Guide Release 2 25 GAMS Development Corporation Washington D C Cabezas H J C Bare and S K Mallick 1997 Pollution Prevention with Chemical Process Simulators The Generalized Waste Reduction Algorithm Computers Chem Engng Vol 21 Supp p S305 S310 Chen X 1998 The Optimal Implementation of On line Optimization for Chemical and Refinery Proc
150. oefficients 146 Table 43 The Process Constraint Inequalities Material Balances Mixed d Stream ru i Product MW JED gt 030 MW t fa MW T Soy MW Phenol E MW Ree any 5 O69 MWon f MW f Mpa 29 gt MW AN 0945 f 7 MW Soy MWp Mw DPA DPA DPA gt Product fs Energy Balances E 100 Temperature Approach E 102 Temperature Approach E 103 Temperature Approach E 104 Temperature Toy 2 10 Approach E 105 Temperature Approach 147 Appendix B Full Output File for Economic Optimization Profit Maximization of the Aniline Process Economic Optimization Program 02 12 01 09 49 34 PAGE 1 GAMS 2 50A Windows NT 95 98 SCALARS areaE100 6 areaE102 1 areaE103 7 areaE104 3 areaE105 2 SCALARS dens_h2 0 0349 dens_n2 0 019 dens_nh3 2 1117 dens_h2o 0 3209 dens_ph 39 7521 dens_an 37 518 dens_dpa 43 608 SCALARS price_nh3 0 0875 price ph 0 38 price an 0 49 price dpa 1 8 SCALARS hfh2 0 hfn2 0 41 hfnh3 19733 42 hfh2o 103955 43 hfph 41427 44 hfan 37343 45 hfdpa 86844 46 47 48 The following are the Measured Variables 49 VARIABLES Economic Optimization Program 02 12 01 09 49 34 PAGE 2 GAMS 2 50A Windows NT 95 98 2 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 50 f03 f
151. on The first sheet in the Excel program has 20 sets of data randomly generated for the aniline process This information is shown in Figure 59 for the first 14 of these data sets and each column represents data for the 68 measured variables that would be taken from the data historian of the distributed control system for 20 time intervals ending with the current time The second Excel spreadsheet was prepared to analyze this data to determine a time interval that shows the plant operating at steady state This spreadsheet is shown in Figure 60 and the graphs and buttons were developed using the Visual Basic capabilities that are part of Excel In this figure the time series of four of the measured variables can be viewed at one time The spreadsheet has the capability of displaying any four of the process variables and the variables that are plotted can be changed by pulling down the menu on the lower left and selecting a variable to be displayed After reviewing the data in Figure 60 it can be determined when the plant is at steady state between two time periods Consequently the decision is to import the data from the middle point of those two time periods into the on line optimization Meter bee bil i hee pu pa e pa p i _ o o a W nt li i 2I EIE TIT Mele LLL LL f Figure59 Excel Spreadsheet of Plant Data for the Aniline Process 70 Figure 60 Excel Spreadsheet Show
152. on optimization settling settling time time output variable execution execution frequency frequency time a Time between optimizations is longer than settling time optimization optimization optimization settling time output variable execution execution frequency frequency time b Time between optimizations is less than settling time Figure57 Comparison of Time between Optimizations and Process Settling Time after Darby and White 68 As shown in Figure 57 it is necessary to make sure that the process is operating at steady state before the plant data is taken from distributed control system for conducting on line optimization Steady state plant data is required for steady state process models The time series horizontal screening method has been used in industry to detect a steady state In this method the measured values for key process variables are observed for a time period If the measured values remain within the bounds of two standard deviations then the process is said to be operating at steady state This requires the use of a coordinator program or operator action for identifying steady state and exchanging data between the on line optimization program and the distributed control system Excel spreadsheet files are widely used to transfer the data The use of an Excel spreadsheet is the industry standard way of selecting data and
153. on tha zinar Show aoe es acta To recd verthske data tor thie hmm Gata arb cr tee Suwari sire r atya FINISH Figure68 The Retrieving Stream Data Window 77 If the average enthalpy coefficient values are known for the stream they can be entered in the corresponding boxes in the frame Since we do not know the average values we will calculate them from the stream composition and the enthalpy coefficient values for the individual chemical species present in that stream To perform these calculations click the button for modifying the enthalpy data When this button is clicked the screen view changes to the Enthalpy Data window shown in Figure 70 The Enthalpy Data window shows a list of all the chemical components present in the process The components present in the reacting gases in aniline model are Fb N2 NH3 HO phenol aniline and diphenylamine These are automatically retrieved from FlowSim and displayed in the enthalpy data window The table Components present in this stream shows the components which are present in stream s07 This table is empty as seen in Figure 70 This is because the components present in a stream need to be manually selected by the user and added to the table From our knowledge about the process we know that stream s07 has all seven of the above listed components So let us add all of these components to the table Click on the component name in the list The button with an arro
154. onstant properties window is shown in Figure 42 The flowsheet diagram can be viewed by clicking on the FlowSheet Diagram option in the view menu as shown in Figure 36 The flowsheet cannot be edited in the On line Optimization program The flowsheet diagram is shown in Figure 44 Double clicking on a unit opens a data form which displays all the measured variables unmeasured variables and plant parameters that are associated with that unit Similarly double clicking on a stream opens a data form which displays the measured and unmeasured variables associated with the stream The global data can be viewed by double clicking on the background of the flowsheet Options Iof XI GAMS Process Dutput Format Solver Solver Parameters Options Oy XI GAMS Process Dutput Format Solver Solver Parameters v Set page length Number of lines per page 50 v Automatically Closed when finished v Running background Minimized Hidden Gams Directory Please Specify the path Include column list for the gams exe file C PROGRA 1 ADVANC 2 Gams25 ga Browse Ges um Include equation list Include symbol list reference mes se Options Iof XI GAMS Process Output Format Solver Solver Parameters Options Iof xi GAMS Process Output Format Solver Solver Parameters NLP coNoPT LP CONOPT Use Defaults Ges me Figure 45 Optio
155. onstraints equations they can be defined as atable These constant coefficients are grouped in sets and they can be defined using concise names to refer their values in the equations before an equation definition Let us create a new table for the Contact model Click on the Tables option in the model menu to open the Tables window which is shown in Figure 27 Then click on the Add New button in the tables window to activate the window As soon as Add New button is clicked the caption of the Add New button changes to Save and that of Delete changes to Cancel Then the general information of a table the name of the table number of rows and number of column names must be entered The name of the table stands for the name of the coefficient group The names of the rows and columns are the set names of the sub components After entering the table information the Save button should be clicked to save the changes To enter data in a table click on the Edit button The Edit Table window is opened to enter names and numerical values for the constant coefficients The edit table window for the table enth_gas is shown in Figure 28 Clicking the Close button will update the table and close the Edit table window An existing table can be edited or deleted by selecting the table and then clicking Edit or Delete iw Tables x Table Name Jenth_gas Description Gaseous Enthal
156. oss errors Y Parameters Estimation Algorithm Least Squares Method small gross errors Economic Optimization Objective Function profit ptimization Direction M aximizing Economic Model Type Nonlinear v Figure 36 View Menu JJ Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste s Eg MM File view Help 8 x al af Equality Constraints Inequality Constraints Optimization Algorithms Constant Properties Tables Measured Variables Unmeasured Variables Plant Parameters Model Name Aniline Process Description Ammonolysis of phenol simulation Optimization Objective On Line Optimization M ModelT ype onem ml Figure 37 Model Description Window 53 To view the other windows used by the On line Optimization program click on the All Information option in the view menu which is shown in Figure 36 The Model Description window is shown in Figure 37 For the Model Description window the model name and the description were entered in the Flotsam program This window includes the Optimization Objective and Model Type The optimization objective can be selected from the drop down list of Optimization Objective The five selections are On line Optimization All Data Validation Parameter Estimation Economic Optimization and Parameter Estimation and Economic Optimization Let us choose the On li
157. othermic so the stream leaving the reactor stream 10 is slightly hotter than stream 9 Also there is a 5 psia pressure drop across the reactor Therefore stream 10 has the following conditions 725 F and 240 psia The cooling of the reactor effluent begins with the cross exchanger E 100 which cools stream 10 by about 500 F Again there is a 5 psia pressure drop across the cross exchanger Stream 11 is at a temperature of 223 F and a pressure of 235 psia Finally stream 11 is sent through a cooler E 102 Every cooler has a stream of water passing through it to cool the process stream The water enters at 80 F and leaves at 100 F For this cooler the approach 18 temperature between the water inlet CW1 and stream 12 is 60 F and the pressure drop is 5 psia Thus stream 12 is at 140 F and 230 psia The purification section consists of the distillation columns to separate the chemicals into products and non products The absorption column T 100 separates the gases and the liquids T 100 is a 10 stage reboiled absorber no condenser fed at the top stage The pressure at the top of the column is 220 psia while the pressure at the bottom of the column is 222 5 psia The light key component of this column is ammonia while the heavy key component is water Theory says that any component lighter than the light key will appear in the distillate Therefore all of the hydrogen and nitrogen go to stream 13 Theory also suggests that any compon
158. ower 536 67 0rd coeff2 1000000 e 0 387 EQU168 H28 H27 Q104 e 0 388 EQU169 TE104 T27 TCW6 T28 TCW5 log T27 TCW6 T28 TCW5 e 0 389 EQU170 Q104 areaE104 uE104 TE104 1000000 e 0 390 EQU171 f28 f28h20 f28ph f28an e 0 391 EQU172 f29ph 0 800 f25ph e 0 392 EQU173 f29an 0 077 f25an e 0 393 EQU174 f29dpa 0 046 f25dpa e 0 394 EQU175 f29 f29ph f29an f29dpa e 0 395 EQU176 H29 f29ph hfpht sum coeff2 enth_lig ph coeff2 power T29 ord coeff2 power 536 67 DEORUM EPOUQ ONE t 396 f29an hfan sum coeff2 enth liq an coeff2 power T29 ord coeff2 power 536 67 ord coeff2 1000000 397 f29dpa hfdpa sum coeff2 enth liq dpa coeff2 power T29 ord coeff2 power 536 67 0rd coeff2 1000000 e 0 398 EQU177 f31ph f29ph e 0 399 EQUI178 f31an f29an e 0 400 EQU179 f31dpa f29dpa e 0 401 EQU180 f31 f31ph f3lan f3ldpa e 0 402 EQUI81 H31 f31ph hfph sum coeff2 enth liq ph coeff2 power T31 ord coeff2 power 536 67 0rd coeff2 1000000 403 f3lan hfan sum coeff2 enth liq an coeff2 power T31 ord coeff2 power 536 67 ord coeff2 1000000 404 f31dpa hfdpa sum coeff2 enth Eo Opes coeff2 power T31 ord coeff2 power 536 67 0rd coeff2 1000000 e 0 405 EQU182 f32ph 0 005 f25ph e 0 406 EQU183 f32an 0 000246 f25an e 0 407 EQU184 f32dpa 0 954 f25dpa e 0 408 EQU185 f32 f32ph f32an f32dpa e 0 409 EQU186 H32 f32ph hfp
159. owsheeting The first step towards implementing the Advanced Process Analysis System is the development of the process model using Flowsim As described earlier the process model is a set of constraint equations which are the material and energy balances rate equations and equilibrium relations that describe the material and energy transport and the chemical reactions of the process These form a mathematical model of relationships between the various plant units and process streams Formulation of the process model can be divided into two important steps A 1 Formulation of Constraints for Process Units The formulation of constraints can be classified into empirical and mechanistic methods Flowsheet Simulation Process Specification PFD units streams physical properties Key word index Unit ID Stream ID Component ID Property ID Reactor Analysis Advanced Process Analysis System On Line Optimization Pinch Analysis DataBase of APAS PFD units amp streams Unit local variables parameters balance equations stream connection Streams global variables Plant data Property enthalpy function density viscosity simulation data optimal setpoints reconciled data estimated parameters reactor comparison best reactor for the process best heat exchanger network pollution information Process Control Process Modification Pollution Index Units strea
160. pa coeff2 power T07 ord coeff2 power 536 67 0rd coeff2 1000000 e 0 EQU48 f08h2 f07h2 e 0 EQU49 f08n2 f07n2 e 0 EQU50 f08nh3 f07nh3 e 0 EQU51 f08h20 f07h20 e 0 EQU52 f08ph f07ph e 0 EQU53 f08an f07an e 0 EQU54 f08dpa f07dpa e 0 EQU55 f08 f08h2 f08n2 f08nh3 f08h20 f08ph f08an f08dpa e 0 EQU56 H08 f08h2 hfh2 sum coeff1 enth_gas h2 coeff1 power T08 ord coeff1 power 536 67 ord coeff1 1000000 Economic Optimization Program 02 12 01 09 49 34 PAGE 6 233 234 235 236 237 238 GAMS 2 50A Windows NT 95 98 f08n2 hfn2 sum coeffl enth_gas n2 coeff1 power T08 ord coeff1 power 536 67 ord coeff1 1000000 f08nh3 hfnh3 sum coeff1 enth_gas nh3 coeff1 power T08 ord coeff1 power 536 67 0rd coeff1 1000000 4 f08h20 hfh20 sum coeffl enth gas h20 coeff1 power TO8 ord coeff1 power 536 67 0rd coeff1 1000000 f08ph hfph sum coeffl enth gas ph coeffl power TO8 ord coeff1 power 536 67 ord coeff1 1000000 t fOBan hfan sum coeff1 enth gas an coeff1 power TO8 ord coeff1 power 536 67 0rd coeff1 1000000 fo8dpa hfdpa sum coeff1 enth_gas dpa coeff1 power TO8 ord coeff1 power 536 67 0rd coeff1 1000000 e 0 150 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 2
161. pe of unit called Environment I O This can be drawn using the command Add Environment I O in Figure 13 The Lock option makes the diagram read only and does not allow any changes The diagram can be unlocked by clicking on the command again Figure 12 General Information Box 34 Eis FlowSim C PROGRAM FILESXADVANCED PROCESS ANALYSIS SYSTEM temp Un i Eg File Model Edit Options Help Add Environment 1 0 Add Unit Add Stream Lock General Info Global Data Enthalpies I Figure 13 The Model Menu Now let us use these commands to draw the flowsheet diagram for the aniline process Although FlowSim allows the units and streams to be drawn in any order it is recommended that while drawing a process model one should start with the feed and then add units and streams in order Let us draw the mixer which is the unit with the two feed streams and the two recycle streams as inputs Select the Add Unit command from the Model menu The mouse cursor changes to a hand The cursor can now be dragged to draw a rectangle Once the mouse button is released a small input window appears on the screen as shown in Figure 14 For every process unit that is drawn in FlowSim the user is required to enter a unique Unit ID and description let us enter MIX 102 as the unit ID and Feed and recycle mixer as the description Now let us draw the cross heat exchanger in the flowsheet diagram Let us enter th
162. phenol in the reactor is 9596 while the selectivity is 99 to aniline Therefore the reaction generation rate for phenol ammonia aniline diphenylamine and water is related to the input flow rate of phenol f and the stoichiometric coefficient of the component in the reaction Also the reaction rate of a product component has a positive value and the reaction rate of a reactant component has a negative value For example the component mole balance for aniline is AN AM fA 099 cony f 0 III 7 where f and f are the input and output flow rates of aniline and 0 99 conv1 f is the generation rate of sulfur dioxide The variable convl is the conversion of phenol in the reactor it is treated as a parameter since the conversion can vary based on the life of the catalyst The steady state overall energy balance is established based on the first law of thermodynamics Neglecting changes in kinetic and potential energy this equation is Felder and Rousseau 1986 fi C hi fu G hout G Q W 0 III 8 where i represents the components entering and exiting the reactor Since the reactor is an adiabatic reactor Q 0 No work is done on or by the reactor thus W 0 These assumptions lead to the following energy balance on the reactor fi hi 1 fou hou 0 III 9 In Table 5 f denotes stream species flow rate Ib mol sec and h represents species enthalpy 10 Btu Ib mol The detailed enthalpy regression funct
163. pt at its endpoints it is a pinched process and the temperature corresponding to that point is the pinch temperature If the curve touches the X axis at its uppermost point the process is below 89 the pinch process If it touches at the lowermost point it is an above the pinch process In Figure 81 the GCC does not meet the temperature axis at one of its endpoints Hence it is a pinched process Also the GCC can be used to determine the minimum amount of hot and cold utilities needed by the process To find the amount of hot utility required locate the topmost point of the curve and read its X coordinate which is equal to the amount of hot utility Similarly to get the amount of cold utility required locate the bottommost point of the curve and read its X coordinate For the aniline process from Figure 81 it can be seen that the amount of hot utility is about 3 1 MMBtu hr and the amount of cold utility is about 4 1 MMBtu hr The Network Grid Diagram The network grid diagram for the aniline process is shown in Figure 82 Let us examine this diagram to understand the new heat exchanger network structure for this process The horizontal red line at the top running from left to right represent the hot stream s10 The horizontal blue line at the bottom running from right to left represents the cold stream s07 The blue circle numbered 1 on stream H1 indicates that this stream requires a cooler The red circle numbered 1 o
164. py Coefficients Row Name compi Column N ame coetfi Number of Columns 4 MIAT bles 1 of 2 gt gt i Add New Rename Delete Edit Close Figure 27 Table Window 46 m Edit Table_Name enth_gas Figure 28 Edit Table Window C Enthalpies The enthalpy of a stream usually is expressed as a polynomial function of temperature This function appears repeatedly in the plant model with the same coefficients which have different numerical values for each chemical component An example is h aoi ariT asi T asi T agi T where there are six coefficients aoi to asi for component i An enthalpy window can be used to store enthalpy coefficients for a group of components To create an enthalpy table click on the Enthalpies option in the model menu to open the Enthalpy window Then click on the Add New button in the Enthalpy window As soon as the user clicks on Add New button an input window prompts the user to enter the name of the enthalpy table a description of the enthalpy table the row name and the column name An enthalpy table with the given name is created An enthalpy table can be deleted by clicking on the Remove button The enthalpy window is shown in Figure 29 The enthalpy coefficients from the Enthalpy table can be used in the enthalpy equations written in the FlowSim part of the program However the Enthalpy table does not write the equations for the user The calculations in t
165. r enthalpy coefficients for multiple temperature ranges All of this process information is entered with the help of the interactive user customized graphic screens of Flowsim The formulation of process models and the classification of process information for the aniline process is given in Section II The next step of Advanced Process Analysis System is on line optimization B The Online Optimization Program Once the process model has been developed using Flowsim the next step is to conduct on line optimization On line optimization is the use of an automated system which adjusts the operation of a plant based on product scheduling and production control to maximize profit and minimize emissions by providing setpoints to the distributed control system As shown in Figure 3 it includes three important steps combined gross error detection and data reconciliation simultaneous data reconciliation and parameter estimation and plant economic optimization In combined gross error detection and data reconciliation a set of accurate plant measurements is generated from plant s Distributed Control System DCS This set of data is used for estimating the parameters in plant models Parameter estimation is necessary to have the plant model match the current performance of the plant Then the economic optimization is conducted to optimize the economic model using this current plant model as constraints and this generates the optimal setpoints for the Distr
166. r illegal operation The user cannot directly set a value to UNDF Very close to zero but different from zero 120 Table 18 A List of Types of Variables for GAMS Default Lower peus Description Upper Bound Bound Free No bounds on variables Both bounds can be default changed from the default values by the user Positive No negative values are allowed for variables The upper bound can be changed from the default value by the user Negative No positive values are allowed for variables The user can change the lower bound from the default value Binary Discrete variable that can only take values of 0 or 1 Integer D Discrete variable that can only take integer values between the bounds Bounds can be changed from the default value by the user The on line optimization system will then forward these source codes to the GAMS software This initiates the execution of GAMS and also creates output files so the user can view the execution in the output window The execution and the output has been discussed in the previous sections 121 Table 19 A List of Types of Models for GAMS Linear programming No nonlinear terms or discrete binary or integer variables NLP Nonlinear programming There are general nonlinear terms involving only smooth functions in the model but no discrete variables Nonlinear programming with discontinuous derivatives Same as NLP but non smooth functions can appear as well
167. ram a heat exchanger network design program and a pollution assessment module A Windows interface is used to integrate these programs into one user friendly application The Advanced Process Analysis System methodology to identify and eliminate the causes of energy inefficiency and pollutant generation is based on the onion skin diagram shown in Figure 2 Having an accurate description of the process from on line optimization an evaluation of the best types of chemical reactors is done first to modify and improve the process Then the separation units are evaluated This is followed by the pinch analysis to determine the best configuration for the heat exchanger network and determine the utilities needed for the process Not shown in the diagram is the pollution index evaluation which is used to identify and minimize emissions The following gives a detailed description of the Advanced Process Analysis System and its components and how they are used together to control and modify the process to maximize the profit and minimize the wastes and emissions An aniline process simulation is used as a tutorial process to demonstrate the use and capabilities of the Advanced Process Analysis System This will follow the description of the programs and the components The separate manual is available for the contact process for sulfuric acid manufacture It is for an actual plant and the workstation version of GAMS is required for on line optimization A Fl
168. red variables as shown in Figure 39 The Excel program steady xls is used also to calculate the standard deviation of the measured variables Although not shown in Figure 59 the last column in the spreadsheet is the standard deviation of the measured variables which was calculated using the 20 measurements This information can be transferred to the on line optimization program using the same procedure as was used for the measured variables However it is not necessary to use the current plant data to evaluate the standard deviation and the Excel program can be used with any data set to determine appropriate values of the standard deviation 71 Interactive On line Optimization C AdvuSys Examplesianiline ioo Import Plant Data Figure 61 The Import Option in the File menu of On line Optimization Figure62 The Dialog Box that opens when Import is clicked 72 Interactive On line Optimization Figure 63 The Screen to enter the Excel Sheet Name and Range This concludes the description of steady state detection and execution frequency of on line optimization The next step of Advanced Process Analysis System is the heat exchanger network optimization Click the Pinch Analysis button in Advanced Process Analysis Desk to open the heat exchanger network THEN program 73 VII USING THE HEAT EXCHANGER NETWORK THEN PROGRAM Upon clicking the Pinch Analysis button on the Advanced Process Analysis Desk the He
169. red variables have to be determined by the measured variables called observability If an unmeasured variable can not be determined by a measured variable it is unobservable This is called the dbservability and redundancy criterion which needs to be satisfied B 1 Combined Gross Error Detection and Data Reconciliation The process data from distributed control system is subject to two types of errors random error and gross error and the gross error must be detected and rectified before the data is used to estimate plant parameters Combined gross error detection and data reconciliation algorithms can be used to detect and rectify the gross errors in measurements for on line optimization These algorithms are measurement test method using a normal distribution Tjoa Biegler s method using a contaminated Gaussian distribution and robust statistical method using robust functions The theoretical performance of these algorithms has been evaluated by Chen 1998 Based on Chen s study the Tjao Biegler s method is the best for chemical processes and is used to perform combined gross error detection and data reconciliation When gross errors are in the range of 6 to o it detects and rectifies gross errors in plant data sampled from distributed control system This step generates a set of measurements containing only random errors Then this set of measurements is used for simultaneous parameter estimation and data reconciliation using the least sq
170. ributes to the reaction Forward and reverse reaction orders can be entered in this window Let us enter the reaction orders for the three reactions in the Reaction Rate window Let us enter 1 as the reaction order for Ce in the first reaction Enter as the reaction order for Ce in the second reaction Finally enter 2 as the reaction order for Cc in the third reaction The Reaction Rate window with this information is shown in Figure 99 Click on the Rate Options button in the Reaction Rate window to enter the reaction rates basis Each reaction rate should be expressed based on a formation or depletion of a component that appears in the stoichiometry of the reaction as a reactant or as a product Let us enter the reaction rates for the two reactions as F G and C as shown in Figure 100 106 m REACTION RATE 1 l ki Cc Ce 1 Kel Cd Cf Rak Cc Ce 1 Ke2 Cd Ca Ir32k3 Cc 1 Ke3 Ca Cb r4 2 k4 i5 kb 16 kB k r8 k8 r3 kSf 10 KTO Figure 99 Reaction Rate Window mw REACTION RATE 3 Reaction Rate is per Mole Heat of Reaction No Btu Lbmol co OO o Q N of Component 5452 Eo p L ws L J cQ E E E as 10 Figure 100 Reaction Rate Options Window 107 wm REACTION CONSTANT Forward Reaction Constant Equilibrium Reaction Constant Ki foose fo RT K2 fesse fo ant K3 znale menant
171. ross heat exchanger E 100 s07s the inlet stream on the cold side whereas s08 is the outlet stream on the cold side s10 is the inlet stream on the cold side and s11 is the outlet stream on hot side The energy balance can be written as H t Ft c G fo ho G fog hog O and IIL 2 Hint oue G fio hio Gf Op where j is the molar flowrate Ib mol hr of species i in stream s07 and hy is the enthalpy 10 Btu Ib mol of species i in stream s07 The total molar flowrate of stream s07 and the total enthalpy of stream s07 are given by the equations fo7 G fo7 and III 3 Ho G fo7 ho where the summation is done over all the species 1 present in stream s07 This naming convention is used for all the flowrates and enthalpies The number in the subscript of the variable can be used to identify the stream to which it belongs HC is the enthalpy of the inlet stream on the cold side and it has units of 10 Btu hr The heat transferred in an exchanger is proportional to heat transfer area A overall heat transfer coefficient U and the logarithmic mean temperature difference between the two sides Tim i e Q UA Tim where Q is the enthalpy change on the cold side i e Q Hine 3 Hue mu G fo i ho i G f s i hog IILA The material and energy balances as well as the heat transfer equations are similar for all units in the heat exchanger network Table 3 gives the constraint equations for the cross heat exc
172. s Description pss Enthalpy Coefficients Row Name compi Column Name coeff Number of Columns 4 View 14 Tabs 1 of 2 gt gt i Figure 38 Tables Window Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste Eg JD File View Help 15 x wje v Equality Constraints Inequality Constraints Optimization Algorithms Constant Properties Model Description Tables Measured Variables Unmeasured Variables Plant Parameters Measured Variables Name sd Plant Data Standard Deviation Plant Data Initial Point Scaling Factor m 5 T Include SCALING OPTION for variables Figure 39 Measured Variables Window 55 Onlineopt Interactive On line Optimization C Program Files Advanced Process Analysis Syste M Eg ill File View Help 18 x wl caf P Equality Constraints Inequality Constraints Optimization Algorithms Constant Properties Model Description Tables Measured Variables Unmeasured Variables Plant Parameters Unmeasured Variables dimmeasuedVaiabes O O O _ Unmeasured Variables Stream numbt a Include SCALING OPTION for variables Figure 40 Unmeasured Variables Window Let us proceed to the Plant Parameters window by clicking on the Plant Parameters tab The Plant Parameters window lists a
173. s if the solution is correct and there was no difficulty in searching for an optimal solution then the scaling option is not necessary If the solution is not correct or some difficulty was encountered while searching for an optimal solution then the scaling option must be incorporated in the program In this case users may instruct the system to include the column and equation lists in the output file To do this the user must change the default setting for the output files in window 12 the Output File Format Specification window This will run the optimization program without the scaling option Based on the values of variables in column list without scaling users can decide the values of scale factors for variables enter them in the 126 Measured Variables and Unmeasured variables windows and highlight the icon Include Scaling Option for variables to scale the variables first After the system executes the program a new equation list which incorporates the scale information of variables is generated and can be used for equation scaling Based on the linearized coefficients in this new equation list users can determine the scale factors for the equations and enter them in the Equality Constraints and Inequality Constraints windows Also users must highlight the icon Include Scaling Option for Equations to add the Scaling Option in the programs E 5 Error Reporting During compiling executing and solving the optimization pr
174. s s Figure 65 The Welcome Screen THEN The Heat Eoxcfunges Network Mogae HELM ABDUT ET F YT I x The following streams were fownd is the model Show the Howxheet chagram Please selon tho streams wich are impotan For heat Wviewianhon Eye Name and Oesciiption To add more stienms to the above bat Click hore J Figure 66 The Stream List Window 75 Figure 67 The Add Stream Window Click on the Proceed button on the welcome screen The Stream List window is now displayed on the screen This is shown in Figure 66 The box in the center shows the list of all the process streams and their descriptions This list has been automatically retrieved by the program from the information in the flowsheet diagram Scroll up and down in the box to see the entire list There is a check box available to the left of each stream name in the list If a process stream is important for heat integration the check box for that stream needs to be selected For the aniline model the following streams were determined to be important s07 s09 s10 and s12 Select all of these streams in the list by clicking on their checkboxes The button Show the flowsheet diagram at the top of the stream list window can be used to view the flowsheet diagram at any time In addition to the streams listed new streams can also be added To add a stream click the Click here button at the bottom of the window A small window shown
175. sed on the emission of impacts Each index is accompanied by a Help button Clicking on the Help displays more information about that particular index at the bottom of the screen The program also calculates the pollution index values for each of the individual streams To see these values click on the Show WAR algorithm button The program now displays the Waste Reduction Algorithm window shown in Figure 89 In Figure 89 the table on the left hand side shows the pollution index values for all the input and output streams in the aniline process A comparison of these values can help in identifying streams with high pollution content In Figure 89 it can be seen that the pollution index values are zero for all the streams except streams s03 the ammonia feed s04 the phenol feed s17 the gaseous purge and s24 the water product This shows that the two feed streams are the main source of pollutant emissions into the environment and need special attention 98 Petlution Indes Progiam ados Calculations M 25 303 1396911 0 Figure88 The Index Calculations Window Waste Fluduchon Adgonther Figure89 The Waste Reduction Algorithm Window 99 The right side of the Waste Reduction Algorithm window shows the important steps of WAR algorithm which gives a systematic way of approaching the waste minimization problem The back button can be used to go back to the previous screens and make changes in the da
176. stream s07 enters the cross heat exchanger and that stream s09 is the outlet stream from the heater Therefore streams s07 and s09 are the source and target of a cold stream respectively To enter this cold stream first select the stream s07 in the table The button Add selected stream to now becomes enabled Select the Cold Streams option and the As source option Now click the Add selected stream to button The stream s07 gets added to the list of cold streams as the source Now click on the stream s09 in the table Keep the Cold Streams option and select the As target option this time Now s07 and s09 are both added to the cold streams list as source and target respectivey These two constitute one cold stream The screen view now is shown in Figure 77 Repeat this procedure for all the other streams The hot stream pair for the aniline process is s07 s09 The cold stream pair is s10 s12 In these pairs the first stream is the source and the second stream is the target Once we have entered all of these streams the THEN model for the aniline process is complete The Build Model window with all the hot and cold streams is shown in Figure 78 The last piece of information needed is the minimum approach temperature between the streams There is no fixed recommended value for this We will enter an approach tempearture of 75 F to ensure that there is sufficient driving force for heat exchange between the streams
177. t i Go To Record Delete Update Cance Close Help Required Figure 22 Stream Data Window 41 iw Stream Data iof x Stream ID So E Measured Vars t Unmeasured V s Equalities Inequalities Name J om2 Description Molar Flowate Initial Point 480 Scaling Factor Lower Bound 40 0001 Unit Ib mol hr Upper Bound d lt Unmeasured Variables 1 of 8 gt gt i Go To Record Add Delete Update Cancel Close Help Required Figure 23 Unmeasured Variables Tab in the Stream Data Window To move to a particular variable enter the record number in the box adjacent to Go to Record button Then press enter or click on the Go to Record button to move to that variable To delete a variable first move to that variable and then click Delete To return to the main screen click on the close button To enter the data associated with a unit double click on the unit When you double click on the unit a data form similar to the one shown in Figure 22 is opened The measured variables unmeasured variables are entered in the same way as for the streams Let us proceed to enter the equality constraints for the Cross heat Exchanger unit Click on the Equalities tab in the Unit Data window to enter the equality constraints Let us enter the energy balance equation for the cross heat exchanger This equation is given in Section XII Clic
178. ta Click on the back button until you reach the process screen shown in Figure 85 Let us save the information entered so far by clicking on the Save button in the Process menu The program displays the Save the model as dialog box shown in Figure 90 The pollution index program stores the model as a file with pnd extension Let us save this model as aniline pnd in the Examples subdirectory of the program folder This concludes the implementation of the Pollution Index program in the Advanced Process Analysis System Click the Exit button in the process menu to return to the Advanced Process Analysis Desk The next section explains the use of the Chemical Reactor Analysis program Save in cu Examples gl c HF aniline Dsulfuric File name aniline Save as type PND files pnd Cancel Open as read only Z Figure 90 The Save As Window 100 IX USING CHEMICAL REACTOR ANALYSIS PROGRAM The chemical reactor program is an integral part of the Advanced Process Analysis System and the reactor feed flowrates and compositions are provided to the program from the database This section presents the screen images of the program with the aniline process model This will demonstrate how the reactor analysis program is integrated in the Advanced Process Analysis System Upon clicking on the Reactor Analysis button on the Advanced Process Analysis Desk shown in Figure 9 the
179. the time the program was started The file menu provides various options such as opening a new or an existing model This is shown in Figure 10 The Recent Models item in the file menu maintains a list of last four recently used models for easy access The Advanced Process Analysis Desk has five buttons leading to the five component programs which were described in earlier sections All of these can also be called using the process menu at the top This is shown in Figure 11 When a new model is opened only the Flowsheet Simulation button is available This is because the development of the process model using Flowsim is the first step in the implementation of the Advanced Process Analysis System Until the flowsheet simulation part is completed buttons for the other four programs remain dimmed and unavailable FS ES E Advanced Process Analysis System File Process Help cladvsysttempluntitled ioo 641498 4 12 PM Figure 9 Advanced Process Analysis Desk 32 EJ Advanced Process Analysis System Open Model Save As Recent Models gt Exit c ladvsys tempiuntitled ioo 8498 4 42PM Figure 10 The File Menu of the Advanced Process Analysis Desk E Advanced Process Analysis System Of x Tired pueda AeactorAtalvsis Eich ArelUsis Pallaton Inder cladvsystemp untitled ioo 8 11 98 4 12 PM Figure 11 The Process Menu of the Advanced Process Analysis Desk 33
180. timal set points and the profit from Economic Optimization are shown The Output Window with the Final Report is shown in Figure 49 The View menu in the Output window has three options named Final Report Full Output and Flowsheet The Final Report option has five options namely the Economic Objective the Measured Variables the Unmeasured Variables the Plant Parameters and the Stream Number as shown in Figure 50 The Economic Objective value is shown in Figure 49 62 Output of x File View Economic Objective Full Qutput File gt Value of Measured Variables E ca Elowsheet Value of Unmeasured Variables Estimated Plant Parameters Stream Number Data from Data Validation Data from Parameter Estimation Optimal Setpoints Figure 50 View Menu in the output Window When the option Measured Variables in the Final Report menu is clicked the system opens a spreadsheet data form which includes the optimal setpoints from economic optimization reconciled values from Data Validation reconciled values from Parameter Estimation and the plant data as shown in Figure 51 Clicking on Plant Parameters in the Final Report menu the system opens a spreadsheet data form that includes the estimated values of plant parameters as shown in Figure 52 Clicking on the Unmeasured Variables the system opens a spreadsheet data form which includes the unmeasured variables and their reconciled values
181. uares method This step provides the reconciled data and the updated parameter values in the plant model for economic optimization Finally optimal set points are generated for the distributed control system from the economic optimization using the updated plant and economic models This optimal procedure can be used for any process to conduct on line optimization B 2 Simultaneous Data Reconciliation and Parameter Estimation The general methodology for this is similar to the methodology of combined gross error detection and data reconciliation The difference is that the parameters in plant model are considered as variables along with process variables in simultaneous data reconciliation and parameter estimation rather than being constants in data reconciliation Both process variables and parameters are simultaneously estimated Based on Chen s study the least squares algorithm is used to carry out the combined gross error detection and data reconciliation The data set produced by the parameter estimation is free of any gross errors and the updated values of parameters represent the current state of the process These parameter values are now used in the economic optimization step B 3 Plant Economic Optimization The objective of plant economic optimization is to generate a set of optimal operating setpoints for the distributed control system This set of optimal setpoints will maximize the plant profit satisfy the current constraints in pla
182. umn in the first row This row is for the impact type acidification Enter the value 1 833153 Continue for each impact that has a non zero value as shown in Table 7 Repeat this for the remaining chemicals with impact potentials The final piece of information needed is the relative weighting factors For the aniline process let us keep the default values of 1 for all the weighting factors All of the information necessary for the calculation of the pollution indices has been entered in the program Now click on the Calculate Indices button to view the values of the six pollution indices defined earlier in Section I 97 Table 7 Environmental Impact Potential Values Ammonia Anilne Diphenylamine Phenol 1 833153 Ecotoxicity Effect 0 315757 0 02334 0 583193 0 069072 Aquatic Terrestrial Greenhouse Enhancement Human Toxicity 4 66E 05 8 58E 05 0 000163 8 58E 05 cri nre rar me mm Human Toxicity 1 019422 1 42719 0 178399 1 125544 Effect Soil Human Toxicity 4 66E 05 8 58E 05 0 000163 8 58E 05 Effect Water Ozone Depletion 0 0 Photochemical Oxidant Formation The program uses the data entered by the user to evaluate these indices and then displays the Index Calculations window shown in Figure 88 The indices on the left hand side are the indices based on the generation of potential environmental impacts and the indices on the right hand side are the indices ba
183. ut file Economic Optimization Program 02 12 01 09 49 34 PAGE 1 GAMS 2 504 Windows NT 95 98 2 5 6 SCALARS 7 h2 2 8 n2 28 3 nh3 17 10 h2o 18 11 ph 34 12 an 7937 13 dpa 21697 14 15 16 SCALARS 17 areaE100 5300 18 areaE102 1725 19 areaE103 760 20 areaE104 310 2 areaE105 2 22 23 SCALARS 24 dens h2 0 0349 Figure 55 Full Output File of GAMS Programs When the Full Output File option in the view menu is selected three buttons are displayed in the toolbar each corresponding to the three optimization problems Clicking a button will open the corresponding output file for viewing Let us click on the Data Validation option in the Full Output menu The full output file is shown in Figure 55 The user can use the Find and Goto options in the Edit menu to search for a particular phrase or go to a particular section in the Full Output file The Final Report can be exported as an Excel file using the Export option in the file menu The Full Output files can also be exported as a text file using the Export option The results can also be viewed as a flowsheet in a window similar to the one shown in Figure 44 Double clicking on a stream or unit opens the corresponding data window The Data window for stream s07 is shown in Figure 56 As seen in this figure the values of the measured variables obtained as a result of on line optimization are displayed in the d
184. utton changes to Cancel Then the information about the variable such as the name of the variable the plant data the standard deviation of the plant data should be entered The description initial point scaling factor lower and upper bounds and the unit of the variable are optional The changes can be recorded to the model by clicking on the Update button or can be cancelled by clicking on the Cancel button When the update button is clicked the caption of the cancel button reverts back to Refresh The Stream Data Window with the information appears as shown in Figure 22 In this way all the other measured variables associated with the stream s07 can be entered To enter the unmeasured variables associated with the stream click on the Unmeasured Vars tab As explained above for the measured variables click on the add button in the stream data window Enter the name initial point of the unmeasured variable The bounds scaling factor description and unit of the variable are optional The Stream Data window with the unmeasured variable data is shown in Figure 23 i Stream Data ioj x Stream ID 507 w Measured Vars Unmeasured Vars Equalities Inequalities Name Jo Description Total Flowate e Plant Data ae Initial Point 4250 Standard Deviation J 50 Scaling Factor Lower Bound 4240 Unit Ib mol hr Upper Bound 4300 ia lt Measured Variables 1 of 2 gt g
185. w pointing towards the table now becomes enabled Click on this button and the component gets transferred from the list to the table After repeating this for all seven components the screen looks as shown in Figure 71 The table Components present in this stream now has seven components but the list is not empty because there are components that are in different phases in the aniline process PALL da en en lee Siream Data t SAVE SAVEAS HELP ABOUT EXT la x Steam Name 507 Shear Darcniptian Silked Stream 5teans m He heat ii Tencewum sem Flow ote D E TA lt KQ Ndu Flowasie FinCoeficert 100 amp 4 mio Nda Fivaz wt Fou thie res ie Makw 4740 39454 r Comer Host Capactes S Z ot mnn sot Cid on tha iwan nave tp eke lt t it Show data arl tot the cunert aa C atdya To modiyarthaky data icr he cuum Cick haw Average arihalpy coeihicantz abs f EN A S a2 f Burtsyp w o1 T a2 T9 alts ae FINISH Figure 69 The Retrieving Stream Data Window with the Average Enthalpy Coefficients 78 Figure 70 The Enthalpy Data Window Figure71 The Enthalpy Window 2 79 PALL At LL Program Le ee fo SAVE SAVEAS HELP ABOUT EWT 218 x Sheen Nana S07 Steam Dexcipter Mead sirean Enthelpy deta for ciream z Ustotell components inthe process Companerts pragert inth steam List ot vanablos in he ma
186. waltewa E 2 Jowshcys Qro t Qos 0 where hey yD a T aT a T aT a through a are for liquid water j 34 d y H4 Qi 0 where h CT aT a T aT aT i NH H O PH AN s19 all chemicals use gaseous enthalpy coefficients H Q 103 7 Ug i A AM 0 eat Transfer AT OS Tew Boo T nT z Towa To B Lows 136 Table 31 The Constraint Equations for the Aniline Product Cooler E 104 Material Balances o A o AN _ GA I T fa f f Jf 1 0 Overall Sows 7 Sows 9 where CW cooling water H20 _ 20 _ 28 Joe 0 Jows fows 9 Species PH PH _ 0 28 2 Y AN AN _ 28 J 27 0 Energy Balances gt Sow Mowe Fowshows Q Doss 0 where hey yD aT aT a aT a through a are for water j 56 Overall i Le 4 HMs Qp 0 where h T a T aT aT aT i H O PH AN s27 all chemicals use liquid enthalpy coefficients On i 7 Ug i A AT 0 Heat ee M Transfer AT Tr Toys bs Tews _ n Towed Ls Tows 137 Table 32 The Constraint Equations for the DPA Product Cooler E 105 Material Balances e he g T f o 0 Sows 7 few where CW cooling water H O fows few 9 Species PH Sp OO DPA Fem u fno 0 Energy Balances fowsltews n L Jowahcya Q os Qu O where how 1 aT a T aT t a T a through a are for water j 7 8 Overall 2 ts d H Q is
187. ws the graph plotted with the concentration versus length of the reactor Similarly the graph can be plotted for temperature pressure or conversion These four variables concentration temperature pressure and conversion can also be plotted versus or volume of the reactor The results can also be viewed in a tabular form by clicking on the Data Grid option provided in the left bottom corner of the main window The results in the tabular form are shown in Figure 105 The data can be displayed as a function of reactor length or volume REACTOR FLOWSHEET C Advanced System Test Examples Latest aniline REC M Concentration Ibmol ft3 34 00 4250 51 00 5950 68 00 76 5 84 99 84 99 Length Ft 110 REACTOR FLOWSHEET Cz Advanced System TestiExamples Latest aniline REC 1 89906E 03 245 1 899061E 03 2 462E 05 245 245 1 899061E 03 1 899062E 03 245 245 1 899063E 03 1 899065E 03 2 462018E 05 3 383234E 02 4 830725E 04 1 674245E 02 jii 2 462042E 05 0 0994387 8 786975E 04 1 634682E 02 2 245 1 899067E 03 1 89907E 03 1 899073E 03 1 899083E 03 2 482074 05 9 905659E 02 1 262731E 03 1 596279E 02 2 2 462116E 05 9 868555E 02 1 635632E 03 EI 2 46217E 05 Uses Ds TS UE Tr 246224E 05 0 097975 2 349749E 03 1 487577E 02 3 2 462328E 05 0 0976347 2 691 765E 03 1 453375E 02 3 2 462439E 05 9 730387E 02 3 024252 03 1 420127E 02 4 1 89907 7E 03 2 462578E 05 9 69821 7E
188. xact relationships such as material and energy balances in the model The inequality constraints recognize the various bounds involved Examples of inequality constraints are upper limits on the temperature of certain streams or upper limits on the capacity of certain units A 2 Classification of Variables and Determination of Parameters After the constraints are formulated the variables in the process are divided into two groups measured variables and unmeasured variables The measured variables are the variables which are directly measured from the distributed control systems DCS and the plant control laboratory The remaining variables are the unmeasured variables For redundancy there must be more measured variables than the degree of freedom The parameters in the model can also be divided into two types The first type of parameters is the constant parameters which do not change with time Examples of these are reaction activation energy heat exchanger areas etc The other type of parameters is the time varying parameters such as catalyst deactivation and heat exchanger fouling factors These are treated as parameters because they change very slowly with time They are related to the equipment conditions and not the operating conditions A 3 Flowsim Interface Flowsim is used to develop the process model and it has a graphical user interface with interactive capabilities Process units are represented as rectangular shapes whereas t

Download Pdf Manuals

image

Related Search

Related Contents

MSI 990FXA-GD80  HGS ステンレス製 塗料レギュレーター取扱説明書  PA-N160-PA-N2160  Grasa para cojinetes con alta capacidad de carga  Emerson Fisher 1078 Installation Instructions  Kramer Electronics CPA-UAM/UAF  Gateway Photo Jukebox 8510388 User's Manual    synchrotac 706 series. data sheet and installation instructions  Folder 02 FR.indd  

Copyright © All rights reserved.
Failed to retrieve file