You are on page 1of 208

Aspen Plus

Summary File Toolkit


Version Number: V7.1
January 2009
Copyright (c) 1981-2009 by Aspen Technology, Inc. All rights reserved.

Aspen Plus, aspenONE, the aspen leaf logo and Plantelligence and Enterprise Optimization are trademarks or
registered trademarks of Aspen Technology, Inc., Burlington, 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 agreement. Users are solely responsible for the proper use of
the software and the application of the results obtained.

Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the software
may be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NO
WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS DOCUMENTATION,
ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.

Aspen Technology, Inc.


200 Wheeler Road
Burlington, MA 01803-5501
USA
Phone: (1) (781) 221-6400
Toll Free: (1) (888) 996-7100
URL: http://www.aspentech.com
Contents
Who Should Read this Guide ...................................................................................1

Introducing Summary File Toolkit ...........................................................................2


Related Documentation ................................................................................... 2
Technical Support .......................................................................................... 3

1 Getting Started....................................................................................................4
The Summary File and Toolkit .......................................................................... 5
Initializing the Toolkit ..................................................................................... 5
Accessing the Required Files .................................................................. 6
Getting the Summary File Name....................................................................... 6
Getting Property and Units File Names .................................................... 6
Defining Units of Measurement............................................................... 7
Specifying a Value for Missing Results ..................................................... 7
Determining the Data Dimensions .................................................................... 8
Retrieving Data for an Object........................................................................... 8
Using the Toolkit With a Hierarchical Aspen Plus Run ..........................................10
Linking Toolkit Subroutines into Your Module.....................................................10
Creating a Toolkit Application for Windows........................................................10
About the Windows Version ..................................................................11
Linker Directive Commands for Windows ..........................................................11
Calling Summary File Toolkit Routines ..............................................................12
Opening and Closing Files Using the Summary File Toolkit.........................12
Using Fortran to Call Routines ...............................................................13
Changes in the Toolkit ...................................................................................13

2 General Subroutines..........................................................................................14
Initializing the Summary File Toolkit ................................................................15
Closing the Summary File Toolkit.....................................................................16
Opening and Closing Files...............................................................................17
Retrieving Run Information.............................................................................18
Standard Run Information ....................................................................18
Run Titles...........................................................................................19
Accounting Information ........................................................................20
Retrieving Flowsheet Balance Results ...............................................................20
Units Conversion ...........................................................................................21
Changing Units Sets ............................................................................21
Converting Units for Real Numbers ........................................................22
Determining Units Labels......................................................................23
Component Information Retrieval ....................................................................23
Number of Components........................................................................23

Contents iii
Component IDs...................................................................................24
Component Alias Names.......................................................................24
Component Properties..........................................................................25
Sensitivity Block Results.................................................................................25
Identifying Sensitivity Blocks ................................................................25
Determining Sensitivity Dimensions .......................................................26
Retrieving Sensitivity Results ................................................................26

3 Block Result Subroutines...................................................................................28


Block Identification........................................................................................29
Block IDs ...........................................................................................29
Next Block..........................................................................................29
Block Connectivity Information........................................................................30
Number of Inlet and Outlet Streams.......................................................30
Stream Names and Types.....................................................................30
Additional Port Information ...................................................................31
Standard Block Results ..................................................................................33
Dimensions of Standard Scalar Results ...................................................33
Standard Scalar Block Results ...............................................................34
Compressor Results.......................................................................................35
Dimensions of Performance Results........................................................35
Stage-by-Stage Performance Results .....................................................36
Dimensions of Wheel-by-Wheel Performance Results ................................37
Wheel-by-Wheel Performance Results ....................................................37
Compressor Profile Results .............................................................................38
Dimensions of MCompr Profile Results ....................................................38
MCompr Profile Results ........................................................................38
MCompr Cooler Profile Results...............................................................39
Heat Exchanger Results .................................................................................40
Number of Detailed Results...................................................................40
Detailed Results ..................................................................................40
Velocity and Pressure Results................................................................41
Heat Exchanger Results Dimensions.......................................................41
Heat Exchanger Zone Results................................................................42
Heat Exchanger Shell Results ................................................................43
Heat Exchanger Tube Results ................................................................43
Heat Exchanger Baffle Results ...............................................................44
Heat Exchanger Nozzle Results..............................................................44
Heat Exchanger Profiles .................................................................................45
Heat Exchanger Profile Size ..................................................................45
Heat Exchanger Profile Properties ..........................................................46
Heat Exchanger Profile Results ..............................................................46
Column Results.............................................................................................47
Number of Columns .............................................................................47
Column Profile Dimensions ...................................................................48
Column Profile Properties .....................................................................48
Non-Component-Dependent Column Profiles ...........................................49
Component-Dependent Column Profiles ..................................................49
RadFrac Thermosiphon Reboiler Results..................................................50
Interconnecting Stream and Pumparound Results ....................................51
Additional Data for PetroFrac Models ................................................................53
Dimensions of Additional Data...............................................................53

iv Contents
Additional Scalar Results Data...............................................................54
Additional PetroFrac Profile Properties ....................................................55
Additional Property Profiles ...................................................................55
Furnace Data for PETROFRAC................................................................56
Component-Dependent Properties for the PetroFrac Furnace......................57
Pumparound Results for PetroFrac Columns ............................................57
Connectivity Data for PetroFrac Strippers................................................58
Additional Data for RateFrac Models .......................................................59
Dimensions of Additional Scalar Data .....................................................59
Additional Scalar Results Data...............................................................59
Dimensions of Component Split Fractions................................................60
Component Split Fractions ....................................................................60
Number of Liquid Phases ......................................................................61
Tray Reports ................................................................................................61
Tray Report Dimensions .......................................................................61
Sequential Tray Report Properties..........................................................62
Specific Tray Report Properties..............................................................63
Tray/Packing Sizing and Rating .......................................................................63
Number of Columns .............................................................................64
Number of Column Sections..................................................................64
Column Section Types and Numbers ......................................................64
Size of a Column Section ......................................................................65
Scalar Results for a Column Section .......................................................66
Column Section Profile Properties ..........................................................66
Column Section Profiles........................................................................67
Reactor Results.............................................................................................68
Number of Reactor Substreams .............................................................68
Reactor Profile Dimensions ...................................................................68
Reactor Profile Properties .....................................................................69
Non-Component-Dependent Reactor Profiles ...........................................69
Component-Dependent Reactor Profiles ..................................................70
Number of Components with Component Attribute Results ........................71
Number of Attributes for a Component ...................................................71
Details of a Component Attribute ...........................................................71
Component Attribute Results ................................................................72
Number of Continuous Feed Streams .....................................................72
Continuous Feed Stream Results ...........................................................73
RBATCH Vent Accumulator Results.........................................................73
RBatch Vent Profile Results ...................................................................76
Reaction Data .....................................................................................78
Reactor Property Reports ...............................................................................81
Number of Reports for a Reactor Block ...................................................81
Size of a Reactor Property Report ..........................................................81
Sequential Reactor Report Properties .....................................................82
Specific Reactor Report Properties .........................................................83
Pipeline Results.............................................................................................83
Pipeline Results Dimensions ..................................................................84
Non-Component-Dependent Pipeline Inlet and Outlet Conditions ................84
Component-Dependent Pipeline Inlet and Outlet Property Names ...............85
Component-Dependent Pipeline Inlet and Outlet Conditions.......................86
Segment Data Property Names .............................................................86
Pipeline Segment Data .........................................................................87
Pipeline Node Property Names...............................................................87

Contents v
Pipeline Node Results...........................................................................88
Pipeline Profile Property Names .............................................................88
Pipeline Profile Results .........................................................................89
Pipe Results .................................................................................................89
Pipe Standard Profile Dimensions...........................................................90
Pipe Standard Profile Property Names ....................................................90
Pipe Standard Profile Properties.............................................................90
Pipe Property Reports ..........................................................................91
Block VLE Results..........................................................................................93
Heating/Cooling Curves..................................................................................93
Number of Heating/Cooling Curves for a Block.........................................94
Heating/Cooling Curves for a Block ........................................................94
Size of a Heating/Cooling Curve ............................................................95
Standard Heating/Cooling Curve Results .................................................96
Sequential Heating/Cooling Curve Properties ...........................................96
Specific Heating/Cooling Curve Properties ...............................................97
Interconnecting Stream IDs ..................................................................98

4 Stream Result Subroutines................................................................................99


Stream Identification .....................................................................................99
Listing Stream IDs...............................................................................99
Determining the Next Stream.............................................................. 100
Material Stream Results ............................................................................... 100
Retrieving Basic Stream Information .................................................... 100
Listing Substream IDs........................................................................ 101
Retrieving Stream Results .................................................................. 101
Retrieving a Single Stream Property..................................................... 102
Heat and Work Stream Results...................................................................... 102
Component Attribute Results ........................................................................ 103
Determining the Number of Components with Attributes ......................... 103
Determining Number of Attributes for a Component ............................... 104
Determining Component Attribute Size ................................................. 104
Retrieving Component Attribute Values ................................................ 105
Substream Attribute Results ......................................................................... 105
Determining the Number of Substream Attributes .................................. 105
Determining Substream Attribute Size.................................................. 106
Retrieving Substream Attribute Values ................................................. 106
Stream Property Set Results ......................................................................... 107
Determining Dimensions of Stream Property Values ............................... 107
Retrieving Stream Property Results...................................................... 107

5 Physical Property Table Results Subroutines...................................................109


Property Table Identification ......................................................................... 110
Property and Flashcurve Table Results ........................................................... 110
Determining Property Table Dimensions ............................................... 110
Retrieving Sequential Properties in a Table............................................ 111
Retrieving Specific Properties from a Table............................................ 111
Pressure-Temperature Envelope Results ......................................................... 112
Determining Dimensions for Properties in the Envelope........................... 112
Determining Envelope Dimensions ....................................................... 113
Retrieving Temperature and Pressure for Envelope Branch ...................... 113
Retrieving Sequential Envelope Properties............................................. 114

vi Contents
Retrieving Specific Envelope Properties................................................. 115

6 Costing Results Subroutines............................................................................116


Equipment Item Identification ....................................................................... 117
Determining Number of Equipment Items ............................................. 117
Listing Equipment Items..................................................................... 117
Determining Next Equipment Item....................................................... 117
Equipment Item Results ............................................................................... 118
Retrieving Equipment Item Costing Results ........................................... 118
Determining Equipment Item Sizing Results .......................................... 118
Retrieving Equipment Item Sizing Results ............................................. 119

7 Pressure Relief Subroutines ............................................................................120


Pressure Relief Block Identification ................................................................ 121
Determining the Number of Pressure Relief Blocks ................................. 121
Listing Pressure Relief Blocks .............................................................. 121
Determining the Next Pressure Relief Block ........................................... 122
Pressure Relief Results.................................................................................122
Determining the Number of Substreams ............................................... 123
Determining Dimensions of Pressure Relief Arrays.................................. 123
Listing Profile Properties ..................................................................... 124
Retrieving Dynamic Scalar Results ....................................................... 125
Retrieving Steady-State Scalar Results ................................................. 126
Retrieving Non-Component-Dependent Dynamic Profiles ......................... 126
Retrieving Dynamic Component-Dependent Profiles................................ 127
Retrieving Steady-State Profiles .......................................................... 128
Determining Vent Accumulator Profile Dimensions.................................. 128
Listing Vent Accumulator Profile Properties............................................ 129
Retrieving Non-Component-Dependent Vent Accumulator Profiles ............ 129
Retrieving Component-Dependent Vent Accumulator Profiles ................... 130
Determining Pressure Relief Vent Profile Dimensions .............................. 130
Listing Vent Profile Properties.............................................................. 131
Retrieving Position-Dependent Vent Profiles .......................................... 131
Retrieving Component-Dependent Vent Profiles ..................................... 132

8 Examples.........................................................................................................133
Example 1: Stream Heat and Material Balance Table Generation ........................ 133
Declaring Variables and Dimensioning .................................................. 133
Initializing the Toolkit ........................................................................ 134
Finding Number of Streams ................................................................ 135
Finding Component Molecular Weight ................................................... 135
Writing Stream Table................................................................................... 136
Example 2: Interactive Heating/Cooling Curve Table Generation ........................ 139
Declaring Variables............................................................................ 139
Initializing the Toolkit ........................................................................ 139
Finding Number of Blocks ................................................................... 139
Finding Blocks with Heating/Cooling Curves .......................................... 140
Prompting for Block Name .................................................................. 141
Finding Heating/Cooling Curves for Selected Block ................................. 141
Finding Dimensions of Heating/Cooling Curve ........................................ 142
Retrieving Standard Heating/Cooling Curve Results ................................ 142

Contents vii
Retrieving Property Sets..................................................................... 143
Example 3: Column Profile Results Written to Plot File ...................................... 146
Opening Files and Initializing Toolkit .................................................... 146
Finding List of Blocks ......................................................................... 147
Finding List of Properties .................................................................... 147
Retrieving Selected Property Profile ..................................................... 148
Closing the Application ....................................................................... 148
Example 4: Distillation Column Diagram Generation ......................................... 150
Initializing the Toolkit ........................................................................ 150
Retrieving Basic Block Results ............................................................. 150
Retrieving Inlet and Outlet Stream Flows .............................................. 151
Finding Inlet and Outlet Stream IDs ..................................................... 152

9 XML Summary File...........................................................................................154

A Units ...............................................................................................................156
Table A.1 - Units Options ............................................................................. 158

B Property Names ..............................................................................................167


Table B.1 - Standard Property Names ............................................................ 168
Table B.2 - Mixture Thermodynamic Properties ................................................ 180
Volume ............................................................................................180
Flow Rates, Fractions ......................................................................... 180
Enthalpy, Entropy, Gibbs Energy, Heat Capacity .................................... 180
Other properties................................................................................ 181
Table B.3 - Thermodynamic Properties of Components in Mixtures ..................... 182
Table B.4 - Pure Component Thermodynamic Property Sets .............................. 183
Table B.5 - Electrolyte Property Sets .............................................................. 184
Table B.6 - Transport Properties .................................................................... 185
Mixture ............................................................................................185
Component in a Mixture ..................................................................... 185
Pure Components .............................................................................. 185
Table B.7 - Petroleum-Related Properties for Mixtures ...................................... 185
Distillation Curves ............................................................................. 186
Distillation Temperature ..................................................................... 186
Distillation Volume and Weight Percent................................................. 187
Bulk Petroleum Property Values from Assay Curves ................................ 187
Petroleum Cuts ................................................................................. 188
Petroleum Property Curves ................................................................. 189
Table B.8 - Elemental Analysis of Mixtures ...................................................... 190
Table B.9 - Nonconventional Component Properties.......................................... 191
Table B.10 - Property Names for Costing Results ............................................. 191
Equipment Type: HEATX .................................................................... 191
Equipment Type: AIRCOOL ................................................................. 191
Equipment Type: FIRED-HEATER ......................................................... 192
Equipment Type: PUMP ......................................................................192
Equipment Type: COMPR.................................................................... 193
Equipment Type: BLOWER .................................................................. 193
Equipment Type: TRAY-TOWER ........................................................... 194
Equipment Type: TRAY-TOWER Section Results ..................................... 194
Equipment Type: USER ...................................................................... 194

viii Contents
Equipment Type: V-VESSEL ................................................................ 195
Equipment Type: H-VESSEL ................................................................ 195
Equipment Type: TANK ...................................................................... 196

Index ..................................................................................................................197

Contents ix
x Contents
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.

Who Should Read this Guide 1


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. See Chapter 9 for some information about
this file.

Related Documentation
Title Content

Aspen Plus Getting Started Building and Tutorials covering basic use of
Running a Process Model Aspen Plus. A prerequisite for the
other Getting Started guides
Aspen Plus Getting Started Modeling Tutorials covering the Aspen plus
Processes with Solids features designed to handle solids
Aspen Plus Getting Started Modeling Tutorials covering the Aspen plus
Processes with Electrolytes features designed to handle
electrolytes
Aspen Plus Getting Started Using Tutorials covering the use of
Equation-Oriented Modeling equation-oriented models in
Aspen Plus
Aspen Plus Getting Started Customizing Tutorials covering the
Unit Operation Models development of custom unit
operation models in Aspen Plus
Aspen Plus Getting Started Modeling Tutorials covering the Aspen Plus
Petroleum Processes features designed to handle
petroleum

2 Introducing Summary File Toolkit


Title Content

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 Instructions for installing Aspen
Manual Plus and other Aspen Engineering
Suite products

Technical Support
AspenTech customers with a valid license and software maintenance
agreement can register to access the online AspenTech Support Center at:
http://support.aspentech.com
This Web support site allows you to:
• Access current product documentation
• Search for tech 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
• Send suggestions
• Report product defects
• Review lists of known deficiencies and defects
Registered users can also subscribe to our Technical Support e-Bulletins.
These e-Bulletins are used to alert users to important technical support
information such as:
• Technical advisories
• Product updates and releases
Customer support is also available by phone, fax, and email. The most up-to-
date contact information is available at the AspenTech Support Center at
http://support.aspentech.com.

Introducing Summary File Toolkit 3


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.

4 1 Getting Started
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 Fortran source code is delivered in a self-extracting zip archive named
toolkit.exe in the Engine\Utl directory of the Aspen Physical Property System
installation (typically C:\Program Files\APrSystem
<version>\Engine\Utl\toolkit.exe).
The DLL is stored in the Engine\xeq directory of the Aspen Physical Property
System installation (typically C:\Program Files\APrSystem
<version>\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 5
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.

6 1 Getting Started
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 7
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

8 1 Getting Started
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 9
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.
To link to this library, include %asptop%\toolkit\zetoolkit.lib in the linker
directive, where %asptop% represents the Engine installation directory.

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.

10 1 Getting Started
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 <version>\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 Intel Fortran 9.1.
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.

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

1 Getting Started 11
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.
• 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
another language, you will have to modify the code to work with the Fortran
conventions adopted, but this is not recommended. Instead, export an XML
summary file and use standard XML tools to process it.

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.

12 1 Getting Started
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.

Changes in the Toolkit


AspenTech tries to avoid changing the arguments to these routines but
occasionally changes are necessary. Sometimes these changes are made to
support changes in Aspen Plus; because of this, sometimes old versions of the
toolkit will not work with newer summary files. However, the latest version of
the toolkit should always work with all older Aspen Plus summary files.
The changes likely to affect users are listed here:
In version 11.1, all of the arguments holding stream IDs and block IDs
(including sensitivity blocks and the like) became variable length, changing
from CHARACTER*8 to CHARACTER*(*) to support hierarchy. See Using the
Toolkit With a Hierarchical Aspen Plus Run on page 10 for more info.
In version 12.1, the filename argument in TKOPEN changed from
CHARACTER*80 to CHARACTER*(*) to support using the toolkit with
summary files with long file paths, although the documentation was not
updated to reflect this change until version 2006. We recommend using a
CHARACTER of length 256 to hold this filename, as there may be other
problems with a longer file path.

1 Getting Started 13
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.

14 2 General Subroutines
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

2 General Subroutines 15
Variable I/O † Type Dimension Description

IERR O INTEGER — Error flag (0=No error)


† I = Input to subroutine, O = Output from subroutine
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.

16 2 General Subroutines
Calling Sequence for TKCLOS
CALL TKCLOS (ISUMMF, IDIRAC, IPROPN, IUNITS)

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*(*) — 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

2 General Subroutines 17
Call subroutine TKCLFL to close the file with the specified Fortran unit
number.

Calling Sequence for TKCLFL


CALL TKCLFL (IUNIT, IERR)

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)

18 2 General Subroutines
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 19
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)

20 2 General Subroutines
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.

2 General Subroutines 21
Calling Sequence for TKUNIT
CALL TKUNIT (SETID, NTYPES, TYPES, LABELS, IERR)

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

22 2 General Subroutines
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)

2 General Subroutines 23
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

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

24 2 General Subroutines
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)

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

2 General Subroutines 25

Variable I/O Type Dimension Description

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

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

26 2 General Subroutines

Variable I/O Type Dimension Description

RVALS O REAL*8 NPOINT* Results for sensitivity table


NCOL
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

2 General Subroutines 27
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.

28 3 Block Result Subroutines


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 29


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)

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

30 3 Block Result Subroutines


Variable I/O † Type Dimension Description

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 31


Port Information Returned by TKPORT
Model Type Port Name Description ID1 ID2

Extract TF Top feed Stage —


BF Bottom feed number
SF Side feed
TP Top product
BP Bottom product
SP Side product
HeatX HF Hot feed — —
CF Cold feed
HP Hot product
CP Cold product
HWD Hot water decant
CWD Cold water decant
Mcompr S1F Stage1 feed Stage —
IF Stage feed number
WS Work feed
HS Heat feed
FLS Product
LK Liquid knockout
WD Water draw
WS Work out
HS Heat out
MheatX HF Hot feed Stream —
CF Cold feed number
HP Hot product
CP Cold product
HWD Hot water decant
CWD Cold water decant
MultiFrac F Feed Column Stage
HS Heat feed number number
VD Vapor distillate
LD Liquid distillate
R Residue
SP Side product
CWD Water distillate
HS Heat product
PetroFrac MF Main column feed Column Stage
SF Stripper steam feed number number
MHF Main column heat feed †
SHF Stripper heat feed
PHF Pumparound heat feed
VD Main column vapor distillate
LD Main column liquid distillate
B Main column bottoms product
SP Main column side product
CWD Main column condenser water decant
SB Stripper bottom product
PS Pseudo stream
CHS Condenser heat stream
RHS Reboiler heat stream
MHP Main column heat product
SHP Stripper heat product
PHP Pumparound heat product

32 3 Block Result Subroutines


Model Type Port Name Description ID1 ID2

RadFrac F Feed Stage —


HS Heat feed number
VD Vapor distillate
LD Liquid distillate
R Residue
SP Side product
WD Water distillate
CHS Condenser heat
RHS Reboiler heat
RateFrac F Feed Column Section
HS Heat feed number number
VD Vapor distillate
LD Liquid distillate
R Residue
SP Side product
CWD Water distillate
HS Heat product
SCFrac F Feed — —
SF Steam feed
D Distillate
B Bottoms
SP 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 33


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.

34 3 Block Result Subroutines


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 35


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* Real results
NSTAGE
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

36 3 Block Result Subroutines


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* Real results
NWHEEL
TYPES O CHARACTER*12 NPROP Units types
LABELS O CHARACTER*16 NPROP Units labels

3 Block Result Subroutines 37


Variable I/O † Type Dimension Description

IERR O INTEGER — Error flag (0=No error)


† I = Input to subroutine, O = Output from subroutine

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)

38 3 Block Result Subroutines


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* Real results
NSTAGE
TYPES O CHARACTER*12 NPROP* Units types
NSTAGE
LABELS O CHARACTER*16 NPROP* Units labels
NSTAGE
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* NCOOL Units types
LABELS O CHARACTER*16 NCPROP* NCOOL Units labels
IERR O INTEGER — Error flag (0=No error)
†I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines 39


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.
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.

40 3 Block Result Subroutines


Calling Sequence for TKHXD1
CALL TKHXD1 (BLKID, NDET1, PNAMES, RVALS, TYPES, LABELS,
IERR)

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

3 Block Result Subroutines 41


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)

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* Real results
NZONE
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

42 3 Block Result Subroutines


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)

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)

3 Block Result Subroutines 43


Variable I/O † Type Dimension Description

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

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)

44 3 Block Result Subroutines


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

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)

3 Block Result Subroutines 45


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)

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)

46 3 Block Result Subroutines


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

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 Thermosiphon 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.

3 Block Result Subroutines 47


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

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

48 3 Block Result Subroutines


Variable I/O † Type Dimension Description

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 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 49


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 Thermosiphon Reboiler Results


A RadFrac unit may optionally have a thermosiphon 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 thermosiphon 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

50 3 Block Result Subroutines


Reboiler Results
Call subroutine TKTRRS to retrieve the property names and values for the
thermosiphon 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.

3 Block Result Subroutines 51


2 Call TKICST to retrieve the results for all the interconnecting streams or
pumparounds in a model.

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)

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

52 3 Block Result Subroutines


Variable I/O † Type Dimension Description

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.

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.

3 Block Result Subroutines 53


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
profile results
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)

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

54 3 Block Result Subroutines


Variable I/O † Type Dimension Description

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

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)

3 Block Result Subroutines 55


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)

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

56 3 Block Result Subroutines


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

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

3 Block Result Subroutines 57


Variable I/O † Type Dimension Description

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)

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

58 3 Block Result Subroutines


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)

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)

3 Block Result Subroutines 59


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)

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)

60 3 Block Result Subroutines


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

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.

3 Block Result Subroutines 61


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)

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.

62 3 Block Result Subroutines


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)

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 Block Result Subroutines 63


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.
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.

64 3 Block Result Subroutines


Calling Sequence for TKLSEC
CALL TKLSEC (BLKID, ICOL, NSECT, TYPES, NUMBRS, IERR)

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 65


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)

66 3 Block Result Subroutines


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 67


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)

68 3 Block Result Subroutines


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.

3 Block Result Subroutines 69


Calling Sequence for TKRPR1
CALL TKRPR1 (BLKID, PNAME, SUBSID, NPOINT, RVALS, TYPE,
LABEL, IERR)

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

70 3 Block Result Subroutines


Number of Components with Component
Attribute Results
Call subroutine TKRNAC to retrieve the number of components that are
reported for the component attribute property.

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.

3 Block Result Subroutines 71


Calling Sequence for TKRSCA
CALL TKRSCA (BLKID, SUBSID, COMPID, IDSEQ, IDATT, NELEM)

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.

72 3 Block Result Subroutines


Calling Sequence for TKRNFS
CALL TKRNFS (BLKID, SUBSID, NFS)

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 Block Result Subroutines 73


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.

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

74 3 Block Result Subroutines


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 75


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)

Argument List Descriptions for TKVTPR


Variable I/O † Type Dimension Description

BLKID I CHARACTER*(*) — Block ID


NPROP I INTEGER — Number of properties

76 3 Block Result Subroutines


Variable I/O † Type Dimension Description

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)

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

3 Block Result Subroutines 77


Variable I/O † Type Dimension Description

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

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.

78 3 Block Result Subroutines


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

Number of Selectivity Results


Call subroutine TKRRNS to determine the number of component selectivity
specifications given for the RStoic model.

3 Block Result Subroutines 79


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

80 3 Block Result Subroutines


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.

3 Block Result Subroutines 81


Calling Sequence for TKSRRP
CALL TKSRRP (BLKID, TYPE, NPOINT, NPROP, IERR)

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

82 3 Block Result Subroutines


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 83


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.

84 3 Block Result Subroutines


Calling Sequence for TKPLIO
CALL TKPLIO (BLKID, NIORES, PNAMES, ITYPES, CVALSI, CVALSO,
RVALSI, RVALSO, TYPES, LABELS, IERR)

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

3 Block Result Subroutines 85


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)

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

86 3 Block Result Subroutines


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)

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

3 Block Result Subroutines 87


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)

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

88 3 Block Result Subroutines


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)

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.

3 Block Result Subroutines 89


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)

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)

90 3 Block Result Subroutines


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

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.

3 Block Result Subroutines 91


Calling Sequence for TKNPIP
CALL TKNPIP (BLKID, NPOINT, IPROP, PNAME, SUBSID, PHASE, COMPID,
WETDRY, BASIS, RVALS, TYPE, LABEL, IERR)

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)

92 3 Block Result Subroutines


Variable I/O † Type Dimension Description

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

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:

3 Block Result Subroutines 93


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.
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)

94 3 Block Result Subroutines


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

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

3 Block Result Subroutines 95


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)

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)

96 3 Block Result Subroutines


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)

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

3 Block Result Subroutines 97


Variable I/O † Type Dimension Description

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

98 3 Block Result Subroutines


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.

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*(*) NSTRM Stream ID
STRTYP O CHARACTER*12 NSTRM Stream type (MATERIAL, HEAT, or
WORK)

4 Stream Result Subroutines 99


Variable I/O † Type Dimension Description

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

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

100 4 Stream Result Subroutines


Variable I/O † Type Dimension Description

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.

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

4 Stream Result Subroutines 101


Variable I/O † Type Dimension Description

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 a component 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

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)

102 4 Stream Result Subroutines


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 103


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

104 4 Stream Result Subroutines


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 105


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

106 4 Stream Result Subroutines


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

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)

4 Stream Result Subroutines 107


Variable I/O † Type Dimension Description

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.

108 4 Stream Result Subroutines


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 109


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)

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

110 5 Physical Property Table Results Subroutines


Variable I/O † Type Dimension Description

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.

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)

5 Physical Property Table Results Subroutines 111


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.

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)

112 5 Physical Property Table Results Subroutines


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

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

5 Physical Property Table Results Subroutines 113


Variable I/O † Type Dimension Description

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

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

114 5 Physical Property Table Results Subroutines


Variable I/O † Type Dimension Description

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.

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.

5 Physical Property Table Results Subroutines 115


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.

116 6 Costing Results Subroutines


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

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.

6 Costing Results Subroutines 117


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)

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.

118 6 Costing Results Subroutines


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)

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.

6 Costing Results Subroutines 119


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.

120 7 Pressure Relief Subroutines


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 121


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.

122 7 Pressure Relief Subroutines


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 123


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)

124 7 Pressure Relief Subroutines


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
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*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 125


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 Dimension 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)

126 7 Pressure Relief Subroutines


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* Property values
NPOINT
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 127


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

128 7 Pressure Relief Subroutines


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 129


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

130 7 Pressure Relief Subroutines


Variable I/O † Type Dimension Description

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

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 131


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

132 7 Pressure Relief Subroutines


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.

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)

8 Examples 133
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)

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')

134 8 Examples
CALL TKINIT(UNISET, 1, 2, 3, RCPROP, 4, RCUNIT, RMISS,IERR)
IF (IERR .NE. 0) GO TO 9999

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 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 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)
IF (IERR .NE. 0) THEN
WRITE(6, *) ' ERROR ON STREAM ',ID

8 Examples 135
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 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
C if 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
C the 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)
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)

136 8 Examples
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
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 137
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

138 8 Examples
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

Finding Number of Blocks


The number of blocks is determined by calling TKINFO.
C Get the number of blocks by calling TKINFO.
CALL TKINFO(VERSN, RUNID, DATE, INFILE, ISTAT, IWORK,
+ NBLK, NSTRM, NTABLE, NSENS )

8 Examples 139
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
C calling TKNHCV.
C If the block has an Hcurve, load its ID and model type
C into 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
C to 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
C
C If there are any unwritten entries in the list, write
C the 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

140 8 Examples
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 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

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 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 141
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
C there are more than 99, or more than 100 points, print
C error.
C
IF (NPROP .GT. 99 .OR. NPOINT .GT. 100) THEN
WRITE(6, *) ' *** Error - This Hcurve is too large ***'
GO TO 700
ENDIF

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
C can select an independent variable.
C
WRITE(6, 31) (PLUS,JJ=1,3),EXCL

142 8 Examples
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

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
C properties 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 143
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 PRESSURE VAPOR DUTY
(F) (PSI) FRACTION (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

Do you want another property (Y/N)?

144 8 Examples
N

Do you want to generate another table (Y/N)?


N

Figure 8.3 Sample Output File hcurve.out


Temperature KMX Vapor MUMX Vapor
(F) (BTU-FT/HR-SQFT-R) (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 145
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
C 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)
C
C Call TKINI2 to initialize the toolkit.

146 8 Examples
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
C 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

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

8 Examples 147
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

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.

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

148 8 Examples
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

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

8 Examples 149
11 31.987
12 31.986
13 31.986
14 31.986
15 31.986

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
C 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

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.

150 8 Examples
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)

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

8 Examples 151
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)

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.

152 8 Examples
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
! !
+--------+

8 Examples 153
9 XML Summary File

The XML Summary File can be saved by selecting File | Export, and in the
Save as type box, selecting XML Results File (*.xml). This file is an XML file
that can be edited with standard XML tools and viewed with the ability to
open and close individual sections in Internet Explorer.
The XML Summary File begins with a top-level <Plant> tag. Within this tag
are a number of tags for blocks, streams, convergence blocks, flowsheeting
operations, run status, etc. Each of these tags has a dictionary attribute
which refers to an XML schema file delivered with Aspen Plus in the Aspen
Plus <version>\Engine\Dat or APrSystem <version>\Engine\Dat
folder. In the XML file, the variables $ASPTOP and $APRSYS are used to
refer to the Aspen Plus <version>\Engine and APrSystem
<version>\Engine folders, respectively. Each of these tags also has a
name, which is the actual name of the block, stream, etc. wherever such a
name is available.
There are a number of status variables with numerical values that appear in
the Run-status sections. The most important of these are explained here.

UOSSTAT2
UOSSTAT2 provides the status message that appears on the Run-Status |
Summary sheet. It has the following possible values:
Value Message

2 Simulation was completed normally


3 Simulation was not completed normally, use status button for details
4 Data regression was completed normally
5 Data regression was completed with errors, use status button for details
6 Assay data analysis was completed normally
7 Assay data analysis was completed with errors, use status button for
details
8 Calculations were completed normally
9 Calculations were completed with errors, use status button for details
10 Calculations were completed with warnings, use status button for details

154 9 XML Summary File


TOTSTAT
TOTSTAT describes the most severe status of all errors / warnings.
Value Most Severe Status

0 No error/warning
1 Error
2 Warning

ITSTAT
ITSTAT gives the input translation status.
Value Meaning

0 No problems
4 Warnings

UOSSTAT, CVSTAT, SENSSTAT, CSSTAT, SSTAT, FORSTAT


These status variables contain the same information available in ISTATF on
page 19.

9 XML Summary File 155


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:

Prefixes
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.
G The standard metric/SI prefix Giga, meaning 109
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.

Suffixes
Units Description

**.5 Suffix meaning square root of the preceding unit. Used in a few types
of units such as dipole moment.
DELTA Prefix on units used for temperature change, used for emphasizing
that a value is temperature change and not temperature. Units without
delta can also be specified for temperature change and are equivalent
to the ones with delta.
G The G at the end of ATMG, BARG, PSIG, PAG, KG/SQCMG,
IN-WATER-G and similar pressure units 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.

156 A Units
Full Unit Names
Units Description

GAL U.S. liquid gallon, exactly equal to 231 cubic inches


IN-WATER, These units represent pressure in inches of water. IN-WATER is based
IN-WATER-60F on the density of water of 1 g/cc. IN-WATER-60F is based on the
density of water at 60 F.
L-TONS Long tons (2240 pounds), the ton formerly used in the United Kingdom
and some Commonwealth countries
LB, LBF Pound (mass unit approximately 0.454 kg) and pound force (weight of
one pound at standard gravity).
MILE U.S. statute (land) mile, exactly equal to 5280 feet
MMKCAL Million kcal (same as GCAL)
MN MilliNewtons
MLB Thousand lbs
MU micron (micrometer), equal to 10-6 meter.
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
TCAL Thermodynamic calorie, equal to 4.184 Joules. The standard calorie
represented by CAL is the International Steam Table calorie equal to
4.1868 Joules.
TON Short ton (2000 pounds), the ton commonly used in the United States,
see also L-TONS.
TONNE Metric ton (1000 kg), the ton commonly used outside the United
States
UKGAL Imperial gallon, 4.55 liters

A Units 157
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

158 A Units
Type of Units Code SI Set ENG Set MET Set Other Units Options

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
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- (LB- (GM-L)**.5/MIN (LB-GAL)**.5/MIN
CUM)**.5/SEC CUFT)**.5/HR
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

A Units 159
Type of Units Code SI Set ENG Set MET Set Other Units Options

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- KCAL/SEC-SQM-K,
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
INVERSE-AREA 78 1/SQM 1/SQFT 1/SQM
INVERSE-HT-C 87 SQM-K/WATT HR-SQFT-R/BTU SEC-SQCM- SEC-SQM-K/KCAL, HR-
K/CAL 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

160 A Units
Type of Units Code SI Set ENG Set MET Set Other Units Options

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
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- LB/HR-SQF- GM/S-SQCM-
KG/CUM LB/CUF 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

A Units 161
Type of Units Code SI Set ENG Set MET Set Other Units Options

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- 123 KMOL/CUM-S LBMOL/CUFT-HR KMOL/CUM-HR MOL/CC-S
RATE
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

162 A Units
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- 65 WATT/CUM HP/CUFT KW/L KW/CUM
VOLUME
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- KG/SQM-HR- GM/SQCM-S-ATM,
ATM 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

A Units 163
Type of Units Code SI Set ENG Set MET Set Other Units Options

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- KCAL-M/HR- BTU-IN/HR-SQFT-R, C-
SQFT-R SQM-K 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
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

164 A Units
Type of Units Code SI Set ENG Set MET Set Other Units Options

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
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

A Units 165
Type of Units Code SI Set ENG Set MET Set Other Units Options

WORK 52 J HP-HR KW-HR FT-LBF, KJ, N-M, MJ,


MBTU, MMBTU, MCAL,
GCAL

166 A Units
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 167


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

168 B Property Names


Property Name Description

CALC Variable calculated value


CAPAC_FAC Capacity factor
CAV_INDX Valve cavitation index
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

B Property Names 169


Property Name Description

DCAREA Downcomer area/column area ratio


DCBACKUP Downcomer backup
DCBSPACE Backing/tray spacing
DCRATIO Velocity/design velocity ratio
DCVELOC Downcomer velocity
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

170 B Property Names


Property Name Description

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
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

B Property Names 171


Property Name Description

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
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

172 B Property Names


Property Name Description

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
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

B Property Names 173


Property Name Description

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
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

174 B Property Names


Property Name Description

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
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

B Property Names 175


Property Name Description

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
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

176 B Property Names


Property Name Description

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
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

B Property Names 177


Property Name Description

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 Thermosiphon liquid1/total liquid ratio
TH_DUTY Thermosiphon duty
TH_MOLEFLOW Thermosiphon mole fraction
TH_PRES Thermosiphon pressure
TH_TEMP Thermosiphon temperature
TH_VFRAC Thermosiphon vapor faction
TH_X Thermosiphon liquid mole fraction
TH_X1 Thermosiphon liquid1 mole fraction
TH_X2 Thermosiphon liquid2 mole fraction
TH_Y Thermosiphon vapor mole fraction
TIME Time
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

178 B Property Names


Property Name Description

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
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

B Property Names 179


Property Name Description

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

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

180 B Property Names


Property Name Description

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

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 181


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

182 B Property Names


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 183


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

184 B Property Names


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

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

B Property Names 185


Property Name Description

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)

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

186 B Property Names


Property Name Description

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

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

B Property Names 187


Property Name Description

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

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

188 B Property Names


Property Name Description

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

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 189


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

190 B Property Names


Property Name Description

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

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

B Property Names 191


Property Name Description

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

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

192 B Property Names


Property Name Description

ELEC_POWER Power required per pump

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 193


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

194 B Property Names


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 195


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

196 B Property Names


Index

AspenTech support, 3 TKLRRP, 81


AspenTech Support Center, 3 TKLSEC, 65
customer support, 3 TKMCCP, 39
e-bulletins, 3 TKMCPR, 38
help desk, 3 TKNBLK, 29
support, technical, 3 TKNCOL, 48
technical support, 3 TKNENV, 112
TKACCT, 20 TKNEQ, 117
TKALIS, 24 TKNEQP, 118
TKBIDS, 29 TKNEQS, 119
TKBRES, 34 TKNEXT, 25
TKCIDS, 24 TKNHCP, 96
TKCLFL, 18 TKNHCR, 94
TKCLOS, 17 TKNHXD, 40
TKCNCT, 30 TKNHXT, 42
TKCNTN, 30 TKNICS, 52
TKCNVT, 22 TKNMCP, 38
TKCOMP, 23 TKNPER, 36
TKCPRP, 25 TKNPET, 54
TKEIDS, 117 TKNPEV, 114
TKEQCR, 118 TKNPIP, 92
TKEQSR, 119 TKNPPR, 111
TKFLWB, 20 TKNPPT, 110
TKFRCM, 57 TKNPRS, 121
TKHCID, 98 TKNRES, 33
TKHCPR, 97 TKNRRP, 82
TKHCUR, 96 TKNSEC, 64
TKHXBA, 44 TKNSEN, 26
TKHXD1, 41 TKNSPR, 107
TKHXD2, 41 TKNSTR, 100
TKHXNO, 44 TKNTPR, 62
TKHXPF, 45 TKNWHL, 37
TKHXPP, 46 TKNXPR, 122
TKHXPR, 46 TKOPEN, 17
TKHXSH, 43 TKPAPF, 128
TKHXTU, 43 TKPAPR, 129
TKHXZO, 42 TKPAR1, 129
TKICST, 52 TKPAR2, 130
TKINFO, 18 TKPERF, 36
TKINI2, 16 TKPIDS, 121
TKINIT, 15 TKPINP, 90
TKLABL, 23 TKPIPR, 90
TKLHCR, 94 TKPISP, 90

Index 197
TKPLCO, 86 TKRRSL, 80
TKPLCP, 85 TKRSCA, 72
TKPLIO, 85 TKRSUB, 68
TKPLND, 88 TKRTNL, 61
TKPLNP, 87 TKRTNR, 59
TKPLPP, 88 TKRTRS, 59
TKPLPR, 89 TKRTSP, 60
TKPLSG, 87 TKRTSR, 60
TKPLSP, 86 TKSCAT, 105
TKPLSZ, 84 TKSCPR, 67
TKPORT, 31 TKSCRS, 66
TKPPEV, 115 TKSENS, 26
TKPPRP, 111 TKSENV, 113
TKPRO1, 49 TKSHCR, 95
TKPRO2, 49 TKSIDS, 99
TKPROF, 48 TKSINF, 100
TKPROP, 48 TKSNAC, 103
TKPSEC, 66 TKSNCA, 104
TKPSR1, 126 TKSNSA, 105
TKPSR2, 127 TKSPIR, 91
TKPSRF, 123 TKSPPT, 110
TKPSRP, 124 TKSPRP, 107
TKPSS1, 128 TKSRRP, 82
TKPSSP, 124 TKSSAT, 106
TKPSSR, 125 TKSSCA, 104
TKPSSS, 126 TKSSEC, 65
TKPSUB, 123 TKSSID, 101
TKPTAD, 55 TKSSSA, 106
TKPTCN, 58 TKSTRA, 102
TKPTEV, 113 TKSTRM, 101
TKPTFR, 56 TKSVAL, 102
TKPTPP, 57 TKTITL, 19
TKPTPR, 55 TKTPRP, 63
TKPTRS, 54 TKTREP, 62
TKPVPF, 130 TKTRNR, 50
TKPVR1, 131 TKTRRS, 51
TKPVR2, 132 TKUNIT, 22
TKPVRP, 131 TKVAPF, 74
TKRCAT, 72 TKVAPR, 74
TKRFSP, 73 TKVAR1, 75
TKRNAC, 71 TKVAR2, 75
TKRNCA, 71 TKVLE, 93
TKRNFS, 73 TKVTPF, 76
TKRPIP, 92 TKVTPR, 76
TKRPR1, 70 TKVTR1, 77
TKRPR2, 70 TKVTR2, 77
TKRPRF, 68 TKWHLR, 37
TKRPRP, 69 web site, technical support, 3
TKRRHR, 79
TKRRNS, 80
TKRRPF, 78
TKRRPR, 79
TKRRRP, 83

198 Index

You might also like