You are on page 1of 215

Aspen Plus

Summary File Toolkit

Version Number: V8.0


December 2012
Copyright (c) 1981-2012 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 ...........................................................................3
Related Documentation .....................................................................................3
Technical Support ............................................................................................4
1 Getting Started....................................................................................................5
The Summary File and Toolkit............................................................................6
Initializing the Toolkit .......................................................................................6
Accessing the Required Files ....................................................................7
Getting the Summary File Name ........................................................................7
Getting Property and Units File Names ......................................................7
Defining Units of Measurement ................................................................8
Specifying a Value for Missing Results.......................................................8
Determining the Data Dimensions ......................................................................8
Retrieving Data for an Object.............................................................................9
Using the Toolkit With a Hierarchical Aspen Plus Run .......................................... 11
Linking Toolkit Subroutines into Your Module ..................................................... 11
Creating a Toolkit Application for Windows ........................................................ 11
About the Windows Version ................................................................... 12
Linker Directive Commands for Windows ........................................................... 12
Calling Summary File Toolkit Routines .............................................................. 13
Opening and Closing Files Using the Summary File Toolkit......................... 13
Using Fortran to Call Routines................................................................ 14
Changes in the Toolkit .................................................................................... 14
2 General Subroutines..........................................................................................15
Initializing the Summary File Toolkit ................................................................. 16
Closing the Summary File Toolkit ..................................................................... 17
Opening and Closing Files................................................................................ 18
Retrieving Run Information ............................................................................. 19
Standard Run Information ..................................................................... 19
Run Titles............................................................................................ 20
Accounting Information......................................................................... 21
Retrieving Flowsheet Balance Results................................................................ 21
Units Conversion ............................................................................................ 22
Changing Units Sets ............................................................................. 22
Converting Units for Real Numbers ......................................................... 23
Determining Units Labels ...................................................................... 23
Component Information Retrieval..................................................................... 24
Number of Components ........................................................................ 24
Component IDs .................................................................................... 25
Component Alias Names ....................................................................... 25

Contents

iii

Component CAS Numbers ..................................................................... 26


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

iv

Contents

Additional PetroFrac Profile Properties..................................................... 56


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

Contents

Pipeline Profile Property Names.............................................................. 89


Pipeline Profile Results .......................................................................... 90
Pipe Results................................................................................................... 90
Pipe Standard Profile Dimensions ........................................................... 91
Pipe Standard Profile Property Names ..................................................... 91
Pipe Standard Profile Properties ............................................................. 91
Pipe Property Reports ........................................................................... 92
Block VLE Results ........................................................................................... 94
Heating/Cooling Curves................................................................................... 94
Number of Heating/Cooling Curves for a Block ......................................... 95
Heating/Cooling Curves for a Block......................................................... 95
Size of a Heating/Cooling Curve ............................................................. 96
Standard Heating/Cooling Curve Results ................................................. 97
Sequential Heating/Cooling Curve Properties ........................................... 97
Specific Heating/Cooling Curve Properties ............................................... 98
Interconnecting Stream IDs................................................................... 99
4 Stream Result Subroutines..............................................................................101
Stream Identification .................................................................................... 101
Listing Stream IDs.............................................................................. 101
Determining the Next Stream .............................................................. 102
Material Stream Results ................................................................................ 102
Retrieving Basic Stream Information..................................................... 102
Listing Substream IDs......................................................................... 103
Retrieving Stream Results ................................................................... 103
Retrieving a Single Stream Property ..................................................... 104
Heat and Work Stream Results ...................................................................... 104
Component Attribute Results ......................................................................... 105
Determining the Number of Components with Attributes ......................... 105
Determining Number of Attributes for a Component ............................... 106
Determining Component Attribute Size ................................................. 106
Retrieving Component Attribute Values ................................................. 107
Substream Attribute Results .......................................................................... 107
Determining the Number of Substream Attributes .................................. 107
Determining Substream Attribute Size .................................................. 108
Retrieving Substream Attribute Values .................................................. 108
Stream Property Set Results.......................................................................... 109
Determining Dimensions of Stream Property Values ............................... 109
Retrieving Stream Property Results ...................................................... 109
5 Physical Property Table Results Subroutines...................................................111
Property Table Identification .......................................................................... 112
Property and Flashcurve Table Results ............................................................ 112
Determining Property Table Dimensions ................................................ 112
Retrieving Sequential Properties in a Table ............................................ 113
Retrieving Specific Properties from a Table ............................................ 113
Pressure-Temperature Envelope Results.......................................................... 114
Determining Dimensions for Properties in the Envelope........................... 114
Determining Envelope Dimensions........................................................ 115
Retrieving Temperature and Pressure for Envelope Branch ...................... 115
Retrieving Sequential Envelope Properties ............................................. 116
Retrieving Specific Envelope Properties ................................................. 117

vi

Contents

6 Costing Results Subroutines............................................................................119


Equipment Item Identification........................................................................ 120
Determining Number of Equipment Items.............................................. 120
Listing Equipment Items ..................................................................... 120
Determining Next Equipment Item ....................................................... 120
Equipment Item Results ................................................................................ 121
Retrieving Equipment Item Costing Results ........................................... 121
Determining Equipment Item Sizing Results .......................................... 121
Retrieving Equipment Item Sizing Results ............................................. 122
7 Pressure Relief Subroutines ............................................................................123
Pressure Relief Block Identification ................................................................. 124
Determining the Number of Pressure Relief Blocks.................................. 124
Listing Pressure Relief Blocks ............................................................... 124
Determining the Next Pressure Relief Block ........................................... 125
Pressure Relief Results.................................................................................. 125
Determining the Number of Substreams................................................ 126
Determining Dimensions of Pressure Relief Arrays .................................. 126
Listing Profile Properties...................................................................... 127
Retrieving Dynamic Scalar Results........................................................ 128
Retrieving Steady-State Scalar Results ................................................. 129
Retrieving Non-Component-Dependent Dynamic Profiles ......................... 129
Retrieving Dynamic Component-Dependent Profiles................................ 130
Retrieving Steady-State Profiles ........................................................... 131
Determining Vent Accumulator Profile Dimensions .................................. 131
Listing Vent Accumulator Profile Properties ............................................ 132
Retrieving Non-Component-Dependent Vent Accumulator Profiles ............ 132
Retrieving Component-Dependent Vent Accumulator Profiles ................... 133
Determining Pressure Relief Vent Profile Dimensions .............................. 133
Listing Vent Profile Properties .............................................................. 134
Retrieving Position-Dependent Vent Profiles........................................... 134
Retrieving Component-Dependent Vent Profiles ..................................... 135
8 Examples.........................................................................................................137
Example 1: Stream Heat and Material Balance Table Generation ........................ 137
Declaring Variables and Dimensioning................................................... 137
Initializing the Toolkit ......................................................................... 138
Finding Number of Streams ................................................................. 139
Finding Component Molecular Weight ................................................... 139
Writing Stream Table .................................................................................... 140
Example 2: Interactive Heating/Cooling Curve Table Generation ........................ 143
Declaring Variables............................................................................. 143
Initializing the Toolkit ......................................................................... 143
Finding Number of Blocks .................................................................... 143
Finding Blocks with Heating/Cooling Curves........................................... 144
Prompting for Block Name ................................................................... 145
Finding Heating/Cooling Curves for Selected Block ................................. 145
Finding Dimensions of Heating/Cooling Curve ........................................ 146
Retrieving Standard Heating/Cooling Curve Results ................................ 146
Retrieving Property Sets ..................................................................... 147
Example 3: Column Profile Results Written to Plot File ...................................... 150

Contents

vii

Opening Files and Initializing Toolkit ..................................................... 150


Finding List of Blocks .......................................................................... 151
Finding List of Properties ..................................................................... 151
Retrieving Selected Property Profile ...................................................... 152
Closing the Application........................................................................ 152
Example 4: Distillation Column Diagram Generation ......................................... 154
Initializing the Toolkit ......................................................................... 154
Retrieving Basic Block Results.............................................................. 154
Retrieving Inlet and Outlet Stream Flows .............................................. 155
Finding Inlet and Outlet Stream IDs ..................................................... 156
9 XML Summary File ...........................................................................................159
A Units ...............................................................................................................161
Table A.1 - Units Options .............................................................................. 163
B Property Names ..............................................................................................173
Table B.1 - Standard Property Names ............................................................. 174
Table B.2 - Mixture Thermodynamic Properties ................................................ 186
Volume ............................................................................................. 186
Flow Rates, Fractions .......................................................................... 186
Enthalpy, Entropy, Gibbs Energy, Heat Capacity..................................... 186
Other properties................................................................................. 187
Table B.3 - Thermodynamic Properties of Components in Mixtures ..................... 188
Table B.4 - Pure Component Thermodynamic Property Sets............................... 189
Table B.5 - Electrolyte Property Sets .............................................................. 190
Table B.6 - Transport Properties..................................................................... 191
Mixture ............................................................................................. 191
Component in a Mixture ...................................................................... 191
Pure Components ............................................................................... 191
Table B.7 - Petroleum-Related Properties for Mixtures ...................................... 191
Distillation Curves .............................................................................. 192
Distillation Temperature ...................................................................... 192
Distillation Volume and Weight Percent ................................................. 193
Bulk Petroleum Property Values from Assay Curves ................................ 193
Petroleum Cuts .................................................................................. 194
Petroleum Property Curves .................................................................. 195
Table B.8 - Elemental Analysis of Mixtures ...................................................... 196
Table B.9 - Nonconventional Component Properties .......................................... 197
Table B.10 - Property Names for Costing Results.............................................. 197
Equipment Type: HEATX ..................................................................... 197
Equipment Type: AIRCOOL.................................................................. 197
Equipment Type: FIRED-HEATER.......................................................... 198
Equipment Type: PUMP ....................................................................... 198
Equipment Type: COMPR..................................................................... 199
Equipment Type: BLOWER................................................................... 199
Equipment Type: TRAY-TOWER ............................................................ 200
Equipment Type: TRAY-TOWER Section Results ..................................... 200
Equipment Type: USER ....................................................................... 200
Equipment Type: V-VESSEL................................................................. 201
Equipment Type: H-VESSEL................................................................. 201
Equipment Type: TANK ....................................................................... 202

viii

Contents

Index ..................................................................................................................203

Contents

ix

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

Who Should Read this Guide

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


Running a Process Model

Tutorials covering basic use of


Aspen Plus. A prerequisite for the
other Getting Started guides

Aspen Plus Getting Started Modeling


Processes with Solids

Tutorials covering the Aspen plus


features designed to handle solids

Aspen Plus Getting Started Modeling


Processes with Electrolytes

Tutorials covering the Aspen plus


features designed to handle
electrolytes

Aspen Plus Getting Started Using


Equation-Oriented Modeling

Tutorials covering the use of


equation-oriented models in
Aspen Plus

Aspen Plus Getting Started Customizing


Unit Operation Models

Tutorials covering the


development of custom unit
operation models in Aspen Plus

Aspen Plus Getting Started Modeling


Petroleum Processes

Tutorials covering the Aspen Plus


features designed to handle
petroleum

Aspen Plus User Guide

Procedures for using Aspen Plus

Introducing Summary File Toolkit

Title

Content

Aspen Plus Reference Manual Series

Detailed information about Aspen


Plus

Aspen Plus Application Examples

A suite of examples illustrating


capabilities of Aspen Plus

Aspen Engineering Suite Installation


Manual

Instructions for installing Aspen


Plus and other Aspen Engineering
Suite products

Technical Support
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-todate contact information is available at the AspenTech Support Center at
http://support.aspentech.com.

Introducing Summary File Toolkit

1 Getting Started

This chapter describes how to build an application program using the Aspen
Plus Summary File Toolkit. It contains information on:

The summary file and toolkit.

Initializing the toolkit.

Determining data dimensions.

Retrieving data for an object.

Using the toolkit with a hierarchical Aspen Plus run.

Linking toolkit subroutines into your module.

Creating a toolkit application for Windows.

Transferring the toolkit to another computer.

1 Getting Started

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.

Get the dimensions of the data to be retrieved.

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:

Accessing the required files and setting up directories for fast data access.

Defining the units of measurement for all values retrieved from the toolkit.

Specifying a value to substitute for missing results.

1 Getting Started

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.

Reading the file name from the command line.

Reading the file name from a file.

Prompting the user is the easiest method for most operating systems. Fortran
READ and WRITE statements are used to get the file name.

Getting Property and Units File Names


The properties file, RCPROPNU.DAT, and the units file, RCUNITS.DAT, are
installed in the toolkit subdirectory of the Aspen Plus Simulation Engine
installation. The Engine directory should be set as the value of the %asptop%
environment variable.

1 Getting Started

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:
CALL GETENV('ASPTOP', ASPTOP)
DO 50 I = 80, 1, -1
IF (ASPTOP(I:I) .NE. ' ') GO TO 55
50
CONTINUE
55
CONTINUE
RCPROP = ASPTOP(1:I) // '\TOOLKIT\RCPROPNU.DAT'
RCUNIT = 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.

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

Querying the summary file for the existence of simulation objects and
data within an object.

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

1 Getting Started

Qualifier

Description

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.

10

1 Getting Started

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

1 Getting Started

11

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


-entry:mainCRTStartup
msvcrt.lib
-nodefaultlib:libc.lib
libifcoremd.lib
-nodefaultlib:libifcore.lib

12

1 Getting Started

libifportmd.lib
-nodefaultlib:libifport.lib
libmmd.lib
-nodefaultlib:libm.lib
-nodefaultlib:libifcoremt.lib
-nodefaultlib:libmmt.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.

1 Getting Started

13

Close the summary file and the log file with TKCLFL, at the end of each
run.

Do not use TKOPEN and TKCLFL for opening and closing the files your
application reads from or writes to.

Using Fortran to Call Routines


Use the Fortran default naming and calling conventions for calls to the
summary file toolkit shared library, when compiling code. You do not have to
carry out any special steps to call the summary file toolkit routines.
When linking the application, make sure a reference to the zetoolkit shared
library is included in the list of libraries, and that its pathname is included in
the list of library directories.
You must write your code and any setup procedures so that the zetoolkit
shared library is in your run time path.

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

14

1 Getting Started

2 General Subroutines

This chapter describes the purpose and use of subroutines in the Aspen Plus
Summary File Toolkit. Use the subroutines described in this chapter for:

Initializing the summary file toolkit.

Retrieving run information.

Retrieving flowsheet balance results.

Setting and changing units of measurement.

Retrieving component information.

Retrieving sensitivity results.

2 General Subroutines

15

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
UNISET

16

CHARACTER*4

Dimension Description

Units set for retrieved values (SI, ENG,


MET, or OUT)

IDIRAC

INTEGER

Fortran unit number for scratch file

ISUMMF

INTEGER

Fortran unit number for summary file

IPROPN

INTEGER

Fortran unit number for property


numbers file

RCPROP

CHARACTER*80

File name for property numbers file

IUNITS

INTEGER

Fortran unit number for units definition


file

RCUNIT

CHARACTER*80

File name for units definition file

RMISS

REAL*8

Real value flag for missing values

2 General Subroutines

Variable I/O Type

Dimension Description

IERR

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
UNISET

Type

Dimension

Description

CHARACTER*4

Units set for retrieved values (SI,


ENG, MET or OUT)

IDIRAC

INTEGER

Fortran unit number for scratch file

ISUMMF

INTEGER

Fortran unit number for summary file

IPROPN

INTEGER

Fortran unit number for property


numbers file

RCPROP

CHARACTER*80

File name for property numbers file

IUNITS

INTEGER

Fortran unit number for units


definition file

RCUNIT

CHARACTER*80

File name for units definition file

RMISS

REAL*8

Real value flag for missing values

IERR

INTEGER

Error flag (0=No error)

ILOG

INTEGER

Fortran Unit number for log file.


Negative for no messages.

I = Input to subroutine, O = Output from subroutine

Closing the Summary File


Toolkit
Call subroutine TKCLOS to close a summary file toolkit run. TKCLOS closes
files opened by TKINIT or TKINI2, so the argument list should use the
corresponding values passed to TKINIT or TKINI2. The summary file is not
closed by this routine, but is instead rewound to its first record. Use TKCLFL
to close it.

Calling Sequence for TKCLOS


CALL TKCLOS (ISUMMF, IDIRAC, IPROPN, IUNITS)

2 General Subroutines

17

Argument List Descriptions for TKCLOS


Variable I/O

Type

Dimension

Description

ISUMMF

INTEGER

Fortran unit number for summary file

IDIRAC

INTEGER

Fortran unit number for scratch file

IPROPN

INTEGER

Fortran unit number for property numbers


file

IUNITS

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

INTEGER

FILNAM

CHARACTER*(*)

Name of file to open

ACCESS

CHARACTER*16

File access (SEQUENTIAL, DIRECT)

FORM

CHARACTER*16

I/O format (FORMATTED,


UNFORMATTED)

IRECL

INTEGER

Record length

STATUS

CHARACTER*16

File status (SCRATCH, OLD, NEW,


UNKNOWN)

MODE

CHARACTER*16

Open mode (READ, WRITE)

IERR

INTEGER

Error flag
(0=No error,
1=Invalid argument,
>0= IOSTAT error)

Unit number of the file being opened

I = Input to subroutine, O = Output from subroutine

Call subroutine TKCLFL to close the file with the specified Fortran unit
number.

Calling Sequence for TKCLFL


CALL TKCLFL (IUNIT, IERR)

18

2 General Subroutines

Argument List Descriptions for TKCLFL

Variable

I/O

Type

Dimension

Description

IUNIT

INTEGER

Unit number of the file being closed

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

Retrieving Run Information


Use the subroutines in this section to retrieve general information about the
run.

Call TKINFO to obtain standard information about a run.

Call TKTITL to obtain the run title.

Call TKACCT to obtain run accounting information.

Standard Run Information


Call subroutine TKINFO to retrieve the following standard information about a
run:

Aspen Plus release name.

Run ID of the Aspen Plus run.

Date of the run.

Input file name.

Input translator status.

Simulation program status.

Number of simulation objects (blocks, streams, property tables, sensitivity


tables).

Calling Sequence for TKINFO


CALL TKINFO (VERSN, RUNID, DATE, INFILE, ISSTAT, ISTAT, NBLOCK,
NSTRM, NTABLE, NSENS)

2 General Subroutines

19

Argument List Descriptions for TKINFO


Variable I/O

Type

Dimension

Description

VERSN

CHARACTER*20

Aspen Plus release name

RUNID

CHARACTER*8

Aspen Plus run ID

DATE

CHARACTER*80

Date of Aspen Plus run

INFILE

CHARACTER*80

Aspen Plus input file name

ISSTAT

INTEGER

Input translator completion code

ISTATF

INTEGER

Simulation status flags for each


element. See ISTATF, below.

NBLOCK

INTEGER

Number of blocks

NSTRM

INTEGER

Number of streams

NTABLE

INTEGER

Number of property tables

NSENS

INTEGER

Number of sensitivity tables

I = Input to subroutine, O = Output from subroutine

ISTATF
The
0=
1=
2=

values are:
Completed without errors,
Completed with errors,
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

TITLE

Type

Dimension

Description

CHARACTER*64

Run title

I = Input to subroutine, O = Output from subroutine

20

2 General Subroutines

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

ACCNT

Type

Dimension

Description

CHARACTER*8

Account number

PROJID

CHARACTER*8

Project ID

PRNAME

CHARACTER*32

Project name

USER

CHARACTER*20

User name

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

Retrieving Flowsheet Balance


Results
Call subroutine TKFLWB to retrieve the absolute and relative differences for:

Total mole balance.

Total mass balance.

Enthalpy balance.

Mole balance for each conventional component.

Mass balance for each nonconventional component.

Calling Sequence for TKFLWB


CALL TKFLWB (ABSMOL, RELMOL, ABSMAS, RELMAS, ABSENT, RELENT, NCC,
ABSCON, RELCON, NNCC, ABSNC, RELNC, IERR)

2 General Subroutines

21

Argument List Descriptions for TKFLWB


Variable

I/O

ABSMOL

Type

Dimension

Description

REAL*8

Absolute mole balance difference


(UNITS=MOLE-FLOW)

RELMOL

REAL*8

Relative mole balance difference

ABSMAS

REAL*8

Absolute mass balance difference


(UNITS=MASS-FLOW)

RELMAS

REAL*8

Relative mass balance difference

ABSENT

REAL*8

Absolute enthalpy balance difference


(UNITS=ENTHALPY-FLOW)

RELENT

REAL*8

Relative enthalpy balance difference

NCC

INTEGER

Number of conventional components

ABSCON

REAL*8

NCC

Absolute mole balance difference for each


conventional component
(UNITS=MOLE-FLOW)

RELCON

REAL*8

NCC

Relative mole balance for each


conventional component

NNCC

INTEGER

Number of nonconventional components

ABSNC

REAL*8

NNCC

Absolute mass balance difference for each


nonconventional component
(UNITS=MASS-FLOW)

RELNC

REAL*8

NNCC

Relative mass balance difference for each


nonconventional component

IERR

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.

22

2 General Subroutines

Calling Sequence for TKUNIT


CALL TKUNIT (SETID, NTYPES, TYPES, LABELS, IERR)

Argument List Descriptions for TKUNIT


Variable

I/O

SETID

Type

Dimension

Description

CHARACTER*4

Base units set


(SI, ENG, MET, or OUT)

NTYPES

INTEGER

Number of units types to change


from the base set

TYPES

CHARACTER*12 NTYPES

List of units' types to change from


the base set. See Appendix A for a
list of valid units' types.

LABELS

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

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

CHARACTER*12

Units type. Valid units' types are


shown in Appendix A.

LABEL

CHARACTER*16

Units label for output. See Appendix


A for a list of valid units' labels.

NVAL

INTEGER

Number of values to convert

RVALI

REAL*8

NVAL

Array of values to be converted.


These values are assumed to be in
the current units set.

RVALO

REAL*8

NVAL

Array of converted values

I = Input to subroutine, O = Output from subroutine

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

2 General Subroutines

23

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

NTYPES

Type

Dimension

Description

INTEGER

Number of units types

TYPES

CHARACTER*12 NTYPES

Units types. See Appendix A for a list


of valid units' types.

LABELS

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

TKCASN gets lists of components and their CAS numbers.

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)

24

2 General Subroutines

Argument List Descriptions for TKCOMP


Variable

I/O

NCC
NNCC

Type

Dimension

Description

INTEGER

Number of conventional components

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

NCC
NNCC

Type

Dimension

Description

INTEGER

Number of conventional components

INTEGER

Number of nonconventional
components

COMPID

CHARACTER*8NCC

Component IDs for conventional


components

COMPNC

CHARACTER*8NNCC

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

Calling Sequence for TKALIS


CALL TKALIS (NCC, COMPID, ALIAS, IERR)

Argument List Descriptions for TKALIS


Variable

I/O

NCC

Type

Dimension

Description

INTEGER

Number of conventional components

COMPID

CHARACTER*8

NCC

Conventional component IDs

ALIAS

CHARACTER*12 NCC

Alias corresponding to component


IDs

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine,

2 General Subroutines

O = Output from subroutine

25

Component CAS Numbers


Call subroutine TKCASN to retrieve conventional component IDs and their
CAS numbers. CAS numbers will be blank for segments and user-defined
components.

Calling Sequence for TKCASN


CALL TKCASN (NCC, COMPID, CASN, IERR)

Argument List Descriptions for TKCASN


Variable

I/O

NCC

Type

Dimension

Description

INTEGER

Number of conventional components

COMPID

CHARACTER*8

NCC

Conventional component IDs

CASN

CHARACTER*12 NCC

CAS numbers corresponding to


component IDs

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine,

O = Output from subroutine

Component Properties
Call subroutine TKCPRP to retrieve component properties for conventional
components. The properties that you can retrieve are molecular weight,
boiling point, and standard volume.

Calling Sequence for TKCPRP


CALL TKCPRP (PROP, NCC, RVALS, LABEL)

Argument List Descriptions for TKCPRP


Variable

I/O

PROP

Type

Dimension

Description

CHARACTER*8

Property name (MW, TB, or VSTD)

NCC

INTEGER

Number of components

RVALS

REAL*8

NCC

Property values (units are


TEMPERATURE for TB and
MOLE-VOLUME for VSTD)

LABEL

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:

26

Call TKNEXT to identify the next sensitivity block.

Call TKNSEN to retrieve the number of points and the number of columns
in the table.

2 General Subroutines

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

CHARACTER*12

IOFF

INTEGER

ID1

CHARACTER*(*)

First ID of the object. For sensitivity


blocks, it is the block ID. Returns
complete hierarchy specification.

ID2

CHARACTER*12

Second ID of the model name, for


the object. For sensitivity blocks, it is
blank.

IERR

INTEGER

Error flag (0=No error)

Object type (set to SENSITIVITY for


sensitivity blocks)

Sequence number

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

SENSID

Type

Dimension

Description

CHARACTER*(*)

Sensitivity block ID

NPOINT

INTEGER

Number of points in table

NCOL

INTEGER

Number of columns in table

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

2 General Subroutines

27

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

SENSID

CHARACTER*(*)

Sensitivity block ID
(Full hierarchical path)

NPOINT

INTEGER

Number of points in table

Description

NCOL

INTEGER

Number of columns in table

HEADER

CHARACTER*8

6, NCOL

Table header of each table column

RVALS

REAL*8

NPOINT*
NCOL

Results for sensitivity table

IERFLG

INTEGER

NPOINT

Error flag for each row of table


(0=No error)

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

28

2 General Subroutines

3 Block Result Subroutines

This chapter describes the use of block result retrieval subroutines in the
summary file toolkit. Use the subroutines described in this chapter for:

Block identification, connectivity, and results.

Compressor results.

Heat exchanger results.

Column results.

Tray reports and tray/packing sizing and rating.

Reactor results and property reports.

Pipeline results.

Block vapor-liquid equilibrium (VLE) results.

Heating/cooling curves.

3 Block Result Subroutines

29

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

INTEGER

Number of blocks. You can find the


value of NBLOCK by calling TKINFO.

BLKID

CHARACTER*(*) NBLOCK

Block ID
(Full hierarchical path)

BLKTYP

CHARACTER*12 NBLOCK

Model type

IERR

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

INTEGER

Block number

BLKID

CHARACTER*(*)

Block ID

BLKTYP

CHARACTER*12

Model type

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

30

3 Block Result Subroutines

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.

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

CHARACTER*(*)

Block ID

NIN

INTEGER

Number of inlet streams

NOUT

INTEGER

Number of outlet streams

IERR

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

BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NIN

INTEGER

Number of inlet streams

NOUT

INTEGER

Number of outlet streams

BLKIN

CHARACTER*(*) NIN

Inlet stream IDs

TYPIN

CHARACTER*8

Stream type of inlet streams


(MATERIAL, HEAT, or WORK)

3 Block Result Subroutines

NIN

31

Variable

I/O Type

Dimension

Description

BLKOUT

CHARACTER*(*) NOUT

Outlet stream IDs

TYPOUT

CHARACTER*8

NOUT

Stream type of outlet streams


(MATERIAL, HEAT, or WORK)

IERR

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

BLKID

CHARACTER*(*)

Description
Block ID

NIN

INTEGER

Number of inlet streams

NOUT

INTEGER

Number of outlet streams

INPORT

CHARACTER*4

NIN

Inlet port names

IDIN1

INTEGER

NIN

ID1 for inlet streams

IDIN2

INTEGER

NIN

ID2 for inlet streams

IOPORT

CHARACTER*4

NOUT

Outlet port names

IDOUT1

INTEGER

NOUT

ID1 for outlet streams

IDOUT2

INTEGER

NOUT

ID2 for outlet streams

IERR

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

32

3 Block Result Subroutines

Port Information Returned by TKPORT


Model Type

Port Name Description

ID1

Extract

TF
BF
SF
TP
BP
SP

Top feed
Bottom feed
Side feed
Top product
Bottom product
Side product

Stage

number

HeatX

HF
CF
HP
CP
HWD
CWD

Hot feed
Cold feed
Hot product
Cold product
Hot water decant
Cold water decant

Mcompr

S1F
IF
WS
HS
FLS
LK
WD
WS
HS

Stage1 feed
Stage feed
Work feed
Heat feed
Product
Liquid knockout
Water draw
Work out
Heat out

Stage

number

MheatX

HF
CF
HP
CP
HWD
CWD

Hot feed
Cold feed
Hot product
Cold product
Hot water decant
Cold water decant

Stream
number

MultiFrac

F
HS
VD
LD
R
SP
CWD
HS

Feed
Heat feed
Vapor distillate
Liquid distillate
Residue
Side product
Water distillate
Heat product

Column Stage
number number

PetroFrac

MF
SF
MHF
SHF
PHF
VD
LD
B
SP
CWD
SB
PS
CHS
RHS
MHP
SHP
PHP

Main column feed


Stripper steam feed
Main column heat feed
Stripper heat feed
Pumparound heat feed
Main column vapor distillate
Main column liquid distillate
Main column bottoms product
Main column side product
Main column condenser water decant
Stripper bottom product
Pseudo stream
Condenser heat stream
Reboiler heat stream
Main column heat product
Stripper heat product
Pumparound heat product

Column Stage
number number

3 Block Result Subroutines

ID2

33

Model Type

Port Name Description

ID1

ID2

RadFrac

F
HS
VD
LD
R
SP
WD
CHS
RHS

Feed
Heat feed
Vapor distillate
Liquid distillate
Residue
Side product
Water distillate
Condenser heat
Reboiler heat

Stage

number

RateFrac

F
HS
VD
LD
R
SP
CWD
HS

Feed
Heat feed
Vapor distillate
Liquid distillate
Residue
Side product
Water distillate
Heat product

Column Section
number number

SCFrac

F
SF
D
B
SP

Feed
Steam feed
Distillate
Bottoms
Side product

The PetroFrac column number for the main column is one. The strippers are
numbered sequentially, starting with two.

Standard Block Results


All unit operations have standard scalar block results. For example, Flash2
results include the outlet temperature and pressure, the vapor fraction, and
the heat duty.
You can retrieve standard scalar results using a two-step process:
1

Call subroutine TKNRES to determine the dimensions of the results.

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

34

(BLKID, NRES, NQUAL, IERR)

3 Block Result Subroutines

Argument List Descriptions for TKNRES


Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

NRES

INTEGER

Number of results

NQUAL

INTEGER

Maximum number of qualifiers for a


result

IERR

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
BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NRES

INTEGER

Number of results

NQUAL

INTEGER

Maximum number of qualifiers

PNAMES

CHARACTER*12 NRES

QUALS

CHARACTER*8

NRES* NQUAL Qualifiers

ITYPE

INTEGER

NRES

IVALS

INTEGER

NRES

Integer results

CVALS

CHARACTER*8

NRES

Character results

RVALS

REAL*8

NRES

Real results

TYPES

CHARACTER*12 NRES

Units types

LABELS

CHARACTER*16 NRES

Units labels

Property name. See Appendix B for


a description.
Data type of results (1=Integer,
2=Real, 3=Character)

I = Input to subroutine, O = Output from subroutine


Some results have qualifiers needed to identify the result, such as the stream ID
or substream ID. NQUAL is the maximum number of qualifiers for the results of a
block.
For each result, the value in ITYPE specifies which array contains the result
(IVALS, CVALS or RVALS). For example, if ITYPE(4) is 2, then IVALS(4) is 0, CVALS(4)
is blank and RVALS(4) contains the result.

3 Block Result Subroutines

35

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

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:

Call subroutine TKNWHL to determine the number of wheels and the


number of wheel-by-wheel performance results in the MCompr model.

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

36

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of stage-by-stage
performance results properties

NSTAGE

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

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of properties

NSTAGE

INTEGER

Number of stages (1 for Compr)

PNAMES

CHARACTER*12

NPROP

Property name. See Appendix B for


a description.

RVALS

REAL*8

NPROP*
NSTAGE

Real results

TYPES

CHARACTER*12

NPROP

Units types

LABELS

CHARACTER*16

NPROP

Units labels

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

37

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

CHARACTER*(*)

Block ID

ISTAGE

INTEGER

Specified compressor stage

NWHEEL

INTEGER

Number of wheels

NPROP

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

38

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

ISTAGE

INTEGER

Stage number

NPROP

INTEGER

Number of properties

NWHEEL

INTEGER

Number of wheels in stage

PNAMES

CHARACTER*12 NPROP

Property name. See Appendix B for a


description.

RVALS

REAL*8

Real results

TYPES

CHARACTER*12 NPROP

Units types

LABELS

CHARACTER*16 NPROP

Units labels

IERR

INTEGER

Error flag (0=No error)

NPROP*
NWHEEL

3 Block Result Subroutines

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.

Call subroutine TKMCPR to retrieve the profile data for the MCompr
stages.

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

CHARACTER*(*)

Block ID

NSTAGE

INTEGER

Number of compressor stages

NPROP

INTEGER

Number of stage profile properties

NCOOL

INTEGER

Number of compressor cooler stages

NCPROP

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

3 Block Result Subroutines

(BLKID, NPROP, NSTAGE, PNAMES, RVALS, TYPES,


LABELS, IERR)

39

Argument List Descriptions for TKMCPR


Variable I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of profile properties

NSTAGE

INTEGER

Number of stages

PNAMES

CHARACTER*12

NPROP

Property name. See Appendix B for


a description.

RVALS

REAL*8

NPROP*
NSTAGE

Real results

TYPES

CHARACTER*12

NPROP*
NSTAGE

Units types

LABELS

CHARACTER*16

NPROP*
NSTAGE

Units labels

IERR

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
BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NCPROP

INTEGER

Number of profile properties

NCOOL

INTEGER

Number of cooler stages

PNAMES

CHARACTER*12 NCPROP

RVALS

REAL*8

TYPES

CHARACTER*12 NCPROP* NCOOL Units types

LABELS

CHARACTER*16 NCPROP* NCOOL Units labels

IERR

INTEGER

Property name. See Appendix B


for a description.

NCPROP* NCOOL Real results

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

Heat Exchanger Results


You can retrieve the standard block results and HCURVE data, if you use the
HeatX model in SHORTCUT mode. Retrieving these results is described in

40

3 Block Result Subroutines

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.

Call subroutine TKHXD1 to retrieve detailed results.

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.

Call subroutine TKHXZO to retrieve the zone results.

Call subroutine TKHXSH to retrieve the shell results.

Call subroutine TKHXTU to retrieve the tube results.

Call subroutine TKHXBA to retrieve the baffle results.

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

CHARACTER*(*)

Block ID

NDET1

INTEGER

Number of detailed results

NDET2

INTEGER

Number of velocity-DP results

I = Input to subroutine, O = Output from subroutine

Detailed Results
Call subroutine TKHXD1 to retrieve the first set of detailed results (such as,
areas and heat transfer coefficients) for the heat exchanger.

Calling Sequence for TKHXD1


CALL TKHXD1

3 Block Result Subroutines

(BLKID, NDET1, PNAMES, RVALS, TYPES, LABELS,


IERR)

41

Argument List Descriptions for TKHXD1


Variable I/O Type
BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NDET1

INTEGER

PNAMES

CHARACTER*12 NDET1

Property name. See Appendix B for a


description.

RVALS

REAL*8

NDET1

Real results

TYPES

CHARACTER*12 NDET1

Units types

LABELS

CHARACTER*16 NDET1

Units labels

IERR

INTEGER

Error flag (0=No error)

Number of detailed results

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

CHARACTER*(*)

Block ID

NDET2

INTEGER

Number of velocity pressure drop


results

PNAMES

CHARACTER*12 NDET2

Property name. See Appendix B for


a description.

RVALS

REAL*8

NDET2

Real results

TYPES

CHARACTER*12 NDET2

Units types

LABELS

CHARACTER*16 NDET2

Units labels

IERR

INTEGER

Error flag
(0=No error)

I = Input to subroutine, O = Output from subroutine

Heat Exchanger Results Dimensions


Call TKNHXT to retrieve the sizes of the zone, shell, tube, baffle and nozzle
results. Because HeatX can be divided into a number of zones, the number of
zones together with the number of results in a zone is returned. A single
value is returned for the number of shell, tube, baffle and nozzle results.

Calling Sequence for TKNHXT


CALL TKNHXT

42

(BLKID, NZONE, NZORES, NSHRES, NTURES, NBARES,


NNORES)

3 Block Result Subroutines

Argument List Descriptions for TKNHXT


Variable

I/O

Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

NZONE

INTEGER

Number of Zones

NZORES

INTEGER

Number of Zone results

NSHRES

INTEGER

Number of Shell results

NTURES

INTEGER

Number of Tube results

NBARES

INTEGER

Number of Baffle results

NNORES

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

BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NZONE

INTEGER

Number of Zones

NZORES

INTEGER

Number of Zone properties

PNAMES

CHARACTER*12 NZORES

Property name. See Appendix B for a


description.

RVALS

REAL*8

Real results

TYPES

CHARACTER*12 NZORES

Unit types

LABELS

CHARACTER*16 NZORES

Unit labels

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine,

NZORES*
NZONE

O = Output from subroutine

Heat Exchanger Shell Results


Call subroutine TKHXSH to retrieve the shell results.

Calling Sequence for TKHXSH


CALL TKHXSH

3 Block Result Subroutines

(BLKID, NSHRES, PNAMES, ITYPES, IVALS, CVALS,


RVALS, TYPES, LABELS, IERR)

43

Argument List Descriptions for TKHXSH


Variable I/O Type
BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NSHRES

INTEGER

PNAMES

CHARACTER*12 NSHRES

Property name. See Appendix B for


a description.

ITYPES

INTEGER

NSHRES

Data type of results


(1=Integer
2=Real
3=Character)

IVALS

INTEGER

NSHRES

Integer results

CVALS

CHARACTER*12 NSHRES

Character results

RVALS

REAL*8

Real results

TYPES

CHARACTER*12 NSHRES

Unit types

LABELS

CHARACTER*16 NSHRES

Unit labels

IERR

INTEGER

Error flag
(0=No error)

NSHRES

Number of Shell properties

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

BLKID

CHARACTER*(*)

Block ID

NTURES

INTEGER

Number of Tube properties

PNAMES

CHARACTER*12 NTURES

Property name. See Appendix B for a


description.

ITYPES

INTEGER

NTURES

Data type of results


(1=Integer
2=Real
3=Character)

IVALS

INTEGER

NTURES

Integer results

CVALS

CHARACTER*12 NTURES

Character results

RVALS

REAL*8

Real results

TYPES

CHARACTER*12 NTURES

Unit types

LABELS

CHARACTER*16 NTURES

Unit labels

IERR

INTEGER

Error flag
(0=No error)

I = Input to subroutine,

44

Dimension

NTURES

Description

O = Output from subroutine

3 Block Result Subroutines

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

CHARACTER*(*)

NBARES

INTEGER

PNAMES

CHARACTER*12 NBARES

Property name. See Appendix B for


a description.

ITYPES

INTEGER

NBARES

Data type of results


(1=Integer
2=Real
3=Character)

IVALS

INTEGER

NBARES

CVALS

CHARACTER*16 NBARES

Character results

RVALS

REAL*8

Real results

TYPES

CHARACTER*12 NBARES

Unit types

LABELS

CHARACTER*16 NBARES

Unit labels

IERR

INTEGER

Error flag
(0=No error)

NBARES

Block ID
Number of Baffle properties

Integer results

I = Input to subroutine, O = Output from subroutine

Heat Exchanger Nozzle Results


Call subroutine TKHXNO to retrieve the nozzle results.

Calling Sequence for TKHXNO


CALL TKHXNO

(BLKID, NNORES, PNAMES, RVALS, TYPES,


LABELS, IERR)

Argument List Descriptions for TKHXNO


Variable

I/O Type

BLKID

Dimension

CHARACTER*(*)

Block ID

NNORES

INTEGER

PNAMES

CHARACTER*12 NNORES

Property name. See Appendix B for a


description.

RVALS

REAL*8

Real results

TYPES

CHARACTER*12 NNORES

Unit types

LABELS

CHARACTER*16 NNORES

Unit labels

IERR

INTEGER

Error flag

3 Block Result Subroutines

Description

NNORES

Number of Nozzle properties

45

Variable

I/O Type

Dimension

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

Call subroutine TKHXPP to get the names of the properties in a profile.

Call subroutine TKHXPR to get the results for a property in a profile.

The PRFTYP argument for these functions uses the following profile types:
PRFTYP Value

Profile Type

ZONE_PRF

Zone Profile

SHEL_PRF

Shell Profile

TUBE_PRF

Tube Profile

TQ_PRF

Temperature-Duty Profile

Heat Exchanger Profile Size


Call subroutine TKHXPF to determine the size of a profile. TKHXPF returns the
size of the profile for the specified profile type. A size of zero indicates the
profile is not present.

Calling Sequence for TKHXPF


CALL TKHXPF

(BLKID, PRFTYP, NPOINT, NPROP)

Argument List Descriptions for TKHXPF


Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

PRFTYP

CHARACTER*8

Profile type (see above)

NPOINT

INTEGER

Number of profile points

NPROP

INTEGER

Number of profile properties

I = Input to subroutine, O = Output from subroutine

46

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

PRFTYP

CHARACTER*8

Profile type (see above)

NPROP

INTEGER

Number of profile properties

PNAMES

CHARACTER*12 NPROP

Property name. See Appendix B for


a description.

LABEL1

CHARACTER*12 NPROP

First property label

LABEL2

CHARACTER*12 NPROP

Second property label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

Heat Exchanger Profile Results


Call subroutine TKHXPR to retrieve the results for the specified property in a
profile. The profile data consists of a number of points within a number of
zones. The zone of each value is returned in IZONE, and the point number is
returned in IPOINT.
The results in RVALS are ordered so that all the points for the first zone are
followed by the points for the second zone, and so on.

Calling Sequence for TKHXPR


CALL TKHXPR

(BLKID, PRFTYP, PNAME, NPOINT, IZONE, IPOINT,


RVALS, TYPE, LABEL, IERR)

Argument List Descriptions for TKHXPR


Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

PRFTYP

CHARACTER*8

Profile type (see above)

PNAME

CHARACTER*12

Property name from TKHXPP

NPOINT

INTEGER

Number of profile points

IZONE

INTEGER

NPOINT

Number of zone

IPOINT

INTEGER

NPOINT

Point number within zone

RVALS

REAL*8

NPOINT

Real results

3 Block Result Subroutines

47

TYPE

CHARACTER*12

Unit types

LABEL

CHARACTER*16

Unit labels

IERR

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.

Call subroutine TKPROF to determine the dimensions of the profile.

Call subroutine TKPROP to list the properties.

Call subroutine TKPRO1 to retrieve the property values for


non-component-dependent properties, or subroutine TKPRO2 to retrieve
the property values for component-dependent properties.

Most of the column subroutines take the argument ICOL, which represents
the column number. This is always 1 for RadFrac and Extract. For MultiFrac
and RateFrac this is the column number: 1, 2, and so on. With PetroFrac the
main column is numbered 1 and the strippers are numbered starting with 2.
The actual name of a stripper can be retrieved using TKPTRS.
RateFrac models have segments rather than stages. The references to
NSTAGE used in the descriptions of the column routines, apply to the number
of segments in a RateFrac column.

Number of Columns
Call subroutine TKNCOL to determine the number of columns in a block using
a staged separation model. TKNCOL returns a value of 1 for Aspen Plus
models RadFrac and Extract. It returns the number of columns for MultiFrac
and RateFrac. For PetroFrac, NCOL equals the number of strippers plus 1 for
the main column. All other models return 0.

Calling Sequence for TKNCOL


CALL TKNCOL

(BLKID, NCOL)

Argument List Descriptions for TKNCOL


Variable

I/O

Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

NCOL

INTEGER

Number of columns

I = Input to subroutine, O = Output from subroutine

48

3 Block Result Subroutines

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

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NSTAGE

INTEGER

Number of stages

NCP

INTEGER

Number of components present

NPROP

INTEGER

Number of properties

I = Input to subroutine,

Dimension

Description

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

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NPROP

INTEGER

Number of properties

ITYPES

INTEGER

NPROP

Property type
(1=Non-component-dependent,
2=Component-dependent)

PNAMES

CHARACTER*12 NPROP

Property name. See Appendix B for


a description.

IERR

INTEGER

Error flag (0=No error)

Description

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

49

Non-Component-Dependent Column
Profiles
Call subroutine TKPRO1 to retrieve the profile for a non-componentdependent 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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name returned by


TKPROP

ICOL

INTEGER

Column number

NSTAGE

INTEGER

Number of stages

RVALS

REAL*8

NSTAGE

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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)

Argument List Descriptions for TKPRO2

50

Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name returned by


TKPROP

ICOL

INTEGER

Column number

NCP

INTEGER

Number of components present

COMPID

CHARACTER*8

NCP

Component IDs

NSTAGE

INTEGER

Number of stages

3 Block Result Subroutines

Variable

I/O Type

Dimension

Description

RVALS

REAL*8

TYPE

CHARACTER*12

Units types

LABEL

CHARACTER*16

Units labels

IERR

INTEGER

Error flag (0=No error)

NCP* NSTAGE Property values

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.

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

CHARACTER*(*)

Block ID

NRES

INTEGER

Number of non-componentdependent results

NCPROP

INTEGER

Number of component-dependent
properties

NCP

INTEGER

Number of components present in


reboiler

I = Input to subroutine, O = Output from subroutine

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

3 Block Result Subroutines

51

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

BLKID

CHARACTER*(*)

Block ID

NRES

INTEGER

Number of non-componentdependent results

NCPROP

INTEGER

Number of component-dependent
results

NCP

INTEGER

Number of components present in


reboiler

PNAMES

CHARACTER*12 NRES

Property names for noncomponent-dependent results. See


Appendix B for a description.

RVALS

REAL*8

Results for non-componentdependent properties

TYPES

CHARACTER*12 NRES

Results types for non-componentdependent properties

LABELS

CHARACTER*16 NRES

Results labels for non-componentdependent properties

CPNAME

CHARACTER*12 NCPROP

Property names for componentdependent results

COMPID

CHARACTER*8

NCP

Component names

CRVALS

REAL*8

NCP* NCPROP Results for component-dependent


properties

IERR

INTEGER

NRES

Description

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.

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

52

3 Block Result Subroutines

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

BLKID

CHARACTER*(*)

Block ID

NICST

INTEGER

Number of interconnecting streams


or pumparounds

Description

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

BLKID

CHARACTER*(*)

Block ID

NICST

INTEGER

Number of interconnecting streams


or pumparounds

ISCOL

INTEGER

NICST

Source Column

ISSTG

INTEGER

NICST

Source Stage

IDCOL

INTEGER

NICST

Destination Column

IDSTG

INTEGER

NICST

Destination Stage

TEMP

REAL*8

NICST

Temperature

PRES

REAL*8

NICST

Pressure

DUTY

REAL*8

NICST

Duty

VFRAC

REAL*8

NICST

Vapor Fraction

FMOLE

REAL*8

NICST

Mole Flow

FMASS

REAL*8

NICST

Mass Flow

FVOL

REAL*8

NICST

Standard liquid volume flow

3 Block Result Subroutines

Dimension

Description

53

Variable

I/O Type

Dimension

Description

IERR

Error flag (0=No error)

INTEGER

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.

Call subroutine TKPTRS to retrieve additional data for each column.

Call TKPTAD to list additional property profiles.

Call TKPTPR to retrieve the values of the additional property profiles.

Call subroutine TKPTFR to retrieve the PetroFrac furnace data.

Call subroutine TKFRCM to retrieve the values for component-dependent


properties in the furnace.

Call subroutine TKPTPP to retrieve pumparound results for the PetroFrac


columns.

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.

54

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NMOLE

INTEGER

Number of molar profile results

NMASS

INTEGER

Number of mass profile results

NSVOL

INTEGER

Number of standard liquid volume


profile results

NRES

INTEGER

Number of scalar column results

NPUMP

INTEGER

Number of pumparounds

NPRRES

INTEGER

Number of pumparound results

NFRCON

INTEGER

Number of furnace streams

NFRRES

INTEGER

Number of furnace results

NFPROP

INTEGER

Number of furnace component


properties

NFCOMP

INTEGER

Number of furnace components

NSTRCN

INTEGER

Number of connectivity streams

NCNRES

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

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NRES

INTEGER

Number of column results

NAME

CHARACTER*8

Side stripper name

PNAMES

CHARACTER*12 NRES

3 Block Result Subroutines

Dimension

Description

Property name. See Appendix B for


a description.

55

Variable

I/O Type

Dimension

Description

RVALS

REAL*8

NRES

Results

TYPES

CHARACTER*12 NRES

Units type

LABELS

CHARACTER*16 NRES

Units label

IERR

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NPROF

INTEGER

Number of profile properties. (Use the


value NMOLE, NMASS, or SVOL from
TKNPET.)

BASIS

CHARACTER*4

Basis for profile (MOLE, MASS, or


SVOL)

PNAMES

CHARACTER*12 NPROF

Property name. See Appendix B for a


description.

IERR

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

56

(BLKID, PNAME, ICOL, NSTAGE, BASIS, RVALS, TYPE,


LABEL, IERR)

3 Block Result Subroutines

Argument List Descriptions for TKPTPR


Variable I/O Type

Dimension Description

BLKID

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Profile property name from TKPTAD

ICOL

INTEGER

Column number

NSTAGE

INTEGER

Number of stages

BASIS

CHARACTER*4

Basis for profile (MOLE, MASS, or SVOL)

RVALS

REAL*8

NSTAGE

Real values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

BLKID

CHARACTER*(*)

Block ID

ICON

INTEGER

Connection number

NFRRES

INTEGER

Number of properties

PNAMES

CHARACTER*12 NFRRES

Property name. See Appendix B for a


description.

ITYPES

INTEGER

NFRRES

Result type
(1=Integer, 2=Real, 3=Character)

IVALS

INTEGER

NFRRES

CVALS

CHARACTER*12 NFFRES

Character values

RVALS

REAL*8

Real values

TYPES

CHARACTER*12 NFRRES

Units type

LABELS

CHARACTER*16 NFRRES

Units label

IERR

INTEGER

Error flag (0=No error)

NFRRES

Description

Integer values

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

57

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

CHARACTER*(*)

Block ID

NFPROP

INTEGER

Number of properties

NFCOMP

INTEGER

PNAMES

CHARACTER*12 NFPROP

Property name. See Appendix B


for a description.

Number of components

COMPID

CHARACTER*8

NFCOMP

Component names

RVALS

REAL*8

NFCOMP* NFPROPReal values

TYPES

CHARACTER*12 NFPROP

Units type

LABELS

CHARACTER*16 NFPROP

Units label

IERR

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

58

Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

IPUMP

INTEGER

Pumparound number

NPRRES

INTEGER

Number of properties

3 Block Result Subroutines

Variable

I/O Type

PNAMES

CHARACTER*12 NPRRES

Property name. See Appendix B for a


description.

ITYPES

INTEGER

Result type (1=Integer, 2=Real)

IVALS

INTEGER

NPRRES

Integer values

RVALS

REAL*8

NPPRES

Real values

TYPES

CHARACTER*12 NPRRES

Units type

LABELS

CHARACTER*16 NPRRES

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine,

Dimension

NPRRES

Description

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

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

ICON

INTEGER

Connection number

NCNRES

INTEGER

Number of properties

PNAMES

CHARACTER*12 NCNRES

Property name. See Appendix B for


a description.

ITYPES

INTEGER

NCNRES

Result type
(1=Integer, 2=Real)

IVALS

INTEGER

NCNRES

Integer values

CVALS

CHARACTER*12 NCNRES

Character values

RVALS

REAL*8

Real values

TYPES

CHARACTER*12 NCNRES

Units type

LABELS

CHARACTER*16 NCNRES

Units label

IERR

INTEGER

Error flag (0=No error)

NCNRES

Description

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

59

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.

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.

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NRES

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

60

(BLKID, ICOL, NRES, PNAMES, RVALS, TYPES, LABELS,


IERR)

3 Block Result Subroutines

Argument List Descriptions for TKRTRS


Variable I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NRES

INTEGER

Number of scalar results

PNAMES

CHARACTER*12

Property names. See Appendix B for a


description.

RVALS

REAL*8

Real values

TYPES

CHARACTER*12 NRES

Unit types

LABELS

CHARACTER*16 NRES

Unit labels

IERR

INTEGER

Error flag
(0=No error)

NRES

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

CHARACTER*(*)

Block ID

NCP

INTEGER

Number of components in outlet


streams

NSTREAM

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

3 Block Result Subroutines

(BLKID, NCP, NSTREAM, COMPID, STRMID, SFRACS,


IERR)

61

Argument List Descriptions for TKRTSR


Variable I/O Type

Dimension

Description

BLKID

CHARACTER*(*
)

Block ID

NCP

INTEGER

Number of components in outlet


streams

NSTREAM I

INTEGER

Number of outlet streams

COMPID

CHARACTER*8 NCP

Component IDs

STRMID

CHARACTER*8 NSTREAM

Outlet Stream IDs

SFRACS

REAL*8

NSTREAM* NCPComponent Split Fractions

IERR

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NSTAGE

INTEGER

Number of sections (Use NSTAGE


from TKPROF)

NLIQ

INTEGER

NSTAGE

Number of liquid phases

IERR

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.

62

3 Block Result Subroutines

Calling Sequence for TKTREP


CALL TKTREP

(BLKID, ICOL, NSTAGE, NPROP)

Argument List Descriptions for TKTREP


Variable

I/O

Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NSTAGE

INTEGER

Number of stage values

NPROP

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

INUM

INTEGER

Property sequence number

NSTAGE

INTEGER

Number of stage values

ISTAGE

INTEGER

NSTAGE

List of stage numbers

PNAME

CHARACTER*12

Property name. See Appendix B for


a description.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis
(MOLE, MASS, or FLOW)

RVALS

REAL*8

NSTAGE

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine


Can be left unspecified.

3 Block Result Subroutines

63

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

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number

NSTAGE

INTEGER

Number of stage values

ISTAGE

INTEGER

NSTAGE

List of stage numbers

PNAME

CHARACTER*12

Property name. See Appendix B for a


list of valid property names.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NSTAGE

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Description

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:

64

Call subroutine TKNCOL to determine the number of columns where


appropriate.

Call subroutine TKNSEC to determine the number of sections in the


column.

Call subroutine TKLSEC to list the column section types and their
numbers.

3 Block Result Subroutines

Call subroutine TKSSEC to determine the dimensions of a section.

Call subroutine TKSCRS to retrieve the scalar results for the column
section.

Call subroutine TKPSEC to obtain a list of the properties in a section


profile.

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number
(MultiFrac and PetroFrac)

NSECT

INTEGER

Number of sections

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

Column Section Types and Numbers


Call subroutine TKLSEC to list the section types and numbers used to identify
individual sections.

Calling Sequence for TKLSEC


CALL TKLSEC

3 Block Result Subroutines

(BLKID, ICOL, NSECT, TYPES, NUMBRS, IERR)

65

Argument List Descriptions for TKLSEC


Variable

I/O

Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number.
(MultiFrac and PetroFrac)

NSECT

INTEGER

Number of sections

TYPES

CHARACTER*12 NSECT

Types of column sections


(see above)

NUMBRS

INTEGER

NSECT

Section numbers

IERR

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number
(MultiFrac and PetroFrac)

TYPE

CHARACTER*12

Section type (see above)

NUMBER

INTEGER

Section number

NSTAGE

INTEGER

Number of stages in the


section

NPROF

INTEGER

Number of profile properties

NSCAL

INTEGER

Number of scalar properties

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

66

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number
(MultiFrac and PetroFrac)

TYPE

CHARACTER*12

Section type (see above)

NUMBER

INTEGER

Section number

NSCAL

INTEGER

Number of scalar properties

PNAMES

CHARACTER*12

NSCAL

Property name. See Appendix B


for a description.

ITYPES

INTEGER

NSCAL

Result types
(1=Integer value
2=Real*8 value
3=Character*12 value)

IVALS

INTEGER

NSCAL

Integer result

CVALS

CHARACTER*12

NSCAL

Character result

RVALS

REAL*8

NSCAL

Real result

UTYPES

CHARACTER*12

NSCAL

Units types

LABELS

CHARACTER*16

NSCAL

Units labels

IERR

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

3 Block Result Subroutines

(BLKID, ICOL, TYPE, NUMBER, NPROF, PNAMES,


PANELS, IERR)

67

Argument List Descriptions for TKPSEC


Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number
(MultiFrac and PetroFrac)

TYPE

CHARACTER*12

Section type (see above)

NUMBER

INTEGER

Section number

NPROF

INTEGER

Number of profile properties

PNAMES

CHARACTER*12 NPROF

Property name. See Appendix B for


a description.

PANELS

CHARACTER*1

NPROF

Panel identifier (A, B, C, D)


(TRAY-RATE only)

IERR

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

BLKID

CHARACTER*(*)

Block ID

ICOL

INTEGER

Column number
(MultiFrac and PetroFrac)

TYPE

CHARACTER*12

Section type (see above)

NUMBER

INTEGER

Section number

NSTAGE

INTEGER

Number of stages in section

ISTAGE

INTEGER

NSTAGE

PNAME

CHARACTER*12

Property name from TKPSEC

PANEL

CHARACTER*1

Panel identifier (A, B, C, D)


(TRAY-RATE only)

RVALS

REAL*8

NSTAGE

Property values

UTYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Description

List of stage numbers

I = Input to subroutine, O = Output from subroutine

68

3 Block Result Subroutines

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.

Call subroutine TKRPRF to determine the dimensions of the profile.

Call subroutine TKRPRP to list the properties.

Retrieve the property values. Call subroutine TKRPR1 for non-componentdependent 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

CHARACTER*(*)

Block ID

NSUB

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

3 Block Result Subroutines

(BLKID, ISUB, SUBSID, NPOINT, NCP, NPROP)

69

Argument List Descriptions for TKRPRF


Variable

I/O

Type

Dimension

Description

BLKID

CHARACTER*(*)

ISUB

INTEGER

Substream number

SUBSID

CHARACTER*8

Substream ID

NPOINT

INTEGER

Number of output points

NCP

INTEGER

Number of components present

NPROP

INTEGER

Number of properties

Block ID

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

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

NPROP

INTEGER

Number of properties

ITYPES

INTEGER

NPROP

Property type:
1=Non-component-dependent
2=Component-dependent
3=Component attributes
4=Continuous feed stream property

PNAMES

CHARACTER*12 NPROP

Property name. See Appendix B for a


description.

IERR

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

70

3 Block Result Subroutines

Calling Sequence for TKRPR1


CALL TKRPR1

(BLKID, PNAME, SUBSID, NPOINT, RVALS, TYPE,


LABEL, IERR)

Argument List Descriptions for TKRPR1


Variable

I/O

Type

Dimension

BLKID

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name from TKRPRP

SUBSID

CHARACTER*8

Substream ID

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Description

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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name from TKRPRP

SUBSID

CHARACTER*8

Substream ID

NCP

INTEGER

Number of components present

COMPID

CHARACTER*8

NCP

Component IDs

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NCP* NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

71

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

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

NCP

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

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

ICP

INTEGER

Component sequence number

COMPID

CHARACTER*8

Component ID

NATT

INTEGER

Number of attributes

I = Input to subroutine, O = Output from subroutine

Details of a Component Attribute


Call subroutine TKRSCA to retrieve the number of elements the component
attribute has. The component attribute is specified by supplying the sequence
number of the component attribute (for example, 1 for the first attribute).
The corresponding component attribute ID is returned.

Calling Sequence for TKRSCA


CALL TKRSCA

72

(BLKID, SUBSID, COMPID, IDSEQ, IDATT, NELEM)

3 Block Result Subroutines

Argument List Descriptions For TKRSCA


Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

COMPID

CHARACTER*8

Component ID

IDSEQ

INTEGER

Sequence number of attribute

IDATT

CHARACTER*8

Attribute ID

NELEM

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

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

COMPID

CHARACTER*8

Component ID

IDATT

CHARACTER*8

Attribute ID

NELEM

INTEGER

Number of elements

NPOINT

INTEGER

Number of points

ELEMID

CHARACTER*8

NELEM

Element names

RVALS

REAL*8

NELEM* POINT

Property values

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

Number of Continuous Feed Streams


Call subroutine TKRNFS to determine the number of continuous feed streams
to an RBatch block. This number is used for the continuous feed stream
properties.

Calling Sequence for TKRNFS


CALL TKRNFS

3 Block Result Subroutines

(BLKID, SUBSID, NFS)

73

Argument List Descriptions For TKRNFS


Variable I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

NFS

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

BLKID

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

IFEED

INTEGER

Feed stream number

IDFEED

CHARACTER*8

Continuous feed stream ID

PNAME

CHARACTER*12

NPOINT

INTEGER

Number of points

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Description

Property name from TKRPRP

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:

74

Call subroutine TKVAPF to determine the dimensions of the profile.

Call subroutine TKVAPR to list the properties.

Call subroutine TKVAR1 to retrieve the property values for noncomponent-dependent properties, or subroutine TKVAR2 to retrieve the
property values for component-dependent properties.

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of output points

NCP

INTEGER

Number of components present

NPROP

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

BLKID

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of properties

ITYPES

INTEGER

NPROP

Property type:
1=Non-component-dependent
2=Component-dependent

PNAMES

CHARACTER*12 NPROP

Property name. See Appendix B


for a description.

IERR

INTEGER

Error flag (0=No error)

Description

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

75

Non-Component-Dependent Vent Accumulator


Profiles
Call subroutine TKVAR1 to retrieve RBatch vent accumulator profiles for noncomponent-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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name from TKVAPR

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name from TKVAPR

NCP

INTEGER

Number of components present

COMPID

CHARACTER*8

NCP

Component IDs

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NCP* NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

76

3 Block Result Subroutines

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.

Call subroutine TKVTPR to list the properties.

Call subroutine TKVTR1 to retrieve the property values for noncomponent-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

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of output points

NCP

INTEGER

Number of components present

NPROP

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

BLKID

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of properties

ITYPES

INTEGER

NPROP

Property type
(1=Non-component-dependent,
2=Component-dependent)

3 Block Result Subroutines

Dimension

Description

77

Variable

I/O

Type

Dimension

Description

PNAMES

CHARACTER*12 NPROP

Property name. See Appendix B


for a description.

IERR

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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name from TKVTPR

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

Calling Sequence for TKVTR2


CALL TKVTR2

(BLKID, PNAME, NCP, COMPID, NPOINT, RVALS, TYPE,


LABEL, IERR)

Argument List Descriptions for TKVTR2

78

Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name from TKVTPR

NCP

INTEGER

Number of components present

COMPID

CHARACTER*8

NCP

Component Ids

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NCP* NPOINT Property values

TYPE

CHARACTER*12

Units type

3 Block Result Subroutines

Variable

I/O Type

Dimension

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Description

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 threestep process:
1

Call subroutine TKRRPF to determine the number of reactions.

Call subroutine TKRRPR to retrieve the equilibrium constants or reaction


data.

Call subroutine TKRRHR to retrieve the heat of reaction data for RStoic.
Use these additional two steps to retrieve the component selectivity
results:

Call subroutine TKRRNS to determine the number of selectivity results.

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

BLKID
NREAC

Type

Dimension

Description

CHARACTER*(*)

Block ID

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.

Calling Sequence for TKRRPR


CALL TKRRPR

3 Block Result Subroutines

(BLKID, NPROP, NREAC, PNAMES, RVALS, TYPES,


LABELS, IERR)

79

Argument List Descriptions for TKRRPR


Variable

I/O

BLKID
NPROP

Type

Dimension

Description

CHARACTER*(*)

Block ID

INTEGER

Use NPROP = 1 Number of


properties

NREAC

INTEGER

Number of reactions

PNAMES

CHARACTER*12

NPROP

Property name. See Appendix


B for a description.

RVALS

REAL*8

NPROP* NREAC Real results

TYPES

CHARACTER*12

NPROP

Units type

LABELS

CHARACTER*16

NPROP

Units label

IERR

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

BLKID

Type

Dimension

Description

CHARACTER*(*)

Block ID

NREAC

INTEGER

Number of reactions

COMPID

CHARACTER*12

NREAC

Reference component ID

RVALS

REAL*8

NREAC

Real results

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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.

Calling Sequence for TKRRNS


CALL TKRRNS

80

(BLKID, NSEL)

3 Block Result Subroutines

Argument List Descriptions for TKRRNS

Variable

I/O

Type

Dimension

BLKID

CHARACTER*(*)

Block ID

NSEL

INTEGER

Number of selectivity
specifications

Description

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

CHARACTER*(*)

Block ID

NSEL

INTEGER

Number of selectivity
specifications

PCOMPS

CHARACTER*8

NSEL

Product component

PSUBS

CHARACTER*8

NSEL

Product component substream

RCOMPS

CHARACTER*8

NSEL

Reference component (reactant)

RSUBS

CHARACTER*8

NSEL

Reference component substream

RVALS

REAL*8

NSEL

Component selectivity

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

81

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.

Call TKSRRP to determine the size of a reactor report.

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

CHARACTER*(*)

Block ID

NRPRT

INTEGER

Number of reactor property reports

TYPES

CHARACTER*12 3

Types of property reports (see


above)

IERR

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.

82

3 Block Result Subroutines

Calling Sequence for TKSRRP


CALL TKSRRP

(BLKID, TYPE, NPOINT, NPROP, IERR)

Argument List Descriptions for TKSRRP


Variable I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

TYPE

CHARACTER*12

Type of property report (see above)

NPOINT

INTEGER

Number of points

NPROP

INTEGER

Number of properties

IERR

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

CHARACTER*(*)

Block ID

TYPE

CHARACTER*12

Type of property report (see above)

NPOINT

INTEGER

Number of points

IPROP

INTEGER

Property sequence number

PNAME

CHARACTER*12

Property name. See Appendix B for


a description.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NPOINT

Property values

UTYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine


Can be left unspecified

3 Block Result Subroutines

83

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

BLKID

CHARACTER*(*)

Block ID

TYPE

CHARACTER*12

Type of property report (see


above)

NPOINT

INTEGER

Number of points

PNAME

CHARACTER*12

Property name. See Appendix B


for a list of valid property names.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis
(WET or DRY)

BASIS

CHARACTER*4

Units basis

RVALS

REAL*8

NPOINT

Property values

UTYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag
(0=No error)

Description

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:

84

Call subroutine TKPLSZ to retrieve the dimensions of the pipeline results.

Call subroutine TKPLIO to retrieve the inlet and outlet conditions.

Call subroutine TKPLCP to retrieve the inlet and outlet property names for
components in a pipeline.

Call subroutine TKPLCO to retrieve the inlet and outlet conditions for
components in a pipeline.

3 Block Result Subroutines

Call subroutine TKPLSP to retrieve the segment data property names.

Call subroutine TKPLSG to retrieve the segment data.

Call subroutine TKPLNP to retrieve the node property names.

Call subroutine TKPLND to retrieve the node results.

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

CHARACTER*(*)

Block ID

NIORES

INTEGER

Number of inlet/outlet condition


results

NCC

INTEGER

Number of components present

NCCPRP

INTEGER

Number of component properties

NSEG

INTEGER

Number of pipeline segments

NSGPRP

INTEGER

Number of segment properties

NNODE

INTEGER

Number of pipeline nodes

NNDPRP

INTEGER

Number of node properties

NPOINT

INTEGER

Number of pipeline profile points

NPROF

INTEGER

Number of profile properties

IERR

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.

3 Block Result Subroutines

85

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

CHARACTER*(*)

Block ID

NIORES

INTEGER

Number of results

PNAMES

CHARACTER*12 NIORES

Property name. See Appendix B for a


description.

ITYPES

INTEGER

Data type of results (2=Real,


3=Character)

CVALSI

CHARACTER*12 NIORES

Inlet character results

CVALSO

CHARACTER*12 NIORES

Outlet character results

RVALSI

REAL*8

NIORES

Inlet real results

RVALSO

REAL*8

NIORES

Outlet real results

TYPES

CHARACTER*12 NIORES

Units types

LABELS

CHARACTER*16 NIORES

Units labels

IERR

INTEGER

Error flag (0=No error)

NIORES

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

BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NCCPRP

INTEGER

PNAMES

CHARACTER*12 NCCPRP

Property name. See Appendix B for


a description.

IERR

INTEGER

Error flag (0=No error)

Number of component properties

I = Input to subroutine, O = Output from subroutine

86

3 Block Result Subroutines

Component-Dependent Pipeline Inlet and


Outlet Conditions
Call subroutine TKPLCO to retrieve the results for a specified componentdependent 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

BLKID

Dimension

CHARACTER*(*
)

Description
Block ID

NCC

INTEGER

PNAME

CHARACTER*12

Property name from TKPLCP

Number of components

RVALSI

REAL*8

NCC

Inlet results

RVALSO

REAL*8

NCC

Outlet results

TYPE

INTEGER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

CHARACTER*(*)

Block ID

NSGPRP

INTEGER

Number of segments

PNAMES

CHARACTER*12

NSGPRP

Property name. See Appendix B


for a description.

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

87

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

BLKID

CHARACTER*(*)

Block ID

NSEG

INTEGER

Number of pipeline segments

PNAME

CHARACTER*12

Property name from TKPLSP

ITYPE

INTEGER

Data type of results (2=Real,


3=Character)

RVALS

REAL*8

NSEG

Real results

CVALS

CHARACTER*12 NSEG

Character results

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Description

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

CHARACTER*(*)

Block ID

NNDPRP

INTEGER

Number of node properties

PNAMES

CHARACTER*12 NNDPRP

Property name. See Appendix B for a


description.

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

88

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

NNODE

INTEGER

Number of nodes

PNAME

CHARACTER*12

Property name from TKPLNP

ITYPE

INTEGER

Data type of results


(2=Real, 3=Character)

RVALS

REAL*8

NNODE

Segment results

CVALS

CHARACTER*12

NNODE

Character segment results

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

BLKID

CHARACTER*(*)

Block ID

NPROF

INTEGER

Number of profile properties

PNAMES

CHARACTER*12 NPROF

Property name. See Appendix B for


a description.

IERR

INTEGER

Error flag (0=No error)

Description

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

89

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

BLKID

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of profile points

PNAME

CHARACTER*12

Property name from TKPLPP

RVALS

REAL*8

Profile results

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

NPOINT

Description

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:

90

Call subroutine TKPISP to retrieve the dimensions of the standard profiles.

Call subroutine TKPINP to retrieve the names of the standard profile


properties.

Call subroutine TKPIPR to retrieve results for standard profile properties.

Call subroutine TKPLSZ to retrieve the number of fluid properties. For a


description of TKPLSZ, see Pipeline Results Dimensions, this chapter.

Call subroutine TKPLPP to retrieve the names of the fluid properties. For a
description of TKPLPP, see Pipeline Profile Property Names, this chapter.

Call subroutine TKPLPR to retrieve the fluid properties results. For a


description of TKPLPR, see Pipeline Profile Results, this chapter.

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of profile points

NPROP

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

BLKID

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of profile properties

PNAMES

CHARACTER*12 NPROP

Property name. See Appendix B for


a description.

IERR

INTEGER

Error flag (0=No error)

Description

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

3 Block Result Subroutines

(BLKID, NPOINT, PNAME, RVALS, TYPE, LABEL, IERR)

91

Argument List Descriptions for TKPIPR


Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of profile points

PNAME

CHARACTER*12

Property name from TKPINP

RVALS

REAL*8

NPOINT

Real results

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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.

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

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of profile points

NPROP

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:

92

Property qualifiers.

Property values.

Units type.

Units label.

3 Block Result Subroutines

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

BLKID

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of profile points

IPROP

INTEGER

Property sequence number

PNAME

CHARACTER*12

Property name. See Appendix B for


a description.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Unit basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Description

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

CHARACTER*(*)

Description

BLKID

NPOINT

INTEGER

PNAME

CHARACTER*12

Property name. See Appendix B for a


list of valid property names.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

3 Block Result Subroutines

Block ID
Number of profile points

93

Variable I/O Type

Dimension

Description

BASIS

CHARACTER*4

Unit basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

BLKID

CHARACTER*(*)

Block ID

NPH

INTEGER

Number of phases (2=VLE, 3=VLLE)

NCP

INTEGER

Number of components present

COMPID

CHARACTER*8

NCP

Component IDs

REAL*8

NCP

Feed mole fractions

REAL*8

NCP

Liquid mole fractions (for VLE) or


Liquid1 mole fractions (for VLLE)

REAL*8

NCP

Vapor mole fractions

RK

REAL*8

NCP

Vapor-Liquid K-value (for VLE) or


Vapor-Liquid1 K-value (for VLLE)

X2

REAL*8

NCP

Liquid2 mole fractions

RK2

REAL*8

NCP

Vapor-Liquid2 K-value

Description

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:

94

3 Block Result Subroutines

Call TKNHCR to determine the number of heating/cooling curves for a


block.

Call TKLHCR to list the heating/cooling curve types and numbers.

Call TKSHCR to determine the size of a heating/cooling curve.

Call TKHCUR to retrieve the standard results (temperature, pressure,


vapor fraction, and duty) for a heating/cooling curve.

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

BLKID

CHARACTER*(*)

Block ID

NCURVE

INTEGER

Number of heating/cooling curves

Description

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

3 Block Result Subroutines

(BLKID, NCURVE, ID2, TYPES, NUMBER, IERR)

95

Argument List Descriptions for TKLHCR


Variable

I/O Type

BLKID

Dimension

CHARACTER*(*)

Description
Block ID

NCURVE

INTEGER

Number of heating/cooling curves

ID2

CHARACTER*8

NCURVE

ID of PetroFrac main column,


pumparound, or stripper

TYPES

CHARACTER*16 NCURVE

Type of heating/cooling curve (see


below)

NUMBER

INTEGER

NCURVE

Heating/cooling curve number of


each curve

IERR

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

CHARACTER*(*)

Block ID

ID2

CHARACTER*8

ID of PetroFrac main column,


pumparound, or stripper

TYPE

CHARACTER*16

Type of heating/cooling curve

NUMBER

INTEGER

Heating/cooling curve number

NPOINT

INTEGER

Number of points in curve

NPROP

INTEGER

Number of properties

I = Input to subroutine, O = Output from subroutine

96

3 Block Result Subroutines

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

CHARACTER*(*)

Block ID

ID2

CHARACTER*8

TYPE

CHARACTER*16

Type of heating/cooling curve

NUMBER

INTEGER

Heating/cooling curve number

NPOINT

INTEGER

Number of points

IERFLG

INTEGER

NPOINT

Status flag for each point


0=OK
1=Errors in this row
2=Dew point
3=Bubble point)

TEMP

REAL*8

NPOINT

Temperature at each point

PRES

REAL*8

NPOINT

Pressure at each point

VFRAC

REAL*8

NPOINT

Vapor fraction at each point

DUTY

REAL*8

NPOINT

Duty at each point

IERR

INTEGER

Error flag (0=No error)

ID of PetroFrac main column,


pumparound, or stripper

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

3 Block Result Subroutines

(BLKID, ID2, TYPE, NUMBER, NPOINT, IPROP, PNAME,


SUBSID, PHASE, COMPID, WETDRY, BASIS, RVALS,
UTYPE, LABEL, IERR)

97

Argument List Descriptions for TKNHCP


Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

ID2

CHARACTER*8

TYPE

CHARACTER*16

Type of heating/cooling curve

NUMBER

INTEGER

Heating/cooling curve number

NPOINT

INTEGER

Number of points in curve

IPROP

INTEGER

Property sequence number

PNAME

CHARACTER*12

Property name. See Appendix B for


a description.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or


FLOW)

RVALS

REAL*8

NPOINT

Real values

UTYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

ID of PetroFrac main column,


pumparound, or stripper

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

98

Variable

I/O Type

Dimension

Description

BLKID

CHARACTER*(*)

Block ID

ID2

CHARACTER*8

ID of PetroFrac main column,


pumparound, or stripper

TYPE

CHARACTER*16

Type of heating/cooling curve

3 Block Result Subroutines

Variable

I/O Type

Dimension

Description

NUMBER

INTEGER

Heating/cooling curve number

NPOINT

INTEGER

PNAME

CHARACTER*12

Property name. See Appendix B for


a list of valid property names.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NPOINT

Real values

UTYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

Number of points in curve

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

CHARACTER*(*)

Block ID

TYPE

CHARACTER*16

Type of heating/cooling curve

NUMBER

INTEGER

Heating/cooling curve number

INTID

INTEGER

Interconnecting stream ID for


MultiFrac

CHARID

CHARACTER*8

Not currently used

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

3 Block Result Subroutines

99

100

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

INTEGER

Stream number

STRMID O

CHARACTER*(*) NSTRM

Stream ID

STRTYP

CHARACTER*12 NSTRM

Stream type (MATERIAL, HEAT, or


WORK)

IERR

INTEGER

Error flag
(0=No error)

4 Stream Result Subroutines

101

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

INTEGER

STRMID

CHARACTER*(*)

Stream ID

STRTYP

CHARACTER*12

Stream type (MATERIAL, HEAT, or


WORK)

IERR

INTEGER

Error flag (0=No error)

Stream number

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

102

Variable

I/O

Type

Dimension

Description

STRMID

CHARACTER*(*)

Stream ID

SOURCE

CHARACTER*(*)

Source block ID

DEST

CHARACTER*(*)

Destination block ID

NSUBS

INTEGER

Number of substreams

LEN

INTEGER

Number of stream results

4 Stream Result Subroutines

Variable

I/O

Type

Dimension

Description

IERR

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

CHARACTER*(*)

Stream ID

NSUB

INTEGER

Number of substreams

SUBSID

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

STRMID

CHARACTER*(*)

Stream ID

LEN

INTEGER

Number of stream results

QUALS

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

REAL*8

Real results

TYPES

CHARACTER*12 LEN

Units type

LABELS

CHARACTER*16 LEN

Units label

IERR

INTEGER

Error flag (0=No error)

LEN

Description

I = Input to subroutine, O = Output from subroutine

4 Stream Result Subroutines

103

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

STRMID

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

PNAME

CHARACTER*12

Property name. See Appendix B for a


list of valid property names.

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

1 or NCOMP Real results (Use NCOMP if value is


for a component property.)

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag
(0=No error)

Description

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

104

(STRMID, STRTYP, VALUE, LABEL)

4 Stream Result Subroutines

Argument List Descriptions for TKSTRA


Variable

I/O Type

Dimension Description

STRMID

CHARACTER*(*)

Stream ID

STRTYP

CHARACTER*4

Stream type (HEAT or WORK)

VALUE

REAL*8

Result value

LABEL

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 fourstep process:
1

Call TKSNAC to determine the number of components with attributes in


the substream.

Call TKSNCA to determine the number of attributes for a component in a


substream.

Call TKSSCA to determine the size of a component attribute.

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

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

NAC

INTEGER

Number of components with attributes

I = Input to subroutine, O = Output from subroutine

4 Stream Result Subroutines

105

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

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

ICOMP

INTEGER

Component sequence number

COMPID

CHARACTER*8

Component ID

NATT

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

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

COMPID

CHARACTER*8

Component ID

IATT

INTEGER

Attribute sequence number

IDATT

CHARACTER*8

Attribute name

NELEM

INTEGER

Number of elements

I = Input to subroutine, O = Output from subroutine

106

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

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

COMPID

CHARACTER*8

Component ID

IDATT

CHARACTER*8

Attribute name

NELEM

INTEGER

Number of elements

ELEMID

CHARACTER*8

NELEM

Names of elements

VALUES

REAL*8

NELEM

Real values

IERR

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 threestep process:
1

Call TKSNSA to get the number of substream attributes in a substream.

Call TKSSSA to get the size of a substream attribute.

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

4 Stream Result Subroutines

(STRMID, SUBSID, NSATT)

107

Argument List Descriptions for TKSNSA


Variable I/O Type

Dimension Description

STRMID

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

NSATT

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

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

ISATT

INTEGER

Attribute sequence number

SATID

CHARACTER*8

Attribute ID

NELEM

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

CHARACTER*(*)

Stream ID

SUBSID

CHARACTER*8

Substream ID

SATID

CHARACTER*8

Attribute ID

NELEM

INTEGER

Number of elements

VALUES

REAL*8

NELEM

Real values

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

108

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.

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

CHARACTER*(*)

Stream ID

NVAL

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

CHARACTER*(*)

Stream ID

NVAL

INTEGER

Number of values

PNAME

CHARACTER*12 NVAL

Property name. See Appendix B for a


description.

SUBSID

CHARACTER*8

NVAL

Substream ID

PHASE

CHARACTER*8

NVAL

Phase

COMPID

CHARACTER*8

NVAL

Component ID

WETDRY

CHARACTER*4

NVAL

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

NVAL

Units basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NVAL

Real results

4 Stream Result Subroutines

109

Variable I/O Type

Dimension Description

TYPES

CHARACTER*12 NVAL

Units types

LABELS

CHARACTER*16 NVAL

Units labels

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine


Can be left unspecified.

110

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

111

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

INTEGER

TABID

CHARACTER*(*)

Property table ID

TYPE

CHARACTER*12

Property table type (PROPS,


FLASHCURVE, or PTENVELOPE)

IERR

INTEGER

Error flag (0=No error)

Property table sequence number

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

112

Dimension Description

TABID

CHARACTER*(*)

Property table ID

NPOINT

INTEGER

Number of points

NPROP

INTEGER

Number of properties

IERR

INTEGER

Error flag (0=No error)

5 Physical Property Table Results Subroutines

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

CHARACTER*(*)

Property table ID

NPOINT

INTEGER

Number of points

IPROP

INTEGER

Property number

PNAME

CHARACTER*12

Property name. See Appendix B for a


description.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NPOINT

Real values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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)

Argument List Descriptions for TKPPRP


Variable I/O Type

Dimension Description

TABID

CHARACTER*(*)

Property table ID

NPOINT

INTEGER

Number of points

5 Physical Property Table Results Subroutines

113

PNAME

CHARACTER*12

Property name. See Appendix B for a


list of valid property names.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

RVALS

REAL*8

NPOINT

Real values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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.

Call TKSENV to determine the size of each branch of an envelope.

Call TKPTEV to retrieve the temperature and pressure along each branch
of an envelope.

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)

Argument List Descriptions for TKNENV


Variable I/O Type

114

Dimension

Description

TABID

CHARACTER*(*)

Property table ID

NENVL

INTEGER

Number of envelopes

NPROP

INTEGER

Number of properties

5 Physical Property Table Results Subroutines

IERR

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

CHARACTER*(*)

Property table ID

IENVL

INTEGER

Envelope number

NP1

INTEGER

Number of points in the first branch

NP2

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

CHARACTER*(*)

Property table ID

IENVL

INTEGER

Envelope number

NP1

INTEGER

Number of points in the first branch

NP2

INTEGER

Number of points in the complementary


branch

VFRAC1

REAL*8

Vapor fraction for the first branch

VFRAC2

REAL*8

Vapor fraction for the complementary


branch

TEMP1

REAL*8

NP1

Temperature values for the first branch

PRES1

REAL*8

NP1

Pressure values for the first branch

5 Physical Property Table Results Subroutines

115

Variable I/O Type

Dimension Description

TEMP2

REAL*8

NP2

Temperature values for the


complementary branch

PRES2

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

CHARACTER*(*)

Table ID

IENVL

INTEGER

Envelope number

IPROP

INTEGER

Property sequence number

NP1

INTEGER

Number of points along the first branch

NP2

INTEGER

Number of points along the


complementary branch

VFRAC1

REAL*8

Vapor fraction for the first branch

VFRAC2

REAL*8

Vapor fraction for the complementary


branch

PNAME

CHARACTER*12

Property name. See Appendix B for a


description.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

VALS1

REAL*8

NP1

Property values for the first branch

VALS2

REAL*8

NP2

Property values for the complementary


branch

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

I = Input to subroutine, O = Output from subroutine


Can be left unspecified.

116

5 Physical Property Table Results Subroutines

Retrieving Specific Envelope Properties


Call subroutine TKPPEV to retrieve a specific property set from a pressuretemperature 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
TABID

Dimension Description

CHARACTER*(*)

Table ID

IENVL

INTEGER

Envelope number

NP1

INTEGER

Number of points along the first branch

NP2

INTEGER

Number of points along the


complementary branch

PNAME

CHARACTER*12

Property name. See Appendix B for a


list of valid property names.

SUBSID

CHARACTER*8

Substream ID

PHASE

CHARACTER*8

Phase

COMPID

CHARACTER*8

Component ID

WETDRY

CHARACTER*4

Wet/dry basis (WET or DRY)

BASIS

CHARACTER*4

Units basis (MOLE, MASS, or FLOW)

VFRAC1

REAL*8

Vapor fraction of the first branch

VFRAC2

REAL*8

Vapor fraction of the complementary


branch

VALS1

REAL*8

NP1

Property values for the first branch

VALS2

REAL*8

NP2

Property values for the complementary


branch

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

I = Input to subroutine, O = Output from subroutine


Can be left unspecified.

5 Physical Property Table Results Subroutines

117

118

5 Physical Property Table Results Subroutines

6 Costing Results
Subroutines

This chapter describes the use of costing equipment item retrieval subroutines
in the summary file toolkit. Use the subroutines described in this chapter for
retrieving this information about equipment items:

Identification.

Costing and sizing results.

6 Costing Results Subroutines

119

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

NEQUIP

INTEGER

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

INTEGER

Number of equipment items

EQPID

CHARACTER*8

NEQUIP

Equipment item ID

EQPTYP

CHARACTER*12 NEQUIP

Equipment type

IERR

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.

120

6 Costing Results Subroutines

Calling Sequence for TKNEQP


CALL TKNEQP

(IEQUIP, EQPID, EQPTYP, IERR)

Argument List Descriptions for TKNEQP


Variable I/O Type

Dimension Description

IEQUIP

INTEGER

Equipment item number

EQPID

CHARACTER*8

Equipment item ID

EQPTYP

CHARACTER*12

Equipment type

IERR

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

CHARACTER*8

NCALC

INTEGER

Calculated number of equipment items

CSCOST

REAL*8

Carbon steel cost

PCOST

REAL*8

Purchased cost

IERR

INTEGER

Error flag (0=No error)

Equipment Item ID

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.

6 Costing Results Subroutines

121

Calling Sequence for TKNEQS


CALL TKNEQS

(EQPID, NVAL, IERR)

Argument List Descriptions for TKNEQS


Variable I/O Type

Dimension Description

EQPID

CHARACTER*8

Equipment Item ID

NVAL

INTEGER

Number of results

IERR

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
I

CHARACTER*8

NVAL

PNAMES

ITYPES

EQPID

Dimension Description

Equipment item ID

INTEGER

Number of results

CHARACTER*12

NVAL

Property names. See Appendix B for a


description.

INTEGER

NVAL

Result type
(1 = Integer value,
2 = Real*8 value,
3 = Character value)

IVALS

INTEGER

NVAL

Integer result

CVALS

CHARACTER*12

NVAL

Character result

RVALS

REAL*8

NVAL

Real result

UTYPES

CHARACTER*12

NVAL

Units type

LABELS

CHARACTER*16

NVAL

Units label

IERR

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.

122

6 Costing Results Subroutines

7 Pressure Relief
Subroutines

This chapter describes the use of pressure relief retrieval subroutines in the
summary file toolkit. Use the subroutines described in this chapter for:

Pressure relief model identification.

Dynamic and steady-state results.

Scalar results.

Profile results.

Vessel results.

Vent results.

Accumulator results.

7 Pressure Relief Subroutines

123

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
NPR

Dimension Description

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

INTEGER

PRID

CHARACTER*(*) NPR

Pressure relief IDs

IERR

INTEGER

Error flag (0=No error)

Number of pressure relief blocks

I = Input to subroutine, O = Output from subroutine

124

7 Pressure Relief Subroutines

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

INTEGER

PRID

CHARACTER*(*)

Pressure relief ID

IERR

INTEGER

Error flag (0=No error)

Sequence number of pressure relief


blocks

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.

Call subroutine TKPSRF to determine the dimensions of the scalar results


and profiles.

Call TKPSSR to retrieve the dynamic scalar results; call subroutine


TKPSSS to retrieve steady-state results.

Call subroutine TKPSRP to list the dynamic properties; call subroutine


TKPSSP to list the steady-state properties.

For dynamic results, call subroutine TKPSR1 to retrieve the noncomponent-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:

Call subroutine TKPVPF to determine the dimensions of the profile.

Call subroutine TKPVRP to list the properties.

7 Pressure Relief Subroutines

125

Call subroutine TKPVR1 to retrieve the property values for positiondependent 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:

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

CHARACTER*(*)

Block ID

NSUB

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)

Argument List Descriptions for TKPSRF


Variable I/O Type

126

Dimension Description

7 Pressure Relief Subroutines

PRID

CHARACTER*(*)

Block ID

ISUB

INTEGER

Substream number

SUBSID

CHARACTER*8

Substream ID

ISTATE

INTEGER

Results
(1=Steady state,
2=Dynamic)

NSCAL

INTEGER

Number of scalar results

NPOINT

INTEGER

Number of output points

NCP

INTEGER

Number of components present

NPROP

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

CHARACTER*(*)

Block ID

SUBSID

CHARACTER*8

Substream ID

NPROP

INTEGER

Number of properties

ITYPES

INTEGER

NPROP

Property type
(1=Not component-dependent
2=Component-dependent)

PNAMES

CHARACTER*12 NPROP

Property names. See Appendix B for a


description.

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

Calling Sequence for TKPSSP


CALL TKPSSP

7 Pressure Relief Subroutines

(PRID, NPROP, NPOINT, PNAMES, POSIDS, IERR)

127

Argument List Descriptions for TKPSSP


Variable I/O Type

Dimension Description

PRID

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of properties

NPOINT

INTEGER

Number of profile points

PNAMES

CHARACTER*12 NPROP

Property names. See Appendix B for a


description.

POSIDS

CHARACTER*32 NPOINT

Position names

IERR

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

CHARACTER*(*)

Block ID

NSCAL

INTEGER

Number of scalar results

PNAMES

CHARACTER*12

NSCAL

Property name. See Appendix B


for a description.

ITYPES

INTEGER

NSCAL

Data type of result


(1=Integer
2=Real
3=Character
4=Description)

IVALS

INTEGER

NSCAL

Integer property values

CVALS

CHARACTER*12

NSCAL

Character property values

DVALS

CHARACTER*32

NSCAL

Descriptive property values

RVALS

REAL*8

NSCAL

Real property values

TYPES

CHARACTER*12

NSCAL

Units type

LABELS

CHARACTER*16

NSCAL

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

128

7 Pressure Relief Subroutines

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

DimensionDescription

PRID

CHARACTER*(*)

Block ID

NSCAL

INTEGER

Number of scalar results

PNAMES

CHARACTER*12

NSCAL

Property name. See Appendix B for a


description.

ITYPES

INTEGER

NSCAL

Data type of result


(1=Integer
2=Real
3=Character
4=Description)

IVALS

INTEGER

NSCAL

Integer property values

CVALS

CHARACTER*8

NSCAL

Character property values

DVALS

CHARACTER*32

NSCAL

Descriptive property values

RVALS

REAL*8

NSCAL

Real property values

TYPES

CHARACTER*12

NSCAL

Units type

LABELS

CHARACTER*16

NSCAL

Units label

IERR

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

7 Pressure Relief Subroutines

(PRID, PNAME, NPOINT, ITYPES, CVALS, RVALS, TYPE,


LABEL, IERR)

129

Argument List Descriptions for TKPSR1


Variable

I/O

Type

Dimension

Description

PRID

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name. See Appendix


B for a list of valid property
names.

NPOINT

INTEGER

Number of output points

ITYPES

INTEGER

Data type of results


(2=Real
3=Character)

CVALS

CHARACTER*8

NPOINT

Character property values

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name. See Appendix B for


a list of valid property names.

SUBSID

CHARACTER*8

Substream ID

NCP

INTEGER

Number of components present

COMPID O

CHARACTER*8

NCP

Component IDs

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NCP*
NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

130

7 Pressure Relief Subroutines

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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name. See Appendix B for


a list of valid property names.

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of output points

NCP

INTEGER

Number of components
present

NPROP

INTEGER

Number of properties

I = Input to subroutine, O = Output from subroutine

7 Pressure Relief Subroutines

131

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

PRID

CHARACTER*(*)

Block ID

NPROP

INTEGER

Number of properties

ITYPES

INTEGER

NPROP

Property type
(1=Non-component-dependent
2=Component-dependent)

PNAMES

CHARACTER*12 NPROP

Property names. See Appendix B


for a description.

IERR

INTEGER

Error flag (0=No error)

Description

I = Input to subroutine, O = Output from subroutine

Retrieving Non-Component-Dependent
Vent Accumulator Profiles
Call subroutine TKPAR1 to retrieve vent accumulator profiles for noncomponent-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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name. See Appendix


B for a list of valid property
names.

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NPOINT

Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

132

7 Pressure Relief Subroutines

Retrieving Component-Dependent Vent


Accumulator Profiles
Call subroutine TKPAR2 to retrieve vent accumulator profiles for componentdependent 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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name. See Appendix


B for a list of valid property
names.

NCP

INTEGER

Number of components
present

COMPID

CHARACTER*8

NCP

Component IDs

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NCP* NPOINT Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

CHARACTER*(*)

Block ID

NPOINT

INTEGER

Number of output points

NCP

INTEGER

Number of components

7 Pressure Relief Subroutines

133

Variable

I/O

Type

Dimension

Description
present

NPROP

INTEGER

Number of properties

NPOS

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

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

CHARACTER*(*)

Block ID

NPROP
NPOINT

INTEGER

Number of properties

INTEGER

Number of points

ITYPES

INTEGER

NPROP

Property type
(1=Position-dependent
2= Component-dependent)

PNAMES

CHARACTER*12

NPROP

Property names. See


Appendix B for a description.

TIMES

REAL*8

NPOINT

Time intervals

TYPE

CHARACTER*12

Time type

LABEL

CHARACTER*16

Time label

IERR

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

134

(PRID, PNAME, NPOINT, RVALS, TYPE, LABEL, IERR)

7 Pressure Relief Subroutines

Argument List Descriptions for TKPVR1


Variable

I/O Type

Dimension

Description

PRID

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name. See


Appendix B for a list of valid
property names.

NPOS

INTEGER

Number of positions

POSIDS

CHARACTER*16

NPOS

Names of positions

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NPOS* NPOINT Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

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

CHARACTER*(*)

Block ID

PNAME

CHARACTER*12

Property name. See Appendix B


for a list of valid property
names.

NCP

INTEGER

Number of components present

COMPID

CHARACTER*8

NCP

Component Ids

NPOINT

INTEGER

Number of output points

RVALS

REAL*8

NCP* NPOINT Property values

TYPE

CHARACTER*12

Units type

LABEL

CHARACTER*16

Units label

IERR

INTEGER

Error flag (0=No error)

I = Input to subroutine, O = Output from subroutine

7 Pressure Relief Subroutines

135

136

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

Stream Heat and Material Balance Table Generation

Interactive Heating/Cooling Curve Table Generation

Column Profile Results Written to Plot File

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)
CHARACTER*80 SUMFIL, RCPROP, RCUNIT, ASPDIR
CHARACTER UNISET*4, VERSN*20, RUNID*8, DATE*80, INFILE*80,

8 Examples

137

+
+
+
+
C
C
C
C
C

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
Dimension arrays for the toolkit routines.
Arrays are dimensioned for 5 streams, 1000 properties,
and 100 components.

+
+

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.

Get the name of the summary file by prompting the user.

Call TKINIT to perform the initialization.

C
C
C
C
C
C
C
C

Begin executable code.


Get file names for the toolkit.
Get rcpropnu.dat and rcunits.dat by prompting the user
for the name of the directory where the Aspen Plus
Simulation Engine is installed.

50
55

C
C
C

C
C
C
C
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
CONTINUE
CONTINUE
RCPROP = ASPDIR(1:LEN) // '\toolkit\rcpropnu.dat'
RCUNIT = ASPDIR(1:LEN) // '\toolkit\rcunits.dat'
Prompt the user for the name of the summary file:
WRITE(6, *) ' Enter the summary file name: '
READ(5, FMT='(A)') SUMFIL
-------------------------------------------------------Open the summary file and call TKINIT to initialize
the toolkit. If there is an error, end execution.
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

138

8 Examples

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
NPPG = NPPG - 1
GO TO 1000
ENDIF
LL = LEN + 1
CALL TKSPRP(ID,
NPROP, PNAMES, SSID, PHASE, COMPID,

8 Examples

139

+
+

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 componentdependent 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)
ELSE
WRITE(7, 23) QUALS(3,J), XMW(ICOMP),
+
(SVALS(J,JJ),JJ=1,NPPG)
ENDIF
IEND = MOD(ICOMP, NCC)

140

8 Examples

IF (IEND .EQ. 0) WRITE(7, 31) (PLUS,II=1,NPPG), EXCL


ICOMP = ICOMP + 1
ENDIF
CONTINUE

500
C
C
C
C
C

Loop through the PROP-SET properties. The properties are


sorted by phase. If the current phase is different from
the previous phase, then print a new phase header.

OLDNAM = ' '


OLDPHS = ' '
OLDLAB = ' '
IFIRST = 1
DO 600 J = 1, NPROP
L = J + LEN
IF (PHASE(J) .NE. OLDPHS) THEN
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
C

Check for a component qualifier on the property.

C
C
C
C

For component-dependent properties, write the name for


the set of components only once.

600
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

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)
CONTINUE
Underline the final item
WRITE(7,31) (PLUS, II=1, NPG), EXCL

Figure 8.1 Stream Table Results Excerpt


VAP

8 Examples

LIQ

H2RCY

CHRCY

PRODUCT

141

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

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

67.222

35.591

20.167

45.291

38.686

0.13065E-07

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

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

LFRAC

0.00000E+00 1.0000

SFRAC

0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00

0.00000E+00 0.00000E+00

0.00000E+00 1.0000

1.0000

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

14.557

14.557

84.154

MWMX

81.595

81.595

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

142

CP

0.10000E+36 0.25699

0.10000E+36 0.25699

0.10380

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

143

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

144

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

145

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
WRITE(6, 10) (PROPS(JJ),JJ=1,4)

146

8 Examples

500

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

Figure 8.2 Example 2 Program Dialog


Enter the summary filename:
MANU.SUM
The following blocks contain Hcurve results:

8 Examples

147

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.

HCURVE

2
HCURVE
2
Select an Hcurve by specifying its ID.
TEMPERATURE
(F)

PRESSURE
(PSI)

VAPOR
FRACTION

DUTY
(BTU/HR)

103.76

330.00

0.73446

0.00000E+00

156.99

330.00

0.75237

0.52969E+06

198.86

330.00

0.78232

0.10594E+07

231.90

330.00

0.82372

0.15891E+07

258.28

330.00

0.87527

0.21188E+07

279.65

330.00

0.93567

0.26485E+07

296.36

330.00

1.0000

0.31507E+07

300.00

330.00

1.0000

0.31782E+07

Specify the independent variable


either TEMP, PRES, VFRAC, or DUTY.
TEMP
Select properties from the following list:
ID

Property

Phase

KMX

VAPOR

KMX

LIQUID

MUMX

VAPOR

MUMX

LIQUID

Component

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)?
N
Do you want to generate another table (Y/N)?
N

148

8 Examples

Figure 8.3 Sample Output File hcurve.out

8 Examples

Temperature
(F)

KMX Vapor
(BTU-FT/HR-SQFT-R)

MUMX Vapor
(CP)

103.76

0.72312E-01

0.10226E-01

156.99

0.71705E-01

0.11065E-01

198.86

0.67680E-01

0.11734E-01

231.28

0.62145E-01

0.12190E-01

258.28

0.56470E-01

0.12467E-01

279.65

0.51312E-01

0.12626E-01

296.36

0.47088E-01

0.12712E-01

300.00

0.47323E-01

0.12763E-01

149

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

150

8 Examples

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 componentor non-component-dependent.
C
C
Call TKPROF and TKPROP to get a list of properties.
C
CALL TKPROF(ID,ICOL,NSTAGE,NCP,NPROP)
CALL TKPROP(ID,ICOL,NPROP,ITYPES,PNAMES,IERR)
C
C
Prompt the user for the desired property to plot.
C
120 CONTINUE
WRITE(6,*) 'Choose from the following properties:'
WRITE(6,*) '-------------------------------------'
WRITE(6,*) '
'
ITER = ((NPROP-1/5))
DO 130 I = 0,ITER
WRITE(6,*) (PNAMES(5*I+J),J=1,5)
130 CONTINUE
WRITE(6,*) '
'
WRITE(6,*) 'ENTER THE ABBREVIATED NAME OF THE PROPERTY'
READ(5,10) PNAME
C
Uppercase the response using a toolkit utility routine
CALL TKUPPR (PNAME)
INDEX = 0
DO 150 I = 1,NPROP
IF (PNAMES(I) .EQ. PNAME) THEN
INDEX=I
GO TO 151

8 Examples

151

ENDIF
CONTINUE
IF (INDEX .EQ. 0) THEN
WRITE (6,*)
+
'PROPERTY NAME NOT FOUND. PLEASE ENTER AGAIN.'
WRITE (6,*)
GO TO 120
ENDIF
151 CONTINUE
150

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

Call TKCLFL to close the summary file.

Because the plot file was not opened with TKOPEN, close it with the Fortran
CLOSE statement directly:
C
Shut down the toolkit.
CALL TKCLOS (1, 2, 3, 4)
C
Close summary file.
CALL TKCLFL (2, IERR)
C
Close the plot file
CLOSE (7)
C
STOP
END

Figure 8.4 Example 3 Program Dialog


Select a block from the following list:
COLUMN

152

8 Examples

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
1
15
12
10
10
LIQUID DENSITY VS STAGE
STAGE
LIQUID DENSITY
DENSITY

1
2
3
4
5
6
7
8
9
10
11
12
13

8 Examples

LEG1
10

LEG2
0

LEG3
0

LEG4
0

LEG5
0

45.872
36.130
34.708
34.474
34.434
34.427
34.425
34.007
32.150
32.000
31.987
31.986
31.986

153

14
15

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

Call TKBRES to retrieve the results.

Four results are selected from the list of values returned by TKBRES: Q1, QN,
RR, and BU_RATIO.
C
C
Get the basic scalar results for the column, to provide
C
values for Q1, QN, RR, and BR.
C
140 CONTINUE
CALL TKNRES(ID, NRES, NQUAL, IERR)
IF (NRES .EQ. 0 .OR. IERR .NE. 0) THEN

154

8 Examples

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
C

Search the results array for the values wanted.

150

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
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
PNAMES(1) = 'FEED_LFLOW'
CALL TKPRO1(ID, PNAMES, 1, NSTAGE, TVALS(1,6), TYPES,
+
LABELS, IERR)
PNAMES(1) = 'FEED_VFLOW'

8 Examples

155

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.

Figure 8.6 Sample Column Diagram


+-------+
!
! COND-DUTY= -112659.17200
+-----------+
!
!
+---+---+
+----+----+
!
! -------+
T-PROD=
3.89 LBMOL/HR

156

BTU/HR

8 Examples

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

157

158

8 Examples

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

Simulation was completed normally

Simulation was not completed normally, use status button for details

Data regression was completed normally

Data regression was completed with errors, use status button for details

Assay data analysis was completed normally

Assay data analysis was completed with errors, use status button for
details

Calculations were completed normally

Calculations were completed with errors, use status button for details

10

Calculations were completed with warnings, use status button for details

TOTSTAT
TOTSTAT describes the most severe status of all errors / warnings.

9 XML Summary File

159

Value

Most Severe Status

No error/warning

Error

Warning

ITSTAT
ITSTAT gives the input translation status.
Value

Meaning

No problems

Warnings

UOSSTAT, CVSTAT, SENSSTAT, CSSTAT, SSTAT, FORSTAT


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

160

9 XML Summary File

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.

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.

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

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.

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.

161

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.

162

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

Units

Table A.1 - Units Options


Type of Units

Code SI Set

ENG Set

MET Set

Other Units Options

ANGLE

32

RAD

DEG

DEG

AREA

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

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

C, R, DELTA-K, DELTA-F,
DELTA-C, DELTA-R

DENSITY

KG/CUM

LB/CUFT

GM/CC

LB/GAL, GM/CUM, GM/ML,


LB/BBL

DIFFUSIVITY

SQM/SEC

SQFT/HR

SQCM/SEC

CS

DIMENSIONLES 44

UNITLESS

UNITLESS

UNITLESS

UNTLESS, UNITLES

DIPOLEMOMENT 45

(J*CUM)**.5

(BTU*CUFT)**.5 DEBYE

ELEC-POWER

47

WATT

KW

KW

ELEC-PRICE

48

$/J

$/KWHR

$/KWHR

ENERGY

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, $/FTLBF, $/GCAL, $/MMBTU,


$/HP-HR, $/MBTU, $/KJ,
$/MJ, $/GJ, $/N-M,
$/MCAL

ENERGY-VOL

117

CUM/J

BBL/BTU

CUM/J

BBL/MMBTU

ENTHALPY

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

Units

(KJ*CUM)**.5

163

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/OPHR, MMPCU/OP-HR,
KJ/OP-SEC, KW/CYCLE,
GCAL/OP-HR, GCAL/OPDAY

ENTROPY

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

(KGCUM)**.5/SEC

(LBCUFT)**.5/HR

(GM-L)**.5/MIN (LB-GAL)**.5/MIN

FILTER-RESIS

35

1/METER

1/FT

1/METER

FISCAL

FLOW

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, LTONS/MIN, L-TONS/HR,
L-TONS/DAY, MLTONS/YEAR, MMLTONS/YEAR,
KTONNE/YEAR

FLUX

61

CUM/SQM-SEC

CUFT/SQFT-SEC

L/SQM-SEC

L/SQM-HR, GAL/SQFTMIN

FLUX-HEAT-AR

120

WATT/SQM

BTU/HR-SQFT

CAL/SEC-SQM

J/SEC-SQM, MMBTU/HRSQFT, KW/SQM

FLUX-MOLE

121

KMOL/SQM-S

LBMOL/SQFT-HR KMOL/SQM-HR

FORCE

14

NEWTON

LBF

164

1/CM, 1/IN

LBMOL/SQFT-S,
MOL/SQCM-S

DYNE

Units

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, KMKGF/KG, MFT, MJ/KG,
MFT-LBF/LB, FT-HEAD,
METER-HEAD, INCH-HEAD

HEAT

53

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/HRCUFT, 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-SQMK, KJ/SEC-SQM-K,
MMBTU/HR-SQFT-R,
KJ/SEC-SQM-C, MJ/SECSQM-K, MJ/SEC-SQM-C,
GJ/HR-SQM-K, GJ/HRSQM-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-SQCMK/CAL

SEC-SQM-K/KCAL, HRSQM-K/KCAL, HR-SQFTK/PCU, SQM-K/KW, SECSQM-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, LTON, 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

KG/CUM

LB/CUFT

GM/CC

LB/GAL, GM/CUM, GM/ML

MASS-DENSITY 38

Units

165

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, LTONS/MIN, L-TONS/HR,
L-TONS/DAY, MLTONS/YEAR, MMLTONS/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/SQFTHR, TONS/SQFT-HR, LTONS/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/OPSEC, 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-SQMKG/CUM

LB/HR-SQFLB/CUF

GM/S-SQCMGM/CC

MASS-VOLUME

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/SECFT, LBMOL/DAY-FT,


KMOL/DAY-M, MOL/MIN-M

MOLE-CONC

KMOL/CUM

LBMOL/CUFT

MOL/CC

MOL/L, MMOL/CC,
MMOL/L

166

115

64

Units

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

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/MOLK, 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/OPSEC, SCM/CYCLE-HR,
LBMOL/OP-DAY,
KMOL/OP-DAY,
MMSCF/CYCLE-DAY,
SCF/CYCLE-MIN

MOLE-RXNRATE

123

KMOL/CUM-S

LBMOL/CUFT-HR KMOL/CUM-HR

MOL/CC-S

MOLE-VOLUME

43

CUM/KMOL

CUFT/LBMOL

CC/MOL

ML/MOL, BBL/MSCF

MOLES

51

KMOL

LBMOL

KMOL

SCM, MMSCF, MSCF,


MMSCM, MOL, SCF

MOM-INERTIA

112

KG-SQM

LB-SQFT

KG-SQM

GM-SQCM, LB-SQIN

Units

11

167

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/CUMSEC, 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

NO/CUM

NO/CUFT

NO/L

NO/CC, 1E6/CC

57

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, FTLBF/SEC, MW, GW,


MJ/HR, KCAL/HR,
GCAL/HR, MMBTU/HR,
MBTU/HR, MHP

POWERVOLUME

65

WATT/CUM

HP/CUFT

KW/L

KW/CUM

PRESSURE

20

N/SQM

PSI

ATM

LBF/SQFT, BAR, TORR,


IN-WATER, KG/SQCM,
MMHG, KPA, MM-WATER,
MBAR, PSIG, ATMG,
BARG, KG/SQCMG, LB/FTSQSEC, KG/M-SQSEC, PA,
MPA, PAG, KPAG, MPAG,
MBARG, IN-HG, MMHGVAC, IN-HG-VAC, INWATER-60F, IN-WATERVAC, IN-WATER-60F-VAC,
IN-WATER-G, IN-WATER60F-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-HR

SQM/M-S

SQFT/FT-HR

SOLVENT-PERM 71

KG/SQM-S-PA

LB/SQFT-HR-ATM KG/SQM-HRATM

SOUND-LEVEL

111

DECIBELS

DECIBELS

DECIBELS

SPEC-FLT-RES

36

METER/KG

FT/LB

METER/KG

SPECIFICAREA

67

SQM/CUM

SQFT/CUFT

SQCM/CC

N/M

DYNE/CM

DYNE/CM

SURFACE-TENS 21

168

SQCM/CM-S, SQFT/FT-S
GM/SQCM-S-ATM,
GM/SQCM-S-PA
CM/GM
LBF/FT, MN/M

Units

Type of Units

Code SI Set

ENG Set

MET Set

TEMP-VOLUME

83

CUM-K/KMOL

CUFT-R/LBMOL

CC-K/MOL

TEMPERATURE

22

Other Units Options

C, R

THERMAL-COND 23

WATT/M-K

BTU-FT/HRSQFT-R

KCAL-M/HRSQM-K

BTU-IN/HR-SQFT-R, CCM/SEC-SQCM-K, CALCM/SEC-SQCM-K,


BTU/HR-FT-R, KCAL/HRM-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, $/LTON, $/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, DYNSEC/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

Units

169

Type of Units

Code SI Set

ENG Set

MET Set

Other Units Options

VOLTAGE

113

VOLT

VOLT

VOLT

KVOLT

VOLUME

27

CUM

CUFT

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/OPHR, CUFT/OP-SEC,
CUM/OP-DAY, CUM/OPYEAR, L/OP-HR, KBBL/OPDAY, 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

KG/J

LB/HP-HR

KG/KW-HR

170

73

Units

Type of Units

Code SI Set

ENG Set

MET Set

Other Units Options

WORK

52

HP-HR

KW-HR

FT-LBF, KJ, N-M, MJ,


MBTU, MMBTU, MCAL,
GCAL

Units

171

172

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

173

Table B.1 - Standard Property


Names

174

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

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

175

176

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

Feed mole fraction

FACTOR

Geometric or packing factor

FEED-QUALITY

Feed quality

FEED_FLOW

Feed flow

FEED_LFLOW

Liquid feed flow

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

177

178

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

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

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

179

180

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

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

181

182

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

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

183

184

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

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

Liquid mole fraction

X1

Liquid1 mole fraction

B Property Names

185

Property Name

Description

X2

Liquid2 mole fraction

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

186

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

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

187

Table B.3 - Thermodynamic


Properties of Components in
Mixtures

188

Property Name

Description

GAMMA

Activity coefficient

GAMPC

Activity coefficient pressure correction

GAMUS

Unsymmetrically normalized activity coefficient

KLL2

Liquid-liquid K-value

KVL

Vapor-liquid K-value

KVL2

Vapor-liquid2 K-value

MASSCONC

Mass concentration

MASSFLOW

Mass flow rate

MASSFRAC

Mass fraction

MOLECONC

Molar concentration

MOLEFLOW

Mole flow rate

MOLEFRAC

Mole fraction

PHIMX

Fugacity coefficient

PPMX

Partial pressure

SSOLFACT

Solubility safety factor

SSOLUB

Equilibrium solubility of a freeze-out component

TFREEZ

Freeze-out temperature of a component

TFRZMARG

Temperature safety margin

VLSTD

Standard liquid volume

VLSTDFR

Standard liquid volume fraction

VVSTD

Standard vapor volume

VVSTDFR

Standard vapor volume fraction

B Property Names

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

Free energy

GIG

Ideal gas free energy

Enthalpy

HIG

Ideal gas enthalpy

PHI

Fugacity coefficient

PHIPC

Fugacity coefficient pressure correction

PL

Vapor pressure

RHO

Density

Entropy

SIG

Ideal gas entropy

SONVEL

Sonic velocity

Volume

B Property Names

189

Table B.5 - Electrolyte Property


Sets

190

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

PH

pH

POH25

pOH at 25C

POH

pOH

SOLINDEX

Solubility index (ratio of activity in mixture to activity at


saturation)

WAPP

Apparent component mass flow rate

WTRUE

True species mass flow rate

WXAPP

Apparent component mass fraction

WXTRUE

True species mass fraction

XAPP

Apparent component mole fraction

XTRUE

True species mole fraction

B Property Names

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

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

191

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 60F)

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

192

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

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

193

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

194

Property Name

Description

<100F

Flow rates for petroleum cuts boiling below 100F

100-200F

Flow rates for petroleum cuts boiling between 100 and 200F

200-300F

Flow rates for petroleum cuts boiling between 200 and 300F

300-400F

Flow rates for petroleum cuts boiling between 300 and 400F

400-500F

Flow rates for petroleum cuts boiling between 400 and 500F

500-600F

Flow rates for petroleum cuts boiling between 500 and 600F

600-700F

Flow rates for petroleum cuts boiling between 600 and 700F

700-800F

Flow rates for petroleum cuts boiling between 700 and 800F

800-900F

Flow rates for petroleum cuts boiling between 800 and 900F

900-999F

Flow rates for petroleum cuts boiling between 900 and 1000F

>1000F

Flow rates for petroleum cuts boiling above 1000F

50-100C

Flow rates for petroleum cuts boiling between 50 and 100C

100-150C

Flow rates for petroleum cuts boiling between 100 and 150C

150-200C

Flow rates for petroleum cuts boiling between 150 and 200C

200-250C

Flow rates for petroleum cuts boiling between 200 and 250C

250-300C

Flow rates for petroleum cuts boiling between 250 and 300C

300-350C

Flow rates for petroleum cuts boiling between 300 and 350C

350-400C

Flow rates for petroleum cuts boiling between 350 and 400C

400-450C

Flow rates for petroleum cuts boiling between 400 and 450C

450-500C

Flow rates for petroleum cuts boiling between 450 and 500C

B Property Names

Property Name

Description

500-550C

Flow rates for petroleum cuts boiling between 500 and 550C

>550C

Flow rates for petroleum cuts boiling above 550C

CUTS-E

Flow rates for petroleum cuts in 100F increments

CUTS-M

Flow rates for petroleum cuts in 50C 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

195

Table B.8 - Elemental Analysis


of Mixtures

196

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

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

197

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

198

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

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

199

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

200

Property Name

Description

NUMBER

Total number of equipment

CSCOST

Carbon steel cost per piece

PCOST

Purchased cost per piece

VARID

Material of construction

BBCOST

Total carbon steel cost

TCOST

Total purchased cost

VAR_VAL

Scaled capacity

B Property Names

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

201

Equipment Type: TANK

202

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

B Property Names

Index

AspenTech support, 4
AspenTech Support Center, 4
customer support, 4
e-bulletins, 4
help desk, 4
support, technical, 4
technical support, 4
TKACCT, 21
TKALIS, 25
TKBIDS, 30
TKBRES, 35
TKCASN, 26
TKCIDS, 25
TKCLFL, 19
TKCLOS, 18
TKCNCT, 31
TKCNTN, 31
TKCNVT, 23
TKCOMP, 24
TKCPRP, 26
TKEIDS, 120
TKEQCR, 121
TKEQSR, 122
TKFLWB, 21
TKFRCM, 58
TKHCID, 99
TKHCPR, 98
TKHCUR, 97
TKHXBA, 45
TKHXD1, 41
TKHXD2, 42
TKHXNO, 45
TKHXPF, 46
TKHXPP, 47
TKHXPR, 47
TKHXSH, 43
TKHXTU, 44
TKHXZO, 43
TKICST, 53

Index

TKINFO, 19
TKINI2, 17
TKINIT, 16
TKLABL, 24
TKLHCR, 95
TKLRRP, 82
TKLSEC, 66
TKMCCP, 40
TKMCPR, 39
TKNBLK, 30
TKNCOL, 48
TKNENV, 114
TKNEQ, 120
TKNEQP, 121
TKNEQS, 122
TKNEXT, 27
TKNHCP, 97
TKNHCR, 95
TKNHXD, 41
TKNHXT, 42
TKNICS, 53
TKNMCP, 39
TKNPER, 37
TKNPET, 55
TKNPEV, 116
TKNPIP, 93
TKNPPR, 113
TKNPPT, 112
TKNPRS, 124
TKNRES, 34
TKNRRP, 83
TKNSEC, 65
TKNSEN, 27
TKNSPR, 109
TKNSTR, 102
TKNTPR, 63
TKNWHL, 38
TKNXPR, 125
TKOPEN, 18

203

TKPAPF, 131
TKPAPR, 132
TKPAR1, 132
TKPAR2, 133
TKPERF, 37
TKPIDS, 124
TKPINP, 91
TKPIPR, 91
TKPISP, 91
TKPLCO, 87
TKPLCP, 86
TKPLIO, 86
TKPLND, 89
TKPLNP, 88
TKPLPP, 89
TKPLPR, 90
TKPLSG, 88
TKPLSP, 87
TKPLSZ, 85
TKPORT, 32
TKPPEV, 117
TKPPRP, 113
TKPRO1, 50
TKPRO2, 50
TKPROF, 49
TKPROP, 49
TKPSEC, 67
TKPSR1, 129
TKPSR2, 130
TKPSRF, 126
TKPSRP, 127
TKPSS1, 131
TKPSSP, 127
TKPSSR, 128
TKPSSS, 129
TKPSUB, 126
TKPTAD, 56
TKPTCN, 59
TKPTEV, 115
TKPTFR, 57
TKPTPP, 58
TKPTPR, 56
TKPTRS, 55
TKPVPF, 133
TKPVR1, 134
TKPVR2, 135
TKPVRP, 134
TKRCAT, 73
TKRFSP, 74
TKRNAC, 72
TKRNCA, 72
TKRNFS, 74
TKRPIP, 93

204

TKRPR1, 71
TKRPR2, 71
TKRPRF, 69
TKRPRP, 70
TKRRHR, 80
TKRRNS, 81
TKRRPF, 79
TKRRPR, 80
TKRRRP, 84
TKRRSL, 81
TKRSCA, 73
TKRSUB, 69
TKRTNL, 62
TKRTNR, 60
TKRTRS, 60
TKRTSP, 61
TKRTSR, 61
TKSCAT, 107
TKSCPR, 68
TKSCRS, 67
TKSENS, 28
TKSENV, 115
TKSHCR, 96
TKSIDS, 101
TKSINF, 102
TKSNAC, 105
TKSNCA, 106
TKSNSA, 107
TKSPIR, 92
TKSPPT, 112
TKSPRP, 109
TKSRRP, 83
TKSSAT, 108
TKSSCA, 106
TKSSEC, 66
TKSSID, 103
TKSSSA, 108
TKSTRA, 104
TKSTRM, 103
TKSVAL, 104
TKTITL, 20
TKTPRP, 64
TKTREP, 63
TKTRNR, 51
TKTRRS, 52
TKUNIT, 23
TKVAPF, 75
TKVAPR, 75
TKVAR1, 76
TKVAR2, 76
TKVLE, 94
TKVTPF, 77
TKVTPR, 77

Index

TKVTR1, 78
TKVTR2, 78
TKWHLR, 38
web site, technical support, 4

Index

205

You might also like