Sie sind auf Seite 1von 152

Aspen Plus

System Management Guide

Version Number: V7.3.2 February 2012


Copyright (c) 1981-2012 by Aspen Technology, Inc. All rights reserved. Aspen Plus, Aspen Polymers, aspenONE, the aspen leaf logo and Plantelligence and Enterprise Optimization are trademarks or registered trademarks of Aspen Technology, Inc., Burlington, MA. All other brand and product names are trademarks or registered trademarks of their respective companies. This document is intended as a guide to using AspenTech's software. This documentation contains AspenTech proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of AspenTech or as set forth in the applicable license agreement. Users are solely responsible for the proper use of the software and the application of the results obtained. Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the software may be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS DOCUMENTATION, ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. Aspen Technology, Inc. 200 Wheeler Road Burlington, MA 01803-5501 USA Phone: (1) (781) 221-6400 Toll Free: (1) (888) 996-7100 URL: http://www.aspentech.com

Contents
Who Should Read this Guide ...................................................................................1 Introducing Aspen Plus ...........................................................................................3 Related Documentation .....................................................................................3 Technical Support ............................................................................................4 1 Upgrading Aspen Plus .........................................................................................5 Compatibility Issues .........................................................................................6 Upgrading User Interface Files .................................................................6 Databank Files .......................................................................................6 System Definition Files............................................................................6 Problem Definition Files...........................................................................7 Other Files ............................................................................................7 Maintaining Upward Compatibility.............................................................7 User Interface Initialization Files ..............................................................7 2 System Overview...............................................................................................11 Functional Overview of Aspen Plus.................................................................... 12 Processes for Running the Simulation Engine ........................................... 12 User Interface System Files ............................................................................. 13 Simulation Engine System Files........................................................................ 13 Files Associated with a Simulation Run.............................................................. 13 The Aspen Plus Run Definition File.................................................................... 14 Aspen Plus Utilities ......................................................................................... 16 Simulation Engine Command Line Qualifiers ...................................................... 17 Typographical Conventions .................................................................... 17 Command Line Qualifier Definitions ........................................................ 17 3 Maintaining and Updating Aspen Plus ...............................................................19 Modification Levels in Aspen Plus...................................................................... 20 User Modifications ................................................................................ 20 In-House Modifications.......................................................................... 21 System Modifications ............................................................................ 21 Maintaining User Routines ............................................................................... 22 Compiling User Routines ....................................................................... 22 Overview of Debugging in Aspen Plus ..................................................... 22 Building System Shared Libraries ..................................................................... 24 Module Requirements ........................................................................... 24 Integrating In-House Models and Subroutines.................................................... 25 Creating a Custom SDF File ................................................................... 26 Modifying System Routines to Call Proprietary Routines ............................ 26 Running a System Definition File Report............................................................ 26

Contents

iii

Running the Aspen Plus Table Building System .................................................. 28 The System Definition File ..................................................................... 29 The TBS Program ................................................................................. 29 Updating SDFs ..................................................................................... 31 VIRT Statement ............................................................................................. 32 4 Configuring Physical Property Database and Databanks ...................................33 Customizing a Properties Database................................................................... 34 Importing Legacy Databank Files ........................................................... 34 Cloning a Source Database .................................................................... 35 Editing Databank Data .......................................................................... 35 Distributing Custom Databases .............................................................. 35 Customizing Traditional Properties Databanks .................................................... 36 Adding User and In-House Databanks ..................................................... 37 Adding Binary or Pair Parameter Databanks............................................. 46 Adding Ionic Reactions to the Electrolyte Reaction Database................................ 53 Creating an Ionic Reactions Input File ..................................................... 54 Modifying the MMTBS Driver File ............................................................ 56 Running MMTBS to Update the User Interface Reaction Databank............... 56 5 Configuring Physical Property Methods .............................................................57 Overview....................................................................................................... 57 Customizing the Aspen Plus Simulation Engine................................................... 58 Modifying the TBS Customization Files .................................................... 59 Creating the TBS Update File From TBS Customization Files ...................... 60 Running the Aspen Plus Table Building System ........................................ 60 Installing the SDF File in Aspen Plus ....................................................... 61 Customizing the Aspen Plus User Interface ........................................................ 61 Creating In-House Physical Property Models, Routes, and Methods ....................... 62 Adding Models, Routes, and Property Methods to the Simulation Engine...... 62 Adding Models, Routes, and Property Methods to the Aspen Plus User Interface ............................................................................................. 66 Adding Prompts and Help for Models, Routes, and Property Methods .......... 67 6 Configuring Pressure Relief, Pipe, and Valve Equipment Data ...........................71 Overview....................................................................................................... 72 Liquid Service Safety Relief Valves for Pressure Relief......................................... 72 Gas/2-Phase Service Safety Relief Valves for Pressure Relief ............................... 75 Rupture Disks for Pressure Relief ..................................................................... 78 Pipes for Pressure Relief and the Pipe Model ...................................................... 80 Emergency Relief Vents for Pressure Relief ........................................................ 81 Inlet and Tail Pipe Valves for Pressure Relief...................................................... 84 Valves for the Valve Model .............................................................................. 86 7 Accounting Report.............................................................................................91 Generating a User-Based Accounting Report ...................................................... 92 Running the Accounting Program ..................................................................... 94 Creating a New Accounting File ........................................................................ 95 Making Accounting Information Required .......................................................... 96 Activating Accounting ..................................................................................... 96 Initializing the Accounting File................................................................ 96

iv

Contents

Setting the Accounting Environment Variable........................................... 97 A Customizing the Aspen Plus User Interface.......................................................99 MMTBS Customization Files ............................................................................. 99 Modifying the MMTBS Driver File .......................................................... 101 Creating Help............................................................................................... 101 Converting WinHelp Projects................................................................ 102 Creating a New HTML Help Project........................................................ 102 Creating the Help Source Files ............................................................. 102 Assigning Map Numbers to Help Topics ................................................. 103 Creating a Table of Contents File.......................................................... 104 Creating an Index File......................................................................... 104 Compiling the Help Source Files ........................................................... 104 Creating Prompts and Linking Help to Aspen Plus ............................................. 105 Assigning Map Numbers to Aspen Plus Customizations ............................ 105 Writing Prompts for Aspen Plus Customizations...................................... 105 Modifying the Help Driver File .............................................................. 106 Running the User Interface Customization System ........................................... 106 Installing the New Files ................................................................................. 107 Troubleshooting Help Customization ............................................................... 107 B TBS File Descriptions.......................................................................................109 Conventional Property Model Definition Table................................................... 110 Property Parameter Definition Table ............................................................... 115 Physical Property Subroutine List Table ........................................................... 128 Modifying Aspen Plus System Routines............................................................ 128 Major and Subordinate Property Route Tables.................................................. 132 Physical Property Method Table...................................................................... 141 Index ..................................................................................................................143

Contents

vi

Contents

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.

Who Should Read this Guide

Who Should Read this Guide

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.

Related Documentation
Title Aspen Plus Getting Started Building and Running a Process Model Aspen Plus Getting Started Modeling Processes with Solids Aspen Plus Getting Started Modeling Processes with Electrolytes Aspen Plus Getting Started Using Equation-Oriented Modeling Aspen Plus Getting Started Customizing Unit Operation Models Aspen Plus Getting Started Modeling Petroleum Processes Aspen Plus User Guide Aspen Plus Unit Operation Models Content Tutorials covering basic use of Aspen Plus. A prerequisite for the other Getting Started guides Tutorials covering the Aspen Plus features designed to handle solids Tutorials covering the Aspen Plus features designed to handle electrolytes Tutorials covering the use of equationoriented models in Aspen Plus Tutorials covering the development of custom unit operation models in Aspen Plus Tutorials covering the Aspen Plus features designed to handle petroleum Procedures for using Aspen Plus Information related to specific unit

Introducing Aspen Plus

Title Reference Manual Aspen Plus Summary File Toolkit Reference Manual Aspen Plus User Models Reference Manual APrSystem Physical Property Methods and Models Reference Manual APrSystem Physical Property Data Reference Manual Aspen Plus Application Examples Aspen Engineering Suite Installation Manual

Content operation models in Aspen Plus Information about the Summary File Toolkit, a library designed to read Aspen Plus summary files. Information about custom model interfaces in Aspen Plus Information about property methods and property models Information about property databanks A suite of examples illustrating capabilities of Aspen Plus Instructions for installing Aspen Plus and other Aspen Engineering Suite products

Technical Support
AspenTech customers with a valid license and software maintenance agreement can register to access the online AspenTech Support Center at: http://support.aspentech.com This Web support site allows you to: Access current product documentation Search for tech tips, solutions and frequently asked questions (FAQs) Search for and download application examples Search for and download service packs and product updates Submit and track technical issues Send suggestions Report product defects Review lists of known deficiencies and defects

Registered users can also subscribe to our Technical Support e-Bulletins. These e-Bulletins are used to alert users to important technical support information such as: Technical advisories Product updates and releases

Customer support is also available by phone, fax, and email. The most up-todate contact information is available at the AspenTech Support Center at http://support.aspentech.com.

Introducing Aspen Plus

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. This chapter covers compatibility issues.

1 Upgrading Aspen Plus

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 from Aspen Plus 12.1 or earlier that are stored in Aspen Plus Document format (*.apw). The following table shows which files are upwardly compatible with the new version:
Files Aspen Plus Backup Aspen Plus Document Quick Restart Extensions .bkp .apw .iwd and .iwb (Release 9) Upwardly Compatible? Yes Yes (Aspen Plus 2004 & newer) No

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
The Aspen Physical Property System uses a new relational database system for storing the databanks of component data. You can import the files (built according to the specifications in Chapter 4) which you used to add custom databanks in past versions into this new database. See the Databank Manager in online help for more information.

System Definition Files


The SDFs from previous releases are not compatible with new versions. If your SDFs used with past versions contain any customized features, you must reapply them to the SDFs installed with the new version, using the original Table Building System (TBS) files.
For more information on The format for physical property tables See Chapter 5

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

1 Upgrading Aspen Plus

Problem Definition Files


The problem definition file (APPDF) from previous releases is not compatible with the new version. You must rebuild any existing APPDFs by deleting the old ones and re-running the simulation model from an input or backup file.

Other Files
New versions are 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).

Maintaining Upward Compatibility


Some of the new features in new versions 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


The file mmg.ini specifies default settings for the user interface. You can modify the settings in mmg.ini directly within the user interface, using the File | 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 runanyway ftn_check account-info File | Options | Simulation Allow run only when input is complete File | Options | Simulation Check inline Fortran for syntax errors File | Options | Simulation Accounting information required to complete input

1 Upgrading Aspen Plus

Menu Selections File | Options | Files File | Options | Files File | Options | Properties Basis File | Options | Properties Basis File | Options | Properties Basis File | Options | Properties Basis File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet

Option Always create backup copy Save document as

Setting alwayssavebkp defsaveasbkp timestamp

File | Options | Simulation Time stamp

Pure component databanks searched purebank Binary databanks searched Copy regression and estimation results onto Parameter forms Generate input language using Block results Heat/Work variables Stream results Temperature Stream results Pressure Stream results Total flow rate Stream results Duty/Power paramdata regdbank component globalqw, qwformat globaltemp, tempformat globalpres, presformat globalflow, flowformat globalstrmqw, strmqwformat pseudobatch partial animation editinput template startupdir dynaplusenabled editor printcommand autoblockid, blockprefix showblockid autostreamid, streamprefix showstreamid autoplacement lockblock, placement labelscale scale grid grid gridresolution

File | Options | Simulation Express run File | Options | Simulation Interactively load results File | Options | Simulation Animate flowsheet during calculations File | Options | Simulation Edit keyword input before starting calculations File | Options | Simulation Application template File | Options | Files File | Options | Advanced File | Options | Advanced File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet File | Options | Flowsheet Default working directory Text editor Print text file command Automatically assign block name with prefix Display block name Automatically assign stream name with prefix Display stream name Automatically place blocks when importing Lock block spacing factor at Label size scale factor Show scale Show grid Snap to grid Grid size File | Options | Simulation Aspen Dynamics

1 Upgrading Aspen Plus

Menu Selections File | Options | Flowsheet File | Options | Flowsheet File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Plots File | Options | Properties Basis File | Page Setup File | Page Setup File | Page Setup File | Page Setup File | Page Setup File | Page Setup File | Page Setup Home tab of ribbon Format tab of ribbon Format tab of ribbon Format tab of ribbon

Option Zoom scale factor Scroll step size (%) Title Axis label Axis scale Annotation Legend Grid style Line style Marker size Show legend Show time stamp Allow definition of system parameters Size Source Orientation Left margin Right margin Top margin Bottom margin Model library Color Line style Font

Setting zoomfactor scrollstep plottitlefont plotlabelfont plotscalefont plottextfont plotlegendfont gridstyle linestyle plotmarkersize showlegend plottimestamp allow_system_user props papersize papersource orientation marginleft marginright margintop marginbottom modellibraryview drawcolor drawlinestyle drawfont

This item cannot be set in the mmg.ini file. 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.

1 Upgrading Aspen Plus

10

1 Upgrading Aspen Plus

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.

2 System Overview

11

Functional Overview of Aspen Plus


The Aspen Plus user interface can run on Intel Pentium processors running either Windows XP or Windows Vista. 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. See the Aspen Engineering Suite Installation Guide for various platform requirements for Aspen Plus.

Processes for Running the Simulation Engine


Aspen Plus provides several methods to perform simulation calculations. Different users will have their own preferences in how they use Aspen Plus.

Scenario 1
Typically, to perform a simulation, you do the following: 1 Specify the problem on a graphical flowsheet using the Aspen Plus user interface. The user interface provides a patented expert system to guide you through the problem specification. Run 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. Analyze the simulation results using the Aspen Plus user interface and the Aspen Plus history and report files.

Scenario 2
You can also run the simulation engine independently of the user interface. In this scenario, you: 1 2 3 Create a keyword input language file containing the problem specifications. Run the simulation engine interactively or in batch mode using the Aspen command from the operating system command line. Analyze 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.

12

2 System Overview

User Interface System Files


While you are specifying the problem, the Aspen Plus user interface uses the following files:
File recdef.apr mmg.hms mm.ini mmg.ini *.chm Description Format Data structure definition files, including physical property Binary databanks and expert system rules Hypertext Help messages User interface communications initialization User interface graphics initialization Compiled Microsoft HTML Help files Binary ASCII ASCII Binary

Simulation Engine System Files


During execution, the simulation engine uses binary files to retrieve information for calculations. The file types are:
File Type .dat .sdf .ilb .slb .msf Description System and user physical property databanks, cost databanks System Definition File (Aspen Plus Language Definition File) System and user insert libraries System stream library Aspen Plus accounting file

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 .his .apw .appdf .for Name History User interface document Problem data Fortran Description Calculation history All data for the user interface problem specification All data for the problem simulation Generated Fortran routines for noninterpretable inline Fortran Format ASCII Binary Binary ASCII

You can export the following types of ASCII files from the File | Export command in the user interface:

2 System Overview

13

File Type File Name .bkp .cpm .inp .rep .sum .dynf .atslv .atact Backup Control Panel Message Input Report Summary Aspen Dynamics Language

File Contains Input description, graphics, optionally results in a compact ASCII format that the user interface can read Diagnostic messages displayed in the Control Panel Input description with or without graphics Simulation results Simulation results in format required by interfacing with other programs using Summary file toolkit Pressure or flow-driven dynamic simulation file for Aspen Dynamics

EO Solver Report Report of equation-oriented solution, with iteration and convergence information DMO Solver Active Report similar to the EO Solver Report file only Bounds Report generated by the DMO solver. This file includes all the problem variables and independent variables

The following types of ASCII files are useful for diagnosing problems:
File Type Name .for .jnl .ld .opt Fortran Journal Linker options Description Non-interpretable inline Fortran and Fortran user routine references A record of all interactive commands and input changes Linker directives for dynamic link

Linker diagnostics Linker diagnostic output for dynamic link

The Aspen Plus Run Definition File


Each Aspen Plus run creates a run definition (.def) file containing file specifications for the run. You 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 File specifications Command options The syntax is symbol: filespec symbol:

Where symbol is a symbol listed in Table 2.2

You specify 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\ and the variables ${APRSYS} and ${ASPTOP} representing the APrSystem <version>\Engine and Aspen Plus

14

2 System Overview

<version>\Engine folders, respectively. However, the name cannot contain any blank spaces in the name of the file. You can also specify the run definition file at the operating system command prompt when using the Aspen command. Table 2.1 lists valid symbols and specifications for the default file. Any variables not specified in the run definition file take default values specified in Aspen Plus <version>\Engine\xeq\aspfiles.def, or if not specified there either, then in APrSystem <version>\Engine\xeq\aprsysfiles.def .

Table 2.1 Valid Symbols for Run Definition File


Symbol INPUT RUNID PDF PP1A PP1B PP2A PP2B PP2C XILB XULB XSLB XSCD UCOS IPCD ISOL IAQU IBIN XCOM XDPR XPCD XFLO XSOL XAQU XBIN XBAR XMRL XNPL XNBS XJAN XSGT XPC85 XPC93 Description Input file Identifier for the simulation run Problem datafile USRPP1A databank USRPP1B databank USRPP2A databank USRPP2B databank USRPP2C databank System insert library User insert library System stream library System cost databank User cost databank In-house pure component databank In-house solids databank In-house aqueous databank In-house binary databank System combustion databank System pure component databank-II System pure component databank System flowtran databank System solids databank System aqueous databank System binary databank Inorganic (Barin) databank CSIRO MRL databank CSIRO NPD databank CSIRO NBS databank JANAF combustion databank CSIRO SGT databank Release 8.5-6 compatible pure component databank Release 9.3 version of purecomp.dat Default File None None runid.appdf usrpp1a.dat usrpp1b.dat usrpp2a.dat usrpp2b.dat usrpp2c.dat sys.ilb user.ilb sys.slb aspcost.dat cdummy.dat inhspcd.dat inhssol.dat inhsaqu.dat inhsbin.dat combust.dat pure10.dat aspenpcd.dat flowtran.dat solids.dat aqueous.dat binary.dat inorgani.dat cpdmrl.dat cpdnpl.dat cpdnbs.dat cpdjan.dat cpdsgt.dat pure856.dat pure93.dat

2 System Overview

15

Symbol XAQ92 XFACT XPOPCD XSEPCD XSDF SCRIPT XMOD XPDFLC USERNAME NEW_RUNID OLD_RUNID LMHOST IAPFLAG MMBACKUP ITONLY BATCH TUTOR SLAVE DLOPT

Description Release 9.2 version of aqueous.dat F*A*C*T databank System polymers databank System segments databank System definition file Script file for ASCII interactive run Location of executable used for simulation Location of problem datafile Username New Run_ID specified for Edit run Old Run_ID being edited Name of License Manager host Interactive flag Input/restore flag generate backup file Perform input processing only Job is run batch or in background Use interactive tutorial mode Job runs under the user interface control Dynamic link options

Default File aqu92.dat factpcd.dat polymer.dat segment.dat sdffil.sdf iap.scp none none none none none Not applicable Not applicable Not applicable Not applicable Not applicable none

Aspen Plus Engine executable directory. Local working directory

Aspen Plus Utilities


Table 2.2 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.2 Utility Programs


Utility ACR CDFMS DFMS GETRIDOF IFMS MMTBS SDFRPT STRLIB TBS Description Generates accounting reports about Aspen Plus usage at a site. See Chapter 7. Creates Aspen Plus system and user cost databanks Creates and updates Aspen Plus physical property databanks. See Aspen Plus Physical Property Data. Deletes files created during a run Creates and modifies Aspen Plus insert libraries User interface table building system. See Appendix A. Generates reports on Aspen Plus language syntax. See Chapter 3. Creates and modifies Aspen Plus stream libraries Creates and modifies the Aspen Plus system definition file. See Chapter 3.

16

2 System Overview

Utility ASPLINK ASPCOMP

Description Generates user shared or dynamic link libraries. See Aspen Plus User Models. 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] The Aspen command must be run from the Aspen Plus Simulation Engine window.

Typographical Conventions
Following are the conventions used in the simulation engine command line qualifiers:
Convention [ ] italics Represents optional qualifier variables, such as input_file. Substitute the appropriate name.

Note: 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. 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-or-longer extension (for example, RunID.rep). 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

RunID

NewRunID

2 System Overview

17

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. /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. 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 inhouse 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. 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. Use this qualifier to execute only the input translation step on your simulation input. 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. 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. 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. 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. 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. 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. 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. 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.

/inhXXX=name

/insert=name

/itonly /log /mm /mmbackup

/ppXX=name

/sponly

/strlib=name

/ucost=name

/dlopt=name

The /ppXX and /inhXXX qualifiers only apply to in-house databanks created using DFMS. They are not required when using the Aspen Properties Enterprise Database.

18

2 System Overview

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

3 Maintaining and Updating Aspen Plus

19

Modification Levels in Aspen Plus


In Aspen Plus, you can make modifications at three levels:
Modify at this level User In-house System For changes that A single user or small group of users needs Must be available to all users 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 nonstandard 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.

20

3 Maintaining and Updating Aspen Plus

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 inhouse 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. On Windows 7, you start the Customization window by right-clicking the program icon and selecting Run as Administrator, instead of simply double-clicking it.

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 2 If you need to modify an Aspen Plus system routine, contact the AspenTech Hotline. 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. 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. 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. 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.

3 Maintaining and Updating Aspen Plus

21

The Aspen Plus installation creates the folder c:\Program Files\AspenTech\Aspen Plus <version>\Engine\inhouse for storing in-house modifications, but you may store them elsewhere. If you store DLLs in the inhouse folder, you may wish to add a default DLOPT file which references them. To do so, add a line ${APRSYS}\inhouse\default.dlopt to APrSystem <version>\Engine\xeq\aprsysfiles.def and add the file default.dlopt to the inhouse folder containing: %APRSYS%\Inhouse\*.dll If desired, this DLOPT file can also reference other locations, such as network shares specified by UNC paths. Note, though, that when a DLOPT file is specified for the run, it completely overrides this file, and the Inhouse directory will also need to be specified in the DLOPT file for that run if you want to use these DLLs as well as your run-specific ones.

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 the Intel Fortran compiler's symbolic debugger only if the user code was compiled with the same compiler version as Aspen Plus (see Chapter 1 of Aspen Plus User Models for details). The Compaq Fortran debugger will not work. The debugger can be invoked for the following categories of Fortran routines:

22

3 Maintaining and Updating Aspen Plus

Inline Fortran. User models. In-house models.

Debugging User Routines or Inline Fortran


To debug user routines on Windows platforms, perform these steps: 1 2 From the Aspen Plus program group, open the Aspen Plus Simulation Engine window. Compile user routine(s) using the dbg option. Type: ASPCOMP filename dbg This creates an object file (filename.obj). 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 4 Also add the line SIM IAP=1 near the top of the input file. This will cause Interactive Aspen Plus to start up when you run the aspen command. 5 Run an input file that requires the user routine(s). For example, if the input file is gmutest.inp and the RunID is test, type: aspen gmutest test Note: Symbolic debugging is only possible when running input files via the Simulation Engine, using Interactive Aspen Plus (IAP). 6 7 8 9 When you get to the IAP prompt, start the Developer Visual Studio. Click Tools, then Attach, and then attach the debugger to the apmain.exe process. Open your Fortran source file in the debugger environment, and to test the workflow, put a stop on one line of the executable source code. Allow Aspen Plus to continue using the RUN, GO, or NEXT commands at the A+> prompt. Type HELP for a more complete list of interactive run mode commands. See Chapter 2 of the Aspen Plus Input Language Guide for more details on these commands.

Debugging User Routines Without a Symbolic Debugger


If you do not have a symbolic debugger, or other limitations prevent you from using it, use this debugging method: 1 2 3 Add Fortran Write statements to your user routine at strategic locations. Compile the routine using the Aspcomp procedure. Rerun the simulation and check the output file for diagnostic information.

See Chapter 4 of Aspen Plus User Models for instructions on using Write statements to write to the terminal or Control Panel, or Chapter 5 for

3 Maintaining and Updating Aspen Plus

23

instructions on writing to the history file. Also note the limitations on using Fortran Write statements; if you are using the Compaq compiler, you should open and write to your own files.

Building System Shared Libraries


The simulation engine contains a custom directory that contains all the modules and corresponding Fortran files that can be customized. 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 <version>\Engine\custom. Module zemhtxu is used only by Aspen Plus and its files are in C:\Program Files\AspenTech\Aspen Plus <version>\Engine\custom.

Table 3.1 Module Routines


Module ppuser zeinit zemhtxu Routines esmnu.f, esmnu0.f, kvlui.f, mdmon9.f, pcmulu2.f, pcrkiu2.f, pcwslu2.f, phcciu.f, phclcu.f, pprpt.f getprp.f, iappdb.f 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 XP and Vista 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.

24

3 Maintaining and Updating Aspen Plus

Use the Aspcomp command to compile your Fortran routines:


To compile Type this Fortran files for your module in the Engine\Custom aspcomp *.f ppuser directory of Aspen Plus or the APrSystem, including your modifications and additions 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 <version>\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).

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 the new version: 1 2 3 If you are integrating in-house Table Building System (TBS) files, create a custom System Definition File (SDF) file. Modify system routines to call your proprietary routines. Test and debug proprietary unit operation and property models.

The sections following explain each of these steps in detail.

3 Maintaining and Updating Aspen Plus

25

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 Unit Operation Physical Property Routines and Methods See Running the Aspen Plus Table Building System, in this chapter Chapter 5

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.

Modifying System 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 simulation engine interface routines for the new version. Modify the code to call your routines.

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 Where: sdfname outname = = Name of the SDF used for the report (the default is system SDF). Name of the report file (the default is sdfrpt.rep). sdfname outname

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.

26

3 Maintaining and Updating Aspen Plus

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. 2. 3. 4. 5. PRS PRS PRS PRS PRS PIPE TABLE TRANSFLO VALVE TABLE EMERGENCY RELIEF VENT TABLE RUPTURE DISK TABLE 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. 2. 3. 4. FULL THE CONSTANTS TABLE DATA FILE SYMBOL TABLE PITZER MODEL DATA ELECTROLYTE NRTL MODEL DATA COAL PROPERTY DATABANK

Two special table names appear on the list:

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 you cannot modify it. It lists: SDF size information. Default constants used in the SDF. COST BLOCK PKW (Primary Keyword Tables) UOSM (Unit Operation System Model) UTILITY REACTIONS

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

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 Yes No Then The initial prompt appears. 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.

3 Maintaining and Updating Aspen Plus

27

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.

28

3 Maintaining and Updating Aspen Plus

The System Definition File


The default location for the SDF is: C:\Program Files\AspenTech\Aspen Plus <version>\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). SKW tables linked to a specific PKW table. TKW tables linked to a specific SKW table.

Each table has:

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

3 Maintaining and Updating Aspen Plus

29

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 Engine\utl directory: C:\Program Files\AspenTech\AprSystem <version>\Engine\utl\extr_tbs.exe Note: Extr_tbs.exe will extract files to the TBS subfolder. To ignore the directory path, use the j option to extract the files. If you dont have write permission under Program Files, extract the files from a writeable working folder. You can also type extr_tbs from an Aspen Plus Simulation Engine window, provided %aprsys%\xeq\extr_tbs.bat is in the path. 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 .cst .lcd .pkw .sto .uos .utl .rxn .dat Table Data Description Cost block Labeled COMMON definition Primary keyword Standard property method Unit operation system model Utility model Reaction model 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:

30

3 Maintaining and Updating Aspen Plus

tabname Where: tabname entrynam

REPLACE

entrynam

= Name of the table = 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. 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 <version>\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 2 3 Create or modify a TBS input file. Create a copy of the SDF in your working directory. 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 or tabname Where: tabname entryname = = Table name in columns 1-8 Name identifying this table entry in columns 21-28 DELETE entrynam REPLACE entrynam

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.

3 Maintaining and Updating Aspen Plus

31

VIRT Statement
If you want to create your own SDF by 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 XYZZ -1 0 0 -1 0 3 WORK WORK WORK 0 VIRT DUMMY 2 IPTEMP 1 RPTEMP 2 SIZE AREAS 0 0 + + 20 20 145 146 20 1 1 1 1 1 REPLACE UXYZZI -1 -1 XYZZ 1 -999 1

41

0 0

0 0

-1

-1

-999

1 SKW SUBROUTINE 1 TKW MODEL

SUBROUTINE MODEL

SUBR MODL 3 MISSING

32

3 Maintaining and Updating Aspen Plus

4 Configuring Physical Property Database and Databanks

This chapter explains how to configure the new property database and the traditional databanks to include your own proprietary physical property data. Note: A relational database system, Aspen Properties Enterprise Database, is now the recommended method for storing physical property data. This database system is available together with the traditional DFMS-based databanks that have been used in all previous versions of Aspen Plus. Note that the new relational database system will replace the databanks in future releases of Aspen Plus.

4 Configuring Physical Property Database and Databanks

33

Customizing a Properties Database


This section explains how to create a property database to incorporate your proprietary physical property data using the Aspen Properties Enterprise Database. Once the database is created, it will be used automatically in Aspen Plus. There is no need to further customize the Aspen Plus Engine or GUI. The properties database currently is not designed to store electrolyte reaction data. Therefore, if you need to customize this type of data, you must follow the instructions described in Adding Ionic Reactions to the Electrolyte Reaction Database. You can create your database in two ways: Either import legacy databank files or clone an existing database. In either case, begin by opening the Database Manager from Start | Programs | AspenTech | Process Modeling <version> | Aspen Plus | Aspen Properties Database Manager. Right-click the Aspen Physical Properties Databases folder and select Create a new database. The Create a New Properties Database Wizard appears.

Importing Legacy Databank Files


This option in the Database Manager lets you create a database using the following types of files. DFMS input files used to create the traditional DFMS-based databanks and customize the simulation engine TBS input files used to customize the GUI Optional DIPPR access database which contains the literature citation, notes and uncertainties information Optional molecular structure information (compressed mole files) that have been stored in an access database

Create the DFMS and/or TBS files according to the procedures under Customizing Traditional Properties Databanks, below. Then follow these steps to create the database. 1 2 On the first screen of the wizard select Import legacy data files and click Next. When prompted, enter the Login Name and Password (this is normally apeduser and Aprop100) and the name of the new database. Keep the name short, using a maximum of 8 characters. Click Next. To import the legacy data files, click the browse button and locate the folder(s) where the files are kept. Use the up and down buttons to order the selected files.

3 4

34

4 Configuring Physical Property Database and Databanks

Important: The selected files must be in the same order in which the DFMS input files were used to create the old databanks using DFMS. If you have TBS files, they must be listed after the DFMS input files. If you have a large number of these legacy files, it is recommended that you list the full path names of these files in the correct order in a text file. Save this file with extension .LST (use Files of type All Files and enter the filename with extension .LST when saving from Notepad). Then select this list file using the browse button instead of selecting the individual input files.

Cloning a Source Database


This option in the Database Manager lets you make a copy of a source database. The new database will be an exact copy of the source database until you edit it as described in the following section. 1 2 On the first screen of the wizard select Clone a Source Database and click Next. When prompted, enter the Login Name and Password (this is normally apeduser and Aprop100) and the name of the new database. Click Next. When prompted, enter the Login Name and Password (this is normally apeduser and Aprop100) and the name of the source database. Click Next. Choose whether to clone the full database, or only selected databanks, or only selected compounds and properties. Click Finish to clone the full database, or click Next and select the parts to be cloned.

Editing Databank Data


All compounds selected from any databank appear under Selected Compounds in the tree. (See the online help for the Database Manager for more information on selecting compounds.) Click any compound here to view its name, alias, CAS number, synonyms, and molecular structure. The databanks containing the component are also listed. Use the Edit tab to edit any of this data; the molecular structure can be specified by importing an MDL mole file (*.mol) from a third-party molecular drawing program. Click Save to save any changes to the database. You can compare data from different sources using the Properties and Parameters section of the tree. This section has only two entries, Pure and Binary. Selecting either of these displays a View tab where you can choose from the added components, the databanks, and the parameters. Select any combination of these which can be displayed in a two-dimensional grid, and click Compare. You can also use the Edit tab to edit the data. Note that in the pure component databanks you can specify additional parameters for some properties such as the uncertainty in the value and the source of the data.

Distributing Custom Databases


The Aspen Properties Database Manager contains a feature for backing up a database to a file and restoring the database from such a file which can be

4 Configuring Physical Property Database and Databanks

35

used to copy a properties database from one computer to another. It is also possible to perform this backup and restore using SQL commands. This may be useful for performing a silent installation of the database; see the aspenONE Deployment Guide for more information about silent installations. Use this command from the command prompt (cmd.exe) to backup a database, assuming that the database name is XYZ: sqlcmd -Uapeduser -PAprop100 -S .\SQLExpress -Q "backup database XYZ to disk='d:\temp\database\XYZ'" This will create a backup of the XYZ database and put it in d:\temp\database. Copy this file to another PC and place it in d:\temp\database, then use the following command from the command prompt (cmd.exe) to restore the database: sqlcmd -Uapeduser -PAprop100 -S .\SQLExpress -Q "restore database XYZ from disk='d:\temp\database\XYZ'" The MS SQL Server (or MSDE) will decide where the restored database is located. If you wish to specify the location of the database, you need to use the move to directive. For example, if you want the database file to reside in the d:\users\database directory, use this command: sqlcmd -Uapeduser -PAprop100 -S .\SQLExpress -Q "restore database XYZ from disk='d:\temp\database\XYZ' WITH MOVE 'XYZ' TO 'd:\users\database\XYZ.MDF', MOVE 'XYZ_Log' TO 'd:\users\database\XYZ_Log.LDF'" We recommend that you do NOT move the restored database, that is, let SQLServer decide where to put the database. After restoring the database, you will have to register it using the Aspen Properties Database Manager. Alternatively, if this database has already been registered in a local pc, the config.aem file stored in C:\Documents and Settings\All Users\Application Data\AspenTech\APED <version>\ will contain the correct information. This file can be copied to the target computer. In addition, the registry key HKEY_CURRENT_USER\ Software\Aspentech\APED\<internalversion>\mmgini\apeddatabase. determines whether to use the enterprise database or the legacy databanks. Internalversion is 26.0 for APED V7.3.2. Set the value of this key to 1 to use the new database.

Customizing Traditional Properties Databanks


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

36

4 Configuring Physical Property Database and Databanks

Adding Binary or Pair Parameter Databanks. Adding Ionic Reactions to the Electrolyte Reaction Database. 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 Compounds dialog box.

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

Note: Customizing the traditional databanks is more complex than customizing the relational database and requires many more steps.

Adding User and In-House Databanks


To add user or in-house databanks, follow these steps: 1 2 3 4 5 6 Save your .apw files from before the customization as .bkp files. Create the databanks in the Aspen Plus simulation engine. Create a user interface databank input file to define the databank location and component list. Modify the MMTBS driver file for a user or in-house databank. Run MMTBS to add the databanks and prompts to the user interface. Add Help for the databanks.

Note: Adding or changing databanks modifies the Recdef file, which defines the structure of .apw files. As a result, these files are not compatible between customized and uncustomized versions or Aspen Plus, nor between versions with different customizations. Use .bkp files to transfer data between such versions. 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 Using DFMS to Manage Databanks in the help for instructions on writing the files. 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 2 Create the DFMS input files containing all the physical property data. While logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you

4 Configuring Physical Property Database and Databanks

37

must right-click the command to open the window and select Run as Administrator. 3 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. = Name you give the DFMS output file that contains the requested reports and a trace of DFMS operations

output_file

The databanks created by DFMS are named dbname.dat, where dbname is the databank name given at the start of the Databanks chapter 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. 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 <version>\projecta

38

4 Configuring Physical Property Database and Databanks

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

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 <version>\GUI\custom This directory contains all the files referred to in the customization procedures. You must create a user interface databank input file and add a prompt for the new databank to tbmsg.txt. See Adding Prompts and Help for a User or InHouse Databank, later in this chapter, for information about adding the prompt. 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 . . . */ */ */

4 Configuring Physical Property Database and Databanks

39

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. = Databank type. For a user databank, specify USRPP1 or USRPP2. For an in-house databank, specify NONE. = 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 inhousedatabank. Use a unique password for each user databank. This value is not displayed in the user interface. = Databank file name. Specify SYSTEM for an in-house databank. For a user databank, specify:
o

dbtype password

filename

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 is installed in C:\Program Files\AspenTech\APrSystem <version> and the databank files are located in

C:\Program Files\AspenTech\AprSystem <version>\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 <version>\Engine\Inhouse\Databank\project1.dat" alias long-name = Component alias, up to 12 characters (no embedded blanks) = 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. = Ionic charge. Use 0 if unknown. Used on the Electrolyte Wizard on the Components Specifications Selection sheet. = Molecular weight. There is no default. Used on the Components Find dialog box on the Components Specifications Selection sheet. Use zero (0) if unknown. = Boiling point, Kelvin. Use 0.100000E+36 if unknown. Used on the Components Find dialog box on the Components Specifications Selection sheet.

charge molwt

bp

40

4 Configuring Physical Property Database and Databanks

vlstd cas

= Standard liquid molar volume at 60F, m3/kgmole. Use 0.100000E+36 if unknown. Not currently used. = 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. = 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.

class

4 Configuring Physical Property Database and Databanks

41

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 2,3,4-Alkenes Acetates Aldehydes Aliphatic-ethers Alkylcyclohexanes Alkylcyclopentanes Alkynes Anhydrides Aromatic-alcohols Aromatic-amines Aromatic-carboxylic-acids Aromatic-chlorides Aromatic-esters C,H,Br-compounds C,H,F-compounds C,H,I-compounds C,H,NO2-compounds C,H,multihalogen-compounds C1/C2-aliphatic-chlorides C3/higher-aliphatic-chlorides Cycloaliphatic-alcohols Cycloalkanes Cycloalkenes Dialkenes Dicarboxylic-acids Dimethylalkanes Diphenyl/polyaromatics Elements Epoxides Ethyl/higher-alkenes Formates Inorganic-acids Inorganic-bases Inorganic-gases Inorganic-halides Isocyanates/diisocyanates Ketones Mercaptans Methylalkanes Methylalkenes Multiring-cycloalkanes Naphthalenes Nitriles Nitroamines n-Alcohols n-Aliphatic-acids n-Aliphatic-primary-amines n-Alkanes n-Alkylbenzenes Organic-salts Organic/inorganic-compounds Other-aliphatic-acids Other-aliphatic-alcohols Other-aliphatic-amines Other-alkanes Other-alkylbenzenes Other-amines/imines Other-condensed-rings Other-ethers/diethers Other-hydrocarbon-rings Other-inorganic-salts Other-inorganics Other-monoaromatics Other-polyfunctional-C,H,O Other-polyfunctional-organics Other-saturated-aliphatic-esters Peroxides Polyfunctional-C,H,N,halide,(O) Polyfunctional-C,H,O,N Polyfunctional-C,H,O,halide Polyfunctional-C,H,O,S Polyfunctional-acids Polyfunctional-amides/amines Polyfunctional-esters Polyfunctional-nitriles Polyols Propionates-and-butyrates Silanes/siloxanes Sodium-salts Sulfides/thiophenes Terpenes Unsaturated-aliphatic-esters

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

42

4 Configuring Physical Property Database and Databanks

To remove the attribute:


1 2 Open an empty file, using a text editor, and import your databank input file. 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. 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 NumberOfSynonyms Synonym-1 Synonym-N = = = Alias of the component as defined in the databank input files Number of synonyms which follow Synonym(s) for the component

After modifying the file, in order for the changes to take effect, you must run the command: mmcustom mmtbs Use mmcustap instead of mmcustom if Aspen Properties is not installed. See Running MMTBS to Add User and In-House Databanks to the User Interface below for details.

Modifying the MMTBS Driver File for a User or InHouse Databank


You must modify the MMTBS driver file, tbprop.dat, to include your user or inhouse databank. In the tbprop.dat file, the delivered databanks are grouped together, as follows:

4 Configuring Physical Property Database and Databanks

43

INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE

polymer.dat segment.dat pure11.dat pure10.dat pure93.dat pure856.dat ethylene.dat aqueous.dat aqu92.dat inorgani.dat aspenpcd.dat solids.dat 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.

Adding Prompts and Help for a User or In-House Databank


To add a two-line prompt for a databank, modify the tbmsg.txt file by adding a section in the following format at the end of all similar sections in the file: DBANK HELP mmdbname one or two line prompt. > > $ $ To create databank hypertext Help, create HTML Help as described in Appendix A. Name the compiled help file userdata.chm and create map number 1 for the first custom databank.

Running MMTBS to Add User and In-House Databanks to the User Interface
After creating your databank input file, modifying the MMTBS driver file, and adding prompts to the tbmsg.txt file, you need to update the user interface record definition file (RecDef) by running MMTBS. While logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. Enter the following command: mmcustom mmtbs Use mmcustap instead of mmcustom if Aspen Properties is not installed.

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

44

4 Configuring Physical Property Database and Databanks

directory. While logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. Enter the following command: 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 with the file name c:\AspenTech\Working Folders\Aspen Plus\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\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 2 In Tbprop.dat, an MMTBS driver file, add the INCLUDE K123.DAT line after the PURE93 databank: polymer.dat segment.dat pure11.dat pure10.dat pure93.dat k123.dat pure856.dat ethylene.dat aqueous.dat aqu92.dat inorgani.dat aspenpcd.dat solids.dat combust.dat

INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE INCLUDE 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 Configuring Physical Property Database and Databanks

45

In the tbmsg.txt file, add the following prompt for the K123 databank to the end of the file:

DBANK HELP K123 Pure component databank for project K123. > > $ $ 5 Enter the following command to add the databank: mmcustom mmtbs Use mmcustap instead of mmcustom if Aspen Properties is not installed. 6 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. 7 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. Install the modified files in the system directory. At the system prompt enter: custinst

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 Methods | Parameters | Binary Interaction and Electrolyte Pair 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 2 3 4 5 Save your .apw files from before the customization as .bkp files. Create or modify the user interface binary or pair parameter input file. Modify the MMTBS driver file to include the binary or pair parameter databank. Run MMTBS to update the user interface record definition (RecDef) files to include the binary or pair parameter databank. Test your changes in the user interface.

46

4 Configuring Physical Property Database and Databanks

Note: Adding or changing databanks modifies the Recdef file, which defines the structure of .apw files. As a result, these files are not compatible between customized and uncustomized versions or Aspen Plus, nor between versions with different customizations. Use .bkp files to transfer data between such versions.

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.

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

4 Configuring Physical Property Database and Databanks

47

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 paramtype N_sections N_params paramname sym_1 Description Parameter type (currently unused). Enter 1. Number of parameter sections to follow. See Number of Parameter Sections, this chapter. Number of parameters listed in the row. See Number of Parameters Listed in Row, this chapter. Parameter name (for example, NRTL) 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. Symmetry code of the second element of a vector parameter Symmetry code of the nth element of the vector. See Symmetry Codes for a Vector's nth Element, this chapter. Number of lines used to specify parameter labels Number of labels on each row. See Labels on Each Row, this chapter. Labels for each row. See Labels on Each Row, this chapter. Number of model lines. Enter 1. 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 ofstate 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 (HaydenO'Connell),and ESIG (Ideal gas). 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 ofstate model. Some common models are GMWILSON, GMRENON, and GMUQUAC. 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. Number of component pairs for which parameters are available. Enter a space and a zero (0) after the number of component pairs. 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. 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.

sym_2 sym_n n_labellines n_labels label1, label2 n_modellines eosmodel

gammamodel

databankname n_comp_pairs

compi, compj Component aliases. See Component Aliases, this chapter. data1

data2

48

4 Configuring Physical Property Database and Databanks

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. 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. Symmetric parameter. For example, the third element of NRTL is symmetric (cij = cji). Enter only cij. Parameter ij = ji. You can enter only one parameter.

1=

2= 3=

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

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.

4 Configuring Physical Property Database and Databanks

49

DBANK REPLACE GAMKIJ 1 1 1 HENRY 1 1 1 1 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 4 4 aij cij fij aji dij fji bij eij Tlower bji eji 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+$HCO38.045000 ... The databank name is ENRTLRK.

-4.072000

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 <version>\GUI\custom\Examples.

50

4 Configuring Physical Property Database and Databanks

NRTL Binary Parameters


The following template shows the NRTLRK databank for the NRTL binary parameters, with RedlichKwong 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

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 0.0 0.0 0.0 363.1500 443.1500 0.0 H20 C4H10O2-D2 1.59 -1.59 -340.1 0.0 0.0 0.0 363.1500 413.1500 0.0

-838.35 0.0 0.0 -206.6 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

4 Configuring Physical Property Database and Databanks

51

2 4 4 thigh 1 ESIG GMVANLAR DBNAME1 2 H2O C2H6OS H2O C4H10O2-D2

aij cij

aji dij

bij tlow

bji

1.37 0.0 1.58 0.0

-1.37 0.0 -1.58 0.0

12.8 -88.3 363.1500 443.1500 -30.0 -20.5 363.1500 413.1500

Scalar Parameters
Use the following template for scalar parameters, such as the HaydenO'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

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. While logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. To run MMTBS, use the following command: mmcustom mmtbs Use mmcustap instead of mmcustom if Aspen Properties is not installed.

52

4 Configuring Physical Property Database and Databanks

For a detailed description of the user interface customization files and their locations, see Appendix A. Note: This method only adds databanks usable in the traditional databank system. When using the Aspen Properties Enterprise Database, you can still import files in these formats into the Database Manager. See Creating a Properties Database at the beginning of this chapter for more information.

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. Go to the Components | Specifications | Selection sheet and select the components that are in the binary databank. Go to the Methods | Specifications | Global sheet. Select the property method that contains the binary parameters defined in the binary databank. Go to the Methods | 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. For pair parameters, go to the Methods | Parameters | Electrolyte Pair form. Once you are satisfied with the changes, use the command Custinst to copy files to the system directory for general use.

2 3

5 6

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: 1 2 3 4 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). Save your .apw files from before the customization as .bkp files. Create an ionic reactions databank input file. Modify the MMTBS driver file to include the ionic reaction databank. Run MMTBS to update the user interface with the new databank.

To create an ionic reactions databank, you must:

4 Configuring Physical Property Database and Databanks

53

Note: Adding or changing databanks modifies the Recdef file, which defines the structure of .apw files. As a result, these files are not compatible between customized and uncustomized versions or Aspen Plus, nor between versions with different customizations. Use .bkp files to transfer data between such versions. 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 istate K-stoic or K-salt or * comp_scale istate Table 4.2 describes parameters for this file.

Table 4.2 Parameters for the Ionic Reactions Input File


Parameter rxn_name rxn_type Description Reaction name Reaction type: DISS = Complete dissociation STOIC = Partial dissociation, equilibrium reaction SALT = Salt precipitation reaction Number of components involved in this reaction Component alias Stoichiometric coefficient: > 0 = Products of the reaction, < 0 = Reactants of the reaction Used only for DISS and SALT reactions: 0 = ions and non-salt, 1 = salt or electrolyte 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. 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. Composition scale for the equilibrium constants (MOLAL or MOLEFRAC). (No comp-scale line is necessary, if K-stoic/K-salt is not available and you entered an asterisk.)

n_comps comp_alias coeff salt-flag K-stoic

K-salt

comp_scale

54

4 Configuring Physical Property Database and Databanks

Parameter istate

Description Basis for activity coefficients of ions. Missing or 0 = infinite dilution in pure water (Unsymmetric basis). 1 = pure fused salts (symmetric basis).

Two equilibrium constants may be entered when the ionic basis istate is different. If the equilibrium constant is only available for one basis, enter a single * in place of the last two lines. If no equilibrium constant is available, enter a single * in place of the last four lines.

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 and unsymmetric ionic basis. REACTNS ADD H2S STOIC 4 H2S H2O H3O+ HS218.599 MOLAL *

-1 -1 1 1 -12995.4 -33.5471 0

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


REACTNS ADD NACLDISS DISS 3 NACL -1 NA+ 1 CL1 *

1 0 0

Example of Salt Precipitation Reaction for NaCl


In this example, SALT equilibrium constants are on a mole-fraction scale and unsymmetric ionic basis. REACTNS ADD NACLSALT SALT 3 NACL -1 1 NA+ 1 0 CL1 0 -203.5875 4381.176 35.87518 -.06721607 MOLEFRAC 0

4 Configuring Physical Property Database and Databanks

55

Example of Specifying Equilibrium Constants for Different Ionic Basis


REACTNS ADD HCL STOIC 4 HCL -1 H2O -1 H3O+ 1 CL1 8.31286 0 0 0 MOLEFRAC 0 2.09560 0 0 0 MOLEFRAC 1

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, while logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. Then enter the following command: mmcustom mmtbs Use mmcustap instead of mmcustom if Aspen Properties is not installed. 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 in the same window started above to install the changes made to the user interface system directory: custinst

56

4 Configuring Physical Property Database and Databanks

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.

Overview
The major steps for customizing the physical property methods are: 1 2 3 4 Modify or create Aspen Plus simulation engine customization files. Run the Aspen Plus Table Building System (TBS) to update the simulation engine with your changes. Test your changes in the simulation engine using input language. 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. Modify or create Help files to add Help and prompts for your changes. Run the Aspen Plus user interface Hypertext Management (HTM) system to update the binary Help file, mmg.hms, with the new information. Test your changes in the Aspen Plus user interface. Copy the modified files to the system directory for general use.

5 6 7 8

5 Configuring Physical Property Methods

57

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 2 3 4 Modify the existing Aspen Plus TBS customization files. Table 5.1 lists these files. Create the TBS update file from the TBS customization files by adding a header and footer to the TBS files. Run the Table Building System (TBS) to modify the System Definition File (SDF). Install the SDF file in Aspen Plus.

The following sections describe these steps.

58

5 Configuring Physical Property Methods

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 <version>\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 *.lcd ppcnvpmd.dat ppenmprt.dat ppensprt.dat ppsublst.dat *.sto Description Property parameter definitions Conventional property model definitions Encoded major property routes Encoded subordinate property routes Property subroutine list 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 delivered in compressed format. You must extract them by using the extr_tbs command located in the Aspen Physical Property System Engine\utl directory: C:\Program Files\AspenTech\APrSystem <version>\Engine\utl Note: If you installed Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location. Extr_tbs.exe will extract files to the TBS subfolder. To ignore the directory path, use the j option to extract the files. If you dont have write permission under Program Files, extract the files from a writeable working folder. You can also type extr_tbs from an Aspen Plus Simulation Engine window, provided %aprsys%\xeq\extr_tbs.bat is in the path.

5 Configuring Physical Property Methods

59

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 2 Create a new file to list the names of all your TBS files. 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. 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 <version>\Engine\XEQ\SDFFIL.SDF" SDFNEW.SDF Note: Enter this command all on one line. If you installed Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location.

60

5 Configuring Physical Property Methods

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 <version>\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. On Windows 7, you need to run this command in a window started by right-clicking a Command Window icon or shortcut and selecting Run as Administrator. 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 2 3 4 5 Modify the appropriate MMTBS input files, or use the TBS files you utilized to customize the Aspen Plus simulation engine. Modify any related Help files. Modify the MMTBS and Help driver files. Run MMCUSTOM to modify the user interface RecDef and Help files. Use mmcustap instead of mmcustom if Aspen Properties is not installed. Install the new RecDef and Help files in the user interface system directory.

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

5 Configuring Physical Property Methods

61

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

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.

Define each new subordinate property route using the Subordinate Property Route Table (see Figure B.5). Follow the same procedure for

62

5 Configuring Physical Property Methods

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 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 systemdefined 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 ppuser_phcciu ppuser_esmnu, ppuser_esmnu0 ppuser_mdmon9 To call the Initialization subroutine Equation-of-state mainline subroutine Remaining mainline subroutines Filename phcciu.f esmnu.f, esmnu0.f mdmon9.f

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. Define each new property parameter using the Property Parameter Definition Table (see Figure B.2). 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 Copy the Aspen Plus System Definition File (SDF) to your customization directory. See Running the Aspen Plus Table Building System, this chapter. tbs tbsupd.dat

7 8

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

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.

5 Configuring Physical Property Methods

63

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. Create a customization directory as your working directory. Define the new property method PR-LK based on an existing property method, PENGROB. Copy the property method definition for PENG-ROB (the pengrob.sto file) into a new file called pr-lk.sto. Using a text editor, modify pr-lk.sto, as follows:
Replace this route HVMX24 HLMX106 GVMX30 GLMX106 SVMX24 SLMX98 VLMX20 With this route HVMX13 HLMX13 GVMX13 GLMX13 SVMX13 SLMX13 VLNEW

To add a property method to the simulation engine: 1

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 HLMX HLMX13 SVMX SVMX13 VLMX VLNEW KVMX KVMX01 DLMX DLMX02 PHIL PHIL11 GV GV09 SL SL10 DL DL01 MUV MUV01 SIGL SIGL01 3

PHILMX GVMX SLMX MUVMX KLMX SIGLMX HV GL VV DV KV PHIS

PHILMX104 GVMX13 SLMX13 MUVMX02 KLMX01 SIGLMX02 HV09 GL11 VV07 DV02 KV01 PHIS06

HVMX GLMX VVMX MULMX DVMX PHIV HL SV VL MUL KL

HVMX13 GLMX13 VVMX24 MULMX03 DVMX02 PHIV09 HL12 SV09 VL01 MUL01 KL01

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

900

64

5 Configuring Physical Property Methods

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 subroutine. (From Figure B.1, n1 = 0, n2 = 0, iwaq = iwal = iwac = 0, rwaq = rwal = rwac = 0.) Add the following table to the end of the ppcnvpmd.dat file: PPCNVPMD REPLACE VLMOD VLMX 900 0111 00001 0 0 0 1 VL900 1 VLLC 00001

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 User 1 1 1D35 1 44 1 44 8 VLLC Molar Volume 1 0 900 1

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

Create the TBS update file by using the command:

5 Configuring Physical Property Methods

65

maketbs @pr-lk.lis 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 <version>\GUI\custom To run the MMTBS to update the RecDef files, while logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. Then enter the following command: mmcustom mmtbs Use mmcustap instead of mmcustom if Aspen Properties is not installed. 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 in the same window started above: custinst

66

5 Configuring Physical Property Methods

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

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 2 3 Modify or create the Help (.hxt) file and the Microsoft HTML Help (.chm) file. For detailed instructions, see Appendix A. Modify the HTM Help driver file (tbcustom.hxt). 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. A link to the 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. To incorporate your changes into the binary Help file, mmg.hms, while logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. Then enter the following command: mmcustom htm Use mmcustap instead of mmcustom if Aspen Properties is not installed. 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.

5 Configuring Physical Property Methods

67

Append this file pr-lk.sto (property method definition) vllc.lcd (parameter definition) vlmod.dat (model definition) vlnew.dat (route definition)

To this user interface file ppstoptn.dat lcd_cust.dat mdl_cust.dat ppenmprt.dat

Since no new files are created, the driver tbcustom.dat does not need to be updated. Copy the above files to the customization directory for the Aspen Plus user interface, as follows: C:\Program Files\AspenTech\APrSystem <version>\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 Use mmcustap instead of mmcustom if Aspen Properties is not installed. This must be run as an administrator; on Windows 7, the window must be started by right-clicking and selecting Run as Administrator. 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 Help files, 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:

68

5 Configuring Physical Property Methods

>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 Use mmcustap instead of mmcustom if Aspen Properties is not installed. This must be run as an administrator; on Windows 7, the window must be started by right-clicking and selecting Run as Administrator. 7 To confirm your customization, start the user interface. Go to the Methods | Specifications | Global sheet and open the list on the Property Method box. Confirm that PR_LK appears on the list. On the Methods | Selected Methods | Routes sheet, confirm that route HVMX13 calculates the property HVMX, route HLMX13 calculates the property HLMX, and so on. Examine the new prompts associated with these entries.

10 On the Selected Methods | Models sheet, confirm that Aspen Plus calculates the property VLMX, using the model VLMOD. 11 On the Parameters | Pure Component | Scalar form, open the 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 This must be run as an administrator; on Windows 7, the window must be started by right-clicking and selecting Run as Administrator. 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.

5 Configuring Physical Property Methods

69

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

70

5 Configuring Physical Property Methods

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.

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

71

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:
This file liqtable.dat gastable.dat rupture.dat pipe.dat ervtable.dat transflo.dat valve.dat Contains data for Liquid service safety relief valves Gas/two-phase service safety relief valves Rupture disks Pipes used in the pressure relief system and the Pipe unit operation model Emergency relief vents Valves used in the inlet and tail pipes Valves used in the Valve unit operation model

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

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. Throat diameter. Inlet diameter. Outlet diameter. Discharge coefficient. Over-pressure factor.

Aspen Plus retrieves these specifications from the table:

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

72

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

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 name_typei no_manuf name_manufj no_series seriesk no_size sizem t_diamm i_diamm o_diamm = Number of types = Name of ith type. Repeat this section for each type. = Number of manufacturers = Name of jth manufacturer. Repeat this section for each manufacturer. = Number of series from the jth manufacturer = Name of kth series. Repeat this section for each series. = Number of sizes for kth series = A character string specifying the nominal size, up to 20 characters = Throat diameter for mth size in inches = Inlet diameter for mth size in inches = Outlet diameter for mth size in inches

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

73

cdm opfm

= Discharge for mth size coefficient = Over-pressure factor for mth size factor

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 Liquid service table There is one type. The type is CONV. There are two manufacturers. The first manufacturer is CROSBY. The series is JLT. There are three sizes for series JLT.

PRSRV REPLACE LIQUID 1 CONV 2 CROSBY JLT 3 1_2_0.398_(D) 1_2_0.531_(E) 0.398 1.049 2.067 0.729 1.1 0.531 1.049 2.067 0.729 1.1 2.067 0.729 1.1

size t_diam i_diam o_diam cd opf size t_diam i_diam o_diam cd opf size t_diam i_diam o_diam cd opf The second manufacturer is DRESSER. There is one series. The series is 1900. There are four sizes for series 1900.

1.5_2_0.665_(F) 0.665 1.61 DRESSER 1 1900 4 1_2_0.4036_(D) 1_2_0.5387_(E) 1.5_2_0.674_(F)

0.4036 1.049 2.067 0.744 1.1 size t_diam i_diam o_diam cd opf 0.5387 1.049 2.067 0.744 1.1 size t_diam i_diam o_diam cd opf 0.674 1.61 1.61 2.067 0.744 1.1 size t_diam i_diam o_diam cd opf 2.469 0.744 1.1 size t_diam i_diam o_diam cd opf

1.5_2.5_0.863_(G)0.863

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

74

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

Gas/2-Phase Service Safety Relief Valves for Pressure Relief


The Pres-Relief ReliefDevice SafetyValve sheet also contains a table of gas/2phase service safety relief valves. Aspen Plus uses this table if Service="Gas or 2-phase." The user chooses: Valve type. Manufacturer. Series. Nominal diameter. Throat diameter. Inlet diameter. Outlet diameter. Discharge coefficient.

Aspen Plus retrieves these specifications from the table:

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 sizem+1 t_diamm+1 i_diamm+1 . . . seriesk+1 . . . name_manufj+1 . . . name_typei+1 .

o_diamm o_diamm+1

cdm cdm+1

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

75

. . Where: no_types name_typei no_manuf = Number of types = Name of ith type = Number of manufacturers

name_manufj = Name of jth manufacturer. Repeat this section for each manufacturer. no_series seriesk no_size sizem t_diamm i_diamm o_diamm cdm = Number of series from the jth manufacturer = Name of kth series. Repeat this section for each series. = Number of sizes for kth series = A character string specifying the nominal size, up to 20 characters. = Throat diameter for mth size in inches = Inlet diameter for mth size in inches = Outlet diameter in inches = Discharge coefficient

76

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

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 Gas or 2-phase service table. There is one type. The type is CONV. There are two manufacturers. The first manufacturer is CROSBY. There is one series. The series is JOS. There are three sizes for series JOS.

PRSRV REPLACE GAS/2-PHASE 1 CONV 2 CROSBY 1 JOS 3 1_2_0.398_(D) 1_2_0.531_(E) 0.398 0.531 1.049 1.049 1.61 2.067 2.067 2.067 0.961 0.961 0.961

size t_diam i_diam o_diam cd size t_diam i_diam o_diam cd size t_diam i_diam o_diam cd The second manufacturer is DRESSER. There is one series. The series is 1900. There are four sizes for series 1900.

1.5_2_0.665_(F)0.665 DRESSER 1 1900 4 1_2_0.4306_(D) 1_2_0.5387_(E) 1.5_2_0.674_(F)

0.4036 1.049 2.067 0.950 0.5387 1.049 2.067 0.950 0.674 1.61 1.61 2.067 0.950 2.469 0.950

size t_diam i_diam o_diam cd size t_diam i_diam o_diam cd size t_diam i_diam o_diam cd size t_diam i_diam o_diam cd

1.5_2.5_0.863_(G)0.863

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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

77

Rupture Disks for Pressure Relief


The Pres Relief | Relief Device | Rupture Disk sheet contains the rupture disks table. The user chooses: Manufacturer. Style. Nominal diameter. Actual diameter. Discharge coefficient.

Aspen Plus retrieves these specifications from the table:

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 no_style name_stylei no_sizes nom_diamj nom_diamj+1 . . . name_stylei+1 . . . Where: manuf no_style name_stylei no_sizes nom_diamj act_diamj cdj = = = = = = = Manufacturer type Number of styles Name of ith style. Repeat this section for each style. Number of sizes for ith style Nominal diameter for jth size, up to 10 characters Actual diameter in inches for jth size Discharge coefficient for jth size manuf

act_diamj act_diamj+1

cdj cdj+1

78

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

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 2 MONO 3 .5-IN .75-IN 1-IN INVERTED 2 .5-IN .75-IN PRRUP 2 P 3 .5-IN .75-IN 1-IN CP 4 .5-IN .75-IN 1-IN 1.5-IN

REPLACE

ZOOK

The first manufacturer is ZOOK. There are two styles. The first style is MONO. There are three sizes of style MONO.

.5 .75 1.

.888 .888 .888

nom_diam nom_diam nom_diam

act_diam act_diam act_diam

cd cd cd

The second style is INVERTED. There are two sizes of style INVERTED.

.5 .75

.779 .779 FIKE

nom_diam nom_diam

act_diam act_diam

cd cd

REPLACE

The second manufacturer is FIKE. There are two styles. The first style is P. There are three sizes of style P.

.5 .742 .9568

.62 .62 .62

nom_diam nom_diam nom_diam

act_diam act_diam act_diam

cd cd cd

The second style is CP. There are four sizes of style CP.

.5 .742 .9568 1.5

.62 .62 .62 .62

nom_diam nom_diam nom_diam nom_diam

act_diam act_diam act_diam act_diam

cd cd cd cd

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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

79

Pipes for Pressure Relief and the Pipe Model


The Pres Relief | Inlet Pipes, Pres Relief | Tail Pipes, 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 nom_diamj+1 act_diamj+1 . . . schedulei+1 . . . Where: material no_sch schedulei no_diam nom_diamj act_diamj roughnessj = Material type, up to 12 characters = Number of schedules available for material type = Schedule value for ith schedule, up to 10 characters. Repeat this section for each schedule. = Number of diameters for this schedule = Nominal diameter for jth diameter in inches, up to 10 characters. = Actual internal diameter for jth diameter in inches = Absolute roughness in feet

roughnessj roughnessj+1

80

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

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

Figure 6.8 pipe.dat File


Keywords and Data Comments

PRPIPE 2 10 3 0.25-IN 0.375-IN 0.500-IN 20 3 1-IN 2-IN 3-IN

REPLACE

CARBON-STEEL

The material is carbon-steel. There are two schedules. The first schedule is schedule 10. There are three sizes for schedule 10.

0.410 0.545 0.674

.00015 .00015 .00015

nom_diam nom_diam nom_diam

act_diam act_diam act_diam

roughness roughness roughness

The second schedule is schedule 20. There are three sizes for schedule 20.

1.073 2.111 3.164

.00015 .00015 .00015

nom_diam nom_diam nom_diam

act_diam act_diam act_diam

roughness roughness 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 | Relief Device | Relief Vent sheet contains a table of emergency relief vents. The user chooses: Manufacturer. Style. Nominal diameter. Diameter. Recommended setpoint.

Aspen Plus retrieves these specifications from the table:

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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

81

Figure 6.9 Emergency Relief Vents File Organization


REPLACE manuf no_style name_stylej no_sizes nom_sizej nom_sizej+1 . . . name_stylej+1 . . . no_stylei+1 . . . PRERV

act_diamj act_diamj+1

setpointj setpointj+1

Where: manuf no_style name_stylei no_sizes nom_diamj act_diamj setpointj = = = = = = = Manufacturer type Number of styles for ith manufacturer Name of style Number of sizes in style Nominal diameter for jth size, up to 10 characters. Actual diameter in inches for jth size Suggested setpoint in psig for jth size

82

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

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

Figure 6.10
Keywords and Data

ervtable.dat File
Comments The first manufacturer is PROTECTOSEAL. There are two styles. The first style is 7800. There are three sizes in this style.

PRERV 2 7800 3 2-IN 3-IN 4-IN 9800 2 2-IN 3-IN PRERV 1 2100 3 16-IN 20-IN 24-IN

REPLACE

PROTECTOSEAL

1.888 2.764 3.598

-2 -2 -2

nom_diam nom_diam nom_diam

act_diam setpoint act_diam setpoint act_diam setpoint

The second style is 9800. There are two sizes in this style.

1.487 2.263

2 2 GROTH

nom_diam nom_diam

act_diam setpoint act_diam setpoint

REPLACE

The second manufacturer is GROTH. There is one style. The first style is 2100. There are three sizes in this style.

8.016 9.944 12.092

2 2 2

nom_diam nom_diam nom_diam

act_diam setpoint act_diam setpoint act_diam setpoint

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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

83

Inlet and Tail Pipe Valves for Pressure Relief


The Pres Relief | Inlet Pipes and Pres Relief | Tail Pipes 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. Flow area. Flow coefficient (Cv).

Aspen Plus retrieves these specifications from the table:

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

891d 4 K Cv 2
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 nom_diamj+1 port_areaj+1 . . . name_stylei+1 . . .

flow_coeffj flow_coeffj+1

84

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

Where: manuf no_styles no_sizes nom_diamj port_areaj flow_coeffj = Manufacturer type = Number of styles available for manufacturer type = Number of sizes = Nominal diameter for jth size in inches = Port area in square inches for jth size = Flow coefficients for jth size

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

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 The manufacturer is KTM. There are two styles. The first style is BALL-L-PORT. There are three sizes of style BALL-L-PORT.

PRTRAN REPLACE KTM 2 BALL-L-PORT 3 1.5-IN 2-IN 2.5-IN 2.03583 3.3556 4.78775 53. 110. 160.

nom_diam nom_diam nom_diam

port_area port_area port_area

flow_coeff flow_coeff flow_coeff

BALL-T-PORT 4 1.5-IN 2-IN 2.5-IN 3-IN 2.03583 3.3556 4.78775 7.39265 50. 100. 150. 240.

The second style is BALL-T-PORT. There are four sizes of style BALL-T-PORT. nom_diam nom_diam nom_diam nom_diam port_area port_area port_area port_area flow_coeff flow_coeff flow_coeff flow_coeff

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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

85

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. Valve position. Flow coefficient (Cv). Pressure drop ratio factor (XT). Pressure recovery factor (Fl).

Aspen Plus retrieves these specifications from the table:

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 . Vpn Cvn XTn sizel+1 . name_series/stylek+1 . name_manufj+1 . VALDAT REPLACE name_typei+1

Fl1 Fln

86

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

Where: name_typei no_manufs name_manufj no_series/style no_sizes sizel no_points Vp1 ... Vpn Cv1 ... Cvn XT1 ... XTn Fl1 ... Fln = Name of ith valve type = Number of manufacturers = Name of jth manufacturer = Number of series/styles = Number of valve sizes = A character string specifying the nominal valve size = Number of entries for valve position, flow coefficient, pressure drop ratio factor, and pressure recovery factor = n entries for valve position (as percentage of maximum opening) = n entries for corresponding valve flow coefficient = n entries for corresponding pressure drop ratio factor = n entries for corresponding pressure recovery factor

name_series/stylek = Name of kth series/style

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

Figure 6.14
Keywords and Data

valve.dat File
Comments The first valve type is BALL There is one manufacturer The first manufacturer is NEL:ES-JAMESBURY There are two series/styles

VALDAT 1

REPLACE

BALL

NELES-JAMESBURY 2

5000_REDUCED_PORT-FLANGED The first series/style is 5000_REDUCED_PORT-FLANGED 20 0.5-IN 10 10 20 30 40 50 60 0.1 0.2 0.4 0.7 1.2 1.9 0.91 0.91 0.90 0.88 0.85 0.80 0.82 0.82 0.80 0.75 0.67 0.57
There are 20 sizes of series/style 5000_REDUCED_PORT-FLANGED The first size is 0.5-IN There are 10 points Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl 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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

87

Keywords and Data

Comments

70 80 90 100

2.7 4.2 6.3 9.0

0.74 0.65 0.55 0.48

0.42 0.28 0.20 0.15

Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl The second size is 0.75-IN The second series/style is METAL_SEATED_FULL_PORT There are 16 sizes of series/style METAL_SEATED_FULL_PORT The first size is 1-IN There are 10 points

0.75-IN METAL_SEATED_FULL_PORT 16 1-IN 10 10 20 30 40 50 60 70 80 90 100 0.68 1.51 2.81 4.89 7.70 11.5 17.0 26.0 38.0 52.0 0.91 0.91 0.90 0.88 0.85 0.80 0.74 0.67 0.59 0.51 0.82 0.82 0.80 0.75 0.67 0.57 0.42 0.30 0.20 0.15

Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl The second size is 1.5-IN

1.5-IN VALDAT 1 NELES-JAMESBURY 2 ANSI_CLASS_150 13 3-IN 10 10 20 30 12.5 31.3 51.0 0.76 0.79 0.82 0.42 0.42 0.43 REPLACE

BUTTERFLY The second valve type is BUTTERFLY


There is one manufacturer The first manufacturer is NELES-JAMESBURY There are two series/styles The first series/style is ANSI_CLASS_150 There are 13 sizes of series/style ANSI_CLASS_150 The first size is 3-IN There are 10 points Vp Cv XT Fl Vp Cv XT Fl 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

88

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

Keywords and Data

Comments

40 50 60 70 80 90 100 4-IN

75.0 103.0 137.0 174.0 208.0 229.0 235.0

0.83 0.83 0.82 0.80 0.75 0.70 0.65

0.44 0.45 0.42 0.34 0.25 0.18 0.15

Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl Vp Cv XT Fl 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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

89

90

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

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.

7 Accounting Report

91

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. To activate the accounting file for Windows platforms, see Activating Accounting, 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 2 Log in to an account that is set up for the Aspen Plus environment. See the Aspen Engineering Suite Installation Guide for more information. From the Start menu, select Programs | AspenTech | Process Modeling <version> | Aspen Plus | Aspen Plus Simulation Engine.

92

7 Accounting Report

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. The files created by the accounting program are:
File runid.rp1 runid.rp2 Description Contains a table listing the users and the number of runs made. One table is created for each month. Contains a listing of each run made. This file is generated only if you answer yes in Step 9.

7 Accounting Report

93

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 userbased 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. From the Start menu, select Programs | AspenTech | Process Modeling <version> | Aspen Plus | Aspen Plus Simulation Engine. 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 name of ASPEN PLUS Master Accounting File [C:\Program Files\AspenTech\Aspen Plus <version>\Engine\XEQ\ASPEN.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) 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.

2 3

94

7 Accounting Report

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. The accounting program creates these files:
File runid.his Description 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.

7 Accounting Report

95

2 3

Set up to the Aspen Plus environment. See the Aspen Plus Installation Guide for your operating system for more information. Change the current directory to the accounting directory. Use the command: Where C:\Program Files\AspenTech\Aspen Plus <version> is the drive and directory where Aspen Plus is installed

CD "C:\Program Files\AspenTech\Aspen Plus <version>\Engine\XEQ"

4 5

Execute the accounting program. Use the command: ACR NEWFILE 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 File menu, select Options to go to the Simulation sheet and check the box labeled Accounting information required to complete input. 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
The Aspen Plus accounting file is not written to 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 Windows Start menu, click All Programs | AspenTech | Process Modeling <version> | Aspen Plus | Aspen Plus Simulation Engine. Change the directory to the Aspen Plus simulation engine system directory, as follows:

96

7 Accounting Report

CD "C:\Program Files\AspenTech\Aspen Plus <version>\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.

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 XP Example
1 2 3 4 5 6 7 On the Task bar, click Start, then Control Panel. Double-click the System icon (in Classic view), and go to the Advanced sheet. Click the Environment Variables button. Click the New button under System Variables to open the New System Variable window. In the Variable Name field, enter ASPACCT. In the Variable Value field, enter ON. Click OK to save the variable, then OK to save the settings.

7 Accounting Report

97

98

7 Accounting Report

A Customizing the Aspen Plus User Interface

This appendix describes how to customize the Aspen Plus user interface and create customized Help for customized physical property models, routes, and methods. Topics include: 1 2 MMTBS customization files Creating help Creating prompts and linking help to Aspen Plus Running the user interface customization system Installing the new files Troubleshooting help customization Incorporating engine customizations into the Aspen Plus user interface MMTBS customization files and updating the MMTBS driver file Creating the Help source files for the Windows HTML Help system. Several template files have been provided to assist users in the creation of these source files. Compiling the Help source files using the Microsoft HTML Help Workshop utility Updating the Aspen Plus help driver file with prompts and map numbers of your help topics Building the updated RecDef and help mapping files Installing the customization changes to the user interface

The major steps for customizing the user interface are:

3 4 5 6

MMTBS Customization Files


Table A.1 lists the MMTBS customization files.

Table A.1 User Interface Customization Files


File Name recsav.apr mmg.hms Description User interface record definition file in binary format (RecDef file) Help file in binary format

A Customizing the Aspen Plus User Interface

99

File Name pp***.dat lcd_cust.dat mdl_cust.dat *.hxt *.srt tbcustom.dat tbcustom.hxt

Description User interface input files (See Table 5.1) User interface property parameter customization file User interface property model customization file User interface Help and prompt files User interface table sort files MMTBS driver file HTM Help driver file

The *.dat and *.hxt files are in the following Aspen Plus user interface system directory: C:\Program Files\AspenTech\APrSystem <version>\GUI\custom Example customized versions of these files appear in the examples subdirectory of this directory. To customize the Aspen Plus user interface, follow these steps: 1 2 3 Create a directory to store the customization files you need to modify. Modify the files. Test your customization in the new directory.

You can use most simulation engine TBS (Table Building System) files directly in 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 Property methods Parameter definitions Are stored in ppstoptn.dat 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 pplcdefs.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. For more information:
To modify the See this topic pp***.dat customization files Creating In-House Physical Property Models, Routes, and listed in Table 5.1 Methods, Chapter 5 Databank files Adding User and In-House Databanks, Chapter 4

100

A Customizing the Aspen Plus User Interface

Modifying the MMTBS Driver File


The MMTBS driver file is:
Use this file tbcustom.dat To run MMTBS To update The record definition file

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.

Creating Help
Aspen Plus uses the Windows HTML Help system to display Help. To create your own Help integrated with the Aspen Plus Help files, follow these steps: 1 2 3 4 Create and/or modify existing help source files. Assign map numbers to Help topics. Create table of contents and index files. Compile the Help source files into a Microsoft HTML Help (*.chm) file.

You will still need to modify the Aspen Plus user interface (see subsequent sections) to integrate the new Help you created. 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 htmlhelp.exe Self-extracting executable http://support.microsoft.com installation file for the Microsoft HTML Help Workshop and HTML Help compiler helpdocs.zip Zip file containing Microsoft documentation on creating HTML Help Sample help project file Sample help contents file Sample help index file Sample help map number file Sample help alias file Sample HTML Help topic file http://support.microsoft.com

custom.hhp custom.hhc custom.hhk custom.h custom.ali topic1.htm

APrSystem <version>\GUI\Custom APrSystem <version>\GUI\Custom APrSystem <version>\GUI\Custom APrSystem <version>\GUI\Custom APrSystem <version>\GUI\Custom APrSystem <version>\GUI\Custom\html APrSystem <version>\GUI\Custom\html

cust5o85.htm Sample HTML Help topic file

The GUI\Custom directory also contains a sample custom.chm file compiled from the source files above. This can be used to test calling help from your custom additions to Aspen Plus. See Troubleshooting Help Customization. You need Microsoft's HTML Help compiler to compile the Help source files into Help. You can obtain the compiler and utilities from: http://go.microsoft.com/fwlink/?linkid=14188

A Customizing the Aspen Plus User Interface

101

You can obtain Microsoft's documentation on creating HTML Help from: http://go.microsoft.com/fwlink/?linkid=14581 Once you have installed Microsoft HTML Help Workshop, you can run it from Start | HTML Help Workshop | HTML Help Workshop. You can then perform most required tasks from menu commands within this program.

Converting WinHelp Projects


WinHelp projects created for customized help for Aspen Plus 2006 or earlier can be converted by following these steps: 1 2 3 4 5 Open Microsoft HTML Help Workshop, and select File | New. Select Project, and click OK. Select the Convert WinHelp Project checkbox and click Next. Click the first Browse button and locate the .hpj file for your WinHelp project. Click the second Browse button and select a folder and name for the .hhp file of the converted project. The other files for the project will be placed in this folder. Click Next. Click Finish. The project will be converted and opened in HTML Help Workshop.

Note: This process does not convert map numbers. Save your WinHelp source files and use them in Assigning Map Numbers to Topics, below. In addition, if you do not have them, you will need to create Table of Contents and Index files before you can compile your help.

Creating a New HTML Help Project


1 2 3 Open Microsoft HTML Help Workshop, and select File | New. Select Project, and click OK. Click the second Browse button and select a folder and name for the .hhp file of the new project. The other files for the project will be placed in this folder. Click Next. If you have any already-made files to include in the project, check the boxes here and locate the files on subsequent screens. Click Next. Click Finish. The project file will be created and opened in HTML Help Workshop.

4 5

Note: You can also begin by copying the sample files listed in Table A.2 to a new folder. If you do this, keep the topic files in the html subfolder in the copy.

Creating the Help Source Files


With HTML Help, you create a separate HTML Help file for each topic. These files can contain all the formatting typically used in HTML files as supported by Microsoft Internet Explorer, including cascading style sheets (CSS). You can use any HTML editor for this process.

102

A Customizing the Aspen Plus User Interface

Store your topic files, and any additional files such as images or CSS files, in the same folder with the help project and HTML files, or in subfolders under that folder. The HTML Help compiler will automatically include any files referenced by files in the project if they are stored here. If you create subfolders, be sure to reference those folders with relative links wherever needed. For each topic, add a line in the [FILES] section of the help project file (custom.hhp) containing the name of its HTML file. Be sure to specify the folder name if stored in a subfolder. If you use HTML Help Workshop, you can click the Add/Remove topic files button to add these lines.

Assigning Map Numbers to Help Topics


To display a Help topic from Aspen Plus by pressing F1 or using other contextsensitive 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. 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. Open the Help project file (custom.hhp) in Notepad, and add the following lines to the end of it: [ALIAS] #include custom.ali [MAP] #include custom.h 3 Create two new text files custom.h and custom.ali. If you save them from Notepad, be sure that they are saved with these names and not custom.h.txt, etc. In custom.h, for each topic write a line in this format: #define Topic_ID mapnumber Where Topic_ID is a unique string for each topic made of letters, numbers, and/or underscores, and mapnumber is the map number used in Aspen Plus in the places where this topic should be called. Note: If you converted a WinHelp project, copy the contents of the [MAP] section from your .hpj file into this file, replace every equal sign (=) with a space, and insert #define and a space at the start of each line if it is not already there. 5 In custom.ali, for each topic write a line in this format: Topic_ID=filename.htm

A Customizing the Aspen Plus User Interface

103

Where Topic_ID is the same string from custom.h and filename.htm is the name of the HTML file containing this topic. If the topics are in a subdirectory, the directory name should be included here (as with the html subdirectory in the provided example files).

Creating a Table of Contents File


1 From HTML Help Workshop, select File | New, click Table of Contents, and click OK. Click File | Save File as, and type a name such as custom.hhc. With the project file open in HTML Help Workshop, double-click the Project tab and click the Files tab. Specify your table of contents file name in the Contents file field. You can now edit your table of contents by clicking the Contents tab in HTML Help Workshop. Click the Insert a page icon at the left, type a title to appear in the table of contents in the Entry title field, and click Add to select a topic file associated with this table of contents entry.

Creating an Index File


From HTML Help Workshop, select File | New, click Index, and click OK. Click File | Save File as, and type a name such as custom.hhk. With the project file open in HTML Help Workshop, double-click the Project tab and click the Files tab. Specify your table of contents file name in the Index file field. You can now edit your index by clicking the Index tab in HTML Help Workshop. Click the Insert a keyword icon at the left, type a keyword to appear in the index in the Keyword field, and click Add to select a topic file associated with this index keyword.

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 2 Open custom.hhp with Microsoft HTML Help Workshop. Select File | Compile.

The compiling process produces a Microsoft Windows HTML Help binary file custom.chm. If errors or warnings appear in the log, they may indicate problems you need to address before your help will work. Before Aspen Plus will call this help, you must customize the user interface to associate the map numbers in this help file with user interface customizations and you must install the files (see Installing the New Files, this chapter). To just install the help files without updating other files, copy the .chm file to the GUI\xeq directory of the APrSystem folder, such as C:\Program Files\AspenTech\APrSystem <version>\GUI\xeq

104

A Customizing the Aspen Plus User Interface

Creating Prompts and Linking Help to Aspen Plus


In order to have context-sensitive help calls (such as when you press the F1 key) from Aspen Plus call your custom help topics, you need to associate the map numbers chosen above (see Assigning Map Numbers to Help Topics, above) to specific customized features in Aspen Plus. This is accomplished by creating .hxt files, which are text files you can create with Notepad. Be sure they are saved as .hxt files and not as .hxt.txt, etc. The .hxt files can also include prompts that will appear in the Data Browser for these items. Each .hxt file must be listed in the Aspen Plus Help driver file, tbcustom.hxt, before running mmcustom.

Assigning Map Numbers to Aspen Plus Customizations


To display context-sensitive Help (for example, property methods from a drop-down list box), you must add the following information to an .hxt file: >h_replace H_context_string_ID custom.chm #1 >endmessage Where: >h_replace = Command that identifies the beginning of the help mapping

H_context_string_ID= Unique text string that identifies the help mapping. The format is H_filename_parameter. For example, the context string ID for the parameter CPIG is H_PPLCDEFS_CPIG. custom.chm 1 >endmessage = Name of the HTML Help file = Map number for the Help topic within the HTML Help file = A signal indicating the end of the prompt text

Writing Prompts for Aspen Plus Customizations


It is also useful to provide prompts for your customization. Prompts are brief explanations which will appear at the bottom of the Data Browser when a customized item is selected in the user interface. Prompts are included in the .hxt file in the following format: >p_replace P_context_string_ID Prompt text >endmessage Where:

A Customizing the Aspen Plus User Interface

105

>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 >endmessage =Text to be displayed in the prompt area =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 4, for more information.

Example of Help and Prompts for a Property Model


This example shows a help mapping and 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 >h_replace H_PPCNVPMD_GAMMA_GMWILSON custom.chm #100 >endmessage >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 user interface. See Running the User Interface Customization System in this appendix.

Modifying the Help Driver File


The Help driver file is:
Use this file tbcustom.hxt To run HTM To update The Help mapping file (mmg.hms)

If you add Help and prompts to Help files (*.hxt), list the names of the Help files in tbcustom.hxt before running the HTM program. For each file, add a line to this file in this format: >include filename.hxt Where filename.hxt is the name of the .hxt file.

Running the User Interface Customization System


You need to run the Mmcustom to install your customization changes in the user interface. Use mmcustap instead of mmcustom if Aspen Properties is not installed. Perform these steps:

106

A Customizing the Aspen Plus User Interface

1 2

Ensure the driver files tbcustom.hxt and tbcustom.dat are updated to list the .hxt and .dat files that have been added or modified. While logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. Enter the following command to update the user interface Record Definition (RecDef) files with your changes: mmcustom mmtbs Enter the following command to update the user interface Help mapping 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, and that you ran the customization window as an administrator.

Installing the New Files


To install the new RecDef and Help files: 1 While logged in as an administrator, open an Aspen Plus User Interface Customization Window from Start | All Programs | AspenTech | Process Modeling <version> | Aspen Plus. If using Windows 7, you must right-click the command to open the window and select Run as Administrator. Make sure you are in the directory that contains the customized Help (.chm) and RecDef files. 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 .chm files in the customization directory. Save the TBS input, .hxt, and help source files for customizing future releases of the user interface. 4 Test your changes in the user interface.

2 3

Troubleshooting Help Customization


If your customized prompts do not appear in Aspen Plus: Check that the context strings and the >p_replace and >endmessage syntax are specified and spelled correctly in the .hxt files. Check that the names of the .hxt files you created and the >include syntax are specified and spelled correctly in the tbcustom.hxt file. Ensure that you have run mmcustom htm after updating the .hxt files.

A Customizing the Aspen Plus User Interface

107

Ensure that you ran the mmcustom and custinst commands as an administrator. If using Windows 7, ensure that you used the Run as Administrator command when opening the customization window.

If your customized help topics are not called correctly when pressing F1 with your customizations selected in the user interface: Check that the .hxt files are specified correctly and that you have run mmcustom htm since modifying them, as for prompts. Ensure your .hhp file contains [ALIAS] and [MAP] sections referencing your .ali and .h files, and a [FILES] section listing all your .htm files, and everything here is spelled correctly. Ensure each topic ID in the .h file matches a corresponding topic ID in the .ali file, that the .htm file names are spelled correctly in the .ali file, and that the syntax matches that specified in Assigning Map Numbers to Help Topics. Ensure you have compiled your .chm file(s) since making any changes to the .htm, .hhp, .hhc, .hhk, .h, or .ali files, and that the correct versions of your .chm file(s) appear in APrSystem <version>\GUI\xeq.

Additional Troubleshooting Strategies for Help


The APrSystem <version>\GUI\Custom directory contains a pre-compiled custom.chm file which can be used to test that you are specifying the help mapping for Aspen Plus correctly by linking to map number 1 or 2 in this file. Map number 1 is the PR-LK Equation of State and map number 2 just says "Replace this text with your own text." To use this file: 1 2 3 4 Copy APrSystem <version>\GUI\Custom\custom.chm into APrSystem <version>\GUI\xeq. Update an .hxt file to call custom.chm #1 or custom.chm #2 for a particular customization. Re-run mmcustom htm. Restart Aspen Plus and call help on this customization.

If this help opens, then the help mapping for Aspen Plus is correct. Be sure to change the mapping you modified back to its original value and rerun mmcustom htm when you are done testing. If your help is compiled as custom.chm, also be sure to copy your compiled file into APrSystem <version>\GUI\xeq, rather than the test version of this file. You can use this procedure to verify that the map number is getting compiled into the help file correctly: 1 2 3 4 5 6 Run HTML Help Workshop. From the Test menu, select HtmlHelp API. Click Browse and locate the .chm file you want to test. In the Command field, select HH_HELP_CONTEXT. In the Map number field, type the map number you want to test. Click Test. The help should open to the correct topic.

108

A Customizing the Aspen Plus User Interface

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 2 Copy similar tables from the system TBS files. Use the table as a template for adding your changes.

B TBS File Descriptions

109

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.

110

B TBS File Descriptions

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
1 12345 67890 1 5 2 0 2 5 modelnam 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0

PPCNV PMD REPLACE

p ropname

idxcgt

mid1 mid2

mid3

i waq

iwal

iwac

rwaq

rwal

rwac

n1

o pcode

opcode

opcode

opcode

n2

i ntsub

intsub

intsub

intsub

n3

m nsub

mnsub

mnsub

mnsub

10

n4

11

p pname

ppname

ppname

ppname

B TBS File Descriptions

111

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 idxcgt mid1 mid2 mid3 iwaq iwal iwac rwaq rwal rwac n1 opcode n2 intsub n3 mnsub n4 ppname Property name Property monitor computed-go-to index 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 Integer work area quadratic Integer work area linear Integer work area constant Real work area quadratic Real work area linear Real work area constant Number of model option codes. Maximum = 10 Model option codes entered as integer values Number of initialization subroutines Initialization subroutine name Number of mainline subroutines Mainline subroutine name 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 inhouse 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.

112

B TBS File Descriptions

Table B.2 describes the layout of the mid1, mid2, and mid3 Model Implemented Derivative Codes for the Conventional Property Model Definition Table.

Table B.2 Layout and Description of Model Implemented Derivative Codes


MID Layout mid1 dcba Description 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

B TBS File Descriptions

113

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

1 2 3 4 5 6 7 8 9 10 11

Six property parameters (GMUQR, GMUQQ, GMUQL, GMUQAA, GMUQQ1, and UNIQ). 1 1 2 2 3 3 4 4 5 5 6 6 7 12345 67890 5 0 5 0 5 0 5 0 5 0 5 0 PPCNVPMD REPLACE GMUQUAC GAMMA 0 0 1 GM07 1 GM06 6 GMUQR GMUQQ1 GMUQQ UNIQ GMUQL GMUQAA 0 108 0 0021 00011 2 6 00011 0

114

B TBS File Descriptions

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.

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.

B TBS File Descriptions

115

Figure B.2 shows the layout for the Property Parameter Definition Table:

Figure B.2 File Layout for the Property Parameter Definition Table
1 1 12345 67890 5 PPLCDEFS REPLACE 2 0 2 5 ppname 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5 8 0

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

Parameter description pptype i j k ppinput ppno dataset l m default value lower bound upper bound nominal value regression code symmetric code binlabel units conv code default value lower bound upper bound nominal value regression code symmetric code binlabel units conv code n0 kion

default value lower bound upper bound nominal value regression code symmetric code binlabel units conv code no units row ur ur ur ur

default value lower bound upper bound nominal value regression code symmetric code binlabel units conv code

encoded reverse polish units conversion formula

Table B.3 describes the parameters for the Property Parameter Definition Table:

116

B TBS File Descriptions

Table B.3 Parameters for the Property Parameter Definition Table


Parameter Description ppname Property parameter name (limited to six characters) Parameter Short description of parameter (limited to 64 characters) description 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 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. Binary parameter label displayed on the Properties Parameters forms. Data set code: 0 = Allow only one data set (one set of values per parameter) 1 = Allow more than one data set Units conversion subroutine index. No longer used. Ionic species code: 0 = Ion is allowed 1 = Only ionic species allowed 2 = Ion is not allowed Number of elements for parameter. For example, PLXANT has nine elements. Lower and upper bounds code: 0 = Do not supply lower and upper bounds for parameter 1 = Supply lower and upper bounds for parameter Nominal value code: 0 = Do not supply nominal value for parameter. 1 = Supply nominal value for parameter. 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 1300Reserved for Aspen Plus built-in parameters 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

ppinput

binlabel dataset

n0 kion

i j

ppno

B TBS File Descriptions

117

Parameter Description l Regression code: 0 = No regression code. Parameter cannot be regressed. 1 = Supply regression code 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. 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 regression code Parameter nominal value (in SI units, one value per element) 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 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. Encoded units conversion flag (see Units Conversion Flag, this chapter).

symmetric code

units conv code ur units conversion formula

no units row Number of unique units row referenced in units conv code List of unique units row referenced in units conv code 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.

118

B TBS File Descriptions

Table B.4 describes the units rows for all units in Aspen Plus.

Table B.4 Units Available in Aspen Plus


Units Row 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Description Area Composition Density Diffusivity Energy Enthalpy Entropy Fiscal Flow Mass flow Mole flow Volume flow Enthalpy flow Force Mole heat capacity Length Mass Power Pressure Surface tension Temperature Thermal conductivity Time Velocity Viscosity Volume Frequency Unit-price Energy-price Delta-T Angle Head Bond work index Filter resistance Specific filter resistance Mole density Mass density Mole enthalpy Mass enthalpy Units Row 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 Description Mole entropy Mass entropy Mole volume Dimensionless Dipole moment Solubility parameter Electrical power Electric price Mass heat capacity UA Moles Work Heat Area-price Volume-price Item-price Number concentration Mass concentration Inverse time Natural log of inverse time Flux Area usage Volume usage Mole concentration Power-volume Mass transfer coefficients Specific area Inverse length Chrom velocity Mass flux Solvent permeability Solute permeability Water rate Pressure drop per height Pressure drop Packing factor Number concentration rate Inverse area Volume heat capacity Heat flux

Heat transfer coefficients 56

B TBS File Descriptions

119

Units Row 81 82 83 84 85 86 87 88 89 - 99 100 101 102 103

Description Inverse temperature Inverse pressure Temperature-volume Vflow-length Contents Population density Inverse heat transfer coefficient Volume enthalpy Reserved for in-house customization Volume flow / RPM Friction factor Mass per cycle Moles per cycle

Units Row 104 105 106 107 108 109 110 111 112 113 114 115 116

Description Volume per cycle Enthalpy per cycle Mass per operation Moles per operation Volume per operation Enthalpy per operation Density times velocity squared Sound level Moment of inertia Voltage Current Mass per volume Mass per length

Units Conversion Flag


The number of unit conversion flags equals the number of elements:
Flag Units conversion code -n Meaning Units row from Table B.4 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 A...Z [i] Description Parameter element identifier in the units conversion formula Example A = 1st element, Z = 26th element, AA = 27th element

Units conversion multiplication factor of [20] = pressure the ith units row (see Table B.4.) 273.15 for converting C to K

Special Case Addition conversion factor of [22B] temperature

120

B TBS File Descriptions

Aspen Plus allows the following functions in the units conversion formula:
Function * / + ^ ? log ; Description Multiply Divide Add Subtract Exponentiation Conditional Natural log End of formula Example x y * = x*y x y / = x/y x y + = x+y x y = xy x y ^ = xy x ? = x ?1:0; if x exists returns 1, if not returns 0 x log = log(x)

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 (new (new (new (new (new A) = A + ln[20] (C*ln[22])(D*[22B]/[22]) B) = B*[22] C) = C D) = D/[22] E) = E*[22] + [22B] F) = F*[22] + [22B] Multiplicative conversion factor for pressure Multiplicative conversion factor for temperature Additive conversion factor for temperature

Where: [20] = [22] = [22B] =

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.

B TBS File Descriptions

121

The units conversion codes, and units conversion formulas for the property parameters definition file of this parameter are listed in the following table: 1 1 2 2 3 3 4 4 5 5 6 6 7 12345 67890 5 0 5 0 5 0 5 0 5 0 5 0 1 2 3 4 5 6 7 8 -1 22 3 20 22 44 -2 22 44 -3

A [20] LOG + C [22] LOG * - D [22B] [22] / * 1 B ? - 1 C ? -* * - ; B [22] * ; 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]

122

B TBS File Descriptions

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

B TBS File Descriptions

123

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). 1 1 2 2 3 3 4 4 5 5 6 6 7 12345 67890 5 0 5 0 5 0 5 0 5 0 5 0 PPLCDEFS REPLACE TC Critical temperature 1 1 1D35 5. 5000. 0.5074D3 22 1 22 1 1 1 416 0 1

1 2 3 4 5 6 7 8 9 10 11

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

124

B TBS File Descriptions

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

12345 PPLCDEFS REPLACE

1 67890

be regressed because they are the temperature limits of the correlation. The parameter elements 1, 2, 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). 1 2 2 3 3 4 4 5 5 6 6 7 7 8 5 0 5 0 5 0 5 0 5 0 5 0 5 0 PLXANT

Extended Antoineparameters 1 9 -1D35 0 1D3 .893609D2 0 1D3 2 100 0 -1 44 22 3 20 22 44 -3 -6 -4 44 -5 22 2 1 2 1 2 0 0 0 0 0 0 0 1 1 356 0 0 1 1 0 0 0 0 10

A [20] LOG + E [22] LOG * - D [22B] [22] / * 1 E ? - 1 F ? - 1 G ? - * * * - ; B [22] * ; C [22] * [22B] 1 E ? - 1 F ? - 1 G D [22] / ; F [22] G ^ / ; ? - * * * - ;

B TBS File Descriptions

125

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

126

B TBS File Descriptions

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

1 1 67890 5 12345 PPLCDEFS REPLACE

2 0

2 5 WILSON

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

7 5

8 0

Wilson binary parameters 2 6 0D0 0D0 60 0 0 2 aij cij Tlower -1 22 2 44 22 3 480 0D0 1D3 2 0 0 2 aji cji Tupper -2 22 44 -3 bij dij bji dji 0 0 100 1 1 1 1

1 0D0 0D0

A C [22] LOG * - D [22B] [22] / * 1 B ? - 1 C ? - * * - ; B [22] * ; D [22] / ;

B TBS File Descriptions

127

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 PPSUBLST REPLACE 1 67890 1 5 2 0 2 5 subrname 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0

1 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 ppuser_phcciu ppuser_esmnu Requires modification for calling Model initialization routines Mixture equation-of-state model mainline subroutines Filename phcciu.f mdmon9.f esmnu.f esmnu0.f

ppuser_mdmon9 Non equation-of-state model mainline subroutines ppuser_esmnu0 Pure component equation-of-state model mainline subroutines

Copies of these files are in the user subroutine template directory: C:\Program Files\AspenTech\Aspen Plus <version>\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.

128

B TBS File Descriptions

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 3 ,4HUSRI,4HN2 / 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 20 CALL USRIN1 (MNDS) GO TO 10000 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.

B TBS File Descriptions

129

For each label defined in step 1, call the mainline subroutine. The following input variables are available:
Variable T PSYS B(P(1)) N IDX X KDIAG NDS KCMOD Type REAL*8 REAL*8 REAL*8 Dimension N Description Temperature (K) System pressure (N/m2) System or vapor pressure (N/m2). Used for pure component property. Number of component present Component index vector Mole fraction vector (liquid or vapor) Property diagnostic level code Data set number Property calculation code 0 = Do not calculate 1 = Calculate property only 2 = Calculate property derivative only 3 = Calculate both Model option code Offset for real work array Offset for integer work array

INTEGER INTEGER N REAL*8 N INTEGER INTEGER INTEGER

IB(LBB+9) INTEGER 10 IRW5 IIW INTEGER INTEGER

The subroutine should return the results, as follows:


Variable Type Q Q Q(ID11) Q(ID11) Dimension Description Mixture property (SI units) Pure component or partial property (SI units) Temperature derivative of mixture property (SI units) Temperature derivative of pure component or partial property (SI units) REAL*8 REAL*8 N REAL*8 REAL*8 N

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

130

B TBS File Descriptions

EOS0). This section handles both property calculations and property temperature derivative calculations. 2 For each label defined in steps 1 and 2, call the mainline equation-of-state routine. The following input variables are available:
Variable T P X N IDX IRW1 IIW KVL Type REAL*8 REAL*8 REAL*8 Dimension N Description Temperature (K) System pressure (N/m2) Mole fraction vector (liquid or vapor) Number of component present Component index vector Offset for real work array Offset for integer work array Phase code to calculate properties: 1 = Vapor phase properties 2 = Liquid phase properties Data set number for parameters of the model Property diagnostic level code Model option code Calculation code for fugacity coefficients: 1 = Calculate property only 2 = Calculate temperature derivative of property only 3 = Calculate both Calculation code for the enthalpy departure of a mixture Calculation code for the entropy departure of a mixture Calculation code for the Gibbs energy departure of a mixture Calculation code for the molar volume of a mixture

INTEGER INTEGER N INTEGER INTEGER INTEGER

NDS KDIAG

INTEGER INTEGER

IB(LBB+9) INTEGER 10 KCALC (1) INTEGER

KCALC (2) INTEGER KCALC (3) INTEGER KCALC (4) INTEGER KCALC (5) INTEGER

Results should be returned for the specified phase KVL, as follows:


Variable PHIMX PHIMX (NP1) DHMX(1) DHMX (2) DSMX (1) DSMX (2) DGMX (1) DGMX (2) VMX (1) VMX (2) ZMX(1) ZMX(2) Type REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 REAL*8 Dimension N N Description Vector of logarithms of fugacity coefficients of components in a mixture Vector of temperature derivative of PHIMX Enthalpy departure of a mixture (J/kgmole) Temperature derivative of DHMX(J/kgmole-K) Entropy departure of a mixture (J/kgmole-K) Temperature derivative of DSMX(J/kgmole-K2) Gibbs energy departure of a mixture (J/kgmole) Temperature derivative of DGMX (J/kgmole) Molar volume of a mixture (m3/kgmole) Temperature derivative of VMX(m3/kgmole-K) Compressibility factor Temperature derivative of ZMX

B TBS File Descriptions

131

Variable CVMX(1) CVMX(2)

Type REAL*8 REAL*8

Dimension

Description Constant volume heat capacity (J/kgmole-K) 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.

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.

132

B TBS File Descriptions

Figure B.4 File Layout for Major Property Route Table


12345 PPENMPRT REPLACE 1 67890 1 5 2 0 2 5 routeid 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5

propname

method

n1

mdlprop

model

setno

monitor

n2

m-opcode

m-opcode

m-opcode

m-opcode

m-opcode

m-opcode

n3

majprop

majprop

majprop

majprop

majprop

majprop

n4

10

subprop

subprop

subprop

subprop

subprop

subprop

11

n5

12

r-opcode

r-opcode

r-opcode

r-opcode

r-opcode

r-opcode

B TBS File Descriptions

133

Table B.5 describes parameters for Figure B.4:

Table B.5 Parameters for the Major Property Route Table


Parameter routeid propname method n1 mdlprop model setno monitor n2 m-opcode n3 majprop majroute n4 subprop subroute n5 r-opcode Description Property route ID Property name for this route Property method code Number of property models required for this route Property calculated by the model Model name Data set number Model monitor computed-go-to index Number of option codes for the model Model option code value Number of major properties required for this route Major property name Major property route ID Number of subordinate properties required for this route Subordinate property name Subordinate property route ID Number of route option codes for this route 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.

134

B TBS File Descriptions

Figure B.5 shows the layout for the Subordinate Property Route table:

Figure B.5 File Layout for Subordinate Property Route Table


12345 PPENSPRT REPLACE 1 67890 1 5 2 0 2 5 routeid 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5

propname

method

n1

mdlprop

model

setno

monitor

n2

m-opcode

m-opcode

m-opcode

m-opcode

m-opcode

m-opcode

n3

majprop

majprop

majprop

majprop

majprop

majprop

n4

10

subprop

subprop

subprop

subprop

subprop

subprop

11

n5

12

r-opcode

r-opcode

r-opcode

r-opcode

r-opcode

r-opcode

B TBS File Descriptions

135

Table B.6 describes parameters for this table:

Table B.6 Parameters for the Subordinate Property Route Table


Parameter routeid propname method n1 mdlprop model setno monitor n2 m-opcode n3 majprop majroute n4 subprop subroute n5 r-opcode Description Property route ID Property name for this route Property method code Number of property models required for this route Property calculated by the model Model name Data set number Model monitor computed-go-to index Number of option codes for the model Model option code value Number of major properties required for this route Major property name Major property route ID Number of subordinate properties required for this route Subordinate property name Subordinate property route ID Number of route option codes for this route 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 A subordinate property route (HNRY01) A mixing model (model=WHENRY) To calculate Henry's constants for Noncondensable components in each solvent (subprop=HNRY) Each noncondensable component in the mixture from property HNRY

136

B TBS File Descriptions

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

B TBS File Descriptions

137

12345 PPENMPRT REPLACE

1 67890

1 5

2 0

2 5 PHILMX24

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

PHILMX

GAMMA

GMRENON

107

WHNRY

WHENRY

203

10

PHIL

PHIL04

11

12

HNRY

HNRY01

13

14

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:

138

B TBS File Descriptions

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

B TBS File Descriptions

139

12345 PPENSPRT REPLACE

1 67890

1 5

2 0

2 5 DHL00

3 0

3 5

4 0

4 5

5 0

5 5

6 0

6 5

7 0

DHL

PL

PL0XANT

101

DHVL

DHVLWTSN

123

10

DHV

DHV00

DHLPC

DHLPC00

11

140

B TBS File Descriptions

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 PPSTOPTN REPLACE 1 67890 1 5 2 0 2 5 opsetid 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

propname

routeid

Table B.7 describes parameters for the table in Figure B.6:

Table B.7 Parameters for the Physical Property Method Table


Parameter opsetid n propname routeid Description Property method ID Number of major properties in this property method Major property name Major property route ID

B TBS File Descriptions

141

Example of Physical Property Method File NRTL.STO


12345 PPSTOPTN REPLACE 1 67890 1 5 2 0 NRTL 2 5 3 0 3 5 4 0 4 5 5 0 5 5 6 0 6 5 7 0 7 5

34

PHIMVX

PHIVMX00

PHILMX

PHILMX86

HVMX

HVMX00

HLMX

HLMX86

GVMX

GVMX00

GLMX

GLMX86

SVMX

SVMX00

SLMX

SLMX86

VVMX

VVMX00

VLMX

VLMX01

MUVMX

MUVMX01

MULMX

MULMX01

KVMX

KVMX01

KLMX

KLMX01

DVMX

DVMX01

DLMX

DLMX02

SIGLMX

SIGLMX01

PHIV

PHIV00

PHIL

PHIL00

HV

HV00

HL

HL00

10

GV

GV00

GL

GL00

SV

SV00

11

SL

SL00

VV

VV00

VL

VL01

12

MUV

MUV01

MUL

MUL01

KV

KV01

13

KL

KL01

DV

DV01

DL

DL01

14

SIGL

SIGL01

142

B TBS File Descriptions

Index

A Accounting program 94 report 91 report, user-based 92 required information 96 Accounting environment variable setting 97 Accounting file creating 95 initializing 96 Adding component synonyms 43 Adding Help for databanks 44 Aspen Plus customizing simulation engine 58 customizing user interface 61 debugging 22 Help files, modifying 105 in-house modifications 21 introduction 12 maintaining and updating 19 modification levels 20 run definition file 14 system modifications 21 table building system, running 28, 60 units rows available 119 user modifications 20 utilities 16 Aspen Properties Enterprise Database configuring 34 AspenTech support 4 AspenTech Support Center 4 Assigning map numbers 103

B Binary databanks adding 46 creating input files 47 Building system shared libraries 24 C Command line qualifiers 17 Compatibility issues 6 maintaining upward compatibility 7 system definition files 6 user interface initialization files 7 Compiling Help source files 104 Compiling user routines 22 Configuring Aspen Properties Enterprise Database 34 physical property databanks 36 physical property database 34 physical property methods 57 Creating custom SDF files 26 databank input files 39 databanks 37 Help files 101 physical property models, routes, methods 109 user interface input files 47 customer support 4 Customization files MMTBS 99 Customization system for user interface running 106 Customizing Aspen Plus simulation engine 58

Index

143

Aspen Plus user interface 61 D Databanks adding binary 46 adding component synonyms 43 adding Help for 44 adding in-house 37 adding pair parameter 46 adding user 37 creating 37 installing 44 physical property, configuring 36 running MMTBS to add 44 Database configuring 34 Debugging Aspen Plus 22 user routines on Windows 23 E e-bulletins 4 Electrolyte reaction database adding ionic reactions 53 Emergency relief vents 81 F Files MMTBS customization 99 simulation run 13 Format prompts 105 Fortran modifying source code 26 G Gas/2-phase service safety relief valves 75 H Help customizing 99 help desk 4 Help driver files modifying 106 Help files adding for databanks 44 adding for models, routes, property methods 67

creating 101 modifying Aspen Plus 105 Help source files compiling 104 I In-house databanks adding 36 In-house database adding 34 In-house models and subroutines integrating 25 Initialization files 7 Inlet pipe valves 84 Inline Fortran 22 Input file binary databanks, creating 47 header templates 50 ionic reactions database, creating 54 pair parameter databanks, creating 47 Installing databanks 44 Help files 107 RECDEF files 107 system definition files 61 Ionic reactions adding to electrolyte reaction database 53 creating input file 54 L Liquid service safety relief valves 72 M Maintaining and updating Aspen Plus 19 Maintaining upward compatibility 7 Major property route table 132 parameters 134 Map numbers assigning to Help topics 103 MMTBS customization files 99 running 44, 52, 56 MMTBS driver file modifying 43, 52, 56, 101 Models adding to simulation engine 62

144

Index

adding to user interface 66 Modifying Aspen Plus 20 Aspen Plus Help files 105 Help driver files 106 in-house files 21 MMTBS driver files 43, 52, 56, 101 system files 21 user files 20 N NRTL binary parameters 51 P Pair parameter databanks adding 46 creating input files 47 Physical property databanks configuring 36 Physical property database configuring 34 Physical property method table 141 parameters 141 Physical property methods configuring 57 Physical property models, routes, methods creating 62 Physical property subroutine list table 128 Pipes pressure relief 80 valves 84 Pressure relief configuring equipment data 71 pipes 80 rupture disks 78 Prompts adding for models, routes, property methods 67 format 105 Property methods adding to simulation engine 62 adding to user interface 66 example of file NRTL.STO 142 Property model definition table 110 Property parameter definition table 115 parameters 116 Property route tables

major 132, 136 subordinate 135, 138 R Relief valves gas/2-phase service safety 75 Reports accounting 91 Routes adding to simulation engine 62 adding to user interface 66 Routines user 22 Running accounting program 94 MMTBS 44, 52, 56 Rupture disks 78 S Scalar parameters 52 SDF files creating custom 26 Simulation engine adding models, routes, property methods 62 command line qualifiers 17 processes for running 12 system files 13 Simulation run files 13 Standard physical property method table 141 Subordinate property route table 135 parameters 136 support, technical 4 System configuration 11 System definition files 6, 29 installing 61 running report system 26 updating 31 System files simulation engine 13 user interface 13 System overview 11 System shared libraries building 24 Windows 24 T Table building system customization files 59, 109

Index

145

file descriptions 109 file types 30 files, creating from customization files 60, 109 program 29 running 28, 60 system definition files 29 updating system definition files 31 VIRT command 32 Tail pipe valves 84 technical support 4 Templates for input file headers 50 Testing changes in user interface 53 U Units conversion flags 120 formulas 120 Upgrading Aspen Plus 5 Upgrading user interface files 6 Upward compatibility maintaining 7 User databanks adding 36 User database adding 34 User interface adding models, routes, property methods 66 creating databank files 39 customizing 99 running customization system 106 system files 13 testing changes in 53 upgrading 6 User routines compiling 22 debugging on Windows 23 maintaining 22 User-based accounting report 92 V Valves liquid service safety relief 72 Van Laar binary parameters 51 Vents emergency relief 81

W web site, technical support 4 Wilson binary parameters 51

146

Index

Das könnte Ihnen auch gefallen