epbu pdf manual - university of alberta · pdf filethe manual assumes that you are familiar...
Post on 24-Mar-2018
227 Views
Preview:
TRANSCRIPT
Aspen Engineering Suite 2004.1
Aspen Plus Summary File Toolkit
Who Should Read this Guide 2
Who Should Read this Guide
The intended audience for this toolkit is application developers who need to get information from Aspen Plus simulations into their applications, and prefer a file based data transfer to data transfer through OLE Automation.
Contents 3
Contents
INTRODUCING SUMMARY FILE TOOLKIT....................................................... 11
1 GETTING STARTED .................................................................................... 12 The Summary File and Toolkit.................................................................................. 13 Initializing the Toolkit ............................................................................................. 13
Accessing the Required Files ............................................................................... 14 Getting the Summary File Name............................................................................... 14
Getting Property and Units File Names ................................................................. 14 Defining Units of Measurement............................................................................ 15 Specifying a Value for Missing Results .................................................................. 15
Determining the Data Dimensions ............................................................................ 16 Retrieving Data for an Object................................................................................... 16 Using the Toolkit With a Hierarchical Aspen Plus Run................................................... 18 Linking Toolkit Subroutines into Your Module ............................................................. 18 Creating a Toolkit Application for Windows................................................................. 19
About the Windows Version ................................................................................ 19 Linker Directive Commands for Windows ................................................................... 20 Calling Summary File Toolkit Routines....................................................................... 20
Opening and Closing Files Using the Summary File Toolkit....................................... 21 Using Fortran to Call Routines............................................................................. 21 Using C to Call Routines ..................................................................................... 21
2 GENERAL SUBROUTINES ........................................................................... 23 Initializing the Summary File Toolkit ......................................................................... 24 Closing the Summary File Toolkit ............................................................................. 25 Opening and Closing Files........................................................................................ 26 Retrieving Run Information...................................................................................... 27
Standard Run Information .................................................................................. 27 Run Titles ........................................................................................................ 28 Accounting Information...................................................................................... 29
Retrieving Flowsheet Balance Results........................................................................ 29 Units Conversion.................................................................................................... 30
Changing Units Sets .......................................................................................... 30
Contents 4
Converting Units for Real Numbers ...................................................................... 31 Determining Units Labels.................................................................................... 32
Component Information Retrieval ............................................................................. 32 Number of Components ..................................................................................... 32 Component IDs................................................................................................. 33 Component Alias Names..................................................................................... 33 Component Properties ....................................................................................... 33
Sensitivity Block Results ......................................................................................... 34 Identifying Sensitivity Blocks .............................................................................. 34 Determining Sensitivity Dimensions ..................................................................... 35 Retrieving Sensitivity Results .............................................................................. 35
3 BLOCK RESULT SUBROUTINES .................................................................. 36 Block Identification................................................................................................. 37
Block IDs ......................................................................................................... 37 Next Block ....................................................................................................... 37
Block Connectivity Information................................................................................. 38 Number of Inlet and Outlet Streams .................................................................... 38 Stream Names and Types................................................................................... 38 Additional Port Information................................................................................. 39
Standard Block Results ........................................................................................... 41 Dimensions of Standard Scalar Results................................................................. 41 Standard Scalar Block Results ............................................................................. 42
Compressor Results................................................................................................ 43 Dimensions of Performance Results ..................................................................... 43 Stage-by-Stage Performance Results ................................................................... 44 Dimensions of Wheel-by-Wheel Performance Results.............................................. 45 Wheel-by-Wheel Performance Results .................................................................. 45
Compressor Profile Results ...................................................................................... 46 Dimensions of MCompr Profile Results.................................................................. 46 MCompr Profile Results ...................................................................................... 46 MCompr Cooler Profile Results ............................................................................ 47
Heat Exchanger Results .......................................................................................... 47 Number of Detailed Results ................................................................................ 48 Detailed Results................................................................................................ 48 Velocity and Pressure Results.............................................................................. 49 Heat Exchanger Results Dimensions..................................................................... 49 Heat Exchanger Zone Results.............................................................................. 50 Heat Exchanger Shell Results.............................................................................. 50 Heat Exchanger Tube Results.............................................................................. 51 Heat Exchanger Baffle Results............................................................................. 52
Contents 5
Heat Exchanger Nozzle Results ........................................................................... 52 Heat Exchanger Profiles .......................................................................................... 53
Heat Exchanger Profile Size ................................................................................ 53 Heat Exchanger Profile Properties ........................................................................ 53 Heat Exchanger Profile Results ............................................................................ 54
Column Results...................................................................................................... 55 Number of Columns........................................................................................... 55 Column Profile Dimensions ................................................................................. 56 Column Profile Properties ................................................................................... 56 Non-Component-Dependent Column Profiles ......................................................... 57 Component-Dependent Column Profiles................................................................ 57 RadFrac Thermosyphon Reboiler Results............................................................... 58 Interconnecting Stream and Pumparound Results .................................................. 59
Additional Data for PetroFrac Models......................................................................... 61 Dimensions of Additional Data............................................................................. 62 Additional Scalar Results Data............................................................................. 62 Additional PetroFrac Profile Properties .................................................................. 63 Additional Property Profiles................................................................................. 64 Furnace Data for PETROFRAC.............................................................................. 64 Component-Dependent Properties for the PetroFrac Furnace ................................... 65 Pumparound Results for PetroFrac Columns .......................................................... 66 Connectivity Data for PetroFrac Strippers ............................................................. 66 Additional Data for RateFrac Models..................................................................... 67 Dimensions of Additional Scalar Data ................................................................... 67 Additional Scalar Results Data............................................................................. 68 Dimensions of Component Split Fractions ............................................................. 68 Component Split Fractions.................................................................................. 69 Number of Liquid Phases .................................................................................... 69
Tray Reports ......................................................................................................... 70 Tray Report Dimensions ..................................................................................... 70 Sequential Tray Report Properties........................................................................ 70 Specific Tray Report Properties............................................................................ 71
Tray/Packing Sizing and Rating ................................................................................ 72 Number of Columns........................................................................................... 73 Number of Column Sections................................................................................ 73 Column Section Types and Numbers .................................................................... 73 Size of a Column Section.................................................................................... 74 Scalar Results for a Column Section..................................................................... 75 Column Section Profile Properties ........................................................................ 75 Column Section Profiles...................................................................................... 76
Reactor Results...................................................................................................... 77
Contents 6
Number of Reactor Substreams........................................................................... 77 Reactor Profile Dimensions ................................................................................. 77 Reactor Profile Properties ................................................................................... 78 Non-Component-Dependent Reactor Profiles ......................................................... 78 Component-Dependent Reactor Profiles................................................................ 79 Number of Components with Component Attribute Results ...................................... 79 Number of Attributes for a Component ................................................................. 80 Details of a Component Attribute......................................................................... 80 Component Attribute Results .............................................................................. 81 Number of Continuous Feed Streams ................................................................... 81 Continuous Feed Stream Results ......................................................................... 82 RBATCH Vent Accumulator Results ...................................................................... 82 RBatch Vent Profile Results................................................................................. 85 Reaction Data................................................................................................... 87
Reactor Property Reports ........................................................................................ 90 Number of Reports for a Reactor Block ................................................................. 90 Size of a Reactor Property Report ........................................................................ 90 Sequential Reactor Report Properties ................................................................... 91 Specific Reactor Report Properties ....................................................................... 92
Pipeline Results ..................................................................................................... 92 Pipeline Results Dimensions................................................................................ 93 Non-Component-Dependent Pipeline Inlet and Outlet Conditions.............................. 93 Component-Dependent Pipeline Inlet and Outlet Property Names............................. 94 Component-Dependent Pipeline Inlet and Outlet Conditions..................................... 94 Segment Data Property Names ........................................................................... 95 Pipeline Segment Data....................................................................................... 95 Pipeline Node Property Names ............................................................................ 96 Pipeline Node Results......................................................................................... 96 Pipeline Profile Property Names ........................................................................... 97 Pipeline Profile Results ....................................................................................... 97
Pipe Results .......................................................................................................... 98 Pipe Standard Profile Dimensions ........................................................................ 98 Pipe Standard Profile Property Names .................................................................. 99 Pipe Standard Profile Properties .......................................................................... 99 Pipe Property Reports .......................................................................................100
Block VLE Results..................................................................................................102 Heating/Cooling Curves..........................................................................................102
Number of Heating/Cooling Curves for a Block .....................................................103 Heating/Cooling Curves for a Block .....................................................................103 Size of a Heating/Cooling Curve .........................................................................104 Standard Heating/Cooling Curve Results..............................................................104
Contents 7
Sequential Heating/Cooling Curve Properties........................................................105 Specific Heating/Cooling Curve Properties............................................................106 Interconnecting Stream IDs...............................................................................107
4 STREAM RESULT SUBROUTINES ...............................................................108 Stream Identification .............................................................................................109
Listing Stream IDs............................................................................................109 Determining the Next Stream .............................................................................109
Material Stream Results..........................................................................................110 Retrieving Basic Stream Information....................................................................110 Listing Substream IDs .......................................................................................110 Retrieving Stream Results..................................................................................110 Retrieving a Single Stream Property ....................................................................111
Heat and Work Stream Results ................................................................................112 Component Attribute Results ...................................................................................112
Determining the Number of Components with Attributes .........................................112 Determining Number of Attributes for a Component ...............................................113 Determining Component Attribute Size.................................................................113 Retrieving Component Attribute Values ................................................................114
Substream Attribute Results....................................................................................114 Determining the Number of Substream Attributes ..................................................114 Determining Substream Attribute Size..................................................................115 Retrieving Substream Attribute Values .................................................................115
Stream Property Set Results....................................................................................116 Determining Dimensions of Stream Property Values ...............................................116 Retrieving Stream Property Results .....................................................................117
5 PHYSICAL PROPERTY TABLE RESULTS SUBROUTINES..............................118 Property Table Identification ...................................................................................119 Property and Flashcurve Table Results .....................................................................119
Determining Property Table Dimensions ..............................................................119 Retrieving Sequential Properties in a Table ..........................................................120 Retrieving Specific Properties from a Table ..........................................................121
Pressure-Temperature Envelope Results ...................................................................121 Determining Dimensions for Properties in the Envelope .........................................122 Determining Envelope Dimensions......................................................................122 Retrieving Temperature and Pressure for Envelope Branch .....................................123 Retrieving Sequential Envelope Properties ...........................................................124 Retrieving Specific Envelope Properties ...............................................................125
Contents 8
6 COSTING RESULTS SUBROUTINES............................................................126 Equipment Item Identification.................................................................................127
Determining Number of Equipment Items ............................................................127 Listing Equipment Items ...................................................................................127 Determining Next Equipment Item......................................................................128
Equipment Item Results .........................................................................................128 Retrieving Equipment Item Costing Results..........................................................128 Determining Equipment Item Sizing Results .........................................................129 Retrieving Equipment Item Sizing Results............................................................129
7 PRESSURE RELIEF SUBROUTINES ............................................................131 Pressure Relief Block Identification ..........................................................................132
Determining the Number of Pressure Relief Blocks ................................................132 Listing Pressure Relief Blocks .............................................................................132 Determining the Next Pressure Relief Block..........................................................133
Pressure Relief Results...........................................................................................133 Determining the Number of Substreams ..............................................................134 Determining Dimensions of Pressure Relief Arrays.................................................134 Listing Profile Properties....................................................................................135 Retrieving Dynamic Scalar Results......................................................................136 Retrieving Steady-State Scalar Results................................................................137 Retrieving Non-Component-Dependent Dynamic Profiles........................................137 Retrieving Dynamic Component-Dependent Profiles ..............................................138 Retrieving Steady-State Profiles .........................................................................139 Determining Vent Accumulator Profile Dimensions ................................................139 Listing Vent Accumulator Profile Properties ..........................................................140 Retrieving Non-Component-Dependent Vent Accumulator Profiles ...........................140 Retrieving Component-Dependent Vent Accumulator Profiles ..................................141 Determining Pressure Relief Vent Profile Dimensions .............................................141 Listing Vent Profile Properties ............................................................................142 Retrieving Position-Dependent Vent Profiles .........................................................142 Retrieving Component-Dependent Vent Profiles ....................................................143
8 EXAMPLES ................................................................................................144 Example 1: Stream Heat and Material Balance Table Generation..................................145
Declaring Variables and Dimensioning .................................................................145 Initializing the Toolkit .......................................................................................146 Finding Number of Streams ...............................................................................147 Finding Component Molecular Weight..................................................................147
Writing Stream Table.............................................................................................148 Example 2: Interactive Heating/Cooling Curve Table Generation ..................................152
Contents 9
Declaring Variables...........................................................................................152 Initializing the Toolkit .......................................................................................152 Finding Number of Blocks ..................................................................................153 Finding Blocks with Heating/Cooling Curves .........................................................153 Prompting for Block Name .................................................................................154 Finding Heating/Cooling Curves for Selected Block ................................................155 Finding Dimensions of Heating/Cooling Curve.......................................................156 Retrieving Standard Heating/Cooling Curve Results...............................................157 Retrieving Property Sets ...................................................................................158
Example 3: Column Profile Results Written to Plot File ................................................161 Opening Files and Initializing Toolkit ...................................................................161 Finding List of Blocks ........................................................................................162 Finding List of Properties ...................................................................................163 Retrieving Selected Property Profile ....................................................................164 Closing the Application......................................................................................165
Example 4: Distillation Column Diagram Generation...................................................167 Initializing the Toolkit .......................................................................................167 Retrieving Basic Block Results............................................................................168 Retrieving Inlet and Outlet Stream Flows.............................................................169 Finding Inlet and Outlet Stream IDs....................................................................170
A UNITS ......................................................................................................172 Table A.1 - Units Options .......................................................................................173
B PROPERTY NAMES....................................................................................180 Table B.1 - Standard Property Names ......................................................................181 Table B.2 - Mixture Thermodynamic Properties..........................................................192
Volume...........................................................................................................192 Flow Rates, Fractions........................................................................................193 Enthalpy, Entropy, Gibbs Energy, Heat Capacity ...................................................193 Other properties ..............................................................................................194
Table B.3 - Thermodynamic Properties of Components in Mixtures ...............................195 Table B.4 - Pure Component Thermodynamic Property Sets ........................................196 Table B.5 - Electrolyte Property Sets........................................................................197 Table B.6 - Transport Properties..............................................................................198
Mixture...........................................................................................................198 Component in a Mixture ....................................................................................198 Pure Components.............................................................................................198
Table B.7 - Petroleum-Related Properties for Mixtures ................................................199 Distillation Curves ............................................................................................199
Contents 10
Distillation Temperature....................................................................................200 Distillation Volume and Weight Percent ...............................................................200 Bulk Petroleum Property Values from Assay Curves...............................................201 Petroleum Cuts ................................................................................................202 Petroleum Property Curves ................................................................................203
Table B.8 - Elemental Analysis of Mixtures................................................................204 Table B.9 - Nonconventional Component Properties ...................................................205 Table B.10 - Property Names for Costing Results .......................................................205
Equipment Type: HEATX ...................................................................................205 Equipment Type: AIRCOOL................................................................................205 Equipment Type: FIRED-HEATER........................................................................206 Equipment Type: PUMP.....................................................................................206 Equipment Type: COMPR...................................................................................207 Equipment Type: BLOWER.................................................................................207 Equipment Type: TRAY-TOWER..........................................................................208 Equipment Type: TRAY-TOWER Section Results ....................................................208 Equipment Type: USER .....................................................................................208 Equipment Type: V-VESSEL...............................................................................209 Equipment Type: H-VESSEL...............................................................................209 Equipment Type: TANK .....................................................................................210
GENERAL INFORMATION..............................................................................211 Copyright.............................................................................................................211 Related Documentation..........................................................................................212
TECHNICAL SUPPORT...................................................................................213 Online Technical Support Center .............................................................................213
Phone and E-mail .............................................................................................214
INDEX ..........................................................................................................215
Introducing Summary File Toolkit 11
Introducing Summary File Toolkit
An Aspen Plus summary file is an ASCII file produced by Aspen Plus for every simulation run, containing all the results for that run. The Summary File Toolkit is a set of Fortran subroutines that you can use to build a program to extract results from an Aspen Plus summary file.
This reference manual describes the Summary File Toolkit and how to build programs using the toolkit.
The manual assumes that you are familiar with Fortran, Aspen Plus, and the results of an Aspen Plus simulation.
There is also an XML Results file available from Aspen Plus which can be processed by standard XML tools. This manual does not document the format of that file.
1 Getting Started 12
1 Getting Started
This chapter describes how to build an application program using the Aspen Plus Summary File Toolkit. It contains information on:
• The summary file and toolkit.
• Initializing the toolkit.
• Determining data dimensions.
• Retrieving data for an object.
• Using the toolkit with a hierarchical Aspen Plus run.
• Linking toolkit subroutines into your module.
• Creating a toolkit application for Windows.
• Transferring the toolkit to another computer.
1 Getting Started 13
The Summary File and Toolkit The summary file is an ASCII file produced by Aspen Plus for every simulation run. This file contains the summary of simulation results, such as block results, stream values, tray profiles, heating/cooling curves, and property tables. The information in a summary file is also contained within the Aspen Plus backup file. Summary files are named according to the form runid.SUM. Backup files are named according to the form runid.BKP.
The summary file toolkit is a set of Fortran subroutines that retrieve results information from the Aspen Plus summary file and backup file. (Use the backup file with results, in place of the summary file, in procedures throughout this manual.)
The subroutines are organized around the logical structure of the data. You can retrieve selected results. Or you can retrieve all the results of a simulation or simulation object (such as unit operation blocks or streams). The Fortran source code for the subroutines is provided so that you can build applications on any computer.
The location of the Fortran source code is the toolkit directory of the Aspen Plus Simulation Engine installation. The DLL is stored in the Engine\xeq directory of the Aspen Physical Property System installation (typically C:\Program Files\APrSystem 2004.1\Engine\xeq\zetoolkit.dll).
To use the summary file toolkit, an application program must perform three steps:
1 Initialize the toolkit for a summary file.
2 Get the dimensions of the data to be retrieved.
3 Retrieve the data.
These three steps are described in the following sections.
Initializing the Toolkit You must initialize the toolkit for a summary file before you can retrieve data. The initialization process consists of:
1 Accessing the required files and setting up directories for fast data access.
2 Defining the units of measurement for all values retrieved from the toolkit.
3 Specifying a value to substitute for missing results.
1 Getting Started 14
Accessing the Required Files You need to include file definitions for the following files during the initialization process. The unit numbers for these files must match those specified in the call to toolkit initialization routine TKINIT or TKINI2. File Description
Summary file The summary file
Properties file A file defining the names of results within the summary file
Units file A file containing units conversion information
Scratch file A temporary direct access file for fast access to summary file results
Defining the Summary File To define the summary file, use the subroutine TKOPEN. See Chapter 2 for more information.
Getting the Summary File Name Because the summary file may be different each time the toolkit application is executed, some input to the program is required to determine the summary file name. If the application program has an existing method of passing information into the program, use this method to pass the summary file name to the program.
Otherwise, the three principal ways the program can get the file name are by:
1 Prompting the user at the terminal.
2 Reading the file name from the command line.
3 Reading the file name from a file.
Prompting the user is the easiest method for most operating systems. Fortran READ and WRITE statements are used to get the file name.
Getting Property and Units File Names The properties file, RCPROPNU.DAT, and the units file, RCUNITS.DAT, are installed in the toolkit subdirectory of the Aspen Plus Simulation Engine installation. The Engine directory should be set as the value of the %asptop% environment variable.
1 Getting Started 15
Example of Environment Variable for Windows
When running in an Aspen simulation engine window, the environment variable ASPTOP points to the top level supplementary directory for Aspen Plus. The TOOLKIT directory is a subdirectory of this directory. You can use the following code to expand the file specification:
GETENV('ASPTOP', ASPTOP) DO 50 I = 80, 1, -1 TOP(I:I) .NE. ' ') GO TO 55 V(�ASPTOP�, ASPTOP) 80, 1, -1 ASPTOP(I:I) .NE. ' ') GO TO 55 ASPTOP(1:I) // '\TOOLKIT\RCPROPNU.DAT' ASPTOP(1:I) // '\TOOLKIT\RCUNITS.DAT'
Scratch File Units Number The direct access file is used to provide fast access to data in the summary file after initialization. The units number you specify for this file should not be used by the application program.
Defining Units of Measurement As part of the toolkit initialization process, you must specify a base units set in which the results will be returned. The base units set defines the units of measurement for each physical quantity (units type).
The base units sets available are SI, ENG, MET, and OUT. To customize a units set to change the output units of measurement for one or more physical quantities, or convert a result to another unit of measurement, use the subroutines described in Chapter 2. See Appendix A for other conversion options.
Specifying a Value for Missing Results If you make calls to the toolkit to retrieve results, and a requested result is missing, the toolkit returns a special value in place of the result. As part of the toolkit initialization process, you specify this value by assigning it to the argument RMISS in the call to routine TKINIT or TKINI2. Choose a value that will not be mistaken for a real result. A very large value (greater than 1E20) is recommended.
1 Getting Started 16
Determining the Data Dimensions The toolkit data retrieval routines require you to know the data dimensions before a retrieval is done. With these dimensions in mind, you must allocate space inside your application program for the data before retrieving it. Determining data dimensions includes:
1 Querying the summary file for the existence of simulation objects and data within an object.
2 Defining the size of the data for a simulation object.
The subroutine TKINFO returns the number of blocks, streams, property tables, and sensitivity tables in the summary file.
Each type of simulation object has a subroutine to find the next object in sequence. These subroutines are: Object Type Subroutine to Find Next Object
Blocks TKNBLK
Streams TKNSTR
Property tables TKNPPT
Sensitivity tables TKNEXT
Equipment item TKNEQP
Pressure relief TKNXPR
Each of these subroutines has a sequence number as an argument. The sequence number identifies the position of the object within the summary file. For example, a sequence number of five for TKNBLK indicates the fifth unit operation block in the summary file. Except for sensitivity objects and pressure relief, the subroutine also returns information about the type of object: the unit operation model type for a block, the type of stream (MATERIAL, HEAT, or WORK), or the type of property table.
The data available for an object are organized by the type of data. For example, block data is organized into a standard results set, connectivity information, heating/cooling curve data, profile data, and property set profile data. Each type of data has a routine that returns the dimensions of the data. Chapters 2 through 7 describe the toolkit routines for determining the dimensions of data and retrieving it. If a type of data is not available for an object, dimension values of zero are returned.
Retrieving Data for an Object Once the dimensions for data are known, you can retrieve the data by calling the appropriate routine. Each result returned is identified by a property name. Appendix B contains a list of property names and their descriptions.
In addition to property names, some results have qualifiers to further identify the data. For example, for an FSPLIT block, the split fractions for each outlet
1 Getting Started 17
stream are returned. The stream ID of the outlet stream is returned as a qualifier for the result.
You can use single subroutine calls to retrieve standard results for blocks, streams, heating/cooling curves, and pressure-temperature envelopes. Standard tray or reactor profiles are retrieved one profile at a time. You can identify property set results by the property set qualifiers: Qualifier Description
PNAME Property name. See Appendix B for a description.
SUBSID Substream ID
PHASE Phase (VAPOR, LIQUID, LIQUID1, LIQUID2, TOTAL, SOLID)
COMPID Component ID
WETDRY Wet/dry basis (WET or DRY) �
BASIS Unit basis for properties with multiple units ��
� Can be left unspecified. �� Valid values for the basis are MOLE, MASS and FLOW. MOLE and MASS apply to density (specifying mole density and mass density), entropy (specifying mole entropy and mass entropy), and heat capacity (specifying mole heat capacity and mass heat capacity). MOLE and FLOW apply to volume (specifying mole volume and volume flow). MOLE, MASS and FLOW apply to enthalpy (specifying mole enthalpy, mass enthalpy, and enthalpy flow).
Before calling a subroutine, make sure that all the qualifiers are set to the desired values or unset. If you do not unset a qualifier from a previous value, unexpected results may be returned.
All values with physical dimensions are returned in the units you specify during the initialization process. The units label and the units type are usually returned with the value. When the physical dimensions of a property are always known, the units information may not be returned. You can call the utility routine TKLABL to return the units label for a value not returned. In addition, you can use the utility routine TKCNVT to convert a value from default units to user-specified units.
Sometimes the retrieved data values are two-dimensional. For example, the column profile routine TKPRO2 returns values for every stage and component combination in a column. The dimension for the results then appears as two dimensions multiplied together. This figure yields the total number of results returned. It also shows the sequence of the results data in the array.
The results array is ordered so that the first dimension can scroll before the second dimension. In the TKPRO2 example, the results are returned in RVALS, which is dimensioned as NCP*NSTAGE (the number of components * the number of stages). The values returned in the RVALS array are ordered so that the results for every component on the first stage are given first, followed by all the results for every component on the second stage, and so on.
1 Getting Started 18
Using the Toolkit With a Hierarchical Aspen Plus Run Most Aspen Plus objects, including hierarchies, can exist within hierarchies. In such cases it is not sufficient to reference an object by type and eight character ID. The object�s ID must contain the full hierarchical path to the object, with each hierarchy name separated by a period (.). For example, if a run contains hierarchy H1, which contains hierarchy H2, which contains block B1, refer to the block as H1.H2.B1.
All toolkit subroutines that accept or return an object ID declare the argument as CHARACTER *(*). When passing such an argument, set up the dimension large enough to hold the hierarchical ID. If referencing a non-hierarchical problem, declaring the ID arguments as CHARACTER*8 is sufficient.
Note: The length must be larger for hierarchical problems. A declaration of CHARACTER*128 is always sufficient.
The toolkit always returns IDs with full path name. For example, TKNBLK, which lists the blocks in a run, cycles through all blocks in all hierarchy levels, returning IDs with full path name.
Block, stream, pressure relief, property table, and sensitivity IDs are hierarchical. Property name, substream, phase, and component IDs are not.
Note: It is not possible to cycle through all blocks in a single hierarchy level.
Linking Toolkit Subroutines into Your Module After you write or modify your application program to call the appropriate toolkit subroutines to retrieve the data, you must build an executable module, including the toolkit routines. The object code for the toolkit subroutines is stored in a dynamic link library for Windows, which is delivered with Aspen Plus. The library is named zetoolkit.lib and can be found in the toolkit subdirectory of the Aspen Plus Simulation Engine installation.
To link to this library, include %asptop%\toolkit\zetoolkit.lib in the linker directive, where %asptop% represents the Engine installation directory.
1 Getting Started 19
Creating a Toolkit Application for Windows The source code, in the form of a self-extracting executable, and dynamic link library (DLL) for the summary file toolkit are located in the toolkit directory of the Aspen Plus Simulation Engine installation. If you want to build a Windows summary file toolkit application and you do not have a license for Aspen Plus on Windows, the toolkit files are available separately on a 3.5" diskette. For ordering information, contact the AspenTech Hotline. The files on the diskette are not compressed, and can be copied to any directory on your Windows NT, 95, 98, or 2000 PC.
About the Windows Version The Windows version of the summary file toolkit consists of two files: File Name Description
zetoolkit.dll The summary file toolkit dynamic-link library. This file is stored in the Engine\xeq subfolder of the APrSystem installation, typically C:\Program Files\ APrSystem 2004.1\Engine\xeq\zetoolkit.dll
zetoolkit.lib Import library. This file contains the external references to the summary file toolkit routines in zetoolkit.dll. This file is stored in the Engine\toolkit subfolder of the Aspen Plus installation, along with the Fortran source files.
The DLL and LIB are compiled and linked with Digital Visual Fortran 6.6.
If you are using the summary file toolkit as part of a full installation of Aspen Plus, you can compile and link toolkit applications with the Fortran compiler for your Operating System. Make sure you are set up for running Aspen Plus. Aspen Plus provides procedures to help use the Aspen Plus Fortran utilities. The following table summarizes these procedures: To do this Enter these commands
Compile a Fortran routine ASPCOMP appname
Link an application executable link @appname.opt
Run a previously linked executable appname.exe
Where:
appname = The file name of the main Fortran application. Do not include the file extension when specifying the file name. ASPCOMP will accept Fortran files with the extension .for.
appname.opt = Text file containing the linker directive commands. For more information, see the following section, Linker Directive Commands for Windows.
1 Getting Started 20
Linker Directive Commands for Windows The linker directive file contains a set of commands that control the generation of the linked executable. Any object files or libraries you want to be included in the linked executable must be listed in the linker directive file.
The standard set of commands required to link a toolkit application are shown for a toolkit application named tkexampl.
Example of Linker Directive File
nCRTStartup -entry:mainCRTStartup msvcrt.lib -nodefaultlib:libc.lib dfordll.lib -nodefaultlib:dfor.lib c:\Engine\toolkit\zetoolkit.lib tkexample.obj -out:tkexample.exe
Substitute c:\Engine with the appropriate drive and directory location where the Aspen Plus Simulation Engine is installed. Replace tkexample with the name of your application. Add any additional object files and libraries you need to this directive file.
After creating the linker directive file for your application, you can use the link and run commands to generate and run your application's executable program.
Calling Summary File Toolkit Routines The files are compiled so that the summary file toolkit routines use the default calling and naming conventions for the Fortran compiler. These are similar to the stdcall convention, except:
• All routine names are in uppercase (Windows 95 and Windows NT Intel only).
• All arguments are passed by reference.
• There is a hidden string length argument when character strings are passed.
Applications calling the DLL should use this convention. Please see your compiler documentation about calling Fortran routines and hidden string length arguments.
Fortran applications can call the routines in the Summary File Toolkit without any code modifications. If you want to call the Summary File Toolkit from
1 Getting Started 21
another language, you will have to modify the code to work with the Fortran conventions adopted. See Using C to Call Routines, this chapter.
Opening and Closing Files Using the Summary File Toolkit You must be careful with file input and output when using the Summary File Toolkit. You must observe the following practices:
• Open and close the summary file with TKOPEN and TKCLFL.
• Open and close the log file optionally used in TKINI2, with TKOPEN and TKCLFL.
• Close the toolkit with TKCLOS, at the end of each run.
• Close the summary file and the log file with TKCLFL, at the end of each run.
• Do not use TKOPEN and TKCLFL for opening and closing the files your application reads from or writes to.
Using Fortran to Call Routines Use the Fortran default naming and calling conventions for calls to the summary file toolkit shared library, when compiling code. You do not have to carry out any special steps to call the summary file toolkit routines.
When linking the application, make sure a reference to the zetoolkit shared library is included in the list of libraries, and that its pathname is included in the list of library directories.
You must write your code and any setup procedures so that the zetoolkit shared library is in your run time path.
Using C to Call Routines When using C to call routines, you must adjust the naming and calling conventions. A full discussion of mixed language programming is beyond the scope of this manual, but a brief outline of important points follows.
You must:
• Make sure the DLL routines are called using stdcall.
• Make sure all arguments are passed by reference (pointers).
• Include the hidden string length arguments.
• Declare the Summary File Toolkit routines called in prototypes.
• Allow for the C string null-terminator.
See the documentation of your compiler for more details.
Sample Prototypes for TKINIT, TKINFO and TKBIDS for Windows
The following routines are declared as stdcall, and all character strings are followed by their lengths. The unsigned integer is passed by value.
1 Getting Started 22
The calling routine will add null characters to the strings returned. It will also make sure null characters are not included in any strings passed to the Fortran.
extern void __stdcall TKINIT (char* units, unsigned int len4, int *idirac, int* iunit, int *ipropn, char* rcprop, unsigned int len80, int* iunits, char* rcunits, unsigned int len80, double* rmiss, int *ierr);
extern void __stdcall TKINFO (char*versn, unsigned int len20, char* runid, unsigned int len8, char* date, unsigned int len80, char* infile, unsigned int len80, int* isstat, int* istatf, int* nblock, int* nstrm, int* ntable, int * nsens);
extern void __stdcall TKBIDS (int* nblock, char blkids[200] [8], unsigned int len8, char blktypes [200] [12], unsigned int len12, int* ierr);
2 General Subroutines 23
2 General Subroutines
This chapter describes the purpose and use of subroutines in the Aspen Plus Summary File Toolkit. Use the subroutines described in this chapter for:
• Initializing the summary file toolkit.
• Retrieving run information.
• Retrieving flowsheet balance results.
• Setting and changing units of measurement.
• Retrieving component information.
• Retrieving sensitivity results.
2 General Subroutines 24
Initializing the Summary File Toolkit Before you can retrieve any results from a summary file, you must call subroutine TKINIT or TKINI2 to initialize the summary file toolkit.
TKINIT assigns Fortran unit numbers and unit names for files used by the toolkit. See Initializing the Toolkit, Chapter 1, for information on identifying the necessary files.
The scratch file is a direct access file used by the toolkit to store intermediate data. You must supply a Fortran unit number for the scratch file.
To open the summary file and connect it to a unit number, you can:
• Use a Fortran OPEN statement in your program.
• Call TKOPEN routine (see Opening and Closing Files, this chapter), if using the Windows DLL.
The property number file and the unit definition file are delivered with Aspen Plus. The file names you specify to call TKINIT depend on the computer and operating system you are using (see Getting Property and Units File Names, Chapter 1).
TKINIT sets the default units set for all results data to the value of UNISET. This can be one of four values: SI, ENG, MET, or OUT. The first three values correspond to the Aspen Plus units sets with these names. OUT can be used to retrieve the results from the summary file without any UOM conversion. The data is retrieved in the same units as the Aspen Plus out units for the run.
Calling Sequence for TKINIT
CALL TKINIT (UNISET, IDIRAC, ISUMMF, IPROPN, RCPROP, IUNITS, RCUNIT, RMISS, IERR)
Argument List Descriptions for TKINIT Variable I/O � Type Dimension Description
UNISET I CHARACTER*4 � Units set for retrieved values (SI, ENG, MET, or OUT)
IDIRAC I INTEGER � Fortran unit number for scratch file
ISUMMF I INTEGER � Fortran unit number for summary file
IPROPN I INTEGER � Fortran unit number for property numbers file
RCPROP I CHARACTER*80 � File name for property numbers file
IUNITS I INTEGER � Fortran unit number for units definition file
RCUNIT I CHARACTER*80 � File name for units definition file
RMISS I REAL*8 � Real value flag for missing values
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
2 General Subroutines 25
If you initialize the toolkit with TKINIT, Aspen Plus writes errors or warnings from the toolkit run to the screen. TKINI2 works in the same way as TKINIT, except that it allows you to specify a Fortran unit number for error and warning messages. This is useful for applications where messages should not be written directly to the screen. Like the summary file, this file should already be opened before calling TKINI2. If you specify a negative unit number for the error and warning messages, they are turned off.
Calling Sequence for TKINI2
CALL TKINI2 (UNISET, IDIRAC, ISUMMF, IPROPN, RCPROP, IUNITS, RCUNIT, RMISS, IERR, ILOG)
Argument List Descriptions for TKINI2 Variable I/O � Type Dimension Description
UNISET I CHARACTER*4 � Units set for retrieved values (SI, ENG, MET or OUT)
IDIRAC I INTEGER � Fortran unit number for scratch file
ISUMMF I INTEGER � Fortran unit number for summary file
IPROPN I INTEGER � Fortran unit number for property numbers file
RCPROP I CHARACTER*80 � File name for property numbers file
IUNITS I INTEGER � Fortran unit number for units definition file
RCUNIT I CHARACTER*80 � File name for units definition file
RMISS I REAL*8 � Real value flag for missing values
IERR O INTEGER � Error flag (0=No error)
ILOG I INTEGER � Fortran Unit number for log file. Negative for no messages.
� I = Input to subroutine, O = Output from subroutine
Closing the Summary File Toolkit Call subroutine TKCLOS to close a summary file toolkit run. TKCLOS closes files opened by TKINIT or TKINI2, so the argument list should use the corresponding values passed to TKINIT or TKINI2. The summary file is not closed by this routine, but is instead rewound to its first record. Use TKCLFL to close it.
Calling Sequence for TKCLOS
CALL TKCLOS (ISUMMF, IDIRAC, IPROPN, IUNITS)
2 General Subroutines 26
Argument List Descriptions for TKCLOS Variable I/O � Type Dimension Description
ISUMMF I INTEGER � Fortran unit number for summary file
IDIRAC I INTEGER � Fortran unit number for scratch file
IPROPN I INTEGER � Fortran unit number for property numbers file
IUNITS I INTEGER � Fortran unit number for units definition file
� I = Input to subroutine, O = Output from subroutine
Opening and Closing Files Two routines are provided to open and close files with a specified Fortran unit number. If you are using a DLL version of the summary file toolkit, you must use these routines to open and close the summary file, and any log file used by TKINI2. Unless you do so, the summary file toolkit DLL will not recognize the Fortran unit numbers you pass it for these files. When using the DLL, you should not call these routines to open and close files your code accesses.
Call subroutine TKOPEN to open the file with the specified Fortran unit number.
Calling Sequence for TKOPEN
CALL TKOPEN (IUNIT, FILNAM, ACCESS, FORM, IRECL, STATUS, MODE, IERR)
Argument List Descriptions for TKOPEN Variable I/O � Type Dimension Description
IUNIT I INTEGER � Unit number of the file being opened
FILNAM I CHARACTER*80 � Name of file to open
ACCESS I CHARACTER*16 � File access (SEQUENTIAL, DIRECT)
FORM I CHARACTER*16 � I/O format (FORMATTED, UNFORMATTED)
IRECL I INTEGER � Record length
STATUS I CHARACTER*16 � File status (SCRATCH, OLD, NEW, UNKNOWN)
MODE I CHARACTER*16 � Open mode (READ, WRITE)
IERR O INTEGER � Error flag (0=No error, 1=Invalid argument, >0= IOSTAT error)
� I = Input to subroutine, O = Output from subroutine
Call subroutine TKCLFL to close the file with the specified Fortran unit number.
Calling Sequence for TKCLFL
CALL TKCLFL (IUNIT, IERR)
2 General Subroutines 27
Argument List Descriptions for TKCLFL Variable I/O � Type Dimension Description
IUNIT I INTEGER � Unit number of the file being closed
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Retrieving Run Information Use the subroutines in this section to retrieve general information about the run.
• Call TKINFO to obtain standard information about a run.
• Call TKTITL to obtain the run title.
• Call TKACCT to obtain run accounting information.
Standard Run Information Call subroutine TKINFO to retrieve the following standard information about a run:
• Aspen Plus release name.
• Run ID of the Aspen Plus run.
• Date of the run.
• Input file name.
• Input translator status.
• Simulation program status.
• Number of simulation objects (blocks, streams, property tables, sensitivity tables).
Calling Sequence for TKINFO
CALL TKINFO (VERSN, RUNID, DATE, INFILE, ISSTAT, ISTAT, NBLOCK, NSTRM, NTABLE, NSENS)
2 General Subroutines 28
Argument List Descriptions for TKINFO Variable I/O � Type Dimension Description
VERSN O CHARACTER*20 � Aspen Plus release name
RUNID O CHARACTER*8 � Aspen Plus run ID
DATE O CHARACTER*80 � Date of Aspen Plus run
INFILE O CHARACTER*80 � Aspen Plus input file name
ISSTAT O INTEGER � Input translator completion code
ISTATF O INTEGER 6 Simulation status flags for each element. See ISTATF, below.
NBLOCK O INTEGER � Number of blocks
NSTRM O INTEGER � Number of streams
NTABLE O INTEGER � Number of property tables
NSENS O INTEGER � Number of sensitivity tables
� I = Input to subroutine, O = Output from subroutine
ISTATF
The values are: 0 = Completed without errors, 1 = Completed with errors, 2 = None in this simulation,
The elements represent: ISTATF(1): Block status, (2): Convergence status, (3): Sensitivity status, (4): Case study status, (5): Stream calculation status, (6): Fortran and transfer status
Run Titles Call subroutine TKTITL to retrieve the run title.
Calling Sequence for TKTITL
CALL TKINFO (TITLE)
Argument List Descriptions for TKTITL Variable I/O � Type Dimension Description
TITLE O CHARACTER*64 � Run title
� I = Input to subroutine, O = Output from subroutine
2 General Subroutines 29
Accounting Information Call subroutine TKACCT to obtain accounting information for a run. Accounting information is only available if requested in the Aspen Plus input.
Calling Sequence for TKACCT
CALL TKACCT (ACCNT, PROJID, PRNAME, USER, IERR)
Argument List Descriptions for TKACCT Variable I/O � Type Dimension Description
ACCNT O CHARACTER*8 � Account number
PROJID O CHARACTER*8 � Project ID
PRNAME O CHARACTER*32 � Project name
USER O CHARACTER*20 � User name
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Retrieving Flowsheet Balance Results Call subroutine TKFLWB to retrieve the absolute and relative differences for:
• Total mole balance.
• Total mass balance.
• Enthalpy balance.
• Mole balance for each conventional component.
• Mass balance for each nonconventional component.
Calling Sequence for TKFLWB
CALL TKFLWB (ABSMOL, RELMOL, ABSMAS, RELMAS, ABSENT, RELENT, NCC, ABSCON, RELCON, NNCC, ABSNC, RELNC, IERR)
2 General Subroutines 30
Argument List Descriptions for TKFLWB Variable I/O � Type Dimension Description
ABSMOL O REAL*8 � Absolute mole balance difference (UNITS=MOLE-FLOW)
RELMOL O REAL*8 � Relative mole balance difference
ABSMAS O REAL*8 � Absolute mass balance difference (UNITS=MASS-FLOW)
RELMAS O REAL*8 � Relative mass balance difference
ABSENT O REAL*8 � Absolute enthalpy balance difference (UNITS=ENTHALPY-FLOW)
RELENT O REAL*8 � Relative enthalpy balance difference
NCC I INTEGER � Number of conventional components
ABSCON O REAL*8 NCC Absolute mole balance difference for each conventional component (UNITS=MOLE-FLOW)
RELCON O REAL*8 NCC Relative mole balance for each conventional component
NNCC I INTEGER � Number of nonconventional components
ABSNC O REAL*8 NNCC Absolute mass balance difference for each nonconventional component (UNITS=MASS-FLOW)
RELNC O REAL*8 NNCC Relative mass balance difference for each nonconventional component
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Units Conversion Use the subroutines in this section to:
• Change the units set for results.
• Convert units for individual results.
• Find units labels for results.
Changing Units Sets Values retrieved from the summary file are converted to the current units set. The variable SETID takes the same values as UNISET does in TKINIT and TKINI2. The units set is initially defined in the call to subroutine TKINIT or TKINI2. You can change the units set at any point in your program, by calling subroutine TKUNIT.
Use TKUNIT to define a new base units set and any units' options that should override the units' options in the base set.
Calling Sequence for TKUNIT
CALL TKUNIT (SETID, NTYPES, TYPES, LABELS, IERR)
2 General Subroutines 31
Argument List Descriptions for TKUNIT Variable I/O � Type Dimension Description
SETID I CHARACTER*4 � Base units set (SI, ENG, MET, or OUT)
NTYPES I INTEGER � Number of units types to change from the base set
TYPES I CHARACTER*12 NTYPES List of units' types to change from the base set. See Appendix A for a list of valid units' types.
LABELS I CHARACTER*16 NTYPES List of units labels for the units types to change from the base set. See Appendix A for a list of valid units' labels.
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Converting Units for Real Numbers Call subroutine TKCNVT to perform units conversion on a result or an array of results. TKCNVT converts values from the current units set to units specified by a unit's label. TKCNVT will not convert a result if the current units set is OUT units. (There is no such thing as a current unit for a particular units type with OUT units.)
Calling Sequence for TKCNVT
CALL TKCNVT (TYPE, LABEL, NVAL, RVALI, RVALO)
Argument List Descriptions for TKCNVT Variable I/O � Type Dimension Description
TYPE I CHARACTER*12 � Units type. Valid units' types are shown in Appendix A.
LABEL I CHARACTER*16 � Units label for output. See Appendix A for a list of valid units' labels.
NVAL I INTEGER � Number of values to convert
RVALI I REAL*8 NVAL Array of values to be converted. These values are assumed to be in the current units set.
RVALO O REAL*8 NVAL Array of converted values
� I = Input to subroutine, O = Output from subroutine
2 General Subroutines 32
Determining Units Labels Call subroutine TKLABL to determine the units' labels for a list of units' types in the current units set. TKLABL will not retrieve a label for a type if the current units set is OUT units. (There is no such thing as a current unit for a particular units type with OUT units.)
Calling Sequence for TKLABL
CALL TKLABL (NTYPES, TYPES, LABELS)
Argument List Descriptions for TKLABL Variable I/O � Type Dimension Description
NTYPES I INTEGER � Number of units types
TYPES I CHARACTER*12 NTYPES Units types. See Appendix A for a list of valid units' types.
LABELS O CHARACTER*16 NTYPES Units labels
� I = Input to subroutine, O = Output from subroutine
Component Information Retrieval Use the subroutines in this section to retrieve information about the components in the simulation:
• TKCOMP gets the number of components in the simulation.
• TKCIDS gets the list of component IDs.
• TKALIS gets lists of conventional components and their formulas (alias names).
• TKCPRP retrieves component properties, such as molecular weight, boiling point, and standard volume.
Number of Components Call subroutine TKCOMP to determine the number of components in a simulation. TKCOMP returns the number of both conventional and nonconventional components.
Calling Sequence for TKCOMP
CALL TKCOMP (NCC, NNCC)
Argument List Descriptions for TKCOMP Variable I/O � Type Dimension Description
NCC O INTEGER � Number of conventional components
NNCC O INTEGER � Number of nonconventional components
� I = Input to subroutine, O = Output from subroutine
2 General Subroutines 33
Component IDs Call subroutine TKCIDS to retrieve the component IDs for conventional and nonconventional components.
Calling Sequence for TKCIDS
CALL TKCIDS (NCC, NNCC, COMPID, COMPNC)
Argument List Descriptions for TKCIDS Variable I/O � Type Dimension Description
NCC I INTEGER � Number of conventional components
NNCC I INTEGER � Number of nonconventional components
COMPID O CHARACTER*8 NCC Component IDs for conventional components
COMPNC O CHARACTER*8 NNCC Component IDs for nonconventional components
� I = Input to subroutine, O = Output from subroutine
Component Alias Names Call subroutine TKALIS to retrieve conventional component IDs and their formulas (aliases).
Calling Sequence for TKALIS
CALL TKALIS (NCC, COMPID, ALIAS, IERR)
Argument List Descriptions for TKALIS Variable I/O � Type Dimension Description
NCC I INTEGER � Number of conventional components
COMPID O CHARACTER*8 NCC Conventional component IDs
ALIAS O CHARACTER*12 NCC Alias corresponding to component IDs
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Component Properties Call subroutine TKCPRP to retrieve component properties for conventional components. The properties that you can retrieve are molecular weight, boiling point, and standard volume.
Calling Sequence for TKCPRP
CALL TKCPRP (PROP, NCC, RVALS, LABEL)
2 General Subroutines 34
Argument List Descriptions for TKCPRP Variable I/O � Type Dimension Description
PROP I CHARACTER*8 � Property name (MW, TB, or VSTD)
NCC I INTEGER � Number of components
RVALS O REAL*8 NCC Property values (units are TEMPERATURE for TB and MOLE-VOLUME for VSTD)
LABEL O CHARACTER*16 � Units label
� I = Input to subroutine, O = Output from subroutine
Sensitivity Block Results You can retrieve sensitivity table results from the summary file, using the following three-step process:
1 Call TKNEXT to identify the next sensitivity block.
2 Call TKNSEN to retrieve the number of points and the number of columns in the table.
3 Call TKSENS to retrieve the values for the table and the headers for the columns.
Identifying Sensitivity Blocks Call subroutine TKNEXT to find the name of the next sensitivity block.
To find the block ID of the first sensitivity block, set IOFF to 1. To find the name of the second block, set IOFF to 2, and so on.
Calling Sequence for TKNEXT
CALL TKNEXT (TYPE, IOFF, ID1, ID2, IERR)
Argument List Descriptions for TKNEXT Variable I/O � Type Dimension Description
TYPE I CHARACTER*12 � Object type (set to SENSITIVITY for sensitivity blocks)
IOFF I INTEGER � Sequence number
ID1 O CHARACTER*(*) � First ID of the object. For sensitivity blocks, it is the block ID. Returns complete hierarchy specification.
ID2 O CHARACTER*12 � Second ID of the model name, for the object. For sensitivity blocks, it is blank.
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
2 General Subroutines 35
Determining Sensitivity Dimensions Call subroutine TKNSEN to determine the number of points and number of columns in the sensitivity table.
Calling Sequence for TKNSEN
CALL TKNSEN(SENSID, NPOINT, NCOL, IERR)
Argument List Descriptions for TKNSEN Variable I/O � Type Dimension Description
SENSID I CHARACTER*(*) � Sensitivity block ID
NPOINT O INTEGER � Number of points in table
NCOL O INTEGER � Number of columns in table
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Retrieving Sensitivity Results Call subroutine TKSENS to retrieve the results for a sensitivity table. The columns are identified by the variable HEADER. The actual argument to RVALS should be declared as a one-dimensional array of length, equal to or greater than (NPOINT * NCOL). The results in each column are stored consecutively.
Calling Sequence for TKSENS
CALL TKSENS (SENSID, NPOINT, NCOL, HEADER, RVALS, IERFLG, IERR)
Argument List Descriptions for TKSENS Variable I/O � Type Dimension Description
SENSID I CHARACTER*(*) � Sensitivity block ID (Full hierarchical path)
NPOINT I INTEGER � Number of points in table
NCOL I INTEGER � Number of columns in table
HEADER O CHARACTER*8 6, NCOL Table header of each table column
RVALS O REAL*8 NPOINT* NCOL
Results for sensitivity table
IERFLG O INTEGER NPOINT Error flag for each row of table (0=No error)
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 36
3 Block Result Subroutines
This chapter describes the use of block result retrieval subroutines in the summary file toolkit. Use the subroutines described in this chapter for:
• Block identification, connectivity, and results.
• Compressor results.
• Heat exchanger results.
• Column results.
• Tray reports and tray/packing sizing and rating.
• Reactor results and property reports.
• Pipeline results.
• Block vapor-liquid equilibrium (VLE) results.
• Heating/cooling curves.
3 Block Result Subroutines 37
Block Identification The following subroutines are used to identify blocks in the summary file:
• TKBIDS returns a list of blocks in the summary file.
• TKNBLK retrieves the next block ID in sequence.
Both routines return the model type for each block.
Block IDs Call subroutine TKBIDS to get the list of blocks and model types.
Calling Sequence for TKBIDS
CALL TKBIDS (NBLOCK, BLKID, BLKTYP, IERR)
Argument List Descriptions for TKBIDS Variable I/O � Type Dimension Description
NBLOCK I INTEGER � Number of blocks. You can find the value of NBLOCK by calling TKINFO.
BLKID O CHARACTER*(*) NBLOCK Block ID (Full hierarchical path)
BLKTYP O CHARACTER*12 NBLOCK Model type
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Next Block Call subroutine TKNBLK to find the name of the next unit operation block.
To find the block ID of the first block, set IBLOCK to 1. To find the name of the second block, set IBLOCK to 2, and so on.
Calling Sequence for TKNBLK
CALL TKNBLK (IBLOCK, BLKID, BLKTYP, IERR)
Argument List Descriptions for TKNBLK Variable I/O � Type Dimension Description
IBLOCK I INTEGER � Block number
BLKID O CHARACTER*(*) � Block ID
BLKTYP O CHARACTER*12 � Model type
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 38
Block Connectivity Information Use the subroutines in this section to retrieve the inlet and outlet stream connectivity for a block. Retrieving the inlet and outlet streams of a block is a two-step process:
1 Call subroutine TKCNTN to find the number of inlet and outlet streams.
2 Call subroutine TKCNCT to retrieve the list of inlet and outlet stream names.
Some blocks have additional connectivity information, such as stage number and column number. For these blocks you can obtain the additional information by calling TKPORT.
Number of Inlet and Outlet Streams Call subroutine TKCNTN to determine the number of inlet streams and outlet streams for a particular block.
Calling Sequence for TKCNTN
CALL TKCNTN (BLKID, NIN, NOUT, IERR)
Argument List Descriptions for TKCNTN Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NIN O INTEGER � Number of inlet streams
NOUT O INTEGER � Number of outlet streams
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Stream Names and Types Call subroutine TKCNCT to retrieve the names of the inlet and outlet streams for a block, along with the stream types (MATERIAL, HEAT, or WORK).
Calling Sequence for TKCNCT
CALL TKCNCT (BLKID, NIN, NOUT, BLKIN, TYPIN, BLKOUT, TYPOUT, IERR)
3 Block Result Subroutines 39
Argument List Descriptions for TKCNCT Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NIN I INTEGER � Number of inlet streams
NOUT I INTEGER � Number of outlet streams
BLKIN O CHARACTER*(*) NIN Inlet stream IDs
TYPIN O CHARACTER*8 NIN Stream type of inlet streams (MATERIAL, HEAT, or WORK)
BLKOUT O CHARACTER*(*) NOUT Outlet stream IDs
TYPOUT O CHARACTER*8 NOUT Stream type of outlet streams (MATERIAL, HEAT, or WORK)
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Additional Port Information Call subroutine TKPORT to obtain additional port information on inlet and outlet streams for a block. The additional information includes the port name (for example, F indicating a feed port) and additional identifiers, such as column number and stage number. Only the blocks with the model types shown in Table 3.1 need this subroutine. The outlet types for the other blocks are implicit in the order that the streams are returned by TKCNT. For example, vapor streams are returned before liquid streams.
Calling Sequence for TKPORT
CALL TKPORT (BLKID, NIN, NOUT, INPORT, IDIN1, IDIN2, IOPORT, IDOUT1, IDOUT2, IERR)
Argument List Descriptions for TKPORT Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NIN I INTEGER � Number of inlet streams
NOUT I INTEGER � Number of outlet streams
INPORT O CHARACTER*4 NIN Inlet port names
IDIN1 O INTEGER NIN ID1 for inlet streams
IDIN2 O INTEGER NIN ID2 for inlet streams
IOPORT O CHARACTER*4 NOUT Outlet port names
IDOUT1 O INTEGER NOUT ID1 for outlet streams
IDOUT2 O INTEGER NOUT ID2 for outlet streams
IERR O INTEGER � Error flag: 0 = No error 1 = Block ID not found 2 = Block has no port information
� I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 40
Port Information Returned by TKPORT Model Type
Port Name
Description ID1 ID2
Extract TF BF SF TP BP SP
Top feed Bottom feed Side feed Top product Bottom product Side product
Stage number
�
HeatX HF CF HP CP HWD CWD
Hot feed Cold feed Hot product Cold product Hot water decant Cold water decant
� �
Mcompr S1F IF WS HS FLS LK WD WS HS
Stage1 feed Stage feed Work feed Heat feed Product Liquid knockout Water draw Work out Heat out
Stage number
�
MheatX HF CF HP CP HWD CWD
Hot feed Cold feed Hot product Cold product Hot water decant Cold water decant
Stream number
�
MultiFrac F HS VD LD R SP CWD HS
Feed Heat feed Vapor distillate Liquid distillate Residue Side product Water distillate Heat product
Column number
Stage number
PetroFrac MF SF MHF SHF PHF VD LD B SP CWD SB PS CHS RHS MHP SHP PHP
Main column feed Stripper steam feed Main column heat feed Stripper heat feed Pumparound heat feed Main column vapor distillate Main column liquid distillate Main column bottoms product Main column side product Main column condenser water decant Stripper bottom product Pseudo stream Condenser heat stream Reboiler heat stream Main column heat product Stripper heat product Pumparound heat product
Column number �
Stage number
� The PetroFrac column number for the main column is one. The strippers are numbered sequentially, starting with two.
continued
3 Block Result Subroutines 41
Model Type
Port Name
Description ID1 ID2
RadFrac F HS VD LD R SP WD CHS RHS
Feed Heat feed Vapor distillate Liquid distillate Residue Side product Water distillate Condenser heat Reboiler heat
Stage number
�
RateFrac F HS VD LD R SP CWD HS
Feed Heat feed Vapor distillate Liquid distillate Residue Side product Water distillate Heat product
Column number
Section number
SCFrac F SF D B SP
Feed Steam feed Distillate Bottoms Side product
� �
� The PetroFrac column number for the main column is one. The strippers are numbered sequentially, starting with two.
Standard Block Results All unit operations have standard scalar block results. For example, Flash2 results include the outlet temperature and pressure, the vapor fraction, and the heat duty.
You can retrieve standard scalar results using a two-step process:
1 Call subroutine TKNRES to determine the dimensions of the results.
2 Call subroutine TKBRES to retrieve the results.
Dimensions of Standard Scalar Results Call subroutine TKNRES to determine the dimensions of the standard results for a block. TKNRES returns the number of results and the maximum number of qualifiers for results. You can use this information to dimension arrays for calling subroutine TKBRES, which retrieves the results.
Calling Sequence for TKNRES
CALL TKNRES (BLKID, NRES, NQUAL, IERR)
3 Block Result Subroutines 42
Argument List Descriptions for TKNRES Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NRES O INTEGER � Number of results
NQUAL O INTEGER � Maximum number of qualifiers for a result ��
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine �� Some results have qualifiers needed to identify the result, such as the stream ID or substream ID. NQUAL is the maximum number of qualifiers for the results of a block.
Standard Scalar Block Results Call subroutine TKBRES to retrieve the standard scalar results of a block. Treat the QUALS array as a one-dimensional array, with all the values for each qualifier type stored consecutively.
Calling Sequence for TKBRES
CALL TKBRES (BLKID, NRES, NQUAL, PNAMES, QUALS, ITYPE, IVALS, CVALS, RVALS, TYPES, LABELS)
Argument List Descriptions for TKBRES Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NRES I INTEGER � Number of results
NQUAL I INTEGER � Maximum number of qualifiers ��
PNAMES O CHARACTER*12 NRES Property name. See Appendix B for a description.
QUALS O CHARACTER*8 NRES* NQUAL Qualifiers ��
ITYPE O INTEGER NRES Data type of results (1=Integer, 2=Real, 3=Character) ���
IVALS O INTEGER NRES Integer results ���
CVALS O CHARACTER*8 NRES Character results ���
RVALS O REAL*8 NRES Real results ���
TYPES O CHARACTER*12 NRES Units types
LABELS O CHARACTER*16 NRES Units labels
� I = Input to subroutine, O = Output from subroutine �� Some results have qualifiers needed to identify the result, such as the stream ID or substream ID. NQUAL is the maximum number of qualifiers for the results of a block. ��� For each result, the value in ITYPE specifies which array contains the result (IVALS, CVALS or RVALS). For example, if ITYPE(4) is 2, then IVALS(4) is 0, CVALS(4) is blank and RVALS(4) contains the result.
3 Block Result Subroutines 43
Compressor Results If you use the Compr or MCompr model with scalar specifications, you can retrieve the standard block results. Retrieving these results is described in Standard Block Results, this chapter.
If you use Compr with performance curves for a stage, or MCompr with stage-by-stage performance curves, additional results are available. These results include:
• Percentage above surge.
• Percentage below stonewall.
• Speed of compressor shaft.
If you use Compr with performance curves for a wheel, or MCompr with wheel-by-wheel performance curves, the following additional results are available:
• Head coefficient.
• Flow coefficient.
• Rotor tip Mach number.
You can retrieve compressor performance results from the summary file for the Compr and MCompr models. You can consider Compr results as belonging to a single stage. The MCompr performance results can be retrieved for each stage of the MCompr model. In addition, you can retrieve the performance results for the wheels within each stage of the MCompr model when wheel-by-wheel performance is modeled.
Use this two-step process to retrieve the stage-by-stage performance results:
1 Call subroutine TKNPER to determine the number of stage-by-stage performance results in the Compr/MCompr model, and the number of stages in the MCompr model.
2 Call subroutine TKPERF to retrieve the stage-by-stage performance data for all stages.
Use these additional two steps to retrieve the wheel-by-wheel performance results:
3 Call subroutine TKNWHL to determine the number of wheels and the number of wheel-by-wheel performance results in the MCompr model.
4 Call subroutine TKWHLP to retrieve the wheel-by-wheel performance data for each stage.
Dimensions of Performance Results Call subroutine TKNPER to determine the number of properties in the stage-by-stage compressor performance results. TKNPER also returns NSTAGE, the number of compressor stages for MCompr. TKNPER returns a NSTAGE value of 1 for Compr. TKNPER returns a NSTAGE value of 0 for all other models.
3 Block Result Subroutines 44
When there are no performance results, TKNPER may still return the number of stages. TKNPER will do this if there are wheel-by-wheel performance results available. Use NPROP (not NSTAGE) to check if there any performance results available.
Calling Sequence for TKNPER
CALL TKNPER (BLKID, NPROP, NSTAGE)
Argument List Descriptions for TKNPER Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROP O INTEGER � Number of stage-by-stage performance results properties
NSTAGE O INTEGER � Number of compressor stages � I = Input to subroutine, O = Output from subroutine
Stage-by-Stage Performance Results Call subroutine TKPERF to retrieve the stage-by-stage compressor performance results. Use 1 as the value of NSTAGE with the Compr model. The results for the MCompr model are ordered in the RVALS array, so that all the properties for a stage are sequential.
Calling Sequence for TKPERF
CALL TKPERF (BLKID, NPROP, NSTAGE, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKPERF Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of properties
NSTAGE I INTEGER � Number of stages (1 for Compr)
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
RVALS O REAL*8 NPROP* NSTAGE
Real results
TYPES O CHARACTER*12 NPROP Units types
LABELS O CHARACTER*16 NPROP Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 45
Dimensions of Wheel-by-Wheel Performance Results Call subroutine TKNWHL to determine the number of wheels in a particular stage of MCompr. The number of properties in the wheel-by-wheel performance results is also returned. Call TKNPER to find the total number of stages.
Calling Sequence for TKNWHL
CALL TKNWHL (BLKID, ISTAGE, NWHEEL, NPROP)
Argument List Descriptions for TKNWHL Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ISTAGE I INTEGER � Specified compressor stage
NWHEEL O INTEGER � Number of wheels
NPROP O INTEGER � Number of wheel-by-wheel performance results properties
� I = Input to subroutine, O = Output from subroutine
Wheel-by-Wheel Performance Results Call subroutine TKWHLR to retrieve the compressor wheel-by-wheel performance results for the specified stage of the MCompr model. The results are ordered in the RVALS array so that all the properties for a wheel are sequential.
Calling Sequence for TKWHLR
CALL TKWHLR (BLKID, ISTAGE, NPROP, NWHEEL, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKWHLR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ISTAGE I INTEGER � Stage number
NPROP I INTEGER � Number of properties
NWHEEL I INTEGER � Number of wheels in stage
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
RVALS O REAL*8 NPROP* NWHEEL
Real results
TYPES O CHARACTER*12 NPROP Units types
LABELS O CHARACTER*16 NPROP Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 46
Compressor Profile Results You can retrieve profile data for each stage and inter-stage cooler of the multi-stage compressor model MCompr. This requires three steps:
1 Call subroutine TKNMCP to determine the number of MCompr stages, cooler stages and profile properties.
2 Call subroutine TKMCPR to retrieve the profile data for the MCompr stages.
3 Call subroutine TKMCCP to retrieve the profile data for the MCompr coolers.
Dimensions of MCompr Profile Results Call subroutine TKNMCP to determine the number of stages, cooler stages, stage profile properties and cooler stage profile properties.
Calling Sequence for TKNMCP
CALL TKNMCP (BLKID, NSTAGE, NPROP, NCOOL, NCPROP)
Argument List Descriptions for TKNMCP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NSTAGE O INTEGER � Number of compressor stages
NPROP O INTEGER � Number of stage profile properties
NCOOL O INTEGER � Number of compressor cooler stages
NCPROP O INTEGER � Number of cooler stage profile properties � I = Input to subroutine, O = Output from subroutine
MCompr Profile Results Call subroutine TKMCPR to retrieve the MCompr profile results. The results are ordered in the RVALS array so that all properties for a stage are sequential.
Calling Sequence for TKMCPR
CALL TKMCPR (BLKID, NPROP, NSTAGE, PNAMES, RVALS, TYPES, LABELS, IERR)
3 Block Result Subroutines 47
Argument List Descriptions for TKMCPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of profile properties
NSTAGE I INTEGER � Number of stages
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
RVALS O REAL*8 NPROP* NSTAGE
Real results
TYPES O CHARACTER*12 NPROP Units types
LABELS O CHARACTER*16 NPROP Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
MCompr Cooler Profile Results Call subroutine TKMCCP to retrieve the MCompr profile results for the cooler stage. The results are ordered in the RVALS array so that all the properties for a cooler stage are sequential.
Calling Sequence for TKMCCP
CALL TKMCCP (BLKID, NCPROP, NCOOL, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKMCCP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCPROP I INTEGER � Number of profile properties
NCOOL I INTEGER � Number of cooler stages
PNAMES O CHARACTER*12 NCPROP Property name. See Appendix B for a description.
RVALS O REAL*8 NCPROP* NCOOL Real results
TYPES O CHARACTER*12 NCPROP Units types
LABELS O CHARACTER*16 NCPROP Units labels
IERR O INTEGER � Error flag (0=No error) �I = Input to subroutine, O = Output from subroutine
Heat Exchanger Results You can retrieve the standard block results and HCURVE data, if you use the HeatX model in SHORTCUT mode. Retrieving these results is described in Standard Block Results and Heating/Cooling Curves, this chapter. Additional data are available, if you use the HeatX model in the RIGOROUS mode. These are more detailed block results, zone, shell, tube, baffle and nozzle data. This section describes how to retrieve these additional rigorous HeatX results.
3 Block Result Subroutines 48
You can retrieve the detailed block results using a three-step process:
1 Call subroutine TKNHXD to determine the HeatX detailed results dimensions.
2 Call subroutine TKHXD1 to retrieve detailed results.
3 Call subroutine TKHXD2 to retrieve the velocity and pressure drop results.
You can retrieve the zone, shell, tube, baffle and nozzle data using a six-step process:
1 Call subroutine TKNHXT to determine the sizes of the results.
2 Call subroutine TKHXZO to retrieve the zone results.
3 Call subroutine TKHXSH to retrieve the shell results.
4 Call subroutine TKHXTU to retrieve the tube results.
5 Call subroutine TKHXBA to retrieve the baffle results.
6 Call subroutine TKHXNO to retrieve the nozzle results.
Number of Detailed Results Call subroutine TKNHXD to determine the number of HeatX detailed results. If NDET1 is returned as zero, there are no rigorous heat exchanger results for this block ID.
Calling Sequence for TKNHXD
CALL TKNHXD (BLKID, NDET1, NDET2)
Argument List Descriptions for TKNHXD Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NDET1 O INTEGER � Number of detailed results
NDET2 O INTEGER � Number of velocity-DP results � I = Input to subroutine, O = Output from subroutine
Detailed Results Call subroutine TKHXD1 to retrieve the first set of detailed results (such as, areas and heat transfer coefficients) for the heat exchanger.
Calling Sequence for TKHXD1
CALL TKHXD1 (BLKID, NDET1, PNAMES, RVALS, TYPES, LABELS, IERR)
3 Block Result Subroutines 49
Argument List Descriptions for TKHXD1 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NDET1 I INTEGER � Number of detailed results
PNAMES O CHARACTER*12 NDET1 Property name. See Appendix B for a description.
RVALS O REAL*8 NDET1 Real results
TYPES O CHARACTER*12 NDET1 Units types
LABELS O CHARACTER*16 NDET1 Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Velocity and Pressure Results Call subroutine TKHXD2 to retrieve the velocity and pressure drop results for the heat exchanger.
Calling Sequence for TKHXD2
CALL TKHXD2 (BLKID, NDET2, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKHXD2 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NDET2 I INTEGER � Number of velocity pressure drop results
PNAMES O CHARACTER*12 NDET2 Property name. See Appendix B for a description.
RVALS O REAL*8 NDET2 Real results
TYPES O CHARACTER*12 NDET2 Units types
LABELS O CHARACTER*16 NDET2 Units labels
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Heat Exchanger Results Dimensions Call TKNHXT to retrieve the sizes of the zone, shell, tube, baffle and nozzle results. Because HeatX can be divided into a number of zones, the number of zones together with the number of results in a zone is returned. A single value is returned for the number of shell, tube, baffle and nozzle results.
Calling Sequence for TKNHXT
CALL TKNHXT (BLKID, NZONE, NZORES, NSHRES, NTURES, NBARES, NNORES)
3 Block Result Subroutines 50
Argument List Descriptions for TKNHXT Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NZONE O INTEGER � Number of Zones
NZORES O INTEGER � Number of Zone results
NSHRES O INTEGER � Number of Shell results
NTURES O INTEGER � Number of Tube results
NBARES O INTEGER � Number of Baffle results
NNORES O INTEGER � Number of Nozzle results � I = Input to subroutine, O = Output from subroutine
Heat Exchanger Zone Results Call subroutine TKHXZO to retrieve the HeatX zone results. The results for all zones are returned in the RVALS array, with the values for a zone stored at consecutive locations in this array. The first zones results are from element 1 to element NZORES. The second zones results are from NZORES+1 to 2*NZORES, and so on.
Calling Sequence for TKHXZO
CALL TKHXZO (BLKID, NZONE, NZORES, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKHXZO Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NZONE I INTEGER � Number of Zones
NZORES I INTEGER � Number of Zone properties
PNAMES O CHARACTER*12 NZORES Property name. See Appendix B for a description.
RVALS O REAL*8 NZORES* NZONE
Real results
TYPES O CHARACTER*12 NZORES Unit types
LABELS O CHARACTER*16 NZORES Unit labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Heat Exchanger Shell Results Call subroutine TKHXSH to retrieve the shell results.
Calling Sequence for TKHXSH
CALL TKHXSH (BLKID, NSHRES, PNAMES, ITYPES, IVALS, CVALS, RVALS, TYPES, LABELS, IERR)
3 Block Result Subroutines 51
Argument List Descriptions for TKHXSH Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NSHRES I INTEGER � Number of Shell properties
PNAMES O CHARACTER*12 NSHRES Property name. See Appendix B for a description.
ITYPES O INTEGER NSHRES Data type of results (1=Integer 2=Real 3=Character)
IVALS O INTEGER NSHRES Integer results
CVALS O CHARACTER*12 NSHRES Character results
RVALS O REAL*8 NSHRES Real results
TYPES O CHARACTER*12 NSHRES Unit types
LABELS O CHARACTER*16 NSHRES Unit labels
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Heat Exchanger Tube Results Call subroutine TKHXTU to retrieve the tube results.
Calling Sequence for TKHXTU
CALL TKHXTU (BLKID, NTURES, PNAMES, ITYPES, IVALS, CVALS, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKHXTU Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NTURES I INTEGER � Number of Tube properties
PNAMES O CHARACTER*12 NTURES Property name. See Appendix B for a description.
ITYPES O INTEGER NTURES Data type of results (1=Integer 2=Real 3=Character)
IVALS O INTEGER NTURES Integer results
CVALS O CHARACTER*12 NTURES Character results
RVALS O REAL*8 NTURES Real results
TYPES O CHARACTER*12 NTURES Unit types
LABELS O CHARACTER*16 NTURES Unit labels
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 52
Heat Exchanger Baffle Results Call subroutine TKHXBA to retrieve the baffle results.
Calling Sequence for TKHXBA
CALL TKHXBA (BLKID, NBARES, PNAMES, ITYPES, IVALS, CVALS, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKHXBA Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NBARES I INTEGER � Number of Baffle properties
PNAMES O CHARACTER*12 NBARES Property name. See Appendix B for a description.
ITYPES O INTEGER NBARES Data type of results (1=Integer 2=Real 3=Character)
IVALS O INTEGER NBARES Integer results
CVALS O CHARACTER*16 NBARES Character results
RVALS O REAL*8 NBARES Real results
TYPES O CHARACTER*12 NBARES Unit types
LABELS O CHARACTER*16 NBARES Unit labels
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Heat Exchanger Nozzle Results Call subroutine TKHXNO to retrieve the nozzle results.
Calling Sequence for TKHXNO
CALL TKHXNO (BLKID, NNORES, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKHXNO Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NNORES I INTEGER � Number of Nozzle properties
PNAMES O CHARACTER*12 NNORES Property name. See Appendix B for a description.
RVALS O REAL*8 NNORES Real results
TYPES O CHARACTER*12 NNORES Unit types
LABELS O CHARACTER*16 NNORES Unit labels
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 53
Heat Exchanger Profiles The rigorous HeatX model may have up to four different profiles. They are:
• Zone profile.
• Shell profile.
• Tube profile.
• Temperature/Duty profile.
You can retrieve the HeatX profile results using a three-step process.
1 Call subroutine TKHXPF to determine the size of a profile.
2 Call subroutine TKHXPP to get the names of the properties in a profile.
3 Call subroutine TKHXPR to get the results for a property in a profile.
The PRFTYP argument for these functions uses the following profile types: PRFTYP Value Profile Type
ZONE_PRF Zone Profile
SHEL_PRF Shell Profile
TUBE_PRF Tube Profile
TQ_PRF Temperature-Duty Profile
Heat Exchanger Profile Size Call subroutine TKHXPF to determine the size of a profile. TKHXPF returns the size of the profile for the specified profile type. A size of zero indicates the profile is not present.
Calling Sequence for TKHXPF
CALL TKHXPF (BLKID, PRFTYP, NPOINT, NPROP)
Argument List Descriptions for TKHXPF Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PRFTYP I CHARACTER*8 � Profile type (see above)
NPOINT O INTEGER � Number of profile points
NPROP O INTEGER � Number of profile properties � I = Input to subroutine, O = Output from subroutine
Heat Exchanger Profile Properties Call subroutine TKHXPP to retrieve the names of the properties for the specified profile type. The properties may have additional labels, which further describe them. For example, PNAMES = HX_SMCV, LABEL1 = Crossflow, LABEL2 = Velocity.
Calling Sequence for TKHXPP
CALL TKHXPP (BLKID, PRFTYP, NPROP, PNAMES, LABEL1, LABEL2, IERR)
3 Block Result Subroutines 54
Argument List Descriptions for TKHXPP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PRFTYP I CHARACTER*8 � Profile type (see above)
NPROP O INTEGER � Number of profile properties
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
LABEL1 O CHARACTER*12 NPROP First property label
LABEL2 O CHARACTER*12 NPROP Second property label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Heat Exchanger Profile Results Call subroutine TKHXPR to retrieve the results for the specified property in a profile. The profile data consists of a number of points within a number of zones. The zone of each value is returned in IZONE, and the point number is returned in IPOINT.
The results in RVALS are ordered so that all the points for the first zone are followed by the points for the second zone, and so on.
Calling Sequence for TKHXPR
CALL TKHXPR (BLKID, PRFTYP, PNAME, NPOINT, IZONE, IPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKHXPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PRFTYP I CHARACTER*8 � Profile type (see above)
PNAME I CHARACTER*12 � Property name from TKHXPP
NPOINT I INTEGER � Number of profile points
IZONE O INTEGER NPOINT Number of zone
IPOINT O INTEGER NPOINT Point number within zone
RVALS O REAL*8 NPOINT Real results
TYPE O CHARACTER*12 � Unit types
LABEL O CHARACTER*16 � Unit labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 55
Column Results You can retrieve column profile results from the summary file for the rigorous distillation models RadFrac, MultiFrac, Extract, PetroFrac, and RateFrac. You can retrieve most column results using the following four-step process. See also RadFrac Thermosyphon Reboiler Results, Additional Data for PetroFrac Models, and Additional Data for RateFrac Models, this chapter.
1 Call subroutine TKNCOL to determine the number of columns for MultiFrac, PetroFrac, and RateFrac.
2 Call subroutine TKPROF to determine the dimensions of the profile.
3 Call subroutine TKPROP to list the properties.
4 Call subroutine TKPRO1 to retrieve the property values for non-component-dependent properties, or subroutine TKPRO2 to retrieve the property values for component-dependent properties.
Most of the column subroutines take the argument ICOL, which represents the column number. This is always 1 for RadFrac and Extract. For MultiFrac and RateFrac this is the column number: 1, 2, and so on. With PetroFrac the main column is numbered 1 and the strippers are numbered starting with 2. The actual name of a stripper can be retrieved using TKPTRS.
RateFrac models have segments rather than stages. The references to NSTAGE used in the descriptions of the column routines, apply to the number of segments in a RateFrac column.
Number of Columns Call subroutine TKNCOL to determine the number of columns in a block using a staged separation model. TKNCOL returns a value of 1 for Aspen Plus models RadFrac and Extract. It returns the number of columns for MultiFrac and RateFrac. For PetroFrac, NCOL equals the number of strippers plus 1 for the main column. All other models return 0.
Calling Sequence for TKNCOL
CALL TKNCOL (BLKID, NCOL)
Argument List Descriptions for TKNCOL Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCOL O INTEGER � Number of columns � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 56
Column Profile Dimensions Call subroutine TKPROF to determine the sizes of column profile arrays. TKPROF returns the number of:
• Stages.
• Components present.
• Properties.
Calling Sequence for TKPROF
CALL TKPROF (BLKID, ICOL, NSTAGE, NCP, NPROP)
Argument List Descriptions for TKPROF Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NSTAGE O INTEGER � Number of stages
NCP O INTEGER � Number of components present
NPROP O INTEGER � Number of properties � I = Input to subroutine, O = Output from subroutine
Column Profile Properties Call subroutine TKPROP to list the profile properties available for a block. Each property is identified as component-dependent or not.
Calling Sequence for TKPROP
CALL TKPROP (BLKID, ICOL, NPROP, ITYPES, PNAMES, IERR)
Argument List Descriptions for TKPROP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NPROP I INTEGER � Number of properties
ITYPES O INTEGER NPROP Property type (1=Non-component-dependent, 2=Component-dependent)
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 57
Non-Component-Dependent Column Profiles Call subroutine TKPRO1 to retrieve the profile for a non-component-dependent property. This includes hydraulic properties. TKPRO1 returns a single units type and label for the entire profile.
Calling Sequence for TKPRO1
CALL TKPRO1 (BLKID, PNAME, ICOL, NSTAGE, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPRO1 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name returned by TKPROP
ICOL I INTEGER � Column number
NSTAGE I INTEGER � Number of stages
RVALS O REAL*8 NSTAGE Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Component-Dependent Column Profiles Call subroutine TKPRO2 to retrieve the profile for a component-dependent property. The results are in the RVALS array, which returns NCP * NSTAGE results. Treat RVALS as a one-dimensional array. All property results for a stage are stored consecutively. TKPRO2 returns a single units type and label for the entire profile.
Calling Sequence for TKPRO2
CALL TKPRO2 (BLKID, PNAME, ICOL, NCP, COMPID, NSTAGE, RVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 58
Argument List Descriptions for TKPRO2 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name returned by TKPROP
ICOL I INTEGER � Column number
NCP I INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component IDs
NSTAGE I INTEGER � Number of stages
RVALS O REAL*8 NCP* NSTAGE Property values
TYPE O CHARACTER*12 � Units types
LABEL O CHARACTER*16 � Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
RadFrac Thermosyphon Reboiler Results A RadFrac unit may optionally have a thermosyphon reboiler. You can retrieve this data using two steps:
1 Call TKTRNR to determine the numbers of results and components.
2 Call TKTRRS to retrieve the property names, results, and list of components.
Number of Components Call subroutine TKTRNR to determine the number of components present, the number of component-dependent properties with results, and the number of properties with results that are non-component-dependent. If the unit does not have a thermosyphon reboiler, NRES, NCPROP, and NCP are all returned as 0.
Calling Sequence for TKTRNR
CALL TKTRNR (BLKID, NRES, NCPROP, NCP)
Argument List Descriptions for TKTRNR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NRES O INTEGER � Number of non-component-dependent results
NCPROP O INTEGER � Number of component-dependent properties
NCP O INTEGER � Number of components present in reboiler
� I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 59
Reboiler Results Call subroutine TKTRRS to retrieve the property names and values for the thermosyphon reboiler. Two sets of property names and values are returned: one for the component-dependent results and one for the non-component-dependent results. Note that the component-dependent data is returned in a single array, with all the results for a single property returned in consecutive elements of the CRVALS array.
Calling Sequence for TKTRRS
CALL TKTRRS (BLKID, NRES, NCPROP, NCP, PNAME, RVALS, TYPES, LABELS, CPNAME, COMPID, CRVALS, IERR)
Argument List for Subroutine TKTRRS Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NRES I INTEGER � Number of non-component-dependent results
NCPROP I INTEGER � Number of component-dependent results
NCP I INTEGER � Number of components present in reboiler
PNAMES O CHARACTER*12 NRES Property names for non-component-dependent results. See Appendix B for a description.
RVALS O REAL*8 NRES Results for non-component-dependent properties
TYPES O CHARACTER*12 NRES Results types for non-component-dependent properties
LABELS O CHARACTER*16 NRES Results labels for non-component-dependent properties
CPNAME O CHARACTER*12 NCPROP Property names for component-dependent results
COMPID O CHARACTER*8 NCP Component names
CRVALS O REAL*8 NCP* NCPROP Results for component-dependent properties
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Interconnecting Stream and Pumparound Results The MultiFrac and RateFrac models may contain interconnecting streams. The RadFrac model may contain pumparounds. You can retrieve the data for these streams and pumparounds using these two steps:
1 Call TKNICS to determine the number of interconnecting streams or pumparounds in the model.
2 Call TKICST to retrieve the results for all the interconnecting streams or pumparounds in a model.
3 Block Result Subroutines 60
Number of Interconnecting Streams and Pumparounds Call subroutine TKNICS to determine the number of interconnecting streams present in a MultiFrac or RateFrac model. Also call TKNICS to determine the number of pumparounds in a RadFrac model. The value of NICST is returned as 0 if the model does not have any interconnecting streams or pumparounds.
Calling Sequence for TKNICS
CALL TKNICS (BLKID, NICST)
Argument List Descriptions for TKNICS Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NICST O INTEGER � Number of interconnecting streams or pumparounds
� I = Input to subroutine, O = Output from subroutine
Retrieving Results for Interconnecting Streams and Pumparounds Call subroutine TKICST to retrieve the results for MultiFrac or RateFrac interconnecting streams. Also call TKICST to retrieve the results for RadFrac pumparounds. The routine returns arrays containing the results for all the interconnecting streams or pumparounds in a model. Source and destination data are not returned for the RateFrac model, and zeros are returned for these properties. The mass and volume flows are also unavailable for the RateFrac model, and values of RMISS are returned for these properties.
Calling Sequence for TKICST
CALL TKICST (BLKID, NICST, ISCOL, ISSTG, IDCOL, IDSTG, TEMP, PRES, DUTY, VFRAC, FMOLE, FMASS, FVOL, IERR)
3 Block Result Subroutines 61
Argument List Descriptions for TKICST Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NICST I INTEGER � Number of interconnecting streams or pumparounds
ISCOL O INTEGER NICST Source Column
ISSTG O INTEGER NICST Source Stage
IDCOL O INTEGER NICST Destination Column
IDSTG O INTEGER NICST Destination Stage
TEMP O REAL*8 NICST Temperature
PRES O REAL*8 NICST Pressure
DUTY O REAL*8 NICST Duty
VFRAC O REAL*8 NICST Vapor Fraction
FMOLE O REAL*8 NICST Mole Flow
FMASS O REAL*8 NICST Mass Flow
FVOL O REAL*8 NICST Standard liquid volume flow
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Additional Data for PetroFrac Models The PetroFrac model has a number of additional routines that retrieve the results for the pumparounds, furnace, and connectivity of the model. The PetroFrac model consists of a main column and a number of strippers.
1 Call subroutine TKNPET to determine the dimensions of the additional data.
2 Call subroutine TKPTRS to retrieve additional data for each column.
3 Call TKPTAD to list additional property profiles.
4 Call TKPTPR to retrieve the values of the additional property profiles.
5 Call subroutine TKPTFR to retrieve the PetroFrac furnace data.
6 Call subroutine TKFRCM to retrieve the values for component-dependent properties in the furnace.
7 Call subroutine TKPTPP to retrieve pumparound results for the PetroFrac columns.
8 Call subroutine TKPTCN to retrieve connectivity data for the strippers.
3 Block Result Subroutines 62
Dimensions of Additional Data Call subroutine TKNPET for each column number in the PetroFrac model to determine the sizes of the additional data. If a type of data is not present for the column number, the size is returned as 0. The main column always returns 0 for NSTRCN and NCNRES. The strippers always return 0 for NPUMP, NPRRES, NFRCON, NFRRES, NFPROP, and NFCOMP.
Calling Sequence for TKNPET
CALL TKNPET (BLKID, ICOL, NMOLE, NMASS, NSVOL, NRES, NPUMP, NPRRES, NFRCON, NFRRES, NFPROP, NFCOMP, NSTRCN, NCNRES)
Argument List Descriptions for TKNPET Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NMOLE O INTEGER � Number of molar profile results
NMASS O INTEGER � Number of mass profile results
NSVOL O INTEGER � Number of standard liquid volume profileresults
NRES O INTEGER � Number of scalar column results
NPUMP O INTEGER � Number of pumparounds
NPRRES O INTEGER � Number of pumparound results
NFRCON O INTEGER � Number of furnace streams
NFRRES O INTEGER � Number of furnace results
NFPROP O INTEGER � Number of furnace component properties
NFCOMP O INTEGER � Number of furnace components
NSTRCN O INTEGER � Number of connectivity streams
NCNRES O INTEGER � Number of connectivity results � I = Input to subroutine, O = Output from subroutine
Additional Scalar Results Data TKBRES (see Standard Scalar Block Results, this chapter) returns the convergence data for PetroFrac column numbers.
Call subroutine TKPTRS to retrieve the additional scalar results data for each PetroFrac column number.
Calling Sequence for TKPTRS
CALL TKPTRS (BLKID, ICOL, NRES, NAME, PNAMES, RVALS, TYPES, LABELS, IERR)
3 Block Result Subroutines 63
Argument List Descriptions for TKPTRS Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NRES I INTEGER � Number of column results
NAME O CHARACTER*8 � Side stripper name
PNAMES O CHARACTER*12 NRES Property name. See Appendix B for a description.
RVALS O REAL*8 NRES Results
TYPES O CHARACTER*12 NRES Units type
LABELS O CHARACTER*16 NRES Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Additional PetroFrac Profile Properties Call TKPTAD to list the additional profile properties available for each column number. None of these properties is component-dependent (see Column Profile Properties, this chapter). There are three sets of additional properties for PetroFrac. These consist of similar properties. But the results are returned on either a molar, mass, or standard liquid volume basis, depending on the value you give for BASIS. The number of properties differs slightly for each BASIS, so ensure that NPROF is set to the correct value returned from TKNPET. The value of NPROF is NMOLE for MOLE BASIS, NMASS for MASS, and NSVOL for SVOL.
Calling Sequence for TKPTAD
CALL TKPTAD (BLKID, ICOL, NPROF, BASIS, PNAMES, IERR)
Argument List Descriptions for TKPTAD Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NPROF I INTEGER � Number of profile properties. (Use the value NMOLE, NMASS, or SVOL from TKNPET.)
BASIS I CHARACTER*4 � Basis for profile (MOLE, MASS, or SVOL)
PNAMES O CHARACTER*12 NPROF Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 64
Additional Property Profiles Call TKPTPR to retrieve profiles for the PetroFrac additional properties.
Calling Sequence for TKPTPR
CALL TKPTPR (BLKID, PNAME, ICOL, NSTAGE, BASIS, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPTPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Profile property name from TKPTAD
ICOL I INTEGER � Column number
NSTAGE I INTEGER � Number of stages
BASIS I CHARACTER*4 � Basis for profile (MOLE, MASS, or SVOL)
RVALS O REAL*8 NSTAGE Real values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Furnace Data for PETROFRAC Call subroutine TKPTFR to retrieve the furnace data for PetroFrac. Data is returned for each connection between the furnace and a PetroFrac column. Supply the connection number in the ICON parameter. The connections are numbered sequentially, starting at 1. The total number of connections is given by the NFRCON parameter returned in TKNPET.
Calling Sequence for TKPTFR
CALL TKPTFR (BLKID, ICON, NFRRES, PNAMES, ITYPES, IVALS, CVALS, RVALS, TYPES, LABELS, IERR)
3 Block Result Subroutines 65
Argument List Descriptions for TKPTFR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICON I INTEGER � Connection number
NFRRES I INTEGER � Number of properties
PNAMES O CHARACTER*12 NFRRES Property name. See Appendix B for a description.
ITYPES O INTEGER NFRRES Result type (1=Integer, 2=Real, 3=Character)
IVALS O INTEGER NFRRES Integer values
CVALS O CHARACTER*12 NFFRES Character values
RVALS O REAL*8 NFRRES Real values
TYPES O CHARACTER*12 NFRRES Units type
LABELS O CHARACTER*16 NFRRES Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Component-Dependent Properties for the PetroFrac Furnace Call subroutine TKFRCM to retrieve the values for component-dependent properties in the PetroFrac furnace. The property names and the results are returned. The real values are returned. All the data for a property are arranged sequentially in the array, followed by all the data for the second property, and so on. Since all the properties are dimensionless, TYPES and LABELS return blank strings.
Calling Sequence for TKFRCM
CALL TKFRCM (BLKID, NFPROP, NFCOMP, PNAMES, COMPID, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKFRCM Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NFPROP I INTEGER � Number of properties
NFCOMP I INTEGER � Number of components
PNAMES O CHARACTER*12 NFPROP Property name. See Appendix B for a description.
COMPID O CHARACTER*8 NFCOMP Component names
RVALS O REAL*8 NFCOMP* NFPROP
Real values
TYPES O CHARACTER*12 NFPROP Units type
LABELS O CHARACTER*16 NFPROP Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 66
Pumparound Results for PetroFrac Columns Call subroutine TKPTPP to retrieve pumparound results for the PetroFrac columns. Supply the pumparound number in the IPUMP parameter. The pumparounds are numbered sequentially, starting at 1. The total number of pumparounds is given by the NPUMP parameter returned in TKNPET.
Calling Sequence for TKPTPP
CALL TKPTPP (BLKID, IPUMP, NPRRES, PNAMES, ITYPES, IVALS, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKPTPP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
IPUMP I INTEGER � Pumparound number
NPRRES I INTEGER � Number of properties
PNAMES O CHARACTER*12 NPRRES Property name. See Appendix B for a description.
ITYPES O INTEGER NPRRES Result type (1=Integer, 2=Real)
IVALS O INTEGER NPRRES Integer values
RVALS O REAL*8 NPPRES Real values
TYPES O CHARACTER*12 NPRRES Units type
LABELS O CHARACTER*16 NPRRES Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Connectivity Data for PetroFrac Strippers Call subroutine TKPTCN to retrieve connectivity data for the PetroFrac strippers. Specify the column number of the stripper in ICOL and the connection number in ICON. The connections are numbered sequentially, starting at 1. The total number of connections for each stripper is given by the NSTRCN parameter in TKNPET.
Calling Sequence for TKPTCN
CALL TKPTCN (BLKID, ICOL, ICON, NCNRES, PNAMES, ITYPES, IVALS, CVALS, RVALS, TYPES, LABELS, IERR)
3 Block Result Subroutines 67
Argument List Descriptions for TKPTCN Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
ICON I INTEGER � Connection number
NCNRES I INTEGER � Number of properties
PNAMES O CHARACTER*12 NCNRES Property name. See Appendix B for a description.
ITYPES O INTEGER NCNRES Result type (1=Integer, 2=Real)
IVALS O INTEGER NCNRES Integer values
CVALS O CHARACTER*12 NCNRES Character values
RVALS O REAL*8 NCNRES Real values
TYPES O CHARACTER*12 NCNRES Units type
LABELS O CHARACTER*16 NCNRES Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Additional Data for RateFrac Models The RateFrac model has additional routines to retrieve further scalar block results, the component split fractions in the outlet streams, and the number of liquid phases in each segment of the column.
You can retrieve the additional scalar results data, using a two-step process:
1 Call subroutine TKRTNR to determine the dimensions of the additional scalar results data.
2 Call subroutine TKRTRS to retrieve the additional scalar results for each column.
You can retrieve the split fractions of each component in the outlet streams, using a two-step process:
1 Call subroutine TKRTSP to determine the dimensions of the split fractions.
2 Call subroutine TKRTSP to retreive the split fraction results.
Call subroutine TKRTNL to determine the number of liquid phases in each segment of a column.
Dimensions of Additional Scalar Data Call subroutine TKRTNR for each column number in the RateFrac model, to determine the sizes for the additional data. NRES is returned as zero if the model has no additional scalar results.
Calling Sequence for TKRTNR
CALL TKRTNR (BLKID, ICOL, NRES)
3 Block Result Subroutines 68
Argument List Descriptions for TKRTNR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NRES O INTEGER � Number of scalar results � I = Input to subroutine, O = Output from subroutine
Additional Scalar Results Data TKBRES (see Standard Scalar Block Results, this chapter) returns the convergence data for the RateFrac column.
Call subroutine TKRTRS to retrieve the additional scalar data for each RateFrac column.
Calling Sequence for TKRTRS
CALL TKRTRS (BLKID, ICOL, NRES, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKRTRS Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NRES O INTEGER � Number of scalar results
PNAMES O CHARACTER*12 � Property names. See Appendix B for a description.
RVALS O REAL*8 NRES Real values
TYPES O CHARACTER*12 NRES Unit types
LABELS O CHARACTER*16 NRES Unit labels
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Dimensions of Component Split Fractions Call subroutine TKRTSP to determine the dimensions of the component split fraction results.
Calling Sequence for TKRTSP
CALL TKRTSP (BLKID, NCP, NSTREAM)
3 Block Result Subroutines 69
Argument List Descriptions for TKRTSP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCP O INTEGER � Number of components in outlet streams
NSTREAM O INTEGER � Number of outlet streams � I = Input to subroutine, O = Output from subroutine
Component Split Fractions Call subroutine TKRTSR to retrieve the component split fractions in the RateFrac outlet streams. The results are ordered in the SFRACS array so that all the fractions for a component are returned consecutively.
Calling Sequence for TKRTSR
CALL TKRTSR (BLKID, NCP, NSTREAM, COMPID, STRMID, SFRACS, IERR)
Argument List Descriptions for TKRTSR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCP I INTEGER � Number of components in outlet streams
NSTREAM I INTEGER � Number of outlet streams
COMPID O CHARACTER*8 NCP Component IDs
STRMID O CHARACTER*8 NSTREAM Outlet Stream IDs
SFRACS O REAL*8 NSTREAM* NCP Component Split Fractions
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Number of Liquid Phases Call subroutine TKRTNL to get the number of liquid phases in each segment of the specified column.
Calling Sequence for TKRTNL
CALL TKRTNL (BLKID, ICOL, NSTAGE, NLIQ, IERR)
Argument List Descriptions for TKRTNL Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NSTAGE I INTEGER � Number of sections (Use NSTAGE from TKPROF)
NLIQ I INTEGER NSTAGE Number of liquid phases
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 70
Tray Reports Tray report results are calculated when the Tray-Report option is chosen for a rigorous distillation model. The user defines the properties calculated and the stages for which they are calculated.
Tray Report Dimensions Call subroutine TKTREP to determine the dimensions of the tray report for a block. TKTREP returns the number of stages for which properties are calculated, and the number of properties in the tray report.
Calling Sequence for TKTREP
CALL TKTREP (BLKID, ICOL, NSTAGE, NPROP)
Argument List Descriptions for TKTREP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NSTAGE O INTEGER � Number of stage values
NPROP O INTEGER � Total number of properties � I = Input to subroutine, O = Output from subroutine
Sequential Tray Report Properties Call subroutine TKNTPR to retrieve the next property from a tray report. Use the property sequence number INUM to specify the property. TKNTPR returns the list of stage numbers, the property value, the property set qualifiers, and the units type and label.
Calling Sequence for TKNTPR
CALL TKNTPR (BLKID, ICOL, INUM, NSTAGE, ISTAGE, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 71
Argument List Descriptions for TKNTPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
INUM I INTEGER � Property sequence number
NSTAGE I INTEGER � Number of stage values
ISTAGE O INTEGER NSTAGE List of stage numbers
PNAME O CHARACTER*12 � Property name. See Appendix B for a description.
SUBSID O CHARACTER*8 � Substream ID
PHASE O CHARACTER*8 � Phase
COMPID O CHARACTER*8 � Component ID
WETDRY O CHARACTER*4 � Wet/dry basis (WET or DRY) ��
BASIS O CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NSTAGE Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
Specific Tray Report Properties Call subroutine TKTPRP to retrieve a specific property from the tray report for a block. The property is identified by specifying the property set qualifiers (PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS). Before calling TKTPRP, make sure that all the qualifiers are either set to the desired values or unset. TKTPRP returns the list of stage numbers, the property values, and the units type and label.
Calling Sequence for TKTPRP
CALL TKTPRP (BLKID, ICOL, NSTAGE, ISTAGE, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 72
Argument List Descriptions for TKTPRP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number
NSTAGE I INTEGER � Number of stage values
ISTAGE O INTEGER NSTAGE List of stage numbers
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
SUBSID I CHARACTER*8 � Substream ID
PHASE I CHARACTER*8 � Phase
COMPID I CHARACTER*8 � Component ID
WETDRY I CHARACTER*4 � Wet/dry basis (WET or DRY)��
BASIS I CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NSTAGE Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
Tray/Packing Sizing and Rating You can retrieve column tray/packing sizing and rating data for the rigorous distillation models RadFrac, MultiFrac, and PetroFrac. You can retrieve the results using a seven-step process:
1 Call subroutine TKNCOL to determine the number of columns where appropriate.
2 Call subroutine TKNSEC to determine the number of sections in the column.
3 Call subroutine TKLSEC to list the column section types and their numbers.
4 Call subroutine TKSSEC to determine the dimensions of a section.
5 Call subroutine TKSCRS to retrieve the scalar results for the column section.
6 Call subroutine TKPSEC to obtain a list of the properties in a section profile.
7 Call subroutine TKSCPR to retrieve the profile data for a named property in a section.
3 Block Result Subroutines 73
Several subroutines below have a TYPE or TYPES argument for section types. The possible values are: TYPE value Type of column section
TRAY-SIZE Tray sizing
TRAY-RATE Tray rating
PACK-SIZE Packed sizing
PACK-RATE Packed rating
Number of Columns If you want to retrieve MultiFrac or PetroFrac data, call TKNCOL. (See Column Results, this chapter.) Omit this step if you want to retrieve RadFrac data.
Number of Column Sections Call subroutine TKNSEC to determine the number of Tray/Packing Sizing and Rating calculation sections in the column.
Calling Sequence for TKNSEC
CALL TKNSEC (BLKID, ICOL, NSECT, IERR)
Argument List Descriptions for TKNSEC Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number (MultiFrac and PetroFrac)
NSECT O INTEGER � Number of sections
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Column Section Types and Numbers Call subroutine TKLSEC to list the section types and numbers used to identify individual sections.
Calling Sequence for TKLSEC
CALL TKLSEC (BLKID, ICOL, NSECT, TYPES, NUMBRS, IERR)
3 Block Result Subroutines 74
Argument List Descriptions for TKLSEC Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number. (MultiFrac and PetroFrac)
NSECT I INTEGER � Number of sections
TYPES O CHARACTER*12 NSECT Types of column sections (see above)
NUMBRS O INTEGER NSECT Section numbers
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Size of a Column Section Call subroutine TKSSEC to determine the dimensions of a section. TKSSEC returns the number of:
• Stages in a section.
• Scalar properties.
• Profile properties.
Profile properties have a value for each stage in a section. Scalar properties have a single value for a section as a whole.
Calling Sequence for TKSSEC
CALL TKSSEC (BLKID, ICOL, TYPE, NUMBER, NSTAGE, NPROF, NSCAL, IERR)
Argument List Descriptions for TKSSEC Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number (MultiFrac and PetroFrac)
TYPE I CHARACTER*12 � Section type (see above)
NUMBER I INTEGER � Section number
NSTAGE O INTEGER � Number of stages in the section
NPROF O INTEGER � Number of profile properties
NSCAL O INTEGER � Number of scalar properties
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 75
Scalar Results for a Column Section Call subroutine TKSCRS to retrieve the section results for the scalar properties.
Calling Sequence for TKSCRS
CALL TKSCRS (BLKID, ICOL, TYPE, NUMBER, NSCAL, PNAMES, ITYPES, IVALS, CVALS, RVALS, UTYPES, LABELS, IERR)
Argument List Descriptions for TKSCRS Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number (MultiFrac and PetroFrac)
TYPE I CHARACTER*12 � Section type (see above)
NUMBER I INTEGER � Section number
NSCAL I INTEGER � Number of scalar properties
PNAMES O CHARACTER*12 NSCAL Property name. See Appendix B for a description.
ITYPES O INTEGER NSCAL Result types (1=Integer value 2=Real*8 value 3=Character*12 value)��
IVALS O INTEGER NSCAL Integer result
CVALS O CHARACTER*12 NSCAL Character result
RVALS O REAL*8 NSCAL Real result
UTYPES O CHARACTER*12 NSCAL Units types
LABELS O CHARACTER*16 NSCAL Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� For each result, the value in ITYPE specifies which array contains the result (IVALS, CVALS, or RVALS). For example, if ITYPE(4) is 2, then IVALS(4) is 0, CVALS(4) is blank and RVALS(4) contains the result.
Column Section Profile Properties Call routine TKPSEC to retrieve the list of properties for a specified section profile. TKPSEC returns an array of property names. When you specify a tray rating section type, TKPSEC also returns an array indicating if the property belongs to panel A, B, C, or D.
Calling Sequence for TKPSEC
CALL TKPSEC (BLKID, ICOL, TYPE, NUMBER, NPROF, PNAMES, PANELS, IERR)
3 Block Result Subroutines 76
Argument List Descriptions for TKPSEC Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number (MultiFrac and PetroFrac)
TYPE I CHARACTER*12 � Section type (see above)
NUMBER I INTEGER � Section number
NPROF I INTEGER � Number of profile properties
PNAMES O CHARACTER*12 NPROF Property name. See Appendix B for a description.
PANELS O CHARACTER*1 NPROF Panel identifier (A, B, C, D) (TRAY-RATE only)
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Column Section Profiles Call subroutine TKSCPR to retrieve the section profile data for the named property. If the section type is TRAY-RATE, you must specify the panel.
Calling Sequence for TKSCPR
CALL TKSCPR (BLKID, ICOL, TYPE, NUMBER, NSTAGE, ISTAGE, PNAME, PANEL, RVALS, UTYPE, LABEL, IERR)
Argument List Descriptions for TKSCPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ICOL I INTEGER � Column number (MultiFrac and PetroFrac)
TYPE I CHARACTER*12 � Section type (see above)
NUMBER I INTEGER � Section number
NSTAGE I INTEGER � Number of stages in section
ISTAGE O INTEGER NSTAGE List of stage numbers
PNAME I CHARACTER*12 � Property name from TKPSEC
PANEL I CHARACTER*1 � Panel identifier (A, B, C, D) (TRAY-RATE only)
RVALS O REAL*8 NSTAGE Property values
UTYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 77
Reactor Results You can retrieve reactor profile results from the summary file for the reactor models RPlug and RBatch. You can also retrieve the vent accumulator and vent profile results for the RBatch model. (See RBatch Vent Accumulator Results, and RBatch Vent Profile Results, this chapter.) You can retrieve reaction data for the RStoic, REquil and RGibbs models. (See Reaction Data, this chapter.) Retrieving reactor profile results is a four-step process:
1 Call subroutine TKRSUB to determine the number of substreams.
2 Call subroutine TKRPRF to determine the dimensions of the profile.
3 Call subroutine TKRPRP to list the properties.
4 Retrieve the property values. Call subroutine TKRPR1 for non-component-dependent properties. Call subroutine TKRPR2 for component-dependent properties.
Call subroutines TKRNAC, TKRNCA, TKRSCA, and TKRCAT to retrieve the property values for the component attributes of a solid substream. Call subroutines TKRNFS and TKRFSP to retrieve the property values for the continuous feed stream to the RBatch block.
Number of Reactor Substreams Call subroutine TKRSUB to determine the number of substreams in a block modeled using the rigorous reactor models RBatch and RPlug. All other models return a value of 0.
Calling Sequence for TKRSUB
CALL TKRSUB (BLKID, NSUB)
Argument List Descriptions for TKRSUB Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NSUB O INTEGER � Number of substreams � I = Input to subroutine, O = Output from subroutine
Reactor Profile Dimensions Call subroutine TKRPRF to determine the sizes of the reactor profile arrays for the specified substream. TKRPRF returns the:
• Substream ID for the requested substream.
• Number of output points.
• Number of components present.
• Number of properties.
Calling Sequence for TKRPRF
CALL TKRPRF (BLKID, ISUB, SUBSID, NPOINT, NCP, NPROP)
3 Block Result Subroutines 78
Argument List Descriptions for TKRPRF Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ISUB I INTEGER � Substream number
SUBSID O CHARACTER*8 � Substream ID
NPOINT O INTEGER � Number of output points
NCP O INTEGER � Number of components present
NPROP O INTEGER � Number of properties � I = Input to subroutine, O = Output from subroutine
Reactor Profile Properties Call subroutine TKRPRP to list the reactor profile properties for a specified substream. TKRPRP returns an array of property names. TKRPRP also returns the array ITYPES, which indicates whether the property is component-dependent, not component-dependent, a component attribute, or a continuous feed stream property.
Calling Sequence for TKRPRP
CALL TKRPRP (BLKID, SUBSID, NPROP, ITYPES, PNAMES, IERR)
Argument List Descriptions for TKRPRP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
NPROP I INTEGER � Number of properties
ITYPES O INTEGER NPROP Property type: 1=Non-component-dependent 2=Component-dependent 3=Component attributes 4=Continuous feed stream property
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Non-Component-Dependent Reactor Profiles Call subroutine TKRPR1 to retrieve reactor profiles for non-component-dependent properties.
Calling Sequence for TKRPR1
CALL TKRPR1 (BLKID, PNAME, SUBSID, NPOINT, RVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 79
Argument List Descriptions for TKRPR1 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name from TKRPRP
SUBSID I CHARACTER*8 � Substream ID
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Component-Dependent Reactor Profiles Call subroutine TKRPR2 to retrieve reactor profiles for component-dependent properties. The results are returned in the RVALS array, with all the component data for a point stored consecutively.
Calling Sequence for TKRPR2
CALL TKRPR2 (BLKID, PNAME, SUBSID, NCP, COMPID, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKRPR2 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name from TKRPRP
SUBSID I CHARACTER*8 � Substream ID
NCP I INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component IDs
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NCP* NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Number of Components with Component Attribute Results Call subroutine TKRNAC to retrieve the number of components that are reported for the component attribute property.
3 Block Result Subroutines 80
Calling Sequence for TKRNAC
CALL TKRNAC (BLKID, SUBSID, NCP)
Argument List Descriptions for TKRNAC Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
NCP O INTEGER � Number of components � I = Input to subroutine, O = Output from subroutine
Number of Attributes for a Component Call subroutine TKRNCA to determine the number of attributes a property has for a specified component. The component is specified by supplying the sequence number of the component (for example, 1 for the first component). The corresponding component ID is returned.
Calling Sequence for TKRNCA
CALL TKRNCA (BLKID, SUBSID, ICP, COMPID, NATT)
Argument List Descriptions for TKRNCA Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
ICP I INTEGER � Component sequence number
COMPID O CHARACTER*8 � Component ID
NATT O INTEGER � Number of attributes � I = Input to subroutine, O = Output from subroutine
Details of a Component Attribute Call subroutine TKRSCA to retrieve the number of elements the component attribute has. The component attribute is specified by supplying the sequence number of the component attribute (for example, 1 for the first attribute). The corresponding component attribute ID is returned.
Calling Sequence for TKRSCA
CALL TKRSCA (BLKID, SUBSID, COMPID, IDSEQ, IDATT, NELEM)
3 Block Result Subroutines 81
Argument List Descriptions For TKRSCA Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
COMPID I CHARACTER*8 � Component ID
IDSEQ I INTEGER � Sequence number of attribute
IDATT O CHARACTER*8 � Attribute ID
NELEM O INTEGER � Number of elements � I = Input to subroutine, O = Output from subroutine
Component Attribute Results Call subroutine TKRCAT to retrieve the results for all the elements of a specified component attribute. (The results are returned in the RVALS array with all the data for a point stored consecutively.) The names of the elements are also returned.
Calling Sequence for TKRCAT
CALL TKRCAT (BLKID, SUBSID, COMPID, IDATT, NELEM, NPOINT, ELEMID, RVALS, IERR)
Argument List Descriptions For TKRCAT Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
COMPID I CHARACTER*8 � Component ID
IDATT I CHARACTER*8 � Attribute ID
NELEM I INTEGER � Number of elements
NPOINT I INTEGER � Number of points
ELEMID O CHARACTER*8 NELEM Element names
RVALS O REAL*8 NELEM* POINT Property values
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Number of Continuous Feed Streams Call subroutine TKRNFS to determine the number of continuous feed streams to an RBatch block. This number is used for the continuous feed stream properties.
Calling Sequence for TKRNFS
CALL TKRNFS (BLKID, SUBSID, NFS)
3 Block Result Subroutines 82
Argument List Descriptions For TKRNFS Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
NFS O INTEGER � Number of continuous feed streams � I = Input to subroutine, O = Output from subroutine
Continuous Feed Stream Results Call subroutine TKRFSP to retrieve the results for a continuous feed stream to an RBatch block. The continuous feed stream number is specified (for example, 1 for the first stream). The name of this stream and the property results are returned.
Calling Sequence for TKRFSP
CALL TKRSFP (BLKID, SUBSID, IFEED, IDFEED, PNAME, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions For TKRFSP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
IFEED I INTEGER � Feed stream number
IDFEED O CHARACTER*8 � Continuous feed stream ID
PNAME I CHARACTER*12 � Property name from TKRPRP
NPOINT I INTEGER � Number of points
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
RBATCH Vent Accumulator Results Retrieving the vent accumulator profiles for the RBatch model requires three additional steps:
1 Call subroutine TKVAPF to determine the dimensions of the profile.
2 Call subroutine TKVAPR to list the properties.
3 Call subroutine TKVAR1 to retrieve the property values for non-component-dependent properties, or subroutine TKVAR2 to retrieve the property values for component-dependent properties.
3 Block Result Subroutines 83
Vent Accumulator Profile Dimensions Call subroutine TKVAPF to determine the sizes of profile arrays for the vent accumulator. TKVAPF returns the number of:
• Output points.
• Components present.
• Properties.
Calling Sequence for TKVAPF
CALL TKVAPF (BLKID, NPOINT, NCP, NPROP)
Argument List Descriptions for TKVAPF Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT O INTEGER � Number of output points
NCP O INTEGER � Number of components present
NPROP O INTEGER � Number of properties � I = Input to subroutine, O = Output from subroutine
Vent Accumulator Profile Properties Call subroutine TKVAPR to list the RBatch vent accumulator profile properties. TKVAPR returns an array of property names, and an array indicating whether or not the property is component-dependent.
Calling Sequence for TKVAPR
CALL TKVAPR (BLKID, NPROP, ITYPES, PNAMES, IERR)
Argument List Descriptions for TKVAPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of properties
ITYPES O INTEGER NPROP Property type: 1=Non-component-dependent 2=Component-dependent
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 84
Non-Component-Dependent Vent Accumulator Profiles Call subroutine TKVAR1 to retrieve RBatch vent accumulator profiles for non-component-dependent properties.
Calling Sequence for TKVAR1
CALL TKVAR1 (BLKID, PNAME, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKVAR1 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name from TKVAPR
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Component-Dependent Vent Accumulator Profiles Call subroutine TKVAR2 to retrieve RBatch vent accumulator profiles for component-dependent properties.
Calling Sequence for TKVAR2
CALL TKVAR2 (BLKID, PNAME, NCP, COMPID, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKVAR2 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name from TKVAPR
NCP I INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component IDs
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NCP* NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 85
RBatch Vent Profile Results Retrieving the vent profiles for the RBatch model requires three steps:
1 Call subroutine TKVTPF to determine the dimensions of the profile.
2 Call subroutine TKVTPR to list the properties.
3 Call subroutine TKVTR1 to retrieve the property values for non-component-dependent properties, or subroutine TKVTR2 to retrieve the property values for component-dependent properties.
Vent Profile Dimensions Call subroutine TKVTPF to determine the sizes of the profile arrays for the vent. TKVTPF returns the number of:
• Output points.
• Components present.
• Properties.
Calling Sequence for TKVTPF
CALL TKVTPF (BLKID, NPOINT, NCP, NPROP)
Argument List Descriptions for TKVTPF Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT O INTEGER � Number of output points
NCP O INTEGER � Number of components present
NPROP O INTEGER � Number of properties � I = Input to subroutine, O = Output from subroutine
Vent Profile Properties Call subroutine TKVTPR to list the RBatch vent profile properties. TKVTPR returns an array of property names, and an array indicating whether or not the property is component-dependent.
Calling Sequence for TKVTPR
CALL TKVTPR (BLKID, NPROP, ITYPES, PNAMES, IERR)
3 Block Result Subroutines 86
Argument List Descriptions for TKVTPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of properties
ITYPES O INTEGER NPROP Property type (1=Non-component-dependent, 2=Component-dependent)
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Non-Component-Dependent Vent Profiles Call subroutine TKVTR1 to retrieve RBatch vent profiles for non-component-dependent properties.
Calling Sequence for TKVTR1
CALL TKVTR1 (BLKID, PNAME, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKVTR1 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name from TKVTPR
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Component-Dependent Vent Profiles Call subroutine TKVTR2 to retrieve RBatch vent profiles for component-dependent properties.
Calling Sequence for TKVTR2
CALL TKVTR2 (BLKID, PNAME, NCP, COMPID, NPOINT, RVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 87
Argument List Descriptions for TKVTR2 Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name from TKVTPR
NCP I INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component Ids
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NCP* NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Reaction Data You can retrieve the reaction equilibrium constants for each reaction in the REquil and RGibbs models. For the RStoic model you can retrieve the reaction extent and the heat of reaction for each reaction. You can also retrieve the component selectivity for RStoic. You can retrieve reaction data using a three-step process:
1 Call subroutine TKRRPF to determine the number of reactions.
2 Call subroutine TKRRPR to retrieve the equilibrium constants or reaction data.
3 Call subroutine TKRRHR to retrieve the heat of reaction data for RStoic.
Use these additional two steps to retrieve the component selectivity results:
4 Call subroutine TKRRNS to determine the number of selectivity results.
5 Call subroutine TKRRSL to retrieve the component selectivity results.
Number of Reactions Call subroutine TKRRPF to determine the number of reactions in the REquil, RGibbs, and RStoic models.
Calling Sequence for TKRRPF
CALL TKRRPF (BLKID, NREAC)
Argument List Descriptions for TKRRPF Variable I/O
� Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NREAC O INTEGER � Number of reactions � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 88
Reaction Results Call subroutine TKRRPR to retrieve the reaction results. TKRRPR returns a single property, equilibrium constant for REquil and RGibbs models, and reaction extent for RStoic models. Specify NPROP as 1.
Calling Sequence for TKRRPR
CALL TKRRPR (BLKID, NPROP, NREAC, PNAMES, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKRRPR Variable I/O
� Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Use NPROP = 1 Number of properties
NREAC I INTEGER � Number of reactions
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
RVALS O REAL*8 NPROP* NREAC Real results
TYPES O CHARACTER*12 NPROP Units type
LABELS O CHARACTER*16 NPROP Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Heats of Reaction Call subroutine TKRRHR to retrieve the heats of reaction results for RStoic models. The heat of reaction and the ID of the reference component in the reaction are returned for each reaction.
Calling Sequence for TKRRHR
CALL TKRRHR (BLKID, NREAC, COMPID, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKRRHR Variable I/O
� Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NREAC I INTEGER � Number of reactions
COMPID O CHARACTER*12 NREAC Reference component ID
RVALS O REAL*8 NREAC Real results
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 89
Number of Selectivity Results Call subroutine TKRRNS to determine the number of component selectivity specifications given for the RStoic model.
Calling Sequence for TKRRNS
CALL TKRRNS (BLKID, NSEL)
Argument List Descriptions for TKRRNS Variable I/O
� Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NSEL O INTEGER � Number of selectivity specifications � I = Input to subroutine, O = Output from subroutine
Reactor Component Selectivity Results Call subroutine TKRRSL to retrieve the results of each component selectivity specification. The reference/reactant component and product component, together with their substreams, are returned with the result for each selectivity specification.
Calling Sequence for TKRRSL
CALL TKRRSL (BLKID, NSEL, PCOMPS, PSUBS, RCOMPS, RSUBS, RVALS, IERR)
Argument List Descriptions for TKRRSL Variable I/O
� Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NSEL I INTEGER � Number of selectivity specifications
PCOMPS O CHARACTER*8 NSEL Product component
PSUBS O CHARACTER*8 NSEL Product component substream
RCOMPS O CHARACTER*8 NSEL Reference component (reactant)
RSUBS O CHARACTER*8 NSEL Reference component substream
RVALS O REAL*8 NSEL Component selectivity
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 90
Reactor Property Reports Reactor report results are calculated in Aspen Plus when the PROP-REPORT option is used with the RPlug or RBatch models. The RBatch model allows you to choose the property report for the reactor, accumulator, or vent.
You can retrieve each type of reactor property report using a three-step process:
1 Call TKLRRP to determine the number and types of reports available for the reactor.
2 Call TKSRRP to determine the size of a reactor report.
3 Call TKNRRP to retrieve the next property set property calculated for a reactor property report, or call TKRRRP to retrieve a specific property.
The possible types of reports are: Type of report For
PROP-REACTOR RBatch Reactor
PROP-ACCUM RBatch Vent accumulator
PROP-VENT RBatch Vent
PROP-REPORT RPlug Reactor
Number of Reports for a Reactor Block Call subroutine TKLRRP to determine the number and types of report available for the reactor.
Calling Sequence for TKLRRP
CALL TKLRRP (BLKID, NRPRT, TYPES, IERR)
Argument List Descriptions for TKLRRP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NRPRT O INTEGER � Number of reactor property reports
TYPES O CHARACTER*12 3 Types of property reports (see above)
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Size of a Reactor Property Report Call subroutine TKSRRP to determine the size of the reactor property report. TKSRRP returns the number of points in the report and the number of property sets calculated.
Calling Sequence for TKSRRP
CALL TKSRRP (BLKID, TYPE, NPOINT, NPROP, IERR)
3 Block Result Subroutines 91
Argument List Descriptions for TKSRRP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
TYPE I CHARACTER*12 � Type of property report (see above)
NPOINT O INTEGER � Number of points
NPROP O INTEGER � Number of properties
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Sequential Reactor Report Properties Call subroutine TKNRRP to retrieve the next property set calculated for a reactor property report. Use the property sequence number to identify the property. TKNRRP returns the property set qualifiers, the property values, and the units type and label.
Calling Sequence for TKNRRP
CALL TKNRRP (BLKID, TYPE, NPOINT, IPROP, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, UTYPE, LABEL, IERR)
Argument List Descriptions for TKNRRP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
TYPE I CHARACTER*12 � Type of property report (see above)
NPOINT I INTEGER � Number of points
IPROP I INTEGER � Property sequence number
PNAME O CHARACTER*12 � Property name. See Appendix B for a description.
SUBSID O CHARACTER*8 � Substream ID
PHASE O CHARACTER*8 � Phase
COMPID O CHARACTER*8 � Component ID
WETDRY O CHARACTER*4 � Wet/dry basis ��
BASIS O CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NPOINT Property values
UTYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� Can be left unspecified
3 Block Result Subroutines 92
Specific Reactor Report Properties Call subroutine TKRRRP to retrieve a specific property from a reactor property report. The property is identified by specifying the property set qualifiers (PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS). TKRRRP returns the property values, the units type, and the units label.
Calling Sequence for TKRRRP
CALL TKRRRP (BLKID, TYPE, NPOINT, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, UTYPE, LABEL, IERR)
Argument List Descriptions for TKRRRP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
TYPE I CHARACTER*12 � Type of property report (see above)
NPOINT I INTEGER � Number of points
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
SUBSID I CHARACTER*8 � Substream ID
PHASE I CHARACTER*8 � Phase
COMPID I CHARACTER*8 � Component ID
WETDRY I CHARACTER*4 � Wet/dry basis (WET or DRY)��
BASIS I CHARACTER*4 � Units basis
RVALS O REAL*8 NPOINT Property values
UTYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
Pipeline Results You can retrieve all the pipeline model results with the toolkit. Retrieve block results using the standard block result routine TKBRES. Retrieve other results using the routines described in this section.
Retrieving all the additional pipeline results is a ten-step process:
1 Call subroutine TKPLSZ to retrieve the dimensions of the pipeline results.
2 Call subroutine TKPLIO to retrieve the inlet and outlet conditions.
3 Call subroutine TKPLCP to retrieve the inlet and outlet property names for components in a pipeline.
3 Block Result Subroutines 93
4 Call subroutine TKPLCO to retrieve the inlet and outlet conditions for components in a pipeline.
5 Call subroutine TKPLSP to retrieve the segment data property names.
6 Call subroutine TKPLSG to retrieve the segment data.
7 Call subroutine TKPLNP to retrieve the node property names.
8 Call subroutine TKPLND to retrieve the node results.
9 Call subroutine TKPLPP to retrieve the pipeline profile property names.
10 Call subroutine TKPLPR to retrieve the pipeline profile data.
Pipeline Results Dimensions Call subroutine TKPLSZ to retrieve the dimensions of the pipeline results. TKPLSZ returns the number of each type of pipeline results.
Calling Sequence for TKPLSZ
CALL TKPLSZ (BLKID, NIORES, NCC, NCCPRP, NSEG, NSGPRP, NNODE, NNDPRP, NPOINT, NPROF, IERR)
Argument List Descriptions for TKPLSZ Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NIORES O INTEGER � Number of inlet/outlet condition results
NCC O INTEGER � Number of components present
NCCPRP O INTEGER � Number of component properties
NSEG O INTEGER � Number of pipeline segments
NSGPRP O INTEGER � Number of segment properties
NNODE O INTEGER � Number of pipeline nodes
NNDPRP O INTEGER � Number of node properties
NPOINT O INTEGER � Number of pipeline profile points
NPROF O INTEGER � Number of profile properties
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Non-Component-Dependent Pipeline Inlet and Outlet Conditions Call subroutine TKPLIO to retrieve the results for the inlet and outlet conditions of a pipeline. The inlet and outlet results share the same property name, units type and label. The type of the result is indicated in the ITYPES array.
Calling Sequence for TKPLIO
CALL TKPLIO (BLKID, NIORES, PNAMES, ITYPES, CVALSI, CVALSO, RVALSI, RVALSO, TYPES, LABELS, IERR)
3 Block Result Subroutines 94
Argument List Descriptions for TKPLIO Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NIORES I INTEGER � Number of results
PNAMES O CHARACTER*12 NIORES Property name. See Appendix B for a description.
ITYPES O INTEGER NIORES Data type of results (2=Real, 3=Character)
CVALSI O CHARACTER*12 NIORES Inlet character results
CVALSO O CHARACTER*12 NIORES Outlet character results
RVALSI O REAL*8 NIORES Inlet real results
RVALSO O REAL*8 NIORES Outlet real results
TYPES O CHARACTER*12 NIORES Units types
LABELS O CHARACTER*16 NIORES Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Component-Dependent Pipeline Inlet and Outlet Property Names Call subroutine TKPLCP to retrieve the names of the component-dependent properties of the pipeline.
Calling Sequence for TKPLCP
CALL TKPLCP (BLKID, NCCPRP, PNAMES, IERR)
Argument List Descriptions for TKPLCP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCCPRP I INTEGER � Number of component properties
PNAMES O CHARACTER*12 NCCPRP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Component-Dependent Pipeline Inlet and Outlet Conditions Call subroutine TKPLCO to retrieve the results for a specified component-dependent property in the pipeline. The inlet and outlet results share the same property name, units type and label.
Calling Sequence for TKPLCO
CALL TKPLCO (BLKID, NCC, PNAME, RVALSI, RVALSO, TYPE, LABEL, IERR)
3 Block Result Subroutines 95
Argument List Descriptions for TKPLCO Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCC I INTEGER � Number of components
PNAME I CHARACTER*12 � Property name from TKPLCP
RVALSI O REAL*8 NCC Inlet results
RVALSO O REAL*8 NCC Outlet results
TYPE O INTEGER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Segment Data Property Names Call TKPLSP to retrieve a list of the names of the properties reported for pipeline segments.
Calling Sequence for TKPLSP
CALL TKPLSP (BLKID, NSGPRP, PNAMES, IERR)
Argument List Descriptions for TKPLSP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NSGPRP I INTEGER � Number of segments
PNAMES O CHARACTER*12 NSGPRP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Pipeline Segment Data Call subroutine TKPLSG to retrieve segment data for the specified property name. The result will be either a character or a real value, indicated by the value of ITYPE.
Calling Sequence for TKPLSG
CALL TKPLSG (BLKID, NSEG, PNAME, ITYPE, RVALS, CVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 96
Argument List Descriptions for TKPLSG Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NSEG I INTEGER � Number of pipeline segments
PNAME I CHARACTER*12 � Property name from TKPLSP
ITYPE O INTEGER � Data type of results (2=Real, 3=Character) ��
RVALS O REAL*8 NSEG Real results
CVALS O CHARACTER*12 NSEG Character results
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� For each result, the value in ITYPE specifies which array contains the result (CVALS or RVALS). For example, if ITYPE(4) is 2, then CVALS(4) is blank and RVALS(4) contains the result.
Pipeline Node Property Names Call TKPLNP to retrieve a list of the reported property names for a pipeline node.
Calling Sequence for TKPLNP
CALL TKPLNP (BLKID, NNDPRP, PNAMES, IERR)
Argument List Descriptions for TKPLNP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NNDPRP I INTEGER � Number of node properties
PNAMES O CHARACTER*12 NNDPRP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Pipeline Node Results Call subroutine TKPLND to retrieve the node results for the specific property. The type of result is indicated by ITYPE.
Calling Sequence for TKPLND
CALL TKPLND (BLKID, NNODE, PNAME, ITYPE, RVALS, CVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 97
Argument List Descriptions for TKPLND Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NNODE I INTEGER � Number of nodes
PNAME I CHARACTER*12 � Property name from TKPLNP
ITYPE O INTEGER � Data type of results (2=Real, 3=Character) ��
RVALS O REAL*8 NNODE Segment results
CVALS O CHARACTER*12 NNODE Character segment results
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� For each result, the value in ITYPE specifies which array contains the result (CVALS or RVALS). For example, if ITYPE(4) is 2, then CVALS(4) is blank and RVALS(4) contains the result.
Pipeline Profile Property Names Call subroutine TKPLPP to retrieve the names of the properties in the pipeline fluid profile. Since not all pipelines have this profile, make sure that NPROF is greater than zero before calling this routine. TKPLPP will return an error in IERR if NPROF is zero.
Calling Sequence for TKPLPP
CALL TKPLPP (BLKID, NPROF, PNAMES, IERR)
Argument List Descriptions for TKPLPP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROF I INTEGER � Number of profile properties
PNAMES O CHARACTER*12 NPROF Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Pipeline Profile Results Call subroutine TKPLPR to retrieve the pipeline profile results for the named property. Since not all pipelines have this profile, make sure that NPOINT is greater than zero before calling this routine. TKPLPR will return an error in IERR if NPOINT is zero.
Calling Sequence for TKPLPR
CALL TKPLPR (BLKID, NPOINT, PNAME, RVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 98
Argument List Descriptions for TKPLPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT I INTEGER � Number of profile points
PNAME I CHARACTER*12 � Property name from TKPLPP
RVALS O REAL*8 NPOINT Profile results
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Pipe Results You can retrieve all the results for the single-segment pipeline model Pipe, using the standard block results routines TKNRES and TKBRES. Retrieve other results using the routines described in this section.
You can retrieve Pipe results using a six-step process:
1 Call subroutine TKPISP to retrieve the dimensions of the standard profiles.
2 Call subroutine TKPINP to retrieve the names of the standard profile properties.
3 Call subroutine TKPIPR to retrieve results for standard profile properties.
4 Call subroutine TKPLSZ to retrieve the number of fluid properties. For a description of TKPLSZ, see Pipeline Results Dimensions, this chapter.
5 Call subroutine TKPLPP to retrieve the names of the fluid properties. For a description of TKPLPP, see Pipeline Profile Property Names, this chapter.
6 Call subroutine TKPLPR to retrieve the fluid properties results. For a description of TKPLPR, see Pipeline Profile Results, this chapter.
Pipe Standard Profile Dimensions Call subroutine TKPISP to retrieve the dimensions of the standard Pipe profiles results. NPOINT returns zero if there are no profile results for this block. TKPISP returns the number of:
• Profile points.
• Profile properties.
Calling Sequence for TKPISP
CALL TKPISP (BLKID, NPOINT, NPROP)
3 Block Result Subroutines 99
Argument List Descriptions for TKPISP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT O INTEGER � Number of profile points
NPROP O INTEGER � Number of profile properties � I = Input to subroutine, O = Output from subroutine
Pipe Standard Profile Property Names Call subroutine TKPINP to retrieve the names of the properties in the standard Pipe profiles results.
Calling Sequence for TKPINP
CALL TKPINP (BLKID, NPROP, PNAMES, IERR)
Argument List Descriptions for TKPINP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of profile properties
PNAMES O CHARACTER*12 NPROP Property name. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Pipe Standard Profile Properties Call subroutine TKPIPR to retrieve the results for the specific property in the standard Pipe profiles results.
Calling Sequence for TKPIPR
CALL TKPIPR (BLKID, NPOINT, PNAME, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPIPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT I INTEGER � Number of profile points
PNAME I CHARACTER*12 � Property name from TKPINP
RVALS O REAL*8 NPOINT Real results
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 100
Pipe Property Reports The Pipe model allows you to get a profile report for the properties in a named property set. You can retrieve these results using a two-step process:
1 Call TKSPIR to determine the size of the property set profile.
2 Call TKNPIP to retrieve the next property set property calculated in the profile report. Call TKRPIP to retrieve a specified property.
Size of a Pipe Property Report Call subroutine TKSPIR to determine the size of the property set report. The number of points in the report and the number of properties are returned.
Calling Sequence for TKSPIR
CALL TKSPIR (BLKID, NPOINT, NPROP)
Argument List Descriptions for TKSPIR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT O INTEGER � Number of profile points
NPROP O INTEGER � Number of profile properties � I = Input to subroutine, O = Output from subroutine
Sequential Pipe Report Properties Call subroutine TKNPIP to retrieve the next property calculated for a pipe property report. Use the property sequence number to identify the property. TKNPIP returns the:
• Property qualifiers.
• Property values.
• Units type.
• Units label.
Calling Sequence for TKNPIP
CALL TKNPIP (BLKID, NPOINT, IPROP, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, TYPE, LABEL, IERR)
3 Block Result Subroutines 101
Argument List Descriptions for TKNPIP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT I INTEGER � Number of profile points
IPROP I INTEGER � Property sequence number
PNAME O CHARACTER*12 � Property name. See Appendix B for a description.
SUBSID O CHARACTER*8 � Substream ID
PHASE O CHARACTER*8 � Phase
COMPID O CHARACTER*8 � Component ID
WETDRY O CHARACTER*4 � Wet/dry basis (WET or DRY)
BASIS O CHARACTER*4 � Unit basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Specific Pipe Report Properties Call subroutine TKRPIP to retrieve a specific property from a pipe property report. The property is identified by specifying the property set qualifiers (PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS). TKRPIP returns the property values, and the units type and label.
Calling Sequence for TKRPIP
Call TKRPIP (BLKID, NPOINT, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKRPIP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPOINT I INTEGER � Number of profile points
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
SUBSID I CHARACTER*8 � Substream ID
PHASE I CHARACTER*8 � Phase
COMPID I CHARACTER*8 � Component ID
WETDRY I CHARACTER*4 � Wet/dry basis (WET or DRY)
BASIS I CHARACTER*4 � Unit basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 102
Block VLE Results Call subroutine TKVLE to retrieve vapor-liquid (or vapor-liquid-liquid) equilibrium results for a block. These results are available for the following Aspen Plus models: Heater, Flash2, Flash3, RStoic, and RYield.
Calling Sequence for TKVLE
CALL TKVLE (BLKID, NPH, NCP, COMPID, F, X, Y, RK, X2, RK2)
Argument List Descriptions for TKVLE Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NPH O INTEGER � Number of phases (2=VLE, 3=VLLE)
NCP O INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component IDs
F O REAL*8 NCP Feed mole fractions
X O REAL*8 NCP Liquid mole fractions (for VLE) or Liquid1 mole fractions (for VLLE)
Y O REAL*8 NCP Vapor mole fractions
RK O REAL*8 NCP Vapor-Liquid K-value (for VLE) or Vapor-Liquid1 K-value (for VLLE)
X2 O REAL*8 NCP Liquid2 mole fractions
RK2 O REAL*8 NCP Vapor-Liquid2 K-value
� I = Input to subroutine, O = Output from subroutine
Heating/Cooling Curves Aspen Plus can calculate heating/cooling curves for unit operation models Heater, Flash2, Flash3, HeatX, MHeatX, MCompR, RadFrac, MultiFrac, RateFrac, and PetroFrac. A unit operation block can have any number of heating/cooling curves. Many unit operation models allow for multiple types of heating/cooling curves.You can retrieve heating/cooling curve results using a five-step process:
1 Call TKNHCR to determine the number of heating/cooling curves for a block.
2 Call TKLHCR to list the heating/cooling curve types and numbers.
3 Call TKSHCR to determine the size of a heating/cooling curve.
4 Call TKHCUR to retrieve the standard results (temperature, pressure, vapor fraction, and duty) for a heating/cooling curve.
5 Retrieve the property set results by calling either TKNHCP for sequential heating/cooling curve properties or TKHCPR for specific heating/cooling curve properties.
The routines listed above replace the routines TKNHCV, TKLHCV, TKSHCV, TKHCRV, TKNHPR, and TKHPRP. These routines will continue to be supported and updated but cannot be used to access PetroFrac heating/cooling curves.
3 Block Result Subroutines 103
PetroFrac models have strippers and pumparounds that may have heating/cooling curves. The heating/cooling curve for a particular stripper or pumparound has both a block ID and a second ID for the main column/pumparound/stripper. The heating/cooling curve routines have an argument for this second ID called ID2. This argument is ignored for other models.
You can determine the interconnecting stream ID for MultiFrac heating/cooling curves by calling TKHCID.
Number of Heating/Cooling Curves for a Block Call subroutine TKNHCR to determine the number of heating/cooling curves for a unit operation block.
Calling Sequence for TKNHCR
CALL TKNHCR (BLKID, NCURVE)
Argument List Descriptions for TKNHCR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCURVE O INTEGER � Number of heating/cooling curves � I = Input to subroutine, O = Output from subroutine
Heating/Cooling Curves for a Block Call subroutine TKLHCR to list the heating/cooling curves for a unit operation block. TKLHCR returns a list of heating/cooling curve types and numbers, which are used to identify individual curves. The IDs of the main column, pumparound, and strippers of the PetroFrac unit are returned in ID2.
Calling Sequence for TKLHCR
CALL TKLHCR (BLKID, NCURVE, ID2, TYPES, NUMBER, IERR)
Argument List Descriptions for TKLHCR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
NCURVE I INTEGER � Number of heating/cooling curves
ID2 O CHARACTER*8 NCURVE ID of PetroFrac main column, pumparound, or stripper
TYPES O CHARACTER*16 NCURVE Type of heating/cooling curve (see below)
NUMBER O INTEGER NCURVE Heating/cooling curve number of each curve
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
3 Block Result Subroutines 104
TYPES value Type of Heating/Cooling Curve
HCURVE Standard
HOT Hot side
COLD Cold side
REBOILER Reboiler
CONDENSER Condenser
ICSTREAM Interconnecting stream heater
PUMPAROUND Pumparound
STRIPPERREBOILER Stripper reboiler
Size of a Heating/Cooling Curve Call subroutine TKSHCR to determine the size of a heating/cooling curve. TKSHCR returns the number of points in the curve, and the number of properties calculated.
Calling Sequence for TKSHCR
CALL TKSHCR (BLKID, ID2, TYPE, NUMBER, NPOINT, NPROP)
Argument List Descriptions for TKSHCR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ID2 I CHARACTER*8 � ID of PetroFrac main column, pumparound, or stripper
TYPE I CHARACTER*16 � Type of heating/cooling curve
NUMBER I INTEGER � Heating/cooling curve number
NPOINT O INTEGER � Number of points in curve
NPROP O INTEGER � Number of properties � I = Input to subroutine, O = Output from subroutine
Standard Heating/Cooling Curve Results Call subroutine TKHCUR to retrieve the temperature, pressure, vapor fraction, heat duty, and error flag for each point along the curve.
Calling Sequence for TKHCUR
CALL TKHCUR (BLKID, ID2, TYPE, NUMBER, NPOINT, IERFLG, TEMP, PRES, VFRAC, DUTY, IERR)
3 Block Result Subroutines 105
Argument List Descriptions for TKHCUR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ID2 I CHARACTER*8 ID of PetroFrac main column, pumparound, or stripper
TYPE I CHARACTER*16 � Type of heating/cooling curve
NUMBER I INTEGER � Heating/cooling curve number
NPOINT I INTEGER � Number of points
IERFLG O INTEGER NPOINT Status flag for each point 0=OK 1=Errors in this row 2=Dew point 3=Bubble point)
TEMP O REAL*8 NPOINT Temperature at each point
PRES O REAL*8 NPOINT Pressure at each point
VFRAC O REAL*8 NPOINT Vapor fraction at each point
DUTY O REAL*8 NPOINT Duty at each point
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Sequential Heating/Cooling Curve Properties Call subroutine TKNHCP to retrieve the next property set calculated for a heating/cooling curve. Use the property sequence number to identify the property. TKNHCP returns the property set qualifiers, the property values, and the units type and label.
Calling Sequence for TKNHCP
CALL TKNHCP (BLKID, ID2, TYPE, NUMBER, NPOINT, IPROP, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, UTYPE, LABEL, IERR)
3 Block Result Subroutines 106
Argument List Descriptions for TKNHCP Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ID2 I CHARACTER*8 ID of PetroFrac main column, pumparound, or stripper
TYPE I CHARACTER*16 � Type of heating/cooling curve
NUMBER I INTEGER � Heating/cooling curve number
NPOINT I INTEGER � Number of points in curve
IPROP I INTEGER � Property sequence number
PNAME O CHARACTER*12 � Property name. See Appendix B for a description.
SUBSID O CHARACTER*8 � Substream ID
PHASE O CHARACTER*8 � Phase
COMPID O CHARACTER*8 � Component ID
WETDRY O CHARACTER*4 � Wet/dry basis (WET or DRY) ��
BASIS O CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NPOINT Real values
UTYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
Specific Heating/Cooling Curve Properties Call subroutine TKHCPR to retrieve a specific property for a heating/cooling curve. The property is identified by specifying the property set qualifiers (PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS). Before calling TKHCPR, make sure that all the qualifiers are either set to the desired value or unset. TKHCPR returns the property values, the units type, and the units label.
Calling Sequence for TKHCPR
CALL TKHCPR (BLKID, ID2, TYPE, NUMBER, NPOINT, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, UTYPE, LABEL, IERR)
3 Block Result Subroutines 107
Argument List Descriptions for TKHCPR Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
ID2 I CHARACTER*8 ID of PetroFrac main column, pumparound, or stripper
TYPE I CHARACTER*16 � Type of heating/cooling curve
NUMBER I INTEGER � Heating/cooling curve number
NPOINT I INTEGER � Number of points in curve
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
SUBSID I CHARACTER*8 � Substream ID
PHASE I CHARACTER*8 � Phase
COMPID I CHARACTER*8 � Component ID
WETDRY I CHARACTER*4 � Wet/dry basis (WET or DRY) ��
BASIS I CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NPOINT Real values
UTYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
Interconnecting Stream IDs MultiFrac heating/cooling curves of type ICSTREAM are associated with interconnecting streams. Call subroutine TKHCID to retrieve the ID of the interconnecting streams.
Calling Sequence for TKHCID
CALL TKHCID (BLKID, TYPE, NUMBER, INTID, CHARID, IERR)
Argument List Descriptions for TKHCID Variable I/O � Type Dimension Description
BLKID I CHARACTER*(*) � Block ID
TYPE I CHARACTER*16 � Type of heating/cooling curve
NUMBER I INTEGER � Heating/cooling curve number
INTID O INTEGER � Interconnecting stream ID for MultiFrac
CHARID O CHARACTER*8 � Not currently used
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
4 Stream Result Subroutines 108
4 Stream Result Subroutines
This chapter describes the use of stream result retrieval subroutines in the Aspen Plus summary file toolkit. Use the subroutines described in this chapter for:
• Stream identification.
• Material stream results.
• Heat and work stream results.
• Component attribute results.
• Substream attribute results.
• Stream property set results.
4 Stream Result Subroutines 109
Stream Identification The following subroutines are used to identify streams in the summary file:
• TKSIDS returns a list of all the streams in the summary file.
• TKNSTR returns the next sequential stream.
Both routines return the stream type (MATERIAL, HEAT, or WORK).
Listing Stream IDs Call subroutine TKSIDS to retrieve the list of streams.
Calling Sequence for TKSIDS
CALL TKSIDS (NSTRM, STRMID, STRTYP, IERR)
Argument List Descriptions for TKSIDS Variable I/O � Type Dimension Description
NSTRM I INTEGER � Stream number
STRMID O CHARACTER*8 NSTRM Stream ID
STRTYP O CHARACTER*12 NSTRM Stream type (MATERIAL, HEAT, or WORK)
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Determining the Next Stream Call subroutine TKNSTR to get the next stream in a sequence. The stream is identified by the sequence number. TKNSTR also returns the stream type.
To find the stream ID of the first stream, set ISTRM to 1. To find the name of the second stream, set ISTRM to 2.
Calling Sequence for TKNSTR
CALL TKNSTR (ISTRM, STRMID, STRTYP, IERR)
Argument List Descriptions for TKNSTR Variable I/O � Type Dimension Description
ISTRM I INTEGER � Stream number
STRMID O CHARACTER*(*) � Stream ID
STRTYP O CHARACTER*12 � Stream type (MATERIAL, HEAT, or WORK)
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
4 Stream Result Subroutines 110
Material Stream Results TKSINF returns the source and destination blocks, along with the dimensions of the data for material streams. TKSSID returns the list of substream IDs for a stream. TKSTRM retrieves the results for material streams.
Retrieving Basic Stream Information Call subroutine TKSINF to retrieve basic stream information. TKSINF returns the source and destination blocks of the stream. In addition, TKSINF returns the number of substreams and the dimensions of the results for material streams.
Calling Sequence for TKSINF
CALL TKSINF (STRMID, SOURCE, DEST, NSUBS, LEN, IERR)
Argument List Descriptions for TKSINF Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SOURCE O CHARACTER*(*) � Source block ID
DEST O CHARACTER*(*) � Destination block ID
NSUBS O INTEGER � Number of substreams
LEN O INTEGER � Number of stream results
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Listing Substream IDs Call subroutine TKSSID to list the substreams for a stream.
Calling Sequence for TKSSID
CALL TKSSID (STRMID, NSUB, SUBSID)
Argument List Descriptions for TKSSID Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
NSUB I INTEGER � Number of substreams
SUBSID O CHARACTER*8 NSUB Substream IDs
� I = Input to subroutine, O = Output from subroutine
Retrieving Stream Results Call subroutine TKSTRM to retrieve the results for a material stream. The property is identified by its qualifiers. Typical qualifiers are property name, substream, component ID, and units basis.
4 Stream Result Subroutines 111
Calling Sequence for TKSTRM
CALL TKSTRM (STRMID, LEN, QUALS, RVALS, TYPES, LABELS, IERR )
Argument List Descriptions for TKSTRM
Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
LEN I INTEGER � Number of stream results
QUALS O CHARACTER*16 4*LEN Qualifiers for results. For each value they are: • Property name. See Appendix B for a description. • Substream ID • Component ID • Units basis
RVALS O REAL*8 LEN Real results
TYPES O CHARACTER*12 LEN Units type
LABELS O CHARACTER*16 LEN Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving a Single Stream Property Call subroutine TKSVAL to retrieve a single material stream property. RVALS is an array which should be dimensioned to 1 if an overall stream property is requested, or to NCOMP if a component property from Table B.4 is requested.
Calling Sequence for TKSVAL
CALL TKSVAL (STRMID, SUBSID, PNAME, BASIS, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKSVAL Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
BASIS I CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 1 or NCOMP Real results (Use NCOMP if value is for acomponent property.)
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
4 Stream Result Subroutines 112
Heat and Work Stream Results Call subroutine TKSTRA to retrieve the result value from a heat or a work stream. Heat streams return an enthalpy flow. Work streams return a power.
Calling Sequence for TKSTRA
CALL TKSTRA (STRMID, STRTYP, VALUE, LABEL)
Argument List Descriptions for TKSTRA Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
STRTYP I CHARACTER*4 � Stream type (HEAT or WORK)
VALUE O REAL*8 � Result value
LABEL O CHARACTER*16 � Units labels (type is ENTHALPY-FLOW for heat streams, POWER for work streams)
� I = Input to subroutine, O = Output from subroutine
Component Attribute Results You can retrieve component attribute results for a substream using a four-step process:
1 Call TKSNAC to determine the number of components with attributes in the substream.
2 Call TKSNCA to determine the number of attributes for a component in a substream.
3 Call TKSSCA to determine the size of a component attribute.
4 Call TKSCAT to retrieve the component attribute values.
Determining the Number of Components with Attributes Call subroutine TKSNAC to retrieve the number of components with attributes in a specified substream.
Calling Sequence for TKSNAC
CALL TKSNAC (STRMID, SUBSID, NAC)
Argument List Descriptions for TKSNAC Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
NAC O INTEGER � Number of components with attributes � I = Input to subroutine, O = Output from subroutine
4 Stream Result Subroutines 113
Determining Number of Attributes for a Component Call subroutine TKSNCA to determine the number of attributes for a component. Specify the component number; TKSNCA returns the component ID and the number of attributes.
Calling Sequence for TKSNCA
CALL TKSNCA (STRMID, SUBSID, ICOMP, COMPID, NATT)
Argument List Descriptions for TKSNCA Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
ICOMP I INTEGER � Component sequence number
COMPID O CHARACTER*8 � Component ID
NATT O INTEGER � Number of attributes � I = Input to subroutine, O = Output from subroutine
Determining Component Attribute Size Call subroutine TKSSCA to determine the size of a component attribute. Specify the attribute sequence number. TKSSCA returns the attribute name and the number of elements.
Calling Sequence for TKSSCA
CALL TKSSCA (STRMID, SUBSID, COMPID, IATT, IDATT, NELEM)
Argument List Descriptions for TKSSCA Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
COMPID I CHARACTER*8 � Component ID
IATT I INTEGER � Attribute sequence number
IDATT O CHARACTER*8 � Attribute name
NELEM O INTEGER � Number of elements � I = Input to subroutine, O = Output from subroutine
4 Stream Result Subroutines 114
Retrieving Component Attribute Values Call subroutine TKSCAT to retrieve the array of component attribute values and the name of each attribute element.
Calling Sequence for TKSCAT
CALL TKSCAT (STRMID, SUBSID, COMPID, IDATT, NELEM, ELEMID, VALUES, IERR)
Argument List Descriptions for TKSCAT Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
COMPID I CHARACTER*8 � Component ID
IDATT I CHARACTER*8 � Attribute name
NELEM I INTEGER � Number of elements
ELEMID O CHARACTER*8 NELEM Names of elements
VALUES O REAL*8 NELEM Real values
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Substream Attribute Results You can retrieve substream attribute results for a substream using a three-step process:
1 Call TKSNSA to get the number of substream attributes in a substream.
2 Call TKSSSA to get the size of a substream attribute.
3 Call TKSSAT to retrieve the substream attribute results.
Determining the Number of Substream Attributes Call subroutine TKSNSA to determine the number of attributes in a substream.
Calling Sequence for TKSNSA
CALL TKSNSA (STRMID, SUBSID, NSATT)
4 Stream Result Subroutines 115
Argument List Descriptions for TKSNSA Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
NSATT O INTEGER � Number of substream attributes � I = Input to subroutine, O = Output from subroutine
Determining Substream Attribute Size Call subroutine TKSSSA to determine the size of a substream attribute. Specify the attribute sequence number; TKSSSA returns the number of elements and the attribute ID.
Calling Sequence for TKSSSA
CALL TKSSSA (STRMID, SUBSID, ISATT, SATID, NELEM)
Argument List Descriptions for TKSSSA Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
ISATT I INTEGER � Attribute sequence number
SATID O CHARACTER*8 � Attribute ID
NELEM O INTEGER � Number of elements � I = Input to subroutine, O = Output from subroutine
Retrieving Substream Attribute Values Call subroutine TKSSAT to retrieve results for substream attributes.
Calling Sequence for TKSSAT
CALL TKSSAT (STRMID, SUBSID, SATID, NELEM, VALUES, IERR)
Argument List Descriptions for TKSSAT Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
SUBSID I CHARACTER*8 � Substream ID
SATID I CHARACTER*8 � Attribute ID
NELEM I INTEGER � Number of elements
VALUES O REAL*8 NELEM Real values
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
4 Stream Result Subroutines 116
Stream Property Set Results You can retrieve results for additional property sets specified in the standard stream report using a two-step process:
1 Call subroutine TKNSPR to get the number of properties.
2 Call TKSPRP to retrieve the property values.
Determining Dimensions of Stream Property Values Call subroutine TKNSPR to determine the number of property set results for a stream.
Calling Sequence for TKNSPR
CALL TKNSPR (STRMID, NVAL, IERR)
Argument List Descriptions for TKNSPR Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
NVAL O INTEGER � Number of values � I = Input to subroutine, O = Output from subroutine
4 Stream Result Subroutines 117
Retrieving Stream Property Results Call subroutine TKSPRP to retrieve the property values for a stream. TKSPRP returns the property qualifiers to identify each property value.
Calling Sequence for TKSPRP
CALL TKSPRP (STRMID, NVAL, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKSPRP Variable I/O � Type Dimension Description
STRMID I CHARACTER*(*) � Stream ID
NVAL I INTEGER � Number of values
PNAME O CHARACTER*12 NVAL Property name. See Appendix B for a description.
SUBSID O CHARACTER*8 NVAL Substream ID
PHASE O CHARACTER*8 NVAL Phase
COMPID O CHARACTER*8 NVAL Component ID
WETDRY O CHARACTER*4 NVAL Wet/dry basis (WET or DRY) ��
BASIS O CHARACTER*4 NVAL Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NVAL Real results
TYPES O CHARACTER*12 NVAL Units types
LABELS O CHARACTER*16 NVAL Units labels
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
5 Physical Property Table Results Subroutines 118
5 Physical Property Table Results Subroutines
You can retrieve all property table results using a standard set of subroutines. There is a separate set of subroutines for retrieving pressure-temperature envelope results.
This chapter describes:
• Property table identification.
• Property and flashcurve table results.
• Pressure-temperature envelope results.
5 Physical Property Table Results Subroutines 119
Property Table Identification Call subroutine TKNPPT to get the next property table in sequence from the summary file.
Calling Sequence for TKNPPT
CALL TKNPPT (ITABLE, TABID, TYPE, IERR)
Argument List Descriptions for TKNPPT Variable I/O � Type Dimension Description
ITABLE I INTEGER � Property table sequence number
TABID O CHARACTER*(*) � Property table ID
TYPE O CHARACTER*12 � Property table type (PROPS, FLASHCURVE, or PTENVELOPE)
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Property and Flashcurve Table Results You can retrieve property and flashcurve table results by calling either of the following two subroutines:
• TKNPPR to retrieve the next sequential property.
• TKPPRP to retrieve a specific property.
When you use either of these subroutines, you must call subroutine TKSPPT to determine the dimensions of the property table.
Determining Property Table Dimensions Call subroutine TKSPPT to determine the dimensions of a property table. TKSPPT returns the number of points and the number of properties.
Calling Sequence for TKSPPT
CALL TKSPPT (TABID, NPOINT, NPROP, IERR)
5 Physical Property Table Results Subroutines 120
Argument List Descriptions for TKSPPT Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Property table ID
NPOINT O INTEGER � Number of points
NPROP O INTEGER � Number of properties
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Sequential Properties in a Table Call subroutine TKNPPR to retrieve the next property in sequence from the property table. Identify the property using the property sequence number. TKNPPR returns the stream property qualifiers.
Calling Sequence for TKNPPR
CALL TKNPPR (TABID, NPOINT, IPROP, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKNPPR Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Property table ID
NPOINT I INTEGER � Number of points
IPROP I INTEGER � Property number
PNAME O CHARACTER*12 � Property name. See Appendix B for a description.
SUBSID O CHARACTER*8 � Substream ID
PHASE O CHARACTER*8 � Phase
COMPID O CHARACTER*8 � Component ID
WETDRY O CHARACTER*4 � Wet/dry basis (WET or DRY) ��
BASIS O CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NPOINT Real values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
5 Physical Property Table Results Subroutines 121
Retrieving Specific Properties from a Table Call subroutine TKPPRP to retrieve a specific property from the property table. Specify the property by listing its qualifiers.
Calling Sequence for TKPPRP
CALL TKPPRP (TABID, NPOINT, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPPRP Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Property table ID
NPOINT I INTEGER � Number of points
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
SUBSID I CHARACTER*8 � Substream ID
PHASE I CHARACTER*8 � Phase
COMPID I CHARACTER*8 � Component ID
WETDRY I CHARACTER*4 � Wet/dry basis (WET or DRY) ��
BASIS I CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
RVALS O REAL*8 NPOINT Real values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
Pressure-Temperature Envelope Results You can retrieve pressure-temperature envelope results using a four-step process:
1 Call TKNENV to determine the number of envelopes and properties in a property table.
2 Call TKSENV to determine the size of each branch of an envelope.
3 Call TKPTEV to retrieve the temperature and pressure along each branch of an envelope.
4 Retrieve the property set for each branch of an envelope. You can retrieve each property sequentially using TKNPEV, or retrieve a specific property using TKPPEV.
5 Physical Property Table Results Subroutines 122
Determining Dimensions for Properties in the Envelope Call subroutine TKNENV to determine the number of envelopes and the number of properties.
Calling Sequence for TKNENV
CALL TKNENV (TABID, NENVL, NPROP, IERR)
Argument List Descriptions for TKNENV Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Property table ID
NENVL O INTEGER � Number of envelopes
NPROP O INTEGER � Number of properties
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Determining Envelope Dimensions Call subroutine TKSENV to determine the dimensions of an envelope. TKSENV returns the number of points for each branch of the envelope. For an envelope at a vapor fraction of .5, zero is returned as the dimension of the complementary branch.
Calling Sequence for TKSENV
CALL TKSENV (TABID, IENVL, NP1, NP2)
Argument List Descriptions for TKSENV Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Property table ID
IENVL I INTEGER � Envelope number
NP1 O INTEGER � Number of points in the first branch
NP2 O INTEGER � Number of points in the complementary branch
� I = Input to subroutine, O = Output from subroutine
5 Physical Property Table Results Subroutines 123
Retrieving Temperature and Pressure for Envelope Branch Call subroutine TKPTEV to retrieve the temperature and pressure for each branch along an envelope. TKPTEV also returns the vapor fraction values for each branch.
Calling Sequence for TKPTEV
CALL TKPTEV (TABID, IENVL, NP1, NP2, VFRAC1, VFRAC2, TEMP1, PRES1, TEMP2, PRES2)
Argument List Descriptions for TKPTEV Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Property table ID
IENVL I INTEGER � Envelope number
NP1 I INTEGER � Number of points in the first branch
NP2 I INTEGER � Number of points in the complementary branch
VFRAC1 O REAL*8 � Vapor fraction for the first branch
VFRAC2 O REAL*8 � Vapor fraction for the complementary branch
TEMP1 O REAL*8 NP1 Temperature values for the first branch
PRES1 O REAL*8 NP1 Pressure values for the first branch
TEMP2 O REAL*8 NP2 Temperature values for the complementary branch
PRES2 O REAL*8 NP2 Pressure values for the complementary branch
� I = Input to subroutine, O = Output from subroutine
5 Physical Property Table Results Subroutines 124
Retrieving Sequential Envelope Properties Call subroutine TKNPEV to retrieve the next sequential property for an envelope. TKNPEV returns the property values for both branches of the envelope and the vapor fraction values.
Calling Sequence for TKNPEV
CALL TKNPEV (TABID, IENVL, IPROP, NP1, NP2, VFRAC1, VFRAC2, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, VALS1, VALS2, TYPE, LABEL)
Argument List Descriptions for TKNPEV Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Table ID
IENVL I INTEGER � Envelope number
IPROP I INTEGER � Property sequence number
NP1 I INTEGER � Number of points along the first branch
NP2 I INTEGER � Number of points along the complementary branch
VFRAC1 O REAL*8 � Vapor fraction for the first branch
VFRAC2 O REAL*8 � Vapor fraction for the complementary branch
PNAME O CHARACTER*12 � Property name. See Appendix B for a description.
SUBSID O CHARACTER*8 � Substream ID
PHASE O CHARACTER*8 � Phase
COMPID O CHARACTER*8 � Component ID
WETDRY O CHARACTER*4 � Wet/dry basis (WET or DRY) ��
BASIS O CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
VALS1 O REAL*8 NP1 Property values for the first branch
VALS2 O REAL*8 NP2 Property values for the complementary branch
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
� I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
5 Physical Property Table Results Subroutines 125
Retrieving Specific Envelope Properties Call subroutine TKPPEV to retrieve a specific property set from a pressure-temperature envelope.
Calling Sequence for TKPPEV
CALL TKPPEV (TABID, IENVL, NP1, NP2, PNAME, SUBSID, PHASE, COMPID, WETDRY, BASIS, VFRAC1, VFRAC2, VALS1, VALS2, TYPE, LABEL)
Argument List Descriptions for TKPPEV Variable I/O � Type Dimension Description
TABID I CHARACTER*(*) � Table ID
IENVL I INTEGER � Envelope number
NP1 I INTEGER � Number of points along the first branch
NP2 I INTEGER � Number of points along the complementary branch
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
SUBSID I CHARACTER*8 � Substream ID
PHASE I CHARACTER*8 � Phase
COMPID I CHARACTER*8 � Component ID
WETDRY I CHARACTER*4 � Wet/dry basis (WET or DRY)��
BASIS I CHARACTER*4 � Units basis (MOLE, MASS, or FLOW)
VFRAC1 O REAL*8 � Vapor fraction of the first branch
VFRAC2 O REAL*8 � Vapor fraction of the complementary branch
VALS1 O REAL*8 NP1 Property values for the first branch
VALS2 O REAL*8 NP2 Property values for the complementary branch
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
� I = Input to subroutine, O = Output from subroutine �� Can be left unspecified.
6 Costing Results Subroutines 126
6 Costing Results Subroutines
This chapter describes the use of costing equipment item retrieval subroutines in the summary file toolkit. Use the subroutines described in this chapter for retrieving this information about equipment items:
• Identification.
• Costing and sizing results.
6 Costing Results Subroutines 127
Equipment Item Identification The subroutines used to identify costing equipment items in the summary file are: Subroutine Returns
TKNEQ Number of equipment items in the summary file
TKEIDS List of equipment items in the summary file
TKNEQP Equipment item IDs sequentially
Determining Number of Equipment Items Call TKNEQ to determine the number of equipment items in the summary file.
Calling Sequence for TKNEQ
CALL TKNEQ (NEQUIP)
Argument List Descriptions for TKNEQ Variable I/O � Type Dimension Description
NEQUIP O INTEGER � Number of equipment items � I = Input to subroutine, O = Output from subroutine
Listing Equipment Items Call subroutine TKEIDS to get the list of equipment items and types.
Calling Sequence for TKEIDS
CALL TKEIDS (NEQUIP, EQPID, EQPTYP, IERR)
Argument List Descriptions for TKEIDS Variable I/O � Type Dimension Description
NEQUIP I INTEGER � Number of equipment items
EQPID O CHARACTER*8 NEQUIP Equipment item ID
EQPTYP O CHARACTER*12 NEQUIP Equipment type
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
6 Costing Results Subroutines 128
Determining Next Equipment Item Call subroutine TKNEQP to find the name of the next equipment item.
To find the ID of the first equipment item, set IEQUIP to 1. To find the name of the second item, set IEQUIP to 2, and so on.
Calling Sequence for TKNEQP
CALL TKNEQP (IEQUIP, EQPID, EQPTYP, IERR)
Argument List Descriptions for TKNEQP Variable I/O � Type Dimension Description
IEQUIP I INTEGER � Equipment item number
EQPID O CHARACTER*8 � Equipment item ID
EQPTYP O CHARACTER*12 � Equipment type
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Equipment Item Results The following subroutines are used to return results for equipment items in the summary file: Subroutine Returns
TKEQCR Costing results for an equipment item
TKNEQS Number of sizing results for an equipment item
TKEQSR Sizing results for an equipment item
Retrieving Equipment Item Costing Results Call subroutine TKEQCR to retrieve the calculated number of equipment items, the carbon steel cost, and the purchased cost.
Calling Sequence for TKEQCR
CALL TKEQCR (EQPID, EQPTYP, NCALC, CSCOST, PCOST, IERR)
6 Costing Results Subroutines 129
Argument List Descriptions for TKEQCR Variable I/O � Type Dimension Description
EQPID I CHARACTER*8 � Equipment Item ID
NCALC O INTEGER � Calculated number of equipment items
CSCOST O REAL*8 � Carbon steel cost
PCOST O REAL*8 � Purchased cost
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Determining Equipment Item Sizing Results Call subroutine TKNEQS to determine the number of equipment item sizing results.
Calling Sequence for TKNEQS
CALL TKNEQS (EQPID, NVAL, IERR)
Argument List Descriptions for TKNEQS Variable I/O � Type Dimension Description
EQPID I CHARACTER*8 � Equipment Item ID
NVAL O INTEGER � Number of results
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Equipment Item Sizing Results Call subroutine TKEQSR to retrieve the equipment item sizing results.
Calling Sequence for TKEQSR
CALL TKEQSR (EQPID, NVAL, PNAMES, ITYPES, IVALS, CVALS, RVALS, UTYPES, LABELS, IERR)
6 Costing Results Subroutines 130
Argument List Descriptions for TKEQSR Variable I/O � Type Dimension Description
EQPID I CHARACTER*8 � Equipment item ID
NVAL I INTEGER � Number of results
PNAMES O CHARACTER*12 NVAL Property names. See Appendix B for a description.
ITYPES O INTEGER NVAL Result type (1 = Integer value, 2 = Real*8 value, 3 = Character value)��
IVALS O INTEGER NVAL Integer result
CVALS O CHARACTER*12 NVAL Character result
RVALS O REAL*8 NVAL Real result
UTYPES O CHARACTER*12 NVAL Units type
LABELS O CHARACTER*16 NVAL Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine �� For each result, the value in ITYPE specifies which array contains the result (IVALS, CVALS, or RVALS). For example, if ITYPE(4) is 2, then IVALS(4) is 0, CVALS(4) is blank and RVALS(4) contains the result.
7 Pressure Relief Subroutines 131
7 Pressure Relief Subroutines
This chapter describes the use of pressure relief retrieval subroutines in the summary file toolkit. Use the subroutines described in this chapter for:
• Pressure relief model identification.
• Dynamic and steady-state results.
• Scalar results.
• Profile results.
• Vessel results.
• Vent results.
• Accumulator results.
7 Pressure Relief Subroutines 132
Pressure Relief Block Identification The following subroutines are used to identify the pressure relief blocks in the summary file:
• TKNPRS returns the number of pressure relief blocks in the summary file.
• TKPIDS returns a list of pressure relief IDs in the summary file.
• TKNXPR retrieves the pressure relief IDs sequentially.
There is no additional type information, unlike the corresponding block routines.
Determining the Number of Pressure Relief Blocks Call subroutine TKNPRS to determine the number of pressure relief blocks in the summary file.
Calling Sequence for TKNPRS
CALL TKNPRS (NPR)
Argument List Descriptions for TKNPRS Variable I/O � Type Dimension Description
NPR O INTEGER � Number of pressure relief blocks � I = Input to subroutine, O = Output from subroutine
Listing Pressure Relief Blocks Call subroutine TKPIDS to get a list of pressure relief blocks.
Calling Sequence for TKPIDS
CALL TKPIDS (NPR, PRID, IERR)
Argument List Descriptions for TKPIDS Variable I/O � Type Dimension Description
NPR I INTEGER � Number of pressure relief blocks
PRID O CHARACTER*(*) NPR Pressure relief IDs
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
7 Pressure Relief Subroutines 133
Determining the Next Pressure Relief Block Call subroutine TKNXPR to find the ID of the next pressure relief block in sequence.
To find the first ID, set IPR to 1. To find the ID of the second, set IPR to 2.
Calling Sequence for TKNXPR
CALL TKNXPR (IPR, PRID, IERR)
Argument List Descriptions for TKNXPR Variable I/O � Type Dimension Description
IPR I INTEGER � Sequence number of pressure relief blocks
PRID O CHARACTER*(*) � Pressure relief ID
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Pressure Relief Results You can retrieve scalar and profile results from the summary file for the pressure relief blocks. Results are either steady state or dynamic. You can also retrieve the vent accumulator and vent profile results for the dynamic case. Retrieving pressure relief results is a five-step process:
1 Call subroutine TKPSUB to determine the number of substreams.
2 Call subroutine TKPSRF to determine the dimensions of the scalar results and profiles.
3 Call TKPSSR to retrieve the dynamic scalar results; call subroutine TKPSSS to retrieve steady-state results.
4 Call subroutine TKPSRP to list the dynamic properties; call subroutine TKPSSP to list the steady-state properties.
5 For dynamic results, call subroutine TKPSR1 to retrieve the non-component-dependent profile properties; call subroutine TKPSR2 to retrieve the component-dependent profile properties.
� Or �
For steady-state results, call subroutine TKPSS1 to retrieve the property values.
Retrieving the vent accumulator profiles for the dynamic results requires three additional steps:
6 Call subroutine TKPVPF to determine the dimensions of the profile.
7 Call subroutine TKPVRP to list the properties.
7 Pressure Relief Subroutines 134
8 Call subroutine TKPVR1 to retrieve the property values for position-dependent properties. Or call subroutine TKPVR2 to retrieve the property values for component-dependent properties.
Retrieving the vent profiles for the dynamic results requires another three steps:
9 Call subroutine TKPAPF to determine the dimensions of the profile.
10 Call subroutine TKPAPR to list the properties.
11 Call subroutine TKPAR1 to retrieve the property values for non-component-dependent properties. Or call subroutine TKPAR2 to retrieve the property values for component-dependent properties.
Determining the Number of Substreams Call subroutine TKPSUB to determine the number of substreams for which the pressure relief block has results. If the results for the pressure relief model are at steady-state there are no substream dependent results and a value of one is returned.
Calling Sequence for TKPSUB
CALL TKPSUB (PRID, NSUB)
Argument List Descriptions for TKPSUB Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
NSUB O INTEGER � Number of substreams � I = Input to subroutine, O = Output from subroutine
Determining Dimensions of Pressure Relief Arrays Call subroutine TKPSRF to determine the sizes for the pressure relief arrays. TKPSRF returns:
• Number of scalar results.
• Number of profile points.
• Number of components present.
• Number of profile properties.
• Substream ID for the requested substream.
• Whether the results are steady state or dynamic.
Calling Sequence for TKPSRF
CALL TKPSRF (PRID, ISUB, SUBSID, ISTATE, NSCAL, NPOINT, NCP, NPROP)
7 Pressure Relief Subroutines 135
Argument List Descriptions for TKPSRF Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
ISUB I INTEGER � Substream number
SUBSID O CHARACTER*8 � Substream ID
ISTATE O INTEGER � Results (1=Steady state, 2=Dynamic)
NSCAL O INTEGER � Number of scalar results
NPOINT O INTEGER � Number of output points
NCP O INTEGER � Number of components present
NPROP O INTEGER � Number of properties � I = Input to subroutine, O = Output from subroutine,
Listing Profile Properties Call subroutine TKPSRP to list the dynamic profile properties for a specified substream. TKPSRP returns an array of property names, and an array indicating whether the property is component-dependent.
Call subroutine TKPSSP to list the steady-state profile properties. TKPSSP returns an array of property names, and the names of the pressure relief positions for each profile point.
Calling Sequence for TKPSRP
CALL TKPSRP (PRID, SUBSID, NPROP, ITYPES, PNAMES, IERR)
Argument List Descriptions for TKPSRP Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
SUBSID I CHARACTER*8 � Substream ID
NPROP I INTEGER � Number of properties
ITYPES O INTEGER NPROP Property type (1=Not component- dependent 2=Component-dependent)
PNAMES O CHARACTER*12 NPROP Property names. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error)
� I = Input to subroutine, O = Output from subroutine
Calling Sequence for TKPSSP
CALL TKPSSP (PRID, NPROP, NPOINT, PNAMES, POSIDS, IERR)
7 Pressure Relief Subroutines 136
Argument List Descriptions for TKPSSP Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of properties
NPOINT I INTEGER � Number of profile points
PNAMES O CHARACTER*12 NPROP Property names. See Appendix B for a description.
POSIDS O CHARACTER*32 NPOINT Position names
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Dynamic Scalar Results Call subroutine TKPSSR to retrieve the scalar dynamic results for pressure relief blocks.
Calling Sequence for TKPSSR
CALL TKPSSR (PRID, NSCAL, PNAMES, ITYPES, IVALS, CVALS, DVALS, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKPSSR Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
NSCAL I INTEGER � Number of scalar results
PNAMES O CHARACTER*12 NSCAL Property name. See Appendix B fora description.
ITYPES O INTEGER NSCAL Data type of result (1=Integer 2=Real 3=Character 4=Description)
IVALS O INTEGER NSCAL Integer property values
CVALS O CHARACTER*12 NSCAL Character property values
DVALS O CHARACTER*32 NSCAL Descriptive property values
RVALS O REAL*8 NSCAL Real property values
TYPES O CHARACTER*12 NSCAL Units type
LABELS O CHARACTER*16 NSCAL Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
7 Pressure Relief Subroutines 137
Retrieving Steady-State Scalar Results Call subroutine TKPSSS to retrieve steady-state scalar results.
Calling Sequence for TKPSSS
CALL TKPSSS (PRID, NSCAL, PNAMES, ITYPES, NPOINT, IVALS, CVALS, DVALS, RVALS, TYPES, LABELS, IERR)
Argument List Descriptions for TKPSSS Variable I/O � Type Dimensio
n Description
PRID I CHARACTER*(*) � Block ID
NSCAL I INTEGER � Number of scalar results
PNAMES O CHARACTER*12 NSCAL Property name. See Appendix B for a description.
ITYPES O INTEGER NSCAL Data type of result (1=Integer 2=Real 3=Character 4=Description)
IVALS O INTEGER NSCAL Integer property values
CVALS O CHARACTER*8 NSCAL Character property values
DVALS O CHARACTER*32 NSCAL Descriptive property values
RVALS O REAL*8 NSCAL Real property values
TYPES O CHARACTER*12 NSCAL Units type
LABELS O CHARACTER*16 NSCAL Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Non-Component-Dependent Dynamic Profiles Call subroutine TKPSR1 to retrieve profiles for non-component-dependent properties. The results are independent of the substream.
Calling Sequence for TKPSR1
CALL TKPSR1 (PRID, PNAME, NPOINT, ITYPES, CVALS, RVALS, TYPE, LABEL, IERR)
7 Pressure Relief Subroutines 138
Argument List Descriptions for TKPSR1 Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
NPOINT I INTEGER � Number of output points
ITYPES O INTEGER � Data type of results (2=Real 3=Character)
CVALS O CHARACTER*8 NPOINT Character property values
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Dynamic Component-Dependent Profiles Call subroutine TKPSR2 to retrieve profiles for component-dependent properties.
Calling Sequence for TKPSR2
CALL TKPSR2 (PRID, PNAME, SUBSID, NCP, COMPID, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPSR2 Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
SUBSID I CHARACTER*8 � Substream ID
NCP I INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component IDs
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NCP* NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
7 Pressure Relief Subroutines 139
Retrieving Steady-State Profiles Call subroutine TKPSS1 to retrieve profiles for the steady-state results.
Calling Sequence for TKPSS1
CALL TKPSS1 (PRID, PNAME, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPSS1 Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Determining Vent Accumulator Profile Dimensions Call subroutine TKPAPF to determine the sizes of profile arrays for the vent accumulator. TKPAPF returns the number of:
• Output points.
• Components present.
• Properties.
Calling Sequence for TKPAPF
CALL TKPAPF (PRID, NPOINT, NCP, NPROP)
Argument List Descriptions for TKPAPF Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
NPOINT O INTEGER � Number of output points
NCP O INTEGER � Number of components present
NPROP O INTEGER � Number of properties � I = Input to subroutine, O = Output from subroutine
7 Pressure Relief Subroutines 140
Listing Vent Accumulator Profile Properties Call subroutine TKPAPR to list the vent accumulator profile properties. TKPAPR returns an array of property names, and an array indicating whether the property is component-dependent.
Calling Sequence for TKPAPR
CALL TKPAPR (PRID, NPROP, ITYPES, PNAMES, IERR)
Argument List Descriptions for TKPAPR Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of properties
ITYPES O INTEGER NPROP Property type (1=Non-component-dependent 2=Component- dependent)
PNAMES O CHARACTER*12 NPROP Property names. See Appendix B for a description.
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Non-Component-Dependent Vent Accumulator Profiles Call subroutine TKPAR1 to retrieve vent accumulator profiles for non-component-dependent properties. The corresponding times for each profile point are retrieved using the property name TIME.
Calling Sequence for TKPAR1
CALL TKPAR1 (PRID, PNAME, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPAR1 Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
7 Pressure Relief Subroutines 141
Retrieving Component-Dependent Vent Accumulator Profiles Call subroutine TKPAR2 to retrieve vent accumulator profiles for component-dependent properties. The corresponding times for each profile point are retrieved using the property name TIME in TKPAR1.
Calling Sequence for TKPAR2
CALL TKPAR2 (PRID, PNAME, NCP, COMPID, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPAR2 Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
NCP I INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component IDs
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NCP* NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Determining Pressure Relief Vent Profile Dimensions Call subroutine TKPVPF to determine the sizes of the profile arrays for the vent. TKPVPF returns the number of:
• Output points.
• Components present.
• Positions.
Calling Sequence for TKPVPF
CALL TKPVPF (PRID, NPOINT, NCP, NPROP, NPOS)
Argument List Descriptions for TKPVPF Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
NPOINT O INTEGER � Number of output points
NCP O INTEGER � Number of components present
NPROP O INTEGER � Number of properties
NPOS O INTEGER � Number of positions � I = Input to subroutine, O = Output from subroutine
7 Pressure Relief Subroutines 142
Listing Vent Profile Properties Call subroutine TKPVRP to list the vent profile properties. TKPVRP returns an array of property names, the corresponding times for each profile point, and an array indicating whether the property is position-dependent or component-dependent.
Calling Sequence for TKPVRP
CALL TKPVRP (PRID, NPROP, ITYPES, PNAMES, TIMES, TYPE, LABEL, IERR)
Argument List Descriptions for TKPVRP Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
NPROP I INTEGER � Number of properties
NPOINT I INTEGER � Number of points
ITYPES O INTEGER NPROP Property type (1=Position-dependent 2= Component- dependent)
PNAMES O CHARACTER*12 NPROP Property names. See Appendix B for a description.
TIMES O REAL*8 NPOINT Time intervals
TYPE O CHARACTER*12 � Time type
LABEL O CHARACTER*16 � Time label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Position-Dependent Vent Profiles Call subroutine TKPVR1 to retrieve vent profiles for properties at the listed positions. The times for each profile point are retrieved in TKPVRP.
Calling Sequence for TKPVR1
CALL TKPVR1 (PRID, PNAME, NPOINT, RVALS, TYPE, LABEL, IERR)
7 Pressure Relief Subroutines 143
Argument List Descriptions for TKPVR1 Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
NPOS I INTEGER � Number of positions
POSIDS O CHARACTER*16 NPOS Names of positions
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NPOS* NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
Retrieving Component-Dependent Vent Profiles Call subroutine TKPVR2 to retrieve vent profiles for component-dependent properties. The times for each profile point are retrieved in TKPVRP.
Calling Sequence for TKPVR2
CALL TKPVR2 (PRID, PNAME, NCP, COMPID, NPOINT, RVALS, TYPE, LABEL, IERR)
Argument List Descriptions for TKPVR2 Variable I/O � Type Dimension Description
PRID I CHARACTER*(*) � Block ID
PNAME I CHARACTER*12 � Property name. See Appendix B for a list of valid property names.
NCP I INTEGER � Number of components present
COMPID O CHARACTER*8 NCP Component Ids
NPOINT I INTEGER � Number of output points
RVALS O REAL*8 NCP* NPOINT Property values
TYPE O CHARACTER*12 � Units type
LABEL O CHARACTER*16 � Units label
IERR O INTEGER � Error flag (0=No error) � I = Input to subroutine, O = Output from subroutine
8 Examples 144
8 Examples
This chapter presents a series of examples to illustrate the development and use of an application program using the Summary File Toolkit: Example Title
1 Stream Heat and Material Balance Table Generation
2 Interactive Heating/Cooling Curve Table Generation
3 Column Profile Results Written to Plot File
4 Distillation Column Diagram Generation
The Fortran source code for these examples is in the Engine\user directory of the Aspen Plus installation. They are named sftex#.f where # is the number of the example.A summary file (sftex.sum) and the input file used to generate it (sft.inp) are also in the same directory.
8 Examples 145
Example 1: Stream Heat and Material Balance Table Generation This example retrieves stream results from the summary file. Both standard stream results and property set results are retrieved. The results are written to a file in table format.
Declaring Variables and Dimensioning The toolkit routines used in this program require a variety of character variables and arrays. Space is needed to store results retrieved from the toolkit routines. This program assumes only 5 streams per printed page of the table, 1000 properties at most for each stream, and a maximum of 100 components.
C C Variable declarations; reals are double precision. C IMPLICIT REAL*8 (A-H, O-Z) CHARACTER*80 SUMFIL, RCPROP, RCUNIT, ASPDIR CHARACTER UNISET*4, VERSN*20, RUNID*8, DATE*80, INFILE*80, + ID*8, TYPE*12, IDS*8, QUALS*16, TYPES*12, LABELS*16, + OLDNAM*16, PLUS*16, EXCL*16, PNAMES*12, SSID*8, + COMPID*8, PHASE*8, WETDRY*4, BASIS*4, OLDPHS*8, KFF*1, + OLDLAB*16, SOURCE*8, DEST*8 C C Dimension arrays for the toolkit routines. C Arrays are dimensioned for 5 streams, 1000 properties, C and 100 components. C DIMENSION QUALS(4,1000), TYPES(1000), LABELS(1000), PNAMES(1000), + SSID(1000), COMPID(1000), PHASE(1000), WETDRY(1000), + BASIS(1000) DIMENSION SVALS(1000, 5), IDS(5) DIMENSION XMW(100)
8 Examples 146
Initializing the Toolkit The executable section of the application program begins by initializing the summary file toolkit. The steps are:
1 Get the name of the Aspen Plus Simulation Engine directory by prompting the user.
2 Get the name of the summary file by prompting the user.
3 Call TKINIT to perform the initialization.
C C Begin executable code. C C Get file names for the toolkit. C C Get rcpropnu.dat and rcunits.dat by prompting the user C for the name of the directory where the Aspen Plus C Simulation Engine is installed. C WRITE(6, *) ' Enter the Aspen Plus Simulation Engine' // + 'directory name: ' READ(5, FMT='(A)') ASPDIR DO 50 LEN = 80, 1, -1 IF (ASPDIR(LEN:LEN) .NE. ' ') GO TO 55 50 CONTINUE 55 CONTINUE RCPROP = ASPDIR(1:LEN) // '\toolkit\rcpropnu.dat' RCUNIT = ASPDIR(1:LEN) // '\toolkit\rcunits.dat' C C Prompt the user for the name of the summary file: C WRITE(6, *) ' Enter the summary file name: ' READ(5, FMT='(A)') SUMFIL C -------------------------------------------------------- C C Open the summary file and call TKINIT to initialize C the toolkit. If there is an error, end execution. C OPEN(UNIT=2, FILE=SUMFIL, STATUS='UNKNOWN') CALL TKINIT(UNISET, 1, 2, 3, RCPROP, 4, RCUNIT, RMISS, IERR) IF (IERR .NE. 0) GO TO 9999
8 Examples 147
Finding Number of Streams To find the streams, TKINFO is called to determine the number of simulation objects in the summary file. The variable NSTRM is the total number of streams.
C Get the number of streams by calling TKINFO. C CALL TKINFO(VERSN, RUNID, DATE, INFILE, ISTAT, IWORK, + NBLK, NSTRM, NTABLE, NSENS )
Finding Component Molecular Weight For component-dependent properties, the molecular weight is written for each component in the table. Molecular weight is retrieved by calling TKCOMP to determine the number of conventional components, and TKCPRP to retrieve the property values.
C C Get the number of components and molecular weight values. C CALL TKCOMP(NCC, NNCC) PNAMES(1) = 'MW' CALL TKCPRP(PNAMES, NCC, XMW, LABELS)
Retrieving Stream Properties For each material stream, both standard and property set results are retrieved. TKSINF determines the dimensions of the standard results, and TKSTRM retrieves them. For property set results, TKNSPR determines the number of results, and TKSPRP retrieves them.
C C Call TKSINF and TKSTRM to retrieve the basic stream results. C CALL TKSINF(ID, SOURCE, DEST, NSUBS, LEN, IERR) CALL TKSTRM(ID, LEN, QUALS, SVALS(1, NPPG), TYPES, LABELS, + IERR) C C If an error occurred retrieving the results, skip this C stream. C IF (IERR .NE. 0) THEN WRITE(6, *) ' ERROR ON STREAM ',ID NPPG = NPPG - 1 GO TO 1000 ENDIF C C Call TKNSPR and TKSPRP to retrieve the property sets. C Check for an error, and skip this stream if one occurs. C CALL TKNSPR(ID, NPROP, IERR)
8 Examples 148
IF (IERR .NE. 0) THEN WRITE(6, *) ' ERROR ON STREAM ',ID NPPG = NPPG - 1 GO TO 1000 ENDIF LL = LEN + 1 CALL TKSPRP(ID, NPROP, PNAMES, SSID, PHASE, COMPID, + WETDRY, BASIS, SVALS(LL, NPPG), TYPES(LL), + LABELS(LL), IERR)
Writing Stream Table Every five streams, or when the last stream is processed, the table is written to the file hmbtable.out. The standard results are written first; the molecular weight associated with each component is written with the first component-dependent property. The property sets follow the standard results. An example of one page of output is shown in Figure 8.1.
C C If this is the 5th stream, or the last stream, write the C table for the set of streams. C IF (NPPG .NE. 5 .AND. I .NE. NSTRM) GO TO 1000 WRITE(7, 30) KFF WRITE(7, 31) (PLUS,II=1,NPPG), EXCL WRITE(7, 10) (IDS(II),II=1,NPPG) WRITE(7, 31) (PLUS,II=1,NPPG), EXCL OLDNAM = ' ' ICOMP = 1 C C Loop through the basic stream properties. Check to see if C each is component-dependent. C DO 500 J = 1, LEN C C For non-component-dependent properties, write the name, C the unit label, and the values. C IF (QUALS(3,J) .EQ. ' ') THEN WRITE(7, 20) QUALS(1,J), LABELS(J), + (SVALS(J,JJ),JJ=1,NPPG) WRITE(7, 31) (PLUS,II=1,NPPG), EXCL OLDNAM = QUALS(1,J) ELSE C C For component-dependent properties, write the name if the C previous name is different. C IF (QUALS(1,J) .NE. OLDNAM) + WRITE(7, 21) QUALS(1,J),LABELS(J),(EXCL,II=1,NPPG),EXCL OLDNAM = QUALS(1,J)
8 Examples 149
IF (ICOMP .GT. NCC) THEN C C Write the molecular weight with the component name C if this is the first component-dependent property. C WRITE(7, 22) QUALS(3,J), (SVALS(J,JJ),JJ=1,NPPG) ELSE WRITE(7, 23) QUALS(3,J), XMW(ICOMP), + (SVALS(J,JJ),JJ=1,NPPG) ENDIF IEND = MOD(ICOMP, NCC) IF (IEND .EQ. 0) WRITE(7, 31) (PLUS,II=1,NPPG), EXCL ICOMP = ICOMP + 1 ENDIF 500 CONTINUE C C Loop through the PROP-SET properties. The properties are C sorted by phase. If the current phase is different from C the previous phase, then print a new phase header. C OLDNAM = ' ' OLDPHS = ' ' OLDLAB = ' ' IFIRST = 1 DO 600 J = 1, NPROP L = J + LEN IF (PHASE(J) .NE. OLDPHS) THEN C First item is already preceded by a line IF (IFIRST .EQ. 0) THEN WRITE(7, 31) (PLUS,II=1,NPPG), EXCL ELSE IFIRST = 0 ENDIF WRITE(7, 40) PHASE(J), (EXCL,II=1,NPPG), EXCL ENDIF C C Check for a component qualifier on the property. C IF (COMPID(J) .EQ. ' ') THEN WRITE(7, 31) (PLUS,II=1,NPPG), EXCL WRITE(7, 20) PNAMES(J), LABELS(L), + (SVALS(L,JJ),JJ=1,NPPG) OLDNAM = PNAMES(J) OLDLAB = LABELS (L) ELSE C C For component-dependent properties, write the name for C the set of components only once. C IF (PNAMES(J) .NE. OLDNAM .OR. LABELS(L) .NE. OLDLAB) THEN WRITE(7, 31) (PLUS,II=1,NPPG), EXCL + WRITE(7, 21) PNAMES(J),LABELS(L),(EXCL,II=1,NPPG),EXCL
8 Examples 150
ENDIF OLDNAM = PNAMES(J) OLDLAB = LABELS(L) WRITE(7, 22) COMPID(J), (SVALS(L,JJ),JJ=1,NPPG) ENDIF OLDPHS = PHASE(J) 600 CONTINUE C Underline the final item WRITE(7,31) (PLUS, II=1, NPG), EXCL
8 Examples 151
Figure 8.1 � Stream Table Results Excerpt
VAP LIQ H2RCY CHRCY PRODUCT
MOLEFLOW KMOL/HR
H2 (MW = 2.02) 13.663 0.25941 12.570 0.77824E-01 0.38241E-11
N2 (MW = 28.01) 6.7132 0.23753 6.1762 0.71260E-01 0.14270E-10
C1 (MW = 16.04) 17.519 2.0170 16.118 0.60509 0.13065E-07
BZ (MW = 78.11) 0.11318E-02 0.89643E-01 0.10412E-02 0.26893E-01 0.62739E-01
CH (MW = 84.16) 0.78883 64.619 0.72573 19.386 45.229
MOLEFLMX KMOL/HR 38.686 67.222 35.591 20.167 45.291
MASSFLMX KG/HR 563.14 5485.0 518.09 1645.5 3811.4
VLSTDMX L/MIN 805.90 131.48 741.43 39.445 123.98
TEMP K 322.04 322.04 322.04 322.04 474.15
PRES ATM 21.094 21.094 21.094 21.094 13.609
VFRAC 1.0000 0.00000E+00 1.0000 0.00000E+00 0.00000E+00
LFRAC 0.00000E+00 1.0000 0.00000E+00 1.0000 1.0000
SFRAC 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00
HMX CAL/MOL -8542.1 -35492. -8542.1 -35492. -29055.
HMX CAL/GM -586.81 -434.98 -586.81 -434.98 -345.26
HMX CAL/SEC -91794. -0.66274E+06 -84450. -0.19882E+06 -0.36554E+06
SMX CAL/MOL-K -14.579 -138.84 -14.579 -138.84 -125.29
SMX CAL/GM-K -1.0016 -1.7016 -1.0016 -1.7016 -1.4888
RHOMX MOL/CC 0.80005E-03 0.85210E-02 0.80005E-03 0.85210E-02 0.60884E-02
RHOMX GM/CC 0.11646E-01 0.69527 0.11646E-01 0.69527 0.51236
MWMX 14.557 81.595 14.557 81.595 84.154
** VAPOR PHASE **
DMX
H2 0.35103E-01 0.10000E+36 0.35103E-01 0.10000E+36 0.10000E+36
N2 0.16453E-01 0.10000E+36 0.16453E-01 0.10000E+36 0.10000E+36
C1 0.19524E-01 0.10000E+36 0.19524E-01 0.10000E+36 0.10000E+36
BZ 0.69972E-02 0.10000E+36 0.69972E-02 0.10000E+36 0.10000E+36
CH 0.67625E-01 0.10000E+36 0.67625E-01 0.10000E+36 0.10000E+36
MUMX 0.13021E-01 0.10000E+36 0.13021E-01 0.10000E+36 0.10000E+36
** LIQUID PHASE **
DMX SQCM/SEC
H2 0.10000E+36 0.11111E-03 0.10000E+36 0.11111E-03 0.41453E-03
N2 0.10000E+36 0.99235E-04 0.10000E+36 0.99235E-04 0.36919E-03
C1 0.10000E+36 0.91460E-04 0.10000E+36 0.91460E-04 0.35104E-03
BZ 0.10000E+36 0.54343E-04 0.10000E+36 0.54343E-04 0.20117E-03
CH 0.10000E+36 0.20065E-03 0.10000E+36 0.20065E-03 0.14933E-03
MUMX CP 0.10000E+36 0.25699 0.10000E+36 0.25699 0.10380
8 Examples 152
Example 2: Interactive Heating/Cooling Curve Table Generation This example retrieves heating/cooling curve results from unit operation blocks. The summary file is queried for a list of blocks containing curve results. This example uses a toolkit utility routine TKUPPR, that takes a character string as an argument and uppercases it. A sample of the program dialog is shown in Figure 8.2. A sample of the output is shown in Figure 8.3.
Declaring Variables Declarations and dimensions are similar to those in Example 1. But in this example, the paths for the properties and units files are coded into the program.
C C Data statements C DATA UNISET / 'ENG' / DATA PLUS / '-----------------+' / DATA EXCL / '-----------------!'/ DATA RMISS / 1.0D35 / DATA RCPROP / 'C:\Aspen Plus\Engine\Toolkit\RCPROPNU.DAT' / DATA RCUNIT / 'C:\Aspen Plus\Engine\Toolkit\RCUNITS.DAT' /
Initializing the Toolkit The user is prompted for the name of the summary file. The summary file must be opened before TKINIT is called.
C C Prompt the user for the name of the summary file. C WRITE(6, *) ' Enter the summary file name: ' READ(5, FMT='(A)') SUMFIL C C Open the summary file and call TKINIT to initialize C the toolkit. If there is an error, end execution. C OPEN(UNIT=2, FILE=SUMFIL, STATUS='UNKNOWN') CALL TKINIT(UNISET, 1, 2, 3, RCPROP, 4, RCUNIT, RMISS, IERR) IF (IERR .NE. 0) GO TO 9999
8 Examples 153
Finding Number of Blocks The number of blocks is determined by calling TKINFO.
C C Get the number of blocks by calling TKINFO. C CALL TKINFO(VERSN, RUNID, DATE, INFILE, ISTAT, IWORK, + NBLK, NSTRM, NTABLE, NSENS )
Finding Blocks with Heating/Cooling Curves One method of listing the blocks is to loop through them by calling TKNBLK. This allows a check of each block for the existence of heating/cooling curves.
C C Prompt the user to have Hcurves checked for the block. C To check for Hcurves, loop through all the blocks by calling C TKNHCV. C If the block has an Hcurve, load its ID and model type into C the ID arrays. C 100 CONTINUE NITEM = 0 NSET = 0 DO 200 I = 1, NBLK I1 = NITEM + 1 CALL TKNBLK(I, ID8(I1), ID12(I1), IERR) IF (IERR .NE. 0) GO TO 200 CALL TKNHCV(ID8(I1), NCURVE) IF (NCURVE .EQ. 0) GO TO 200 NITEM = NITEM + 1 C C If there are more than 100 blocks with Hcurves, C the work area will be filled. Write the first 100 blocks to C the list. C IF (NITEM .LT. 100 .OR. I .EQ. NBLK) GO TO 200 IF (NSET .EQ. 0) THEN WRITE(6, *) ' The following blocks contain Hcurve results:' WRITE(6, *) ' Block ID Model' WRITE(6, *) ' =======================' ENDIF DO 190 J = 1, NITEM WRITE(6, FMT='(1X,A8,2X,A12)') ID8(J), ID12(J) 190 CONTINUE IF (I .NE. NBLK) NSET = 1 NITEM = 0 200 CONTINUE
8 Examples 154
C C If there are any unwritten entries in the list, write the C list of blocks with Hcurves. C IF (NITEM .NE. 0) THEN IF (NSET .EQ. 0) THEN WRITE(6, *) ' The following blocks contain Hcurve results:' WRITE(6, *) ' Block ID Model' WRITE(6, *) ' =======================' ENDIF DO 210 J = 1, NITEM WRITE(6, FMT='(1X,A8,2X,A12)') ID8(J), ID12(J) 210 CONTINUE ENDIF
Prompting for Block Name When the blocks with heating/cooling curves are listed, prompt the user for the block IDs. Since all IDs in the summary file are in uppercase, user-specified IDs must be converted to uppercase. TKNHCV is called for each ID, to check whether or not a valid ID has been entered.
C C Prompt the user for the block to be checked; C remember to convert the block ID to uppercase. C WRITE(6, *) ' ' WRITE(6, *) ' Please select a block from the list:' READ(5, FMT='(A)') ID C Uppercase the response using a toolkit utility routine CALL TKUPPR (ID) CALL TKNHCV(ID, NCURVE) IF (NCURVE .LE. 0) THEN WRITE(6, *) ' ',ID,' is not a valid block ID.' WRITE(6, *) ' Please select again.' GO TO 100 ENDIF
8 Examples 155
Finding Heating/Cooling Curves for Selected Block Once a valid block ID is given, the heating/cooling curves in the block are listed by calling TKLHCV. The routine CHKREP checks that an integer is specified for the heating/cooling curve ID.
C C For a valid block with Hcurve data, print a list of C the Hcurves for the block. C 240 CONTINUE WRITE(6, *) ' ',ID,' contains the following Hcurves:' WRITE(6, *) ' ID Type Hcurve No.' WRITE(6, *) ' =======================' CALL TKLHCV(ID, NCURVE, ID16, INTS, IERR) DO 250 I = 1, NCURVE WRITE(6, FMT='(1X,I2,2X,A16,1X,I4)') I, ID16(I), INTS(I) 250 CONTINUE WRITE(6, *) ' Please select an Hcurve by specifying its ID:' READ(5, '(A4)') REPLY CALL CHKREP (REPLY, II, ISTAT) IF ( ISTAT .EQ. 1 ) THEN WRITE(6, *)'"',REPLY, + '" is not an integer. Please select again:' GO TO 240 ENDIF IF (II .LE. 0 .OR. II .GT. NCURVE) THEN WRITE(6, *) '"',II,'" is not a valid ID. Please select again:' GO TO 240 ENDIF
8 Examples 156
Finding Dimensions of Heating/Cooling Curve TKSHCV checks the dimensions of the data for the curve that is selected. If the dimensions are larger than the arrays are dimensioned, an exit with an error may occur.
C C For a specific Hcurve, get its size, and C print the standard properties. C IHCNO = INTS(II) CALL TKSHCV(ID, ID16(II), IHCNO, NPOINT, NPROP) C C The TVAL array is dimensioned for 100 points and 100 C properties. C That means only 99 stream properties can be stored. If there C are more than 99, or more than 100 points, print error. C IF (NPROP .GT. 99 .OR. NPOINT .GT. 100) THEN WRITE(6, *) ' *** Error - This Hcurve is too large ***' GO TO 700 ENDIF
8 Examples 157
Retrieving Standard Heating/Cooling Curve Results This program allows the user to choose one of the standard results (temperature, pressure, heat duty, or vapor fraction) as the independent variable in the table. The table of these standard results is written, so the user can choose one of them. TKHCRV is called to retrieve the standard results.
C C Call TKHCRV to get the standard properties. C CALL TKHCRV(ID, ID16(II), IHCNO, NPOINT, INTS, TVAL(1,1), + TVAL(1,2), TVAL(1,3), TVAL(1,4), IERR) C C Get unit label information for standard properties. C TYPES(1) = 'TEMPERATURE' TYPES(2) = 'PRESSURE' TYPES(3) = 'ENTHALPY-FLOW' CALL TKLABL(3, TYPES, LABELS) LABELS(4) = LABELS(3) LABELS(3) = ' ' C C Write the table of standard results, so that the user can C select an independent variable. C WRITE(6, 31) (PLUS,JJ=1,3),EXCL WRITE(6, 10) (PROPS(JJ),JJ=1,4) WRITE(6, 10) (LABELS(JJ),JJ=1,4) WRITE(6, 31) (PLUS,JJ=1,3),EXCL DO 500 I = 1, NPOINT WRITE(6, 20) (TVAL(I,JJ),JJ=1,4) 500 CONTINUE WRITE(6, 31) (PLUS,JJ=1,3),EXCL
8 Examples 158
Retrieving Property Sets The user is prompted for the property sets to be included in the table. TKNHPR is called to retrieve the name of the properties with their qualifiers, and to retrieve the values.
C C Loop through the property sets to create a list of C properties for the user to choose from. Store the properties C in the TVAL array. C WRITE(6, *) ' Select properties from the following list:' WRITE(6, *) ' ID Property Phase Component' WRITE(6, *) ' ===============================' DO 600 I = 1, NPROP CALL TKNHPR(ID, ID16(II), IHCNO, NPOINT, I, + PNAMES(I+1), SSID, PHASE(I+1), COMPID(I+1), WETDRY, + BASIS, TVAL(1,I+1), TYPES(I+1), LABELS(I+1), IERR) WRITE(6, 11) I, PNAMES(I+1), PHASE(I+1), COMPID(I+1) 600 CONTINUE NCOL = 2 605 CONTINUE WRITE(6, *) ' Please enter the ID number of the property:' READ(5, '(A4)') REPLY CALL CHKREP (REPLY, JCOL, ISTAT) IF ( ISTAT .EQ. 1 ) THEN WRITE(6, *)'"',REPLY, + '" is not an integer. Please select again:' GO TO 605 ENDIF IF (JCOL .LT. 1 .OR. JCOL .GT. NPROP) THEN WRITE(6, *) ' "',JCOL,'" is not a valid ID' GO TO 605 ENDIF ICOL(NCOL) = JCOL + 1 WRITE(6, *) ' Do you want another property (Y/N)?' INFILE = ' ' READ(5, FMT='(A)') INFILE C Uppercase the response using a toolkit utility routine CALL TKUPPR(INFILE)
After the user has chosen the properties to be tabulated, they are written to the file hcurve.out.
8 Examples 159
Figure 8.2 Example 2 Program Dialog
Enter the summary filename: MANU.SUM The following blocks contain Hcurve results:
Block ID Model
FEED-MIX HEATER
HP-SEP FLASH2
Please select a block from the list: FEED-MIX FEED-MIX contains the following Hcurves:
ID Type Hcurve No.
1 HCURVE 1
2 HCURVE 2
Select an Hcurve by specifying its ID. TEMPERATURE (F) PRESSURE
(PSI) VAPOR FRACTION
DUTY (BTU/HR)
103.76 330.00 0.73446 0.00000E+00
156.99 330.00 0.75237 0.52969E+06
198.86 330.00 0.78232 0.10594E+07
231.90 330.00 0.82372 0.15891E+07
258.28 330.00 0.87527 0.21188E+07
279.65 330.00 0.93567 0.26485E+07
296.36 330.00 1.0000 0.31507E+07
300.00 330.00 1.0000 0.31782E+07
Specify the independent variable � either TEMP, PRES, VFRAC, or DUTY. TEMP Select properties from the following list: ID Property Phase Component
1 KMX VAPOR
2 KMX LIQUID
3 MUMX VAPOR
4 MUMX LIQUID
Enter the ID number of the property. 1 Do you want another property (Y/N)? Y Enter the ID number of the property. 3
8 Examples 160
Do you want another property (Y/N)? N Do you want to generate another table (Y/N)? N
Figure 8.3 Sample Output File hcurve.out Temperature (F)
KMX Vapor (BTU-FT/HR-SQFT-R)
MUMX Vapor (CP)
103.76 0.72312E-01 0.10226E-01
156.99 0.71705E-01 0.11065E-01
198.86 0.67680E-01 0.11734E-01
231.28 0.62145E-01 0.12190E-01
258.28 0.56470E-01 0.12467E-01
279.65 0.51312E-01 0.12626E-01
296.36 0.47088E-01 0.12712E-01
300.00 0.47323E-01 0.12763E-01
8 Examples 161
Example 3: Column Profile Results Written to Plot File This example demonstrates retrieving column profile results and writing the results to a plot file. The program prompts the user for the property to be retrieved, along with labels for the axes.
Opening Files and Initializing Toolkit The first step is to identify the file names. The properties and units files are in the TOOLKIT subdirectory of the Aspen Plus supplemental directory on Windows systems. The environment variable ASPTOP points to this top level directory. The environment variable XSUM is used in this example to pass the name of the summary file into the program. Both environment variables are decoded using the subroutine GETENV.
The following example uses subroutine TKOPEN to open the summary file. You must use TKOPEN if the summary file toolkit DLL is called. The plot file is not written by the summary file toolkit DLL, and therefore does not use TKOPEN.
C Open the plot file as HYDRAUL.PLF. C OPEN(UNIT=7,FILE='HYDRAUL.PLF', STATUS='UNKNOWN') C C Set file names and unit set. C CALL GETENV('ASPTOP',ASPTOP) DO 55 I = 255, 1, -1 IF (ASPTOP(I:I) .NE. ' ') THEN ILEN = I GO TO 56 ENDIF 55 CONTINUE 56 CONTINUE RCPROP = ASPTOP(1:ILEN) // '\TOOLKIT\RCPROPNU.DAT' RCUNIT = ASPTOP(1:ILEN) // '\TOOLKIT\RCUNITS.DAT' UNISET = 'ENG' C C Read the summary file name from the environment variable XSUM. C CALL GETENV ('XSUM', SUMFIL) C Open the summary file with TKOPEN. ACCESS = 'SEQUENTIAL' FORM = 'FORMATTED' MODE = 'READ' STATUS = 'OLD' CALL TKOPEN(1, SUMFIL, ACCESS, FORM, 80, STATUS, MODE, IERR)
8 Examples 162
C C Call TKINI2 to initialize the toolkit. C XMISS = 1D35 CALL TKINI2(UNISET,2,1,3,RCPROP,4,RCUNIT,XMISS,IERR, 6)
Finding List of Blocks One option for listing the blocks is calling TKBIDS to return the list of block IDs and block types. The block types array can be checked for the correct type before prompting the user for the block ID.
C Call TKINFO to get the number of blocks, and TKBIDS to C get the list. Allow the user to choose from RADFRAC blocks. C CALL TKINFO(VERSN , RUNID , DATE , INFILE, ISTAT , IWORK , + NBLK , NSTRM , NTABLE, NSENS ) CALL TKBIDS(NBLK, BLKID, BLKTYP, IERR) 100 CONTINUE WRITE(6, *) 'Select a block from the following list:' WRITE(6, *) '---------------------------------------' DO 110 I = 1, NBLK IF (BLKTYP(I) .NE. 'RADFRAC') GO TO 110 WRITE(6, *) BLKID(I) 110 CONTINUE
8 Examples 163
Finding List of Properties This program allows the user to choose from the available properties for those to plot. TKPROF determines the dimensions of the data, including the number of properties. TKPROP lists the properties and identifies them as component- or non-component-dependent.
C C Call TKPROF and TKPROP to get a list of properties. C CALL TKPROF(ID,ICOL,NSTAGE,NCP,NPROP) CALL TKPROP(ID,ICOL,NPROP,ITYPES,PNAMES,IERR) C C Prompt the user for the desired property to plot. C 120 CONTINUE WRITE(6,*) 'Choose from the following properties:' WRITE(6,*) '-------------------------------------' WRITE(6,*) ' ' ITER = ((NPROP-1/5)) DO 130 I = 0,ITER WRITE(6,*) (PNAMES(5*I+J),J=1,5) 130 CONTINUE WRITE(6,*) ' ' WRITE(6,*) 'ENTER THE ABBREVIATED NAME OF THE PROPERTY' READ(5,10) PNAME C Uppercase the response using a toolkit utility routine CALL TKUPPR (PNAME) INDEX = 0 DO 150 I = 1,NPROP IF (PNAMES(I) .EQ. PNAME) THEN INDEX=I GO TO 151 ENDIF 150 CONTINUE IF (INDEX .EQ. 0) THEN WRITE (6,*) 'PROPERTY NAME NOT FOUND. PLEASE ENTER AGAIN.' WRITE (6,*) GO TO 120 ENDIF 151 CONTINUE
8 Examples 164
Retrieving Selected Property Profile Once the property has been selected, the data must be retrieved. The value of ITYPES for the property determines whether TKPRO1 is called for non-component- dependent properties, or TKPRO2 for component-dependent properties.
C C Call either TKPRO1 or TKPRO2 to retrieve the results. C IF (ITYPES(INDEX) .EQ. 1) THEN CALL TKPRO1(ID,PNAME,ICOL,NSTAGE,RVALS,TYPE + ,LABEL,IERR) C ELSE CALL TKPRO2(ID,PNAME,ICOL,NCP,COMPID,NSTAGE,RVALS, + TYPE,LABEL,IERR) C ENDIF
After the values are retrieved, they can be written to the plot file. A sample plot file is shown in Figure 8.5.
8 Examples 165
Closing the Application The following two steps should be used when using the DLL version of the summary file toolkit:
1 Call TKCLOS to close the files opened by the summary file toolkit.
2 Call TKCLFL to close the summary file.
Because the plot file was not opened with TKOPEN, close it with the Fortran CLOSE statement directly:
C Shut down the toolkit. CALL TKCLOS (1, 2, 3, 4) C Close summary file. CALL TKCLFL (2, IERR) C Close the plot file CLOSE (7) C STOP END
Figure 8.4 Example 3 Program Dialog
Select a block from the following list: COLUMN Please select a block from the list: COLUMN Choose from the following properties: B_TEMP B_PRES DUTY LIQ_FLOW VAP_FLOW FEED_LFLOW FEED_VFLOW FEED_FLOW PROD_LFLOW PROD_VFLOW LIQ_ENTH VAP_ENTH HYD_LMF HYD_VMF HYD_LVF HYD_VVF HYD_RHOL HYD_RHOV HYD_MUL HYD_MUV HYD_STEN HYD_PARM HYD_QR HYD_MWL HYD_MWV HYD_FMIDX HYD_FFR X Y B_K Enter the name of the property HYD-RHOL Enter the title LIQUID DENSITY VS STAGE Enter the label for x-axis STAGE Enter the label for y-axis LIQUID DENSITY Enter the first legend: DENSITY Do you want to choose another property (Y/N) N
8 Examples 166
Figure 8.5 Sample Plot File ///// ///// ///// BLOCK: COLUMN SENTENCE:PLOT NDEP NPTS LTITLE LHLABEL LVLABEL LEG1 LEG2 LEG3 LEG4 LEG5 1 15 12 10 10 10 0 0 0 0 LIQUID DENSITY VS STAGE STAGE LIQUID DENSITY DENSITY
1 45.872 2 36.130 3 34.708 4 34.474 5 34.434 6 34.427 7 34.425 8 34.007 9 32.150 10 32.000 11 31.987 12 31.986 13 31.986 14 31.986 15 31.986
8 Examples 167
Example 4: Distillation Column Diagram Generation This example uses the summary file toolkit to retrieve basic information about a distillation model. The information retrieved includes feed and product flows, reflux and boilup ratios, condenser and reboiler duties, and stage information. These results are used to create an annotated diagram of the column.
Initializing the Toolkit The first step is getting the file names for toolkit initialization. In this example, the paths to the properties and units files are fixed. The summary file name is read from the file toolkit.dat.
C C Get filenames for the toolkit - rcpropnu.dat and rcunits.dat C RCPROP = 'C:\Aspen Plus\Engine\Toolkit\RCPROPNU.DAT' RCUNIT = 'C:\Aspen Plus\Engine\Toolkit\RCUNITS.DAT' C C Open the summary file and call TKINIT to initialize C the toolkit. If there is an error, end execution. C OPEN(UNIT=2, FILE='TOOLKIT.DAT',STATUS='UNKNOWN') READ(2,FMT='(A)') SUMFIL CLOSE(2) OPEN(UNIT=2, FILE=SUMFIL, STATUS='OLD') UNISET = 'ENG' CALL TKINIT(UNISET, 1, 2, 3, RCPROP, 4, RCUNIT, RMISS, IERR) IF (IERR .NE. 0) GO TO 9999
8 Examples 168
Retrieving Basic Block Results After the user has selected a block, the basic results must be retrieved. This is a two-step process:
1 Call TKNRES to determine the dimensions of the data.
2 Call TKBRES to retrieve the results.
Four results are selected from the list of values returned by TKBRES: Q1, QN, RR, and BU_RATIO.
C C Get the basic scalar results for the column, to provide C values for Q1, QN, RR, and BR. C 140 CONTINUE CALL TKNRES(ID, NRES, NQUAL, IERR) IF (NRES .EQ. 0 .OR. IERR .NE. 0) THEN WRITE(6, *) ' *** Error occurred in block' GO TO 9999 ENDIF IF (NQUAL .EQ. 0) NQUAL = 1 CALL TKBRES(ID, NRES, NQUAL, PNAMES, QUALS, ITYPES, INTS, + CW8, TVALS, TYPES, LABELS) C C Search the results array for the values wanted. C DO 150 I = 1, NRES IF (PNAMES(I) .EQ. 'RR') I1=I IF (PNAMES(I) .EQ. 'BU_RATIO') I2=I IF (PNAMES(I) .EQ. 'COND_DUTY') I3=I IF (PNAMES(I) .EQ. 'REB_DUTY') I4=I IF (PNAMES(I) .EQ. 'TOP_LFLOW') I5=I IF (PNAMES(I) .EQ. 'BOT_LFLOW') I6=I 150 CONTINUE RR = TVALS(I1,1) BR = TVALS(I2,1) Q1 = TVALS(I3,1) QN = TVALS(I4,1) TVFLOW = TVALS(I5,1) BLFLOW = TVALS(I6,1)
8 Examples 169
Retrieving Inlet and Outlet Stream Flows To find the inlet and outlet stream flows, profile results are retrieved for the feed and product properties. TKPROF finds the dimensions of the data, and TKPROP lists the properties. TKPRO1 is called to retrieve the values.
C C Call TKPROF to get the dimensions, and TKPRO1 to C get the values. C CALL TKPROF(ID, 1, NSTAGE, NCP, NPROP) CALL TKPROP(ID,1,NPROP,ITYPES,PNAMES,IERR) PNAME = 'PROD_VFLOW' CALL TKPRO1(ID, PNAME, 1, NSTAGE, RVALS, TYPES, + LABELS, IERR) PNAME='PROD_LFLOW' CALL TKPRO1(ID,PNAME,1,NSTAGE,RLALS,TYPES,LABELS,IERR) II = 0 DO 133 I = 1,NSTAGE IF (RVALS(I) .NE. 0.0) THEN II = II + 1 ISP(II) = I ENDIF IF (RLALS(I) .NE. 0.0) THEN II = II + 1 ISP(II) = I ENDIF 133 CONTINUE PNAMES(1) = 'FEED_LFLOW' CALL TKPRO1(ID, PNAMES, 1, NSTAGE, TVALS(1,6), TYPES, + LABELS, IERR) PNAMES(1) = 'FEED_VFLOW' CALL TKPRO1(ID, PNAMES, 1, NSTAGE, TVALS(1,7), TYPES, + LABELS, IERR)
8 Examples 170
Finding Inlet and Outlet Stream IDs The connectivity routines are called to list the inlet and outlet streams. TKSTRM is called for each stream to determine the flow rate. The flow rate is matched against the feed or product flow to determine the stage for each stream. The feed stream check follows:
C C Call the connectivity routines. C CALL TKCNTN(ID, NIN, NOUT, IERR) CALL TKCNCT(ID, NIN, NOUT, BLKIN, TYPIN, BLKOUT, TYPOUT, IERR) C C Feed and products are matched with stage numbers, C by matching flowrates with the streams. C C Loop through the inlet streams and get the moleflows. C DO 200 I = 1, NIN INTS(I) = 0 IF (TYPIN(I) .NE. 'MATERIAL') GO TO 200 CALL TKSINF(BLKIN(I), SOURCE, DEST, NSUBS, LEN, IERR) CALL TKSTRM(BLKIN(I), LEN, QUALS, TVALS(1,8), TYPES, + LABELS, IERR) DO 160 J = 1, LEN IJ = 4*J � 3 IF (QUALS(IJ) .EQ. 'MOLEFLMX') THEN FLOW = TVALS(J,8) FX = TVALS(J,8) L5 = LABELS(J) ENDIF 160 CONTINUE DO 170 J = 1, NSTAGE IF (J .EQ. 1) TFLOW = TVALS(J,6) IF (J .GT. 1) TFLOW = TVALS(J,6) + TVALS(J-1,7) FDIFF = DABS(TFLOW - FLOW) / FLOW IF (FDIFF .GT. 1D-5) GO TO 170 INTS(I) = J NPOS = J 170 CONTINUE 200 CONTINUE
With the values retrieved, and the stages matched to the feeds and products, the diagram can be written. Sample output is shown in Figure 8.5.
8 Examples 171
Figure 8.6 Sample Column Diagram +-------+ ! ! COND-DUTY= -112659.17200 BTU/HR +-----------+ ! ! +---+---+ +----+----+ ! ! -------+ T-PROD= 3.89 LBMOL/HR !------- ! ! -------! !------- ! BOILUP RATIO= 1.55 ! -------! REFLUX RATIO= 1.20 !------- ! ! -------! ->+------- ! FEED = 103.74 LBMOL/HR ! -------! !------- ! ! -------! !------- ! !------- +<-----+ +----+----+ ! REB-DUTY= 1415130.30000 BTU/HR ! +---+----+ +-------+ +-------- B-PROD= 99.85 LBMOL/HR ! ! +--------+
A Units 172
A Units
Table A.1 lists the most frequently used units of measurement conversion options available in Aspen Plus. A complete, up-to-date list of all units is contained in the file units.lis in the toolkit source directory. See Chapter 1 for the directory name on all operation systems. The entries in the table show the units labels used to identify units of measurement. Most of the units labels in this table are self-explanatory. Labels that may require explanation are: Units Description
MM Used as a prefix meaning million before many units, such as MMBTU = million BTU.
M Used as a prefix meaning thousand with English units, such as Mlb (thousand pounds) and Mscf (thousand standard cubic feet). With metric/SI units, the M prefix represents Mega except with millimeters and millinewtons.
SQ Used as a prefix meaning squared, as in SQFT (square feet).
CU Used as a prefix meaning cubed, as in CUM (cubic meters). The common abbreviation CC is used for cubic centimeters.
G Used as a suffix on pressure units such as ATMG, BARG, PSIG, KG/SQCMG, and IN-WATER-G. The G indicates gauge pressure (pressure above standard atmospheric pressure).
VAC Used as a suffix on pressure units such as IN-WATER-VAC, indicating vacuum pressure (pressure below standard atmospheric pressure). Vacuum units are thus exactly negative of the corresponding gauge pressure units.
IN-WATER, IN-WATER-60F
These units represent pressure in inches of water. IN-WATER is based on the density of water of 1 g/cc. IN-WATER-60F is based on the density of water at 60 F.
MMKCAL Million kcal (same as GCAL)
MN MilliNewtons
MLB Thousand lbs
NCM Normal cubic meters (same as standard cubic meters).
NCMH Normal cubic meters per hour
NCMD Normal cubic meters per day
PCU Pound centrigrade unit
PSIA Absolute pounds per square inch. PSI is a synonym for PSIA.
SCF Standard cubic feet. Standard conditions for all standard cubic feet are ideal gas at 14.696 psi and 60 degrees F.
SCFH Standard cubic feet per hour
SCFD Standard cubic feet per day
SCM Standard cubic meters. Standard conditions for all standard cubic meters are ideal gas at 1 atm and 0 degrees C.
SCMH Standard cubic meters per hour
TONNE Metric ton (1000 kg)
A Units 173
Table A.1 - Units Options Type of Units Code SI Set ENG Set MET Set Other Units Options
ANGLE 32 RAD DEG DEG
AREA 1 SQM SQFT SQM SQCM, SQIN, SQMILE, SQMM
AREA-PRICE 54 $/SQM $/SQFT $/SQM $/SQCM, $/SQIN, $/SQMILE, $/SQMM
AREA-USAGE 62 SQM/SEC SQFT/HR SQM/HR SQM/DAY, SQM/YEAR
BOND-WORK-IN 34 J/KG KWHR/TON KWHR/TON KJ/KG
CHROM-VEL 69 M/SEC FT/SEC CM/HR
COMPOSITION 2 MOL-FR MOL-FR MOL-FR MASS-FR
CONTENTS 85 FRACTION PERCENT FRACTION PPM
COST-RATE 119 $/SEC $/HR $/HR $/MIN, $/DAY, $/YEAR, K$/HR, K$/DAY, K$/YEAR, MM$/DAY, MM$/YEAR
CURRENT 114 AMP AMP AMP MAMP
DELTA-T 31 K F K C, R, DELTA-K, DELTA-F, DELTA-C, DELTA-R
DENSITY 3 KG/CUM LB/CUFT GM/CC LB/GAL, GM/CUM, GM/ML, LB/BBL
DIFFUSIVITY 4 SQM/SEC SQFT/HR SQCM/SEC CS
DIMENSIONLES 44 UNITLESS UNITLESS UNITLESS UNTLESS, UNITLES
DIPOLEMOMENT 45 (J*CUM)**.5 (BTU*CUFT)**.5 DEBYE (KJ*CUM)**.5
ELEC-POWER 47 WATT KW KW
ELEC-PRICE 48 $/J $/KWHR $/KWHR
ENERGY 5 J BTU CAL KCAL, KWHR, FT-LBF, GJ, KJ, N-M, MJ, MCAL, GCAL, MBTU, MMBTU, HP-HR
ENERGY-PRICE 30 $/J $/BTU $/CAL $/KCAL, $/KWHR, $/FT-LBF, $/GCAL, $/MMBTU, $/HP-HR, $/MBTU, $/KJ, $/MJ, $/GJ, $/N-M, $/MCAL
ENERGY-VOL 117 CUM/J BBL/BTU CUM/J BBL/MMBTU
ENTHALPY 6 J/KMOL BTU/LBMOL CAL/MOL J/KG, BTU/LB, CAL/GM, MBTU/LBMOL
ENTHALPY-CYC 105 WATT/CYCLE BTU/CYCLE CAL/CYCLE J/CYCLE, GJ/CYCLE, KCAL/CYCLE, MMKCAL/CYCLE, MMBTU/CYCLE, MMKCAL/CYCLE, MMBTU/CYCLE, PCU/CYCLE, MMPCU/CYCLE, KJ/CYCLE, KW/CYCLE, GCAL/CYCLE
ENTHALPY-FLO 13 WATT BTU/HR CAL/SEC J/SEC, GJ/HR, KCAL/HR, MMKCAL/HR, MMBTU/HR, MMKCAL/DAY, MMBTU/DAY, PCU/HR, MMPCU/HR, KJ/SEC, KW, MW, GW, MJ/HR, GCAL/HR, MBTU/HR, GCAL/DAY
A Units 174
Type of Units Code SI Set ENG Set MET Set Other Units Options
ENTHALPY-OPR 109 WATT/CYCLE BTU/OP-HR CAL/OP-SEC J/OP-SEC, GJ/OP-HR, KCAL/OP-HR, MMKCAL/OP-HR, MMBTU/OP-HR, MMKCAL/OP-DAY, MMBTU/OP-DAY, PCU/OP-HR, MMPCU/OP-HR, KJ/OP-SEC, KW/CYCLE, GCAL/OP-HR, GCAL/OP-DAY
ENTROPY 7 J/KMOL-K BTU/LBMOL-R CAL/MOL-K J/KG-K, BTU/LB-R, CAL/GM-K, MJ/KMOL-K, KCAL/KMOL-K, GCAL/KMOL-K, MBTU/LBMOL-R
F-FACTOR 101 (KG-CUM)**.5/SEC (LB-CUFT)**.5/HR (GM-L)**.5/MIN (LB-GAL)**.5/MIN
FILTER-RESIS 35 1/METER 1/FT 1/METER 1/CM, 1/IN
FISCAL 8 $ $ $
FLOW 9 KG/SEC LB/HR KG/HR LB/SEC, MLB/HR, TONS/DAY, MCFH, TONNE/HR, LB/DAY, KG/DAY, TONS/HR, KG/MIN, KG/YEAR, GM/MIN, GM/HR, GM/DAY, MGM/HR, GGM/HR, MGM/DAY, GGM/DAY, LB/MIN, MMLB/HR, MLB/DAY, MMLB/DAY, LB/YEAR, MLB/YEAR, MMLB/YEAR, TONS/MIN, MTONS/YEAR, MMTONS/YEAR, L-TONS/MIN, L-TONS/HR, L-TONS/DAY, ML-TONS/YEAR, MML-TONS/YEAR, KTONNE/YEAR
FLUX 61 CUM/SQM-SEC CUFT/SQFT-SEC L/SQM-SEC L/SQM-HR, GAL/SQFT-MIN
FLUX-HEAT-AR 120 WATT/SQM BTU/HR-SQFT CAL/SEC-SQM J/SEC-SQM, MMBTU/HR-SQFT, KW/SQM
FLUX-MOLE 121 KMOL/SQM-S LBMOL/SQFT-HR KMOL/SQM-HR LBMOL/SQFT-S, MOL/SQCM-S
FORCE 14 NEWTON LBF DYNE
FREQUENCY 28 HZ RPM RPM RAD/SEC, RPS, KRPM, MMRPM, RPH
HEAD 33 J/KG FT-LBF/LB M-KGF/KG SQM/SQSEC, INCH, FT, METER, KJ/KG, KM-KGF/KG, MFT, MJ/KG, MFT-LBF/LB, FT-HEAD, METER-HEAD, INCH-HEAD
HEAT 53 J BTU CAL KCAL, MMKCAL, MMBTU, PCU, MMPCU, KJ, GJ, N-M, MJ, MCAL, GCAL, MBTU, KW-HR
HEAT-FLUX 80 WATT/M BTU/HR-FT CAL/SEC-M J/SEC-M, MMBTU/HR-FT
HEAT-RATE-V 122 WATT/CUM BTU/HR-CUFT CAL/SEC-CUM J/SEC-CUM, MMBTU/HR-CUFT, GJ/HR-CUM
HEAT-TRANS-C 16 WATT/SQM-K BTU/HR-SQFT-R CAL/SEC-SQCM-K KCAL/SEC-SQM-K, KCAL/HR-SQM-K, PCU/HR-SQFT-K, KW/SQM-K, J/SEC-SQM-K, KJ/SEC-SQM-K, MMBTU/HR-SQFT-R, KJ/SEC-SQM-C, MJ/SEC-SQM-K, MJ/SEC-SQM-C, GJ/HR-SQM-K, GJ/HR-SQM-C, KCAL/HR-SQM-C, BTU/HR-SQFT-F
A Units 175
Type of Units Code SI Set ENG Set MET Set Other Units Options
INVERSE-AREA 78 1/SQM 1/SQFT 1/SQM
INVERSE-HT-C 87 SQM-K/WATT HR-SQFT-R/BTU SEC-SQCM-K/CAL SEC-SQM-K/KCAL, HR-SQM-K/KCAL, HR-SQFT-K/PCU, SQM-K/KW, SEC-SQM-K/J, SEC-SQM-K/KJ
INVERSE-LENG 68 1/M 1/FT 1/CM 1/IN, 1/MM
INVERSE-PRES 82 SQM/N 1/PSI 1/ATM SQFT/LBF, 1/BAR, 1/TORR, 1/IN-WATER, SQCM/KG, 1/MMHG, 1/KPA, 1/MM-WATER
INVERSE-TEMP 81 1/K 1/R 1/K
INVERSE-TIME 59 1/SEC 1/HR 1/HR 1/MIN, 1/DAY, 1/YEAR
ITEM-PRICE 56 $/ITEM $/ITEM $/ITEM
LENGTH 17 METER FT METER CM, IN, MU, MM, MILE, KM, ANGSTROM, MFT
LN-INV-TIME 60 LN(1/SEC) LN(1/HR) LN(1/HR) LN(1/MIN)
MASS 18 KG LB KG GM, TON, MLB, TONNE, L-TON, MMLB
MASS-CONC 58 KG/CUM LB/CUFT GM/L GM/CC, MG/L, MG/CC
MASS-CYCL 102 KG/CYCLE LB/CYCLE KG/CYCLE LB/CYCLE, MLB/CYCLE, TONS/CYCLE, GM/CYCLE, TONNE/CYCLE, LB/CYCLE, KG/CYCLE, TONS/CYCLE, TONS/CYCLE
MASS-DENSITY 38 KG/CUM LB/CUFT GM/CC LB/GAL, GM/CUM, GM/ML
MASS-ENTHALP 40 J/KG BTU/LB CAL/GM KCAL/KG, MMKCAL/KG, MMBTU/LB, PCU/LB, MMPCU/LB, KJ/KG, MJ/KG, GCAL/KG, MBTU/LB
MASS-ENTROPY 42 J/KG-K BTU/LB-R CAL/GM-K KCAL/KG-K, KJ/KG-K, MJ/KG-K, GCAL/KG-K, MBTU/LB-R
MASS-FLOW 10 KG/SEC LB/HR KG/HR LB/SEC, MLB/HR, TONS/DAY, GM/SEC, TONNE/HR, LB/DAY, KG/DAY, TONS/YEAR, TONS/HR, TONNE/DAY, TONNE/YEAR, KG/MIN, KG/YEAR, GM/MIN, GM/HR, GM/DAY, MGM/HR, GGM/HR, MGM/DAY, GGM/DAY, LB/MIN, MMLB/HR, MLB/DAY, MMLB/DAY, LB/YEAR, MLB/YEAR, MMLB/YEAR, TONS/MIN, MTONS/YEAR, MMTONS/YEAR, L-TONS/MIN, L-TONS/HR, L-TONS/DAY, ML-TONS/YEAR, MML-TONS/YEAR, KTONNE/YEAR
MASS-FLUX 70 KG/SQM-S LB/SQFT-HR KG/SQM-HR LB/SQFT-S, GM/SQCM-S, KG/SQCM-S, MLB/SQFT-HR, TONS/SQFT-HR, L-TONS/SQFT-HR, TONNE/SQFT-HR
MASS-HEAT-CA 49 J/KG-K BTU/LB-R CAL/GM-K KCAL/GM-K, PCU/LB-K, KJ/KG-K
A Units 176
Type of Units Code SI Set ENG Set MET Set Other Units Options
MASS-OPER 106 KG/OP-SEC LB/OP-HR KG/OP-HR LB/OP-SEC, MLB/OP-HR, TONS/OP-DAY, GM/OP-SEC, TONNE/OP-HR, LB/OP-DAY, KG/OP-DAY, TONS/OP-YEAR, TONS/OP-HR
MASS-PER-LEN 116 KG/M LB/FT KG/M
MASS-TRANS-C 66 KG/S-SQM-KG/CUM LB/HR-SQF-LB/CUF GM/S-SQCM-GM/CC
MASS-VOLUME 115 CUM/KG CUFT/LB CC/G BPD/MLBPH, CC/KG
MOL-FLOW-LEN 89 KMOL/SEC-M LBMOL/HR-FT KMOL/HR-M MOL/SEC-M, LBMOL/SEC-FT, LBMOL/DAY-FT, KMOL/DAY-M, MOL/MIN-M
MOLE-CONC 64 KMOL/CUM LBMOL/CUFT MOL/CC MOL/L, MMOL/CC, MMOL/L
MOLE-CYCL 103 KMOL/CYCLE LBMOL/CYCLE KMOL/CYCLE MMSCFH/CYCLE, MMSCMH/CYCLE, MOL/CYCLE, LBMOL/CYCLE, SCMH/CYCLE, LBMOL/CYCLE, KMOL/CYCLE, MMSCFD/CYCLE, SCFM/CYCLE
MOLE-DENSITY 37 KMOL/CUM LBMOL/CUFT MOL/CC LBMOL/GAL, MOL/L
MOLE-ENTHALP 39 J/KMOL BTU/LBMOL CAL/MOL KCAL/MOL, TCAL/MOL, MMKCAL/MOL, MMBTU/LBMOL, PCU/LBMOL, MMPCU/LBMOL, KJ/KMOL, GJ/KMOL, MJ/KMOL, KCAL/KMOL, GCAL/KMOL, MBTU/LBMOL, BTU/SCF, GCAL/MOL
MOLE-ENTROPY 41 J/KMOL-K BTU/LBMOL-R CAL/MOL-K KCAL/MOL-K, KJ/KMOL-K, TCAL/MOL-K, MJ/KMOL-K, KCAL/KMOL-K, GCAL/KMOL-K, MBTU/LBMOL-R
MOLE-FLOW 11 KMOL/SEC LBMOL/HR KMOL/HR MMSCFH, MMSCMH, MOL/SEC, LBMOL/SEC, SCMH, LBMOL/DAY, KMOL/DAY, MMSCFD, MSCFD, SCFM, MOL/MIN, KMOL/KHR, KMOL/MHR, MOL/HR, MMOL/HR, MLBMOL/HR, LBMOL/MHR, LBMOL/MMHR, MSCFM, SCFH, MSCFH, SCFD, NCMH, NCMD
MOLE-HEAT-CA 15 J/KMOL-K BTU/LBMOL-R CAL/MOL-K KCAL/MOL-K, TCAL/MOL-K, PCU/LBMOL-K, KJ/KMOL-K
MOLE-OPER 107 KMOL/OP-SEC LBMOL/OP-HR KMOL/OP-HR MMSCF/CYCLE-HR, MMSCM/CYCLE-HR, MOL/OP-SEC, LBMOL/OP-SEC, SCM/CYCLE-HR, LBMOL/OP-DAY, KMOL/OP-DAY, MMSCF/CYCLE-DAY, SCF/CYCLE-MIN
MOLE-RXN-RATE 123 KMOL/CUM-S LBMOL/CUFT-HR KMOL/CUM-HR MOL/CC-S
MOLE-VOLUME 43 CUM/KMOL CUFT/LBMOL CC/MOL ML/MOL, BBL/MSCF
MOLES 51 KMOL LBMOL KMOL SCM, MMSCF, MSCF, MMSCM, MOL, SCF
MOM-INERTIA 112 KG-SQM LB-SQFT KG-SQM GM-SQCM, LB-SQIN
A Units 177
Type of Units Code SI Set ENG Set MET Set Other Units Options
NUM-CON-RATE 77 NO/CUM-SEC NO/CUFT-SEC NO/L-SEC NO/CC-SEC, NO/CUM-SEC, NO/CUM-MIN, NO/CUFT-MIN, NO/L-MIN, NO/CC-MIN, NO/CUM-HR, NO/CUFT-HR, NO/L-HR, NO/CC-HR
NUM-CONC 57 NO/CUM NO/CUFT NO/L NO/CC, 1E6/CC
PACK-FACTOR 76 1/M 1/FT 1/M
PDROP 75 N/SQM PSI ATM LBF/SQFT, BAR, TORR, IN-WATER, KG/SQCM, MMHG, KPA, MM-WATER, MBAR, IN-WATER-60F, IN-HG, LB/FT-SQSEC, KG/M-SQSEC, PA, MPA, PSIA
PDROP-PER-HT 74 N/CUM IN-WATER/FT MM-WATER/M MBAR/M, MMHG/FT
POP-DENSITY 86 NO/M/CUM NO/FT/CUFT NO/M/L NO/MM/L, NO/MU/CC, NO/IN/CUIN
POWER 19 WATT HP KW BTU/HR, CAL/SEC, FT-LBF/SEC, MW, GW, MJ/HR, KCAL/HR, GCAL/HR, MMBTU/HR, MBTU/HR, MHP
POWER-VOLUME 65 WATT/CUM HP/CUFT KW/L KW/CUM
PRESSURE 20 N/SQM PSI ATM LBF/SQFT, BAR, TORR, IN-WATER, KG/SQCM, MMHG, KPA, MM-WATER, MBAR, PSIG, ATMG, BARG, KG/SQCMG, LB/FT-SQSEC, KG/M-SQSEC, PA, MPA, PAG, KPAG, MPAG, MBARG, IN-HG, MMHG-VAC, IN-HG-VAC, IN-WATER-60F, IN-WATER-VAC, IN-WATER-60F-VAC, IN-WATER-G, IN-WATER-60F-G, MM-WATER-G, MM-WATER-60F-G, PSIA
RHO-VSQRD 110 KG/M-SQSEC LB/FT-SQSEC KG/M-SQSEC
SIEMENS-M 118 SIEMENS/M SIEMENS/FT SIEMENS/M SIEMENS/CM
SOLUPARAM 46 (J/CUM)**.5 (BTU/CUFT)**.5 (CAL/CC)**.5 (KCAL/CUM)**.5, (KJ/CUM)**.5, (CAL/ML)**0.5
SOLUTE-PERM 72 SQM/M-S SQFT/FT-HR SQM/M-HR SQCM/CM-S, SQFT/FT-S
SOLVENT-PERM 71 KG/SQM-S-PA LB/SQFT-HR-ATM KG/SQM-HR-ATM GM/SQCM-S-ATM, GM/SQCM-S-PA
SOUND-LEVEL 111 DECIBELS DECIBELS DECIBELS
SPEC-FLT-RES 36 METER/KG FT/LB METER/KG CM/GM
SPECIFICAREA 67 SQM/CUM SQFT/CUFT SQCM/CC
SURFACE-TENS 21 N/M DYNE/CM DYNE/CM LBF/FT, MN/M
TEMP-VOLUME 83 CUM-K/KMOL CUFT-R/LBMOL CC-K/MOL
TEMPERATURE 22 K F K C, R
THERMAL-COND 23 WATT/M-K BTU-FT/HR-SQFT-R KCAL-M/HR-SQM-K
BTU-IN/HR-SQFT-R, C-CM/SEC-SQCM-K, CAL-CM/SEC-SQCM-K, BTU/HR-FT-R, KCAL/HR-M-K, J/SEC-M-K, KW/M-K
TIME 24 SEC HR HR DAY, MIN, YEAR, MONTH, WEEK, NSEC
A Units 178
Type of Units Code SI Set ENG Set MET Set Other Units Options
UA 50 J/SEC-K BTU/HR-R CAL/SEC-K KJ/SEC-K, KCAL/SEC-K, KCAL/HR-K
UNIT-PRICE 29 $/KG $/LB $/KG $/TON, $/MLB, $/GM, $/L-TON, $/TONNE, $/MMLB
USR-DUMMY0 90
USR-DUMMY1 91
USR-DUMMY2 92
USR-DUMMY3 93
USR-DUMMY4 94
USR-DUMMY5 95
USR-DUMMY6 96
USR-DUMMY7 97
USR-DUMMY8 98
USR-DUMMY9 99
VELOCITY 25 M/SEC FT/SEC M/SEC MILE/HR, KM/HR, FT/MIN, MM/DAY, MM/HR, MM/DAY30, IN/DAY
VFLOW-LENGTH 84 SQM/SEC GPM/FT SQCM/SEC SQM/HR, SQFT/MIN
VFLOW-RPM 100 CUM/SEC/RPM CUFT/HR/RPM L/MIN/RPM GAL/MIN/RPM, GAL/HR/RPM, BBL/DAY/RPM, CUM/HR/RPM, CUFT/MIN/RPM, BBL/HR/RPM, CUFT/SEC/RPM, CUM/DAY/RPM, CUM/YEAR/RPM, L/HR/RPM, KBBL/DAY/RPM, MMCUFT/HR/RPM, MMCUFT/DAY/RPM, MCUFT/DAY/RPM, L/SEC/RPM, L/DAY/RPM, CUM/MIN/RPM
VISCOSITY 26 N-SEC/SQM CP CP LB/FT-HR, MN-SEC/SQM, P, GM/SEC-CM, DYN-SEC/SQCM, PA-SEC
VOL-ENTHALPY 88 J/CUM BTU/CUFT CAL/CC KCAL/CUM, KJ/CUM, MMBTU/BBL
VOL-HEAT-CAP 79 J/CUM-K BTU/CUFT-R CAL/CC-K KCAL/CUM-K, KJ/CUM-K
VOLTAGE 113 VOLT VOLT VOLT KVOLT
VOLUME 27 CUM CUFT L CUIN, GAL, BBL, CC, KCUM, MCUM, MCUFT, MMCUFT, ML, KL, MML, MGAL, MMGAL, UKGAL, MUKGAL, MMUKGAL, MBBL, MMBBL, KBBL, CUYD
VOLUME-CYCL 104 CUM/CYCLE CUFT/CYCLE L/CYCLE GAL/CYCLE, GAL/CYCLE, BBL/CYCLE, CUM/CYCLE, CUFT/CYCLE, BBL/CYCLE, CUFT/CYCLE, CUM/CYCLE, CUM/CYCLE, L/CYCLE, KBBL/CYCLE, MMCUFT/CYCLE
A Units 179
Type of Units Code SI Set ENG Set MET Set Other Units Options
VOLUME-FLOW 12 CUM/SEC CUFT/HR L/MIN GAL/MIN, GAL/HR, BBL/DAY, CUM/HR, CUFT/MIN, BBL/HR, CUFT/SEC, CUM/DAY, CUM/YEAR, L/HR, KBBL/DAY, MMCUFT/HR, MMCUFT/DAY, MCUFT/DAY, L/SEC, L/DAY, CUM/MIN, KCUM/SEC, KCUM/HR, KCUM/DAY, MCUM/SEC, MCUM/HR, MCUM/DAY, ACFM, CUFT/DAY, MCUFT/MIN, MCUFT/HR, MMCUFT/HR, MGAL/MIN, MMGAL/MIN, MGAL/HR, MMGAL/HR, MBBL/HR, MMBBL/HR, MBBL/DAY, MMBBL/DAY
VOLUME-OPER 108 CUM/OP-SEC CUFT/OP-HR L/OP-MIN GAL/OP-MIN, GAL/OP-HR, BBL/OP-DAY, CUM/OP-HR, CUFT/OP-MIN, BBL/OP-HR, CUFT/OP-SEC, CUM/OP-DAY, CUM/OP-YEAR, L/OP-HR, KBBL/OP-DAY, MMCUFT/OP-HR
VOLUME-PRICE 55 $/CUM $/CUFT $/L $/CC, $/BBL, $/CUYD, $/KL, $/CUIN, $/ML, $/MML, $/GAL, $/MGAL, $/MMGAL, $/UKGAL, $/MUKGAL, $/MMUKGAL, $/KBBL, $/MCUFT, $/MMCUFT, $/KCUM, $/MCUM, $/MBBL, $/MMBBL
VOLUME-USAGE 63 CUM/SEC CUFT/HR L/HR L/DAY, L/YEAR, CUM/HR, CUM/DAY, CUM/YEAR
WATER-RATE 73 KG/J LB/HP-HR KG/KW-HR
WORK 52 J HP-HR KW-HR FT-LBF, KJ, N-M, MJ, MBTU, MMBTU, MCAL, GCAL
B Property Names 180
B Property Names
This chapter lists the property names that are returned in the PNAME or QUALS arguments of the toolkit routines. It also lists the property names that you can specify where PNAME and QUALS are input arguments.
B Property Names 181
Table B.1 - Standard Property Names Property Name Description
ABVSRG Percentage above surge for a compressor
ACT_AREA Active area/panel for trays
ACT_DPINLET Actual pressure drop reached in inlet pipe
ACT_DPTAIL Actual pressure drop reached in tail pipe
ACT_REFLUX Actual reflux ratio
ACT_STAGES Actual number of stages
ALLW_DPINLET Maximum pressure drop allowed in inlet pipe
ALLW_DPTAIL Maximum pressure drop allowed in tail pipe
ALLW_PRES Maximum pressure allowed in vessel
ALLW_TEMP Maximum temperature allowed in vessel
ANGLE Angle of pipe segment
AREA_CALC Calculated area
AREA_RATIO Ratio of outside finned area to inside tube area
AVGDP_HT Average pressure drop/height
BACKUP_LOC Downcomer location (side/center)
BAFFLE_CUT Baffle cut as a fraction of shell diameter
BAFFLE_TYPE Baffle type (segmental or rod)
BELSWL Percentage below stonewall for a compressor
BOTTHICK Bottom shell thickness
BOTTOM_TEMP Bottoms temperature
BOT_L1FLOW Bottom stage liquid1 flow
BOT_L2FLOW Bottom stage liquid2 flow
BOT_LFLOW Bottom stage liquid flow
BOT_VFLOW Bottom stage vapor flow
BR Boilup ratio
BRAKE_POWER Brake power
BU_RATIO Boilup ratio
BWG Birmingham wire gauge for the tubes
BYPASS Bypass fraction
B_K Block vapor-liquid K-value
B_MASSFLOW Mass flow
B_MASSFRAC Mass fraction
B_MOLEFLOW Mole flow
B_MOLEFRAC Mole fraction
B_PRES Block pressure
B_TEMP Block temperature
B_VFRAC Block vapor fraction
CALC Variable calculated value
CAPAC_FAC Capacity factor
CAV_INDX Valve cavitation index
continued
B Property Names 182
Property Name Description
CEFF Calculated efficiency
CHOK_STAT Valve choked flow status
CHOKE_POUT Valve outlet pressure for choked flow
CODE_COMPLY Code compliance
COLDIN Cold side inlet stream ID
COLDINP Cold side inlet pressure
COLDINT Cold side inlet temperature
COLDINVF Cold side inlet vapor fraction
COLDOUT Cold side outlet stream ID
COLD_FRAC Cold side vapor fraction
COLD_KODE Cold side flash calculation code
COLD_LRATIO Cold side liquid1/total liquid ratio
COLD_PRES Cold side pressure
COLD_TEMP Cold side temperature
COMP-ATTR Component attribute value
COMP-STAGES Compressor stage
COMPFRAC Component fraction
COMPRESS Compressibility
COMPTYPE Compressor type
COND_DUTY Condenser duty
COND_Q_NSC Condenser duty without subcooling
COND_RES_TIM Residence time of condensed phases (RCSTR)
COND_VOL Volume occupied by the condensed phases (RCSTR)
COOL-PRES Coolant pressure
COOL-TEMP Coolant temperature
COOLANT_TEMP Coolant temperature
COR_PDRP_FAC Pressure drop ratio factor with pipe fittings
COR_PREC_FAC Pressure recovery factor with pipe fittings
COSTID Unit label for user2 sizing result
CPCV_FAC Ratio of specific heats factor
CRIT_PRS_FAC Liquid critical pressure ratio factor
CSCOST Carbon steel cost for the equipment
CSD-PHASE Conventional solid destination phase
CUM_DPACC Cumulative accelerational pressure drop
CUM_DPELEV Cumulative elevational pressure drop
CUM_DPFRIC Cumulative frictional pressure drop
CUM_DPTOTL Cumulative total pressure drop
CYCLE_TIME Cycle time
C_LIQ_FLOW Component liquid mole flow in stream
C_VAP_FLOW Component vapor mole flow in stream
DCAREA Downcomer area/column area ratio
DCBACKUP Downcomer backup
DCBSPACE Backing/tray spacing
DCRATIO Velocity/design velocity ratio
DCVELOC Downcomer velocity
continued
B Property Names 183
Property Name Description
DELT Temperature change
DENSITY Liquid density
DEVICE_TYPE Safety relief device type
DIAM Diameter
DIAM50 50% diameter size
DIAM-RATIO Diameter ratio
DIAM_CYL Cylinder diameter
DIAM_OUT Diameter of outlet
DIAM_SOL Solid diameter
DIS Displacement
DISTIL_TEMP Distillate temperature
DIST_VS_FEED Distillate-to-feed ratio
DPACC Accelerational pressure drop for the segment
DPELEV Elevational pressure drop for the segment
DPFRIC Frictional pressure drop for the segment
DPTOTL Total pressure drop for the segment
DP_SECTION Section pressure drop
DUTY Calculated duty
EFF Efficiency
EFFICIENCY Fin efficiency
ELEC_POWER Electrical power
ENTH_BAL Enthalpy balance difference
ENTH_CYCLE Enthalpy per cycle
ENTH_TIME Enthalpy flow during operation
EPC Polytropic efficiency
EQUIV-LEN Pipe equivalent length
ERO_VEL Erosion velocity at the node
ERR Error
ERR_TOL Error/tolerance
EV Volumetric efficiency
EXHTS Extra height of the vessel
EXP_FAC Expansion factor
EXTENT Reaction extent
F Feed mole fraction
FACTOR Geometric or packing factor
FEED-QUALITY Feed quality
FEED_FLOW Feed flow
FEED_LFLOW Liquid feed flow
FEED_LOCATN Feed stage location
FEED_TRAY_T Feed tray temperature
FEED_VFLOW Vapor feed flow
FHEIGHT Fin height
FILT_DIAM Filter diameter
FILT_RESIST Filter resistance
FINDEX Fractionation index
continued
B Property Names 184
Property Name Description
FIN_PRES Final pressure
FIN_TEMP Final temperature
FIRE-FACTOR Credit factor calculated for the Fire scenario
FLOOD Percentage flooding
FLOOD_FAC Flooding factor
FLOOD_PANEL Panel indicating the flooding regime
FLOW_COEF Valve flow coefficient
FLOW-COF Compressor flow coefficient
FLOWP Flow parameter
FLUID_POWER Fluid power
FTHICKNESS Fin thickness
FWDECANT Free-water decant rate
FWREFLUX Free-water reflux ratio
GAS-VEL Vapor superficial velocity at the node
GAS_FLOW Gas flow rate
HCRATIO Heat capacity ratio
HEAD Head
HEAD-COF Compressor head coefficient
HEAT_FLUX Heat flux
HEAT_RATE Total heat transfer rate
HEAT_REAC Heat of reaction
HEIGHT Height
HETP Stage height equivalent of a theoretical plate
HOLDUP Total liquid holdup
HOTIN Hot side inlet stream ID
HOTINP Hot side inlet pressure
HOTINT Hot side inlet temperature
HOTINVF Hot side inlet vapor fraction
HOTOUT Hot side outlet stream ID
HOT_KODE Hot side flash calculation code
HOT_LRATIO Hot side liquid1/total liquid ratio
HOT_PRES Hot side pressure
HOT_TEMP Hot side temperature
HOT_VFRAC Hot side vapor fraction
HT_FROM_TOP Height from top of section
HX_AREAC Calculated (required) area
HX_AREAP Actual (physical) area
HX_DELT Delta-T between hot and cold streams
HX_DTLM Log-mean temperature difference
HX_DUTY Calculated heat duty
HX_FMTD Log-mean temperature difference correction factor
HX_NTUC Number of transfer units
HX_OVERD Percent over design
HX_PTNO Point number within a zone
HX_SBDP Shell stream baffled flow area pressure drop
continued
B Property Names 185
Property Name Description
HX_SFLM Shellside film coefficient
HX_SMCR Shell stream crossflow Reynolds number
HX_SMCV Shell stream crossflow velocity
HX_SMWR Shell stream window Reynolds number
HX_SMWV Shell stream window velocity
HX_SNDP Shell stream nozzle pressure drop
HX_SPR Shell stream Prandtl number
HX_STDP Shell stream total pressure drop
HX_STMP Shell stream temperature
HX_TBDP Tube stream tube pressure drop
HX_TFLM Tubeside film coefficient
HX_TMR Tube stream Reynolds number
HX_TMV Tube stream velocity
HX_TNDP Tube stream nozzle pressure drop
HX_TPR Tube stream Prandtl number
HX_TTDP Tube stream total pressure drop
HX_TTMP Tube stream temperature
HX_UAVC Average heat transfer coefficient for clean service
HX_UAVD Average heat transfer coefficient for dirty service
HX_WTMP Wall temperature
HX_XIC Thermal effectiveness
HX_ZNNO Exchanger zone number
HYD_FFR Reduced F factor
HYD_FMIDX Marangoni foaming index
HYD_LMF Hydraulic liquid mass flow
HYD_LVF Hydraulic liquid volume flow
HYD_MUL Hydraulic liquid viscosity
HYD_MUV Hydraulic vapor viscosity
HYD_MWV Vapor molecular weight
HYD_PARM Hydraulic flow parameter
HYD_QR Hydraulic reduced vapor throughput
HYD_RHOL Hydraulic liquid density
HYD_RHOV Hydraulic vapor density
HYD_STEN Hydraulic surface tension
HYD_VMF Hydraulic vapor mass flow
HYD_VVF Hydraulic vapor volume flow
H_GAS Vapor phase enthalpy
H_LIQ Liquid phase enthalpy
H_MIX Mixture enthalpy
IN-MACH Compressor inlet Mach number
IND_POWER Indicated horsepower
INIT_PRES Initial pressure in vessel
INIT_TEMP Initial temperature in vessel
INLET_D80 Inlet 80% diameter size
INSIDE_DIAM Tube inside diameter
continued
B Property Names 186
Property Name Description
IN_BFL_SP Inlet baffle spacing for segmental baffles
IN_EROVEL Erosional velocity at inlet
IN_LVFRAC Liquid volume fraction at inlet
IN_NODE Inlet node name
IN_PRES Inlet pressure
IN_REGIME Flow regime at inlet
IN_REYNO Reynolds Number at inlet
IN_TEMP Inlet temperature
IN_VELOC Velocity at inlet
IN_VF Inlet vapor fraction
IN_VVFRAC Vapor volume fraction at inlet
INT_TEMP Interface temperature
INT_X Interface liquid mole fractions
INT_Y Interface vapor mole fractions
ITYPE Type of pump
K Equilibrium constant
K1 Vapor-liquid1 K-value
K2 Vapor-liquid2 K-value
KLL Liquid1-liquid2 K-value
KODE Flash calculation code
L1_ENTH Liquid1 enthalpy
L1_FLOW Liquid1 flow
L1_MW Liquid1 molecular weight
L2_ENTH Liquid2 enthalpy
L2_FLOW Liquid2 flow
L2_MW Liquid2 molecular weight
LENGTH Length
LEN_CONE Cone length
LEN_CYL Length of cylinder
LEN_OUT Length of outlet
LEN_VORTEX Length of vortex
LIQ_ENTH Liquid enthalpy
LIQ_FLOW Liquid flow
LIQ_FRAC Liquid volume fraction at the node
LIQ_MF_TOT Sum of liquid mole fractions in stream
LIQ_RATIO Liquid1/total liquid ratio
LIQ_VEL Liquid superficial velocity at the node
LIQ_VOL Volume occupied by liquid phase (RCSTR)
LIQ1_VOL Volume occupied by liquid1 phase (RCSTR)
L_CONDUC Liquid conduction transfer rate
LL_RATIO Liquid/liquid ratio
LMTD Log-mean temperature difference
MASSFLWS Solid mass flow rate
MASSFRC_CAKE Mass fraction of cake
MASS_ABS Absolute mass balance
continued
B Property Names 187
Property Name Description
MASS_CYCLE Mass per cycle
MASS_RATE Mass transfer rate
MASS_REL Relative mass balance
MASS_TIME Mass flow during operation
MATERIAL Tube material of construction
MATFAC Material of construction factor for equipment
MATFAC1 Material of construction factor for the trays
MAXBACKUP Stage with maximum downcomer backup
MAXFLOOD Stage with maximum flooding
MAXSTAGE Stage with maximum diameter
MAXVELOC Stage with max velocity
MAX_MASSFLOW Maximum mass-based vent flow rate reached
MAX_MOLEFLOW Maximum mole-based vent flow rate reached
MAX_PRES Maximum pressure reached in vessel
MAX_TEMP Maximum temperature reached in vessel
MAX_VENTFLOW Maximum mass-based vent flow rate reached
MAX_VOLFLOW Maximum volume-based vent flow rate reached
MF_LIQ Component liquid mole fraction in stream
MF_VAP Component vapor mole fraction in stream
MID_BFL_SP Center baffle spacing for segmental baffles
MIN_REFLUX Minimum reflux ratio
MIN_STAGES Minimum number of equilibrium stages
MODE Filter mode
MOISTURE Moisture content
MOLE_ABS Absolute mole balance
MOLE_CYCLE Moles per cycle
MOLE_REL Relative mole balance
MOLE_TIME Moleflow during operation
MW Molecular weight
MW_LIQ Liquid phase molecular weight
NBAGS Number of bags
NCELLS Number of cells
NCLEAN Number of cells being cleaned
NODENAME Node name
NOMINAL-SIZE Standard tube outside diameter
NPER_LENGTH Number of fins per unit length
NPHASE Number of phases
NPSH-AVAIL Net positive suction head available
NSBAFFLE Number of baffles in the shell
NSEAL_STRIP Number of sealing strip pairs
NTRAIN Number of trains
NTURNS Number of turns
NUMBER Number of cyclones
OIL_FLOW Oil flow rate
OIL_VISC Oil viscosity
continued
B Property Names 188
Property Name Description
OPER_TIME Operating time
ORIENTATION Exchanger physical orientation
OUTLET_D80 Outlet 80% diameter size
OUTSIDE_DIAM Tube outside diameter
OUTSTREAM Outlet stream ID
OUT_BFL_SP Outlet baffle spacing for segmental baffles
OUT_EROVEL Erosional velocity at outlet
OUT_LVFRAC Liquid volume fraction at outlet
OUT_NODE Outlet node name
OUT_PRES Outlet pressure
OUT_REGIME Flow regime at outlet
OUT_REYNO Reynolds Number at outlet
OUT_TEMP Outlet temperature
OUT_VELOC Velocity at outlet
OUT_VVFRAC Vapor volume fraction at outlet
PART_DIAM Particle diameter
PATTERN Tube bank layout pattern
PCOST Purchase cost for the equipment
PDROP Stage pressure drop
PDROP_FAC Pressure drop ratio factor
PDRP Pressure drop
PHASE Phase
PHASE-FRAC Phase fraction
PIPE_FIT_FAC Pipe fittings geometry factor
PITCH Center to center distance between adjacent tubes
PLACED-STRM Stream for phase placement
POC Outlet pressure
POROSITY Porosity
POS Isentropic outlet pressure
POWER Calculated power
PPOINT Pinch point
PPSTAT Property table status
PRES-RATIO Pressure ratio
PROD_L1FLOW Liquid1 product flow
PROD_L2FLOW Liquid2 product flow
PROD_LFLOW Product flow
PROD_VFLOW Vapor product flow
PRREC_FAC Pressure recovery factor
PVOLS Volume per tank
PWGHT Weight of each section of the Tray-Tower
P_OUT Valve outlet pressure
QCALC Calculated duty
QNET Calculated net heat duty
QZONE Duty for zone
Q-FIRE Heat input calculated for the Fire scenario
continued
B Property Names 189
Property Name Description
RADIUS Radius
REAC_LRATE Rates of generation in liquid phase
REAC_VRATE Rates of generation in vapor phase
REB_DUTY Reboiler duty
RECT_STAGES Number of rectification stages
REGIME Flow regime at the node
REL_VOL Relative volatility
RES_TIME Residence time
REYNO Reynolds Number
RHOS Solid density
RHO_GAS Vapor phase density
RHO_LIQ Liquid phase density
RING_INDIAM Baffle ring inside diameter
RING_OUTDIAM Baffle ring outside diameter
ROD_BFL_SP Baffle spacing for rod baffles
ROD_DIAM Support rod diameter
ROD_LENGTH Total length of support rods per rod baffle
ROOT_DIAM Root mean diameter of finned tube
RR Reflux ratio
RUN_TYPE Run type
RXN_GEN Reaction generation
S-SONICV Suction sonic velocity of a compressor
SADD Stream added to outlet
SALT_VOL Volume occupied by the salts (RCSTR)
SAUTER_DIAM Sauter diameter
SCDUTY Subcooled duty
SCENARIO Scenario
SCTEMP Subcooled temperature
SECTION Section ID
SELECT Selectivity
SETPOINT Set point
SH-SPEED Compressor shaft speed
SHELL_BFL_SP Clearance between the shell and the baffles
SHELL_BND_SP Clearance between shell and tube bundle
SHELL_DIAM Shell inside diameter
SHELL_MIXED Is the shell stream unmixed/mixed?
SIDE Heat exchanger side
SIDE_AREA Side downcomer area/panel
SIDE_DRAW Side draw flow rate
SNOZ_INDIAM Shell inlet nozzle diameter
SNOZ_OUTDIAM Shell outlet nozzle diameter
SOL_FLOW Solid flow
SONVEL Sonic velocity
SP-DIAM Specific diameter of a compressor wheel
SP-SPEED Specific shaft speed of a compressor
continued
B Property Names 190
Property Name Description
SPACE Floor space required
SPAREA Packing surface area
SPCHNG Phase change
SPC_MASSFLOW Specified mass-based vent flow rate
SPC_MOLEFLOW Specified mole-based vent flow rate
SPC_VOLFLOW Specified volume-based vent flow rate
SPEC Variable specified value
SPEED Speed
STAGE_NO Stage number
START_STG Number of first stage in section
STATUS Choke status of pressure relief system
STDVFLOW Standard volume flow
STDVFRAC Standard volume fraction
STDVOL_CYCLE Standard volume per cycle
STDVOL_TIME Standard volume flow during operation
STEAM-FLOW Steam flow rate
STEN Surface tension
STICH1 1st Stichlmair constant
STICH2 2nd Stichlmair constant
STICH3 3rd Stichlmair constant
STOP-CRIT Stop criterion
STOP-TIME Stop time
STOP_STG Number of last stage in section
STREAMFRAC Stream fraction
STRENGTH Strength
SUBS-ATTR Substream attribute value
SURFTEN Surface tension
S_LINEAR Linear s-plot value
S_LOG Logarithmic s-plot value
TAMBIENT Ambient temperature at the node
TB Boiling point temperature
TEMA_TYPE Standard TEMA shell type
THGHT Total height of the equipment
THICKNESS Thickness
TH_BETA Thermosyphon liquid1/total liquid ratio
TH_DUTY Thermosyphon duty
TH_MOLEFLOW Thermosyphon mole fraction
TH_PRES Thermosyphon pressure
TH_TEMP Thermosyphon temperature
TH_VFRAC Thermosyphon vapor faction
TH_X Thermosyphon liquid mole fraction
TH_X1 Thermosyphon liquid1 mole fraction
TH_X2 Thermosyphon liquid2 mole fraction
TH_Y Thermosyphon vapor mole fraction
TIME Time
continued
B Property Names 191
Property Name Description
TIP-MACH Rotor tip Mach number for a compressor wheel
TMAX Maximum temperature
TMIN Minimum temperature
TNOZ_INDIAM Tube inlet nozzle diameter
TNOZ_OUTDIAM Tube outlet nozzle diameter
TOC Outlet temperature
TOLERANCE Tolerance
TOPTHICK Top shell thickness
TOP_L1FLOW Top stage liquid1 flow
TOP_L2FLOW Top stage liquid2 flow
TOP_LFLOW Top stage liquid flow
TOP_TEMP Top stage temperature
TOP_VFLOW Top stage vapor flow
TOS Isentropic outlet temperature
TOTAL-MASS Total mass
TOTAL_NUMBER Total number of tubes
TOT_AREA Total tray area
TOT_ENTH_ABS Absolute total enthalpy balance
TOT_ENTH_REL Relative total enthalpy balance
TOT_MASS_ABS Absolute total mass balance
TOT_MASS_REL Relative total mass balance
TOT_MOLE_ABS Absolute total mole balance
TOT_MOLE_REL Relative total mole balance
TRAY_NUMBER Actual number of trays
TRYSPS Tray spacing in the tray-tower
TTLEN Tangent to tangent length of the vessel
TUBES_IN_WIN Are there tubes in the baffle windows?
TUBE_BFL_SP Clearance between the tubes and the baffles
TUBE_FLOW Direction of tubeside flow for vertical exchangers
TUBE_LENGTH Effective tube length
TUBE_MIXED Is the tube stream unmixed/mixed?
TUBE_NPASS Number of tube passes
TUBE_TYPE Bare or finned tubes?
TWGHT Total weight of the equipment
TYPE Type of cyclone
UA Area time heat transfer coefficient
UAZONE Area time heat transfer coefficient for zone
VALVE_DP Delta-P across valve
VALVE_POSN Operating valve position (as percentage of max opening)
VAP_ENTH Vapor enthalpy
VAP_FLOW Vapor flow
VAP_MF_TOT Sum of vapor mole fractions in stream
VAP_RES_TIM Residence time of vapor phase (RCSTR)
VAP_VOL Volume occupied by vapor phase (RCSTR)
VELOCITY Velocity
continued
B Property Names 192
Property Name Description
VELOC_LOC Stage with maximum downcomer velocity
VENT_FLOW Mass-based vent flow
VFLOW Volume flow
VL_RATIO Vapor/liquid ratio
VMIX Mixture velocity at the node
VOIDFR Packing void fraction
VOLFLOW Volumetric flow
VOLTAGE Voltage
VSTD Standard liquid volume
V_CONDUC Vapor conduction transfer rate
V_CONVEC Vapor convection transfer rate
WALL-THICK Tube wall thickness
WATER-FRAC Water volume fraction in stream
WATER_FLOW Water flow rate
WEIRLEN Side weir length
WETTED_AREA Wetted vessel area
WIDTH Width
WNET Calculated net work
X Liquid mole fraction
X1 Liquid1 mole fraction
X2 Liquid2 mole fraction
Y Vapor mole fraction
Table B.2 - Mixture Thermodynamic Properties
Volume Property Name Description
RHOLSTD Standard liquid density
RHOMX Density
VLSTDMX Standard liquid volume
VMX Volume
VVSTDMX Standard vapor volume
B Property Names 193
Flow Rates, Fractions Property Name Description
BETA Molar fraction of liquid that is L1
LFRAC Liquid fraction
MASSFLMX Mass flow rate
MASSVFRAC Mass vapor fraction
MASSSFRAC Mass solid fraction
MOLEFLMX Mole flow rate
SFRAC Solid fraction
VFRAC Mole vapor fraction
VOLFLMX Volume flow rate
Enthalpy, Entropy, Gibbs Energy, Heat Capacity Property Name Description
AVAILMX Availability, H-ToS To=298.15 K
CPCVMX Heat capacity ratio (CPMX/CVMX)
CPIGMX Ideal gas heat capacity
CPMX Constant pressure heat capacity
CSATMX Specific heat at saturation
CVMX Constant volume heat capacity
DGMIX Gibbs free energy of mixing
DGMX Free energy departure
DHMX Enthalpy departure
DSMX Entropy departure
GIGMX Ideal gas free energy
GMX Free energy
GXS Excess free energy
HIGMX Ideal gas enthalpy
HMX Enthalpy
HXS Excess enthalpy
SIGMX Ideal gas entropy
SMX Entropy
B Property Names 194
Other properties Property Name Description
ABSHUMID Absolute humidity
COMB-02 Amount of oxygen need to combust a mixture
MWMX Molecular weight
PBUB Bubble point pressure
PCMX Critical pressure
PDEW Dew point pressure
PRES Pressure
PRMX Reduced pressure
RELHUMID Percentage relative humidity
SONVELMX Sonic velocity
TBUB Bubble point temperature
TCMX Critical temperature
TDEW Dew point temperature
TEMP Temperature
TRMX Reduced temperature
VCMX Critical volume
ZCMX Critical compressibility factor
ZMX Compressibility factor
B Property Names 195
Table B.3 - Thermodynamic Properties of Components in Mixtures Property Name Description
GAMMA Activity coefficient
GAMPC Activity coefficient pressure correction
GAMUS Unsymmetrically normalized activity coefficient
KLL2 Liquid-liquid K-value
KVL Vapor-liquid K-value
KVL2 Vapor-liquid2 K-value
MASSCONC Mass concentration
MASSFLOW Mass flow rate
MASSFRAC Mass fraction
MOLECONC Molar concentration
MOLEFLOW Mole flow rate
MOLEFRAC Mole fraction
PHIMX Fugacity coefficient
PPMX Partial pressure
SSOLFACT Solubility safety factor
SSOLUB Equilibrium solubility of a freeze-out component
TFREEZ Freeze-out temperature of a component
TFRZMARG Temperature safety margin
VLSTD Standard liquid volume
VLSTDFR Standard liquid volume fraction
VVSTD Standard vapor volume
VVSTDFR Standard vapor volume fraction
B Property Names 196
Table B.4 - Pure Component Thermodynamic Property Sets Property Name Description
AVAIL Availability, H-ToS To=298.15 K
CP Constant pressure heat capacity
CPCV Heat capacity ratio (CP/CV)
CPIG Ideal gas heat capacity
CV Constant volume heat capacity
DG Free energy departure
DGPC Free energy departure pressure correction
DH Enthalpy departure
DHVL Enthalpy of vaporization
DHPC Enthalpy departure pressure correction
DS Entropy departure
G Free energy
GIG Ideal gas free energy
H Enthalpy
HIG Ideal gas enthalpy
PHI Fugacity coefficient
PHIPC Fugacity coefficient pressure correction
PL Vapor pressure
RHO Density
S Entropy
SIG Ideal gas entropy
SONVEL Sonic velocity
V Volume
B Property Names 197
Table B.5 - Electrolyte Property Sets Property Name Description
FAPP Apparent component molar flow rate
FTRUE True species molar flow rates
GXTRUE Activity coefficient of a true species (mole fraction scale)
GMTRUE Activity coefficient of a true species (molality scale)
IONSM Ionic strength (molality scale)
IONSX Ionic strength (mole fraction scale)
MAPP Apparent component molality
MTRUE True species molality
OSMOT Osmotic coefficient
PH25 pH at 25°C
PH pH
POH25 pOH at 25°C
POH pOH
SOLINDEX Solubility index (ratio of activity in mixture to activity at saturation)
WAPP Apparent component mass flow rate
WTRUE True species mass flow rate
WXAPP Apparent component mass fraction
WXTRUE True species mass fraction
XAPP Apparent component mole fraction
XTRUE True species mole fraction
B Property Names 198
Table B.6 - Transport Properties
Mixture Property Name Description
KINVISC Kinematic viscosity
KMX Thermal conductivity
MUMX Viscosity
PR Prandtl Number
SIGMAMX Surface tension
THRMDIFF Thermal diffusivity
Component in a Mixture Property Name Description
DMX Diffusion coefficient
Pure Components Property Name Description
K Thermal conductivity
MU Viscosity
SIGMA Surface tension
B Property Names 199
Table B.7 - Petroleum-Related Properties for Mixtures Property Name Description
ANILPT Aniline point
API API gravity
CETANENO Cetane number
CHRATIO Carbon to hydrogen ratio
FLPT-API Flash point (API method)
MABP Mean average boiling point
PHYDRATE Hydrate formation pressure
PRPT-API Pour point (API method)
QVALGRS Gross heating value
QVALNET Net heating value
REFINDEX Refractive index
RVP-ASTM Reid vapor pressure (ASTM method)
RVP-API Reid vapor pressure (API method)
SG Specific gravity
SGAIR Specific gravity (ref.AIR at 60°F)
THYDRATE Hydrate formation temperature
VABP Volume average boiling point
VISINDEX Liquid viscosity index
WAT Watson UOP K-factor
Distillation Curves Property Name Description
APICRV API gravity curve (liquid volume basis)
APICRVWT API gravity curve (weight basis)
D86CRK ASTM D86 distillation curve with cracking correction (liquid volume basis)
D86CRV ASTM D86 curve (liquid volume basis)
D86CRVWT ASTM D86 curve (weight basis)
D86WTCRK ASTM D86 distillation curve with cracking correction (weight basis)
D1160CRV ASTM D1160 curve (liquid volume basis)
D1160CVW ASTM D1160 curve (weight basis)
D2887CRV ASTM D2887 distillation curve (weight basis)
GRVCRV Gravity curve (liquid volume basis)
GRVCRVWT Gravity curve (weight basis)
MWCRV Molecular weight curve (liquid volume basis)
MWCRVWT Molecular weight curve (weight basis)
TBPCRV True boiling point curve (liquid volume basis)
TBPCRVWT True boiling point curve (weight basis)
VACCRV Vacuum curve (liquid volume basis)
VACCRVWT Vacuum curve (weight basis)
B Property Names 200
Distillation Temperature Property Name Description
D2887T ASTM D2887 temperature, at a given liquid volume percent
D86TCK ASTM D86 temperature with cracking correction, at a given liquid volume percent
D86TWTCK ASTM D86 temperature with cracking correction, at a given weight percent
D86T ASTM D86 temperature, at a given liquid volume percent
D86TWT ASTM D86 temperature, at a given weight percent
D1160T ASTM D1160 temperature, at a given liquid volume percent
D1160TWT ASTM D1160 temperature, at a given weight percent
TBPT True boiling point temperature, at a given liquid volume percent
TBPTWT True boiling point temperature, at a given weight percent
VACT Vacuum temperature, at a given liquid volume percent
VACTWT Vacuum temperature, at a given weight percent
Distillation Volume and Weight Percent Property Name Description
D2887WT ASTM D2887 weight percent
D86LVCK ASTM D86 liquid volume percent with cracking correction
D86WTCK ASTM D86 weight percent with cracking correction
D86LV ASTM D86 liquid volume percent
D86WT ASTM D86 weight percent
D1160LV ASTM D1160 liquid volume percent
D1160WT ASTM D1160 weight percent
TBPLV True boiling point liquid volume percent
TBPWT True boiling point weight percent
VACLV Vacuum liquid volume percent
VACWT Vacuum weight percent
B Property Names 201
Bulk Petroleum Property Values from Assay Curves Property Name Description
ANILPT Aniline point
AROMATIC Aromatic content
BASIC-N2 Basic nitrogen content
CARBON Carbon content
FLASHPT Flash point
FREEZEPT Freeze point
HYDROGEN Hydrogen content
IRON Iron content
KNOCKIDX Anti knock index
KVISC Kinematic viscosity
LUMI-NO Luminometer number
MERCAPTAN Mercaptan content
METAL Metal content
MOC-NO Motor octane number
NAPHTHENE Naphthene content
NICKEL Nickel content
OLEFIN Olefin content
OXYGEN Oxygen content
PARAFFIN Paraffin content
POURPT Pour point
REFINDEX Refractive index
ROC-NO Research octane number
RVP Reid vapor pressure
SMOKEPT Smoke point
SULFUR Sulfur content
TOTAL-N2 Total nitrogen content
VANADIUM Vanadium
VISC Viscosity
VLOCKIDX Vapor lock index
WARMIDX Warm-up index
B Property Names 202
Petroleum Cuts Property Name Description
<100F Flow rates for petroleum cuts boiling below 100°F
100-200F Flow rates for petroleum cuts boiling between 100 and 200°F
200-300F Flow rates for petroleum cuts boiling between 200 and 300°F
300-400F Flow rates for petroleum cuts boiling between 300 and 400°F
400-500F Flow rates for petroleum cuts boiling between 400 and 500°F
500-600F Flow rates for petroleum cuts boiling between 500 and 600°F
600-700F Flow rates for petroleum cuts boiling between 600 and 700°F
700-800F Flow rates for petroleum cuts boiling between 700 and 800°F
800-900F Flow rates for petroleum cuts boiling between 800 and 900°F
900-999F Flow rates for petroleum cuts boiling between 900 and 1000°F
>1000F Flow rates for petroleum cuts boiling above 1000°F
50-100C Flow rates for petroleum cuts boiling between 50 and 100°C
100-150C Flow rates for petroleum cuts boiling between 100 and 150°C
150-200C Flow rates for petroleum cuts boiling between 150 and 200°C
200-250C Flow rates for petroleum cuts boiling between 200 and 250°C
250-300C Flow rates for petroleum cuts boiling between 250 and 300°C
300-350C Flow rates for petroleum cuts boiling between 300 and 350°C
350-400C Flow rates for petroleum cuts boiling between 350 and 400°C
400-450C Flow rates for petroleum cuts boiling between 400 and 450°C
450-500C Flow rates for petroleum cuts boiling between 450 and 500°C
500-550C Flow rates for petroleum cuts boiling between 500 and 550°C
>550C Flow rates for petroleum cuts boiling above 550°C
CUTS-E Flow rates for petroleum cuts in 100°F increments
CUTS-M Flow rates for petroleum cuts in 50°C increments
LT-ENDS Flow rates for light ends
B Property Names 203
Petroleum Property Curves Property Name Description
ANILCRV Aniline point curve
AROMCRV Aromatic content curve
BAS-NCRV Basic Nitrogen content curve
CARBCRV Carbon content curve
FLASHCRV Flash point curve
FREEZECRV Freeze point curve
HYDROCRV Hydrogen content curve
IRONCRV Iron content curve
KNOCKCRV Antiknock index curve
KVISCCRV Kinematic viscosity curve
LUM-NCRV Luminometer number curve
MERCCRV Mercaptan content curve
METALCRV Metal content curve
MOCNCRV Motor octane number curve
NAPHCRV Naphthene content curve
NICKCRV Nickel content curve
OLEFCRV Olefin content curve
OXYGCRV Oxygen content curve
PARACRV Paraffin content curve
POURCRV Pour point curve
REFICRV Refractive index curve
ROCNCRV Research octane number curve
RVPCRV Reid vapor pressure curve
SMOKCRV Smoke point curve
SULFCRV Sulfur content curve
TOT-NCRV Total nitrogen content curve
UOPKCRV Watson UOP K curve
VANACRV Vanadium content curve
VISCCRV Viscosity curve
VLOCKCRV Vapor knock index curve
WARMICRV Warm-up index curve
B Property Names 204
Table B.8 - Elemental Analysis of Mixtures Property Name Description
MOLEFLC Mole flow of carbon atom
MOLEFLH Mole flow of hydrogen atoms
MOLEFLN Mole flow of nitrogen atoms
MOLEFLS Mole flow of sulfur atoms
MOLEFLF Mole flow of fluorine atoms
MOLEFLCL Mole flow of chlorine atoms
MOLEFLBR Mole flow of bromine atoms
MOLEFLI Mole flow of iodine atoms
MOLEFLAR Mole flow of argon atoms
MOLEFLHE Mole flow of helium atoms
MASSFLC Mass flow of carbon atoms
MASSFLH Mass flow of hydrogen atoms
MASSFLO Mass flow of oxygen atoms
MASSFLN Mass flow of nitrogen atoms
MASSFLS Mass flow of sulfur atoms
MASSFLF Mass flow of fluorine atoms
MASSFLCL Mass flow of chlorine atoms
MASSFLBR Mass flow of bromine atoms
MASSFLI Mass flow of iodine atoms
MASSFLHE Mass flow of helium atoms
MOLEFRC Mole fraction of carbon atoms
MOLEFRH Mole fraction of hydrogen atoms
MOLEFRO Mole fraction of oxygen atoms
MOLEFRN Mole fraction of nitrogen atoms
MOLEFRS Mole fraction of sulfur atoms
MOLEFRF Mole fraction of fluorine atoms
MOLEFRCL Mole fraction of chlorine atoms
MOLEFRBR Mole fraction of bromine atoms
MOLEFRI Mole fraction of iodine atoms
MOLEFRAR Mole fraction of argon atoms
MOLEFRHE Mole fraction of helium atoms
MASSFRC Mass fraction of carbon atoms
MASSFRH Mass fraction of hydrogen atoms
MASSFRO Mass fraction of oxygen atoms
MASSFRN Mass fraction of nitrogen atoms
MASSFRS Mass fraction of sulfur atoms
MASSFRF Mass fraction of fluorine atoms
MASSFRCL Mass fraction of chlorine atoms
MASSFRBR Mass fraction of bromine atoms
MASSFRI Mass fraction of iodine atoms
MASSFRAR Mass fraction of argon atoms
MASSFRHE Mass fraction of helium atoms
B Property Names 205
Table B.9 - Nonconventional Component Properties Property Name Description
DENSITY Density
ENTHALPY Enthalpy
HEAT-CAPACITY Heat capacity
Table B.10 - Property Names for Costing Results
Equipment Type: HEATX Property Name Description
NUMBER Total number of heat exchangers
CSCOST Carbon steel cost per exchanger
PCOST Purchased cost per exchanger
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
PAREAS Heat transfer area per unit
AREA_CALC Total heat transfer area
SCDUTY Total scaled heat duty
LMTD Log mean temperature difference
FACTOR Exchanger geometry correction factor
Equipment Type: AIRCOOL Property Name Description
NUMBER Total number of air coolers
CSCOST Carbon steel cost per cooler
PCOST Purchased cost per cooler
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
PAREAS Bare tube area per cooler
AREA_CALC Total bare tube area
SCDUTY Total scaled heat duty
LMTD Log mean temperature difference
B Property Names 206
Equipment Type: FIRED-HEATER Property Name Description
NUMBER Total number of fired-heaters
CSCOST Carbon steel cost per heater
PCOST Purchased cost per heater
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
SCDUTY Scaled duty per fired-heater
DUTY Scaled total heat duty
QCALC Energy required per fired-heater
B_PRES Defaulted pressure
Equipment Type: PUMP Property Name Description
NUMBER Total number of pumps
ITYPE Pump type
CSCOST Carbon steel cost per pump
PCOST Purchased cost per pump
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
PROD_VFLOW Total scaled volumetric flow
L1_FLOW Volumetric flow per pump
B_PRES Pressure rise
HEAD Pump head
DENSITY Liquid density
EFF Pump efficiency
CEFF Motor efficiency
ELEC_POWER Power required per pump
B Property Names 207
Equipment Type: COMPR Property Name Description
NUMBER Total number of compressors
ITYPE Compressor type
CSCOST Carbon steel cost per compressor
PCOST Purchased cost per compressor
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
POWER Indicated horsepower
MATFAC Material of construction factor
LIQ_FLOW Volumetric flow per compressor
VAP_FLOW Total scaled volumetric flow
B_PRES Pressure rise
HCRATIO Heat capacity ratio
EFF Compressor efficiency
ELEC_POWER Power required per compressor
Equipment Type: BLOWER Property Name Description
NUMBER Total number of blowers
TYPE Blower class
SPEED Motor speed
CSCOST Carbon steel cost per blower
PCOST Purchased cost per blower
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
PAREAS Outlet area per blower
AREA_CALC Total outlet area
LIQ_FLOW Scaled total volumetric flow
VAP_FLOW Scaled flow per blower
VELOCITY Outlet gas velocity
B_PRES Corrected static pressure
EFF Motor efficiency
CEFF Blower efficiency
ELEC_POWER Power required per blower
B Property Names 208
Equipment Type: TRAY-TOWER Property Name Description
NUMBER Total Number of Tray-Towers
CSCOST Carbon steel cost per tower
PCOST Purchased cost per tower
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Tower material factor
MATFAC1 Tray material factor
TWGHT Total shell weight
THGHT Tower tangent-to-tangent length
THICKNESS Average shell thickness
Equipment Type: TRAY-TOWER Section Results Property Name Description
PWGHT Weight
LIQ_FLOW Liquid flow
VAP_FLOW Vapor flow
FLOWP Flow parameter
DIAM Diameter
TRYSPS Tray spacing
EFF Tray efficiency
TRAY_NUMBER Number of trays
EXHTS Extra height
TTLEN Tangent-to-tangent length
Equipment Type: USER Property Name Description
NUMBER Total number of equipment
CSCOST Carbon steel cost per piece
PCOST Purchased cost per piece
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
VAR_VAL Scaled capacity
B Property Names 209
Equipment Type: V-VESSEL Property Name Description
NUMBER Total number of v-vessels
CSCOST Carbon steel cost per v-vessel
PCOST Purchased cost per v-vessel
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
VAP_FLOW Scaled vapor flow
LIQ_FLOW Scaled liquid flow
VOLUME Volume per vessel
DIAMETER Diameter
TTLEN Tangent-to-tangent length
TOPTHICK Top shell thickness
BOTTHICK Bottom shell thickness
TWGHT Total shell weight
Equipment Type: H-VESSEL Property Name Description
NUMBER Total number of h-vessels
CSCOST Carbon steel cost per h-vessel
PCOST Purchased cost per h-vessel
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
VAP_FLOW Scaled vapor flow
LIQ_FLOW Scaled liquid flow
VOLUME Volume per vessel
DIAMETER Diameter
TTLEN Tangent-to-tangent length
TOPTHICK Top shell thickness
BOTTHICK Bottom shell thickness
TWGHT Total shell weight
B Property Names 210
Equipment Type: TANK Property Name Description
NUMBER Total number of tanks
TYPE Tank type
CSCOST Carbon steel cost per tank
PCOST Purchased cost per tank
VARID Material of construction
BBCOST Total carbon steel cost
TCOST Total purchased cost
MATFAC Material of construction factor
LIQ_FLOW Scaled liquid flow
VOLUME Total volume required
PVOLS Volume per tank
General Information 211
General Information
This section provides Copyright details and lists any other documentation related to this release.
Copyright Version Number: 2004.1
April 2005 Copyright © 1981 � 2005 Aspen Technology, Inc. All rights reserved.
Aspen Accounting.21�, Aspen ACOL�, Aspen Adsim®, Aspen Advisor�, Aspen Aerotran®, Aspen Alarm & Event�, Aspen APLE�, Aspen Apollo�, Aspen AssetBuilder Optimizer�, Aspen AssetBuilder Planner�, Aspen AssetBuilder Site Optimizer�, Aspen AssetBuilder�, Aspen Batch Plus®, Aspen Batch.21�, Aspen Batch.21�CBT, Aspen BatchCAD�, Aspen BatchSep�, Aspen Blend Model Library�, Aspen Blend�, Aspen Calc� CBT, Aspen Capable-to-Promise®, Aspen CatRef®, Aspen Chromatography®, Aspen Cim-IO Interfaces�, Aspen Cim-IO Monitor�, Aspen Cim-IO� for @AGlance, Aspen Cim-IO� for ABB 1190, Aspen Cim-IO� for Bailey SemAPI, Aspen Cim-IO� for DDE, Aspen Cim-IO� for Eurotherm Gauge via CDP, Aspen Cim-IO� for Fisher-Rosemount Chip, Aspen Cim-IO� for Fisher-Rosemount RNI, Aspen Cim-IO� for Foxboro FOXAPI, Aspen Cim-IO� for G2, Aspen Cim-IO� for GE FANUC via HCT, Aspen Cim-IO� for Hitachi Ex Series, Aspen Cim-IO� for Honeywell TDC 3000 via HTL/access, Aspen Cim-IO� for Intellution Fix, Aspen Cim-IO� for Measurex MCN, Aspen Cim-IO� for Measurex ODX, Aspen Cim-IO� for Moore Apacs via Nim (RNI), Aspen Cim-IO� for PI, Aspen Cim-IO� for RSLinx, Aspen Cim-IO� for SetCim/InfoPlus-X/InfoPlus.21, Aspen Cim-IO� for Toshiba Tosdic, Aspen Cim-IO� for ULMA 3D, Aspen Cim-IO� for Westinghouse, Aspen Cim-IO� for WonderWare InTouch�, Aspen Cim-IO� for Yokogawa ACG10S, Aspen Cim-IO� for Yokogawa EW3, Aspen Collaborative Forecasting�, Aspen Compliance.21�, Aspen COMThermo TRC Database�, Aspen COMThermo®, Aspen Crude Trading & Marketing�, Aspen Custom Modeler®, Aspen Decision Analyzer�, Aspen Demand Manager�, Aspen DISTIL�, Aspen Distribution Scheduler�, Aspen DMCplus®, Aspen DMCplus® CBT, Aspen DMCplus® Composite, Aspen DPO�, Aspen Dynamics®, Aspen eBRS�, Aspen ERP Connect®, Aspen FCC®, Aspen FIHR�, Aspen FLARENET�, Aspen Fleet Operations Management�, Aspen FRAN�, Aspen Fuel Gas Optimizer�, Aspen Grade-IT�, Aspen Harwell Subroutine Library�, Aspen Hetran®, Aspen HTFS Research Network�, Aspen HX-Net Operations�, Aspen HX-Net®, Aspen Hydrocracker®, Aspen Hydrotreater�, Aspen HYSYS Amines�, Aspen HYSYS Crude�, Aspen HYSYS Data Rec�, Aspen HYSYS Dynamics�, Aspen HYSYS Johnson Matthey Reactor Models�, Aspen HYSYS OLGAS 3-Phase�, Aspen HYSYS OLGAS�, Aspen HYSYS OLI Interface�, Aspen HYSYS Optimizer�, Aspen HYSYS Tacite�, Aspen HYSYS Upstream Dynamics�, Aspen HYSYS Upstream�, Aspen HYSYS®, Aspen Icarus Process Evaluator®, Aspen Icarus Project Manager®, Aspen InfoPlus.21®, Aspen Inventory Management & Operations Scheduling�, Aspen Inventory Planner�, Aspen IQmodel Powertools�, Aspen IQ�, Aspen Kbase®, Aspen Lab.21, Aspen MBO�, Aspen MPIMS�, Aspen Multivariate Server�, Aspen MUSE�, Aspen OnLine®, Aspen Operations Manager - Event Management�, Aspen Operations Manager - Integration Infrastructure�, Aspen Operations Manager - Integration Infrastructure� Aspen Advisor, Aspen Operations Manager - Integration Infrastructure� Aspen Orion, Aspen Operations Manager - Integration Infrastructure� Aspen PIMS, Aspen Operations Manager - Integration Infrastructure� Aspen Utilities, Aspen Operations Manager - Integration Infrastructure� Base, Aspen Operations Manager - Integration Infrastructure� COM, Aspen Operations Manager - Integration Infrastructure� Files, Aspen Operations Manager - Integration Infrastructure� IP.21, Aspen Operations Manager - Integration Infrastructure� IP.21/SAP-PPPI, Aspen Operations Manager - Integration Infrastructure� OPC, Aspen Operations Manager - Integration Infrastructure� Relational Databases, Aspen Operations Manager - Integration Infrastructure� SAP R3, Aspen Operations Manager - Integration Infrastructure� System Monitoring, Aspen Operations Manager - Performance Scorecarding�, Aspen Operations Manager - Role Based Visualization� MS SharePoint, Aspen Operations Manager - Role Based Visualization� TIBCO, Aspen Operations Tracking�, Aspen Order Credit Management�, Aspen Orion Planning�, Aspen Orion XT�, Aspen PEP Process Library�, Aspen PIMS Distributed Processing�, Aspen PIMS Enterprise Edition�, Aspen PIMS Global Optimization�, Aspen PIMS Mixed Integer Programming�, Aspen PIMS Simulator Interface�, Aspen PIMS Solution Ranging�, Aspen PIMS Submodel Calculator�, Aspen PIMS XNLP Optimizer�, Aspen PIMS�, Aspen PIPE�, Aspen Plant Planner & Scheduler�, Aspen Plant Scheduler Lite�, Aspen Plant Scheduler�, Aspen Polymers Plus®, Aspen Plus OLI Interface�, Aspen Plus Optimizer�, Aspen Plus®, Aspen Plus® CBT, Aspen PPIMS�, Aspen Process Explorer� CBT, Aspen Process Manual� Applied Rheology, Aspen Process Manual� Bulk Solids Handling, Aspen Process Manual� Crystallization, Aspen Process Manual� Drying, Aspen Process Manual� Gas Cleaning, Aspen Process Manual� Internet Mode, Aspen Process Manual� Intranet Mode, Aspen Process Manual� Mini-Manuals, Aspen Process Manual� Slurry Handling, Aspen Process Manual� Solid Liquid Separation, Aspen Process Manual� Solvent Extraction, Aspen Process Manual� Waste Water Treatment, Aspen Process Order�, Aspen Process Recipe®, Aspen Process Tools�, Aspen Production Control Web Server�, Aspen ProFES® 2P Wax, Aspen ProFES® Tranflo, Aspen Profile.21�, Aspen Properties®, Aspen Pumper Log�, Aspen Q Server�, Aspen Quality Management�, Aspen RefSYS CatCracker�, Aspen RefSYS�, Aspen Report Writer�, Aspen Retail Automated Stock Replenishment�, Aspen Retail Resource Scheduling Optimization�, Aspen Richardson Rbooks�, Aspen Richardson WinRace Database�, Aspen RTO Watch�, Aspen SCM�, Aspen
General Information 212
SmartStep Advanced�, Aspen SmartStep�, Aspen Specialty Products Automated Stock Replenishment�, Aspen Specialty Products Resource Scheduling Optimization�, Aspen Split�, Aspen SULSIM®, Aspen Supply Chain Analytics�, Aspen Supply Chain Connect�, Aspen Supply Planner�, Aspen Tank Management�, Aspen TASC�, Aspen Teams®, Aspen TICP�, Aspen Transition Manager�, Aspen Utilities�, Aspen Voice Fulfillment Management�, Aspen Watch�, Aspen Water�, Aspen Web Fulfillment Management�, Aspen XPIMS�, Aspen Zyqad Development�, Aspen Zyqad�, SLM�, SLM Commute�, SLM Config Wizard�, the Aspen leaf logo, and Plantelligence are trademarks or registered trademarks of Aspen Technology, Inc., Cambridge, MA.
All other brand and product names are trademarks or registered trademarks of their respective companies.
This document is intended as a guide to using AspenTech's software. This documentation contains AspenTech proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of AspenTech or as set forth in the applicable license.
Corporate
Aspen Technology, Inc. Ten Canal Park Cambridge, MA 02141-2201 USA Phone: (1) (617) 949-1000 Toll Free: (1) (888) 996-7001 Fax: (1) (617) 949-1030 URL: http://www.aspentech.com/
Related Documentation Title Content
Aspen Plus Getting Started Building and Running a Process Model
Tutorials covering basic use of Aspen Plus. A prerequisite for the other Getting Started guides
Aspen Plus Getting Started Modeling Processes with Solids
Tutorials covering the Aspen plus features designed to handle solids
Aspen Plus Getting Started Modeling Processes with Electrolytes
Tutorials covering the Aspen plus features designed to handle electrolytes
Aspen Plus Getting Started Using Equation-Oriented Modeling
Tutorials covering the use of equation-oriented models in Aspen Plus
Aspen Plus Getting Started Customizing Unit Operation Models
Tutorials covering the development of custom unit operation models in Aspen Plus
Aspen Plus Getting Started Modeling Petroleum Processes
Tutorials covering the Aspen Plus features designed to handle petroleum
Aspen Plus User Guide Procedures for using Aspen Plus
Aspen Plus Reference Manual Series Detailed information about Aspen Plus
Aspen Plus Application Examples A suite of examples illustrating capabilities of Aspen Plus
Aspen Engineering Suite Installation Manual Instructions for installing Aspen Plus and other Aspen Engineering Suite products
Technical Support 213
Technical Support
Online Technical Support Center AspenTech customers with a valid license and software maintenance agreement can register to access the Online Technical Support Center at:
http://support.aspentech.com
You use the Online Technical Support Center to:
• Access current product documentation.
• Search for technical tips, solutions, and frequently asked questions (FAQs).
• Search for and download application examples.
• Search for and download service packs and product updates.
• Submit and track technical issues.
• Search for and review known limitations.
• Send suggestions.
Registered users can also subscribe to our Technical Support e-Bulletins. These e-Bulletins proactively alert you to important technical support information such as:
• Technical advisories.
• Product updates.
• Service Pack announcements.
• Product release announcements.
Technical Support 214
Phone and E-mail Customer support is also available by phone, fax, and e-mail for customers who have a current support contract for their product(s). Toll-free charges are listed where available; otherwise local and international rates apply.
For the most up-to-date phone listings, please see the Online Technical Support Center at:
http://support.aspentech.com Support Centers Operating Hours
North America 8:00 � 20:00 Eastern time
South America 9:00 � 17:00 Local time
Europe 8:30 � 18:00 Central European time
Asia and Pacific Region 9:00 � 17:30 Local time
Index 215
Index
TKACCT, 2-29
TKALIS, 2-33
TKBIDS, 3-37
TKBRES, 3-42
TKCIDS, 2-33
TKCLFL, 2-26
TKCLOS, 2-25
TKCNCT, 3-38
TKCNTN, 3-38
TKCNVT, 2-31
TKCOMP, 2-32
TKCPRP, 2-33
TKEIDS, 6-127
TKEQCR, 6-128
TKEQSR, 6-129
TKFLWB, 2-29
TKFRCM, 3-65
TKHCID, 3-107
TKHCPR, 3-106
TKHCUR, 3-104
TKHXBA, 3-52
TKHXD1, 3-48
TKHXD2, 3-49
TKHXNO, 3-52
TKHXPF, 3-53
TKHXPP, 3-53
TKHXPR, 3-54
TKHXSH, 3-50
TKHXTU, 3-51
TKHXZO, 3-50
TKICST, 3-60
TKINFO, 2-27
TKINI2, 2-25
TKINIT, 2-24
TKLABL, 2-32
TKLHCR, 3-103
TKLRRP, 3-90
TKLSEC, 3-73
TKMCCP, 3-47
TKMCPR, 3-46
TKNBLK, 3-37
TKNCOL, 3-55
TKNENV, 5-122
TKNEQ, 6-127
TKNEQP, 6-128
TKNEQS, 6-129
TKNEXT, 2-34
TKNHCP, 3-105
TKNHCR, 3-103
TKNHXD, 3-48
TKNHXT, 3-49
TKNICS, 3-60
TKNMCP, 3-46
TKNPER, 3-44
TKNPET, 3-62
TKNPEV, 5-124
TKNPIP, 3-100
TKNPPR, 5-120
TKNPPT, 5-119
TKNPRS, 7-132
TKNRES, 3-41
TKNRRP, 3-91
TKNSEC, 3-73
TKNSEN, 2-35
TKNSPR, 4-116
TKNSTR, 4-109
TKNTPR, 3-70
TKNWHL, 3-45
TKNXPR, 7-133
TKOPEN, 2-26
TKPAPF, 7-139
TKPAPR, 7-140
TKPAR1, 7-140
TKPAR2, 7-141
TKPERF, 3-44
TKPIDS, 7-132
TKPINP, 3-99
TKPIPR, 3-99
TKPISP, 3-98
TKPLCO, 3-94
TKPLCP, 3-94
TKPLIO, 3-93
TKPLND, 3-96
TKPLNP, 3-96
TKPLPP, 3-97
TKPLPR, 3-97
TKPLSG, 3-95
TKPLSP, 3-95
TKPLSZ, 3-93
TKPORT, 3-39
TKPPEV, 5-125
TKPPRP, 5-121
TKPRO1, 3-57
TKPRO2, 3-57
TKPROF, 3-56
TKPROP, 3-56
TKPSEC, 3-75
TKPSR1, 7-137
TKPSR2, 7-138
TKPSRF, 7-134
TKPSRP, 7-135
TKPSS1, 7-139
TKPSSP, 7-135
TKPSSR, 7-136
TKPSSS, 7-137
TKPSUB, 7-134
TKPTAD, 3-63
TKPTCN, 3-66
TKPTEV, 5-123
TKPTFR, 3-64
TKPTPP, 3-66
TKPTPR, 3-64
TKPTRS, 3-62
TKPVPF, 7-141
TKPVR1, 7-142
TKPVR2, 7-143
TKPVRP, 7-142
TKRCAT, 3-81
TKRFSP, 3-82
TKRNAC, 3-80
TKRNCA, 3-80
TKRNFS, 3-81
TKRPIP, 3-101
TKRPR1, 3-78
Index 216
TKRPR2, 3-79
TKRPRF, 3-77
TKRPRP, 3-78
TKRRHR, 3-88
TKRRNS, 3-89
TKRRPF, 3-87
TKRRPR, 3-88
TKRRRP, 3-92
TKRRSL, 3-89
TKRSCA, 3-80
TKRSUB, 3-77
TKRTNL, 3-69
TKRTNR, 3-67
TKRTRS, 3-68
TKRTSP, 3-68
TKRTSR, 3-69
TKSCAT, 4-114
TKSCPR, 3-76
TKSCRS, 3-75
TKSENS, 2-35
TKSENV, 5-122
TKSHCR, 3-104
TKSIDS, 4-109
TKSINF, 4-110
TKSNAC, 4-112
TKSNCA, 4-113
TKSNSA, 4-114
TKSPIR, 3-100
TKSPPT, 5-119
TKSPRP, 4-117
TKSRRP, 3-90
TKSSAT, 4-115
TKSSCA, 4-113
TKSSEC, 3-74
TKSSID, 4-110
TKSSSA, 4-115
TKSTRA, 4-112
TKSTRM, 4-111
TKSVAL, 4-111
TKTITL, 2-28
TKTPRP, 3-71
TKTREP, 3-70
TKTRNR, 3-58
TKTRRS, 3-59
TKUNIT, 2-30
TKVAPF, 3-83
TKVAPR, 3-83
TKVAR1, 3-84
TKVAR2, 3-84
TKVLE, 3-102
TKVTPF, 3-85
TKVTPR, 3-85
TKVTR1, 3-86
TKVTR2, 3-86
TKWHLR, 3-45
top related