EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus...

153
Aspen Engineering Suite 2004.1 Aspen Plus System Management Guide

Transcript of EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus...

Page 1: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Aspen Engineering Suite 2004.1

Aspen Plus System Management Guide

Page 2: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Who Should Read this Guide 2

Who Should Read this Guide

This manual is designed for the advanced Aspen Plus user or site administrator who wants to customize the Aspen Plus system files.

Page 3: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Contents 3

Contents

INTRODUCING ASPEN PLUS ............................................................................ 7

1 UPGRADING ASPEN PLUS ............................................................................ 8 Compatibility Issues ................................................................................................. 9

Upgrading User Interface Files .............................................................................. 9 Databank Files.................................................................................................... 9 System Definition Files......................................................................................... 9 Problem Definition Files...................................................................................... 10 Other Files ....................................................................................................... 10 Load Modules ................................................................................................... 10 Maintaining Upward Compatibility........................................................................ 10 User Interface Initialization Files.......................................................................... 10

Converting Fortran Subroutines and Inline Fortran...................................................... 14 INCLUDE Files .................................................................................................. 14 Aspen Plus COMMONs Renamed .......................................................................... 14 Aspen Plus Routines Renamed ............................................................................ 15

2 SYSTEM OVERVIEW ................................................................................... 16 Functional Overview of Aspen Plus............................................................................ 17

Processes for Running the Simulation Engine ........................................................ 17 User Interface System Files ..................................................................................... 18 Simulation Engine System Files................................................................................ 18 Files Associated with a Simulation Run ...................................................................... 19 The Aspen Plus Run Definition File ............................................................................ 20 Aspen Plus Utilities ................................................................................................. 22 Simulation Engine Command Line Qualifiers............................................................... 22

Typographical Conventions ................................................................................. 23 Command Line Qualifier Definitions ..................................................................... 23

3 MAINTAINING AND UPDATING ASPEN PLUS.............................................. 25 Modification Levels in Aspen Plus.............................................................................. 26

User Modifications ............................................................................................. 26 In-House Modifications....................................................................................... 27 System Modifications ......................................................................................... 27

Page 4: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Contents 4

Maintaining User Routines ....................................................................................... 28 Compiling User Routines .................................................................................... 28 Overview of Debugging in Aspen Plus................................................................... 28

Building System Shared Libraries ............................................................................. 30 Module Requirements ........................................................................................ 30

Integrating In-House Models and Subroutines ............................................................ 32 Creating a Custom SDF File ................................................................................ 32 Converting Fortran Routines ............................................................................... 32 Modifying Version 2004.1 Routines to Call Proprietary Routines ............................... 32

Running a System Definition File Report .................................................................... 33 Running the Aspen Plus Table Building System ............................................................ 35

The System Definition File .................................................................................. 36 The TBS Program .............................................................................................. 36 Updating SDFs.................................................................................................. 38

Converting Version 9.x TBS Input Files...................................................................... 39

4 CONFIGURING PHYSICAL PROPERTY DATABANKS ..................................... 40 Adding User and In-House Databanks ....................................................................... 41

Creating Databanks in the Aspen Plus Simulation Engine ........................................ 41 Creating the User Interface Databank Input File .................................................... 43 Adding Synonyms for Component Names in Any Databank...................................... 46 Modifying the MMTBS Driver File for a User or In-House Databank ........................... 47 Running MMTBS to Add User and In-House Databanks to the User Interface.............. 47 Adding Help for a User or In-House Databank ....................................................... 47 Installing the Databanks in the System ................................................................ 48

Adding Binary or Pair Parameter Databanks ............................................................... 50 Creating a User Interface Binary or Pair Parameter Input File .................................. 50 Templates for Commonly Used Headers................................................................ 55 Modifying the MMTBS Driver File ......................................................................... 57 Running MMTBS................................................................................................ 57 Testing Your Changes in the User Interface........................................................... 57

Adding Ionic Reactions to the Electrolyte Reaction Database ........................................ 58 Creating an Ionic Reactions Input File .................................................................. 58 Modifying the MMTBS Driver File ......................................................................... 60 Running MMTBS to Update the User Interface Reaction Databank............................. 60

5 CONFIGURING PHYSICAL PROPERTY METHODS......................................... 61 Overview .............................................................................................................. 62 Customizing the Aspen Plus Simulation Engine ........................................................... 62

Modifying the TBS Customization Files.................................................................. 63

Page 5: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Contents 5

Creating the TBS Update File From TBS Customization Files .................................... 64 Running the Aspen Plus Table Building System...................................................... 64 Installing the SDF File in Aspen Plus .................................................................... 65

Customizing the Aspen Plus User Interface ................................................................ 65 Creating In-House Physical Property Models, Routes, and Methods................................ 66

Adding Models, Routes, and Property Methods to the Simulation Engine.................... 66 Adding Models, Routes, and Property Methods to the Aspen Plus User Interface ......... 70 Adding Prompts and Help for Models, Routes, and Property Methods ........................ 71

6 CONFIGURING PRESSURE RELIEF, PIPE, AND VALVE EQUIPMENT DATA .... 75 Overview .............................................................................................................. 76 Liquid Service Safety Relief Valves for Pressure Relief ................................................. 76 Gas/2-Phase Service Safety Relief Valves for Pressure Relief ........................................ 79 Rupture Disks for Pressure Relief.............................................................................. 82 Pipes for Pressure Relief and the Pipe Model............................................................... 84 Emergency Relief Vents for Pressure Relief ................................................................ 85 Inlet and Tail Pipe Valves for Pressure Relief .............................................................. 88 Valves for the Valve Model ...................................................................................... 90

7 ACCOUNTING REPORT ............................................................................... 94 Generating a User-Based Accounting Report .............................................................. 95 Running the Accounting Program.............................................................................. 97 Creating a New Accounting File ................................................................................ 99 Making Accounting Information Required................................................................... 99 Activating Accounting on Windows...........................................................................100

Initializing the Accounting File............................................................................100 Setting the Accounting Environment Variable .......................................................101

A CUSTOMIZING THE ASPEN PLUS USER INTERFACE ...................................102 MMTBS Customization Files ....................................................................................103 Creating Help .......................................................................................................104

Modifying the Help Source Files..........................................................................105 Assigning Map Numbers to Help Topics................................................................106 Compiling the Help Source Files .........................................................................107 Modifying the Aspen Plus Help File ......................................................................108 Prompts Format ...............................................................................................108

Modifying the MMTBS and Help Driver Files...............................................................109 Running the User Interface Customization System .....................................................110

Page 6: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Contents 6

Installing the New Files ..........................................................................................110

B TBS FILE DESCRIPTIONS ..........................................................................111 Conventional Property Model Definition Table ............................................................112 Property Parameter Definition Table.........................................................................117 Physical Property Subroutine List Table .....................................................................130 Modifying Aspen Plus System Routines.....................................................................130 Major and Subordinate Property Route Tables ...........................................................134 Physical Property Method Table ...............................................................................142

GENERAL INFORMATION..............................................................................144 Copyright.............................................................................................................144 Related Documentation..........................................................................................146

TECHNICAL SUPPORT...................................................................................147 Online Technical Support Center .............................................................................147 Phone and E-mail..................................................................................................148

INDEX ..........................................................................................................149

Page 7: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Introducing Aspen Plus 7

Introducing Aspen Plus

This manual provides an overview of the Aspen Plus user interface and simulation engine software system and information on how to maintain the system on all supported platforms. This manual is especially useful to Aspen Plus site administrators and system managers.

This manual provides detailed information on areas such as:

• Upgrading simulation files and user subroutines.

• Hardware and software requirements.

• System configuration.

• Integrating in-house and user subroutines, databanks, and physical property models.

• Customizing the user interface.

• Generating accounting usage reports.

For information about installing Aspen Plus, see the Aspen Engineering Suite Installation Guide.

Page 8: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 8

1 Upgrading Aspen Plus

Aspen Plus® is a process flowsheet simulation program that engineers use to predict the real-world performance of chemical processes. This manual is for Aspen Plus system administrators. It explains how to customize and maintain Aspen Plus. You do not need to be a chemical engineer or understand process flowsheet simulation to perform these tasks.

Topics included in this chapter are:

• Compatibility Issues.

• Converting Fortran Subroutines and Inline Fortran from Version 9.

Page 9: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 9

Compatibility Issues Aspen Technology makes every effort to avoid changes in new releases that introduce incompatibilities with old releases, and to provide migration utilities when changes are unavoidable. However, most in-house modifications and user models implemented in previous versions need to be updated or reapplied in order to work with the new version.

Upgrading User Interface Files Before upgrading the user interface, you must create Aspen Plus backup files of any runs that are stored in Quick Restart format (Version 9.x) or Aspen Plus Document format (Version 10.x). The following table shows which files are upwardly compatible with the new version: Files Extensions Upwardly Compatible?

Aspen Plus Backup .bkp Yes

Aspen Plus Document .apw No

Quick Restart .iwd and .iwb (Release 9) No

To create backup files from Quick Restart format, set up the previous version of Aspen Plus. At the command line, type:

mmbackup RunID

where RunID identifies the simulation model (in Quick Restart format) for which you are creating the backup file.

To create a backup file from Aspen Plus Document format, open the file in the version of Aspen Plus with which it was created and select File | Export.

Databank Files You must rebuild all user and in-house databanks using the Aspen Plus Data File Management System (DFMS). After an upgrade to a new version of Aspen Plus, it is advisable to reapply any databank or system definition file (SDF) modifications, as described in the next section.

For instructions on how to rebuild user and in-house databanks, see Chapter 4, Adding User and In-House Databanks.

System Definition Files The SDFs from any previous release are not compatible with Version 2004.1. If your current SDFs contain any customized features, you must reapply them to the SDFs installed with Version 2004.1, using the original Table Building System (TBS) files. Some physical property TBS files have a different format from those in Version 9.x.

Page 10: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 10

For more information on See

The new format for physical property tables Chapter 5

Instructions on running TBS to rebuild the SDF for non-property-related tables Chapter 3

Problem Definition Files The problem definition file (APPDF) from any previous release is not compatible with Version 2004.1. You must rebuild any existing APPDFs by deleting the old ones and re-running the simulation model from an input or backup file.

Note: In Version 9.x of Aspen Plus, the file extension for these files was PDF, but it has been changed to APPDF (Aspen Plus PDF) in order to avoid conflicts with Adobe Acrobat® files.

Other Files Version 2004.1 is compatible with the following files from previous releases:

• Interactive Aspen Plus (IAP) scripts (.scp).

• Insert Libraries (.ilb).

• Stream Libraries (.slb).

• Run Definition (.def).

• Summary (.sum).

Load Modules Generated program executables (load modules) from previous releases, including general purpose load modules, are not compatible with Version 2004.1. For Version 10, the Aspen Plus Simulation Engine was divided into many Shared or Dynamic Link Libraries (DLLs). Aspen Plus no longer has a single large program executable. All documented interfaces to the Aspen Plus simulation engine have been isolated into a small group of shared libraries.

Maintaining Upward Compatibility Some of the new features in Version 2004.1 may cause your run results to differ from results of previous releases. When opening or importing Aspen Plus Backup (.bkp) files from a previous release, you may ignore the new features by selecting the option Maintain Complete Upward Compatibility in the Upward Compatibility dialog box.

If you want to use the new features in this release, select the Use the Following New Features option from the dialog box.

User Interface Initialization Files User interface initialization (mm.ini and mmg.ini) files from Version 9.x are not compatible with Version 2004.1. Check whether any .ini files from previous

Page 11: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 11

releases are in your working directory. If there are any, rename them before you start Aspen Plus 2004.1.

In Version 10, the mm.ini file contains only communication settings for running Aspen Plus in a client-host environment. The file mmg.ini specifies other default settings for the user interface. You can modify the settings in mmg.ini directly within the user interface, using the Tools Options dialog box.

The mmg.ini settings are stored in the current user's Windows registry the first time the Aspen Plus user interface is opened. Any changes made to mmg.ini after the user interface has been opened will not be used.

Table 1.1 shows the settings that are saved in the user's Windows registry. Within the user interface, you can access settings shown in the table by clicking Tools, then Options.

Table 1.1 mmg.ini Settings You Can Change Within the User Interface Menu Selections Option Setting

Tools, Options, General Allow run only when input is complete runanyway

Tools, Options, General Check inline Fortran for syntax errors ftn_check

Tools, Options, General Accounting information required to complete input

account-info

Tools, Options, General Always create backup copy alwayssavebkp

Tools, Options, General Save document as defsaveasbkp

Tools, Options, General Copy buffer format � Value copyvalue

Tools, Options, General Copy buffer format � Units copyunits

Tools, Options, General Copy buffer format � Label copylabel

Tools, Options, General Copy buffer format � Basis copybasis

Tools, Options, General Time stamp timestamp

Tools, Options, Component Data

Pure component databanks searched purebank

Tools, Options, Component Data

Binary databanks searched paramdata

Tools, Options, Component Data

Copy regression and estimation results onto Parameter forms

regdbank

Tools, Options, Component Data

Generate input language using component

Tools, Options, Results View Block results � Heat/Work variables globalqw, qwformat

Tools, Options, Results View Stream results � Temperature globaltemp, tempformat

Tools, Options, Results View Stream results � Pressure globalpres, presformat

Tools, Options, Results View Stream results � Total flow rate globalflow, flowformat

Tools, Options, Results View Stream results � Duty/Power globalstrmqw, strmqwformat

Tools, Options, Run Express run pseudobatch

Tools, Options, Run Interactively load results partial

Tools, Options, Run Animate flowsheet during calculations animation

continued

Page 12: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 12

Menu Selections Option Setting

Tools, Options, Run Edit keyword input before starting calculations

editinput

Tools, Options, Run Server type servertype

Tools, Options, Run Server name servername�

Tools, Options, Run Username username�

Tools, Options, Run Working directory workingdir�

Tools, Options, Startup Run type runtype

Tools, Options, Startup Application template template

Tools, Options, Startup Default working directory startupdir

Tools, Options, Startup BatchFrac bfracenabled

Tools, Options, Startup RateFrac rtfenabled

Tools, Options, Startup Aspen Dynamics dynaplusenabled

Tools, Options, Startup POLYMERS PLUS polyplusenabled

Tools, Options, Startup Text editor editor

Tools, Options, Startup Print text file command printcommand

Tools, Options, Flowsheet Automatically assign block name with prefix

autoblockid, blockprefix

Tools, Options, Flowsheet Display block name showblockid

Tools, Options, Flowsheet Automatically assign stream name with prefix

autostreamid, streamprefix

Tools, Options, Flowsheet Display stream name showstreamid

Tools, Options, Flowsheet Automatically place blocks when importing

autoplacement

Tools, Options, Flowsheet Lock block spacing factor at lockblock, placement

Tools, Options, Flowsheet Label size scale factor labelscale

Tools, Options, Grid/Scale Show scale scale

Tools, Options, Grid/Scale Show grid grid

Tools, Options, Grid/Scale Snap to grid grid

Tools, Options, Grid/Scale Grid size gridresolution

Tools, Options, Grid/Scale Zoom scale factor zoomfactor

Tools, Options, Grid/Scale Scroll step size (%) scrollstep

Tools, Options, Plots Title plottitlefont

Tools, Options, Plots Axis label plotlabelfont

Tools, Options, Plots Axis scale plotscalefont

Tools, Options, Plots Annotation plottextfont

Tools, Options, Plots Legend plotlegendfont

Tools, Options, Plots Grid style gridstyle

Tools, Options, Plots Line style linestyle

Tools, Options, Plots Marker size plotmarkersize

Tools, Options, Plots Show legend showlegend

Tools, Options, Plots Show time stamp plottimestamp

Tools, Options, Properties Allow definition of system parameters� allow_system_userprops

� This item cannot be set in the mmg.ini file.

continued

Page 13: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 13

Menu Selections Option Setting

File, Page Setup Size papersize

File, Page Setup Source papersource

File, Page Setup Orientation orientation

File, Page Setup Left margin marginleft��

File, Page Setup Right margin marginright��

File, Page Setup Top margin margintop��

File, Page Setup Bottom margin marginbottom��

View menu Model library modellibraryview

View menu Status bar statusbarview

View, Toolbar Standard toolstdvisible

View, Toolbar Data Browser tooldatavisible

View, Toolbar Simulation Run toolrunvisible

View, Toolbar Process Flowsheet toolpfsvisible

View, Toolbar Draw tooldrawvisible

View, Toolbar Dynamic tooldynvisible

View, Toolbar Section toolsectionsvisible

Window menu Normal, Workbook, Flowsheet as Wallpaper

worksheetmode, wallpaperview

Draw toolbar Color drawcolor

Draw toolbar Line style drawlinestyle

Draw toolbar Font drawfont

�� The value for these settings depends on the Measurement System specified on your Regional Settings property page in the Windows Control Panel. If your Measurement System is U.S., specify the values in inches. If your Measurement System is Metric, specify the value in millimeters.

Page 14: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 14

Converting Fortran Subroutines and Inline Fortran If you are upgrading from Aspen Plus Version 9.x to Version 10 or later, you may need to modify your Fortran subroutines and inline Fortran. If you have already modified your Fortran to the Version 10 standard, there is no further modification needed.

If your Fortran code accesses any Aspen Plus labeled COMMONs (such as NCOMP or USER) or calls any Aspen Plus subroutines (such as FLASH or physical property monitors), then you must modify it.

Note: In Version 10 and later versions, you must compile user subroutines using the Aspcomp utility. The native compiler does not recognize the INCLUDE statements added by the Aspen Plus Fortran conversion utility. See Aspen Plus User Models for more information on the Aspcomp utility.

The following changes have been made to the Aspen Plus simulation engine:

• COMMON blocks are now stored in INCLUDE files.

• Aspen Plus COMMONs have been renamed.

• Aspen Plus routines have been renamed.

The following sections describe these changes in detail.

INCLUDE Files All Aspen Plus COMMON blocks are now stored in INCLUDE files. Rather than referencing a local copy of a COMMON block, all user subroutines and Aspen Plus input files with inline Fortran now reference the INCLUDE files. Any customer COMMONs must have the identical variable list at every reference point.

Aspen Plus COMMONs Renamed All variables in Aspen Plus COMMONs have been renamed. The name of the COMMON is prepended to the variable name. For example, if you use RMISS from COMMON GLOBAL, the new variable name is GLOBAL_RMISS. This reduces the chance of having a local variable with the same name as a variable in an Aspen Plus COMMON block. It also makes it easier to determine whether a variable is a local variable or COMMON variable when reading through the code. You must convert to the new format any Aspen Plus input file that contains inline Fortran and refers to Aspen Plus COMMONs or Aspen Plus routines.

Page 15: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

1 Upgrading Aspen Plus 15

Aspen Plus Routines Renamed All Aspen Plus routines have been renamed to include an identifier that indicates its parent shared or DLL modules. This identifier is prepended to the old subroutine name. For example, if you are calling FLASH within a user subroutine, the new name will be FLSH_FLASH. (FLASH belongs to the module called PPFLASH, which has an identifier of FLSH.) This change reduces the chance that your routines have name conflicts with Aspen Plus routines. It will also make maintenance and support easier. You must modify any user subroutines that call Aspen Plus routines.

Page 16: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 16

2 System Overview

This chapter provides a functional overview of Aspen Plus. It also describes:

• User interface system files.

• Simulation engine system files.

• Files associated with a simulation run.

• The Aspen Plus Run Definition File.

• Aspen Plus utilities.

• Simulation engine command line qualifiers.

Page 17: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 17

Functional Overview of Aspen Plus The Aspen Plus user interface can run on Intel Pentium® processors running either Windows 2000 or Windows XP. The Aspen Plus simulation engine performs all the required calculations. The simulation engine can run on the same host as the user interface or on a remote host on the network.

Table 2.1 shows the various platform requirements for Aspen Plus.

Table 2.1 Platform Requirements Operating System Disk Space Requirements (MB) �

Name Version Fortran Compiler Simulation Engine User Interface

Windows 2000 SP2 Compaq Visual Fortran 6.6 160 250

Windows XP Compaq Visual Fortran 6.6 160 250

� Disk space requirements vary, depending on the components selected during installation. An additional 50 MB of space is required on the Windows system drive for system components. If Aspen Properties is also installed, add 10 MB for Simulation Engine and 60 MB for User Interface.

Processes for Running the Simulation Engine Aspen Plus provides users with several methods to perform simulation calculations. Different users will have their own preferences in how they use Aspen Plus.

Scenario 1

A typical engineer performing a simulation does the following:

1 Specifies the problem on a graphical flowsheet using the Aspen Plus user interface. The user interface provides a patented expert system to guide the engineer through the problem specification.

2 Runs the simulation calculations interactively or in batch mode using the user interface Run commands. The user interface and the simulation engine communicate with each other using socket messages and ASCII files. For details on communications between the user interface and the simulation engine, see Aspen Plus System Administration.

3 Analyzes the simulation results using the Aspen Plus user interface and the Aspen Plus history and report files.

Page 18: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 18

Scenario 2

The engineer can also run the simulation engine independently of the user interface. In this scenario, the engineer:

1 Creates a keyword input language file containing the problem specifications.

2 Runs the simulation engine interactively or in batch mode using the Aspen command from the operating system command line.

3 Analyzes the simulation results using the Aspen Plus history and report files generated by the simulation engine.

These methods can be combined. For example, a simulation created or modified outside of the user interface can be loaded into the user interface for further study.

The following sections list the files that the user interface and the simulation engine use and create.

User Interface System Files While the engineer is specifying the problem, the Aspen Plus user interface uses the following files: File Description Format

recdef.apr Data structure definition files, including physical property databanks and expert system rules

Binary

mmg.hms Hypertext Help messages Binary

mm.ini User interface communications initialization ASCII

mmg.ini User interface graphics initialization ASCII

*.hlp Help files and prompts Binary

Simulation Engine System Files During execution, the simulation engine uses binary files to retrieve information for calculations. The file types are: File Type Description

.dat System and user physical property databanks, cost databanks

.sdf System Definition File (Aspen Plus Language Definition File)

.ilb System and user insert libraries

.slb System stream library

.msf Aspen Plus accounting file

Page 19: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 19

Files Associated with a Simulation Run When you run a simulation from the user interface, the RunID is a random name composed of an underscore ( _ ) followed by four digits and three characters (for example, _1234abc). Many temporary files with this name are created during execution, and deleted when you exit Aspen Plus.

When you save a simulation run in Aspen Plus Document format, the following files are saved: File Type Name Description Format Client/Server

.his History Calculation history ASCII Server

.apw User interface document

All data for the user interface problem specification

Binary Client

.appdf Problem data All data for the problem simulation Binary Server

.for Fortran Generated Fortran routines for non-interpretable inline Fortran

ASCII Server

You can export the following types of ASCII files from the File Export menu of the user interface: File Type File Name File Contains

.bkp Backup Input description, graphics, optionally results in a compact ASCII format that the user interface can read

.cpm Control Panel Message

Diagnostic messages displayed in the Control Panel

.inp Input Input description with or without graphics

.rep Report Simulation results

.sum Summary Simulation results in format required by interfacing with other programs using Summary file toolkit

.dynf Aspen Dynamics Language

Pressure or flow-driven dynamic simulation file for Aspen Dynamics

.apt Application Template

Partial or complete backup file containing default problem specifications

.dxf Flowsheet Drawing Flowsheet graphics

The following types of ASCII files are useful for diagnosing problems: File Type Name Description

.cmp Compiler output Fortran compilation output for dynamic link on UNIX systems

.for Fortran Non-interpretable inline Fortran and Fortran user routine references on Windows systems

.jnl Journal A record of all interactive commands and input changes

.ld Linker diagnostics Linker diagnostic output for dynamic link

.opt Linker options Linker directives for dynamic link

Page 20: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 20

The Aspen Plus Run Definition File Each Aspen Plus run creates a run definition (.def) file containing file specifications for the run. The engineer can also specify a user run definition file to:

• Override system default files.

• Set up default command options.

The user run definition file is particularly useful when several user or in-house files are used for a project. For The syntax is �

File specifications symbol: filespec

Command options symbol:

� Where symbol is a symbol listed in Table 2.2

The engineer specifies the run definition file in the Run Settings dialog box in the user interface. The names of files specified in the run definition file can exceed eight characters, and the names can include UNC paths such as \\servername\sharename\� However, the name cannot contain any blank spaces in the name of the file.

The engineer can also specify the run definition file at the operating system command prompt when using the Aspen command.

Table 2.2 lists valid symbols and specifications for the default file.

Table 2.2 Valid Symbols for Run Definition File Symbol Description Default File

INPUT Input file None

RUNID Identifier for the simulation run None

PDF Problem datafile runid.appdf

PP1A USRPP1A databank None

PP1B USRPP1B databank None

PP2A USRPP2A databank None

PP2B USRPP2B databank None

PP2C USRPP2C databank None

XILB System insert library sys.ilb

XULB User insert library user.ilb

XSLB System stream library sys.slb

XSCD System cost databank aspcost.dat

UCOS User cost databank None

IPCD In-house pure component databank inhspcd.dat

ISOL In-house solids databank inhssol.dat

IAQU In-house aqueous databank inhsaqu.dat

IBIN In-house binary databank inhsbin.dat

continued

Page 21: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 21

Symbol Description Default File

XCOM System combustion databank combust.dat

XDPR System pure component databank-II pure10.dat

XPCD System pure component databank aspenpcd.dat

XFLO System flowtran databank flowtran.dat

XSOL System solids databank solids.dat

XAQU System aqueous databank aqueous.dat

XBIN System binary databank binary.dat

XBAR Inorganic (Barin) databank inorgani.dat

XMRL CSIRO MRL databank cpdmrl.dat

XNPL CSIRO NPD databank cpdnpl.dat

XNBS CSIRO NBS databank cpdnbs.dat

XJAN JANAF combustion databank cpdjan.dat

XSGT CSIRO SGT databank cpdsgt.dat

XPC85 Release 8.5-6 compatible pure component databank pure856.dat

XPC93 Release 9.3 version of purecomp.dat pure93.dat

XAQ92 Release 9.2 version of aqueous.dat aqu92.dat

XFACT F*A*C*T databank factpcd.dat

XPOPCD System polymers databank polymer.dat

XSEPCD System segments databank segment.dat

XSDF System definition file sdffil.sdf

SCRIPT Script file for ASCII interactive run iap.scp

XMOD Location of executable used for simulation none�

XPDFLC Location of problem datafile none��

USERNAME Username none

NEW_RUNID New Run_ID specified for Edit run none

OLD_RUNID Old Run_ID being edited none

LMHOST Name of License Manager host none

IAPFLAG Interactive flag none

MMBACKUP Input/restore flag � generate backup file N/A

ITONLY Perform input processing only N/A

BATCH Job is run batch or in background N/A

TUTOR Use interactive tutorial mode N/A

SLAVE Job runs under the user interface control N/A

DLOPT Dynamic link options none

� Aspen Plus Engine executable directory.

�� Local working directory

Page 22: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 22

Aspen Plus Utilities Table 2.3 lists the utility programs used to build and maintain files used by the user interface and the simulation engine. For Windows versions of Aspen Plus, these commands can only be executed from the Aspen Plus Simulation Engine window.

Table 2.3 Utility Programs Utility Description

ACR Generates accounting reports about Aspen Plus usage at a site. See Chapter 7.

CDFMS Creates Aspen Plus system and user cost databanks

DFMS Creates and updates Aspen Plus physical property databanks. See Aspen Plus Physical Property Data.

GETRIDOF Deletes files created during a run

IFMS Creates and modifies Aspen Plus insert libraries

MMTBS User interface table building system. See Appendix A.

SDFRPT Generates reports on Aspen Plus language syntax. See Chapter 3.

STRLIB Creates and modifies Aspen Plus stream libraries

TBS Creates and modifies the Aspen Plus system definition file. See Chapter 3.

ASPLINK Generates user shared or dynamic link libraries. See Aspen Plus User Models.

ASPCOMP Compiles user Fortran subroutines. See Aspen Plus User Models.

Simulation Engine Command Line Qualifiers The Aspen command invokes the Aspen Plus Simulation Engine from the command line. The available command line qualifiers are:

aspen input_file [RunID] [NewRunid] [opts] [/help]

For Windows versions of Aspen Plus, the Aspen command must be run from the Aspen Plus Simulation Engine window.

Page 23: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 23

Typographical Conventions Following are the conventions used in the simulation engine command line qualifiers: Convention Represents

[ ] optional qualifier

italics variables, such as input_file. Substitute the appropriate name.

Note: For compatibility with standard UNIX conventions, options may be introduced with a hyphen (�) instead of a slash (/). Options that take an argument may omit an equal sign (=). For example, the following are equivalent /insert=abc -insert abc

Command Line Qualifier Definitions The following list provides definitions of Aspen Plus command line qualifiers that you type.

input_file A file written in Aspen Plus input language that defines the problem to be simulated. The default file type is .inp and does not need to be included in the command line. The input file is required for all Aspen Plus runs, except for aspen /sponly.

RunID Use this qualifier for the current simulation program for single ID runs. For edit runs with two IDs, the RunID is the identifier for the previous simulation program to be edited. You must always specify this qualifier for edit runs. If the RunID is not specified for non-edit runs, it will default to the input_file. The RunID is limited to eight lowercase characters. Aspen Plus uses it while generating files needed during the simulation. Files generated by Aspen Plus use the RunID as the file name, followed by a period and a three-character extension (for example, RunID.rep).

NewRunID Use this qualifier only for a two-RunID edit run. When specified, information from the simulation run that you want to edit, identified by the RunID value on the command line, will be copied into new files created using the NewRunID and then modified using the edit input to generate new simulation results. The information in the original simulation files is not modified. There must be .appdf and .def files from the old RunID simulation before you can perform a two-RunID edit run.

/batch Use this qualifier for batch (background) mode runs. Only one run with any specific RunID may be run at a time. You may log off after using the /batch option, and your batch job will continue to run to completion.

/getridof Use this qualifier to delete the temporary files created by Aspen Plus during a run. The .his and .rep files are appended to make an .out file for the run. All other files with the same RunID are deleted. You should not use this qualifier if edit runs will follow.

/inhXXX=name Use this qualifier to specify the name of an in-house databank to use in the current simulation. Valid name specifications are inhpcd, inhsol, and inhaqu. If the option is specified without giving a value, the default databanks on the Aspen Plus system directory are used. It is possible that one or more of the /inhXXX options have been modified by the Aspen Plus system administrator at your site making the desired in-house databank active for every simulation. If so, you do not need to specify the /inhXXX option unless you wish to override the default set by the system administrator.

/insert=name Use this qualifier to specify the full or relative path name of the insert library that contains inserts referenced in the current simulation input file. A suffix of .ilb is assumed in the insert library name and should not be included in the filename.

/itonly Use this qualifier to execute only the input translation step on your simulation input.

/log Use this qualifier to create a log of the messages written to the terminal for your current run. The messages are written to the file RunID.log.

/mm If you specify /mm with /getridof, then the .sum and .sta files are not deleted. This allows you to run Aspen Plus with the user interface.

Page 24: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

2 System Overview 24

/mmbackup If you specify /mmbackup, then the input translator will create a .bkp file that can be restored to the user interface. The qualifier /nommbackup disables this option even when the system has /mmbackup turned on by default.

/ppXX=name Use the pp1a, pp1b, pp2a, pp2b, and pp2c qualifiers to specify the name(s) of user physical property databanks referenced in the simulation input file. You can specify all the databank options on the command line, but you may specify each option only once. The argument is the full or relative path name of the databank to be used in the simulation.

/sponly Use this qualifier to execute only the Simulation Program step. Specify the /sponly option to follow an /itonly run, or to continue an interactive simulation run, or when you wish to perform a restart of a previous simulation that failed because it exceeded the maximum simulation time or number of iterations. The input_file name is not specified when /sponly is used. These options are not allowed with /sponly: /itonly, /insert, /ucost, /ppXX, and /inhXXX.

/strlib Use this qualifier to specify the name of the stream library from which stream data should be retrieved. The STREAM-LIB paragraph in an Aspen Plus input file is used to specify the stream data to retrieve.

/ucost=name Use this qualifier to specify the name of a costing data file used in your simulation problem. The argument is the full or relative path name of the costing databank to be used in the simulation.

/dlopt=name Use this qualifier to specify the name of a file containing a list of object files, archives, or shared libraries that Aspen Plus should use when performing dynamic links of user routines. List object and archive filenames one per line. Environment variables and wildcards (*) are allowed. See Aspen Plus User Models for more information on Dynamic Link Options files.

/defaults=name Use this qualifier to specify the name of a file containing default options for your simulation problem. For more information, see the Aspen Plus Run Definition File, this chapter.

/qsub [arguments]

This qualifier causes the job to be submitted to NQS (Network Queuing System) via the qsub command for execution. Any arguments that appear after the /qsub option are passed as arguments to the qsub command. This means that any Aspen Plus options must appear before the /qsub option. Use of this option assumes that your system has the NQS software installed. NQS is not part of Aspen Plus software.

Page 25: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 25

3 Maintaining and Updating Aspen Plus

This chapter discusses various levels of customization to the Aspen Plus simulation engine including the following topics:

• Modification Levels in Aspen Plus.

• Maintaining User Routines.

• Building System Shared Libraries.

• Integrating In-House Models and Subroutines.

• Running a System Definition File (SDF) Report.

• Running the Aspen Plus Table Building System (TBS).

• Converting Version 9.x TBS Input Files.

Page 26: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 26

Modification Levels in Aspen Plus In Aspen Plus, you can make modifications at three levels: Modify at this level For changes that

User� A single user or small group of users needs

In-house� Must be available to all users

System Affect the files delivered with Aspen Plus

� Does not affect the files delivered with Aspen Plus.

We recommend that one person be responsible for modifying Aspen Plus at a given site. This provides Aspen Technology with a central contact person to determine the system's status at a given moment. We encourage companies with multiple Aspen Plus sites to establish a corporate Aspen Plus manager to coordinate and communicate the activities of the site managers.

All types of modifications can affect new release upgrades. For example, certain system design changes included in a new release might prevent user or in-house modifications from working without change.

User and in-house features are generally upwardly compatible with new releases. Problems may occur if the user or in-house features use non-standard or undocumented features such as:

• Using a Fortran unit number below 50.

• Calling an undocumented Aspen Plus system routine.

For information on creating and using user and in-house databanks, see Adding User and In-House Databanks, Chapter 4 and Physical Property Data.

User Modifications User level modifications are generally made for specific simulation models, but can also be used for many users working on a project. User modifications include:

• User insert libraries.

• Databanks.

• User unit operation models.

• Kinetic subroutines.

• Property subroutines.

• Stream libraries.

The user develops any necessary subroutines, data, and files, and stores them in the individual user's directories or in a shared location.

Page 27: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 27

In-House Modifications In-house modifications are used when modifications need to be available for all Aspen Plus users. In-house modifications should be performed by the Aspen Plus administrator. In-house modifications include:

• In-house databanks.

• Built-in user unit operation and property models.

• Insert files.

• DLLs for user models.

Frequently, the user can choose between the in-house modifications or the Aspen Plus system files as delivered.

System Modifications Since system level modifications affect the files delivered with Aspen Plus, they are usually more difficult to integrate into a new version than user or in-house changes. Before making system changes, check whether any user or in-house modifications can accomplish the same task.

Before creating or modifying system level files, make sure:

• The current Aspen Plus version is installed.

• Your environment is set up for the correct version of Aspen Plus.

• You use the Aspen Plus system administrator account with privileges to read, write, and delete files in the Aspen Plus directory tree.

When you make system-level changes, you can inadvertently introduce errors into your system that are difficult to diagnose or fix. Follow these recommendations to minimize potential problems:

1 If you need to modify an Aspen Plus system routine, contact the AspenTech Hotline.

2 If you want to create entirely new unit operation models, cost blocks, utilities, or physical property models, contact the AspenTech Hotline. This chapter does not cover these types of modifications.

3 If you need to modify the Aspen Plus system source code, first copy the original routine and then modify the copy. Document your changes with appropriate comments.

4 Before you modify an Aspen Plus unit operation model, cost block, utility, or physical property model, make a copy and give the copy a different name. Modify the copy. This allows you to isolate any problems the new model might have.

5 You should not need to modify the Aspen Plus system databanks. Use the in-house databank feature for large amounts of user data. This avoids the databank reconciliation problems associated with new releases.

6 The Aspen Plus installation creates the folder c:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\inhouse for storing in-house modifications, but you may store them elsewhere.

Page 28: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 28

Maintaining User Routines Aspen Plus allows user-written routines to be dynamically loaded and executed. User routines include:

• Externally written Fortran subroutines.

• Inline Fortran blocks that are too complicated for the simulation engine's internal Fortran interpreter to interpret.

Aspen Plus writes non-interpretable inline Fortran to a file as Fortran source code. The source code is compiled using the host computer's native Fortran compiler.

During the run, user routines are dynamically linked and loaded into the simulation engine. Aspen Plus does not need to generate a special simulation program to handle user routines.

The user must supply all required object files for external Fortran subroutines before beginning the run. To maintain consistent compiler options and to process INCLUDE statements, you must use the Aspcomp procedure to compile all user routines.

Compiling User Routines Use the Aspcomp procedure to compile user Fortran routines:

ASPCOMP *.f dbg

The parameter dbg is optional. Use it if you plan to debug these routines.

Overview of Debugging in Aspen Plus Fortran code added by a user to a simulation model can be debugged using your Fortran compiler's symbolic debugger. Your debugger can be invoked for the following categories of Fortran routines:

• Inline Fortran.

• User models.

• In-house models.

Debugging User Routines or Inline Fortran on Windows To debug user routines on Windows platforms, perform these steps:

1 From the Aspen Plus program group, open the Aspen Plus Simulation Engine window.

2 Compile user routine(s) using the dbg option. Type:

ASPCOMP filename dbg

This creates an object file (filename.obj) and a database of debugging symbols (df60.pdb).

Page 29: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 29

3 Debug link the shared library containing your user routines by increasing the system diagnostics level reporting. Add the following to your simulation input file:

DIAGNOSTICS

HISTORY SYS-LEVEL=8

DEBUG DYNLINK=2

Alternatively, you can change the following line in %aprsys%\xeq\asplink.bat:

%asptmp% %1 %2 %3 %4 %5 %6 %7 %8 %9

to

%asptmp% debug %1 %2 %3 %4 %5 %6 %7 %8 %9

4 Run an input file that requires the user routine(s). Use the /debug option to invoke Microsoft Developer Studio automatically. For example, if the input file is gmutest.inp and the RunID is test, type:

aspen gmutest test /debug

5 In Microsoft Developer Studio, configure the workspace as explained in the next example.

You cannot set a breakpoint on the user routine until it has been loaded dynamically into a process. First set a breakpoint on IT_USRDBG, the final routine executed during input translation, then set a breakpoint in your user routine.

Example of a Windows Debugging Session

After invoking Microsoft Developer Studio, you must configure the workspace for debugging. In Microsoft Developer Studio:

1 From the Project menu, select Settings (Alt+F7). The Project Settings dialog box appears.

2 Select the Debug tab in the right pane.

3 Set the working directory to the full path for the directory where you ran the aspen command in step 4 above. If you are using the Aspen Plus default directory, type:

C:\Program Files\AspenTech\Working Folders\Aspen Plus 2004.1

4 On the Category dropdown menu, select Additional DLLs. For the Local Name of Modules, enter the full path of zeitexec.dll in the second column,

You can click to browse, then select zeitexec.dll. The typical location of zeitexec.dll is in

C:\Program Files\AspenTech\APrSystem 2004.1\engine\xeq

5 Click OK.

6 From the Edit menu, select Breakpoints (Alt+F9).

7 In the Location tab in the Break at: text box, specify IT_USRDBG. Then click OK.

8 From the Build menu, select Start Debug, then Go.

Page 30: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 30

9 In the dialog box indicating that apmain.exe does not contain debugging information, click OK to continue.

10 Click Cancel to any requests for sources of routines beginning with IT_.

11 When IT_USRDBG is reached, set breakpoints in your user routines by opening the Fortran file(s) containing your user routine(s). Select Open from the File menu, navigate to your working directory, then select filename.f. To debug inline fortran, open the file runid.for in your working directory. Set breakpoints (F9) in your user routine and then Go (F5).

Note: Microsoft Developer Studio may terminate abnormally if you try to set a breakpoint in your user routine by selecting Breakpoints from the Edit menu at Step 11. See the Microsoft Developer Studio online help for more information on using the debugger.

Debugging User Routines Without a Symbolic Debugger

If you do not have a symbolic debugger, use this debugging method:

1 Add Fortran Write statements to your user routine at strategic locations.

2 Compile the routine using the Aspcomp procedure.

3 Rerun the simulation and check the output file for diagnostic information.

Building System Shared Libraries The simulation engine contains a custom directory that contains all the modules and corresponding Fortran files that can be customized for Version 2004.1. The modules are ppuser, zeinit, zemhtxu, and zeusermod.

Module Requirements All Fortran routines listed below must be present when rebuilding the respective module, where ppuser, zeinit, zemhtxu, and zeusermod are the modules and the .f files are the Fortran files required by the respective modules.

Note: The modules ppuser, zeinit, and zeusermod are part of the Aspen Physical Property System. Files for these modules are installed with the APrSystem, by default in the directory C:\Program Files\AspenTech\APrSystem 2004.1\Engine\custom. Module zemhtxu is used only by Aspen Plus and its files are in C:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\custom.

Page 31: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 31

Table 3.1 Module Routines Module Routines

ppuser esmnu.f, esmnu0.f, kvlui.f, mdmon9.f, pcmulu2.f, pcrkiu2.f, pcwslu2.f, phcciu.f, phclcu.f, pprpt.f

zeinit getprp.f, iappdb.f

zemhtxu euhe3u.f, iuhe3u.f, mhfopu.f, uhe03u.f, zuhe3u.f

zeusermod adcstu.f, adefnu.f, asradu.f, asrptu.f, blrusr.f, cstusr.f, derpru.f , eevalu.f, exmonu.f, fisymu.f, fpuser.f, getadu.f, iapusr.f, imhtxu.f, insimu.f, itsizu.f, itsubu.f, iusrfl.f , mhtcku.f, mhtwku.f, mmsrpu.f, mmsusr.f, npldsu.f, pdatfu.f, ppchku.f, radvel.f , rptusr.f, savusr.f, sempru.f, setiopstu.f, srpctu.f, sumeru.f , sumusr.f, udlsz3.f, usrbalmas.f, usrflg.f, usrprc.f, usrrptopt.f, usrvrn.f, uvalab.f, zudl3u.f

This example illustrates rebuilding the ppuser module on Windows NT, 2000, and XP systems. For rebuilding modules other than ppuser, substitute the appropriate module name. Follow these steps:

1 Open the Aspen Plus Simulation Engine window from the Aspen Plus program group.

2 Use the Aspcomp command to compile your Fortran routines:

To compile Type this

Fortran files for your module in the Engine\Custom directory of Aspen Plus or the APrSystem, including your modifications and additions

aspcomp *.f ppuser

Objects with debug information aspcomp *.f dbg ppuser

Note: Use the aspcc command to compile a C or C++ routine.

3 Type the following command to create the shared library with Asplink:

asplink ppuser

A Windows 32-bit shared library pair (ppuser.dll and ppuser.lib) is created in the local directory. See Aspen Plus User Models, Chapter 1 for more information about asplink.

Note: Save the original .LIB and .DLL files before over-writing them with the customized libraries. If you need to include any additional Aspen Plus system DLLs in all your asplink runs, you can do so by modifying asplink.prl in the APrSystem 2004.1\Engine\xeq directory.

4 Copy the rebuilt .LIB file into the Aspen Plus or APrSystem import library directory (Engine\lib). Next, copy the rebuilt .DLL file into the Aspen Plus or APrSystem Simulation Engine system directory (Engine\xeq).

Page 32: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 32

Integrating In-House Models and Subroutines If you have in-house models and subroutines that were developed for previous Aspen Plus versions, perform these steps to integrate them into Version 2004.1:

1 If you are integrating in-house Table Building System (TBS) files, create a custom System Definition File (SDF) file.

2 If you are upgrading from Version 9.x, convert in-house Fortran routines to the Version 10 standard. See Chapter 1. This is required for any routine accessing Aspen Plus system COMMONS or calling Aspen Plus routines.

3 Modify Version 2004.1 system routines to call your proprietary routines.

4 Test and debug proprietary unit operation and property models.

The sections following explain each of these steps in detail.

Creating a Custom SDF File To create a custom SDF file for your in-house unit operation or property models:

1 If you are upgrading from Version 9.x, modify the TBS input file(s).

For these models See

Unit Operation Running the Aspen Plus Table Building System, in this chapter

Physical Property Routines and Methods

Chapter 5

2 Create your own custom version of the SDF. See Running the Aspen Plus Table Building System, this chapter. Place this SDF file in your local directory instead of in the system directory while you test your customizations.

Converting Fortran Routines Because of architectural changes, you might need to modify the Fortran source code of routines used in Aspen Plus if you are upgrading from Version 9.x. To convert your routines to the Version 10 standard, see Chapter 1, Converting Fortran Subroutines and Inline Fortran. To obtain Aspen Plus source code required to interface your in-house modifications, contact the AspenTech Hotline.

Modifying Version 2004.1 Routines to Call Proprietary Routines If you want the Aspen Plus simulation engine to call your proprietary routines, you must obtain the source code for the appropriate Version 2004.1 simulation engine interface routines. Modify the code to call your routines.

Page 33: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 33

Running a System Definition File Report You can use the Aspen Plus SDF Report System (SDFRPT) to produce formatted reports that show the information stored in SDF tables.

To run SDFRPT:

1 Use the command:

sdfrpt sdfname outname

Where:

sdfname = Name of the SDF used for the report (the default is system SDF).

outname = Name of the report file (the default is sdfrpt.rep).

SDFRPT displays the following prompt:

The following options are available for SDFRPT: o Type in the name of a table. You can enter a ? before the name for partial matching. o Type HELP or <CR> to get a list of tables. Enter a name or <CR> to get a list:

2 Enter the name of the table for which you want to generate a report.

SDFRPT tries to match this name with the list of SDF tables shown at the end of this chapter and asks you to select a table.

For example, entering PRS for the table name generates the following list:

1. PRS PIPE TABLE 2. PRS TRANSFLO VALVE TABLE 3. PRS EMERGENCY RELIEF VENT TABLE 4. PRS RUPTURE DISK TABLE 5. PRS SAFETY RELIEF VALVE TABLE

SDFRPT performs partial matching if you enter a question mark (?) before the name. For example, entering ?DATA for the table name generates the following list:

1. DATA FILE SYMBOL TABLE 2. PITZER MODEL DATA 3. ELECTROLYTE NRTL MODEL DATA 4. COAL PROPERTY DATABANK

Two special table names appear on the list:

• FULL

• THE CONSTANTS TABLE

FULL produces the entire SDF contents. A full SDF report is more than 1500 pages long. TBS generates the constants table when the SDF is built. The CONSTANTS table can be reported, but the user cannot modify it. It lists:

• SDF size information.

• Default constants used in the SDF.

Page 34: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 34

If you enter one of the following names, additional prompts appear:

• COST BLOCK

• PKW (Primary Keyword Tables)

• UOSM (Unit Operation System Model)

• UTILITY

• REACTIONS

For example, if you enter UOSM, the following prompt appears:

Enter <CR> to get a list or enter the name of the UOS model.

If you entered UOSM first, give the name of a UOS model next. If you entered PKW, give the name of the PKW you want. If the name is misspelled, the following message appears:

Cannot find the UOS model name: xxxxxx

Do you wish to try again? (y/n) If you answer Then

Yes The initial prompt appears.

No The SDFRPT program is terminated.

SDFRPT generates a report file using the name you supplied. This report is divided into two sections:

• Table of contents.

• Formatted SDF tables.

Page 35: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 35

The following list contains the valid top level tables for SDFRPT: Standard Option Sets Component Attribute Type Definitions Encoded Major Property Routes Conventional Property Model Defs Labeled Common Definitions Physical Property Subroutine List Major Property Map Default Monitor CGT Indices PKW Cost Block Substream Type Table Stream Attr Type Table Built-in Substream ID Table Built-in Substream Attribute Table The Constants Table Non-conven Top-level Tkw Tables Variable Type Table Special SKW Table Full Default PC Cut Point Temperatures PC Option Sets Property Package Substream Types Group Parameter Table Symbol Group Liquid Binary Parameter Table Equation of State Pure Parameter Table PCES Group Structure Definition Table Old Group Binary Parameter Table Coal Property Databank Reactions PRS Pipe Table PRS Emergency Relief Vent Table PRS Safety Relief Valve Table Objectives

Standard Major Property Routes Subordinate Property Keyword List Encoded Subordinate Property Routes Non-conventional Property Model Defs Data File Symbol Table Labeled Common List Subordinate Property Map UOSM Utility Units Conversion Table Substream Attr Type Table Built-in Substream Class Table Built-in Stream Class Table Built-in Stream Attribute Table Conven Top-level TKW Tables Flowtran Block Table Convergence Table Econ Eval SKW Index Distillation Curve Types PC Properties Property Package Properties Property Groups Group Binary Parameter Table Pitzer Model Data Equation of State Binary Parameter Table Electrolyte NRTL Model Data PCES Property Definition Table Old Group Liquid Binary Parameter Table Periodic Table PP User Subroutine List PRS Transflo Valve Table PRS Rupture Disk Table Labeled Common Description

Running the Aspen Plus Table Building System The Aspen Plus Table Building System (TBS) creates and maintains the System Definition File (SDF). The SDF contains:

• A complete definition of Aspen Plus input language syntax.

• Other information necessary to define Aspen Plus system capabilities.

Page 36: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 36

The System Definition File The default location for the SDF is:

C:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\XEQ\SDFFIL.SDF

If you installed Aspen Plus on a different drive or directory, use the appropriate path.

The SDF is a structured file with individual entries called tables. There are three types of tables:

• Primary Keyword Tables (PKW).

• Secondary Keyword Tables (SKW).

• Tertiary Keyword Tables (TKW).

Each table has:

• SKW tables linked to a specific PKW table.

• TKW tables linked to a specific SKW table.

Use TBS to add, delete, or replace entries within the top-level tables. When modifying the PKW table (or any top-level table that has SKWs) you must replace or delete the entire TBS source data file. You cannot replace data for an individual SKW or TKW. To change data for an SKW, you must replace the entire entry for the PKW that defines the SKW. The format of some of the tables has changed since Version 9.x. For more details, see Converting Version 9.x TBS Input Files, this chapter.

For example, suppose you want to change the default for the maximum number of iterations (MAXIT) from 30 to 50 in a FLASH2 unit operation model (UOS) block. Run TBS on the entire FLASH2 PKW table (FLASH2.UOS data file) that contains the change for the MAXIT TKW.

This section describes how to modify existing tables. If you want to create a new TBS table, contact the AspenTech Hotline. Creating a new top-level table, such as a new unit operation block, is fairly complex. TBS input data has a fixed format, which requires each character or number to be in a particular column. In addition, there are many rules for writing a table.

The TBS Program The TBS program:

• Creates the SDF.

• Reads user-specified data from a file stored on disk.

• Places the data in the appropriate place within the SDF.

• Creates a history file to store information for new or modified tables.

• Modifies the SDF when requested.

Aspen Technology provides source data for TBS tables.

Page 37: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 37

The TBS tables are stored in a compressed file format. To decompress the source data, use the extr_tbs command from the Aspen Physical Property System utilities directory:

C:\Program Files\AspenTech\AprSystem 2004.1\Engine\xeq\extr_tbs.bat

All source data use one of eight file types. The TBS source data files consist of PKW, SKW, and TKW tables.

For example, a TBS data file, STREAM.PKW, is used to define the stream paragraph in an Aspen Plus input file. STREAM.PKW contains PKW, SKW, and TKW tables. For this example:

• The PKW is called STREAM.

• Two of the SKWs are SUBSTREAM and MOLE-FLOW.

• Two of the TKWs are COMPONENT and FLOW.

This allows Aspen Plus to recognize the following entry in an Aspen Plus input file:

STREAM FEED

MOLE-FLOW COMPONENT=WATER FLOW=100

Aspen Plus processes each keyword and tries to find the PKW table STREAM in the SDF. Then Aspen Plus looks for the:

• SKW table MOLE-FLOW.

• TKW table COMPONENT and FLOW.

File Types The file type indicates the type of data in the file, as described in the table below:

Table 3.2 File Types File Type Table Data Description

.cst Cost block

.lcd Labeled COMMON definition

.pkw Primary keyword

.sto Standard property method

.uos Unit operation system model

.utl Utility model

.rxn Reaction model

.dat Data for miscellaneous table types

All file types except .dat contain the minimum amount of TBS input needed to define a single top-level table entry. These files contain the following line:

tabname REPLACE entrynam

Where:

tabname = Name of the table

entrynam = A unique entry in the table

This line also denotes the beginning of a table entry. Therefore, if you want to change a single number in any top-level table entry, you must use the entire file as input to TBS.

Page 38: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 38

The .dat files contain all the data needed to define an entire top-level table. Typically, these files contain many REPLACE lines, each followed by the data for its table entry.

Updating SDFs You must update the system SDF if one of these conditions exists:

• Site-specific unit operation, physical property, convergence, and other models exist.

• An update is needed to fix a problem.

The default location for the files for creating the SDF is:

C:\Program Files\AspenTech\APrSystem 2004.1\Engine\TBS

If you installed Aspen Plus on a different drive or directory, use the appropriate path.

To update the system SDF, follow these steps:

1 Create or modify a TBS input file.

2 Create a copy of the SDF in your working directory.

3 Run TBS on the copy of the SDF.

The best way to create a new SDF is by using the makesdf procedure to bring all the correct files together.

The TBS table input data is specific for the type of table. This data always begins with the following line:

tabname REPLACE entrynam

or

tabname DELETE entrynam

Where:

tabname = Table name in columns 1-8

entryname = Name identifying this table entry in columns 21-28

The words REPLACE or DELETE must be in columns 10-16. REPLACE either adds or replaces, depending on whether the entry exists. After the table name follows the rest of the table input data. The input format is different for each table. Appendix B shows the input format for physical property routes and property methods. Contact the AspenTech Hotline for information on other table types.

Page 39: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

3 Maintaining and Updating Aspen Plus 39

Converting Version 9.x TBS Input Files If you want to create your own SDF by using a TBS file from Aspen Plus Version 9.x or using your own TBS file, you must add the following line right before the first SKW declaration:

VIRT 0 0

The first 0 occurs at the 8th column and the second occurs at the 11th column.

The following TBS files need to have a VIRT statement:

• All uos files (*.uos).

• All cost blocks (*.cst).

• All utility blocks (*.utl).

• Convergence (cnvrgnce.dat).

The following example shows the use of the VIRT statement unit operation (UOS) model name XYZZ.

Example of a TBS file with VIRT Statement

This example shows the use of the VIRT statement unit operation (UOS) model named XYZZ.

UOSM REPLACE XYZZ XYZZ UXYZZI 1 41 0 0 -1 -1 -1 -999 1 0 0 0 0 -1 -1 -1 -999 1 0 0 3 WORK DUMMY 2 20 1 WORK IPTEMP 1 + 20 145 1 1 WORK RPTEMP 2 + 20 146 1 1 0 SIZE AREAS VIRT 0 0 1 SKW SUBROUTINE SUBROUTINE SUBR 1 1 TKW MODEL MODEL MODL 3 MISSING

Page 40: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 40

4 Configuring Physical Property Databanks

This chapter explains how to add user or in-house databanks to Aspen Plus and how to customize the user interface to reflect those changes. It includes the following topics:

• Adding User and In-House Databanks.

• Adding Binary or Pair Parameter Databanks.

• Adding Ionic Reactions to the Electrolyte Reaction Database.

Once you add the databanks to the user interface, you will be able to:

• Select the new databanks and their search order on the Components Specifications Databanks sheet.

• Display the components on the Components Specifications Selection sheet or in the Find Component dialog box.

Page 41: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 41

Adding User and In-House Databanks To add user or in-house databanks, follow these steps:

1 Create the databanks in the Aspen Plus simulation engine.

2 Create a user interface databank input file to define the databank location and component list.

3 Modify the MMTBS driver file for a user or in-house databank.

4 Run MMTBS to add the databanks and prompts to the user interface.

5 Add Help for the databanks.

The following sections explain each step in detail.

Creating Databanks in the Aspen Plus Simulation Engine Use the Aspen Plus Data File Management System (DFMS) to create the databanks on the same computer that runs the Aspen Plus simulation engine. See Aspen Plus Physical Property Data, Chapter 1, for instructions.

For Windows systems that use a network file server, you must have write access to the Aspen Plus system directory before creating an in-house databank:

For system and in-house databanks, you must have write permission to the Aspen Plus system directory for databanks.

To create the databanks: 1 Create the DFMS input files containing all the physical property data.

2 Run the DFMS using this command:

dfms input_file output_file

Where:

input_file = File containing DFMS input language. See Aspen Plus Physical Property Data, Chapter 1. Input language must appear in upper case. Do not enter the .inp extension in the DFMS command.

output_file = Name you give the DFMS output file that contains the requested reports and a trace of DFMS operations

The databanks created by DFMS are named dbname.dat, where dbname is the databank name given in Table 1.1 of Aspen Plus Physical Property Data. In-house databanks reside in the Aspen Plus system directory. User databanks reside in the current directory. When referencing previously built user databanks in DFMS, make sure they are in the current directory.

Page 42: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 42

After you have tested the user databanks, you can move them into the Aspen Plus system directory, or leave them in your working directory. If you move the user databanks into the Aspen Plus system directory and the databank file names are different from the system default names, you must modify the Aspfiles.def file, also located in the system directory, to reflect the new databank name. Edit the Aspfiles.def and add the dbname using the appropriate entry as a template for each databank type listed. See Run Definition Files, Chapter 2, for more information on aspfiles.def file.

After creating your databank in Aspen Plus, define the databank location and component list by creating a user interface databank input file.

Example for Creating an In-House Databank

Create an in-house databank (INHSPCD), containing your company's proprietary data. Store the DFMS diagnostics and report in the file Run1.rep. The DFMS input file, Mydata.inp, contains your company's data and the statement:

FILE INHSPCD INHSPCD NEW

Type at the command line prompt:

dfms mydata run1

This command creates:

• Databank Inhspcd.dat in the system directory.

• Report file Run1.rep in the current directory.

Example for Creating a User Databank

Create a user databank (USRPP1A) containing data for a particular project. For this project all Aspen Plus runs are made in the example directory: \AspenTech\Working Folders\Aspen Plus 2004.1\projecta

Create a DFMS input file, ppdata.inp, in \AspenTech\Working Folders\Aspen Plus 2004.1\projecta. The file should contain the statement:

FILE USRPP1A PROJA NEW

Where proja is the password for this databank.

Store the DFMS diagnostics and report in the ppdata.rep file. From the directory \AspenTech\Working Folders\Aspen Plus 2004.1\projecta, enter the following command at the command line prompt:

dfms ppdata ppdata

The DFMS command creates the usrpp1a.dat databank in the current directory.

Page 43: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 43

Creating the User Interface Databank Input File Before you can customize the Aspen Plus user interface, the following directory must be present:

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\custom

This directory contains all the files referred to in the customization procedures.

You must create a user interface databank input file. The input file defines the databank location and lists the aliases and long names for the components in your databank. Name the file databankname.dat. This file name will be added to the MMTBS driver file in the next section.

The file format is:

/* */ /* Enclose your comments in slash-asterisk like this */ /* */ DBANK ADD mmdbname dbtype password filename alias-1 longname-1 charge-1 molwt-1 bp-1 vlstd-1 cas-1 class-1 alias-2 longname-2 charge-2 molwt-2 bp-2 vlstd-2 cas-2 class-2 . . .

Where:

mmdbname = Databank name (for a user databank) to be displayed by the user interface on the Components Specifications Databank sheet. For an in-house databank, specify INHSPCD, INHSSOL,INHSAQUS, or INHSBIN.

dbtype = Databank type. For a user databank, specify USRPP1 or USRPP2. For an in-house databank, specify NONE.

password = Databank password (for a user databank). Specify the databank password you use when creating the databank on your Aspen Plus host computer. Not required for an in-housedatabank. Use a unique password for each user databank. This value is not displayed in the user interface.

Page 44: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 44

filename = Databank file name. Specify SYSTEM for an in-house databank. For a user databank, specify: − The full path name with file name and extension of your

databank on the Aspen Plus host (e.g., c:\user databanks\project1.dat), or

− DEF_FILE, if the default file name will come from the aspfiles.def file which resides on the Aspen Plus host.

The path may use the environment variable %APRSYS% to indicate the Aspen Physical Property System Engine directory.For example, if APrSystem 2004.1 is installed in C:\Program Files\AspenTech\APrSystem 2004.1 and the databank files are located in C:\Program Files\AspenTech\AprSystem 2004.1\Engine\Inhouse\Databank\ then you can specify %APRSYS%\Inhouse\Databank\project1.dat for filename.

The filename may contain spaces, but if it does, the entire name should be quoted, as in " C:\Program Files\AspenTech\AprSystem 2004.1\Engine\Inhouse\Databank\project1.dat"

alias = Component alias, up to 12 characters (no embedded blanks)

long-name = Component long-name, up to 32 characters (no embedded blanks).If you want embedded blanks for the long name, use quotes (" ")around the long-name entry.

charge = Ionic charge. Use 0 if unknown. Used on the Electrolyte Wizard on the Components Specifications Selection sheet.

molwt = Molecular weight. There is no default. Used on the Components Find dialog box on the Components Specifications Selection sheet. Use zero (0) if unknown.

bp = Boiling point, Kelvin. Use 0.100000E+36 if unknown. Used on the Components Find dialog box on the Components Specifications Selection sheet.

vlstd = Standard liquid molar volume at 60ºF, m3/kgmole. Use 0.100000E+36 if unknown. Not currently used.

cas = CAS registry number, up to 19 characters. Use an asterisk (*)if unknown. Used on the Components Find dialog box on the Components Specifications Selection sheet.

class = Component class, up to 49 characters. Use a blank space if unknown. Used on the Components Find dialog box on the Components Specifications Selection sheet.

Page 45: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 45

You cannot create your own component class. Use one of the following classes that are currently used by the built-in system databanks. 1-Alkenes Naphthalenes

2,3,4-Alkenes Nitriles

Acetates Nitroamines

Aldehydes n-Alcohols

Aliphatic-ethers n-Aliphatic-acids

Alkylcyclohexanes n-Aliphatic-primary-amines

Alkylcyclopentanes n-Alkanes

Alkynes n-Alkylbenzenes

Anhydrides Organic-salts

Aromatic-alcohols Organic/inorganic-compounds

Aromatic-amines Other-aliphatic-acids

Aromatic-carboxylic-acids Other-aliphatic-alcohols

Aromatic-chlorides Other-aliphatic-amines

Aromatic-esters Other-alkanes

C,H,Br-compounds Other-alkylbenzenes

C,H,F-compounds Other-amines/imines

C,H,I-compounds Other-condensed-rings

C,H,NO2-compounds Other-ethers/diethers

C,H,multihalogen-compounds Other-hydrocarbon-rings

C1/C2-aliphatic-chlorides Other-inorganic-salts

C3/higher-aliphatic-chlorides Other-inorganics

Cycloaliphatic-alcohols Other-monoaromatics

Cycloalkanes Other-polyfunctional-C,H,O

Cycloalkenes Other-polyfunctional-organics

Dialkenes Other-saturated-aliphatic-esters

Dicarboxylic-acids Peroxides

Dimethylalkanes Polyfunctional-C,H,N,halide,(O)

Diphenyl/polyaromatics Polyfunctional-C,H,O,N

Elements Polyfunctional-C,H,O,halide

Epoxides Polyfunctional-C,H,O,S

Ethyl/higher-alkenes Polyfunctional-acids

Formates Polyfunctional-amides/amines

Inorganic-acids Polyfunctional-esters

Inorganic-bases Polyfunctional-nitriles

Inorganic-gases Polyols

Inorganic-halides Propionates-and-butyrates

Isocyanates/diisocyanates Silanes/siloxanes

Ketones Sodium-salts

Mercaptans Sulfides/thiophenes

Methylalkanes Terpenes

Methylalkenes Unsaturated-aliphatic-esters

Multiring-cycloalkanes

If you use a Fortran program to create this databank input file, you must remove the Fortran carriage control attribute.

Page 46: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 46

To remove the attribute: 1 Open an empty file, using a text editor, and import your databank input file.

2 Save the file under a new name and exit the text editor. If you are using a word processor, save the file as a text-only export. Do not save the file in the word processor's native file format.

3 Rename your new file with the original file name.

Adding Synonyms for Component Names in Any Databank Alternate component names, or synonyms, can be added during the customization procedure. These alternate names will be used in the Find Component dialog box in the GUI during component searches. To add synonyms for any component, you need to modify the file syn_cust.dat, located in the GUI\custom subdirectory of the APrSystem installation directory. A sample file syn_cust.dat is located in the APrSystem GUI\custom directory.

The format for the file is:

SYNONYMS ADD AspenAlias

NumberOfSynonyms

Synonym-1

Synonym-2

.....

Synonym-N

Where:

AspenAlias = Alias of the component as defined in the databank input files

NumberOfSynonyms = Number of synonyms which follow

Synonym-1 � Synonym-N

= Synonym(s) for the component

After modifying the file, in order for the changes to take effect, you must run the command:

mmcustom mmtbs

See Running MMTBS to Add User and In-House Databanks to the User Interface below for details.

Page 47: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 47

Modifying the MMTBS Driver File for a User or In-House Databank You must modify the MMTBS driver file, tbprop.dat, to include your user or in-house databank.

In the tbprop.dat file, the delivered databanks are grouped together, as follows:

INCLUDE polymer.dat INCLUDE segment.dat INCLUDE pure11.dat INCLUDE pure10.dat INCLUDE pure93.dat INCLUDE pure856.dat INCLUDE ethylene.dat INCLUDE aqueous.dat INCLUDE aqu92.dat INCLUDE inorgani.dat INCLUDE aspenpcd.dat INCLUDE solids.dat INCLUDE combust.dat

You can place your INCLUDE databankname.dat line anywhere within this group of lines. These INCLUDE lines must stay together in the tbprop.dat file.

Running MMTBS to Add User and In-House Databanks to the User Interface After creating your databank input file and modifying the MMTBS driver file, you need to update the user interface record definition file (RecDef) by running MMTBS.

Enter the following command at the DOS prompt:

mmcustom mmtbs

Adding Help for a User or In-House Databank To create databank hypertext Help:

1 Open the file userdata.rtf using Microsoft Word.

2 In place of the "Databank1" heading, type the text you want as the heading for your topic.

3 In place of the current text on the page, type the text you want the Help system to display. You may want to modify the current contents of the document footnotes with a topic ID of your choice.

Page 48: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 48

4 Compile the Help source files using the userdata.hpj file with the Microsoft Help Workshop.

For instructions on how to change the Help in the Aspen Plus user interface, see Appendix A.

Installing the Databanks in the System After verifying that the databank has been correctly customized in the user interface, you can install the user or in-house databank files in the system directory. Enter the following command at the DOS prompt:

Custinst

Example for Adding a User Databank

Add a new user PP1 databank, USRPP1A, to the databank list on the Components Specifications Databanks sheet. K123 is the name of the databank to be displayed in the Available Databanks list on this sheet. This databank was created on the Aspen Plus host computer with the file name c:\AspenTech\Working Folders\Aspen Plus 2004.1\Project K123\USRPP1A.DAT. The password for the databank is PRJK123.

1 Create the following user interface databank input file, k123.dat:

/* */ /* databank used for Project K123 */ /* */ DBANK ADD K123 USRPP1 PRJK123 "C:\AspenTech\Working Folders\Aspen Plus 2004.1\Project K123\USRPP1A.DAT" HBR HYDROGEN-BROMIDE 0 80.9119 206.450 0.535578E-01 10035-10-6 Inorganic-acids KBR POTASSIUM-BROMIDE 0 119.0020 1653.15 0.559910E-01 * Inorganic-halides NABR SODIUM-BROMIDE 0 102.8940 1663.82 0.439282E-01 7647-15-6 Sodium-salts BR2 BROMINE 0 159.8080 331.900 0.535578E-01 7726-95-6 Elements

Page 49: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 49

2 In Tbprop.dat, an MMTBS driver file, add the INCLUDE K123.DAT line after the PURE93 databank:

INCLUDE polymer.dat INCLUDE segment.dat INCLUDE pure11.dat INCLUDE pure10.dat INCLUDE pure93.dat INCLUDE k123.dat INCLUDE pure856.dat INCLUDE ethylene.dat INCLUDE aqueous.dat INCLUDE aqu92.dat INCLUDE inorgani.dat INCLUDE aspenpcd.dat INCLUDE solids.dat INCLUDE combust.dat

3 Add desired Help files on your databank following the procedure described in Adding Help for a User or In-House Databank, this chapter.

4 Enter the following command to add the databank:

mmcustom mmtbs

5 To verify that the databank is correctly installed, launch Aspen Plus and open the file custom.bkp located in your customization directory.

This starts the user interface locally to use the modified RecDef file. Otherwise, the unmodified system copy of the RecDef file is used.

6 Go to the Components Specifications Databanks sheet and move K123 to the list of selected databanks. Click the Components Find button on the Components Specifications Selection sheet. Confirm that a search for "BROMIDE" will instruct Aspen Plus to find the three "bromide" components, after selecting K123 as your only choice in the Components Specifications Databanks sheet.

7 Install the modified files in the system directory. At the system prompt enter:

custinst

Page 50: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 50

Adding Binary or Pair Parameter Databanks In addition to the databanks described in the previous section, the user interface contains special databanks for binary and pair parameters. These parameters appear on the Properties Parameters BinaryInteraction and Parameters ElectrolytePair forms. These databanks are available only when you use the user interface. You can use these databanks to store:

• Binary parameters for equation-of-state and activity coefficient models.

• Pair parameters for the electrolyte NRTL model.

All parameter values must be in SI units.

To add binary or pair parameter databanks, you need to change only the user interface files. Perform these steps:

1 Create or modify the user interface binary or pair parameter input file.

2 Modify the MMTBS driver file to include the binary or pair parameter databank.

3 Run MMTBS to update the user interface record definition (RecDef) files to include the binary or pair parameter databank.

4 Test your changes in the user interface.

Creating a User Interface Binary or Pair Parameter Input File You can create your own binary or pair parameters databank by creating a databank input file. This file contains the following information for the databank:

• Parameter names.

• Equation-of-state and/or activity coefficient model to which the parameters apply.

• Component aliases and parameter values.

Page 51: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 51

File Format

The format for the binary and pair parameter input file is:

/* */ /* All input starts in column 1 */ /* Enclose your comments in slash-asterisk like this sentence */ /* Do not put comment lines in the middle of a DBANK REPLACE section */ /* Column numbers for data entry are unimportant as long as */ /* there is at least 1 blank between entries */ /* */ /* Do not exceed 80 columns */ /* */ /* All parameter values must be in SI units */ /* */ DBANK REPLACE GAMKIJ paramtype n_sections n_params paramname sym_1 sym_2 . . . n_labellines n_labels label1 label2 . . . . . . . . . n_labels label1 label2 . . . n_modellines eosmodel gammamodel databankname n_comp_pairs comp-i comp-j data1 data2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . comp-i comp-j data1 data2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 52: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 52

Table 4.1 describes parameters for the Binary Pair Parameter Input file.

Table 4.1 Parameters for the Binary and Pair Parameter Input File Parameter Description

paramtype Parameter type (currently unused). Enter 1.

N_sections Number of parameter sections to follow. See Number of Parameter Sections, this chapter.

N_params Number of parameters listed in the row. See Number of Parameters Listed inRow, this chapter.

paramname Parameter name (for example, NRTL)

sym_1 Symmetry code of the first element of a vector parameter, or the symmetry code of the only element of a scalar parameter (for scalar parameter, sym _1 = 2) 0 = Asymmetric parameter (ij ≠ ji). 1 = Asymmetric parameter. Specify ij only. Examples are HENRY and VLCLK. 2 = Symmetric parameter. Specify either ij or ji parameter. 3 = Anti-symmetric parameter ij = �ji. Requires only one parameter.

sym_2 Symmetry code of the second element of a vector parameter

sym_n Symmetry code of the nth element of the vector. See Symmetry Codes for a Vector's nth Element, this chapter.

n_labellines Number of lines used to specify parameter labels

n_labels Number of labels on each row. See Labels on Each Row, this chapter.

label1, label2 Labels for each row. See Labels on Each Row, this chapter.

n_modellines Number of model lines. Enter 1.

eosmodel For equation-of-state binary parameters, eosmodel is the equation-of-state model to which the parameters apply. For activity coefficient binary parameters, eosmodel is the equation�of�state model for the vapor phase to which this parameter applies. Enter ALL if the parameter applies to all equation-of-state models. Some common models are ESRK (Redlich�Kwong), ESHOC (Hayden�O'Connell),and ESIG (Ideal gas).

gammamodel Activity coefficient model for the liquid phase to which this parameter applies. Enter ALL if the parameter applies to all activity coefficient models or if the parameter is for an equation�of�state model. Some common models are GMWILSON, GMRENON, and GMUQUAC.

databankname Name you give the databank, for example, MYDATABANK. This name appears in the Databanks sheet on the Parameters Binary Interaction and Parameters Electrolyte Pair forms.

n_comp_pairs Number of component pairs for which parameters are available. Enter a space and azero (0) after the number of component pairs.�

comp�i, comp�j

Component aliases. See Component Aliases, this chapter.

data1 Parameter 1 for the component pair. Enter two parameters per element for asymmetric parameters (symmetry code = 0). Enter one parameter per element for all other symmetry codes.��

data2 Parameter 2 for the component pair

� In some AspenTech-supplied binary and pair parameter files you may see a 1, 2, or 3 in place of the 0. When this is present, there will be an extra 20, 16, or 14 data values, respectively, at the end of the data listing. These values are statistical information about the data, such as temperature range. They are used only for generation of the help display regarding the databank. If you modify one of these data files, leave the 1, 2, or 3 and the extra data values as they are.

�� Parameter labels determine how you must enter the parameter values. The number of parameter values entered in a row must be exactly the same as the number of parameter labels defined for the corresponding row.

Page 53: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 53

Number of Parameter Sections You can use n_sections to put more than one parameter in the same file. The following example shows how to specify n_sections as 2 for the GMELCC and GMELCD pair parameters:

DBANK REPLACE GAMKIJ 1 2 1 GMELCC 0 ... ...

1 GMELCD 0 ... ...

Number of Parameters Listed in Row You can use n_params to list more than one parameter in a given section. The following example shows how to specify n_params = 2 for the symmetric binary parameters BWRKV and BWRKT.

DBANK REPLACE GAMKIJ 1 1 2 BWRKV 2 BWRKT 2 ... ...

List only one parameter (n_params = 1) when you specify a vector or multiple element parameters like NRTL.

Symmetry Codes for a Vector's nth Element Symmetry codes for a vector's nth element are:

0 = Asymmetric parameter (ij ≠ ji). You must enter values for ij and ji separately. For example, for element 1 of NRTL you must enter both aij and aji.

1 = Asymmetric parameter, but only the ij parameter is meaningful. For example, HENRY can have parameters for CO2-H2O and not H2O-CO2. Enter only aij.

2 = Symmetric parameter. For example, the third element of NRTL is symmetric (cij = cji). Enter only cij.

3 = Parameter ij = �ji. You can enter only one parameter.

For example, NRTL has eight elements. Elements 1, 2, 5, and 6 are asymmetric, while the rest are symmetric:

DBANK REPLACE GAMKIJ 1 1 1 NRTL 0 0 2 2 0 0 2 2

Page 54: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 54

In another example, HENRY has six elements. Elements 1, 2, 3, and 4 are asymmetric, while the rest are symmetric. For elements 1-4, only the ij parameters are meaningful.

DBANK REPLACE GAMKIJ 1 1 1 HENRY 1 1 1 1 2 2

Labels on Each Row You can use n_labels to indicate the number of labels in each row. Use label1 and label2 to specify the labels.

For example, NRTL needs three lines (n_labellines = 3) to specify all labels. Each line has four labels (n_labels = 4)

3 4 aij aji bij bji 4 cij dij eij eji 4 fij fji Tlower Tupper

Since only one label needs to be defined for symmetric parameters, only enter cij , not cji.

The parameter labels determine how you must enter the parameter values. The number of parameter values you enter in a row must be exactly the same as the number of parameter labels defined for the corresponding row.

Component Aliases You can use the comp-i and comp-j variables to indicate component aliases for components i and j.

For pair parameters, use a $ between the aliases of two ionic species that form the electrolyte. For example, for GMELCC pair parameters of H2O and (H+ and HCO3�) enter:

1 GMELCC 0 1 2 cij cji 1 ESRK GMENRTL ENRTL-RK 302 H2O H+$HCO3- 8.045000 -4.072000 ...

The databank name is ENRTL�RK.

Page 55: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 55

Templates for Commonly Used Headers This section provides input file header templates for the following commonly used binary and scalar parameters:

• NRTL binary parameters

• Wilson binary parameters

• Van Laar binary parameters

• Scalar parameters

These templates are available online in the directory C:\Program Files\AspenTech\APrSystem 2004.1\GUI\custom\Examples.

NRTL Binary Parameters The following template shows the NRTL�RK databank for the NRTL binary parameters, with Redlich�Kwong equation of state for the vapor phase:

DBANK REPLACE GAMKIJ 1 1 1 NRTL 0 0 2 2 0 0 2 2 3 4 aij aji bij bji 4 cij dij eij eji 4 fij fji Tlower Tupper 1 ESRK GMRENON NRTL-RK 2 HCLO H2O -7.175849 11.25094 0.0000 0.0000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 273.15 373.15 CCL4 H2O -2.297253 97.28083 0.0000 0.0000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 298.15 383.15

Page 56: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 56

Wilson Binary Parameters The following template shows the VLE-CUST databank for the Wilson binary parameters, with ideal gas law for the vapor phase. You can use the same template for UNIQUAC. Simply change the parameter name to UNIQ, and the GAMMA model name to GMUQUAC, as shown:

DBANK REPLACE GAMKIJ 1 1 1 WILSON 0 0 0 0 2 2 0 3 4 aij aji bij bji 4 cij cji dij dji 4 Tlower Tupper eij eji 1 ESIG GMWILSON VLE-CUST 2 H2O C2H6OS 1.37 -1.37 121.59 -838.35 0.0 0.0 0.0 0.0 363.1500 443.1500 0.0 0.0 H20 C4H10O2-D2 1.59 -1.59 -340.1 -206.6 0.0 0.0 0.0 0.0 363.1500 413.1500 0.0 0.0

Van Laar Binary Parameters The following template shows the DBNAME1 databank for the Van Laar binary parameters.

DBANK REPLACE GAMKIJ 1 1 1 VANL 0 0 2 2 2 2 2 4 aij aji bij bji 4 cij dij tlow thigh 1 ESIG GMVANLAR DBNAME1 2 H2O C2H6OS 1.37 -1.37 12.8 -88.3 0.0 0.0 363.1500 443.1500 H2O C4H10O2-D2 1.58 -1.58 -30.0 -20.5 0.0 0.0 363.1500 413.1500

Scalar Parameters Use the following template for scalar parameters, such as the Hayden-O'Connell binary parameter, HOCETA:

DBANK REPLACE GAMKIJ 1 1 1 HOCETA 2 1 1 aij 1 ESHOC ALL EOS-LIT 1 C2H4O2 C2H4O2 4.5

Page 57: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 57

Modifying the MMTBS Driver File You must update the MMTBS driver file, Tbprop.dat, to include your binary or pair parameter databank. You can create a new section in Tbprop.dat for your binary or pair parameter databank files. Or add your files to the end of the Databank Input Files section. Add files to the Tbprop.dat file using the INCLUDE statement. The following example adds the Binkij.dat file:

/* */ /* Binary and Pair Parameter Databanks */ /* */

INCLUDE binkij.dat

Running MMTBS After creating your databank file and modifying the MMTBS driver file, you need to run MMTBS to update the user interface to reflect your changes. To run MMTBS, use the following command:

mmcustom mmtbs

For a detailed description of the user interface customization files and their locations, see Appendix A.

Testing Your Changes in the User Interface To test your changes, follow these steps:

1 Launch the User Interface and open the file custom.bkp located in the customization directory. This starts the interface locally. If you do not start the user interface using this command, Aspen Plus uses the unmodified system copy of the RecDef file.

2 Go to the Components Specifications Selection sheet and select the components that are in the binary databank.

3 Go to the Properties Specifications Global sheet. Select the property method that contains the binary parameters defined in the binary databank.

4 Go to the Properties Parameters Binary Interaction form for the parameter. The Databank sheet should display the name of the databank. The input sheet should display the binary parameter values.

5 For pair parameters, go to the Properties Parameters ElectrolytePair form.

6 Once you are satisfied with the changes, use the command Custinst to copy files to the system directory for general use.

Page 58: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 58

Adding Ionic Reactions to the Electrolyte Reaction Database The user interface contains a database for ionic reactions, which is used by the Electrolyte Expert System. The database contains the following information:

• Complete dissociation reaction (DISS).

• Partial dissociation reaction (STOIC).

• Salt precipitation reaction (SALT).

• Equilibrium constants for the STOIC reaction.

• Equilibrium constants for the SALT reaction.

• Composition scale of the equilibrium constants (molal or mole fraction).

To create an ionic reactions databank, you must:

1 Create an ionic reactions databank input file.

2 Modify the MMTBS driver file to include the ionic reaction databank.

3 Run MMTBS to update the user interface with the new databank.

If the reaction database contains components that are not in any of the Aspen Plus pure component databanks, you must add these components to the AQUEOUS, SOLIDS, user, or in-house databanks.

For a detailed description of the user interface customization files and their locations, see Appendix A.

Creating an Ionic Reactions Input File The file format for the ionic reactions input file is:

REACTNS ADD rxn_name rxn_type n_comps comp_alias coeff salt-flag . . . K-stoic or K-salt or * comp_scale

Table 4.2 describes parameters for this file.

Page 59: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 59

Table 4.2 Parameters for the Ionic Reactions Input File Parameter Description

rxn_name Reaction name

rxn_type Reaction type: DISS = Complete dissociation STOIC = Partial dissociation, equilibrium reaction SALT = Salt precipitation reaction

n_comps Number of components involved in this reaction

comp_alias Component alias

coeff Stoichiometric coefficient: > 0 = Products of the reaction < 0 = Reactants of the reaction

salt-flag Used only for DISS and SALT reactions: 0 = ions and non-salt, 1 = salt or electrolyte

K-stoic Coefficients a, b, c, and d for STOIC equilibrium constants ln(K) = a + b /T + c ln(T) + d T. T is in Kelvin. Enter an asterisk (*) if K-stoic is not available.

K-salt Coefficients a, b, c, and d for SALT equilibrium constants ln(K) = a + b /T + c ln(T) + d T. T is in Kelvin. Enter an asterisk (*) if K-salt is not available. (No comp-scale line is necessary.)

comp_scale Composition scale for the equilibrium constants (molal or mole-fraction). (No comp-scale line is necessary, if K-salt is not available and you entered an asterisk.)

Example of an Equilibrium Reaction for H2S in Water to Form H3O+ and HS� Ions

This example includes STOIC equilibrium constants on a molality scale.

REACTNS ADD H2S STOIC 4 H2S -1 H2O -1 H3O+ 1 HS- 1 218.599 -12995.4 -33.5471 0 MOLAL

Example of a Complete Dissociation Reaction of NaCl into Na+ and Cl� Ions

REACTNS ADD NACLDISS DISS 3 NACL -1 1 NA+ 1 0 CL- 1 0 *

Page 60: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

4 Configuring Physical Property Databanks 60

Example of Salt Precipitation Reaction for NaCl

SALT equilibrium constants are on a mole-fraction scale.

REACTNS ADD NACLSALT SALT 3 NACL -1 1 NA+ 1 0 CL- 1 0 -203.5875 4381.176 35.87518 -.06721607 MOLEFRAC

Modifying the MMTBS Driver File To include your ionic reactions databank, you must modify the MMTBS driver file, tbprop.dat. Add your file to the tbprop.dat file using the INCLUDE statement. The system reactions databank is stored in the reactns.dat file. In the following example, your own reaction databank, stored in the rxn_cus.dat file, is added to the MMTBS driver file:

/* */ /* Reactions table */ /* */ INCLUDE reactns.dat INCLUDE rxn_cus.dat

Running MMTBS to Update the User Interface Reaction Databank To run MMTBS, enter the following command at the DOS prompt:

mmcustom mmtbs

To test your customization, launch the Aspen Plus User Interface and open the file custom.bkp located in the custom directory. This starts the interface locally. If you do not start the user interface using this command, Aspen Plus uses the unmodified system copy of the RecDef file. Verify that the reactions you added can be selected in the Reactions Chemistry forms, or in the Electrolyte Wizard.

Enter this command at the DOS prompt to install the changes made to the user interface system directory:

custinst

Page 61: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 61

5 Configuring Physical Property Methods

This chapter describes how to customize the Aspen Plus physical property system. These customizations apply to all Aspen Plus and Properties Plus runs. This chapter includes the following topics:

• Overview.

• Customizing the Aspen Plus Simulation Engine.

• Customizing the Aspen Plus User Interface.

• Creating In-House Physical Property Models, Routes, and Methods.

Page 62: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 62

Overview The major steps for customizing the physical property methods are:

1 Modify or create Aspen Plus simulation engine customization files.

2 Run the Aspen Plus Table Building System (TBS) to update the simulation engine with your changes.

3 Test your changes in the simulation engine using input language.

4 Use essentially the same customization files from the Aspen Plus simulation engine to customize the user interface. Run the Aspen Plus user interface Table Building System (MMTBS) to update the user interface Record Definition (RecDef) files.

5 Modify or create Help files to add Help and prompts for your changes.

6 Run the Aspen Plus user interface Hypertext Management (HTM) system to update the binary Help file, mmg.hms, with the new information.

7 Test your changes in the Aspen Plus user interface.

8 Copy the modified files to the system directory for general use.

Customizing the Aspen Plus Simulation Engine You can use TBS files to customize the physical property system. Using TBS you can create or modify the Aspen Plus simulation engine physical property models, routes, and methods. See Creating In-House Physical Property Models, Routes, and Methods later in this chapter, for more information.

Follow these steps to customize the simulation engine:

1 Modify the existing Aspen Plus TBS customization files. Table 5.1 lists these files.

2 Create the TBS update file from the TBS customization files by adding a header and footer to the TBS files.

3 Run the Table Building System (TBS) to modify the System Definition File (SDF).

4 Install the SDF file in Aspen Plus.

The following sections describe these steps.

Page 63: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 63

Modifying the TBS Customization Files Table 5.1 lists the TBS files you can use to customize the physical property system. These files contain descriptions of physical property parameters, models, routes, and methods. For detailed information about the formats of these files, see Appendix B. If you have changed any of these files, you also must customize the user interface. For more information on customizing the user interface, see Appendix A.

It is recommended that you create a special directory under the Aspen Plus directory structure to store your customized files and to test the customization. Or you can use the Aspen Plus update directory.

To go to the Aspen Plus update directory, use this command:

CD "C:\Program Files\AspenTech\APrSystem 2004.1\Engine\inhouse"

Note: If you installed the Aspen Plus simulation engine on a different disk drive or directory, enter the appropriate drive name and directory location.

Table 5.1 TBS Files Used to Customize the Physical Property System File Name Description

*.lcd� Property parameter definitions

ppcnvpmd.dat Conventional property model definitions

ppenmprt.dat Encoded major property routes

ppensprt.dat Encoded subordinate property routes

ppsublst.dat Property subroutine list

*.sto�� Property methods

� Each property parameter definition is stored as a separate file with the .lcd file type.

�� Each property method is stored as a separate file with the .sto file type.

The files listed in Table 5.1 are located in the Aspen Physical Property System TBS directory:

C:\Program Files\AspenTech\APrSystem 2004.1\Engine\tbs

Note: If you installed Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location.

These files are delivered in compressed format. You must extract them by using the extr_tbs command.

Page 64: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 64

Creating the TBS Update File From TBS Customization Files After you customize the TBS files to include the new models, routes, and property methods, you must prepare these files for running the Aspen Plus TBS to update the SDF. Use the maketbs command to prepare the update file.

If you have only one TBS file, use the following command:

maketbs filename.dat

Where filename.dat is the TBS customization file name (such as ppcnvpmd.dat).

The maketbs command creates a new file named tbsupd.dat that you use to run TBS to update the SDF. The original TBS file, filename.dat, is unchanged. The new tbsupd.dat file contains the TBS header, your TBS file, and the TBS footer.

If you have more than one TBS file, combine all your TBS files into one file for running TBS, and follow these steps:

1 Create a new file to list the names of all your TBS files.

2 List each TBS file on a new line, starting in column one. List both the file name and file extension. We recommend that you give this file an .lis extension.

3 Use the following command:

maketbs @filename.lis

Where filename.lis is the file containing the list of all TBS customization files.

The maketbs command creates the tbsupd.dat file. This file lets you run TBS to update the SDF.

4 If you want to combine all the TBS files in your local directory into one file without creating the list file, use this command:

maketbs all

Running the Aspen Plus Table Building System After you prepare the TBS update file, you must run the TBS to update the SDF. To run the TBS, follow these steps:

1 From the directory that contains the TBS update file, copy the Aspen Plus System Definition File (SDF):

COPY "C:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\XEQ\SDFFIL.SDF" SDFNEW.SDF

Note: If you installed Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location.

Page 65: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 65

2 Run the TBS using the TBS update file, tbsupd.dat, created in the previous section:

tbs tbsupd.dat

Test your customization by using the new models, routes, or methods in an Aspen Plus run.

Installing the SDF File in Aspen Plus After you test your changes in the customization directory or in the Aspen Plus update directory, install the SDF file in the Aspen Plus system directory:

COPY SDFNEW.SDF "C:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\XEQ\SDFFIL.SDF"

Note: You must remove write protection from the system SDF before copying the new file. If you installed Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location.

You can then delete the SDF file from the customization directory.

Important: Keep the customized TBS files for customizing future versions of the Aspen Plus simulation engine and user interface.

Customizing the Aspen Plus User Interface To customize the user interface, follow these steps:

1 Modify the appropriate MMTBS input files, or use the TBS files you utilized to customize the Aspen Plus simulation engine.

2 Modify any related Help files.

3 Modify the MMTBS and Help driver files.

4 Run MMCUSTOM to modify the user interface RecDef and Help files.

5 Install the new RecDef and Help files in the user interface system directory.

For instructions to modify the user interface to reflect changes made in the Aspen Plus simulation engine, see Appendix A.

Page 66: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 66

Creating In-House Physical Property Models, Routes, and Methods Familiarize yourself with the concepts of physical property models, routes, and methods before you attempt to create them in-house. For more information about these concepts, see Physical Property Methods and Models, Chapter 4.

This section describes the mechanics for creating Aspen Plus property models, routes, and methods for in-house use. After you modify the Aspen Plus simulation engine, customize the user interface. This ensures that the new models, routes, and methods appear when you use the list box on Properties forms.

This section discusses:

• Adding models, routes, and methods to the simulation engine.

• Adding models, routes, and property methods to the Aspen Plus user interface.

• Adding prompts and Help for models, routes, and property methods.

Adding Models, Routes, and Property Methods to the Simulation Engine To add property models, routes, and methods to the simulation engine, you must create a customization directory in which to work, then follow these steps:

1 Define the new property method using the Property Method Table (see Table B.7). For each major property, you can reference an existing route or a new route. Name the property method with an .sto extension. If the new property method references only existing routes, you can skip steps 2 to 6, and go directly to step 7.

2 Define each new major property route referenced by the new property method using the Major Property Route table (see Figure B.4). Look for a system-defined route in the ppenmprt.dat file that has similar characteristics as the new route. If you can locate a similar route, copy the route table, assign to it a new route ID, then add your changes. If you cannot locate a similar route, you must create the route using the format in Figure B.4.

The new major property route can reference other major or subordinate property routes and property models, as follows:

− For each new major property route, repeat step 2. − For each new subordinate property route, follow step 3. − For each new property model, follow step 4.

3 Define each new subordinate property route using the Subordinate Property Route Table (see Figure B.5). Follow the same procedure for creating a major property route in step 2, with one exception: search the ppensprt.dat file for system-defined subordinate property routes.

The new subordinate property route can reference other major or subordinate property routes. It can also reference property models. For each new major

Page 67: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 67

property route, perform step 2. For each new subordinate property route, repeat step 3. For each new property model, perform step 4.

4 Define each new property model using the Conventional Property Model Definition table (Figure B.1). Search the ppcnvpmd.dat file for a system-defined model that has characteristics similar to the new model. If you can locate a similar model, copy it, assign to it a new model name, and add your changes.

The new model can reference initialization and mainline subroutines. Define these subroutines in step 5.

The new model can also reference property parameters. These parameters are required to store model-specific parameters and are defined in step 7.

5 Define each new subroutine in the Physical Property Subroutine List Table. See Appendix B, Figure B.3 for their locations. Next, you must modify the following:

System Fortran routine To call the Filename

ppuser_phcciu Initialization subroutine phcciu.f

ppuser_esmnu, ppuser_esmnu0 Equation-of-state mainline subroutine esmnu.f, esmnu0.f

ppuser_mdmon9 Remaining mainline subroutines mdmon9.f

6 See Building System Shared Libraries, Chapter 3, for details on modifying these system routines. You must also write the initialization and mainline subroutines. Compile these subroutines in your customization directory.

7 Define each new property parameter using the Property Parameter Definition Table (see Figure B.2).

8 Prepare the TBS files to run the Table Building System, by creating the TBS update file. Next, create a list file, with an .lis file extension, to list all TBS files. Use this command to create the TBS update file:

maketbs @filename.lis

9 Copy the Aspen Plus System Definition File (SDF) to your customization directory. See Running the Aspen Plus Table Building System, this chapter.

10 Run TBS to update the SDF using the tbsupd.dat file:

tbs tbsupd.dat

Example for Adding a Property Method to the Simulation Engine

This example creates a customized version of the PENG-ROB property method, called PR-LK. The new property method uses:

• The Lee-Kesler model to calculate mixture enthalpy, entropy, and Gibbs energy.

• An in-house model, VLMOD, to calculate liquid mixture molar volume.

The VLMOD model is coded in a Fortran subroutine called VL900. You must create:

• A new route, VLNEW, to use the VLMOD model.

• A new property parameter, VLLC, to store and pass the parameter for the VLMOD model.

Page 68: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 68

To add a property method to the simulation engine:

1 Create a customization directory as your working directory. Define the new property method PR-LK based on an existing property method, PENG-ROB. Copy the property method definition for PENG-ROB (the peng-rob.sto file) into a new file called pr-lk.sto.

2 Using a text editor, modify pr-lk.sto, as follows:

Replace this route With this route

HVMX24 HVMX13

HLMX106 HLMX13

GVMX30 GVMX13

GLMX106 GLMX13

SVMX24 SVMX13

SLMX98 SLMX13

VLMX20 VLNEW

The system-defined routes HVMX13, HLMX13, GVMX13, GLMX13, SVMX13, and SLMX13 calculate vapor and liquid mixture enthalpy, Gibbs energy, and entropy. The routes use the Lee-Kesler model. The new route for calculating liquid mixture molar volume, VLNEW, is defined in step 2.

The underlined entries in the following table show how the routes appear in the pr-lk.sto file:

PPSTOPTN REPLACE PR-LK 35 PHIVMX PHIVMX38 PHILMX PHILMX104 HVMX HVMX13 HLMX HLMX13 GVMX GVMX13 GLMX GLMX13 SVMX SVMX13 SLMX SLMX13 VVMX VVMX24 VLMX VLNEW MUVMX MUVMX02 MULMX MULMX03 KVMX KVMX01 KLMX KLMX01 DVMX DVMX02 DLMX DLMX02 SIGLMX SIGLMX02 PHIV PHIV09 PHIL PHIL11 HV HV09 HL HL12 GV GV09 GL GL11 SV SV09 SL SL10 VV VV07 VL VL01 DL DL01 DV DV02 MUL MUL01 MUV MUV01 KV KV01 KL KL01 SIGL SIGL01 PHIS PHIS06

3 In the ppenmprt.dat file define the new route, VLNEW, that uses the new model VLMOD. Add this change to the end of the ppenmprt.dat file:

PPENMPRT REPLACE VLNEW VLMX 1 1 VLMX VLMOD 1 900 0 0 0 0

You do not need to modify the ppensprt.dat file, because the new property method does not require a new subordinate property route.

4 In the ppcnvpmd.dat file, define the new model VLMOD. This model references the Fortran subroutine VL900 and the property parameter VLLC. This model does not use work area, model option codes, or an initialization

Page 69: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 69

subroutine. (From Figure B.1, n1 = 0, n2 = 0, iwaq = iwal = iwac = 0, rwaq = rwal = rwac = 0.)

5 Add the following table to the end of the ppcnvpmd.dat file:

PPCNVPMD REPLACE VLMOD VLMX 900 0111 00001 00001 0 0 0 1 VL900 1 VLLC

Also save the table in another file, vlmod.dat, which will be used in the Aspen Plus user interface customization.

The new subroutine VL900 is defined in step 4. The new property parameter VLLC is defined in step 5.

6 In the ppsublst.dat file, define the new subroutine VL900. Add the following line to the end of the ppsublst.dat file:

PPSUBLST REPLACE VL900

You must also modify the system routine ppuser_mdmon9 to call the new routine vl900 as described in Appendix B, Modifying Aspen Plus System Routines. Compile both vl900.f and mdmon9.f in the customization directory.

7 In a new vllc.lcd file, define the new property parameter VLLC. This is a unary scalar parameter with parameter index number = 900. It defaults to missing (1D35) and can be regressed. The units for this parameter are SI. Units conversion is not allowed (the conversion code of 44 for dimensionless units is used).

PPLCDEFS REPLACE VLLC User Molar Volume 1 1 0 1 900 1 1D35 1 44 1 44

8 Prepare these TBS files for running TBS by creating the TBS update file. In a new file called pr-lk.lis, list all the TBS files:

pr-lk.sto ppenmprt.dat ppcnvpmd.dat ppsublst.dat vllc.lcd

9 Create the TBS update file by using the command:

maketbs @pr-lk.lis

Page 70: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 70

This command creates the tbsupd.dat file.

10 Copy the Aspen Plus System Definition File (SDF) to your working directory. See Running the Aspen Plus Table Building System, this chapter.

11 Run TBS to update the SDF using the tbsupd.dat file:

tbs tbsupd.dat

To confirm the customization, use the PR-LK property method in a PROPERTIES paragraph. Use a PROP-TABLE to report mixture vapor and liquid enthalpy and liquid molar volume. Compare the results against expected values.

Adding Models, Routes, and Property Methods to the Aspen Plus User Interface You can modify simulation engine files to include models, routes, and property methods. You can also use most of these files to change the user interface Record Definition (RecDef) files. Exceptions are as follows:

• The ppsublst.dat file is not required.

• You must combine your modified or new property parameter definition (*.lcd) files with the user interface lcd_cust.dat file.

• You must combine your modified or new property method definition (*.sto) files with the user interface ppstoptn.dat file.

• You must copy your modified or new model definitions in the ppcnvpmd.dat file to the mdl_cust.dat file.

The Aspen Plus User Interface Customization files are located in the customization directory:

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\custom

Use the following command to run the MMTBS to update the RecDef files.

mmcustom mmtbs

Then follow these steps:

1 To verify the customization, start the user interface and review the new models, routes, and property methods on the appropriate forms. To start the Aspen Plus User Interface and use the locally modified RecDef file, you must open the file custom.bkp from your customization directory.

Otherwise, the unmodified system copy of the RecDef file is used.

2 Install the new RecDef files into the user interface system directory, using the following command:

custinst

Note: You must have write access to the user interface system directory to run custinst.

Page 71: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 71

Adding Prompts and Help for Models, Routes, and Property Methods To add prompts and Help for your models, routes, and property methods, follow these steps:

1 Modify or create the Help (.hxt) file and the Windows Help (.hlp) file. For detailed instructions, see Appendix A.

2 Modify the HTM Help driver file (tbcustom.hxt).

3 Process the Help file to incorporate your prompts and Help into the user interface Help file (mmg.hms).

You can describe your property method, model, or parameter in the ppstoptn.hxt, ppcnvpmd.hxt, or pplcdefs.hxt files, respectively, using one or both of the following:

• A two-line prompt.

• Link to the Windows Help created in step 1.

For property routes in the ppenmprt.hxt and ppensprt.hxt files, you can only add prompts. When you click the View button on the Properties Property Methods Routes sheet, Aspen Plus displays a route tree that graphically describes the route in question.

You can add prompts and Help to the existing Help files. Or, you can save your prompts and Help in a new file. In either case, you must list the modified or new file names in the HTM Help driver file, tbcustom.hxt, in the user interface customization directory. It is recommended that you save all your customized Help and prompt information in new files rather than adding them to existing Help (*.hxt) files. This will speed up the customization process, especially for the customization of future releases.

Use the following command to incorporate your changes into the binary Help file, mmg.hms:

mmcustom htm

For more information, see Creating Help and Prompts, Appendix A.

Example for Adding a Property Method to the User Interface

This example is a continuation of the example Adding a Property Method to the Simulation Engine. You can directly use the TBS file ppenmprt.dat created in the previous example after deleting all lines starting with the "C$" characters. Append this file To this user interface file

pr-lk.sto (property method definition) ppstoptn.dat

vllc.lcd (parameter definition) lcd_cust.dat

vlmod.dat (model definition) mdl_cust.dat

vlnew.dat (route definition) ppenmprt.dat

Since no new files are created, the driver tbcustom.dat does not need to be updated.

Page 72: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 72

Copy the above files to the customization directory for the Aspen Plus user interface, as follows:

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom

To add the property methods and Help information to the user interface, follow these steps:

1 Run MMTBS to update the user interface RecDef files using the TBS input files you created:

mmcustom mmtbs

2 Create a new file, pr_lk.hxt, to store all your Help and prompts. To add the user interface Help and prompts for the new property method PR-LK, add the following to the pr_lk.hxt file:

>wrap on

>p_replace P_PPSTOPTN_PR-LK Peng-Robinson with Lee-Kesler for enthalpy and in-house model for liquid molar volume. Help for description >endmessage

>h_replace H_PPSTOPTN_PR-LK custom.hlp #1 >endmessage

The file custom.hlp is created following the procedure described in Appendix A for the creation of Windows Help. Figure 5.1 shows the contents of the custom.rtf file that may be used to create the Windows Help.

For more information on Windows Help, see Creating Help and Prompts, Appendix A.

3 Add a prompt for the new major property route VLNEW to the pr_lk.hxt file.

>p_replace P_PPENMPRT_VLMX_VLNEW Liquid mixture molar volume calculated using in-house VLMOD model >endmessage

4 Add a prompt for the new property model VLMOD to the pr_lk.hxt file.

>p_replace P_PPCNVPMD_VLMX_VLMOD In-house model for liquid mixture molar volume >endmessage

5 Add the prompt for the new liquid molar volume parameter VLLC to the pr_lk.hxt file:

>p_replace P_PPLCDEFS_VLLC Parameter for the in-house model for liquid mixture molar volume, VLMOD >endmessage

6 Modify the Help driver file, tbcustom.hxt, to list your Help file, pr_lk.hxt. Use this command to update the user interface binary Help file:

mmcustom htm

Page 73: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 73

7 To confirm your customization, start the user interface. Go to the Properties Specifications Global sheet and get the list on the Property Method list box. Confirm that PR_LK appears on the list.

8 On the Properties Property Methods Routes sheet, confirm that route HVMX13 calculates the property HVMX, route HLMX13 calculates the property HLMX, and so on.

9 Examine the new prompts associated with these entries.

10 On the Property Methods Models sheet, confirm that Aspen Plus calculates the property VLMX, using the model VLMOD.

11 On the Parameters Pure Component Scalar form, use List on the Parameters field. Confirm that the parameter VLLC appears in the list.

12 Install the RecDef and Help files into the user interface system directory by using the command:

custinst

The new property method with customized routes and models are now installed for in-house use.

Figure 5.1 shows an edited custom.rtf page.

Page 74: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

5 Configuring Physical Property Methods 74

Figure 5.1 Example of Edited Custom.rtf in MS Word Page Layout View

Page 75: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 75

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

This chapter contains the following topics:

• Overview.

• Liquid Service Safety Relief Valves.

• Gas/2-Phase Service Safety Relief Valves.

• Rupture Disks.

• Pipes for Pressure Relief and the Pipe Model.

• Emergency Relief Vents.

• Inlet and Tail Pipe Vents.

• Valves for the Valve Model.

Page 76: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 76

Overview Pres-Relief (the Aspen Plus pressure relief calculation system) and the Valve and Pipe unit operation models uses table that define pipes, valves, emergency relief vents, and rupture disks. You can customize these tables by changing the appropriate data files (located in the user interface CUSTOM directory) and processing them using the Aspen Plus User Interface Table Building System (MMTBS).

For more information about running MMTBS and applying your changes, see Chapter 4.

The following data files can be changed:

Note: The format of the files is not column-sensitive.

This file Contains data for

liqtable.dat Liquid service safety relief valves

gastable.dat Gas/two-phase service safety relief valves

rupture.dat Rupture disks

pipe.dat Pipes used in the pressure relief system and the Pipe unit operation model

ervtable.dat Emergency relief vents

transflo.dat Valves used in the inlet and tail pipes

valve.dat Valves used in the Valve unit operation model

Liquid Service Safety Relief Valves for Pressure Relief The Pres-Relief ReliefDevice SafetyValve sheet contains a table of liquid service safety relief valves. Aspen Plus uses this table if Service="Liquid only." The user chooses:

• Valve type.

• Manufacturer.

• Series.

• Nominal diameter.

Aspen Plus retrieves these specifications from the table:

• Throat diameter.

• Inlet diameter.

• Outlet diameter.

• Discharge coefficient.

• Over-pressure factor.

The valve opens completely when pressure at the valve entrance is equal to the over-pressure factor multiplied by the initial opening pressure.

Page 77: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 77

The over-pressure factor defaults to 1.1. To customize the table, modify the liqtable.dat file. Figure 6.1 shows the file organization.

Note: The indentation is for reading clarity only.

Figure 6.1 Liquid Service Safety Relief Valves File Organization PRSRV REPLACE LIQUID no_types name_typei no_manuf name_manufj no_series seriesk no_sizes sizem t_diamm i_diamm o_diamm cdm opfm sizem+1 t_diamm+1 i_diamm+1 o_diamm+1 cdm+1 opfm+1 . . . seriesk+1 . . . name_manufj+1 . . . name_typei+1 . . .

Where:

no_types = Number of types

name_typei = Name of ith type. Repeat this section for each type.

no_manuf = Number of manufacturers

name_manufj = Name of jth manufacturer. Repeat this section for each manufacturer.

no_series = Number of series from the jth manufacturer

seriesk = Name of kth series. Repeat this section for each series.

no_size = Number of sizes for kth series

sizem = A character string specifying the nominal size, up to 20 characters

t_diamm = Throat diameter for mth size in inches

i_diamm = Inlet diameter for mth size in inches

o_diamm = Outlet diameter for mth size in inches

cdm = Discharge for mth size coefficient

opfm = Over-pressure factor for mth size factor

Page 78: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 78

Figure 6.2 is an abbreviated version of the delivered liqtable.dat file. The comments provided here are not included in the file.

Figure 6.2 liqtable.dat File Keywords and Data Comments

PRSRV REPLACE LIQUID Liquid service table

1 There is one type.

CONV The type is CONV.

2 There are two manufacturers.

CROSBY The first manufacturer is CROSBY.

JLT The series is JLT.

3 There are three sizes for series JLT.

1_2_0.398_(D) 0.398 1.049 2.067 0.729 1.1 size t_diam i_diam o_diam cd opf�

1_2_0.531_(E) 0.531 1.049 2.067 0.729 1.1 size t_diam i_diam o_diam cd opf�

1.5_2_0.665_(F) 0.665 1.61 2.067 0.729 1.1 size t_diam i_diam o_diam cd opf�

DRESSER The second manufacturer is DRESSER.

1 There is one series.

1900 The series is 1900.

4 There are four sizes for series 1900.

1_2_0.4036_(D) 0.4036 1.049 2.067 0.744 1.1 size t_diam i_diam o_diam cd opf�

1_2_0.5387_(E) 0.5387 1.049 2.067 0.744 1.1 size t_diam i_diam o_diam cd opf�

1.5_2_0.674_(F) 0.674 1.61 2.067 0.744 1.1 size t_diam i_diam o_diam cd opf�

1.5_2.5_0.863_(G)0.863 1.61 2.469 0.744 1.1 size t_diam i_diam o_diam cd opf�

� Where: size = Valve size t_diam = Throat diameter in inches i_diam = Inlet diameter in inches o_diam = Outlet diameter in inches cd = Discharge coefficient opf = Over-pressure factor

Page 79: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 79

Gas/2-Phase Service Safety Relief Valves for Pressure Relief The Pres-Relief ReliefDevice SafetyValve sheet also contains a table of gas/2-phase service safety relief valves. Aspen Plus uses this table if Service="Gas or 2-phase." The user chooses:

• Valve type.

• Manufacturer.

• Series.

• Nominal diameter.

Aspen Plus retrieves these specifications from the table:

• Throat diameter.

• Inlet diameter.

• Outlet diameter.

• Discharge coefficient.

To customize the table, modify the gastable.dat file. Figure 6.3 shows the organization of the file. The indentation is for reading clarity only.

Figure 6.3 Gas/2-Phase Service Safety Relief Valves File Organization

PRSRV REPLACE GAS/2-PHASE no_types name_typei no_manuf name_manufj no_series seriesk no_size sizem t_diamm i_diamm o_diamm cdm sizem+1 t_diamm+1 i_diamm+1 o_diamm+1 cdm+1 . . . seriesk+1 . . . name_manufj+1 . . . name_typei+1 . . .

Page 80: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 80

Where:

no_types = Number of types

name_typei = Name of ith type

no_manuf = Number of manufacturers

name_manufj = Name of jth manufacturer. Repeat this section for each manufacturer.

no_series = Number of series from the jth manufacturer

seriesk = Name of kth series. Repeat this section for each series.

no_size = Number of sizes for kth series

sizem = A character string specifying the nominal size, up to 20 characters.

t_diamm = Throat diameter for mth size in inches

i_diamm = Inlet diameter for mth size in inches

o_diamm = Outlet diameter in inches

cdm = Discharge coefficient

Page 81: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 81

Figure 6.4 is an abbreviated version of the delivered gastable.dat file. The comments provided here are not included in the file.

Figure 6.4 gastable.dat File Keywords and Data Comments

PRSRV REPLACE GAS/2-PHASE Gas or 2-phase service table.

1 There is one type.

CONV The type is CONV.

2 There are two manufacturers.

CROSBY The first manufacturer is CROSBY.

1 There is one series.

JOS The series is JOS.

3 There are three sizes for series JOS.

1_2_0.398_(D) 0.398 1.049 2.067 0.961 size t_diam i_diam o_diam cd�

1_2_0.531_(E) 0.531 1.049 2.067 0.961 size t_diam i_diam o_diam cd�

1.5_2_0.665_(F)0.665 1.61 2.067 0.961 size t_diam i_diam o_diam cd�

DRESSER The second manufacturer is DRESSER.

1 There is one series.

1900 The series is 1900.

4 There are four sizes for series 1900.

1_2_0.4306_(D) 0.4036 1.049 2.067 0.950 size t_diam i_diam o_diam cd�

1_2_0.5387_(E) 0.5387 1.049 2.067 0.950 size t_diam i_diam o_diam cd�

1.5_2_0.674_(F) 0.674 1.61 2.067 0.950 size t_diam i_diam o_diam cd�

1.5_2.5_0.863_(G)0.863 1.61 2.469 0.950 size t_diam i_diam o_diam cd�

� Where: size = Valve size t_diam = Throat diameter in inches i_diam = Inlet diameter in inches o_diam = Outlet diameter in inches cd = Discharge coefficient

Page 82: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 82

Rupture Disks for Pressure Relief The Pres-Relief ReliefDevice RuptureDisk sheet contains the rupture disks table. The user chooses:

• Manufacturer.

• Style.

• Nominal diameter.

Aspen Plus retrieves these specifications from the table:

• Actual diameter.

• Discharge coefficient.

To customize the table, modify the rupture.dat file. Figure 6.5 shows the organization of the file. The indentation is for reading clarity only.

Figure 6.5 Rupture Disks File Organization

PRRUP REPLACE manuf no_style name_stylei no_sizes nom_diamj act_diamj cdj nom_diamj+1 act_diamj+1 cdj+1 . . . name_stylei+1 . . .

Where:

manuf = Manufacturer type

no_style = Number of styles

name_stylei = Name of ith style. Repeat this section for each style.

no_sizes = Number of sizes for ith style

nom_diamj = Nominal diameter for jth size, up to 10 characters

act_diamj = Actual diameter in inches for jth size

cdj = Discharge coefficient for jth size

Page 83: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 83

Figure 6.6 is an abbreviated version of the delivered rupture.dat file. The comments provided here are not included in the file.

Figure 6.6 rupture.dat File Keywords and Data Comments

PRRUP REPLACE ZOOK The first manufacturer is ZOOK.

2 There are two styles.

MONO The first style is MONO.

3 There are three sizes of style MONO.

.5-IN .5 .888 nom_diam act_diam cd�

.75-IN .75 .888 nom_diam act_diam cd�

1-IN 1. .888 nom_diam act_diam cd�

INVERTED The second style is INVERTED.

2 There are two sizes of style INVERTED.

.5-IN .5 .779 nom_diam act_diam cd�

.75-IN .75 .779 nom_diam act_diam cd�

PRRUP REPLACE FIKE The second manufacturer is FIKE.

2 There are two styles.

P The first style is P.

3 There are three sizes of style P.

.5-IN .5 .62 nom_diam act_diam cd�

.75-IN .742 .62 nom_diam act_diam cd�

1-IN .9568 .62 nom_diam act_diam cd�

CP The second style is CP.

4 There are four sizes of style CP.

.5-IN .5 .62 nom_diam act_diam cd�

.75-IN .742 .62 nom_diam act_diam cd�

1-IN .9568 .62 nom_diam act_diam cd�

1.5-IN 1.5 .62 nom_diam act_diam cd�

� Where: nom _diam = Nominal diameter act_diam = Actual diameter in inches cd = Discharge coefficient

Page 84: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 84

Pipes for Pressure Relief and the Pipe Model The Pres-Relief InletPipes , Pres-Relief TailPipes, and Pipe Setup forms contain the pipe schedule table. The user chooses:

• Material.

• Schedule.

• Nominal diameter.

Aspen Plus retrieves the actual diameter and roughness from the table. To customize the table, modify the pipe.dat file. Figure 6.7 shows the file organization. The indentation is for reading clarity only.

Figure 6.7 Pressure Relief Pipes File Organization

PRPIPE REPLACE material no_sch schedulei no_diam nom_diamj act_diamj roughnessj nom_diamj+1 act_diamj+1 roughnessj+1 . . . schedulei+1 . . .

Where:

material = Material type, up to 12 characters

no_sch = Number of schedules available for material type

schedulei = Schedule value for ith schedule, up to 10 characters. Repeatthis section for each schedule.

no_diam = Number of diameters for this schedule

nom_diamj = Nominal diameter for jth diameter in inches, up to 10 characters.

act_diamj = Actual internal diameter for jth diameter in inches

roughnessj = Absolute roughness in feet

Page 85: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 85

Figure 6.8 is an abbreviated version of the delivered pipe.dat file for carbon-steel. The comments provided here are not included in the file.

Figure 6.8 pipe.dat File Keywords and Data Comments

PRPIPE REPLACE CARBON-STEEL The material is carbon-steel.

2 There are two schedules.

10 The first schedule is schedule 10.

3 There are three sizes for schedule 10.

0.25-IN 0.410 .00015 nom_diam act_diam roughness�

0.375-IN 0.545 .00015 nom_diam act_diam roughness�

0.500-IN 0.674 .00015 nom_diam act_diam roughness�

20 The second schedule is schedule 20.

3 There are three sizes for schedule 20.

1-IN 1.073 .00015 nom_diam act_diam roughness�

2-IN 2.111 .00015 nom_diam act_diam roughness�

3-IN 3.164 .00015 nom_diam act_diam roughness�

� Where: nom_diam = Nominal diameter act_diam = Actual diameter in inches roughness = Absolute roughness in feet

Emergency Relief Vents for Pressure Relief The Pres-Relief ReliefDevice ReliefVent sheet contains a table of emergency relief vents. The user chooses:

• Manufacturer.

• Style.

• Nominal diameter.

Aspen Plus retrieves these specifications from the table:

• Diameter.

• Recommended setpoint.

To customize the table, modify the ervtable.dat file. Figure 6.9 shows the file organization. The indentation is for reading clarity only.

Page 86: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 86

Figure 6.9 Emergency Relief Vents File Organization PRERV REPLACE manuf no_style name_stylej no_sizes nom_sizej act_diamj setpointj nom_sizej+1 act_diamj+1 setpointj+1 . . . name_stylej+1 . . . no_stylei+1 . . .

Where:

manuf = Manufacturer type

no_style = Number of styles for ith manufacturer

name_stylei = Name of style

no_sizes = Number of sizes in style

nom_diamj = Nominal diameter for jth size, up to 10 characters.

act_diamj = Actual diameter in inches for jth size

setpointj = Suggested setpoint in psig for jth size

Page 87: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 87

Figure 6.10 is an abbreviated version of the delivered ervtable.dat file. The file does not include comments.

Figure 6.10 ervtable.dat File Keywords and Data Comments

PRERV REPLACE PROTECTOSEAL The first manufacturer is PROTECTOSEAL.

2 There are two styles.

7800 The first style is 7800.

3 There are three sizes in this style.

2-IN 1.888 -2 nom_diam act_diam setpoint�

3-IN 2.764 -2 nom_diam act_diam setpoint�

4-IN 3.598 -2 nom_diam act_diam setpoint�

9800 The second style is 9800.

2 There are two sizes in this style.

2-IN 1.487 2 nom_diam act_diam setpoint�

3-IN 2.263 2 nom_diam act_diam setpoint�

PRERV REPLACE GROTH The second manufacturer is GROTH.

1 There is one style.

2100 The first style is 2100.

3 There are three sizes in this style.

16-IN 8.016 2 nom_diam act_diam setpoint�

20-IN 9.944 2 nom_diam act_diam setpoint�

24-IN 12.092 2 nom_diam act_diam setpoint�

� Where: nom_diam = Nominal diameter act_diam = Actual diameter in inches setpoint = Suggested setpoint in psig

Page 88: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 88

Inlet and Tail Pipe Valves for Pressure Relief The Pres-Relief InletPipes and Pres-Relief TailPipes forms also contain a valve table that you can customize. Although designed for transflo valves, this table can include any valve that fits into the existing format. The user chooses:

• Manufacturer.

• Style.

• Nominal diameter.

Aspen Plus retrieves these specifications from the table:

• Flow area.

• Flow coefficient (Cv).

Aspen Plus converts the flow coefficient value to a K value:

2

4891CvdK =

Where d is the valve diameter in inches

For more information about this method, see Flow of Fluids Through Valves, Fittings, and Pipe, Technical Paper No. 410, Crane Co., 104 N. Chicago St., Joliet, IL 60434, 1988, p. A-31.

To customize the valve table, modify the transflo.dat file. Figure 6.11 shows the file organization. The indentation is for reading clarity only.

Figure 6.11 Inlet and Tail Pipe File Organization

PRTRAN REPLACE manuf no_styles name_stylei no_sizes nom_diamj port_areaj flow_coeffj nom_diamj+1 port_areaj+1 flow_coeffj+1 . . . name_stylei+1 . . .

Page 89: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 89

Where:

manuf = Manufacturer type

no_styles = Number of styles available for manufacturer type

name_stylei = Name for ith style. Repeat this section for each style.

no_sizes = Number of sizes

nom_diamj = Nominal diameter for jth size in inches

port_areaj = Port area in square inches for jth size

flow_coeffj = Flow coefficients for jth size

Figure 6.12 is an abbreviated version of the delivered transflo.dat file. The file does not include comments.

Figure 6.12 transflo.dat File Keywords and Data Comments

PRTRAN REPLACE KTM The manufacturer is KTM.

2 There are two styles.

BALL-L-PORT The first style is BALL-L-PORT.

3 There are three sizes of style BALL-L-PORT.

1.5-IN 2.03583 53. nom_diam port_area flow_coeff�

2-IN 3.3556 110. nom_diam port_area flow_coeff�

2.5-IN 4.78775 160. nom_diam port_area flow_coeff�

BALL-T-PORT The second style is BALL-T-PORT.

4 There are four sizes of style BALL-T-PORT.

1.5-IN 2.03583 50. nom_diam port_area flow_coeff�

2-IN 3.3556 100. nom_diam port_area flow_coeff�

2.5-IN 4.78775 150. nom_diam port_area flow_coeff�

3-IN 7.39265 240. nom_diam port_area flow_coeff�

� Where: nom_diam = Nominal diameter port_area = Port area flow_coeff = Flow coefficients

Page 90: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 90

Valves for the Valve Model The Valve Input Valve Parameters sheet contains a table of valves. The user chooses:

• Valve type.

• Manufacturer.

• Series/style.

• Size.

Aspen Plus retrieves these specifications from the table:

• Valve position.

• Flow coefficient (Cv).

• Pressure drop ratio factor (XT).

• Pressure recovery factor (Fl).

To customize the table, modify the valve.dat file. Figure 6.13 shows the organization of the file. The indentation is for reading clarity only.

Figure 6.13 Valve File Organization

VALDAT REPLACE name_typei no_manufs name_manufj no_series/styles name_series/stylek no_sizes sizel no_points Vp1 Cv1 XT1 Fl1 . Vpn Cvn XTn Fln sizel+1 . name_series/stylek+1 . name_manufj+1 . VALDAT REPLACE name_typei+1

Page 91: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 91

Where:

name_typei = Name of ith valve type

no_manufs = Number of manufacturers

name_manufj = Name of jth manufacturer

no_series/style = Number of series/styles

name_series/stylek = Name of kth series/style

no_sizes = Number of valve sizes

sizel = A character string specifying the nominal valve size

no_points = Number of entries for valve position, flow coefficient, pressure drop ratio factor, and pressure recovery factor

Vp1 ... Vpn = n entries for valve position (as percentage of maximum opening)

Cv1 ... Cvn = n entries for corresponding valve flow coefficient

XT1 ... XTn = n entries for corresponding pressure drop ratio factor

Fl1 ... Fln = n entries for corresponding pressure recovery factor

Figure 6.14 is an abbreviated version of the delivered valve.dat file. The file does not include comments.

Figure 6.14 valve.dat File Keywords and Data Comments

VALDAT REPLACE BALL The first valve type is BALL

1 There is one manufacturer

NELES-JAMESBURY The first manufacturer is NEL:ES-JAMESBURY

2 There are two series/styles

5000_REDUCED_PORT-FLANGED The first series/style is 5000_REDUCED_PORT-FLANGED

20 There are 20 sizes of series/style 5000_REDUCED_PORT-FLANGED

0.5-IN The first size is 0.5-IN

10 There are 10 points

10 0.1 0.91 0.82 Vp Cv XT Fl�

20 0.2 0.91 0.82 Vp Cv XT Fl�

30 0.4 0.90 0.80 Vp Cv XT Fl�

40 0.7 0.88 0.75 Vp Cv XT Fl�

50 1.2 0.85 0.67 Vp Cv XT Fl�

60 1.9 0.80 0.57 Vp Cv XT Fl�

� Vp = Valve position as percent of maximum opening Cv = Valve flow coefficient XT = Pressure drop ratio factor Fl = Pressure recovery factor

continued

Page 92: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 92

Keywords and Data Comments

70 2.7 0.74 0.42 Vp Cv XT Fl�

80 4.2 0.65 0.28 Vp Cv XT Fl�

90 6.3 0.55 0.20 Vp Cv XT Fl�

100 9.0 0.48 0.15 Vp Cv XT Fl�

0.75-IN The second size is 0.75-IN

METAL_SEATED_FULL_PORT The second series/style is METAL_SEATED_FULL_PORT

16 There are 16 sizes of series/style METAL_SEATED_FULL_PORT

1-IN The first size is 1-IN

10 There are 10 points

10 0.68 0.91 0.82 Vp Cv XT Fl�

20 1.51 0.91 0.82 Vp Cv XT Fl�

30 2.81 0.90 0.80 Vp Cv XT Fl�

40 4.89 0.88 0.75 Vp Cv XT Fl�

50 7.70 0.85 0.67 Vp Cv XT Fl�

60 11.5 0.80 0.57 Vp Cv XT Fl�

70 17.0 0.74 0.42 Vp Cv XT Fl�

80 26.0 0.67 0.30 Vp Cv XT Fl�

90 38.0 0.59 0.20 Vp Cv XT Fl�

100 52.0 0.51 0.15 Vp Cv XT Fl�

1.5-IN The second size is 1.5-IN

VALDAT REPLACE BUTTERFLY The second valve type is BUTTERFLY

1 There is one manufacturer

NELES-JAMESBURY The first manufacturer is NELES-JAMESBURY

2 There are two series/styles

ANSI_CLASS_150 The first series/style is ANSI_CLASS_150

13 There are 13 sizes of series/style ANSI_CLASS_150

3-IN The first size is 3-IN

10 There are 10 points

10 12.5 0.76 0.42 Vp Cv XT Fl�

20 31.3 0.79 0.42 Vp Cv XT Fl�

30 51.0 0.82 0.43 Vp Cv XT Fl�

40 75.0 0.83 0.44 Vp Cv XT Fl�

50 103.0 0.83 0.45 Vp Cv XT Fl�

� Vp = Valve position as percent of maximum opening Cv = Valve flow coefficient XT = Pressure drop ratio factor Fl = Pressure recovery factor

continued

Page 93: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data 93

Keywords and Data Comments

60 137.0 0.82 0.42 Vp Cv XT Fl�

70 174.0 0.80 0.34 Vp Cv XT Fl�

80 208.0 0.75 0.25 Vp Cv XT Fl�

90 229.0 0.70 0.18 Vp Cv XT Fl�

100 235.0 0.65 0.15 Vp Cv XT Fl�

4-IN The second size is 4-IN

� Vp = Valve position as percent of maximum opening Cv = Valve flow coefficient XT = Pressure drop ratio factor Fl = Pressure recovery factor

Page 94: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 94

7 Accounting Report

This chapter contains the following topics:

• Generating a User-Based Accounting Report.

• Running the Accounting Program.

• Creating a New Accounting File.

• Making Accounting Information Required.

• Activating Accounting on Windows.

Page 95: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 95

You can use the Aspen Plus accounting program to generate reports on the use of Aspen Plus at a particular site. Every Aspen Plus run writes run information to the Aspen Plus accounting file, which is stored in the Aspen Plus accounting directory. The accounting program generates reports based on information in the accounting file. You specify the level of detail to include in the report. The top levels of detail are:

• Number of runs for each user.

• A user-based accounting report showing the number of runs for each user in each of the three months in a calendar quarter.

• A non user-based accounting report showing the number of runs plus details in an arbitrary time period.

• Statistical information about usage at the site, including several measures of problem size.

• Statistical information about usage by each user and a list of runs made by each user.

You can select the type of report to generate and the time period to report when you run the accounting program.

The accounting program has different reporting capabilities from the AspenTech License Manager, described in the AspenTech License Manager Installation and Reference Guide. The License Manager only records simultaneous use of Aspen Plus and layered products (that is, more than one person running Aspen Plus at the same time). The accounting program reports information about each run.

The accounting file is not generated by default under Windows. To activate the accounting file for Windows platforms, see Activating Accounting on Windows, this chapter. You must activate the accounting program before any Aspen Plus usage will be recorded.

Generating a User-Based Accounting Report This section describes how to generate user-based accounting reports. Under the terms of your software license agreement, these reports are required if you have a user-based license for Aspen Plus. To generate other account reports, see Running the Accounting Program, this chapter.

To generate a user-based accounting report:

1 Log in to an account that is set up for the Aspen Plus environment. See the Aspen Engineering Suite Installation Guide for more information.

2 From the Start menu, select Programs | AspenTech | Aspen Engineering Suite | Aspen Plus 2004.1 | Aspen Plus Simulation Engine.

Page 96: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 96

3 Start the accounting program by entering the following command:

acr

You are prompted for the name of the accounting file. The default name is given in brackets:

Enter the Aspen Plus Master Accounting Filename [C:\Progra~1\ASPENT~1\ASPENP~1.1\Engine\xeq\Aspen.msf]:

4 Press Enter to accept the default file name, or type in a name.

You are prompted for a RunID. A default name is given in brackets:

Enter the runid [ASPACT]

5 Press Enter to accept the default, or type in a name.

The following prompt appears:

DO YOU WANT A USER-BASED PRICING REPORT? (YES/NO)

6 Answer yes.

The system asks for which calendar quarter you want to generate the report:

PLEASE SELECT THE TIME PERIOD: 1 FIRST QUARTER 2 SECOND QUARTER 3 THIRD QUARTER 4 FOURTH QUARTER 5 OTHER TIME PERIOD

7 Enter the number for the appropriate quarter.

The program will generate three tables, one for each month in the quarter.

You will be asked for the last two digits of the year:

ENTER THE YEAR (YYYY):

8 Enter all four digits of the year.

You will be asked if you want the detailed report:

DO YOU WANT THE DETAILED REPORT (ONE LINE FOR EACH RUN MADE)? (YES/NO)

In most cases, the detailed report is not needed. You may want to generate the report if the number of runs reported in the standard report is questionable. Generating the detailed report will increase the time required to run the program.

9 Answer yes or no.

The accounting program will begin running. The length of the run depends on the size of the accounting file.

Page 97: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 97

The files created by the accounting program are: File Description

runid.rp1 Contains a table listing the users and the number of runs made. One table is created for each month.

runid.rp2 Contains a listing of each run made. This file is generated only if you answer yes in Step 9.

Note: If you closed an accounting file during a quarter (see Creating a New Accounting File, this chapter), you will need to run the accounting program for both the old and new accounting files to generate a complete report for the quarter. This might happen, for example, if you generally close the accounting file at the end of each quarter, but you miss the end of a quarter by a few days.

Running the Accounting Program This section describes how to generate account reports other than the user-based accounting report. To generate a user-based account report, see Generating a User-Based Accounting Report, this chapter.

To generate an accounting report:

1 Log in to an account that is set up for the Aspen Plus environment. See the Aspen Engineering Suite Installation Guide for the operating system you are using, for more information.

2 From the Start menu, select Programs | AspenTech | Aspen Engineering Suite | Aspen Plus 2004.1 | Aspen Plus Simulation Engine.

3 Start the accounting program by entering the following command:

acr

The system prompts you for the name of the accounting file. The default name is given in brackets:

Enter the Aspen Plus Master Accounting Filename [C:\Progra~1\ASPENT~1\ASPENP~1.1\Engine\xeq\Asp en.msf]:

4 Press Enter to accept the default file name, or type in a name.

The system prompts you for a RunID. A default name is given in brackets:

Enter the runid [ASPACT]

5 Press Enter to accept the default, or type in a name.

The following prompt appears:

DO YOU WANT A USER-BASED PRICING REPORT? (YES/NO)

Page 98: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 98

6 Answer no. (To generate a user-based pricing report, see Generating a User-Based Accounting Report, this chapter.)

The system asks you what basis to use for the report:

PLEASE SELECT ONE OF THE FOLLOWING NUMBERS TO REQUEST AN Aspen Plus USAGE REPORT (OR ENTER 0 TO EXIT): 1 LOGON IDS 2 ACCOUNTS 3 PROJECT-IDS 4 PROJECT-NAMES 5 USER-NAMES NOTE: THE REPORT PROVIDED TO ASPEN TECHNOLOGY FOR BILLING PURPOSES MUST BE BASED ON "USER-NAMES". OTHER REPORT TYPES ARE AVAILABLE FOR YOUR OWN USE IN ANALYZING Aspen Plus UTILIZATION.

The accounting report contains tables of usage based on your choices. The logon ID is the Windowsaccount name. The remaining four items (account number, project ID, project name, and user name) can be entered on the Setup Specifications Accounting sheet in the Aspen Plus user interface. See the Aspen Plus User Guide, Volume 1, Chapter 5.

The program asks for the beginning and ending dates for the report:

PLEASE ENTER THE DATE FOR THE START OF THE REPORTING PERIOD. (MM DD YYYY)

PLEASE ENTER THE DATE FOR THE END OF THE REPORTING PERIOD. (MM DD YYYY)

7 Enter the start and end dates. The program selects and reports on the Aspen Plus runs that occurred between the start and end dates.

You are asked if you want the detailed run statistic report and the user report:

DO YOU WANT THE RUN STATISTICS TABLES AND USER REPORTS? (YES/NO)

The user reports contain statistical information on runs made by each user. Detailed information is given on each run made by each user, including the date, time, and the input file name. In most cases, this information is not needed. If you answer yes to this question, it takes considerably longer to generate the accounting report.

8 Answer yes or no.

The accounting program begins running. The length of the run depends on the size of the accounting file.

Page 99: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 99

The accounting program creates these files:

File Description

runid.his History file. Contains information on the run, such as number of records read, run time, and options chosen.

runid.urp User report file. Contains detailed information on each ID found in the reporting period. Includes a log of every Aspen Plus run made, a run analysis summary, and a resource unit summary.�

runid.srp System report file. Contains statistics for all Aspen Plus runs made during the reporting period.�

runid.rp1 Report file. Contains short form information of Aspen Plus usage.

runid.rp2 Contains a listing of each run made when the detailed report option is specified.

� Generated for non user-based reports when Run Statistic Tables and User Report is specified.

Creating a New Accounting File If the accounting master file takes up too much disk space, you can close the current file and create a new file. Large accounting files can take longer for the simulation engine to append information to the file.

To close the current accounting file:

1 Log in to the account that owns the Aspen Plus files.

2 Set up to the Aspen Plus environment. See the Aspen Plus Installation Guide for your operating system for more information.

3 Change the current directory to the accounting directory. Use the command:

CD "C:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\XEQ"

Where C:\Program Files\AspenTech\Aspen Plus 2004.1 is the drive and directory where Aspen Plus is installed

4 Execute the accounting program. Use the command:

ACR NEWFILE

5 Save the old file for future reference.

Making Accounting Information Required For sites with a user-based license, the user name field on the Setup Specifications Accounting sheet in the user interface is required. Both the Aspen Plus user interface and simulation engine require this information.

If your site is not user-based but you want to require your users to enter the information on the Setup Specifications Accounting sheet, you can modify the Aspen Plus user interface to require this information.

From the Tools menu, select Options to go to the General sheet and check the box labeled "Accounting information required to complete input?"

Page 100: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 100

If you want to modify the Aspen Plus simulation engine to require accounting information, contact the AspenTech hotline. You need a License Key Certificate for the AspenTech License Manager.

Activating Accounting on Windows The Aspen Plus accounting file is not written to on a PC running Windows NT, Windows 2000, or Windows XP by default. To enable the accounting program to run under Windows, you must:

• Initialize the accounting file and provide all users with write access to the accounting file.

• Set the accounting environment variable on the simulation engine PC.

Initializing the Accounting File To initialize the Accounting file, you must use an account that has write access to the simulation engine directories. Follow these steps:

1 From the Aspen Plus program group, select the Aspen Plus Simulation Engine icon.

2 Change the directory to the Aspen Plus simulation engine system directory, as follows:

CD "C:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\xeq"

If you installed the simulation engine on a different drive or directory, substitute the correct location.

3 Run the accounting program to initialize the accounting file:

ACR NEWFILE

An accounting master file (ASPEN.MSF) will be generated in the current directory.

4 Set the permissions on the accounting master file so that all Aspen Plus users have write access.

If the simulation engine is on a shared file server and you do not wish to grant write access to the accounting master file in that directory, you can move the accounting master file to another directory where users have write access. If you move the accounting master file, you must change the MSF setting in the system version of the Aspen Plus Run Definition file (ASPFILES.DEF) to point to the new location of the accounting master file. See Aspen Plus Run Definition File, Chapter 2 for more details.

Page 101: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

7 Accounting Report 101

Setting the Accounting Environment Variable Each PC that executes the simulation engine must have the accounting environment variable set for Aspen Plus usage on that PC to be recorded. If the simulation engine is installed on a network file server, each client PC must define the accounting environment variable.

Windows 2000/XP 1 On the Task bar, click Start, then Settings, and Control Panel.

2 Double-click the System icon, and go to the Advanced sheet.

3 Click the Environment Variables button.

4 Click the New button under System Variables to open the New System Variable window.

5 In the Variable Name field, enter ASPACCT.

6 In the Variable Value field, enter ON.

7 Click OK to save the variable, then OK to save the settings.

Page 102: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 102

A Customizing the Aspen Plus User Interface

This appendix describes how to customize the Aspen Plus user interface and create customized Help. Topics include:

• MMTBS customization files.

• Modifying the MMTBS and Help driver files.

• Running the user interface customization system.

• Installing the new files.

The major steps for customizing the user interface are:

1 Creating the Help source files for the Windows Help system. Several template files have been provided to assist users in the creation of these source files.

2 Compiling the Help source files using the Microsoft Help Workshop utility

3 Modifying the Aspen Plus MMTBS and Help driver files

4 Installing the customization changes to the user interface

Page 103: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 103

MMTBS Customization Files Table A.1 lists the MMTBS customization files.

Table A.1 User Interface Customization Files File Name Description

recsav.apr User interface record definition file in binary format (RecDef file)

mmg.hms Help file in binary format

pp***.dat User interface input files (See Table 7.1)

lcd_cust.dat User interface property parameter customization file

mdl_cust.dat User interface property model customization file

*.hxt User interface Help and prompt files

*.srt User interface table sort files

tbcustom.dat MMTBS driver file

tbcustom.hxt HTM Help driver file

The *.dat and *.hxt files for Windows are in the following Aspen Plus user interface system directory:

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\custom

To customize the Aspen Plus user interface, follow these steps:

1 Create a directory to store the customization files you need to modify.

2 Modify the files.

3 Test your customization in the new directory.

You can use most simulation engine TBS (Table Building System) files for directly running MMTBS.

For the simulation engine, Aspen Plus stores each property method or parameter definition separately in a .sto or .lcd file. The following table describes where property methods and parameter definitions for the user interface are stored: All Are stored in

Property methods ppstoptn.dat

Parameter definitions pplcdefs.dat

For property methods, add your customized .sto file, without the TBS header and footer, to the Aspen Plus user interface file, ppstoptn.dat.

For parameter definitions, store your customized TBS pplcdef.dat files in a special user interface file, lcd_cust.dat. Do not store them with the user interface system file, pplcdefs.dat.

For property model definitions, store your customized files from the TBS ppcnvpmd.dat file in a special user interface file, mdl_cust.dat. Do not store them with the user interface system file ppcnvpmd.dat.

You can use the customized ppenmprt.dat and ppensprt.dat files directly in the user interface.

Page 104: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 104

For more information: To modify the See this topic

pp***.dat customization files listed in Table A.1

Creating In-House Physical Property Models, Routes, and Methods, Chapter 5

Databank files Adding User and In-House Databanks, Chapter 4

Creating Help Aspen Plus uses the Windows Help system to display Help. To create your own Help integrated with the Aspen Plus Help files, follow these steps:

1 Modify the existing Help source file(s) in Microsoft Word.

2 Assign map numbers to Help topics in the Help project file (.hpj).

3 Compile the Help source file(s) into a Windows Help file.

4 Modify the Aspen Plus user interface to integrate the new Help you created.

You can also build an optional table of contents file. Table A.2 lists the files you need to create your own Help:

Table A.2 Files Required to Create Help File Description Available from

custom.rtf Pre-formatted Help source file C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom

userdata.rtf Pre-formatted Help source file (databanks)

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom

custom.hpj Pre-formatted Help project file C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom

hcwsetup.exe Self-extracting executable installation file for the Microsoft Help Workshop and Help compiler

http://support.microsoft.com

You need Microsoft's Help compiler to compile the Help source files into Help. You can obtain the Help compiler and utilities from:

http://support.microsoft.com/support/kb/articles/Q170/6/89.asp

Download the HCWSETUP.EXE, a self-extracting program that installs the Help compiler and Microsoft Help Workshop components. You can also use the optional file custom.cnt, a pre-formatted help table of contents file, located in C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom.

The files listed in Table A.2 have been tested and work with Microsoft Word 7.0 and the Microsoft Help Workshop 4.03.

Page 105: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 105

Modifying the Help Source Files AspenTech provides two Help source files with the formatting needed to create your own online Help. We also provide a Microsoft Word template (AT_Help.dot) so your Help will look like an integral part of the Aspen Plus Help system. Microsoft Word File For

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom\custom.rtf

Authoring Help for property customization

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom\userdata.rtf

Authoring Help for databanks you add to Aspen Plus

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom\AT_Help.dot

Formatting the Help text

It is recommended that you use Microsoft Word Version 7.0 to edit the Help source files. You can use any word processing program that reads and writes Rich Text Format (RTF), but some of these programs may not be able to read the Word formatted template we provide.

To modify the Help source files:

1 Open custom.rtf (or userdata.rtf) using Microsoft Word.

2 In place of the Topic1 heading, type the text you want as the heading for your topic. A topic is a discrete piece of information in the Help system that is displayed in one Help window.

3 In place of the text in the first topic, type your Help text. You can insert tables, bulleted lists, and numbered lists.

It is important that you do not change the formatting, styles, or footnote information associated with this file. The Windows Help compiler relies on specific formatting information in the .rtf file when building Help. Any changes can result in compiler errors.

If a Help topic you create will be viewed in a Help popup window, follow these steps to display the entire text in the popup window:

1 In the .rtf file, select the heading text for the topic (for example, #$>Topic1).

2 From the Format menu, select Paragraph.

3 Click the Text Flow tab.

4 Uncheck the Keep with Next check box.

The Keep with Next attribute forces text associated with it into the title region (or nonscrolling region) of a Help window. A Help topic with a nonscrolling region, when appearing in a popup window, will only display the text in the nonscrolling region. You need to turn off the Keep with Next attribute so that all the topic text will be displayed in a popup window. After changing the Keep with Next attribute, you can compile your files.

Note: A Help popup window does not have scroll bars, so for help displayed in a popup window, you should limit the amount of information in a topic to a few lines.

Page 106: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 106

If you want to add more topics than the number supplied in the custom.rtf file, you may copy and paste the example topic information into a new .rtf file. You will, however, need to change the topic identifier of the new topic. In Windows Help, each Help topic is identified by a unique topic ID. To change the topic ID after copying and pasting a topic, follow these steps:

1 In the newly created file that contains the pasted example topic, from the View menu, select Footnotes. The system displays a # footnote with the text "Topic1" next to it.

2 Change the text "Topic1" to a topic ID of your choice. This ID must be unique, such as Topic4. It cannot begin or end with spaces, cannot begin with a number, and it cannot contain these symbols: # = + @ * % !

3 Next to the $ footnote sign, change the title "Topic1" to the title of your Help topic.

4 As you incrementally add Help topics in this way (one per .rtf file), ensure that you change each topic's ID to a unique identifier every time.

When saving your Help source file(s) before compiling, make sure you save them with the file extension .rtf. The Help compiler only accepts .rtf files.

Assigning Map Numbers to Help Topics To display a Help topic from Aspen Plus by pressing F1 or using other context-sensitive methods, you must indicate which Help topic you want Aspen Plus to display. When you press F1 while a field or button is active, Aspen Plus looks for the map number associated with that particular Help topic in the Help file. You must assign a unique map number to each Help topic.

These map numbers are also used by other help systems which provide links to the custom help. AspenTech programs will link to the help topic with map number 2. In the unmodified custom help file, this is the topic entitled Topic1.

Note: If you are importing customization made in previous versions into version 2004.1, do not copy your old custom.hpj file over the one supplied with Aspen Plus. Instead, use Notepad to copy the contents of the [FILES] and [MAP] sections into the new file.

Follow these steps:

1 In Aspen Plus, specify a map number and Help file name for each field or button that will have Help. See Modifying the Aspen Plus Help File, this appendix, for instructions on adding map numbers and Help file names to Aspen Plus.

2 In the Help project file (custom.hpj), assign the same map number to the Help topic you want displayed.

The map numbers for a topic in the Help project file (custom.hpj) and Aspen Plus must be the same for Aspen Plus to recognize and display the particular topic.

Page 107: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 107

To assign map numbers to topics in the .hpj file, using Microsoft Help Workshop:

1 Open the .hpj file that AspenTech provides (custom.hpj), using Microsoft Help Workshop.

2 Click the Map button on the right side of the custom.hpj window.

The Map dialog box appears.

3 Add a map number by clicking Add and entering the topic ID and map number. Edit an existing Map number by selecting the topic and clicking edit.

The topic ID you enter must be the same as the topic ID you used for the # footnote for the topic in the .rtf file. See Modifying the Help Source Files, this chapter, for more information.

If you add more topics to your Help by creating new Help source (.rtf) files, then you need to add the names of the new files to the .hpj file:

1 Open the appropriate .hpj file that AspenTech provides (custom.hpj), using Microsoft Help Workshop.

2 Click the Files button on the right side of the custom.hpj window.

The Topic Files dialog box appears.

3 Click Add to add the names of your new .rtf files.

Important Note: Do not change other sections of the .hpj file that AspenTech provides. Some changes can result in compiler errors.

Compiling the Help Source Files When your Help source files and Help project files are complete, you can compile your Help project from the Help project file using Microsoft Help Workshop. To compile your Help project:

1 Open custom.hpj with Microsoft Help Workshop.

2 Click the Save and Compile button in the lower right corner of the custom.hpj window.

The compiling process produces a Microsoft Windows Help binary file custom.hlp and a contents file custom.cnt. After you are done compiling and have fixed any compiler errors:

3 Delete any *.gid files from this directory:

C:\Program Files\AspenTech\APrSystem 2004.1\GUI\Custom

4 Update the contents file, if desired. When you double-click the custom.cnt file, it should open in Help Compiler Workshop. Use the buttons at the right to add additional topics and headings, or to rearrange them. When you add a topic, be sure to specify its topic ID (the string in its # footnote in the help source file).

5 To install and test your customized Help, you need to copy the files to the system using the custinst command (see Installing the New Files, this chapter). To just update the help files without updating other files, copy the .hlp and .cnt files to the GUI\xeq directory of programs which will use them, such as C:\Program Files\AspenTech\Aspen Plus 2004.1\GUI\xeq .

Page 108: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 108

Modifying the Aspen Plus Help File Some list boxes in Aspen Plus require that you specify the map number for the Help topic in a Help (.hxt) file that is part of MMTBS. To display context-sensitive Help (for example, property methods from a drop-down list box), you must add the following information to the ppstoptn.hxt file:

>h_replace H_PPSTOPTN_WILSON-X custom.hlp #100 >endmessage

Where:

custom.hlp = Name of the Help file

#100 = Map number for the WILSON-X, property method Help topic

It is also useful to provide prompts for your customization. Prompts are included in the Aspen Plus Help (*.hxt) file.

Prompts Format Prompts have the following format in the Help file:

>p_replace P_context_string_ID Prompt text >endmessage

Where:

>p_replace =Command that identifies the beginning of the prompt

P_context_string_ID

=Unique text string that identifies the prompt. The format is P_filename_parameter. For example, the context string ID for the parameter CPIG is P_PPLCDEFS_CPIG.

Prompt text =Text to be displayed in the prompt area

>endmessage =A signal indicating the end of the prompt text

Prompts can be up to three lines, with up to 79 characters per line and a total of up to 197 characters. Prompts for component databanks use a different format and are stored in the tbmsg.txt file. See Adding Prompts and Help for a User or In-House Databank, Chapter 6, for more information.

Page 109: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 109

Example of Prompts for a Property Model

This example shows a prompt for the Wilson activity coefficient model. The context_string_ID is the TBS file name, property name, and model name:

PPCNVPMD_GAMMA_GMWILSON

>p_replace P_PPCNVPMD_GAMMA_GMWILSON Wilson model for liquid phase activity coefficient >endmessage

You must run the command Mmcustom to incorporate your changes into the interface. See Running the User Interface Customization System, this appendix.

Building a Table of Contents File The table of contents (TOC) for a Help file is displayed in the Help Topics dialog box. You can view the Help contents for the Aspen Plus Help by selecting Contents from the Help menu. This dialog box also appears when you click the Contents button in any Aspen Plus Help window. Building a table of contents for your Help is optional. AspenTech provides a sample table of contents file (custom.cnt) with entries for topics in the custom.rtf and userdata.rtf Help source files. You can edit the .cnt file using a text editor or Microsoft Help Workshop. For more information, see Compiling the Help Source files, this appendix.

In the .cnt file, each entry represents a Help topic or a heading that organizes Help topics (represented by a book icon). To create a heading, type the appropriate heading text. For a Help topic, type the title text for the topic, as well as the topic ID. See the Microsoft Help Workshop documentation for details on building the TOC.

Modifying the MMTBS and Help Driver Files The Help driver files are: Use this file To run To update

tbcustom.dat MMTBS The record definition file

tbcustom.hxt HTM The Help file (mmg.hms)

If you add property parameters, models, routes, and methods to the existing MMTBS files, you do not need to change the MMTBS driver file. If you save your changes in new files, modify the MMTBS driver file to include the names of the new files.

If you add Help and prompts to existing Help files (*.hxt), list the names of the modified Help files in tbcustom.hxt before running the HTM program. If you save your Help and prompts in new files, list the new file names in the tbcustom.hxt file.

Page 110: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

A Customizing the Aspen Plus User Interface 110

Running the User Interface Customization System You need to run the Mmcustom to install your customization changes in the user interface. Perform these steps:

1 Enter the following command to update the user interface Record Definition (RecDef) files with your changes:

mmcustom mmtbs

2 Update the HTM driver file (tbcustom.hxt) to list the .hxt files that have been added or modified.

3 Enter the following command to update the user interface Help file with your Help and prompts:

mmcustom htm

If you encounter problems while running Mmcustom, make sure the mmcustom input files do not contain any typing errors or file format errors.

4 Use Microsoft Help Workshop to create the Windows .hxt files.

5 Test your changes in the user interface.

Installing the New Files To install the new RecDef and Help files:

1 Make sure you are in the directory that contains the customized RecDef and Help files.

2 To copy the modified files into the user interface system directory, enter the command:

custinst

When the user interface customization is complete, you may erase the RecDef and .hlp files in the customization directory. Save the TBS input, .hxt, .rtf, .cnt, and .hpj files for customizing future releases of the user interface.

Page 111: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 111

B TBS File Descriptions

This appendix describes the TBS files required to create in-house physical property models, routes, and methods (mentioned in Table B.1), including:

• Conventional Property Model Definition Table (ppcnvpmd.dat).

• Property Parameter Definition Table (*.lcd).

• Physical Property Subroutine List Table (ppsublst.dat).

• Major and Subordinate Property Routes Table (ppenmprt.dat and ppensprt.dat).

• Physical Property Method Table (ppstoptn.dat).

Each file contains many tables. Each table describes a unique model, route, or method. TBS files have a fixed format. Each entry must be in its appropriate column.

To create TBS files in house, follow these steps:

1 Copy similar tables from the system TBS files.

2 Use the table as a template for adding your changes.

Page 112: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 112

Conventional Property Model Definition Table The conventional property model definition table, located in the ppcnvpmd.dat file, defines every conventional property model in Aspen Plus. Each property model definition contains:

• Property and model name.

• Model option code default values.

• Initialization and mainline subroutine names. Define these subroutines in the Physical Property Subroutine List Table (ppsublst.dat).

• Property parameter names. Describe these parameters in the Property Parameter Definition Table (pplcdefs.dat).

• Property monitor computed-go-to index (IDXCGT).

• Integer and real work area requirements.

Page 113: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 113

Figure B.1 shows the layout for the Conventional Property Model Definition

Table:Figure B.1 File Layout for the Conventional Property Model Definition Table

12345 1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPCNV PMD R EPLAC E modelnam

2 p ropna me idxcgt mid1 mid2 mid3

3 i waq iwa l iwac rwaq rwal rwac

4 n 1

5 o pcode o pcode opcode opcode

6 n 2

7 i ntsub i ntsub intsub intsub

8 n 3

9 m nsub m nsub mnsub mnsub

10 n 4

11 p pname p pname ppname ppname

Page 114: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 114

Table B.1 describes parameters for this table:

Table B.1 Parameters for the Conventional Property Model Definition Table Parameter Description

modelnam Model name

propname Property name�

idxcgt Property monitor computed-go-to index��

mid1 mid2 mid3

Model implemented derivative codes 1 entered as 4-digit integer values��� Model implemented derivative codes 2 entered as 5-digit integer values��� Model implemented derivative codes 3 entered as 5-digit integer values���

iwaq iwal iwac

Integer work area quadratic♦ Integer work area linear♦ Integer work area constant♦

rwaq rwal rwac

Real work area quadratic♦♦ Real work area linear♦♦ Real work area constant♦♦

n1 opcode

Number of model option codes. Maximum = 10 Model option codes entered as integer values♦♦♦

n2 intsub

Number of initialization subroutines Initialization subroutine name♦♦♦

n3 mnsub

Number of mainline subroutines Mainline subroutine name♦♦♦

n4 ppname

Number of property parameters Property parameter name♦♦♦

� The parameter propname = EOS for mixture equation of state model The parameter propname = EOS0 for pure-component equation of state model See Aspen Plus Physical Property Methods and Models, Tables 4.1-4.3, for a list of all other property names.

�� For in-house equation-of-state models, use values between 51-75. For all other in-house models, use values between 900-999.

��� The mid1 codes are used to provide information regarding implemented pressure and temperature derivatives. The mid2 codes are used to provide information regarding the mole number composition implemented derivatives. The mid3 codes are used to provide information regarding the mole fraction composition implemented derivatives.

♦ Integer work area = iwaq * NCC2 + iwal *NCC + iwac, where NCC is the total number of conventional components in the simulation. The integer work area required is determined by the size of any temporary integer storage area required in the mainline subroutines.

♦♦ Real work area = rwaq * NCC2 + rwal*NCC + rwac, where NCC is the total number of conventional components in the simulation. The real work area required is determined by the size of any temporary real storage area required in the mainline subroutines.

♦♦♦ Enter four values or names on each line. Use as many lines as necessary.

Table B.2 describes the layout of the mid1, mid2, and mid3 Model Implemented Derivative Codes for the Conventional Property Model Definition Table.

Page 115: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 115

Table B.2 Layout and Description of Model Implemented Derivative Codes MID Layout Description

mid1 dcba a = implementation of property. Options: 0 = not implemented; 1 = implemented

b = implementation of temperature derivatives (dn/dTn). Options: 0 = not implemented; 1 = d/dT; 2 = d/dT, and d2/dT2; 3 = d/dT, d2/dT2, and d3/dT3

c = implementation of first order pressure derivative (d/dP). Options: 0 = not implemented; 1 = implemented

d = implementation of composite temperature and pressure derivatives(d[n+1]/dPdTn). Options: 0 = not implemented; 1 = d2/dPdT; 2 = d2/dPdT, and d3/dPdT2

mid2 kjihg g = implementation of mole number composition derivative. Options: 0 = not implemented; 1 = d/dn implemented

h = implementation of mole number composition and first order temperature derivative. Options: 0 = not implemented; 1 = d2/dndT implemented

i = implementation of mole number composition and first order pressure derivative. Options: 0 = not implemented; 1 = d2/dndP implemented

j = implementation of mole number composition and second order temperature derivative. Options: 0 = not implemented; 1 = d3/dndT2 implemented

k = implementation of mole number composition and first order temperature and pressure derivatives. Options: 0 = not implemented; 1 = d3/dndTdP implemented

mid3 ponml l = implementation of mole fraction composition derivative. Options: 0 = not implemented; 1 = d/dx implemented

m = implementation of mole fraction composition and first order temperature derivative. Options: 0 = not implemented; 1 = d2/dxdT implemented

n = implementation of mole fraction composition and first order pressure derivative. Options: 0 = not implemented; 1 = d2/dxdP implemented

o = implementation of mole fraction composition and second order temperature derivative. Options: 0 = not implemented; 1 = d3/dxdT2 implemented

p = implementation of mole fraction composition and first order temperature and pressure derivatives. Options: 0 = not implemented; 1 = d3/dxdTdP implemented

Example of a Conventional Property Model Definition Table in the ppcnvpmd.dat File

The model name for the UNIQUAC activity coefficient model is GMUQUAC. This model calculates activity coefficients (propname = GAMMA). The subroutine returns analytical estimates of:

• The property [GAMMA(i)].

• Its first and second order temperature derivatives [d(GAMMA(i))/dT, d2(GAMMA(i))/dT2].

• The property first order mole number composition derivative, and its first order temperature derivative [d(GAMMA(i))/dn(j), d2(GAMMA(i))/dTdn(j)].

Page 116: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 116

• The property first order mole fraction composition derivative, and its first order temperature derivative [d(GAMMA(i))/dx(j), d2(GAMMA(i))/dTdx(j)].

It does not require any integer work area, but it requires real work area with size = 2 * NCC2 + 6 * NCC. NCC is the total number of conventional components in the simulation. This model does not have a model option code. It requires:

• One initialization subroutine (GM07).

• One mainline subroutine (GM06).

• Six property parameters (GMUQR, GMUQQ, GMUQL, GMUQAA, GMUQQ1, and UNIQ).

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPCNV PMD R EPLAC E GMUQUAC

2 G AMMA 108 0021 00011 00011

3 0 0 0 2 6 0

4 0

5 1

6 G M07

7 1

8 G M06

9 6

10 G MUQR G MUQQ GMUQL GMUQAA

11 G MUQQ1 U NIQ

When the number of option codes is zero (n1 = 0), you do not need to supply the option code values. The line for entering opcode is skipped.

Page 117: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 117

Property Parameter Definition Table Most property models require model-specific parameters. Aspen Plus stores all property parameters in property parameter definition files, with the .lcd extension. For example, the definition for the critical temperature, TC, is stored in the tc.lcd file.

This section:

• Describes the file layout for the Property Parameter Definition Table.

• Provides examples of property parameter definitions for critical temperature (TC), the extended Antoine vapor pressure parameter (PLXANT), and the Wilson binary parameter (WILSON).

• Discusses the units conversion formula.

Page 118: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 118

Figure B.2 shows the layout for the Property Parameter Definition Table:

Figure B.2 File Layout for the Property Parameter Definition Table

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPLCD EFS R EPLAC E ppnam e

2 P arame ter d escription

3 p ptype ppinput da taset n0 kio n

4 i j k ppno l m

5 d efaul t val ue de fault value default value default v alue

6 l ower bound lo wer b ound low er bound lower bou nd

7 u pper bound up per b ound upp er bound upper bou nd

8 n omina l val ue no minal value nominal value nominal v alue

9 r egres sion code re gress ion code regression co de regressio n cod e

10 s ymmet ric c ode sy mmetric code sym metric cod e symmetric code

11 b inlab el bi nlabe l bin label binlabel

12 u nits conv code un its conv code uni ts conv co de units con v cod e

13 n o uni ts ro w

14 u r u r u r ur

15 e ncode d rev erse polis h uni ts convers ion formula

Page 119: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 119

Table B.3 describes the parameters for the Property Parameter Definition Table:

Table B.3 Parameters for the Property Parameter Definition Table Parameter Description

ppname Property parameter name (limited to six characters)

Parameter description

Short description of parameter (limited to 64 characters)

pptype Property parameter type: 1 = Unary parameter for conventional components 2 = Binary parameter for conventional components 3 = Unary parameter for nonconventional components 4 = Binary parameters for nonconventional components 5 = Unary parameters for UNIFAC groups 6 = Binary parameters for UNIFAC groups 8 = Pair parameters for electrolyte NRTL model

ppinput Property parameter input code:� 0 = Do not allow user input. Parameter is used only for internal calculations. 1 = Allow input 2 = Allow input. Parameter also available in the user interface binary databank. 3 = Allow input. Parameter available in the user interface binary databank. Can be estimated by PCES.

binlabel Binary parameter label displayed on the Properties Parameters forms.

dataset Data set code:� 0 = Allow only one data set (one set of values per parameter) 1 = Allow more than one data set

n0 Units conversion subroutine index. No longer used.

kion Ionic species code:� 0 = Ion is allowed 1 = Only ionic species allowed 2 = Ion is not allowed

i Number of elements for parameter. For example, PLXANT has nine elements.

j Lower and upper bounds code:� 0 = Do not supply lower and upper bounds for parameter 1 = Supply lower and upper bounds for parameter

k Nominal value code:� 0 = Do not supply nominal value for parameter. 1 = Supply nominal value for parameter.

ppno Property parameter index number: 1-899 Reserved for Aspen Plus built-in parameters 900-1199 Available for user in-house model parameters 1200-1299 Reserved for USER-PROPS parameters 1300- Reserved for Aspen Plus built-in parameters

l Regression code:� 0 = No regression code. Parameter cannot be regressed. 1 = Supply regression code

m Symmetry code for binary parameters:� 0 = No symmetry code 1 = Supply symmetry code

default value Parameter default value (in SI units, one value per element). Required.

� Defaults to zero.

�� Units rows for all units in Aspen Plus are summarized in Table B.4. In parameters with more than one element, the order of unit row integers in parameter ur has no effect on simulation engine calculations. The order can affect the user interface, however, if you add this parameter to the user interface via the file lcd_cust.dat. (For details, refer to MMTBS Customization Files in Appendix A.) The last unit code specified which is not 22 (Temperature) or 44 (dimensionless) will be displayed on the input form for this parameter.

continued

Page 120: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 120

Parameter Description

lower bound Parameter lower bound (in SI units, one value per element)

upper bound Parameter upper bound (in SI units, one value per element)

nominal value Parameter nominal value (in SI units, one value per element)

regression code 0 = Cannot be regressed� 1 = Can be regressed 2 = Unconditionally used in regression. Defaulted on the Properties Regression form. > 5 = Delta T. If delta T of data is greater than the code value, the parameter can be regressed. < 0 = Number of data points. If number of data points is greater than the absolute value of the code, the parameter can be regressed.

symmetric code Symmetric code for binary parameters:� 0 = Totally asymmetric (aij ≠ aji). Requires two labels. 1 = Used for HENRY, VLCLK (restricted to aij; aji has no meaning). Requires one label. 2 = Symmetric (aij = aji). Requires one label. 3 = Anti-symmetric (aij = -aji). Requires two labels.

units conv code Encoded units conversion flag (see Units Conversion Flag, this chapter).

no units row Number of unique units row referenced in units conv code��

ur List of unique units row referenced in units conv code��

units conversion formula

See Units Conversion Formula, this chapter.

� Defaults to zero.

�� Units rows for all units in Aspen Plus are summarized in Table B.4. In parameters with more than one element, the order of unit row integers in parameter ur has no effect on simulation engine calculations. The order can affect the user interface, however, if you add this parameter to the user interface via the file lcd_cust.dat. (For details, refer to MMTBS Customization Files in Appendix A.) The last unit code specified which is not 22 (Temperature) or 44 (dimensionless) will be displayed on the input form for this parameter.

Page 121: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 121

Table B.4 describes the units rows for all units in Aspen Plus.

Table B.4 Units Available in Aspen Plus Units Row Description Units Row Description

1 Area 43 Mole volume

2 Composition 44 Dimensionless

3 Density 45 Dipole moment

4 Diffusivity 46 Solubility parameter

5 Energy 47 Electrical power

6 Enthalpy 48 Electric price

7 Entropy 49 Mass heat capacity

8 Fiscal 50 UA

9 Flow 51 Moles

10 Mass flow 52 Work

11 Mole flow 53 Heat

12 Volume flow 54 Area-price

13 Enthalpy flow 55 Volume-price

14 Force 56 Item-price

15 Mole heat capacity 57 Number concentration

16 Heat transfer coefficients 58 Mass concentration

17 Length 59 Inverse time

18 Mass 60 Natural log of inverse time

19 Power 61 Flux

20 Pressure 62 Area usage

21 Surface tension 63 Volume usage

22 Temperature 64 Mole concentration

23 Thermal conductivity 65 Power-volume

24 Time 66 Mass transfer coefficients

25 Velocity 67 Specific area

26 Viscosity 68 Inverse length

27 Volume 69 Chrom velocity

28 Frequency 70 Mass flux

29 Unit-price 71 Solvent permeability

30 Energy-price 72 Solute permeability

31 Delta-T 73 Water rate

32 Angle 74 Pressure drop per height

33 Head 75 Pressure drop

34 Bond work index 76 Packing factor

35 Filter resistance 77 Number concentration rate

36 Specific filter resistance 78 Inverse area

37 Mole density 79 Volume heat capacity

38 Mass density 80 Heat flux

39 Mole enthalpy 81 Inverse temperature

40 Mass enthalpy 82 Inverse pressure

41 Mole entropy 83 Temperature-volume

42 Mass entropy 84 Vflow-length

continued

Page 122: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 122

Units Row Description Units Row Description

85 Contents 106 Mass per operation

86 Population density 107 Moles per operation

87 Inverse heat transfer coefficient

108 Volume per operation

88 Volume enthalpy 109 Enthalpy per operation

89 - 99 Reserved for in-house customization

110 Density times velocity squared

100 Volume flow / RPM 111 Sound level

101 Friction factor 112 Moment of inertia

102 Mass per cycle 113 Voltage

103 Moles per cycle 114 Current

104 Volume per cycle 115 Mass per volume

105 Enthalpy per cycle 116 Mass per length

Units Conversion Flag

The number of unit conversion flags equals the number of elements: Flag Meaning

Units conversion code� Units row from Table B.4

-n Row number in the Units Conversion Formula section��

� Used for simple conversions that do not depend on any other element.

�� For example, -1 means the units conversion formula for this element begins on the first line of the Units Conversion Formula section, and -5 means the formula begins on the fifth line.

Units Conversion Formula

The following rules apply to the units conversion formula:

• Notation is reverse polish (as in Hewlett Packard hand-held calculators). For example, A*B is represented as A B *. The results of the formula equal the new value for the element.

• You can use more than one line of formula for each element.

• Each line is limited to 72 columns.

• Blanks separate each operand and variable.

Aspen Plus allows the following operands and variables in the units conversion formula: Operand Description Example

A...Z Parameter element identifier in the units conversion formula

A = 1st element, Z = 26th element, AA = 27th element

[i] Units conversion multiplication factor of the ith units row (see Table B.4.)

[20] = pressure

Special Case [22B]

Addition conversion factor of temperature

273.15 for converting ºC to K

Page 123: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 123

Aspen Plus allows the following functions in the units conversion formula: Function Description Example

* Multiply x y * = x*y

/ Divide x y / = x/y

+ Add x y + = x+y

� Subtract x y � = x�y

^ Exponentiation x y ^ = xy

? Conditional x ? = x ?1:0; if x exists returns 1, if not returns 0

log Natural log x log = log(x)

; End of formula �

Use the conditional ("function?") to ask if a parameter exists (see the following example). The conditional is often used for absolute temperature requirements. An example is the extended Antoine equation. When the ln(T) term is non-zero, you must use the absolute temperature units. The additive portion of the temperature conversion factor, [22B], is ignored. See the following example for more details.

Example for Units Conversion Formula

The following equation calculates liquid vapor pressure (PL) as a function of temperature. The equation has six parameters (A, B, C, ..., F):

ln(PL) = A + B/T + C*ln(T) + D*T for E < T < F

The first four parameters are the correlation coefficients. The last two parameters are temperature limits of the correlation.

The six parameters (A...F) are represented by a vector of six elements. A is the first element, B the second, up to F, the sixth element. If the parameter contains additional elements, you can use G for the seventh element, and so on. Once you exhaust A to Z, you can use AA, AB,...AZ, then BA, BB, and so on.

You can derive the following elements in the new units:

(new A) = A + ln[20] � (C*ln[22])�(D*[22B]/[22]) (new B) = B*[22] (new C) = C (new D) = D/[22] (new E) = E*[22] + [22B] (new F) = F*[22] + [22B]

Where:

[20] = Multiplicative conversion factor for pressure [22] = Multiplicative conversion factor for temperature [22B] = Additive conversion factor for temperature

If elements B and C are not zero, Aspen Plus can convert the formula only if it assumes absolute temperature units (ºR or ºK). The conversion formula and conditional function (?) addresses this situation.

Page 124: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 124

The units conversion codes, and units conversion formulas for the property parameters definition file of this parameter are listed in the following table:

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1

2 - 1 -2 44 -3

3 2 2 22

4 3

5 2 0 2 2 4 4

6 A [20 ] LOG + C [22] LOG * - D [22B] [22] / * 1 B ? - 1 C ? - * * - ;

7 B [22 ] * ;

8 D [22 ] / ;

Lines 2 and 3, above, list the units conversion codes.

The first units conversion code (�1) indicates that the conversion formula for the first element (A) is on the first line of the units conversion formula section (line 6, above).

The second conversion code (�2) indicates that the conversion formula for the second element (B) is on the second line of the units conversion formula section (line 7, above). This conversion would have been �3, had the first formula wrapped to the second line. You can use up to 72 columns on one line to specify the formula.

The 44 indicates this is a simple conversion. It uses units row 44, dimensionless, from Table B.4. Therefore, the third element (C) is not converted.

The 4th conversion code (�3) points to the third formula line (line 8, above) for conversion of element four (D).

On the second line of the units conversion codes, (line 3, above) the two 22s indicate simple temperature conversion for the lower and upper temperature limits.

Units conversion formulas are used for the second (B) and fourth (D) elements, although their conversions do not involve other elements. Absolute temperature units must be used when these elements are non-zero. Only the multiplicative conversion factor [22] should be used. If you use the simple conversion code of 22, the parameters will be converted incorrectly:

(new value) = (old value) * [multiplicative factor] + [additive factor]

Page 125: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 125

To show the sequence of operation, parentheses are added to the conversion formula of element 1:

(((A ([20] LOG +) (C ([22] LOG *) �) ((D ([22B] [22] /) *) ((1 (B ?) �) (1 (C ?) �) *) *) �)

The term containing [22B] contains the additive factor for temperature. You cannot use this factor if B or C is non-zero. If B exists:

• The (B ?) returns a value of 1.

• The expression (1(B ?)�) becomes zero. Similarly, if C exists, (1(C?)�1) also becomes zero.

The expression ((1(B?)�)(1(C?)�)*) is multiplied to the additive temperature factor, resulting in a value of zero. Consequently, [22B] is not used in the conversion. If B were 0, then (1 (B ?) �) would be 1.

Aspen Plus displays a warning when absolute temperature units are assumed because B or C is non-zero.

The following lines taken from lines 4 and 5 in the table above indicate that the units conversions use three unique units rows. The units rows are 20, 22, and 44 (obtained from Table B.6):

3 20 22 44

Page 126: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 126

Example of Property Parameter Definition for Critical Temperature, TC

TC is a unary parameter (pptype = 1). Only one data set is allowed (dataset = 0). TC has a lower bound of 5 ºK, upper bound of 5000 ºK, and a nominal value of 507.4 ºK. TC cannot be regressed in the user interface. (1 is not specified in column 30 of line 4. 1 defaults to zero.) TC has units of temperature (units row = 22).

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPLCD EFS R EPLAC E TC

2 C ritic al te mperature

3 1 1 0 1

4 1 1 1 416

5 1 D35

6 5 .

7 5 000.

8 0 .5074 D3

9 2 2

10 1

11 2 2

Example of Property Parameter Definition for the Extended Antoine Vapor Pressure Parameter, PLXANT

PLXANT is a unary parameter (pptype = 1) with a vector of length 9 (i = 9). It can have more than one data set (dataset = 1). The first element of this parameter defaults to missing (�1D35). The second to seventh elements default to zero. The lower temperature limit (element 8) defaults to 0 ºK. The upper temperature limit (element 9) defaults to 1000 ºK. The lower bound and upper bound for the parameter values are not provided (j = 0), but the nominal values are given (k = 1). The first seven elements can be regressed. The first four elements can be defaulted automatically in DRS (regression code = 2). The fifth element defaults if the experimental vapor pressure data cover a temperature range of 100 ºC or more. The last two elements cannot be regressed because they are the temperature limits of the correlation. The parameter elements 1, 2,

Page 127: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 127

3, 4, and 6 require a complex units conversion formula. Elements 5, 7, 8, and 9 can be units converted using a simple units conversion formula. Three unique units rows are used (no units row = 3, ur = 20 for pressure, 22 for temperature, and 44 for dimensionless).

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPLCD EFS R EPLAC E PLXAN T

2 E xtend ed An toine param eters

3 1 1 1 10

4 9 1 3 56 1

5 - 1D35 0 0 0

6 0 0 0 0

7 1 D3

8 . 89360 9D2 0 0 0

9 0 0 0 0

10 1 D3

11 2 2 2 2

12 1 00 1 1 0

13 0

14 - 1 -3 -4 -5

15 4 4 -6 44 22

16 2 2

17 3

18 2 0 2 2 4 4

19 A [20 ] LOG + E [22] LOG * - D [22B] [22] / * 1 E ? - 1 F ? - 1 G ? - * * * - ;

20 B [22 ] * ;

21 C [22 ] * [ 22B] 1 E ? - 1 F ? - 1 G ? - * * * - ;

22 D [22 ] / ;

23 F [22 ] G ^ / ;

Page 128: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 128

Example of Property Parameter Definition for the Wilson Binary Parameter, WILSON

WILSON is a binary parameter (pptype = 2) with six elements (i = 6). It can have more than one data set (dataset = 1). Ion is not allowed (kion = 2). The first four elements:

• Default to zero.

• Can be regressed (regression code > 0).

• Are asymmetric (symmetric code = 0).

The last two elements are temperature limits which default to zero and 1000 ºK. The temperature limits cannot be regressed (regression code = 0) and are symmetric (symmetric code = 2). The parameter labels appear on Properties Parameters Binary forms.

Elements 1, 2, and 4 require complex units conversion formulas which begin on lines 1, 2, and 3, respectively, of the Units Conversion Formula section. Element 3 is dimensionless (units flag = 44). The last two elements have temperature units (units flag = 22).

Page 129: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 129

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPLCD EFS R EPLAC E WILSON 2 W ilson bina ry parameters 3 2 3 1 1 2 4 6 0 480 1 1 5 0 D0 0D0 0D0 0D0

6 0 D0 1D3 7 6 0 2 100 1

8 0 0 9 0 0 0 0

10 2 2 11 a ij aji bij bji

12 c ij cji dij dji

13 T lower Tupper 14 - 1 -2 44 -3

15 2 2 22 16 2 17 4 4 2 2 18 A C [ 22] L OG * - D [22B] [22] / * 1 B ? - 1 C ? - * * - ; 19 B [22 ] * ; 20 D [22 ] / ;

Page 130: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 130

Physical Property Subroutine List Table Figure B.3 shows the layout for the Physical Property Subroutine List table contained in the ppsublst.dat file. This table lists the mainline and initialization subroutines for every property model defined in the conventional property model definition table (ppcnvpmd.dat). See Conventional Property Model Definition Table, this chapter. Each subroutine listing contains the subroutine name.

Figure B.3 File Layout for the Physical Property Subroutine List Table

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPSUB LST R EPLAC E subrname 2 3

In Figure B.3, subrname is the subroutine name.

Modifying Aspen Plus System Routines When you add new models to the conventional property model definition table, you must modify one or more Aspen Plus system Fortran routines. Routine Requires modification for calling Filename

ppuser_phcciu Model initialization routines phcciu.f

ppuser_mdmon9 Non equation-of-state model mainline subroutines mdmon9.f

ppuser_esmnu Mixture equation-of-state model mainline subroutines esmnu.f

ppuser_esmnu0 Pure component equation-of-state model mainline subroutines esmnu0.f

Copies of these files are in the user subroutine template directory:

C:\Program Files\AspenTech\Aspen Plus 2004.1\Engine\USER

Note: If you install Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location. The routines are extracted by issuing the user command at the command line prompt of the Aspen Plus Simulation Engine window.

After modifying any of these routines, you must rebuild the ppuser shared library. See Chapter 3.

Page 131: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 131

For initialization routines, you must modify the phcciu.f file, as follows: 1 Define NSUB in the PARAMETER statement to be the actual number of

initialization routines. For example, if you have two initialization routines, the PARAMETER statement should read:

PARAMETER (NSUB=2)

2 Specify the initialization routine names in the DATA statement for variable ISUB. For example, suppose the two initialization routines are USRIN1 and USRIN2. The DATA statement should read:

DATA ISUB/4HUSRI, 4HN1 ,4HUSRI,4HN2 /

3 Modify the computed GO TO statement to add a unique label for each initialization routine. The existing GO TO statement is:

GO TO (10), IGOTO

For example, with two initialization routines, the GO TO statement should read:

GO TO (10, 20), IGOTO

4 For each label defined in step 3, call the initialization routine with the routine name defined in step 2. For example:

10 CALL USRIN1 (MNDS) GO TO 10000 20 CALL USRIN2 (MNDS) GO TO 10000

Where MNDS is the maximum number of data sets defined for this model and is in the argument list of phcciu.f. Do not define MNDS. Instead, pass MNDS as an input variable to the initialization routine.

For mainline subroutines (except for equation-of-state routines), you must modify the system routine ppuser_mdmon9 (file mdmon9.f), as follows: 1 Modify the computed GO TO statement to define a unique label for each main

line routine.

GO TO (10, 20, 30), IGOTO

Use label 10 to call the mainline subroutine defined for a property model that has a computed GO TO index of 900 (parameter idxcgt=900 in Figure B.1). Use label 20 to call a subroutine corresponding to idxcgt=901, and so on.

Page 132: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 132

2 For each label defined in step 1, call the mainline subroutine. The following input variables are available:

Variable Type Dimension Description

T REAL*8 � Temperature (K)

PSYS REAL*8 � System pressure (N/m2)

B(P(1)) REAL*8 N System or vapor pressure (N/m2). Used for pure component property.

N INTEGER � Number of component present

IDX INTEGER N Component index vector

X REAL*8 N Mole fraction vector (liquid or vapor)

KDIAG INTEGER � Property diagnostic level code

NDS INTEGER � Data set number

KCMOD INTEGER � Property calculation code 0 = Do not calculate 1 = Calculate property only 2 = Calculate property derivative only 3 = Calculate both

IB(LBB+9) INTEGER 10 Model option code

IRW5 INTEGER � Offset for real work array

IIW INTEGER � Offset for integer work array

The subroutine should return the results, as follows:

Variable Type Dimension Description

Q REAL*8 � Mixture property (SI units)

Q REAL*8 N Pure component or partial property (SI units)

Q(ID11) REAL*8 � Temperature derivative of mixture property (SI units)

Q(ID11) REAL*8 N Temperature derivative of pure component or partial property (SI units)

Equation-of-state subroutines for mixtures are used to calculate both pure and mixture properties when invoked from an equation-of-state-based property method (for example, PENG-ROB). These user models are invoked from the system routine ppuser_esmnu (file esmnu.f). The pure component version of the models is necessary only if the user wants the equation of state to also calculate pure component reference states for activity coefficient based methods. In this case, the user routines are invoked from the system routine ppuser_esmnu0 (file esmnu0.f).

For equation-of-state subroutines (mainline subroutines for property=EOS and EOS0), you must modify the system routines ppuser_esmnu and ppuser_esmnu0, as follows:

1 Modify the computed GO TO statement to define a unique label for each mainline equation state routine.

GO TO (1010), IDXCGT

Label 1010 is used to call the first in-house equation-of-state model that has a computed GO TO index of 51 (parameter idxcgt = 51 in Figure B.1 for propname = EOS or parameter idxcgt = �51 for EOS0). Use label 1020 to call the EOS subroutine corresponding to idxcgt = 52 (or �52 for EOS0). This section handles both property calculations and property temperature derivative calculations.

Page 133: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 133

2 For each label defined in steps 1 and 2, call the mainline equation-of-state routine. The following input variables are available:

Variable Type Dimension Description

T REAL*8 � Temperature (K)

P REAL*8 � System pressure (N/m2)

X REAL*8 N Mole fraction vector (liquid or vapor)

N INTEGER � Number of component present

IDX INTEGER N Component index vector

IRW1 INTEGER � Offset for real work array

IIW INTEGER � Offset for integer work array

KVL INTEGER � Phase code to calculate properties: 1 = Vapor phase properties 2 = Liquid phase properties

NDS INTEGER � Data set number for parameters of the model

KDIAG INTEGER � Property diagnostic level code

IB(LBB+9) INTEGER 10 Model option code

KCALC (1) INTEGER � Calculation code for fugacity coefficients: 1 = Calculate property only 2 = Calculate temperature derivative of property only 3 = Calculate both

KCALC (2) INTEGER � Calculation code for the enthalpy departure of a mixture

KCALC (3) INTEGER � Calculation code for the entropy departure of a mixture

KCALC (4) INTEGER � Calculation code for the Gibbs energy departure of a mixture

KCALC (5) INTEGER � Calculation code for the molar volume of a mixture

Results should be returned for the specified phase KVL, as follows:

Variable Type Dimension Description

PHIMX REAL*8 N Vector of logarithms of fugacity coefficients of components in a mixture

PHIMX (NP1�)

REAL*8 N Vector of temperature derivative of PHIMX

DHMX(1) REAL*8 � Enthalpy departure of a mixture (J/kgmole)

DHMX (2) REAL*8 � Temperature derivative of DHMX(J/kgmole-K)

DSMX (1) REAL*8 � Entropy departure of a mixture (J/kgmole-K)

DSMX (2) REAL*8 � Temperature derivative of DSMX(J/kgmole-K2)

DGMX (1) REAL*8 � Gibbs energy departure of a mixture (J/kgmole)

DGMX (2) REAL*8 � Temperature derivative of DGMX (J/kgmole)

VMX (1) REAL*8 � Molar volume of a mixture (m3/kgmole)

VMX (2) REAL*8 � Temperature derivative of VMX(m3/kgmole-K)

ZMX(1) REAL*8 � Compressibility factor

ZMX(2) REAL*8 � Temperature derivative of ZMX

CVMX(1) REAL*8 � Constant volume heat capacity (J/kgmole-K)

CVMX(2) REAL*8 � Temperature derivative of CVMX (J/kgmole-K2)

� NP1 is available from the argument list of the esmnu and esmnu0 routines.

All of your new routines and the system routines ppuser_phccin, ppuser_mdmon9, ppuser_esmnu, and ppuser_esmnu0 must be compiled. Leave the object files in the customization directory. See Chapter 2 for information on compiling Fortran subroutines and rebuilding system shared libraries.

Page 134: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 134

Major and Subordinate Property Route Tables The major property route table is ppenmprt.dat. The subordinate property route table is ppensprt.dat. These tables list every major and subordinate property route in Aspen Plus. Each major or subordinate property route listing contains:

• Route ID, property keyword, and calculation method code.

• Number of models used for the route.

• Model description.

• Number of major and subordinate property routes used for this route.

• Description of each referenced route.

• Calculation option codes for this route.

Figure B.4 shows the layout for the Major Property Route table. See Aspen Plus Physical Property Methods and Models, Chapter 4, for more information about property routes and calculation methods.

Page 135: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 135

Figure B.4 File Layout for Major Property Route Table

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPENM PRT R EPLAC E routeid

2 p ropna me method

3 n 1

4 m dlpro p model setno monitor

5 n 2

6 m -opco de m-opcode m-opcode m-opcode m-o pcode m -opcode

7 n 3

8 m ajpro p majprop majprop majprop maj prop m ajprop

9 n 4

10 s ubpro p subprop subprop subprop sub prop s ubprop

11 n 5

12 r -opco de r-opcode r-opcode r-opcode r-o pcode r -opcode

Page 136: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 136

Table B.5 describes parameters for Figure B.4:

Table B.5 Parameters for the Major Property Route Table Parameter Description

routeid Property route ID

propname Property name for this route�

method Property method code�

n1 Number of property models required for this route

mdlprop Property calculated by the model��

model Model name

setno Data set number

monitor Model monitor computed-go-to index���

n2 Number of option codes for the model

m-opcode Model option code value

n3 Number of major properties required for this route

majprop Major property name

majroute Major property route ID

n4 Number of subordinate properties required for this route

subprop Subordinate property name

subroute Subordinate property route ID

n5 Number of route option codes for this route

r-opcode Route option code value

� See Aspen Plus Physical Property Methods and Models, Chapter 4.

�� Where: propname = EOS for mixture equation of state model propname = EOS0 for pure-component equation of state model See Aspen Plus Physical Property Methods and Models, Tables 4.1-4.3, for a list of all other property names.

��� Obtained from property model definition. See Table B.1.

Page 137: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 137

Figure B.5 shows the layout for the Subordinate Property Route table:

Figure B.5 File Layout for Subordinate Property Route Table

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPENS PRT R EPLAC E routeid

2 p ropna me method

3 n 1

4 m dlpro p model setno monitor

5 n 2

6 m -opco de m-opcode m-opcode m-opcode m-o pcode m-opcode

7 n 3

8 m ajpro p majprop majprop majprop maj prop majprop

9 n 4

10 s ubpro p subprop subprop subprop sub prop subprop

11 n 5

12 r -opco de r-opcode r-opcode r-opcode r-o pcode r-opcode

Page 138: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 138

Table B.6 describes parameters for this table:

Table B.6 Parameters for the Subordinate Property Route Table Parameter Description

routeid Property route ID

propname Property name for this route�

method Property method code�

n1 Number of property models required for this route

mdlprop Property calculated by the model��

model Model name

setno Data set number

monitor Model monitor computed-go-to index���

n2 Number of option codes for the model

m-opcode Model option code value

n3 Number of major properties required for this route

majprop Major property name

majroute Major property route ID

n4 Number of subordinate properties required for this route

subprop Subordinate property name

subroute Subordinate property route ID

n5 Number of route option codes for this route

r-opcode Route option code value

� See Aspen Plus Physical Property Methods and Models, Chapter 4.

�� Where: propname = EOS for mixture equation-of-state model propname = EOS0 for pure-component equation-of-state model See Aspen Plus Physical Property Methods and Models, Tables 4.1-4.3, for a list of all other property names.

��� Obtained from property model definition. See Table B.1.

Example of an Encoded Major Property Route Table in the ppenmprt.dat File

Major property route PHILMX24 calculates liquid fugacity coefficients for components in the mixture (propname = PHILMX) using calculation method 3. This route requires two property models (n1 = 2). The first model is the NRTL activity coefficient model (model = GMRENON, mdlprop = GAMMA), which has no model option code (n2 = 0). This route uses Henry's law for noncondensable components. This route uses To calculate Henry's constants for

A subordinate property route (HNRY01)

Noncondensable components in each solvent (subprop=HNRY)

A mixing model (model=WHENRY) Each noncondensable component in the mixture from property HNRY

The WHENRY model has one model option code (n2 = 1). The option code value of 2 (m-opcode = 2) indicates the Henry's constant in the mixture is calculated by surface-area averaging. For solvents, this route calculates the reference state fugacity coefficient (majprop = PHIL) by the major property route PHIL04. The major property route PHILMX24 uses one route option code (n5 = 1), with option code value of 1 (r-opcode = 1).

Page 139: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 139

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPENM PRT R EPLAC E PHILMX24

2 P HILMX 3

3 2

4 G AMMA GMRENON 1 107

5 0

6 W HNRY WHENRY 1 203

7 1

8 2

9 1

10 P HIL PHIL04

11 1

12 H NRY HNRY01

13 1

14 1

Page 140: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 140

Example of an Encoded Subordinate Property Route Table in the ppensprt.dat File

The subordinate property route, DHL00, calculates pure component liquid enthalpy departure (propname = DHL). This route uses calculation method 3 (method = 3). The liquid enthalpy departure is calculated from:

• Vapor enthalpy departure at saturation condition (temperature and vapor pressure).

• Enthalpy of vaporization.

• A term to account for the effect of pressure on liquid enthalpy.

The vapor pressure (mdlprop = PL) is calculated from the extended Antoine model (model = PL0XANT) which has no model option code (n2=0). The heat of vaporization (mdlprop = DHVL) is calculated from the Watson model (model = DHVLWTSN). The vapor enthalpy departure (subprop = DHV) is calculated from subordinate property route DHV00. The liquid enthalpy pressure correction (subprop = DHLPC) is calculated from subordinate property route DHLPC00. This route does not reference any major property route (n3 = 0) and does not use the route option code (n5 = 0).

Page 141: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 141

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPENS PRT R EPLAC E DHL00

2 D HL 3

3 2

4 P L PL0XANT 1 101

5 0

6 D HVL DHVLWTSN 1 123

7 0

8 0

9 2

10 D HV DHV00 DHLPC DHLPC00

11 0

Page 142: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 142

Physical Property Method Table Aspen Plus stores physical property methods in separate files. Each file has the .sto extension. For example, the definition for the Wilson property method is stored in the wilson.sto file. Each property method definition contains:

• A property method ID.

• The number of major properties defined in the property method.

• Major property name for each major property.

• Major property route ID for each major property.

The major property routes are defined in the Major Property Route Table (ppenmprt.dat). See also Figure B.4.

Figure B.6 shows the layout for the Standard Physical Property Method Table:

Figure B.6 File Layout for the Standard Physical Property Method Table

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPSTO PTN R EPLAC E opsetid

2 n

3 p ropna me routeid propname routeid pro pname routeid

4 p ropna me routeid propname routeid pro pname routeid

5 p ropna me routeid propname routeid pro pname routeid

6 p ropna me routeid propname routeid pro pname routeid

Table B.7 describes parameters for the table in Figure B.6:

Table B.7 Parameters for the Physical Property Method Table Parameter Description

opsetid Property method ID

n Number of major properties in this property method

propname Major property name

routeid Major property route ID

Page 143: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

B TBS File Descriptions 143

Example of Physical Property Method File NRTL.STO

12345

1 67890

1 5

2 0

2 5

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

1 PPSTO PTN R EPLAC E NRTL

2 3 4

3 P HIMVX PHIVMX00 PHILMX PHILMX86 HVM X HVMX00

4 H LMX HLMX86 GVMX GVMX00 GLM X GLMX86

5 S VMX SVMX00 SLMX SLMX86 VVM X VVMX00

6 V LMX VLMX01 MUVMX MUVMX01 MUL MX MULMX01

7 K VMX KVMX01 KLMX KLMX01 DVM X DVMX01

8 D LMX DLMX02 SIGLMX SIGLMX01 PHI V PHIV00

9 P HIL PHIL00 HV HV00 HL HL00

10 G V GV00 GL GL00 SV SV00

11 S L SL00 VV VV00 VL VL01

12 M UV MUV01 MUL MUL01 KV KV01

13 K L KL01 DV DV01 DL DL01

14 S IGL SIGL01

Page 144: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

General Information 144

General Information

This section provides Copyright details and lists any other documentation related to this release.

Copyright Version Number: 2004.1

April 2005 Copyright © 1981 � 2005 Aspen Technology, Inc. All rights reserved.

Aspen Accounting.21�, Aspen ACOL�, Aspen Adsim®, Aspen Advisor�, Aspen Aerotran®, Aspen Alarm & Event�, Aspen APLE�, Aspen Apollo�, Aspen AssetBuilder Optimizer�, Aspen AssetBuilder Planner�, Aspen AssetBuilder Site Optimizer�, Aspen AssetBuilder�, Aspen Batch Plus®, Aspen Batch.21�, Aspen Batch.21�CBT, Aspen BatchCAD�, Aspen BatchSep�, Aspen Blend Model Library�, Aspen Blend�, Aspen Calc� CBT, Aspen Capable-to-Promise®, Aspen CatRef®, Aspen Chromatography®, Aspen Cim-IO Interfaces�, Aspen Cim-IO Monitor�, Aspen Cim-IO� for @AGlance, Aspen Cim-IO� for ABB 1190, Aspen Cim-IO� for Bailey SemAPI, Aspen Cim-IO� for DDE, Aspen Cim-IO� for Eurotherm Gauge via CDP, Aspen Cim-IO� for Fisher-Rosemount Chip, Aspen Cim-IO� for Fisher-Rosemount RNI, Aspen Cim-IO� for Foxboro FOXAPI, Aspen Cim-IO� for G2, Aspen Cim-IO� for GE FANUC via HCT, Aspen Cim-IO� for Hitachi Ex Series, Aspen Cim-IO� for Honeywell TDC 3000 via HTL/access, Aspen Cim-IO� for Intellution Fix, Aspen Cim-IO� for Measurex MCN, Aspen Cim-IO� for Measurex ODX, Aspen Cim-IO� for Moore Apacs via Nim (RNI), Aspen Cim-IO� for PI, Aspen Cim-IO� for RSLinx, Aspen Cim-IO� for SetCim/InfoPlus-X/InfoPlus.21, Aspen Cim-IO� for Toshiba Tosdic, Aspen Cim-IO� for ULMA 3D, Aspen Cim-IO� for Westinghouse, Aspen Cim-IO� for WonderWare InTouch�, Aspen Cim-IO� for Yokogawa ACG10S, Aspen Cim-IO� for Yokogawa EW3, Aspen Collaborative Forecasting�, Aspen Compliance.21�, Aspen COMThermo TRC Database�, Aspen COMThermo®, Aspen Crude Trading & Marketing�, Aspen Custom Modeler®, Aspen Decision Analyzer�, Aspen Demand Manager�, Aspen DISTIL�, Aspen Distribution Scheduler�, Aspen DMCplus®, Aspen DMCplus® CBT, Aspen DMCplus® Composite, Aspen DPO�, Aspen Dynamics®, Aspen eBRS�, Aspen ERP Connect®, Aspen FCC®, Aspen FIHR�, Aspen FLARENET�, Aspen Fleet Operations Management�, Aspen FRAN�, Aspen Fuel Gas Optimizer�, Aspen Grade-IT�, Aspen Harwell Subroutine Library�, Aspen Hetran®, Aspen HTFS Research Network�, Aspen HX-Net Operations�, Aspen HX-Net®, Aspen Hydrocracker®, Aspen Hydrotreater�, Aspen HYSYS Amines�, Aspen HYSYS Crude�, Aspen HYSYS Data Rec�, Aspen HYSYS Dynamics�, Aspen HYSYS Johnson Matthey Reactor Models�, Aspen HYSYS OLGAS 3-Phase�, Aspen HYSYS OLGAS�, Aspen HYSYS OLI Interface�, Aspen HYSYS Optimizer�, Aspen HYSYS Tacite�, Aspen HYSYS Upstream Dynamics�, Aspen HYSYS Upstream�, Aspen HYSYS®, Aspen Icarus Process Evaluator®, Aspen Icarus Project Manager®, Aspen InfoPlus.21®, Aspen Inventory Management & Operations Scheduling�, Aspen Inventory Planner�, Aspen IQmodel Powertools�, Aspen IQ�, Aspen Kbase®, Aspen Lab.21, Aspen MBO�, Aspen MPIMS�, Aspen Multivariate Server�, Aspen MUSE�, Aspen OnLine®, Aspen Operations Manager - Event Management�, Aspen Operations Manager - Integration Infrastructure�, Aspen Operations Manager - Integration Infrastructure� Aspen Advisor, Aspen Operations Manager - Integration Infrastructure� Aspen Orion, Aspen Operations Manager - Integration Infrastructure� Aspen PIMS, Aspen Operations Manager - Integration Infrastructure� Aspen Utilities, Aspen Operations Manager - Integration Infrastructure� Base, Aspen Operations Manager - Integration Infrastructure� COM, Aspen Operations Manager - Integration Infrastructure� Files, Aspen Operations Manager - Integration Infrastructure� IP.21, Aspen Operations Manager - Integration Infrastructure� IP.21/SAP-PPPI, Aspen Operations Manager - Integration Infrastructure� OPC, Aspen Operations Manager - Integration Infrastructure� Relational Databases, Aspen Operations Manager - Integration Infrastructure� SAP R3, Aspen Operations Manager - Integration Infrastructure� System Monitoring, Aspen Operations Manager - Performance Scorecarding�, Aspen Operations Manager - Role Based Visualization� MS SharePoint, Aspen Operations Manager - Role Based Visualization� TIBCO, Aspen Operations Tracking�, Aspen Order Credit Management�, Aspen Orion Planning�, Aspen Orion XT�, Aspen PEP Process Library�, Aspen PIMS Distributed Processing�, Aspen PIMS Enterprise Edition�, Aspen PIMS Global Optimization�, Aspen PIMS Mixed Integer Programming�, Aspen PIMS Simulator Interface�, Aspen PIMS Solution Ranging�, Aspen PIMS Submodel Calculator�, Aspen PIMS XNLP Optimizer�, Aspen PIMS�, Aspen PIPE�, Aspen Plant Planner & Scheduler�, Aspen Plant Scheduler Lite�, Aspen Plant Scheduler�, Aspen Polymers Plus®, Aspen Plus OLI Interface�, Aspen Plus Optimizer�, Aspen Plus®, Aspen Plus® CBT, Aspen PPIMS�, Aspen Process Explorer� CBT, Aspen Process Manual� Applied Rheology, Aspen Process Manual� Bulk Solids Handling, Aspen Process Manual� Crystallization, Aspen Process Manual� Drying, Aspen Process Manual� Gas Cleaning, Aspen Process Manual� Internet Mode, Aspen Process Manual� Intranet Mode, Aspen Process Manual� Mini-Manuals, Aspen Process Manual� Slurry Handling, Aspen Process Manual� Solid Liquid Separation, Aspen Process Manual� Solvent Extraction, Aspen Process Manual� Waste Water Treatment, Aspen Process Order�, Aspen Process Recipe®, Aspen Process Tools�, Aspen Production Control Web Server�, Aspen ProFES® 2P Wax, Aspen ProFES® Tranflo, Aspen Profile.21�, Aspen Properties®, Aspen Pumper Log�, Aspen Q Server�, Aspen Quality Management�, Aspen RefSYS CatCracker�, Aspen RefSYS�, Aspen Report Writer�, Aspen Retail Automated Stock Replenishment�, Aspen Retail Resource Scheduling Optimization�, Aspen Richardson Rbooks�, Aspen Richardson WinRace Database�, Aspen RTO Watch�, Aspen SCM�, Aspen SmartStep Advanced�, Aspen SmartStep�, Aspen Specialty Products Automated Stock Replenishment�, Aspen Specialty Products Resource Scheduling Optimization�, Aspen Split�, Aspen SULSIM®, Aspen Supply Chain Analytics�,

Page 145: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

General Information 145

Aspen Supply Chain Connect�, Aspen Supply Planner�, Aspen Tank Management�, Aspen TASC�, Aspen Teams®, Aspen TICP�, Aspen Transition Manager�, Aspen Utilities�, Aspen Voice Fulfillment Management�, Aspen Watch�, Aspen Water�, Aspen Web Fulfillment Management�, Aspen XPIMS�, Aspen Zyqad Development�, Aspen Zyqad�, SLM�, SLM Commute�, SLM Config Wizard�, the Aspen leaf logo, and Plantelligence are trademarks or registered trademarks of Aspen Technology, Inc., Cambridge, MA.

All other brand and product names are trademarks or registered trademarks of their respective companies.

This document is intended as a guide to using AspenTech's software. This documentation contains AspenTech proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of AspenTech or as set forth in the applicable license.

Corporate

Aspen Technology, Inc. Ten Canal Park Cambridge, MA 02141-2201 USA Phone: (1) (617) 949-1000 Toll Free: (1) (888) 996-7001 Fax: (1) (617) 949-1030 URL: http://www.aspentech.com/

Page 146: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

General Information 146

Related Documentation Title Content

Aspen Plus Getting Started Building and Running a Process Model

Tutorials covering basic use of Aspen Plus. A prerequisite for the other Getting Started guides

Aspen Plus Getting Started Modeling Processes with Solids

Tutorials covering the Aspen Plus features designed to handle solids

Aspen Plus Getting Started Modeling Processes with Electrolytes

Tutorials covering the Aspen Plus features designed to handle electrolytes

Aspen Plus Getting Started Using Equation-Oriented Modeling

Tutorials covering the use of equation-oriented models in Aspen Plus

Aspen Plus Getting Started Customizing Unit Operation Models

Tutorials covering the development of custom unit operation models in Aspen Plus

Aspen Plus Getting Started Modeling Petroleum Processes

Tutorials covering the Aspen Plus features designed to handle petroleum

Aspen Plus User Guide Procedures for using Aspen Plus

Aspen Plus Unit Operation Models Reference Manual

Information related to specific unit operation models in Aspen Plus

Aspen Plus Summary File Toolkit Reference Manual

Information about the Summary File Toolkit, a library designed to read Aspen Plus summary files.

Aspen Plus User Models Reference Manual Information about custom model interfaces in Aspen Plus

APrSystem Physical Property Methods and Models Reference Manual

Information about property methods and property models

APrSystem Physical Property Data Reference Manual

Information about property databanks

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

Page 147: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Technical Support 147

Technical Support

Online Technical Support Center AspenTech customers with a valid license and software maintenance agreement can register to access the Online Technical Support Center at:

http://support.aspentech.com

You use the Online Technical Support Center to:

• Access current product documentation.

• Search for technical tips, solutions, and frequently asked questions (FAQs).

• Search for and download application examples.

• Search for and download service packs and product updates.

• Submit and track technical issues.

• Search for and review known limitations.

• Send suggestions.

Registered users can also subscribe to our Technical Support e-Bulletins. These e-Bulletins proactively alert you to important technical support information such as:

• Technical advisories.

• Product updates.

• Service Pack announcements.

• Product release announcements.

Page 148: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Technical Support 148

Phone and E-mail Customer support is also available by phone, fax, and e-mail for customers who have a current support contract for their product(s). Toll-free charges are listed where available; otherwise local and international rates apply.

For the most up-to-date phone listings, please see the Online Technical Support Center at:

http://support.aspentech.com Support Centers Operating Hours

North America 8:00 � 20:00 Eastern time

South America 9:00 � 17:00 Local time

Europe 8:30 � 18:00 Central European time

Asia and Pacific Region 9:00 � 17:30 Local time

Page 149: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Index 149

Index

A

Accounting

program 97

report 94

report, user-based 95

required information 99

Accounting environment variable

setting 101

Accounting file

creating 99

initializing 100

Adding component synonyms 46

Adding Help

for databanks 47

Aspen Plus

COMMONs renamed 14

customizing simulation engine 62

customizing user interface 65

debugging 28

Help files, modifying 108

INCLUDE files 14

in-house modifications 27

introduction 17

maintaining and updating 25

modification levels 26

routine names 15

run definition file 20

system modifications 27

table building system, running 35, 64

units rows available 121

user modifications 26

utilities 22

Assigning map numbers 106

available 148

B

Binary databanks

adding 50

creating input files 50

Building a Help table-of-contents file 109

Building system shared libraries 30

C

Command line qualifiers 22, 23

Compatibility issues 9

load modules 10

maintaining upward compatibility 10

system definition files 9

user interface initialization files 11

Compiling Help source files 107

Compiling user routines 28

Configuring

physical property databanks 40

physical property methods 61

Converting

TBS input files 39

user routines 32

Converting Fortran

COMMONs renamed 14

INCLUDE files 14

inline 14

Page 150: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Index 150

routine names 15

subroutines 14

Creating

custom SDF files 32

databank input files 43

databanks 41

Help files 104

physical property models, routes, methods 111

user interface input files 50

Customization files

MMTBS 103

Customization system for user interface

running 110

Customizing

Aspen Plus simulation engine 62

Aspen Plus user interface 65

Help source files 105

D

Databanks

adding binary 50

adding component synonyms 46

adding Help for 47

adding in-house 41

adding pair parameter 50

adding user 41

creating 41

installing 48

physical property, configuring 40

rebuilding 9

running MMTBS to add 47

Debugging

Aspen Plus 28

user routines on Windows 28

E

Electrolyte reaction database

adding ionic reactions 58

Emergency relief vents 85

F

Files

MMTBS customization 103

simulation run 19

Format

prompts 108

Fortran

converting subroutines 14

modifying source code 32

G

Gas/2-phase service safety relief valves 79

H

Help driver files

modifying 109

Help files

adding for databanks 47

adding for models, routes, property methods 71

creating 104

customizing 105

modifying Aspen Plus 108

Help source files

compiling 107

modifying 105

I

In-house databanks

adding 40

In-house models and subroutines

integrating 32

Initialization files 11

Inlet pipe valves 88

Inline Fortran 28

converting 14

Input file

binary databanks, creating 50

header templates 55

Page 151: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Index 151

ionic reactions database, creating 58

pair parameter databanks, creating 50

Installing

databanks 48

Help files 110

RECDEF files 110

system definition files 65

Ionic reactions

adding to electrolyte reaction database 58

creating input file 58

L

Liquid service safety relief valves 76

Load modules 10

M

Maintaining and updating Aspen Plus 25

Maintaining upward compatibility 10

Major property route table 134

parameters 136

Map numbers

assigning to Help topics 106

MMTBS

customization files 103

running 47, 57, 60

MMTBS driver file

modifying 47, 57, 60, 109

Models

adding to simulation engine 66

adding to user interface 70

Modifying

Aspen Plus 26

Aspen Plus Help files 108

Help driver files 109

Help source files 105

in-house files 27

MMTBS driver files 47, 57, 60, 109

system files 27

user files 26

N

NRTL binary parameters 55

P

Pair parameter databanks

adding 50

creating input files 50

Physical property databanks

configuring 40

Physical property method table 142

parameters 142

Physical property methods

configuring 61

Physical property models, routes, methods

creating 66

Physical property subroutine list table 130

Pipes

pressure relief 84

valves 88

Pressure relief

configuring equipment data 75

pipes 84

rupture disks 82

Prompts

adding for models, routes, property methods 71

format 108

Property methods

adding to simulation engine 66

adding to user interface 70

example of file NRTL.STO 143

Property model definition table 112

Property parameter definition table 117

parameters 119

Property route tables

major 134, 138

subordinate 137, 140

Page 152: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Index 152

R

Relief valves

gas/2-phase service safety 79

Reports

accounting 94

Routes

adding to simulation engine 66

adding to user interface 70

Routines

user 28

Running

accounting program 97

MMTBS 47, 57, 60

Rupture disks 82

S

Scalar parameters 56

SDF files

creating custom 32

Simulation engine

adding models, routes, property methods 66

command line qualifiers 22

processes for running 17

system files 18

Simulation run files 19

Standard physical property method table 142

Subordinate property route table 137

parameters 138

System configuration 16

System definition files 9, 36

installing 65

running report system 33

updating 38

System files

simulation engine 18

user interface 18

System overview 16

System shared libraries

building 30

Windows 31

T

Table building system

converting files 39

customization files 63, 111

file descriptions 111

file types 37

files, creating from customization files 64, 111

program 36

running 35, 64

system definition files 36

updating system definition files 38

Table-of-contents file for Help

building 109

Tail pipe valves 88

Templates for input file headers 55

Testing changes in user interface 57

U

Units conversion

flags 122

formulas 122

Upgrading Aspen Plus 8

Upgrading user interface files 9

Upward compatibility

maintaining 10

User databanks

adding 40

User interface

adding models, routes, property methods 70

creating databank files 43

customizing 102

running customization system 110

system files 18

testing changes in 57

upgrading 9

User routines

Page 153: EPBU PDF Manual - Page Not Found | University of Alberta · PDF fileCustomizing the Aspen Plus User Interface ... This manual is for Aspen Plus system ... most in-house modifications

Index 153

compiling 28

converting 32

debugging on Windows 28

maintaining 28

User-based accounting report 95

V

Valves

liquid service safety relief 76

Van Laar binary parameters 56

Vents

emergency relief 85

W

Wilson binary parameters 56