Sie sind auf Seite 1von 32

P.C.

Chau UCSD

ASPEN+

_______________ ASPEN PLUS: Bare Minimal Basics_______________


Why do we need to know the input language? Virtually all design packages now have graphics user interfaces. This is all a user can have with smaller design packages. Aspen Plus and PRO/II may be the only two remaining (big, comprehensive) applications that still support an input language. At this point of software development, we cannot be proficient until we have some idea how a simulation input is put together. You will see that the Aspen Plus (ModelManager) has dozens of forms and some of them have more than a few dozens of blanks. We will be lost in electronic space if we don't have an inkling what a complete input should entail and what the syntax of an input should look like. And when we simulate a huge processing plant, it is near impossible to check for bugs with the Aspen graphics interface. Moreover, if you need to make major changes of or insertion of sections into a large flowsheet, working on the input language file is the only sensible approach. How good do we have to be with the input language? Not much. Just simple input files with a flash drum or a column. Just to the extent that we understand how an input file is structured so we know how to fill in the blanks. At the learning stage, it is most helpful to be running ModelManager (well keep using this old term to refer to the GUI) and writing an input file "side by side." The input file helps us to use the forms in ModelManager, while the ModelManager helps us with the proper and allowable keywords to use in an input file. The ModelManager is quite efficient in importing an input (in the backup format) and in generating an input file. We will do quite a bit of both, taking advantage of what each tool is good for.

Table of Contents Simple examples .....................................................................................................................2 1. Flowsheet Translation .......................................................................................................6 2. The ASPEN PLUS Input: General Information ................................................................6 3. General Data Section ........................................................................................................7 4. Component Data Section ...................................................................................................8 5. Thermodynamic Data Section ..........................................................................................9 6. Stream Data Section .......................................................................................................10 7. Unit Operations Section .................................................................................................11 8a. Flash .................................................................................................................................11 8b. Utility Heater/Cooler .......................................................................................................12 8c. Shortcut Distillation .........................................................................................................13 8d. Rigorous Distillation .......................................................................................................13 9. Simple Heat Exchanger ..................................................................................................17 10. Mixer, Splitter, Separator, Pump, Compressor .............................................................19 11. The Design Specification Statement ..............................................................................21 Features to learn a bit later 12. Sensitivity Analysis .........................................................................................................23 13. Case studies .....................................................................................................................25 14. Optimization ....................................................................................................................26 15. Simulation Options .........................................................................................................28 16. Flowsheet convergence ..................................................................................................29 Features related to thermo and physical properties 17. Creating your own option set .........................................................................................29 18. Physical property tables and plots .................................................................................30 _______________________________________ Costing (feature discontinued).See comments within the files: cost1c.inp cost2c.inp

P.C. Chau UCSD

ASPEN+

Simple Examples Before we introduce formally the syntax of the input, let's take a look at several input data files and see if you can guess what they do. They are based on our homework problems in separation processes. Some of the more important key words are in bold face. The sample files are already in the /public/aspen subdirectory. It is highly recommended that you only print them. Typing your own input (even though it may be verbatim to the samples) is extremely helpful to get a handle on writing input files yourself later. ___________________________________________________________________Example: flash1.inp The 112 homework couldn't be easier!
TITLE "Simple isothermal flash calculation" DESCRIPTION "Isothermal flash of given feed at 100F and 500 psi" IN-UNITS ENG DATABANKS ASPENPCD COMPONENTS H2 HYDROGEN / C1 METHANE / BZ BENZENE / TOL TOLUENE ;defines ENGLISH units to be used ;selects the Aspen component databank ;defines the components to be used; the listing is in the manual ;the first word (e.g. C1) is up to you, the second (METHANE) is ;used by the databank

FLOWSHEET ;defines the connectivity of the unit operations in the flowsheet BLOCK B1 IN=1 OUT=2 3 PROPERTIES RK-SOAVE ;defines the SRK thermodynamic property option set ;defines the feed stream (T,P) and component flow rates STREAM 1 TEMP=100 PRES=500 MOLE-FLOW C1 2000 / BZ 2000 / TOL 500 ;finally defines the unit operation; choosing FLASH2 from the ;manual to do simple flash calculations BLOCK B1 FLASH2 DESCRIPTION "ISOTHERMAL FLASH AT SPECIFIED T & P" PARAM PRES=500 TEMP=100

In the B1 block, the inlet and outlet flow streams are defined earlier by FLOWSHEET. There is no clear and explicit specification which is the vapor and which is the liquid product. It's up to ASPEN! Generally, the lighter product comes first. ___________________________________________________________________Example: flash2.inp For adiabatic flash, the FLASH2 block will appear as:
BLOCK B1 FLASH2 DESCRIPTION "ADIABATIC FLASH AT SPECIFIED PRES" PARAM DUTY=0 PRES=34

In the input file flash2.inp, note that the unit specification statement is
IN-UNITS ENG PRESSURE=ATM ;override default psi with atm

The values of pressure in both the STREAM and BLOCK statements are all in atm. ___________________________________________________________________Example: flash3.inp For Problem 7.26(b) in Henley & Seader, we need to vaporize 25% of the feed stream. The FLASH2 input is listed as follows. See if you can fix the rest (i.e., COMPONENT and STREAM). The keyword VFRAC means vapor fraction.
BLOCK B1 FLASH2 DESCRIPTION "VAPORIZE 25% OF THE FEED AT 50 PSI"

P.C. Chau UCSD

ASPEN+

PARAM PRES=50 VFRAC=.25

___________________________________________________________________Example: flash4.inp We can find the bubble and dew points of a process stream with the module HEATER. If you take a closer look at FLASH2, it can do it too. We are using HEATER as a way to introduce a new module. HEATER has only one product. (FLASH2 has two and one of them will be a dummy if you set the outlets at either the bubble or dew points.) In this example, the pressure is specified and we calculate the bubble and dew point temperatures. If you specify the temperature, we'll calculate the bubble and dew point pressures. In many cases, we want to know more about a process stream than just two points. That's what a "heating curve" does. Adding the heating curve to a block will generate a table (and plot) of vapor fraction, heat duty, temperature, pressure, etc. at immediate points between the inlet and outlet conditions. The heating curve can be used with both the HEATER and FLASH2. Some key statements from flash4.inp:
FLOWSHEET BLOCK H1 IN=1 OUT=2 BLOCK H2 IN=2 OUT=3 BLOCK DRUM IN=3 OUT=4 5 ; other input statements... ;set vapor fraction to zero to get bubble pt. (recall 112?) BLOCK H1 HEATER DESCRIPTION "GET THE BUBBLE POINT" PARAM PRES=34 VFRAC=0 ;set vapor fraction to unity to get dew pt. BLOCK H2 HEATER DESCRIPTION "GET THE DEW POINT" PARAM PRES=34 VFRAC=1.0 HCURVE 1 HEADING="Heating Curve from feed temp to dew pt." BLOCK DRUM FLASH2 DESCRIPTION "JUST AN EXAMPLE TO ILLUSTRATE HCURVE" PARAM TEMP=120.0 PRES=30 HCURVE 1 HEADING="Feed Strm Heating Curve" PRINT-PLOT=YES ; ; The option PRINT-PLOT=yes gives you a "plot" on the line printer ; It is ignored in the ModelManager

___________________________________________________________________Example: col1.inp A simple example for doing a shortcut calculationsomething that you must do before you can set up the rigorous column calculations. Key statements from col1.inp:
TITLE "Example of a shortcut column" DESCRIPTION "Data taken from Henley & Seader Figure 12.3 For a debutanizer " ; ; other statements... ; COMPONENTS IC4 C4H10-2 IC4 / NC4 C4H10-1 NC4 / IC5 C5H12-2 IC5 / NC5 C5H12-1 NC5 / C6 C6H14-1 C6 / C7 C7H16-1 C7 / C8 C8H18-1 C8 / C9 C9H20-1 C9 FLOWSHEET BLOCK COL IN=S1 OUT=S2 S3 and D ;again Aspen is never clear with the designations of B

STREAM S1 TEMP=180 PRES=80 MOLE-FLOW IC4 12 / NC4 448 / IC5 36 / NC5 15 / C6 23 / C7 39.1 / C8 272.2 / C9 31

&

P.C. Chau UCSD

ASPEN+

BLOCK COL DSTWU DESCRIPTION "THE SHORTCUT COLUMN" PARAM LIGHTKEY=NC4 RECOVL=0.98 HEAVYKEY=IC5 RECOVH=0.05 PTOP=84 PBOT=89 RDV=1 RR=-1.3 PLOT=YES

&

The parameter statement in the DSTWU module specifies the light and heavy keys and their recoveries from the top of the column, the pressures at the condenser and reboiler, and the product is going to be vapor (RDV=1 sets vapor product at its dew point; RDV=0 means bubble point liquid product). As for the operating reflux ratio, we want it to be 1.3 times the minimum reflux ratio (i.e., setting R/Rmin=1.3). Note the minus sign. A positive number means the actual reflux ratio, which, of course, we usually don't know. There is no provision for specifying N/Nmin. ___________________________________________________________________Example: col2.inp From the shortcut calculation, we determine the appropriate (at least to begin with; no guarantee that the numbers will work) number of stages, feed stage location, and the operating reflux ratio. We can now do the rigorous column. See if you can guess what the statements mean. The comments (answers) are in the actual input file. Key statements from col2.inp:
BLOCK COL RADFRAC PARAM NSTAGE=16 FEEDS S1 4 PRODUCTS S2 1 L / S3 16 L P-SPEC 1 84 / 15 89 COL-SPECS MOLE-RDV=0 MOLE-B=470 MOLE-RR=0.74 SPEC 1 MOLE-RECOV .99 COMPS=NC4 STREAMS=S2 SPEC 2 MOLE-RECOV .64 COMPS=IC5 STREAMS=S3 VARY 1 MOLE-B 100 800 VARY 2 MOLE-RR 0.4 1

___________________________________________________________________Example: ex3.inp Let's look at a simple flowsheet and its input file. Run this input and examine the output, in particular the column unit summary. Remember that unit calculations in ASPEN PLUS proceed in a sequential manner. The calculation sequence is effectively defined in the FLOWSHEET section of the input file.

7 Expander 3 6 1 Column

1 2 Chiller

5 SEP (adia)

10 theoretical trays ratio of flow rates of C1 to C2 in bottoms = 0.11

4 Valve

9 10 8

In this example, the internal cooler of an isothermal flash drum is moved outside, and treated as a utility heater (or cooler). The flash will now be specified as adiabatic. There is no reason why you cannot put them back together as an isothermal flash. In fact, as an exercise, try it and run the input again. ASPEN PLUS does not have a valve or an expander. We have to use the HEATER again to simulate them and there is no way to include the 80% efficiency in the expander. The ex3.inp file is:

P.C. Chau UCSD

ASPEN+

TITLE "EXAMPLE 3" IN-UNITS ENG COMPONENTS N2 N2 N2 / C1 CH4 C1 / C2 C2H6 C2 / C3 C3H8 C3 / IC4 C4H10-2 IC4 / C4 C4H10-1 C4 / IC5 C5H12-2 IC5 / C5 C5H12-1 C5 / NC6 C6H14-1 NC6 / NC7 C7H16-1 NC7 FLOWSHEET BLOCK BLOCK BLOCK BLOCK BLOCK CHILLER SEP EXPANDER VALVE COLUMN IN=S-1 IN=S-2 IN=S-3 IN=S-4 IN=S-5 S-6 OUT=S-2 OUT=S-3 S-4 OUT=S-6 OUT=S-5 OUT=S-7 S-8

PROPERTIES PENG-ROB STREAM S-1 TEMP=120.0 MOLE-FLOW N2 7.910 IC4 .990 NC6 .420 PRES=588.0 MOLE-FLOW=100.0 / C1 73.050 / C2 7.680 / C3 5.690 / & / C4 2.440 / IC5 .690 / C5 .820 / & / NC7 .310

BLOCK CHILLER HEATER DESCRIPTION "COOLING FEED DOWN FOR ADIABATIC FLASH" PARAM TEMP=-84.0 PRES=-5.0 BLOCK SEP FLASH2 DESCRIPTION "ADIABATIC FLASH DRUM" PARAM PRES=583.0 DUTY=.0 BLOCK EXPANDER HEATER DESCRIPTION "FAKE EXPANDER" PARAM PRES=125.0 DUTY=.0 BLOCK VALVE HEATER DESCRIPTION "FAKE VALVE" PARAM PRES=125.0 DUTY=.0 BLOCK COLUMN RADFRAC DESCRIPTION "COLUMN NOT ADDRESSING THE FIGURE. ANSWER NEAR END OF NOTES" PARAM NSTAGE=10 FEEDS S-5 3 / S-6 1 PRODUCTS S-7 1 V / S-8 10 L P-SPEC 1 125.0 / 10 130.0 COL-SPECS MOLE-RDV=1.0 MOLE-D=80.30 MOLE-RR=.10 ;A simpler specification example SPEC 1 MOLE-RECOV .99 COMPS=C1 STREAMS=S-7 ;99% recovery of C1 from top SPEC 2 MOLE-RECOV .89 COMPS=C2 STREAMS=S-8 ;89% recovery of C2 from bottom VARY 1 MOLE-D 1 99 VARY 1 MOLE-RR 0.001 0.5

; This input file, with two recovery specifications, does not address the specification in the flowsheet diagram. We need to learn DESIGN-SPEC before we can do it right. Let's skip it for now. We'll come back to it later near the end of these notes.

P.C. Chau UCSD

ASPEN+

I. Introduction ASPEN PLUS is a comprehensive steady-state mass and energy balance flowsheeting program with broad applications in the petroleum, petrochemical, chemical and synthetic fuels industries. The program belongs to the sequential modular class of simulators with a loop analyzer to handle recycle streams. The program has an extensive component data library along with up-to-date thermodynamic estimation methods. It has versions to run on Microsoft Windoze, and on various UNIX workstations and supercomputers.

1. Flowsheet Translation A process flowsheet represents the flow of mass and energy through various pieces of equipment (unit) in an operating plant. It should accurately reflect the relationships among all the streams and units. (Figure 1.1 in an old Aspen manual shows an example of a process flowsheet containing different unit operations.) Prior to using a simulation package, the flowsheet must be transcribed to make it amenable to the program. The task is accomplished by adding identification labels to each process stream and unit operation, and identifying the feed and product trays of the column. (The resulting simulation flowsheet is shown in Figure 1.4, page 1-12, of the Aspen manual).

2. The ASPEN PLUS Input: General Information There are six major "classes" of information required in each simulation input file: 1. General Data Title and descriptions of the problem for reference. Options that you may want to choose to override the default settings in the program. Examples are choices of units, output formats and convergence tolerances. Identify the chemical components to be used in the simulation. Choose the thermodynamic estimation methods that will be used. Define the input flow streams: temperature, pressure, flow rate and composition. Define the flowsheet: the interconnecting streams in between "blocks" Selection of unit operations (i.e., defining what the "blocks" are), and specification of operating conditions.

2. Component Data 3. Thermodynamic Data 4. Stream Data 5. Flowsheet connectivity 6. Unit Operations Data

Primary and Secondary Key Words In ASPEN PLUS jargon, each group of information (e.g., COMPONENTS, FLOWSHEET, BLOCK, etc.) is called a paragraph. The leading key word is a primary keyword and must start in column one of the input file. Each paragraph is made up of sentences (e.g., PARAM, FEEDS, SPEC, etc. of the RADFRAC rigorous distillation block), and the leading entry is the secondary keyword. The secondary keywords cannot begin in column one. The other keywords (e.g. TEMP, PRES, MOLE-RR, etc.) within a sentence are tertiary keywords. There is no restriction on the ordering of the key words. How can we tell what is primary and what is secondary? When do we really need to add "&" for continuing a line? Well, no easy way other than to follow examples and read those input files exported by the ModelMananger. Delimiters There are several symbols with a special meaning (delimiters): = The equal sign is used to associate data with a key word, e.g., TEMP=100 / The slash is used to separate groups of data in the same entry, e.g., 1, METHANE/ 2, ETHANE/ 3, PROPANE

P.C. Chau UCSD

ASPEN+

&

The continuation mark. When it appears at the end of a line, the next line is considered as a continuation of the previous line on which the ampersand appears. The mark cannot be between a key word and its argument, i.e., you cannot break up TEMP=100. (Do not use the continuation mark on a DESCRIPTION statement. Just hit return and end with a double quote.)

[ ] Square brackets are used to define the unit of one particular entry. For example, if ENG units are being used, PRES=2 [ATM] defines the entry as being 2 atm as opposed to 2 psi. Also acceptable is < >. ; The colon is used for comments. Anything appearing on a line after a colon will be ignored. This feature is useful in providing documentation in the input. Alphanumeric Entries Alphanumeric entries such as the id of a stream or an unit operation (block) are restricted to eight characters. Basis of flow Many entries are in the form of, for example, MOLERR. You can substitute MOLE with MASS or STDVOL for mass or standard liquid volume basis. For clarity, these notes stick with the mole basis exclusively. In the following sections, we will emphasize only the most commonly used statements and entries. These notes cannot replace the manual. They are meant to help you hobble along before you have a chance to attack the manual.

3. General Data Section Sample input statements (or paragraphs according to ASPEN). They all start in column one.
TITLE "Just put the title of the project in double quotes" DESCRIPTION " Put the description of the project in double quotes too. Just hit return and do no use &. ASPEN will only print in upper case. " IN-UNITS ENG PRESSURE=ATM STREAM-REPORT MOLEFLOW MOLEFRAC INCL-STREAMS=DISTL BOTM

FLOWSHEET-REPORT NOTOTBAL NOCOMPBAL NODESCRIPTION BLOCK-REPORT NOTOTBAL NOINPUT

The TITLE and DESCRIPTION statements are there so we know what we are trying to do when we read the output. The default units are defined by IN-UNITS. The options are ENG, SI, or MET. As shown here, you can override the default units of specific quantities. The table of the units key word from the OLD manual (Table 3.1) is attached at the back of these notes. If you want the printout to include the mole fractions of the components in a process stream, you have to tell the program with STREAM-REPORT. You have to use both the MOLEFLOW and MOLEFRAC keywords if you want both molar flow rates and mole fractions. If you want the mole fractions only on the product streams, say the streams called DISTL and BOTM, then the INCL-STREAMS will restrict the mole fraction report to these streams. If you omit the INCL-STREAMS entry, the mole fractions will be generated for all the streams. If you want to save paper, there are a couple of things you can do. One is to delete the junk before you print the output file. The other is to add key words to restrict what is to be printed in the report. The FLOWSHEET-REPORT example here suppresses the printing of total mass and energy balance, component balance, and the description of the flowsheet connectivity and some other things.

P.C. Chau UCSD

ASPEN+

The BLOCK-REPORT example here suppresses the printing of total mass and energy balance, and the summary of user input and system defaults of each unit operation. What you want to delete and how soon you do it will depend on how well you are coming along in setting up the input file and solving your problem.

4. Component Data Section Example: Suppose we have to process a feed stream. It is available at 600 psi and 120 F, its phase unknown. The feed stream rate is 200 lb moles per hour with the following composition: Component Nitrogen Methane Ethane Propane i-Butane n-Butane i-Pentane n-Pentane n-Hexane n-Heptane Mole Percent 7.91 73.05 7.68 5.69 0.99 2.44 0.69 0.82 0.42 0.31

We will need the stream data section later to define the properties and flow rate. For now, we use the following statements to identify the components that we need in the simulation:
DATABANKS ASPENPCD COMPONENTS N2 N2 N2 / C1 CH4 C1 / C2 C2H6 C2 / C3 C3H8 C3 / IC4 C4H10-2 IC4 / C4 C4H10-1 C4 / IC5 C5H12-2 IC5 / C5 C5H12-1 C5 / NC6 C6H14-1 NC6 / NC7 C7H16-1 NC7

The DATABANKS is actually optional, since we mostly use the default ASPEN library. As for the COMPONENTS, the first item is the component id to be used in the input file and the second item is the alias used by the ASPEN library, something that we have to look up the reference manual to find out. (The ModelManager helps too, but we'll get to it later.) The third item is the component id to be used in the print out and it is optional. It is also limited to eight characters. All the following input are acceptable. We'll only use the first three components as an example:
COMPONENTS ;list more than one component on a line N2 N2 N2 / C1 CH4 C1 / C2 C2H6 C2 COMPONENTS ;omit the output id, the printout will use the input id N2 N2 / C1 CH4 / C2 C2H6 COMPONENTS ;use 1, 2, 3, etc. in the input file but notations for the output 1 N2 N2 / 2 CH4 C1 / 3 C2H6 C2

It is generally useful to arrange the components in order of descending volatility. It is not that ASPEN PLUS cannot handle random component orders, but the habit helps us to read and interpret the output tables. If there are

P.C. Chau UCSD

ASPEN+

light gases such as nitrogen and hydrogen, list them first too. Along the same vein, if the components include water and hydrocarbons, list water either first or last. It will help us to spot in the output tables if water is present in a stream or if there may be three phases.

5. Thermodynamic Data Section After we have defined the components to be used, we have to select the methods to calculate quantities such as enthalpies, entropies, K-values and other phase equilibria values, densities and other transport properties, and so on. Let's suppose we want to choose the Peng-Robinson equation of state as the basis for the simulation, this is all we have to do:
PROPERTIES PENG-ROB

Well, the first question is: What the heck is hiding inside, for example, PENG-RB? It used to be worsethe older version up until 1993 used SYSOP4. ASPEN PLUS packages the more common thermodynamic methods into their so-called option sets. One way to find out what they are is to look up the manual. What we will end up using is the nice and informative on-line help with ModelManager. Users can supply their own thermodynamic data or binary interaction parameters. Most likely the case is when a company may wish to incorporate actual plant operating data or other proprietary data in a simulation. Selection of thermodynamic methods which are appropriate to a given mixture is one of the most crucial decisions. The choice of a thermodynamic data generator for your simulation should be based on three characteristics: (1) temperature range, (2) pressure range, and (3) composition. Misuse of methods will give results that are physically meaningless. Hence, until you are good at it, it is (generally) more convenient and safer to select a predefined system put together by professionals. [The version of PRO/II with the graphics interface has an expert system to make recommendations on appropriate methods, but we have no such luck.] The following are some of the more common systems which are described in Chapter 5 of Henley and Seader. On the left are the acronyms used in these notes. SRK Soave-Redlich-Kwong cubic equation of state. Well suited for hydrocarbon systems in gas and refinery processing. Peng-Robinson cubic equation of state. Well suited for hydrocarbon systems in gas and refinery processing. Grayson-Streed is an extension and is preferred to the Chao-Seader correlation in the calculation of K-values. Used primarily in petroleum refinery applications. Benedict-Webb-Rubin-Starling equation of state. For light hydrocarbon systems common in gas and refinery processing. (Not discussed in Henley & Seader, but is used in the industry.) Van Laar liquid activity coefficient model for "slightly" nonideal mixtures. Use the Wilson equation in calculating liquid activity coefficients and hence the K-values. Used with "fairly" nonideal but miscible liquid mixtures. Non-Random Two Liquid model is an extension of the Wilson equation. Used with mixtures which can form two immiscible liquid phases. Universal Quasi-Chemical (UNIQUAC) Functional-Group Activity Coefficient group contribution method. Well, read Henley & Seader. We'll have more of it later in the quarter.

PR

GS

BWRS

VAN LAAR WILSON

NRTL

UNIFAC

Here are some more tidbits: Low pressure crude systems, use SRK or PR especially if light ends predominate near the top of a tower.

P.C. Chau UCSD

ASPEN+

10

High pressure crude systems, use SRK or PR; GS is faster but less accurate in the presence of a high concentration of light components. Reformers with high hydrogen content, use SRK or PR. Aromatic components only, use SRK or PR. Mixtures with aromatics and nonaromatics, use a liquid activity method such as NRTL. Use UNIFAC to estimate any missing binary interaction parameters. Non-hydrocarbon or non-ionic systems containing oxygen, halogen, nitrogen or derivatives of hydrocarbons that tend to be highly nonideal. If you know there is only one liquid phase, use WILSON, the simplest and fastest. For systems with two liquid phases, use NRTL or UNIQUAC. Use UNIFAC to estimate any missing binary interaction parameters. Stripping dilute pollutants out of water in environmental applications. Use Henry's Law together with a liquid activit coefficient model such as VAN LAAR or WILSON. Selection criteria for calculating K-values from the Simulation Science manual. They may not be identical to those used in ASPEN, but should be close. (The key words are those used by Simulation Science.) Practical temperature and pressure limits Key word CS Chao-Seader GS Grayson-Streed SRK PR Peng-Robinson LKP BWRS Name 0-500 0-800 Soave-Redlich-Kwong full range Lee-Kesler-Plocker Benedict-Webb-Rubin-Starling T range (F) <1500 <3000 full range <5000 full range full range <5000 <5000 <5000 P range (psia)

6. Stream Data Section Example: This is how we can define the physical conditions of the feed stream example in the component data section. Option 1, using the actual flow rate:
STREAM S-1 TEMP=120.0 MOLE-FLOW N2 7.910 IC4 .990 NC6 .420 PRES=588.0 / C1 73.050 / C2 7.680 / C3 5.690 / & / C4 2.440 / IC5 .690 / C5 .820 / & / NC7 .310

or option 2, using the mole fraction:


STREAM S-1 TEMP=120.0 PRES=588.0 MOLE-FLOW=100 MOLE-FRAC N2 0.0791 / C1 0.7305 / C2 0.0768 / C3 0.0569 / & IC4 .0099 / C4 0.0244 / IC5 .0069 / C5 .0082 / & NC6 .0042 / NC7 .0031

Under most circumstances, you must define the temperature and pressure. (This follows what you learned in Chapter 6 of Henley & Seader.) If you specify the temperature or the pressure only, you must also specify the vapor fraction of the stream (e.g., VFRAC=0.8)

P.C. Chau UCSD

ASPEN+

11

You can set the feed stream at its bubble point with the use of VFRAC=0. Specify TEMP and VFRAC=0; the program will set the stream at its bubble point pressure. Specify PRES and VFRAC=0; the program will set the stream at its bubble point temperature. Likewise, when only either TEMP or PRES is given, VFRAC=1 sets the stream at its respective dew point. The input file generated by the ModelManager will include some other entries and other keywords like SUBSTREAMS. Ignore them and just leave them there. SUBSTREAMS are internal flows in columns that we hardly ever use, at least in this introductory course.

7. Unit Operations Section Now we are ready to go through the unit operations. The first order of business is to define the feed and product streams of all the unit operations in the flowsheetthe so called flowsheet connectivity. The unit operation ids can be B1, B2, etc.; they don't mean anything until we define them later with the BLOCK statements. The unit operations will be calculated according to the sequence (connectivity) in the flowsheet, and not according to the order listed in the input file. Example: the following input for ex3.inp works just as well:
FLOWSHEET BLOCK BLOCK BLOCK BLOCK BLOCK COLUMN CHILLER EXPANDER VALVE SEP IN=S-5 S-6 OUT=S-7 S-8 IN=S-1 OUT=S-2 IN=S-3 OUT=S-6 IN=S-4 OUT=S-5 IN=S-2 OUT=S-3 S-4

In many processes, for example, supercritical fluid extractions, the pressures can be very different in various units. Obviously, the thermodynamic methods will be different for these units too. One way to handle more than one thermodynamic method is to divide the flowsheet into sections. A different thermodynamic option set is chosen for each section. In the following example, we presume some units operate at a much higher pressure than others and we choose the PENG-ROB to handle these units. We choose RK-SOAVE to handle the other units which presumably operate at moderate pressures.
FLOWSHEET BLOCK BLOCK BLOCK HIGHP SEP IN=S-2 CHILLER IN=S-1 EXPANDER IN=S-3 OUT=S-3 S-4 OUT=S-2 OUT=S-6

FLOWSHEET LOWP BLOCK VALVE BLOCK COLUMN

IN=S-4 OUT=S-5 IN=S-5 S-6 OUT=S-7 S-8

PROPERTIES PENG-ROB HIGHP / RK-SOAVE LOWP

8a. Flash This module does simple two phase flash related calculations (flash drums, knock-out drums, evaporators). FLASH2 can have a water decant stream, but you need FLASH3 if you want to handle three-phase calculations rigorously. Some typical examples:
BLOCK UNITID FLASH2 DESCRIPTION "Isothermal flash" PARAM TEMP=30, PRES=100

P.C. Chau UCSD

ASPEN+

12

BLOCK UNITID FLASH2 DESCRIPTION "Adiabatic flash" PARAM DUTY=0, PRES=120 ;of course can specify flash at a temp BLOCK UNITID FLASH2 DESCRIPTION "60% of total feed becomes vapor product" PARAM PRES=30, VFRAC=0.6 ;of course can specify TEMP instead of PRES HCURVE 1 HEADING="Generate a heating curve"

If the value of pressure is a negative number (e.g., PRES=-5), the value represents the pressure
drop in the unit from the feed.

If you want more general specifications, like percent recovery or purity of a component, you'll need to learn DESIGN-SPEC. Just a reminder: the feed and product streams are defined in FLOWSHEET. The vapor product comes before the liquid product (i.e., OUT=VAP LIQ). Like HEATER, we can use FLASH2 to do dew point and bubble point calculations. Say, for the dew or bubble point temperature, we specify:
PARAM PARAM PRES=30, VFRAC=1 PRES=30, VFRAC=0 ;gets dew point temperature ;gets bubble point temperature

When you use DEW or BUBBLE, a second pseudo-outlet stream will also be created with zero flow rate. Do not feed it to other units. Using HEATER to do the calculation avoid the possibility of this mistake. You can add HCURVE to generate the heating curve (as in the last example above). We usually only need one, so the curve number is 1.

8b. Utility Heater/Cooler Other than doing dew and bubble point calculations, HEATER is really meant for using as a utility heater or cooler. But it can also represent valves, pumps, and compressorsany operations with a change in pressure. Some typical examples:
BLOCK UNITID HEATER DESCRIPTION "SET OUTLET TO BUBBLE PT TEMP, VFRAC=1 FOR DEW POINT" PARAM VFRAC=0, PRES=14.7 BLOCK UNITID HEATER DESCRIPTION "SET OUTLET TO SPECIFIED T & P" PARAM TEMP=130, PRES=14.7 BLOCK UNITID HEATER DESCRIPTION "SPECIFY TEMPERATURE CHANGE, -VE FOR COOLING" PARAM PRES=14.7, DELT=20 BLOCK UNITID HEATER DESCRIPTION "SPECIFY 10 DEG BELOW BUBBLE TEMP" PARAM PRES=14.7, DEGSUB=10 BLOCK UNITID HEATER DESCRIPTION "SPECIFY 10 DEG ABOVE DEW TEMP" PARAM PRES=14.7, DEGSUP=10 HCURVE 1 HEADING="Can generate heating curve"

As in FLASH2, if the value of pressure is a negative number (e.g., PRES=-5), the value represents the pressure drop in the unit from the feed. As in FLASH2, you can add HCURVE to generate the heating curve.

P.C. Chau UCSD

ASPEN+

13

8c. Shortcut Distillation The DSTWU module uses the Winn-Underwood-Gilliland shortcut calculations in Chapter 12 of Henley and Seader. The Winn's method (can look up in Perry's Handbook) is used to estimate the minimum number of stages. Example of a simple single-feed two-product column:
BLOCK UNITID DSTWU DESCRIPTION "A simple shortcut column" PARAM LIGHTKEY=C1 RECOVL=0.99 HEAVYKEY=C2 RECOVH=0.01 PTOP=84 PBOT=89 & RDV=0.0 RR=-1.2 & PLOT=YES

&

A few explanations: Like FLASH2, the distillate product comes before the bottoms in FLOWSHEET. The light and heavy keys are specified by LIGHTKEY and HEAVYKEY. The RECOVL and RECOVH specify the recoveries of the light and heavy keys from the distillate. PTOP is the pressure of the condenser (first theoretical stage); PBOT is the pressure of the reboiler. RDV is the molar vapor fraction of the distillate: RDV=1 means a vapor product at its dew point RDV=0 means a total condenser with a liquid product at its bubble point RR is the reflux ratio. If the value is negative, it would represent the ratio to the minimum reflux, i.e., R/Rmin . If you add PLOT=YES, the program will generate a plot of actual reflux ratio versus actual number of stages. When you read the results, the top stage is always number one.

8d. Rigorous Distillation This module solves the general heat and mass balances of equilibrium staged operations and thus theoretically applies to gas absorption, stripping operations and liquid-liquid extractions as well as distillations. (Of course, we are only applying the concept of theoretical stages to absorptions or liquid-liquid extractions that use a continuous column.) With respect to distillation, we should get, from a shortcut calculation, the information on the number of stages, the feed location, the reflux ratio, the distillate and bottom flow rates, and so on. These numbers may not work, but at least they should be close. Before we go through the key words, here is a simple example:
BLOCK UNITID RADFRAC PARAM NSTAGE=24 EFF=MURPHREE FEEDS FD1 8 / FD2 12 ;two feeds on stages 8 and 12 from top PRODUCTS DISTL 1 V / BOTM 24 L ;vapor product from top; liq prod from bottom P-SPEC 1 84 / 24 89 STAGE-EFF 1 0.5 / 24 0.5 ;50% Murphree eff. ; COL-SPECS MOLE-RDV=1 MOLE-D=780 MOLE-RR=0.74 SPEC 1 MOLE-RECOV .99 COMPS=NC4 STREAMS=DISTL ;simple recovery specs SPEC 2 MOLE-RECOV .64 COMPS=IC5 STREAMS=BOTM VARY 1 MOLE-D 100 800 ;by varying the D and RR VARY 2 MOLE-RR 0.4 1 ; TRAY-SIZE 1 2 23 CAPS NPASS=1 ;doing tray sizing with bubble caps

Now, we'll try to go through the more common key words. These notes will get you started, but you really have to read the Input Manual to see all the other fancy options. (Of course, ModelManager helps too.)

P.C. Chau UCSD

ASPEN+

14

Secondary key words for RADFRAC PARAM Mainly defines the number of theoretical stages. Example:
PARAM NSTAGE=23 ALGORITHM=NONIDEAL EFF=MURPHREE

Trays are always numbered from top to bottom. If there is a condenser, it is tray number 1. (Essentially it is the first theoretical stage with an associated cooler. See Henley & Seader, Chapter 15.) If there is a reboiler, it is the bottom tray. Options for ALGORITHM:
STANDARD NONIDEAL 3-PHASE - the default if you omit the entry - better to handle nonideal mixtures - handle three phase mixtures rigorously - vaporization efficiency (the default); the def. is: yi,j= Ei,j Ki,jxi,j - (vapor) Murphree efficiency, as defined in

Options for EFF:


VAPOR

MURPHREE H&S

Condenser and reboiler?

There is no stages identified explicitly as the condenser and reboilers, but they are there when you do costing calculations. Whether it is a partial or total reboiler depends on the value of RDV. As we all know, the reboiler is the bottom theoretical stage and a partial reboiler is the top one. You don't have choices for superheated or subcooled distillates. Identify the feed streams and the feed tray numbers. Simple example is to specify the feed stream ids and the stage numbers:
FEEDS FD1 8 / FD2 12

FEEDS

Stages numbers always start from the top. The default will put the feed in the interstage region above the designated stage. PRODUCTS Like the feeds, we have to tell the program from what stages we are taking the products and the ids of the streams. In the following example, there is also a liquid sidedraw from stage 5.
PRODUCTS DISTL 1 V / SIDE 5 L / BOTM 24 L

The phase specification of the distillate must be consistent with the RDV specification in COL-SPEC. P-SPEC We must specify the pressure on all the trays. Simple example is to specify the stage number and the pressure associated with it at the top and the bottom of the column:
P-SPEC 1 84 / 24 89

You can just specify the pressure at the top and then use the DP-STAGE or DP-COL in COL-SPECS.

P.C. Chau UCSD

ASPEN+

15

COL-SPEC

This statement specifies the distillate vapor fraction and other stuffs like distillate flow rate, bottoms flow rate, reflux ratio, etc. If the quantities are being varied by the VARY statement, the numbers in COL-SPECS are taken as initial guesses. No rules on the number of specifications. So review Henley and Seader Chapter 6 and be on your toes. Example:
COL-SPECS MOLE-RDV=1 MOLE-D=780 MOLE-RR=0.74

Your options:
MOLE-RDV MOLE-D MOLE-B D:F B:F MOLE-RR MOLE-L1 MOLE-VN MOLE-BR Q1 QN DP-STAGE DP-COL - distillate vapor fraction - distillate flow rate (D) - bottoms flow rate (B) - molar ratio of distillate to total feed flow rate (D/F) - molar ratio of bottoms to total feed flow rate (B/F) - reflux ratio (L1/D) reflux flow rate boilup flow rate boilup ratio (VN/B) top stage (condenser) heat duty bottom stage (reboiler) heat duty

- pressure drop per stage - pressure drop of the column

STAGE-EFF

Specify the value of vaporization or Murphree efficiencies. It won't work with three phase calculation: ALGORITHM=3-PHASE. Syntax is similar to that of P-SPEC. Example:
STAGE-EFF 2 0.5 / 24 0.5 ;50% efficiency from stages 2 to 24

SPEC

Make purity, recovery or simply flow rate specifications on the performance of the column. The syntax is the specification number followed by the specification type FRAC, RECOV, or FLOW) and the specific components. Simple examples:
SPEC 1 MOLE-RECOV .99 COMPS=NC4 STREAMS=DISTL SPEC 2 MOLE-RECOV .64 COMPS=IC5 STREAMS=BOTM

Simple options:
MOLE-FRAC - component purity MOLE-RECOV - component recovery MOLE-FLOW - flow rate of one or a group of components COMPS STREAMS - list of comp ids (separated by space) - list of stream ids

P.C. Chau UCSD

ASPEN+

16

VARY

One VARY per SPEC statement. Initial guesses must be provided, in simple cases, in COL-SPECS. The initial guesses must be bracketed by the lower and upper bounds stated in VARY. Simple examples:
VARY 1 MOLE-D 100 800 VARY 2 MOLE-RR 0.4 1 ;i.e. vary D between 100 and 800

Simple options that you can vary:


MOLE-RDV MOLE-D MOLE-B D:F B:F MOLE-RR FEED-FLOW distillate vapor fraction distillate flow rate bottoms flow rate molar ratio of distillate to total feed flow rate molar ratio of bottoms to total feed flow rate reflux ratio molar flow rate of the feed specified by STREAM

You can vary these too if you know the bounds:


MOLE-L1 MOLE-VN MOLE-BR MOLE-Q1 MOLE-QN reflux flow rate boilup rate boilup ratio condenser heat duty reboiler heat duty

Other options: TRAY-SIZE

We can do everything in Chapter 13 of Henley and Seader and much more. Example:
TRAY-SIZE 1 2 23 SIEVE NPASS=2

The first number after TRAY-SIZE is the section number. For a simple uniform size column, there is only one section. The section number is followed by the first and last stage numbers of the section. They cannot include the condenser or the reboiler if they are present. What follows are other options. With only some of the simpler ones:
CAPS SIEVE BALLAST FLEXI FLOAT NPASS TRAY-SPACE MIN-DIAM FLOOD-FAC FLOOD-METH SYSFAC bubble cap trays sieve trays Glitsch ballast trays Koch Flexitrays Nutter float valve trays number of pass, 1 (default) or 2 tray spacing (default is 24 in) min diameter (default is 12 in) flooding factor (default is 0.8) Fair or Glitsch (for Ballast) methods foaming factor (default=1). See Perry's

REPORT

If you want to save a tree:


REPORT NOPROFILE NOCOMPS

The option NOPROFILE suppresses printing the tables of stagewise temperature, pressure, mole flows and enthalpies profiles. NOCOMPS suppresses the mole fraction and K-value profiles. TRAY-REPORT If you want to kill more trees, then
TRAY-REPORT PRINT-PLOT=YES

will make plots in addition to printing all the profiles in tables. In this case, you may also want to look up the PLOT statement in the manual.

P.C. Chau UCSD

ASPEN+

17

A couple more examples: ; A gas absorber ; The gas flow rate is varied to cut C1 down to 100 ppm in the liquid. The column pressure is constant ; Note the ABSORBER option chosen in PARAM ; Note the COL-SPECS: stating no condenser and reboiler and also a vapor product off stage one ; Also want to plot the temperature and vapor and liquid mole fractions of C1 and C2 ;
BLOCK UNITID RADFRAC DESCRIPTION "REALLY A GAS STRIPPER BECAUSE OF THE SPEC AND VARY" PARAM NSTAGE=24 ABSORBER=YES FEEDS LIN 1 ON-STAGE / VIN 24 ON-STAGE PRODUCTS VOUT 1 V / LOUT 24 L P-SPEC 1 14.7 COL-SPECS MOLE-RDV=1 Q1=0 QN=0 SPEC 1 MASS-FRAC 100.0E-06 COMPS=C1 STREAMS=LOUT VARY 1 FEED-FLOW 100 300 STREAM=VIN PLOT 1 TEMP X=C1 C2 Y=C1 C2

; A column in rating mode ; In the so-called rating (performance) mode, you just set the knobs and let the unit go ; Note how to set a different pressure drop in the condenser versus the column stages ;
BLOCK UNITID RADFRAC DESCRIPTION "JUST SPECIFY THE RR AND D" PARAM NSTAGE=24 FEEDS FD 14 PRODUCTS DISTL 1 V / BOTM 24 L P-SPEC 1 90 / 2 92 COL-SPECS MOLE-RDV=1 MOLE-D=89 MOLE-RR=3.5 DP-STAGE=0.2

9. Simple Heat Exchanger The simple heat exchanger can be used to heat or cool a single process stream, exchange heat between two process streams, or exchange heat between a process stream and a utility stream. Heat exchanger operations may be specified in one of the following ways: 1) outlet temperature, 2) outlet phase condition, 3) exchanger duty, 4) feed and product temperature approaches, or 5) supplied configuration data (U and A). A simple example first: ; Set the approach temperature of the hot stream to 10
BLOCK HX1 HEATX DESCRIPTION "A COUNTERCURRENT HEAT EXCHANGER" PARAM TYPE=COUNTERCURRENT DELT-HOT=10 FEEDS HOT=HIN COLD=CIN PRODUCTS HOT=HOUT COLD=COUT HEAT-TR-COEF U=500

Your options in the PARAM. You must specify at least one of the following:
T-HOT T-COLD DECR-HOT INCR-COLD DEGSUB-HOT DEGSUP-COLD VFRAC-HOT VFRAC-COLD DELT-HOT outlet temperature of the hot stream outlet temperature of the cold stream temperature decrease of the hot stream temperature increase of the cold stream degrees of subcooling of hot stream outlet degrees of superheating of cold stream outlet vapor fraction of hot stream outlet vapor fraction of cold stream outlet approach temperature at the hot stream outlet (Hot out - Cold

P.C. Chau UCSD

ASPEN+

18

DELT-COLD DUTY AREA

in) - approach temperature at the cold stream outlet (Hot in - Cold out) - exchanger heat duty - heat transfer area

Other options for PARAM:


TYPE PRES-HOT PRES-COLD - COUNTERCURRENT (default) or COCURRENT - outlet pressure of the hot stream (negative means pressure drop) - outlet pressure of the cold stream

If you don't specify any heat transfer coefficients at all, an arbitrary U=149.69 BTU/ft2.h .F will be used. Your options for the heat transfer coefficient, HEAT-TR-COEF: either use the overall coefficient or phase specific coefficients.
U Overall heat transfer coefficient. Log-mean temperature difference is used in the calculation. No internal dew point and bubble point calculations are performed. Phase on hot side liquid boiling/condensing vapor liquid boiling/condensing vapor liquid boiling/condensing vapor Phase on cold side liquid liquid liquid boiling/condensing boiling/condensing boiling/condensing vapor vapor vapor

L-L B-L V-L L-B B-B V-B L-V B-V V-V

Important: Make sure there is no temperature crossover inside the heat exchanger (i.e., know what you are doing). Check the heat "capacities" of your process streams and see which one is limiting in its heat content. Learning how to choose the approach temperature at the proper end helps. Two more examples: ; Setting the area is just an arbitrary choice for this example ; New features: presume the hot side with steam will condense and free water calculation ; is specified on the hot side; W1 is the decanted water ; We also make the program to generate the heating and cooling curves inside the exchanger ;
BLOCK HX1 HEATX DESCRIPTION "A COUNTERCURRENT HEAT EXCHANGER WITH HEAT XFER COEFFS" PARAM TYPE=COUNTERCURRENT AREA=600 FEEDS HOT=HIN COLD=CIN PRODUCTS HOT=HOUT COLD=COUT HEAT-TR-COEF V-L=10 B-L=500 L-L=80 ; FLASH-SPECS HOUT FREE-WATER=YES DECANT-STREAMS HOT=W1 ; HOT-CURVE 1 HEADING="COOLING CURVE" ;this is not a typo COLD-CURVE 1 HEADING="HEATING CURVE"

; The reboiler is modeled with a 10 approach temperature and 5 units pressure drop in the steam ; We of course expect the cold inlet to vaporize and hence there two phases in the reboiler ; Let's presume we have specified CHAO-SEA as the global thermo option set. Now we also ; use STEAM-TA (ASME Steam Tables) for the steam properties and keep CHAO-SEA for the cold side ;
BLOCK HX1 HEATX DESCRIPTION "A COCURRENT STEAM REBOILER" PARAM TYPE=COCURRENT DELT-HOT=10 PRES-HOT=-5 FEEDS HOT=SIN COLD=CIN

P.C. Chau UCSD

ASPEN+

19

PRODUCTS HOT=SOUT COLD=COUT HEAT-TR-COEF U=800 ; FLASH-SPECS CIN NPHASE=2 PROPERTIES STEAM-TA / CHAO-SEA

10. Mixer, Splitter, Compressor, Pump, For each of these unit operations, we will just provide a few illustrative examples. ____________________MIXER The stream mixer is used to combine two or more process streams into one. We may specify the outlet pressure or the pressure drop (as in FLASH2 with a negative number), and the outlet temperature is calculated via an adiabatic flash. Reminder: all the inlet streams and the outlet stream are specified in the FLOWSHEET section. Example:
FLOWSHEET BLOCK M1 IN=S-1 S-2 S-7 ;...others... OUT=S-10

BLOCK M1 MIXER DESCRIPTION "MIXER WITH 5 UNIT PRESSURE DROP" PARAM PRES=-5 or BLOCK M1 MIXER DESCRIPTION "A BARE BONE MIXER AT INLET PRESSURE"

____________________FSPLIT The stream splitter is analogous to a pipe tee. It is used to split up one or more feed streams into two or more products of identical composition and phase. Again, the inlets and outlets are specified in FLOWSHEET. We also have to say how to split up the feed streams. Follow the examples: ; Take whatever feeds (as defined in FLOWSHEET) and divide them into three fractions: E1 with 40%, ; E2 with 25% and E3 with 35% (i.e., E1, etc. are the outlet stream ids) ;
BLOCK S1 FSPLIT DESCRIPTION "SPLIT BY SPEC THE PERCENTAGES" PARAM PRES=-5 FRAC E1 0.4 / E2 0.25

; Take whatever feeds and divide them into three fractions in terms of flow rates: E1 with 100, ; E2 with 500 and E3 with whatever is left ; In place of MOLE-FLOW, you can have MASS-FLOW, STDVOL-FLOW and VOL-FLOW ;
BLOCK S1 FSPLIT DESCRIPTION "SPLIT BY SPEC THE FLOW RATES" PARAM PRES=-5 MOLE-FLOW E1 100 / E2 500

; Take whatever feeds and divide them into four fractions in terms of flow rates: E1 with 100, ; E2 with 500, and 60% of whatever is left goes to E3 ;
BLOCK S1 FSPLIT DESCRIPTION "SPLIT BY SPEC THE FLOW RATES" PARAM PRES=-5 MOLE-FLOW E1 100 / E2 500

P.C. Chau UCSD

ASPEN+

20

R-FRAC

E3 0.6

____________________SEP The component separator is a black magic box where you can do whatever you want. It can be used in place of a rigorous separation model to save computation time when the details of the separation are still unknown (i.e., still don't know how to make it converge), but the splits for each component are known (as dictated by the problem statement). The FRAC or MOLE-FLOW can be used to specify the split. The FLASH-SPECS is used to specify the conditions (T,P) of the outlet streams. If you don't use FLASH-SPECS, the block (T,P) will be used. Examples: ; Take whatever feeds and give us two products E1 and E2 such that 85% of C1 and 35% of C2 go to E1 ; with the reminder going to E2. With FLASH-SPECS, the PRES in PARAM is really useless. ;
BLOCK BOX1 SEP DESCRIPTION "A STREAM SEPARATOR BY FRACTION" PARAM PRES=-5 FRAC STREAM=E1 COMPS=C1 C2 FRACS=0.85 0.35 FLASH-SPECS E1 TEMP=160 PRES=30 FLASH-SPECS E2 TEMP=120 PRES=30

; Take whatever feeds and give us three products such that E1 has 100 flow units of C2, and 60 units ; of C3. E2 has respectively 110, 30 and 20 flow units of the three components. E3 has the rest. ;
BLOCK BOX2 SEP DESCRIPTION MOLE-FLOW MOLE-FLOW FLASH-SPECS FLASH-SPECS FLASH-SPECS "A STREAM SEPARATOR BY COMPONENT FLOW RATE" STREAM=E1 COMPS=C2 C3 FLOWS=100 60 STREAM=E2 COMPS=C1 C2 C3 FLOWS=110 30 20 E1 TEMP=120 PRES=30 E2 TEMP=120 PRES=30 E3 TEMP=120 PRES=30

____________________PUMP The pump module computes the energy required to increase the pressure of an incompressible stream. It can also be used to handle a hydraulic turbine. You must specify the efficiency. If you don't, the built-in efficiency curves for water in a centrifugal pump will be used. Some examples: ; DEFF is the driver efficiency. It is optional. ; If DELP is negative, the pressure decreases in the outlet
BLOCK P1 PUMP DESCRIPTION "A PUMP TO JACK P UP BY 100 UNITS" PARAM DELP=100 EFF=0.7 DEFF=0.95

; PRATIO is the outlet pressure divided by the inlet pressure


BLOCK P2 PUMP DESCRIPTION "JACK UP THE OUTLET PRESSURE BY A RATIO" PARAM PRATIO=3 EFF=0.8 BLOCK P3 PUMP DESCRIPTION "SET THE OUTLET PRESSURE TO 50 UNITS" PARAM PRES=50 EFF=0.8 BLOCK P4 PUMP DESCRIPTION "PUMP THE LIQUID WITH A 5 HP PUMP" PARAM POWER=5 EFF=0.8

____________________COMPR The compressor simulates a single stage polytropic compressor, a polytropic positive displacement compressor, an isentropic compressor, or an isentropic turbine (See the manual and Perry's Handbook on what they are). The input is very similar to a pump except that we have to specify the type. Some simple examples: ; PEFF is polytropic efficiency and MEFF is mechanical efficiency

P.C. Chau UCSD

ASPEN+

21

; DELP is same as in PUMP, the pressure increase or decrease


BLOCK C1 COMPR DESCRIPTION "POLYTROPIC COMPRESSOR" PARAM TYPE=POLYTROPIC DELP=3 PEFF=0.8 MEFF=0.95

; PRATIO is same as in PUMP, the pressure ratio ; NPHASE=2 means we expect that there may be condensation in the turbine ; SEFF is the isentropic efficiency
BLOCK C2 COMPR DESCRIPTION "ISENTROPIC TURBINE WITH PRATIO < ONE " PARAM TYPE=ISENTROPIC PRATIO=0.1 SEFF=0.8 MEFF=0.95 NPHASE=2

________________ASPEN PLUS does not have a valve or an expander. Use the HEATER to set the pressure.

11. The Design Specification Statement The ability to make different design specifications within a block is very limited in ASPEN PLUS. The approach taken by ASPEN is to use the "design specification" statements. Unfortunately, there is no easy way to explain the syntax of DESIGN-SPEC. The best way to learn this generalized specification is to go through several examples. First, let's take a look at the examples in ex3a.inp and ex3b.inp. The key statements from ex3a.inp:
BLOCK COLUMN RADFRAC ; ;input same as in ex3.inp except only one SPEC and VARY ; SPEC 1 MOLE-RECOV .990 COMPS=C1 STREAMS=S-7 VARY 1 MOLE-D .0 100.0 1.0 DESIGN-SPEC BRECOV ; BRECOV is just an id that you choose DEFINE BC2 MOLE-FLOW STREAM=S-8 COMPONENT=C2 ; defines the variables DEFINE F1 MOLE-FLOW STREAM=S-5 COMPONENT=C2 ; with a 6 character limit DEFINE F2 MOLE-FLOW STREAM=S-6 COMPONENT=C2 SPEC BC2 TO "0.98*(F1+F2)" ; defines the specification TOL-SPEC 1.0D-03 ; the tolerance for convergence VARY BLOCK-VAR BLOCK=COLUMN SENTENCE=COL-SPECS & VARIABLE=MOLE-RR LIMITS 0.001 0.5 ; the lower and upper bounds of VARY

What we try to illustrate is how to do a recovery specification with DESIGN-SPEC. So we throw the second SPEC and VARY away in the RADFRAC block and replace it with the DESIGN-SPEC. The very first thing to do in DESIGN-SPEC is to retrieve necessary quantities and give them a name. The names of the variables are limited to six characters. In this example, we get the flow rates of component C2 from the distillate and the two feed streams. Then the specification of a 98% recovery is done in a FORTRAN expression in double quotes. The tolerance of convergence is specified next. To meet the specification, we ask the program to vary the reflux ratio which is in the COL-SPECS statement of the unit COLUMN. We also have to tell the program that it is a unit operation block variable (BLOCK-VAR). The lower and upper bounds of the iteration is dictated by LIMITS. The following is the DESIGN-SPEC from ex3b.inp:
DESIGN-SPEC BRECOV DEFINE BC2 MOLE-FLOW STREAM=S-8 COMPONENT=C2 DEFINE BC1 MOLE-FLOW STREAM=S-8 COMPONENT=C1 SPEC BC1 TO "0.11*BC2" TOL-SPEC 1.0D-03 VARY BLOCK-VAR BLOCK=COLUMN SENTENCE=COL-SPECS &

P.C. Chau UCSD

ASPEN+

22

VARIABLE=MOLE-RR LIMITS 0.001 0.5

Here we retrieve the flow rates of C1 and C2 from the bottoms of the column. The rest is pretty easy to follow. Unlike PRO/II, ASPEN PLUS does not have a well structured language-like syntax to the DEFINE and VARY statements. The ASPEN manual also does not have a listing of the acceptable key words. Luckily, the (graphics interface) ModelManager can generate the DEFINE and VARY for us, but unluckily, it is very difficult to figure out how to complete the forms in the ModelManager. So we need a little bit of both to get by: knowing how to write the statements helps us to use the ModelManager and the ModelManager helps us with the key words. A few more examples on DEFINE:
;the flow rate of a component in a stream DEFINE FC1 MOLE-FLOW STREAM=S-8 COMPONENT=C1 ;the purity of a component in a stream DEFINE XC1 MOLE-FRAC STREAM=S-8 COMPONENT=C1 ;define a stream variable (STREAM-VAR) such as TEMP, PRES, VFRAC, total ;flow rate (MOLE-FLOW), density (MOLE-DENSITY), enthalpy (MOLE-ENTHALPY), etc. ;here, we define the temperature of a stream DEFINE TF STREAM-VAR STREAM=S-8 VARIABLE=TEMP ;define a block variable (BLOCK-VAR) such as the heat duty of a unit ;example here defines the feed location of feed stream id F1 to a RADFRAC column ;ID1 , ID2, etc. are used to identify what we really mean when we run out of ;key word choices DEFINE FSTGE BLOCK-VAR BLOCK=COL-1 SENTENCE=FEEDS VARIABLE=STAGE ID1=F1 ;This example defines the heat duty (generated) of a reactor. The key word for ;reactors is QCALC (e.g. page 14-20 of manual) and not DUTY or Q1 or whatever DEFINE Q BLOCK-VAR BLOCK=RXTOR SENTENCE=PARAM VARIABLE=QCALC

And examples on VARY:


;We can vary a stream variable such as T, P, etc., but not density and enthalpy ;e.g., vary the total flow rate of a stream VARY STREAM-VAR STREAM=S-9 VARIABLE=MOLE-FLOW ;We can vary block variables; no listing on what is OK, what's not ;Example on conversion of reaction no. 2 in a reactor block such as RSTOIC ;You need to look up RSTOIC to see that indeed there is a CONV statement with ;CONV as a key word VARY BLOCK-VAR BLOCK=RXTOR SENTENCE=CONV VARIABLE=CONV ID1=2 ;Vary the temperature of a reactor VARY BLOCK-VAR BLOCK=RXTOR SENTENCE=PARAM VARIABLE=TEMP

A couple more examples:


; An equilibrium reactor makes calc. based on whatever is in the feed and ; whatever products you expect to have. We just set the T & P and let it go. ; In the DESIGN-SPEC, we vary the temperature of the reactor until the heat duty is zero ; The value of the temperature (1500) in RXTOR becomes the initial guess of the iteration ; BLOCK RXTOR RGIBBS PARAM TEMP=1500 PRES=25 PROD CO / H2O / H2 / CO2 / CH4 ;list of products expected at equilibrium DESIGN-SPEC ADIABAT ; makes RXTOR an adiabatic reactor DEFINE Q BLOCK-VAR BLOCK=RXTOR SENTENCE=PARAM VARIABLE=QCALC SPEC Q TO 0.0

P.C. Chau UCSD

ASPEN+

23

TOL-SPEC 1.0D-03 VARY BLOCK-VAR LIMITS 500 2500

BLOCK=RXTOR SENTENCE=PARAM VARIABLE=TEMP

; Here we want the inlet and outlet of the flash drum (F-DRUM) to have the same entropy ; by varying the temperature of the flash drum ; We also show how you can add a FORTRAN statement by putting a F in the first column ; Note how you can do simple calculations in LIMITS based on some other value ; DESIGN-SPEC DEL-S DEFINE SIN STREAM-VAR STREAM=S1 VARIABLE=MOLE-ENTROPY DEFINE SOUT STREAM-VAR STREAM=S2 VARIABLE=MOLE-ENTROPY DEFINE TIN STREAM-VAR STREAM=S1 VARIABLE=TEMP F TOL=1.0D-4*DABS(SIN) SPEC SIN TO SOUT TOL-SPEC TOL VARY BLOCK-VAR BLOCK=F-DRUM SENTENCE=PARAM VARIABLE=TEMP LIMITS "TIN-75.D0" "TIN+75.D0"

Most simulation programs have the capability to include FORTRAN statements or even subroutines as part of the input. However, with the addition of modules for loop tearing, optimization, and costing, the need for doing your own FORTRAN calculations is significantly reduced, at least at the introductory level. The variable that you can vary (in VARY) is not confined to the same unit operation block of the specification statement. Hence, DESIGN-SPEC also serves a very important function: manipulate an upstream variable to achieve a downstream product specification. For example, we may want to manipulate the heat duty of a flash drum upstream of a reactor to adjust the inlet temperature which in turn guarantees the targeted conversion. Within a unit, we can, for example, vary the heat duty of a flash drum to vaporize a specified portion no matter what the feed is. We are "designing" something in the sense that we are asking the program to give us an answer based on something that we don't know. In other simulate programs like PRO/II, these type of calculations are incorporated in modules called feedback controllers. Think of them as quality controllers rather than the dynamic controllers in AMES 140. If you read ahead to Chapter 20 of SEM, you'll find that there is an area called supervisory control. The general idea is that you can do (sort of) on-line steady-state simulations to figure out how to operate (picking set points of) your chemical plant to achieve a certain goal, say, maximum productivity or profit. When we set up the DESIGN-SPEC, all we are doing is imposing an extra iteration loop in the flowsheet calculation. And like most iteration calculations, the DESIGN-SPEC may not converge. A major cause of nonconvergence is "boneheadedness," adjusting a manipulated variable that has no relation (physically or chemically) on the controlled variable. The other common mistake is to achieve a target that cannot be reached (unless, say, you violate the laws of thermodynamics or even conservation of mass). So, of course, nothing happens or there is no converged solution. Rule of thumb: when things are going bad, point the finger at yourself first before you kick the computer.

12. Sensitivity Analysis Once we have finished the preliminary design, we often want to examine the sensitivity of the process to key design variables. The SENSITIVITY module essentially executes this "DO LOOP" for you. The SENSITIVITY block generates tables and plots of simulation results as functions of stream or unit operation variables. Just like the DESIGN-SPEC, we need to know a little bit about writing the input before we know how to tackle the entry forms in the ModelManager. (SENSITIVITY is set up differently from other programs like PRO/II, but we don't have to worry about them unless we have to use them. The SENSITIVITY in ASPEN is almost like a CASE-STUDY.) First, an example with simple explanations:

P.C. Chau UCSD

ASPEN+

24

;We want to find out how the recovery and purity of C2 ;in the distillate of the column D2 may vary with the ;feed stage location (from stages 7 to 10) of the feed ;stream FD1. ;We want to reset (REINT) the convergence flags of the ;column D2 after each "loop" ;The output is dictated by the TABULATE and PLOT ;We will tabulate both the purity and recovery results ;We first plot both the purity and the recovery versus the feed stage number ;Then we plot the purity versus the feed stage number in a semi-log plot ; SENSITIVITY COL-FEED DEFINE PURITY MOLE-FRAC STREAM=DIST COMPONENT=C2 DEFINE F1 MOLE-FLOW STREAM=DIST COMPONENT=C2 DEFINE F2 MOLE-FLOW STREAM=FEED COMPONENT=C2 F RECOV=F1/F2 ; VARY BLOCK-VAR BLOCK=D2 SENTENCE=FEEDS VARIABLE=STAGE ID1=FD1 RANGE LIST=7 8 9 10 REINT BLOCKS=D2 ; TABULATE 1 PURITY COL-LABEL='C2' 'PURITY' 'IN' 'DIST' ;the last three are dummies TABULATE 2 RECOV COL-LABEL='C2' 'RECOVERY' ;to overcome the 8-charac. limit PLOT COLUMNS=1 2 PLOT COLUMNS=1 Y-SCALE=LOG ;the COLUMNS in PLOT are the ones defined in TABULATE

The pattern is similar to that of DESIGN-SPEC. We first define the variables. Then we tell the program what to vary. The key word LIMIT is not used here. It is RANGE. The TABULATE and PLOT statements are not needed in DESIGN-SPEC, but now we do want to control how the results will be printed. The REINT resets convergence and unit operation restart flags or to restore tear streams to their initial values. Unless you have concerns or problems, do not use REINT, since it is more efficient to begin the calculations with the results of the previous "loop." We can have more than one VARY in each SENSITIVITY. If you want to see the results with each variable varied independently (the logical choice), you should use a separate SENSITIVITY block for each variable. Some explanations on the key word options in RANGE, TABULATE, PLOT:
RANGE LOWER UPPER NPOINT INCR LIST ;specify the values for the varied variable in VARY - lower limit - upper limit - number of points including UPPER and LOWER - increment size - list of values

Thus the example above can be replaced by


RANGE LOWER=7 UPPER=10 INCR=1

TABULATE COL-LABEL UNIT-LABEL PLOT COLUMNS X-AXIS X-SCALE Y-SCALE

;one TABULATE for one column of result - can have up to four labels (eight chara. max) in singe quotes - can have up to two for the units if you want to override ASPEN

- list of column number from TABULATE to be used as the dependent variable to be plotted - column number in TABULATE as the independent variable of the plot default is the variable used in VARY - can be STANDARD (the default) or INVERSE - can be STANDARD (the default) or INVERSE or LOG

P.C. Chau UCSD

ASPEN+

25

PLOT-HEADING INTERPOLATE GRID

- the title in single quotes - YES or NO - YES or NO

P.C. Chau UCSD

ASPEN+

26

Examples from the hydrogenation of benzene problem in the manual:


;(L-FLOW is defined as a FSPLIT and REACT a RSTOIC) ;Examine how the liquid recycle flow rate CHRCY (as governed by the split ;fraction from the splitter L-FLOW) affects the reactor heat duty ; SENSITIVITY REACDUTY DEFINE RDUTY BLOCK-VAR BLOCK=REACT SENTENCE=PARAM VARIABLE=QCALC VARY BLOCK-VAR BLOCK=L-FLOW SENTENCE=FRAC VARIABLE=FRAC ID1=CHRCY RANGE LOWER=0 UPPER=0.7 INCR=0.1 ; TABULATE 1 RDUTY COL-LABEL='REACTOR' 'HEAT' 'DUTY' PLOT COLUMNS=1 PLOT-HEADING='REACTOR DUTY VS PURGE FLOW RATE' & INTERPOLATE=YES GRID=NO ;Examine the effect of purge flow rate (again from the ratio in a ;splitter V-FLOW) on the build-up of inerts (as measured by the ;total mole fractions of N2 and C1) ;Note the use of the FORTRAN statement in single quotes ; SENSITIVITY INERTS DEFINE XN2 MOLE-FRAC STREAM=RXIN COMPONENT=N2 DEFINE XCH4 MOLE-FRAC STREAM=RXIN COMPONENT=C1 VARY BLOCK-VAR BLOCK=V-FLOW SENTENCE=FRAC VARIABLE=FRAC ID1=PURGE RANGE LIST=0.05 0.1 0.15 0.2 ; TABULATE 1 '100*(XN2+XCH4)' COL-LABEL='PERCENT' 'TOTAL' 'INERTS' PLOT COLUMNS=1 PLOT-HEADING='PERCENT INERT VS PURGE FLOW RATE' & INTERPOLATE=YES GRID=NO

13. Doing case studies Sometimes, you may want to vary a parameter in a flowsheet. Of course, we can make the changes and rerun the flowsheet. (And use a different runid for each case to save the results.) An alternative is to use the case study feature, and put all the changes in one big job. This is a nice feature when you don't want to keep making changes or when you have a big flowsheet (and the computer is way too slow as in the old days, which was just four years or so ago) and you don't want to sit around and wait. You can send the big case studies out as a batch job and go home. A full report is generated for each case and each case calculation has no effect on the base case simulation. (In contrast, SENSITIVITY generates a table at the end of the base case report.) A simple example to get the idea:
; Main input has a splitter called VFLOW, it defines the fraction ; of an inlet stream (in FLOWSHEET) to be diverted to the stream ; called PURGE ; FLOWSHEET BLOCK VFLOW IN=S5 OUT=PURGE S7 ; ... other inputs ... BLOCK VFLOW FSPLIT FRAC PURGE 0.08 ; ... other inputs ... ; We now want to vary the fraction to be purged in the VFLOW unit ; The VARY is the same as the one used in DESIGN-SPEC, ID1 makes sure ; ASPEN know that we want the FRAC of the stream PURGE ; REINIT-BLOCKS is used to reset convergence and unit operation restart ; flags ; CASE-STUDY VARY BLOCK-VAR BLOCK=VFLOW SENTENCE=FRAC VARIABLE=FRAC & ID1=PURGE DESCRIPTION 1 "PURGE FRACTION = 0.05"

P.C. Chau UCSD

ASPEN+

27

CASE 1 0.05 ; DESCRIPTION 2 CASE 2 0.1 ; DESCRIPTION 3 CASE 3 0.15

REINIT-BLOCKS=COLUMN "PURGE FRACTION = 0.1" REINIT-BLOCKS=COLUMN "PURGE FRACTION = 0.15" REINIT-BLOCKS=COLUMN

Does this example sound familiar? It is very similar to one of the SENSIVITY examples from the hydrogenation of benzene problem. The CASE-STUDY has more key words, mostly in controlling the amount of junk to be printed in the output file. We won't bother with them since this is not likely what we will use much. SENSITIVITY can do all the things that CASE-STUDY does, and the computer is fast enough that we can just keep making changes and re-running the flowsheet. Knowing that CASE-STUDY exists suffices. The more useful question is: What about the ModelMaanger? It is very easy to make minor changes and rerun the flowsheet under ModelManager, but what if I want to save the results with a different runid? Here how: Choose "Newname" under the "File" menu. Enter new runid. Make changes and run. All input and results will be saved under the files named RUNID.*.

14. Optimization If you can do DESIGN-SPEC and SENSITIVITY, you are ready to pick up OPTIMIZATION. Within the OPTIMIZATION paragraph, we define the objective function, the decision variables and list the constraints. The constraints are defined separately in the CONSTRAINT section paragraph. Both equality and inequality constraints can be handled. Equality constraints are the equivalent of design specifications (DESIGN-SPEC) in nonoptimization problems. Two examples:
;Unconstrainted optimization ;P is the desired and G is the undesired product and we want to ;maximize the value "P - 30*G" by varying the length of the reactor ;REACT and the temperature and pressure of the drum FLASH which ;separates the product from the byproduct. ; OPTIMIZATION QFLOW DEFINE P MOLE-FLOW STREAM=PROD1 COMPONENT=P ;PROD1 is product DEFINE G MOLE-FLOW STREAM=PROD1 COMPONENT=G ;stream id ; MAXIMIZE 'P - 30*G' ;use single quotes ; VARY BLOCK-VAR BLOCK=REACT SENTENCE=PARAM VARIABLE=LENGTH LIMITS 10 100 VARY BLOCK-VAR BLOCK=FLASH SENTENCE=PARAM VARIABLE=PRES LIMITS 1 10 VARY BLOCK-VAR BLOCK=FLASH SENTENCE=PARAM VARIABLE=TEMP LIMITS 60 300 ;Constrainted optimization ; CONSTRAINT RECOV DEFINE C1OUT MOLE-FLOW STREAM=PROD1 COMPONENT=C1 DEFINE C1IN MOLE-FLOW STREAM=FEED COMPONENT=C1 F RECOV = C1OUT/C1IN SPEC RECOV LE 0.3 ;recovery ratio must be <= 0.3 TOL-SPEC 0.001 ;make sure not too much of C1 is left

P.C. Chau UCSD

ASPEN+

28

;tolerance-spec is required CONSTRAINT ADIAB DEFINE DUTY BLOCK-VAR BLOCK=REACT SENTENCE=PARAM VARIABLE=QCALC DEFINE HIN STREAM-VAR STREAM=RXIN VARIABLE=MOLE-ENTHALPY DEFINE FIN STREAM-VAR STREAM=RXIN VARIABLE=MOLE-FLOW ; SPEC DUTY EQ 0.0 ;reactor REACT must be adiabatic TOL-SPEC 'DABS(HIN*FIN*0.0001)' OPTIMIZATION COST ; ; define the total flow rates and heat duties ; DEFINE FEED STREAM-VAR STREAM=FEED VARIABLE=MOLE-FLOW DEFINE PROD1 STREAM-VAR STREAM=PROD1 VARIABLE=MOLE-FLOW DEFINE PROD2 STREAM-VAR STREAM=PROD2 VARIABLE=MOLE-FLOW DEFINE Q1 BLOCK-VAR BLOCK=FLASH1 SENTENCE=PARAM VARIABLE=QCALC DEFINE Q2 BLOCK-VAR BLOCK=FLASH2 SENTENCE=PARAM VARIABLE=QCALC ; ; CFUNC is the value of the two products minus the cost of the feed ; and minus the cost of steam in the two flash drums ; C CPROD1=PRICE OF PROD1, A PRODUCT STREAM, $/LB-MOLE C CPROD2=PRICE OF PROD2 C CFEED =PRICE OF FEED C CSTEAM=COST OF STEAM, $/MMBTU F CPROD1=600 F CPROD2=500 F CFEED =450 F CSTREAM=4.0 F CFUNC=CPROD1*PROD1 + CPROD2*PROD2 F & CFEED*FEED - CSTEAM*(Q1+Q2)/1D6 ; MAXIMIZE CFUNC ;maximize the "profit" CONSTRAINTS RECOV / ADIAB ;with the two constraints ; ; we vary the (T,P) of the two flash drums and the ; T of the reactor ; VARY BLOCK-VAR BLOCK=FLASH1 SENTENCE=PARAM VARIABLE=PRES LIMITS 10 100 VARY BLOCK-VAR BLOCK=FLASH1 SENTENCE=PARAM VARIABLE=TEMP LIMITS 60 400 VARY BLOCK-VAR BLOCK=FLASH2 SENTENCE=PARAM VARIABLE=PRES LIMITS 10 100 VARY BLOCK-VAR BLOCK=FLASH2 SENTENCE=PARAM VARIABLE=TEMP LIMITS 100 500 VARY BLOCK-VAR BLOCK=REACT SENTENCE=PARAM VARIABLE=TEMP LIMITS 300 700

Hope you see that there are many similar features to what we know already. Now a few pointers: The other option to MAXIMIZE is MINIMIZE In CONSTRAINT, EQ, GE, and LE means equal to, greater than or equal to , and less than or equal to There must be a LIMITS following immediately each VARY. Optimization would only work if you have picked and reduced the appropriate variables to be varied. You should use SENSITIVITY first to get a bearing on the problem. Refer to the work of Jim Douglas in AMES 114B.

P.C. Chau UCSD

ASPEN+

29

15. Simulation Options There are many simulation options that you can override the default with SIM-OPTIONS, RUN-CONTROL, and SYS-OPTIONS. The messages in the history file *.his can also be controlled with HISTORY. Just a few examples:
SIM-OPTIONS ENERGY-BAL=NO ;suppress heat balance and do mass balance ;only, but cannot have modules such as ;RADFRAC, HEATX, REQUIL, RGIBBS, PUMP and ;COMPR. RPLUG and RBATCH can be used only ;if the temperature profile is specified.

;Make sure ASPEN handle the presence and decanting of water as a second ;liquid phase in water-hydrocarbon systems properly ;SOLU-WATER=1 means we want to calculate the vapor phase fugacity for ;water with the primary option set SYSOP3 (see p. 5-7 in manual) and ;the option set SYSOP0 is for the free water phase properties ;(SYSOP3 and SYSOP0 are just random choices for this example here.) ; SIM-OTIONS FREE-WATER=YES PROPERTIES SYSOP3 SOLU-WATER=1 FREE-WATER=SYSOP0

;To print all the messages in the history file from levels 0 to 3 ;This example lists all the options available to you ; HISTORY MSG-LEVEL SYS-LEVEL=3 SIM-LEVEL=3 CONV-LEVEL=3 & STREAM-LEVEL=3 PROP-LEVEL=3

Meaning of the message levels. Higher the number, more detailed is the message. Level 0 Level 1 Message for terminal errors that stop execution. For severe errors that execution continues but subsequent processing can only produce erroneous results. For errors that subsequent processing may produce erroneous results. Warning for things like the extrapolation of a correlation beyond its normal limits. Results may still be erroneous. (The default) All messages that allow you to trace the calculation history. Increasingly detailed messages to help track convergence and simulation problems.

Level 2 Level 3

Level 4 Levels 5-8

Note: In the ModelManager, this feature is under DIAGNOSTICS of the SETUP menu, and the syntax generated by the ModelManager is
DIAGNOSTICS HISTORY SYS-LEVEL=3 SIM-LEVEL=3 ; etc.

They all work the same. It is not that necessary to control the diagnostic if you are using the graphics-based ModelManager, but it helps to save some paper if you are to print the history out on a line printer.

P.C. Chau UCSD

ASPEN+

30

16. Flowsheet convergence ASPEN PLUS generates tear streams and calculation sequence automatically if there are recycle loops, design specifications, and optimization problems. Of course, you can override the program with either CONV-OPTIONS or go as far as setting up your own convergence block CONVERGENCE. For your info, the default convergence method is Wegstein. Your other choices are direct substitution, secant, Broyden, quasi-Newton, complex, and sequential quadratic programming (SQP). Details and examples are all in User Manual. Here are just some brief notes. Wegstein Classical bounded Wegstein acceleration of direct substitution. It converges rapidly and is recommended for user-generated convergence blocks. Can be applied to any number of streams simultaneously. Secant Linear interpolation. If the function is discontinuopus or flat over a region, can use BRACKET=YES option. Used for single design specifications or system-generated convergnece blocks. Also recommended for usergenerated convergence blocks. Broyden Modification of quasi-Newton method. Can converge on multiple tear streams and design specifications, especially when the tear variables are highly interdependent or when recycle loops and design specifications are so interrelated that nesting is impractical. Newton Another modified Newton's method to be used when even the Broyden method is unable to converge. Since numerical derivatives are calculated frequently, NEWTON should be used for tear streams when the number of components is very small or if BROYDEN really does not work. SQP Sequential programming method for flowsheet optimization.

17. Creating your own option set If you want to print information such as critical temperature and pressure, heat capacity, or other transport properties (like viscosity surface tension, diffusion coefficient, etc.) in a report, you need to create a property set, PROP-SET, first. (Very clumsy, but that's life with ASPEN PLUS.) The PROP-SET is nothing but a list of properties that you want to be printed in the same table somewhere. We'll see the use of PROP-SET together with PROP-TABLE or a unit operation later. The key words are listed in the User Guide, or of course, we can rely on the ModelManager. Like many other features, it helps to use to the ModelManager if we know the syntax of the PROP-SET. Also, it helps to learn to use the ModelManager if you enter these new items into an input file, back it up, import it into the ModelManager, and see into which forms they are entered. So here are two simple examples:
;from Table 28.3, H is the enthalpy of a pure component ; Table 28.1, HMX is the enthalpy of a mixture (i.e., stream) ; CPMX const. pres. heat capacity of a mixture ;for the property set we called SET1, we want the vapor and liquid ;enthalpies of components C1, C2 and C3. Default is all components. ;we also want the vapor and liquid enthalpies and heat capacities of

P.C. Chau UCSD

ASPEN+

31

;a stream (to be specified somewhere). Of course the COMPS won't apply ;to the HMX and CPMX key words ; PROP-SET SET1 H HMX CPMX COMPS=C1 C2 C3 PHASE=V L ;from Table 28.2, GAMMA is liquid activity coefficient ;we want to list the activity coefficients of comp. C1 and C4 ;at 100 and 200 degrees and also at the stream temperature ;the asterisk denotes the stream temperature ; PROP-SET LIST1 GAMMA COMPS=C1 C4 PHASE=L TEMP=* 100 200

18. Physical property tables and plots There are times when you want way more than what a HCURVE can give you. The table generation primary key word, PROP-TABLE, is used, together with PROP-SET, to make tables or plots of thermodynamic, transport, and other properties. There are three types of tables: 1. PROPS For single-phase properties that do not require a flash (i.e. no equilibrium) calculation

2. FLASHCURVE For properties after flash calculations (i.e. at phase equilibria) 3. PTENVELOPE For properties of a P-T envelope for a given value of vapor fraction

In PROP-TABLE, we must define the stream composition somehow with either the FLOW sentence or identify the stream id with STREAM. We'll get the idea across with a few simple examples below. You pick up the rest from ModelManager or the manual.
;_________________________________________Example of using PROPS ;The items to be plotted is stated by PROPERTIES in TABULATE which ;in turn refers to the appropriate PROP-SET ;Make sure the components in the PROP-SET is identical to the stream ; PROP-SET LIST1 GAMMA COMPS=MEOH H2O PHASE=L ; PROP-TABLE TABL1 PROPS DESCRIPTION 'Liquid-phase activity coefficient' MOLE-FLOW H2O 0.5 / MEOH 0.5 ;defines the stream as STATE PRES=14.7 TEMP=77 ;a 50-50 mix at the stated T,P ; VARY MOLE-FRAC COMP=H2O ;water mole fraction is independent RANGE LOWER=0 UPPER=1 INCR=0.1 ;variable for the table/plot ; TABULATE 'Binary mixture activity coeff' PROPERTIES=LIST1

;_________________________________________Example of using FLASHCURVE ;If two state variables are not stated, we must specify what type of ;flash calculation to perform. ;The FLASH-CODE can be PH, TP, PV, TH, or TV ; PROP-SET LIST1 TEMP PRES MOLEFRAC PHASE=V L ;for all components in a ;stream to be specified PROP-TABLE TABL1 FLASHCURVE DESCRIPTION 'Stream flash curve' STREAM S-1 FLASH-CODE=PV ;specify the stream S-1 ; VARY VFRAC RANGE LOWER=0 UPPER=1 INCR=0.1 TABULATE 'FLASHCURVE for stream S-1' PROPERTIES=LIST1

P.C. Chau UCSD

ASPEN+

32

;_________________________________________Example of using PTENVELOP ;If two state variables are not specified, we must specify what type of ;flash calculation to perform. ;The FLASH-CODE can be PH, TP, PV, TH, or TV ;PARAM is used to specify the initial points of the envelop (PINT or ;TINT) or REDT, the value of the mixture reduced temperature at which ;the calculations are terminated after passing through the mixture ;critical point ; PROP-SET LIST1 TEMP PRES MOLEFRAC PHASE=V L ;for all components in a ;stream to be specified PROP-TABLE TABL1 PTENVELOP DESCRIPTION 'P-T Envelop' STREAM S-1 ;specify the stream S-1 ; PARAM REDT=1.0 ENVELOPES VFRAC=0.0 0.5 ;choose vapor fractions ; TABULATE 'P-T Envelop for stream S-1' PROPERTIES=LIST1

;_______________________________Example of using PROPERTIES in a module ;We can report the properties as listed in Tables 28.1 to 6 using the ;STREAM-REPORT for the simulation or just the properties in certain ;modules such as RADFRAC. Again, we have to do a PROP-SET first. ; ;Here we define a set which we will call TXPORT to include the ;viscosity, thermal conductivity, and surface tension (after looking up ;the keywords in Table 28.4) ;We list these transport properties in both the module COL1 and for the ;flowsheet ; PROP-SET TXPORT MUMX KMX SIGMAMX PHASE=V L ; BLOCK COL1 RADFRAC PARAM NSTAGE=20 ; ;... and other inputs, including TRAY-SIZE ... ; TRAY-REPORT PROPERTIES=TXPORT ;list the properties on the trays STREAM-REPORT PROPERTIES=TXPORT ;list the properties in the stream ;table of the flowsheet report

Das könnte Ihnen auch gefallen