aplus 111 system management

160
System Management Version 11.1

Upload: sumit-chandra

Post on 02-Apr-2015

178 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: APLUS 111 System Management

System Management

Version 11.1

Page 2: APLUS 111 System Management

Part Number: Aspen Plus® 11.1September 2001

Copyright (c) 1981-2001 by Aspen Technology, Inc. All rights reserved.

Aspen Plus®, Aspen Properties®, Aspen Engineering Suite, AspenTech®, ModelManager, the aspen leaf logo and Plantelligenceare trademarks or registered trademarks of Aspen Technology, Inc., Cambridge, MA.

BATCHFRAC and RATEFRAC are trademarks of Koch Engineering Company, Inc.

All other brand and product names are trademarks or registered trademarks of their respective companies.

This manual is intended as a guide to using AspenTech's software. This documentation contains AspenTech proprietary andconfidential information and may not be disclosed, used, or copied without the prior consent of AspenTech or as set forth in theapplicable license agreement. Users are solely responsible for the proper use of the software and the application of the resultsobtained.

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

CorporateAspen Technology, Inc.Ten Canal ParkCambridge, MA 02141-2201USAPhone: (1) (617) 949-1021Toll Free: (1) (888) 996-7001Fax: (1) (617) 949-1724URL: http://www.aspentech.com

DivisionDesign, Simulation and Optimization SystemsAspen Technology, Inc.Ten Canal ParkCambridge, MA 02141-2201USAPhone: (617) 949-1000Fax:(617) 949-1030

Page 3: APLUS 111 System Management

System Management iiiVersion 11.1

ContentsAbout This Reference Manual

For More Information ..................................................................................................... viTechnical Support .......................................................................................................... vii

Contacting Customer Support ................................................................................ viiHours .......................................................................................................................viiiPhone .......................................................................................................................viiiFax ............................................................................................................................. ixE-mail ........................................................................................................................ ix

1 Upgrading Aspen Plus

Compatibility Issues ..................................................................................................... 1-2Converting Fortran Subroutines and Inline Fortran ................................................. 1-8

2 System Overview

Functional Overview of Aspen Plus ............................................................................. 2-2User Interface System Files ......................................................................................... 2-4Simulation Engine System Files.................................................................................. 2-4Files Associated with a Simulation Run...................................................................... 2-5The Aspen Plus Run Definition File ............................................................................ 2-6Aspen Plus Utilities ...................................................................................................... 2-9Simulation Engine Command Line Qualifiers............................................................ 2-9

3 Maintaining and Updating Aspen Plus

Modification Levels in Aspen Plus............................................................................... 3-2Maintaining User Routines .......................................................................................... 3-4Building System Shared Libraries............................................................................... 3-7Integrating In-House Models and Subroutines........................................................... 3-8Running a System Definition File Report ................................................................. 3-10Running the Aspen Plus Table Building System ....................................................... 3-12Converting Version 9.x TBS Input Files.................................................................... 3-17

4 Configuring Physical Property Databanks

Adding User and In-House Databanks........................................................................ 4-1Adding Binary or Pair Parameter Databanks .......................................................... 4-10Adding Ionic Reactions to the Electrolyte Reaction Database................................. 4-17

5 Configuring Physical Property Methods

Overview ........................................................................................................................ 5-2Customizing the Aspen Plus Simulation Engine ........................................................ 5-2

Page 4: APLUS 111 System Management

iv System ManagementVersion 11.1

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

6 Configuring Pressure Relief, Pipe, and Valve Equipment Data

Overview ........................................................................................................................6-1Liquid Service Safety Relief Valves for Pressure Relief .............................................6-2Gas/2-Phase Service Safety Relief Valves for Pressure Relief ...................................6-5Rupture Disks for Pressure Relief................................................................................6-8Pipes for Pressure Relief and the Pipe Model ...........................................................6-10Emergency Relief Vents for Pressure Relief..............................................................6-12Inlet and Tail Pipe Valves for Pressure Relief ..........................................................6-14Valves for the Valve Model .........................................................................................6-16

7 Accounting Report

Generating a User-Based Accounting Report..............................................................7-2Running the Accounting Program................................................................................7-4Creating a New Accounting File...................................................................................7-6Making Accounting Information Required ..................................................................7-6Activating Accounting on Windows..............................................................................7-7

A Customizing the Aspen Plus User Interface

MMTBS Customization Files ...................................................................................... A-2Creating Help ............................................................................................................... A-3Modifying the MMTBS and Help Driver Files ........................................................... A-9Running the User Interface Customization System ................................................ A-10Installing the New Files............................................................................................. A-11

B TBS File Descriptions

Conventional Property Model Definition Table.......................................................... B-2Property Parameter Definition Table ......................................................................... B-6Physical Property Subroutine List Table ................................................................... B-17Modifying Aspen Plus System Routines ................................................................... B-17Major and Subordinate Property Route Tables........................................................ B-23Physical Property Method Table ............................................................................... B-29

Index

Page 5: APLUS 111 System Management

System Management vVersion 11.1

About This ReferenceManual

This manual provides an overview of the Aspen Plus user interface andsimulation engine software system and information on how to maintain thesystem on all supported platforms. This manual is especially useful toAspen 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• Configuration of client/host systems• 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 Plus InstallationGuide for your platform

Page 6: APLUS 111 System Management

vi System ManagementVersion 11.1

For More Information

Online Help Aspen Plus has a complete system of online help andcontext-sensitive prompts. The help system contains both context-sensitive helpand reference information. For more information about using Aspen Plus help, seethe Aspen Plus User Guide, Chapter 3.

Aspen Plus Getting Started Guides This six-manual set includes a basicguide with several hands-on tutorials to familiarize you with Aspen Plus, andfive additional guides covering specific topics. The guides take you step-by-step tolearn the full power and scope of Aspen Plus.• Getting Started Building and Running a Process Model• Getting Started Using Equation Oriented Modeling• Getting Started Modeling Processes with Electrolytes• Getting Started Modeling Petroleum Processes• Getting Started Modeling Processes with Solids• Getting Started Customizing Unit Operation Models

Aspen Plus User Guide The three-volume Aspen Plus User Guide providesstep-by-step procedures for developing and using an Aspen Plus processsimulation model. The guide is task-oriented to help you accomplish theengineering work you need to do, using the powerful capabilities of Aspen Plus.

Aspen Plus reference manual series Aspen Plus reference manuals providedetailed technical reference information. These manuals include backgroundinformation about the unit operation models and the physical properties methodsand models available in Aspen Plus, tables of Aspen Plus databank parameters,group contribution method functional groups, and a wide range of other referenceinformation. The set comprises:• Unit Operation Models• Physical Property Methods and Models• Physical Property Data• User Models• System Management• System Administration• Summary File Toolkit

Aspen Plus application examples A suite of sample online Aspen Plussimulations illustrating specific processes is delivered with Aspen Plus.

Page 7: APLUS 111 System Management

System Management viiVersion 11.1

Aspen Engineering Suite Installation Manual This manual providesinstructions on platform and network installation of Aspen Plus and otherproducts.

The Aspen Plus manuals are delivered in Adobe portable document format (PDF)on the Aspen Plus Documentation CD.

Technical Support

Online Technical Support Center

AspenTech customers with a valid license and software maintenance agreementcan register to access the Online Technical 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• Search for and review known limitations• Send suggestions

Registered users can also subscribe to our Technical Supporte-Bulletins. These e-Bulletins are used to proactively alert users to importanttechnical support information such as:• Technical advisories• Product updates• Service Pack announcements• Product release announcements

Contacting Customer SupportCustomer support is also available by phone, fax, and email for customers with acurrent support contract for this product. For the most up-to-date phone listings,please see the Online Technical Support Center athttp://support.aspentech.com.

Page 8: APLUS 111 System Management

viii System ManagementVersion 11.1

HoursSupport Centers Operating Hours

North America 8:00 – 20:00 Eastern TimeSouth America 9:00 – 17:00 Local timeEurope 8:30 – 18:00 Central European timeAsia and Pacific Region 9:00 – 17:30 Local time

PhoneSupportCenters

Phone Numbers

1-888-996-7100 Toll-free from U.S., Canada, Mexico1-281-584-4357 North America Support Center

NorthAmerica

(52) (5) 536-2809 Mexico Support Center(54) (11) 4361-7220 Argentina Support Center(55) (11) 5012-0321 Brazil Support Center(0800) 333-0125 Toll-free to U.S. from Argentina(000) (814) 550-4084 Toll-free to U.S. from Brazil

SouthAmerica

8001-2410 Toll-free to U.S. from Venezuela(32) (2) 701-95-55 European Support CenterCountry-specific toll-free numbers:(0800) 40-687 Belgium8088-3652 Denmark(0) (800) 1-19127 Finland(0805) 11-0054 France(1) (800) 930-024 Ireland(0800) 023-2511 Netherlands(800) 13817 Norway(900) 951846 Spain(0200) 895-284 Sweden(0800) 111-470 Switzerland

Europe

(0800) 376-7903 UK(65) 395-39-00 SingaporeAsia and

PacificRegion

(81) (3) 3262-1743 Tokyo

Page 9: APLUS 111 System Management

System Management ixVersion 11.1

FaxSupport Centers Fax Numbers

North America 1-617-949-1724 (Cambridge, MA)1-281-584-1807 (Houston, TX: both Engineering andManufacturing Suite)1-281-584-5442 (Houston, TX: eSupply Chain Suite)1-281-584-4329 (Houston, TX: Advanced Control Suite)1-301-424-4647 (Rockville, MD)1-908-516-9550 (New Providence, NJ)1-425-492-2388 (Seattle, WA)

South America (54) (11) 4361-7220 (Argentina)(55) (11) 5012-4442 (Brazil)

Europe (32) (2) 701-94-45Asia and PacificRegion

(65) 395-39-50 (Singapore)(81) (3) 3262-1744 (Tokyo)

E-mailSupport Centers E-mail

North America [email protected] (Engineering Suite)[email protected] (Aspen ICARUS products)[email protected] (Aspen MIMI products)[email protected] (Aspen PIMS products)[email protected] (Aspen Retail products)[email protected] (Advanced Control products)[email protected] (Manufacturing Suite)[email protected] (Mexico)

South America [email protected] (Argentina)[email protected] (Brazil)

Europe [email protected] (Engineering Suite)[email protected] (All other suites)[email protected] (CIMVIEW products)

Asia and PacificRegion

[email protected] (Singapore: Engineering Suite)[email protected] (Singapore: All other suites)[email protected] (Tokyo: Engineering Suite)[email protected] (Tokyo: All other suites)

Page 10: APLUS 111 System Management

x System ManagementVersion 11.1

❖ ❖ ❖ ❖

Page 11: APLUS 111 System Management

Chapter 1

System Management 1-1Version 11.1

1 Upgrading Aspen Plus

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

Topics included in this chapter are:• Compatibility Issues• Converting Fortran Subroutines and Inline Fortran from Version 9

Page 12: APLUS 111 System Management

UpgradingAspen Plus

1-2 System ManagementVersion 11.1

Compatibility Issues

Aspen Technology makes every effort to avoid changes in new releases thatintroduce incompatibilities with old releases, and to provide migration utilitieswhen changes are unavoidable. However, most in-house modifications and usermodels implemented in previous versions need to be updated or reapplied inorder to work with the new version.

Upgrading User Interface Files

Before upgrading the user interface, you must create Aspen Plus backup files ofany runs that are stored in Quick Restart format (Version 9.x) or Aspen PlusDocument format (Version 10.x). The following table shows which files areupwardly compatible with the new version:

Files Extensions Upwardly Compatible?

Aspen Plus Backup .bkp Yes

Aspen Plus Document .apw No

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

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

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

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

Databank Files

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

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

Page 13: APLUS 111 System Management

Chapter 1

System Management 1-3Version 11.1

System Definition Files

The SDFs from any previous release are not compatible with Version 11.1. Ifyour current SDFs contain any customized features, you must reapply them tothe SDFs installed with Version 11.1, using the original Table Building System(TBS) files. Some physical property TBS files have a different format from thosein Version 9.x.

For more information on See

The new format for physical property tables Chapter 5

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

Problem Definition Files

The problem definition file (APPDF) from any previous release is not compatiblewith Version 11.1. You must rebuild any existing APPDFs by deleting the oldones and re-running the simulation model from an input or backup file.

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

Other Files

Version 11.1 is compatible with the following files from previous releases:• Interactive Aspen Plus (IAP) scripts (.scp)• Insert Libraries (.ilb)• Stream Libraries (.slb)• Run Definition (.def)• Summary (.sum)

Page 14: APLUS 111 System Management

UpgradingAspen Plus

1-4 System ManagementVersion 11.1

Load Modules

Generated program executables (load modules) from previous releases, includinggeneral purpose load modules, are not compatible with Version 11.1. For Version10, the Aspen Plus Simulation Engine has been divided into many Shared orDynamic Link Libraries (DLLs). Aspen Plus no longer has a single large programexecutable. All documented interfaces to the Aspen Plus simulation engine havebeen isolated into a small group of shared libraries.

Maintaining Upward Compatibility

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

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

User Interface Initialization Files

User interface initialization (mm.ini and mmg.ini) files from Version 9.x are notcompatible with Version 11.1. Check whether any .ini files from previous releasesare in your working directory. If there are any, rename them before you startAspen Plus 11.1.

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

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

Page 15: APLUS 111 System Management

Chapter 1

System Management 1-5Version 11.1

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 clickingTools, then Options.

Table 1.1 mmg.ini Settings You Can Change Within the User Interface

Menu Selections Option Setting

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

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

Tools, Options, General Accounting information required to complete input account-info

Tools, Options, General Always create backup copy alwayssavebkp

Tools, Options, General Save document as defsaveasbkp

Tools, Options, General Copy buffer format – Value copyvalue

Tools, Options, General Copy buffer format – Units copyunits

Tools, Options, General Copy buffer format – Label copylabel

Tools, Options, General Copy buffer format – Basis copybasis

Tools, Options, General Time stamp timestamp

Tools, Options, ComponentData

Pure component databanks searched purebank

Tools, Options, ComponentData

Binary databanks searched paramdata

Tools, Options, ComponentData

Copy regression and estimation results onto Parameter forms regdbank

Tools, Options, ComponentData

Generate input language using component

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

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

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

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

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

Tools, Options, Run Express run pseudobatch

Tools, Options, Run Interactively load results partial

Tools, Options, Run Animate flowsheet during calculations animation

Tools, Options, Run Edit keyword input before starting calculations editinput

continued

Page 16: APLUS 111 System Management

UpgradingAspen Plus

1-6 System ManagementVersion 11.1

Table 1.1 mmg.ini Settings You Can Change Within the User Interface (cont.)

Menu Selections Option Setting

Tools, Options, Run Server type servertype

Tools, Options, Run Server name servername†

Tools, Options, Run Username username†

Tools, Options, Run Working directory workingdir†

Tools, Options, Startup Run type runtype

Tools, Options, Startup Application template template

Tools, Options, Startup Default working directory startupdir

Tools, Options, Startup BatchFrac bfracenabled

Tools, Options, Startup RateFrac rtfenabled

Tools, Options, Startup Aspen Dynamics dynaplusenabled

Tools, Options, Startup POLYMERS PLUS polyplusenabled

Tools, Options, Startup Text editor editor

Tools, Options, Startup Print text file command printcommand

Tools, Options, Flowsheet Automatically assign block name with prefix autoblockid, blockprefix

Tools, Options, Flowsheet Display block name showblockid

Tools, Options, Flowsheet Automatically assign stream name with prefix autostreamid, streamprefix

Tools, Options, Flowsheet Display stream name showstreamid

Tools, Options, Flowsheet Automatically place blocks when importing autoplacement

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

Tools, Options, Flowsheet Label size scale factor labelscale

Tools, Options, Grid/Scale Show scale scale

Tools, Options, Grid/Scale Show grid grid

Tools, Options, Grid/Scale Snap to grid grid

Tools, Options, Grid/Scale Grid size gridresolution

Tools, Options, Grid/Scale Zoom scale factor zoomfactor

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

Tools, Options, Plots Title plottitlefont

Tools, Options, Plots Axis label plotlabelfont

Tools, Options, Plots Axis scale plotscalefont

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

continued

Page 17: APLUS 111 System Management

Chapter 1

System Management 1-7Version 11.1

Table 1.1 mmg.ini Settings You Can Change Within the User Interface (cont.)

Menu Selections Option Setting

Tools, Options, Plots Annotation plottextfont

Tools, Options, Plots Legend plotlegendfont

Tools, Options, Plots Grid style gridstyle

Tools, Options, Plots Line style linestyle

Tools, Options, Plots Marker size plotmarkersize

Tools, Options, Plots Show legend showlegend

Tools, Options, Plots Show time stamp plottimestamp

File, Page Setup Size papersize

File, Page Setup Source papersource

File, Page Setup Orientation orientation

File, Page Setup Left margin marginleft††

File, Page Setup Right margin marginright††

File, Page Setup Top margin margintop††

File, Page Setup Bottom margin marginbottom††

View menu Model library modellibraryview

View menu Status bar statusbarview

View, Toolbar Standard toolstdvisible

View, Toolbar Data Browser tooldatavisible

View, Toolbar Simulation Run toolrunvisible

View, Toolbar Process Flowsheet toolpfsvisible

View, Toolbar Draw tooldrawvisible

View, Toolbar Dynamic tooldynvisible

View, Toolbar Section toolsectionsvisible

Window menu Normal, Workbook, Flowsheet as Wallpaper worksheetmode,wallpaperview

Draw toolbar Color drawcolor

Draw toolbar Line style drawlinestyle

Draw toolbar Font drawfont

†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 theWindows Control Panel. If your Measurement System is U.S., specify the values in inches. If your Measurement System isMetric, specify the value in millimeters.

Page 18: APLUS 111 System Management

UpgradingAspen Plus

1-8 System ManagementVersion 11.1

Converting Fortran Subroutines andInline Fortran

If you are upgrading from Aspen Plus Version 9.x to Version 10, you may need tomodify your Fortran subroutines and inline Fortran. If you have already modifiedyour Fortran to the Version 10 standard, there is no further modification needed.

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

Note In Version 10, you must compile user subroutines using theAspcomp utility. The native compiler does not recognize theINCLUDE statements added by the Aspen Plus Fortranconversion utility. See Aspen Plus User Models for moreinformation on the Aspcomp utility.

The following changes have been made to the Aspen Plus simulation engine:• COMMON blocks are now stored in INCLUDE files• Aspen Plus COMMONs have been renamed• Aspen Plus routines have been renamed

The following sections describe these changes in detail.

INCLUDE Files

All Aspen Plus COMMON blocks are now stored in INCLUDE files. Rather thanreferencing a local copy of a COMMON block, all user subroutines andAspen Plus input files with inline Fortran now reference the INCLUDE files. Anycustomer COMMONs must have the identical variable list at every referencepoint.

Aspen Plus COMMONs Renamed

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

Page 19: APLUS 111 System Management

Chapter 1

System Management 1-9Version 11.1

Aspen Plus Routines Renamed

All Aspen Plus routines have been renamed to include an identifier that indicatesits parent shared or DLL modules. This identifier is prepended to the oldsubroutine name. For example, if you are calling FLASH within a usersubroutine, the new name will be FLSH_FLASH. (FLASH belongs to the modulecalled PPFLASH, which has an identifier of FLSH.) This change reduces thechance that your routines have name conflicts with Aspen Plus routines. It willalso make maintenance and support easier. You must modify any usersubroutines that call Aspen Plus routines.

❖ ❖ ❖ ❖

Page 20: APLUS 111 System Management

UpgradingAspen Plus

1-10 System ManagementVersion 11.1

Page 21: APLUS 111 System Management

Chapter 2

System Management 2-1Version 11.1

2 System Overview

This chapter provides a functional overview of Aspen Plus. It also describes:• User interface system files• Simulation engine system files• Files associated with a simulation run• The Aspen Plus Run Definition File• Aspen Plus utilities• Simulation engine command line qualifiers

Page 22: APLUS 111 System Management

SystemOverview

2-2 System ManagementVersion 11.1

Functional Overview of Aspen Plus

The Aspen Plus user interface can run on Intel Pentium® processors runningeither Windows NT 4.0, Windows 95, or Windows 98. The Aspen Plus simulationengine performs all the required calculations. The simulation engine can run onthe same host as the user interface or on a remote host on the network.

Table 2.1 shows the various platform requirements for Aspen Plus.

Table 2.1 Platform Requirements

Operating System Disk Space Requirements (MB)

Platform Name Version Fortran Compiler SimulationEngine (1)

User Interface(1)

Intel (2) Pentium Windows 95 SP1 (3) Digital Visual Fortran 6.0B 110 220

Intel (2) Pentium Windows 98 SE (3) Digital Visual Fortran 6.0B 110 220

Intel (2) Pentium Windows NT 4.0 with SP5 (3) Digital Visual Fortran 6.0B 110 220

Note the following:

1. Disk space requirements vary, depending on the components selected duringinstallation. An additional 50 MB of space is required on the Windows systemdrive for system components.

2. Pentium refers to all Intel Pentium chips including Pentium Pro, Pentium II,Pentium III, Pentium, and Pentium MMX. Aspen Plus has not been tested forand is not supported on non-Intel Pentium PC platforms such as Cyrix orAMD chips.

3. The Windows 95 and 98 patches required are ones which make these systemsY2K-ready. Windows NT 4.0 with SP4 may also be used, provided the Y2KPatch and Hot Fixes for MDAC update and memory leak have been applied.

Processes for Running the Simulation Engine

Aspen Plus provides users with several methods to perform simulationcalculations. Different users will have their own preferences in how they useAspen Plus.

Page 23: APLUS 111 System Management

Chapter 2

System Management 2-3Version 11.1

Scenario 1

A typical engineer performing a simulation does the following:

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

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

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

Scenario 2

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

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

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

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

These methods can be combined. For example, a simulation created or modifiedoutside of the user interface can be loaded into the user interface for furtherstudy.

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

Page 24: APLUS 111 System Management

SystemOverview

2-4 System ManagementVersion 11.1

User Interface System Files

While the engineer is specifying the problem, the Aspen Plus user interface usesthe following files:

File Description Format

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

Binary

mmg.hms Hypertext Help messages Binary

mm.ini User interface communications initialization ASCII

mmg.ini User interface graphics initialization ASCII

*.hlp Help files and prompts Binary

Simulation Engine System Files

During execution, the simulation engine uses binary files to retrieve informationfor calculations. The file types are:

File Type Description

.dat System and user physical property databanks, cost databanks

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

.ilb System and user insert libraries

.slb System stream library

.msf Aspen Plus accounting file

Page 25: APLUS 111 System Management

Chapter 2

System Management 2-5Version 11.1

Files Associated with a Simulation Run

When you run a simulation from the user interface, the RunID is a random namecomposed of an underscore ( _ ) followed by four digits and three characters (forexample, _1234abc). Many temporary files with this name are created duringexecution, and deleted when you exit Aspen Plus.

When you save a simulation run in Aspen Plus Document format, the followingfiles are saved:

File Type Name Description Format Client/Server

.his History Calculation history ASCII Server

.apw User interfacedocument

All data for the user interface problemspecification

Binary Client

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

.for Fortran Generated Fortran routines for non-interpretableinline Fortran

ASCII Server

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

File Type File Name File Contains

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

.cpm Control Panel Message Diagnostic messages displayed in the Control Panel

.inp Input Input description with or without graphics

.rep Report Simulation results.

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

.dynf Aspen Dynamics Language Pressure or flow-driven dynamic simulation file for Aspen Dynamics

.apt Application Template Partial or complete backup file containing default problem specifications

.dxf Flowsheet Drawing Flowsheet graphics

Page 26: APLUS 111 System Management

SystemOverview

2-6 System ManagementVersion 11.1

The following types of ASCII files are useful for diagnosing problems:

File Type Name Description

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

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

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

.ld Linker diagnostics Linker diagnostic output for dynamic link

.opt Linker options Linker directives for dynamic link

The Aspen Plus Run Definition File

Each Aspen Plus run creates a run definition (.def) file containing filespecifications for the run. The engineer can also specify a user run definition fileto:• Override system default files• Set up default command options

The user run definition file is particularly useful when several user or in-housefiles are used for a project.

For The syntax is†

File specifications symbol: filespec

Command options symbol:

†Where symbol is a symbol listed in Table 2.2

The engineer specifies the run definition file in the Run Settings dialog box in theuser interface. The names of files specified in the run definition file can exceedeight characters. However, the name cannot contain any blank spaces in thename of the file.

The engineer can also specify the run definition file at the operating systemcommand prompt when using the Aspen command by setting the symbol orenvironment variable XDEF.

Page 27: APLUS 111 System Management

Chapter 2

System Management 2-7Version 11.1

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

Table 2.2 Valid Symbols for Run Definition File

Symbol Description Default File

INPUT Input file none

RUNID Identifier for the simulation run none

PDF Problem datafile runid.appdf

PP1A USRPP1A databank none

PP1B USRPP1B databank none

PP2A USRPP2A databank none

PP2B USRPP2B databank none

PP2C USRPP2C databank none

XILB System insert library sys.ilb

XULB User insert library user.ilb

XSLB System stream library sys.slb

XSCD System cost databank aspcost.dat

UCOS User cost databank none

IPCD In-house pure component databank inhspcd.dat

ISOL In-house solids databank inhssol.dat

IAQU In-house aqueous databank inhsaqu.dat

IBIN In-house binary databank inhsbin.dat

XCOM System combustion databank combust.dat

XDPR System pure component databank-II pure10.dat

XPCD System pure component databank aspenpcd.dat

XFLO System flowtran databank flowtran.dat

XSOL System solids databank solids.dat

XAQU System aqueous databank aqueous.dat

XBIN System binary databank binary.dat

XBAR Inorganic (Barin) databank inorgani.dat

XMRL CSIRO MRL databank cpdmrl.dat

XNPL CSIRO NPD databank cpdnpl.dat

continued

Page 28: APLUS 111 System Management

SystemOverview

2-8 System ManagementVersion 11.1

Table 2.2 Valid Symbols for Run Definition File (continued)

Symbol Description Default File

XNBS CSIRO NBS databank cpdnbs.dat

XJAN JANAF combustion databank cpdjan.dat

XSGT CSIRO SGT databank cpdsgt.dat

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

XPC93 Release 9.3 version of purecomp.dat pure93.dat

XAQ92 Release 9.2 version of aqueous.dat aqu92.dat

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

XPOPCD System polymers databank polymer.dat

XSEPCD System segments databank segment.dat

XSDF System definition file sdffil.sdf

SCRIPT Script file for ASCII interactive run iap.scp

XDEF User specified defaults file none

XMOD Location of executable used for simulation none†

XPDFLC Location of problem datafile none††

USERNAME Username none

NEW_RUNID New Run_ID specified for Edit run none

OLD_RUNID Old Run_ID being edited none

LMHOST Name of License Manager host none

IAPFLAG Interactive flag none

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

ITONLY Perform input processing only N/A

BATCH Job is run batch or in background N/A

TUTOR Use interactive tutorial mode N/A

SLAVE Job runs under the user interface control N/A

DLOPT Dynamic link options none

†Aspen Plus Engine executable directory.

††Local working directory

Page 29: APLUS 111 System Management

Chapter 2

System Management 2-9Version 11.1

Aspen Plus Utilities

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

Table 2.3 Utility Programs

Utility Description

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

CDFMS Creates Aspen Plus system and user cost databanks

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

GETRIDOF Deletes files created during a run

IFMS Creates and modifies Aspen Plus insert libraries

MMTBS User interface table building system. See Appendix A.

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

STRLIB Creates and modifies Aspen Plus stream libraries

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

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

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

Simulation Engine Command LineQualifiers

The Aspen command invokes the Aspen Plus Simulation Engine from thecommand line. The available command line qualifiers are:aspen input_file [RunID] [NewRunid] [opts] [/help]

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

Page 30: APLUS 111 System Management

SystemOverview

2-10 System ManagementVersion 11.1

Typographical Conventions

Following are the conventions used in the simulation engine command linequalifiers:

Convention Represents

[ ] optional qualifier

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

Note For compatibility with standard UNIX conventions, options maybe introduced with a hyphen (–) instead of a slash (/). Optionsthat 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 thatyou type.

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

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

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

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

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

Page 31: APLUS 111 System Management

Chapter 2

System Management 2-11Version 11.1

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

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

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

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

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

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

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

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

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

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

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

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

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

❖ ❖ ❖ ❖

Page 32: APLUS 111 System Management

SystemOverview

2-12 System ManagementVersion 11.1

Page 33: APLUS 111 System Management

Chapter 3

System Management 3-1Version 11.1

3 Maintaining andUpdating Aspen Plus

This chapter discusses various levels of customization to the Aspen Plussimulation engine including the following topics:• Modification Levels in Aspen Plus• Maintaining User Routines• Building System Shared Libraries• Integrating In-House Models and Subroutines• Running a System Definition File (SDF) Report• Running the Aspen Plus Table Building System (TBS)• Converting Version 9.x TBS Input Files

Page 34: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-2 System ManagementVersion 11.1

Modification Levels in Aspen Plus

In Aspen Plus, you can make modifications at three levels:

Modify at this level For changes that

User† A single user or small group of users needs

In-house† Must be available to all users

System Affect the files delivered with Aspen Plus

†Does not affect the files delivered with Aspen Plus.

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

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

User and in-house features are generally upwardly compatible with new releases.Problems may occur if the user or in-house features use non-standard orundocumented 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 AddingUser and In-House Databanks, Chapter 4 and Aspen Plus Physical PropertyData.

User Modifications

User level modifications are generally made for specific simulation models, butcan 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

Page 35: APLUS 111 System Management

Chapter 3

System Management 3-3Version 11.1

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

In-House Modifications

In-house modifications are used when modifications need to be available for allAspen Plus users. In-house modifications should be performed by the Aspen Plusadministrator. In-house modifications include:• In-house databanks• Built-in user unit operation and property models• Insert files

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

System Modifications

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

Before creating or modifying system level files, make sure:• The current Aspen Plus version is installed• Your environment is set up for the correct version of Aspen Plus• You use the Aspen Plus system administrator account with privileges to read,

write, and delete files in the Aspen Plus directory tree

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

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

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

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

4. Before you modify an Aspen Plus unit operation model, cost block, utility, orphysical 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 mighthave.

Page 36: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-4 System ManagementVersion 11.1

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

6. The Aspen Plus installation creates the folderc:\Program Files\AspenTech\Aspen Plus 11.1\Engine\inhousefor storing in-house modifications, but you may store them elsewhere.

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 sourcecode. The source code is compiled using the host computer's native Fortrancompiler.

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

The user must supply all required object files for external Fortran subroutinesbefore beginning the run. To maintain consistent compiler options and to processINCLUDE statements, you must use the Aspcomp procedure to compile all userroutines.

Compiling User Routines

Use the Aspcomp procedure to compile user Fortran routines:

Operating System Command†

Windows ASPCOMP *.f dbg

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

Page 37: APLUS 111 System Management

Chapter 3

System Management 3-5Version 11.1

Overview of Debugging in Aspen Plus

Fortran code added by a user to a simulation model can be debugged using yourFortran compiler's symbolic debugger. Your debugger can be invoked for thefollowing categories of Fortran routines:• Inline Fortran• User models• In-house models

Debugging Inline Fortran

You can debug the Fortran source routine generated from non-interpretableinline Fortran blocks. For example, to cause the generated Fortran routine to becompiled with the debug option and write additional diagnostics concerning thedynamic link to the RunID.ld file, add these lines to your input file:DIAGNOSTIC

HISTORY SYS–LEVEL=8DEBUG DYNLINK=2

Note For Windows platforms, adding the diagnostics history line ismandatory for debugging.

Debugging User Routines on Windows

To debug user routines on Windows platforms, perform these steps:

1. From the Aspen Plus program group, open the Aspen Plus Simulation Enginewindow.

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

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

3. Debug link the shared library containing your user routines by increasing thesystem diagnostics level reporting. Add the following to your simulation inputfile:DIAGNOSTICSHISTORY SYS-LEVEL=8

DEBUG DYNLINK=2

4. Run an input file that requires the user routine(s). For example, if the inputfile is gmutest.inp and the RunID is test, type:aspen gmutest test

5. Invoke Microsoft Developer Studio and configure a workspace as explained inthe next example.

Page 38: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-6 System ManagementVersion 11.1

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

Example of a Windows Debugging Session

After invoking Microsoft Developer Studio, you must set up a workspace for debugging. InMicrosoft Developer Studio:

1. From the File menu, select Open.

2. In the Open File dialog box, navigate to the directory where the Aspen PlusSimulation Engine is installed. Select apmain.exe and click OK.

3. From the Project menu, select Settings (Alt+F7), and then select the Debugtab in the right pane.

4. Set the working directory to the full path for the directory where you ran theAspen gmutest test command in step 4 above. If you are using the Aspen Plusdefault directory, type:c:\Program Files\AspenTech\Working Folders\Aspen Plus 11.1

5. Set the Program arguments to the Run ID for your simulation. Type:TEST

6. Select OK.

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

8. In the Location tab in the Break at: text box, specify IT_USRDBG.

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

10. In the dialog box indicating that apmain.exe does not contain debugginginformation, click OK to continue.

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

12. When IT_USRDBG is reached, set breakpoints in your user routines byopening the Fortran file(s) containing your user routine(s). Select Open fromthe File menu, navigate to your working directory, then select filename.f. Setbreakpoints (F9) in your user routine and then Go (F5).

Note Microsoft Developer Studio may terminate abnormally if you tryto set a breakpoint in your user routine by selecting Breakpointsfrom the Edit menu at Step 12.

See the Microsoft Developer Studio online help for more information on using thedebugger.

Page 39: APLUS 111 System Management

Chapter 3

System Management 3-7Version 11.1

Debugging User Routines Without a Symbolic Debugger

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

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

2. Compile the routine using the Aspcomp procedure.

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

Building System Shared Libraries

The simulation engine contains a custom directory that contains all the modulesand corresponding Fortran files that can be customized for Version 10. Themodules are ppuser, zeinit, zemhtxu, and zeusermod.

Module Requirements

All Fortran routines listed below must be present when rebuilding the respectivemodule, 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 AspenPhysical Property System. Files for these modules are installedwith the APrSystem, by default in the directoryC:\Program Files\AspenTech\APrSystem 11.1\Engine\custom.Module zemhtxu is used only by Aspen Plus and its files are inC:\Program Files\AspenTech\Aspen Plus 11.1\Engine\custom.

Table 3.1 Module Routines

Module Routines

ppuser esmnu.f, esmnu0.f, kvlui.f, mdmon9.f, phcciu.f, phclcu.f

zeinit getprp.f, iappdb.f

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

zeusermod adcstu.f, adefnu.f, asradu.f, asrptu.f, blrusr.f, cstusr.f, eevalu.f, exmonu.f, fisymu.f, fpuser.f,getadu.f, iapusr.f, imhtxu.f, insimu.f, itsizu.f, itsubu.f, mhtcku.f, mhtwku.f, mmsrpu.f, mmsusr.f,npldsu.f, pdatfu.f, ppchku.f, rptusr.f, savusr.f, sempru.f, srpctu.f, sumusr.f, uvalab.f

This example illustrates rebuilding the ppuser module on Windows 95, 98 andNT systems. For rebuilding modules other than ppuser, substitute theappropriate module name. Follow these steps:

Page 40: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-8 System ManagementVersion 11.1

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

2. Use the Aspcomp command to compile your Fortran routines:

To compile Type this

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

aspcomp *.f ppuser

Objects with debug information aspcomp *.f dbg ppuser

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 inthe local directory.

Note Save the original .LIB and .DLL files before over-writing themwith the customized libraries.

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

Integrating In-House Models andSubroutines

If you have in-house models and subroutines that were developed for previousAspen Plus versions, perform these steps to integrate them into Version 11.1:

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

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

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

4. Test and debug proprietary unit operation and property models.

The sections following explain each of these steps in detail.

Page 41: APLUS 111 System Management

Chapter 3

System Management 3-9Version 11.1

Creating a Custom SDF File

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

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

For these models See

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

Physical Property Routines and Methods Chapter 5

2. Create your own custom version of the SDF. See Running the Aspen PlusTable Building System, this chapter. Place this SDF file in your localdirectory instead of in the system directory while you test yourcustomizations.

Converting Fortran Routines

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

Modifying Version 11.1 Routines to Call ProprietaryRoutines

If you want the Aspen Plus simulation engine to call your proprietary routines,you must obtain the source code for the appropriate Version 11.1 simulationengine interface routines. Modify the code to call your routines.

Page 42: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-10 System ManagementVersion 11.1

Running a System Definition File Report

You can use the Aspen Plus SDF Report System (SDFRPT) to produce formattedreports that show the information stored in SDF tables.

To run SDFRPT:

1. Use the command:sdfrpt sdfname outname

Where:

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

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

SDFRPT displays the following prompt:The following options are available for SDFRPT:

o Type in the name of a table. You can enter a ? before thename for partial matching.

o Type HELP or <CR> to get a list of tables.Enter a name or <CR> to get a list:

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

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

For example, entering PRS for the table name generates the following list:1. PRS PIPE TABLE2. PRS TRANSFLO VALVE TABLE3. PRS EMERGENCY RELIEF VENT TABLE4. PRS RUPTURE DISK TABLE5. PRS SAFETY RELIEF VALVE TABLE

SDFRPT performs partial matching if you enter a question mark (?) beforethe name. For example, entering ?DATA for the table name generates thefollowing list:1. DATA FILE SYMBOL TABLE2. PITZER MODEL DATA3. ELECTROLYTE NRTL MODEL DATA4. COAL PROPERTY DATABANK

Page 43: APLUS 111 System Management

Chapter 3

System Management 3-11Version 11.1

Two special table names appear on the list:• FULL• THE CONSTANTS TABLE

FULL produces the entire SDF contents. A full SDF report is more than 1500pages long. TBS generates the constants table when the SDF is built. TheCONSTANTS table can be reported, but the user cannot modify it. It lists:• SDF size information• Default constants used in the SDF

If you enter one of the following names, additional prompts appear:• COST BLOCK• PKW (Primary Keyword Tables)• UOSM (Unit Operation System Model)• UTILITY• REACTIONS

For example, if you enter UOSM, the following prompt appears:Enter <CR> to get a list or enter the name of the UOS model.

If you entered UOSM first, give the name of a UOS model next. If you enteredPKW, give the name of the PKW you want. If the name is misspelled, thefollowing message appears:Cannot find the UOS model name: xxxxxxDo you wish to try again? (y/n)

If you answer Then

Yes The initial prompt appears.

No The SDFRPT program is terminated.

SDFRPT generates a report file using the name you supplied. This report isdivided into two sections:• Table of contents• Formatted SDF tables

Page 44: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-12 System ManagementVersion 11.1

The following list contains the valid top level tables for SDFRPT:

Standard Option SetsComponent Attribute Type DefinitionsEncoded Major Property RoutesConventional Property Model DefsLabeled Common DefinitionsPhysical Property Subroutine ListMajor Property MapDefault Monitor CGT IndicesPKWCost BlockSubstream Type TableStream Attr Type TableBuilt-in Substream ID TableBuilt-in Substream Attribute Table The Constants Table Non-conven Top-level Tkw TablesVariable Type TableEcon Eval SKW IndexDistillation Curve TypesPC PropertiesProperty Package PropertiesProperty GroupsGroup Binary Parameter TablePitzer Model DataEquation of State Binary Parameter TableElectrolyte NRTL Model DataPCES Property Definition TableOld Group Liquid Binary Parameter TablePeriodic TablePP User Subroutine ListPRS Transflo Valve TablePRS Rupture Disk Table

Standard Major Property RoutesSubordinate Property Keyword ListEncoded Subordinate Property RoutesNon-conventional Property Model DefsData File Symbol TableLabeled Common ListSubordinate Property MapUOSMUtilityUnits Conversion TableSubstream Attr Type TableBuilt-in Substream Class TableBuilt-in Stream Class TableBuilt-in Stream Attribute TableConven Top-level TKW TablesFlowtran Block TableConvergence Table Special SKW TableFullDefault PC Cut Point TemperaturesPC Option SetsProperty Package Substream TypesGroup Parameter TableSymbolGroup Liquid Binary Parameter TableEquation of State Pure Parameter TablePCES Group Structure Definition TableOld Group Binary Parameter TableCoal Property DatabankReactionsPRS Pipe TablePRS Emergency Relief Vent TablePRS Safety Relief Valve Table

Running the Aspen Plus Table BuildingSystem

The Aspen Plus Table Building System (TBS) creates and maintains the SystemDefinition File (SDF). The SDF contains:• A complete definition of Aspen Plus input language syntax• Other information necessary to define Aspen Plus system capabilities

Page 45: APLUS 111 System Management

Chapter 3

System Management 3-13Version 11.1

The System Definition File

The SDF is located in:

Operating System Directory

Windows C:\Program Files\AspenTech\Aspen Plus 11.1\Engine\XEQ\SDFFIL.SDF†

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

The SDF is a structured file with individual entries called tables. There are threetypes of tables:• Primary Keyword Tables (PKW)• Secondary Keyword Tables (SKW)• Tertiary Keyword Tables (TKW)

Each table has:• SKW tables linked to a specific PKW table• TKW tables linked to a specific SKW table

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

For example, suppose you want to change the default for the maximum numberof 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) thatcontains the change for the MAXIT TKW.

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

Page 46: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-14 System ManagementVersion 11.1

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.

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

Operating System Command to extract TBS files

Windows C:\Program Files\AspenTech\APrSystem 11.1\Engine\xeq\extr_tbs.bat

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

For example, a TBS data file, STREAM.PKW, is used to define the streamparagraph in an Aspen Plus input file. STREAM.PKW contains PKW, SKW, andTKW 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 inputfile:STREAM FEED

MOLE-FLOW COMPONENT=WATER FLOW=100

Aspen Plus processes each keyword and tries to find the PKW table STREAM inthe SDF. Then Aspen Plus looks for the• SKW table MOLE-FLOW• TKW table COMPONENT and FLOW

Page 47: APLUS 111 System Management

Chapter 3

System Management 3-15Version 11.1

File Types

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

Table 3.2 File Types

File Type Table Data Description

.cst Cost block

.lcd Labeled COMMON definition

.pkw Primary keyword

.sto Standard property method

.uos Unit operation system model

.utl Utility model

.rxn Reaction model

.dat Data for miscellaneous table types

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

Where:

tabname = Name of the table

entrynam = A unique entry in the table

This line also denotes the beginning of a table entry. Therefore, if you want tochange a single number in any top-level table entry, you must use the entire fileas 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 forits 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

Page 48: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-16 System ManagementVersion 11.1

The files for creating the SDF are in the following directory. The header filesdefine the platform and initialize the SDF. The end files close the SDF.

Operating System Data Files

Windows C:\Program Files\AspenTech\APrSystem 11.1\Engine\TBS†

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

To update the system SDF, follow these steps:

1. Create or modify a TBS input file.

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

3. Run TBS on the copy of the SDF.

Every TBS input file has the following structure:Header Information.TBS table input data..End

The type of header information in the input file depends on whether a new SDFwill be created or an existing SDF will be modified. The best way to create a newSDF 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 beginswith the following line:tabname REPLACE entrynam

ortabname DELETE entrynam

Where:

tabname = Table name in columns 1-8

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

The words REPLACE or DELETE must be in columns 10-16. REPLACE eitheradds or replaces, depending on whether the entry exists. After the table namefollows the rest of the table input data. The input format is different for eachtable. Appendix B shows the input format for physical property routes andproperty methods. Contact the AspenTech Hotline for information on other tabletypes.

Page 49: APLUS 111 System Management

Chapter 3

System Management 3-17Version 11.1

Converting Version 9.x TBS Input Files

If you want to create your own SDF by using a TBS file from Aspen Plus Version9.x or using your own TBS file, you must add the following line right before thefirst SKW declaration:VIRT 0 0

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

The following TBS files need to have a VIRT statement:• All uos files (*.uos)• All cost blocks (*.cst)• All utility blocks (*.utl)• Convergence (cnvrgnce.dat)

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

Example of a TBS file with VIRT Statement

This example shows the use of the VIRT statement unit operation (UOS) model named XYZZ.UOSM REPLACE XYZZXYZZ UXYZZI 1 41 0 0-1 -1 -1 -999 1 0 000-1 -1 -1 -999 1 0

03

WORK DUMMY 2 20 1WORK IPTEMP 1 + 20 145 1 1WORK RPTEMP 2 + 20 146 1 1

0 SIZE AREASVIRT 0 0

1SKW SUBROUTINE SUBROUTINE SUBR 1

1TKW MODEL MODEL MODL 3

MISSING

❖ ❖ ❖ ❖❖ ❖ ❖ ❖❖ ❖ ❖ ❖❖ ❖ ❖ ❖

Page 50: APLUS 111 System Management

Maintainingand UpdatingAspen Plus

3-18 System ManagementVersion 11.1

Page 51: APLUS 111 System Management

Chapter 4

System Management 4-1Version 11.1

4 Configuring PhysicalProperty Databanks

This chapter explains how to add user or in-house databanks to Aspen Plus andhow to customize the user interface to reflect those changes. It includes thefollowing topics:• Adding User and In-House Databanks• Adding Binary or Pair Parameter Databanks• Adding Ionic Reactions to the Electrolyte Reaction Database

Once you add the databanks to the user interface, you will be able to:• Select the new databanks and their search order on the Components

Specifications Databanks sheet• Display the components on the Components Specifications Selection sheet or

in the Find Component dialog box

Adding User and In-House Databanks

To add user or in-house databanks, follow these steps:

1. Create the databanks in the Aspen Plus simulation engine.

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

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

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

5. Add Help for the databanks.

Page 52: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-2 System ManagementVersion 11.1

The following sections explain each step in detail.

Creating Databanks in the Aspen Plus SimulationEngine

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

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

For system and in-house databanks, you must either have write permission tothe Aspen Plus system directory for databanks or you must set the environmentvariable or symbol XDATA to point to the working directory where the databanksare to be created.

Aspen Plus Host Command to Set XDATA†

Windows set XDATA=db_working_directory

†Where db_working_directory is the complete directory specification for the system or in-house databank.

To create the databanks:

1. Create the DFMS input files containing all the physical property data.

2. Run the DFMS using this command:dfms input_file output_file

Where:

input_file = File containing DFMS input language. See Aspen PlusPhysical Property Data, Chapter 1. Input language mustappear in upper case. Do not enter the .inp extension inthe DFMS command.

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

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

Page 53: APLUS 111 System Management

Chapter 4

System Management 4-3Version 11.1

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

After creating your databank in Aspen Plus, define the databank location andcomponent 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. Storethe 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 allAspen Plus runs are made in the example directory\AspenTech\Working Folders\Aspen Plus 11.1\projecta. Create a DFMS input file, ppdata.inp,in \AspenTech\Working Folders\Aspen Plus 11.1\projecta. The file should contain thestatement: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 11.1\projecta, enter the following command at thecommand 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 directorymust be present:C:\Program Files\AspenTech\APrSystem 11.1\GUI\custom

Page 54: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-4 System ManagementVersion 11.1

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

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

The file format is:/* *//* Enclose your comments in slash-asterisk like this *//* */DBANK ADD mmdbnamedbtype passwordfilenamealias-1 longname-1 charge-1molwt-1 bp-1 vlstd-1cas-1 class-1alias-2 longname-2 charge-2molwt-2 bp-2 vlstd-2cas-2 class-2. . .

Where:mmdbname = Databank name (for a user databank) to be displayed by the

user interface on the Components Specifications Databanksheet. For an in-house databank, specify INHSPCD,INHSSOL, INHSAQUS, or INHSBIN.

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

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

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

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

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

The path may use the environment variable ${APRSYS} toindicate the Aspen Physical Property System Engine directory.For example, if APrSystem 11.1 is installed inC:\Program Files\AspenTech\APrSystem 11.1

and the databank files are located inC:\Program Files\AspenTech\APrSystem 11.1\Engine\Inhouse\Databank\

then you can specify${APRSYS}\Inhouse\Databank\project1.dat for filename.

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

Page 55: APLUS 111 System Management

Chapter 4

System Management 4-5Version 11.1

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

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

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

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

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

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

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

Page 56: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-6 System ManagementVersion 11.1

You cannot create your own component class. Use one of the following classesthat are currently used by the built-in system databanks.1-Alkenes Nitriles2,3,4-Alkenes NitroaminesAcetates n-AlcoholsAldehydes n-Aliphatic-acidsAliphatic-ethers n-Aliphatic-primary-aminesAlkylcyclohexanes n-AlkanesAlkylcyclopentanes n-AlkylbenzenesAlkynes Organic-saltsAnhydrides Organic/inorganic-compoundsAromatic-alcohols Other-aliphatic-acidsAromatic-amines Other-aliphatic-alcoholsAromatic-carboxylic-acids Other-aliphatic-aminesAromatic-chlorides Other-alkanesAromatic-esters Other-alkylbenzenesC,H,Br-compoundsC,H,F-compounds Other-amines/iminesC,H,I-compounds Other-condensed-ringsC,H,NO2-compounds Other-ethers/diethersC,H,multihalogen-compounds Other-hydrocarbon-ringsC1/C2-aliphatic-chlorides Other-inorganic-saltsC3/higher-aliphatic-chlorides Other-inorganicsCycloaliphatic-alcohols Other-monoaromaticsCycloalkanes Other-polyfunctional-C,H,OCycloalkenes Other-polyfunctional-organicsDialkenes Other-saturated-aliphatic-estersDicarboxylic-acids PeroxidesDimethylalkanes Polyfunctional-C,H,N,halide,(O)Diphenyl/polyaromatics Polyfunctional-C,H,O,NElements Polyfunctional-C,H,O,halideEpoxidesEthyl/higher-alkenes Polyfunctional-C,H,O,SFormates Polyfunctional-acidsInorganic-acids Polyfunctional-amides/aminesInorganic-bases Polyfunctional-estersInorganic-gases Polyfunctional-nitrilesInorganic-halides PolyolsIsocyanates/diisocyanates Propionates-and-butyratesKetones Silanes/siloxanesMercaptans Sodium-saltsMethylalkanes Sulfides/thiophenesMethylalkenes TerpenesMultiring-cycloalkanes Unsaturated-aliphatic-estersNaphthalenes

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

To remove the attribute:

1. Open an empty file, using a text editor, and import your databank input file.

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

3. Rename your new file with the original file name.

Page 57: APLUS 111 System Management

Chapter 4

System Management 4-7Version 11.1

Modifying the MMTBS Driver File for a User or In-HouseDatabank

You must modify the MMTBS driver file, tbprop.dat, to include your user orin-house databank.

In the tbprop.dat file, the delivered databanks are grouped together, as follows:INCLUDE polymer.datINCLUDE segment.datINCLUDE pure11.datINCLUDE pure10.datINCLUDE pure93.datINCLUDE pure856.datINCLUDE ethylene.datINCLUDE aqueous.datINCLUDE aqu92.datINCLUDE inorgani.datINCLUDE aspenpcd.datINCLUDE solids.datINCLUDE combust.dat

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

Running MMTBS to Add User and In-House Databanksto the User Interface

After creating your databank input file and modifying the MMTBS driver file,you need to update the user interface record definition file (RecDef) by runningMMTBS.

Enter the following command at the DOS prompt:mmcustom mmtbs

Adding Help for a User or In-House Databank

To create databank hypertext Help:

1. Open the file userdata.rtf using Microsoft Word.

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

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

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

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

Page 58: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-8 System ManagementVersion 11.1

Installing the Databanks in the System

After verifying that the databank has been correctly customized in the userinterface, you can install the user or in-house databank files in the systemdirectory. Enter the following command at the DOS prompt:custinst

Example for Adding a User Databank

Add a new user PP1 databank, USRPP1A, to the databank list on the ComponentsSpecifications Databanks sheet. K123 is the name of the databank to be displayed in theAvailable Databanks list on this sheet. This databank was created on the Aspen Plus hostcomputer with the file namec:\AspenTech\Working Folders\Aspen Plus 11.1\Project K123\USRPP1A.DAT. The passwordfor the databank is PRJK123.

1. Create the following user interface databank input file, k123.dat:/* *//* databank used for Project K123 *//* */DBANK ADD K123USRPP1 PRJK123C:\AspenTech\Working Folders\Aspen Plus 11.1\Project K123\USRPP1A.DATHBR HYDROGEN-BROMIDE 080.9119 206.450 0.535578E-0110035-10-6 Inorganic-acidsKBR POTASSIUM-BROMIDE 0119.0020 1653.15 0.559910E-01* Inorganic-halidesNABR SODIUM-BROMIDE 0102.8940 1663.82 0.439282E-017647-15-6 Sodium-saltsBR2 BROMINE 0159.8080 331.900 0.535578E-017726-95-6 Elements . . .

Page 59: APLUS 111 System Management

Chapter 4

System Management 4-9Version 11.1

2. In Tbprop.dat, an MMTBS driver file, add the INCLUDE K123.DAT line afterthe PURE93 databank:INCLUDE polymer.datINCLUDE segment.datINCLUDE pure11.datINCLUDE pure10.datINCLUDE pure93.datINCLUDE k123.datINCLUDE pure856.datINCLUDE ethylene.datINCLUDE aqueous.datINCLUDE aqu92.datINCLUDE inorgani.datINCLUDE aspenpcd.datINCLUDE solids.datINCLUDE combust.dat

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

4. Enter the following command to add the databank:mmcustom mmtbs

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

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

6. Go to the Components Specifications Databanks sheet and move K123 to thelist of selected databanks. Click the Components Find button on theComponents 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 SpecificationsDatabanks sheet.

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

Page 60: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-10 System ManagementVersion 11.1

Adding Binary or Pair ParameterDatabanks

In addition to the databanks described in the previous section, the user interfacecontains special databanks for binary and pair parameters. These parametersappear on the Properties Parameters BinaryInteraction and ParametersElectrolytePair forms. These databanks are available only when you use the userinterface. 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 userinterface files. Perform these steps:

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

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

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

4. Test your changes in the user interface.

Creating a User Interface Binary or Pair ParameterInput File

You can create your own binary or pair parameters databank by creating adatabank input file. This file contains the following information for the databank:• Parameter names• Equation-of-state and/or activity coefficient model to which the parameters

apply• Component aliases and parameter values

Page 61: APLUS 111 System Management

Chapter 4

System Management 4-11Version 11.1

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 GAMKIJparamtypen_sectionsn_params paramname sym_1 sym_2 . . .n_labellinesn_labels label1 label2 . . .. . .. . .n_labels label1 label2 . . .n_modellineseosmodel gammamodel databanknamen_comp_pairscomp-i comp-j data1 data2 . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .comp-i comp-j data1 data2 . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .. . .. . .

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

Page 62: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-12 System ManagementVersion 11.1

Table 4.1 Parameters for the Binary and Pair Parameter Input File

Parameter Description

paramtype Parameter type (currently unused). Enter 1.

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

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

paramname Parameter name (for example, NRTL)

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

sym_2 Symmetry code of the second element of a vector parameter

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

n_labellines Number of lines used to specify parameter labels

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

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

n_modellines Number of model lines. Enter 1.

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

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

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

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

comp–i, comp–j Component aliases. See Component Aliases, this chapter.

data1 Parameter 1 for the component pair. Enter two parameters per element for asymmetricparameters (symmetry code = 0). Enter one parameter per element for all other symmetrycodes.†

data2 Parameter 2 for the component pair

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

Page 63: APLUS 111 System Management

Chapter 4

System Management 4-13Version 11.1

Number of Parameter Sections

You can use n_sections to put more than one parameter in the same file. Thefollowing example shows how to specify n_sections as 2 for the GMELCC andGMELCD pair parameters:DBANK REPLACE GAMKIJ121 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. Thefollowing example shows how to specify n_params = 2 for the symmetric binaryparameters BWRKV and BWRKT.DBANK REPLACE GAMKIJ112 BWRKV 2 BWRKT 2......

List only one parameter (n_params = 1) when you specify a vector or multipleelement 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 jiseparately. For example, for element 1 of NRTL you must enter both aij andaji.

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

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

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

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

Page 64: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-14 System ManagementVersion 11.1

In another example, HENRY has six elements. Elements 1, 2, 3, and 4 areasymmetric, while the rest are symmetric. For elements 1-4, only the ijparameters are meaningful.DBANK REPLACE GAMKIJ111 HENRY 1 1 1 1 2 2

Labels on Each Row

You can use n_labels to indicate the number of labels in each row. Use label1 andlabel2 to specify the labels.

For example, NRTL needs three lines (n_labellines = 3) to specify all labels. Eachline has four labels (n_labels = 4)34 aij aji bij bji4 cij dij eij eji4 fij fji Tlower Tupper

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

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

Component Aliases

You can use the comp-i and comp-j variables to indicate component aliases forcomponents i and j.

For pair parameters, use a $ between the aliases of two ionic species that formthe electrolyte. For example, for GMELCC pair parameters of H2O and (H+ andHCO3–) enter:1 GMELCC 012 cij cji1ESRK GMENRTL ENRTL-RK302H2O H+$HCO3- 8.045000 -4.072000...

The databank name is ENRTL–RK.

Templates for Commonly Used Headers

This section provides input file header templates for the following commonlyused binary and scalar parameters:• NRTL binary parameters• Wilson binary parameters• Scalar parameters

Page 65: APLUS 111 System Management

Chapter 4

System Management 4-15Version 11.1

These templates are available online in the directoryC:\Program Files\AspenTech\APrSystem 11.1\GUI\custom\Examples.

NRTL Binary Parameters

The following template shows the NRTL–RK databank for the NRTL binaryparameters, with Redlich–Kwong equation of state for the vapor phase:DBANK REPLACE GAMKIJ111 NRTL 0 0 2 2 0 0 2 234 aij aji bij bji4 cij dij eij eji4 fij fji Tlower Tupper1ESRK GMRENON NRTL-RK2HCLO H2O -7.175849 11.25094 0.0000 0.0000

0.3000 0.0000 0.0000 0.00000.0000 0.0000 273.15 373.15

CCL4 H2O -2.297253 97.28083 0.0000 0.00000.3000 0.0000 0.0000 0.00000.0000 0.0000 298.15 383.15

Wilson Binary Parameters

The following template shows the VLE-LIT databank for the Wilson binaryparameters, with ideal gas law for the vapor phase. You can use the sametemplate for UNIQUAC. Simply change the parameter name to UNIQ, and theGAMMA model name to GMUQUAC, as shown:DBANK REPLACE GAMKIJ111 WILSON 0 0 0 0 2 234 aij aji bij bji4 cij cji dij dji2 Tlower Tupper1ESIG GMWILSON VLE-LIT2H2O C2H6OS 1.3726 -1.3726 121.5388 -838.3509

0.0 0.0 0.0 0.0363.1500 443.1500

H2O C4H10O2-D2 1.5871 -1.5871 -340.0639 -206.56260.0 0.0 0.0 0.0363.1500 413.1500

Page 66: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-16 System ManagementVersion 11.1

Scalar Parameters

Use the following template for scalar parameters, such as the Hayden-O'Connellbinary parameter, HOCETA:DBANK REPLACE GAMKIJ111 HOCETA 211 aij1ESHOC ALL EOS-LIT1C2H4O2 C2H4O2 4.5

Modifying the MMTBS Driver File

You must update the MMTBS driver file, Tbprop.dat, to include your binary orpair parameter databank. You can create a new section in Tbprop.dat for yourbinary or pair parameter databank files. Or add your files to the end of theDatabank Input Files section. Add files to the Tbprop.dat file using theINCLUDE 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 needto run MMTBS to update the user interface to reflect your changes. To runMMTBS, use the following command:mmcustom mmtbs

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

Testing Your Changes in the User Interface

To test your changes, follow these steps:

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

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

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

Page 67: APLUS 111 System Management

Chapter 4

System Management 4-17Version 11.1

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

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

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

Adding Ionic Reactions to the ElectrolyteReaction Database

The user interface contains a database for ionic reactions, which is used by theElectrolyte Expert System. The database contains the following information:• Complete dissociation reaction (DISS)• Partial dissociation reaction (STOIC)• Salt precipitation reaction (SALT)• Equilibrium constants for the STOIC reaction• Equilibrium constants for the SALT reaction• Composition scale of the equilibrium constants (molal or mole fraction)

To create an ionic reactions databank, you must:

1. Create an ionic reactions databank input file.

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

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

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

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

Page 68: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-18 System ManagementVersion 11.1

Creating an Ionic Reactions Input File

The file format for the ionic reactions input file is:REACTNS ADD rxn_name

rxn_typen_compscomp_alias coeff salt-flag...K-stoic or K-salt or *comp_scale

Table 4.2 describes parameters for this file.

Table 4.2 Parameters for the Ionic Reactions Input File

Parameter Description

rxn_name Reaction name

rxn_type Reaction type:DISS = Complete dissociationSTOIC = Partial dissociation, equilibrium reactionSALT = Salt precipitation reaction

n_comps Number of components involved in this reaction

comp_alias Component alias

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

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

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

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

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

Page 69: APLUS 111 System Management

Chapter 4

System Management 4-19Version 11.1

Example of an Equilibrium Reaction for H2S in Water to Form H3O+ andHS– Ions

This example includes STOIC equilibrium constants on a molality scale.REACTNS ADD H2S

STOIC4H2S -1H2O -1H3O+ 1HS- 1218.599 -12995.4 -33.5471 0MOLAL

Example of a Complete Dissociation Reaction of NaCl into Na+ and Cl–IonsREACTNS ADD NACLDISS

DISS3NACL -1 1NA+ 1 0CL- 1 0*

Example of Salt Precipitation Reaction for NaCl

SALT equilibrium constants are on a mole-fraction scale.REACTNS ADD NACLSALT

SALT3NACL -1 1NA+ 1 0CL- 1 0-203.5875 4381.176 35.87518 -.06721607MOLEFRAC

Modifying the MMTBS Driver File

To include your ionic reactions databank, you must modify the MMTBS driverfile, tbprop.dat. Add your file to the tbprop.dat file using the INCLUDEstatement. The system reactions databank is stored in the reactns.dat file. In thefollowing example, your own reaction databank, stored in the rxn_cus.dat file, isadded to the MMTBS driver file:/* *//* Reactions table *//* */INCLUDE reactns.datINCLUDE rxn_cus.dat

Page 70: APLUS 111 System Management

ConfiguringPhysicalPropertyDatabanks

4-20 System ManagementVersion 11.1

Running MMTBS to Update the User Interface ReactionDatabank

To run MMTBS, enter the following command at the DOS prompt:mmcustom mmtbs

To test your customization, launch the Aspen Plus User Interface and open thefile 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 theunmodified system copy of the RecDef file. Verify that the reactions you addedcan be selected in the Reactions Chemistry forms, or in the Electrolyte Wizard.

Enter this command at the DOS prompt to install the changes made to the userinterface system directory:custinst

❖ ❖ ❖ ❖❖ ❖ ❖ ❖❖ ❖ ❖ ❖❖ ❖ ❖ ❖

Page 71: APLUS 111 System Management

Chapter 5

System Management 5-1Version 11.1

5 Configuring PhysicalProperty Methods

This chapter describes how to customize the Aspen Plus physical propertysystem. These customizations apply to all Aspen Plus and Properties Plus runs.This chapter includes the following topics:• Overview• Customizing the Aspen Plus Simulation Engine• Customizing the Aspen Plus User Interface• Creating In-House Physical Property Models, Routes, and Methods

Page 72: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-2 System ManagementVersion 11.1

Overview

The major steps for customizing the physical property methods are:

1. Modify or create Aspen Plus simulation engine customization files.

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

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

4. Use essentially the same customization files from the Aspen Plus simulationengine to customize the user interface. Run the Aspen Plus user interfaceTable Building System (MMTBS) to update the user interface RecordDefinition (RecDef) files.

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

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

7. Test your changes in the Aspen Plus user interface.

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

Customizing the Aspen Plus SimulationEngine

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

Follow these steps to customize the simulation engine:

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

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

Page 73: APLUS 111 System Management

Chapter 5

System Management 5-3Version 11.1

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

4. Install the SDF file in Aspen Plus.

The following sections describe these steps.

Modifying the TBS Customization Files

Table 5.1 lists the TBS files you can use to customize the physical propertysystem. 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 customizethe user interface. For more information on customizing the user interface, seeAppendix A.

It is recommended that you create a special directory under the Aspen Plusdirectory 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 the appropriate command, asfollows:

Operating System Command

Windows† CD "C:\Program Files\AspenTech\APrSystem 11.1\Engine\inhouse"

†If you install the Aspen Plus simulation engine on a different disk drive or directory, enter the appropriate drive name anddirectory location.

Table 5.1 TBS Files Used to Customize the Physical Property System

File Name Description

*.lcd† Property parameter definitions

ppcnvpmd.dat Conventional property model definitions

ppenmprt.dat Encoded major property routes

ppensprt.dat Encoded subordinate property routes

ppsublst.dat Property subroutine list

*.sto†† Property methods

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

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

Page 74: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-4 System ManagementVersion 11.1

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

Operating System Directory

Windows† C:\Program Files\AspenTech\APrSystem 11.1\Engine\tbs

†If you install Aspen Plus on a different disk drive or directory, enter the appropriate drive name anddirectory location.

These files are delivered in compressed format. You must extract them by usingthe following command:

Operating System Command

Windows extr_tbs

Creating the TBS Update File From TBS CustomizationFiles

After you customize the TBS files to include the new models, routes, andproperty methods, you must prepare these files for running the Aspen Plus TBSto 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 runTBS to update the SDF. The original TBS file, filename.dat, is unchanged. Thenew 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 forrunning TBS, and follow these steps:

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

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

3. Use the following command:maketbs @filename.lis

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

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

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

Page 75: APLUS 111 System Management

Chapter 5

System Management 5-5Version 11.1

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 PlusSystem Definition File (SDF):

OperatingSystem

Command

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

†If you install Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location.

2. Run the TBS using the TBS update file, tbsupd.dat, created in the previoussection:tbs tbsupd.dat

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

Installing the SDF File in Aspen Plus

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

OperatingSystem

Command†

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

†You must remove write protection from the system SDF before copying the new file.

††If you install Aspen Plus on a different disk drive or directory, enter the appropriate drive name and directory location.

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

Important Keep the customized TBS files for customizing futureversions of the Aspen Plus simulation engine and userinterface.

Page 76: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-6 System ManagementVersion 11.1

Customizing the Aspen Plus UserInterface

To customize the user interface, follow these steps:

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

2. Modify any related Help files.

3. Modify the MMTBS and Help driver files.

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

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

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

Creating In-House Physical PropertyModels, Routes, and Methods

Familiarize yourself with the concepts of physical property models, routes, andmethods before you attempt to create them in-house. For more information aboutthese concepts, see Aspen Plus 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 Plussimulation engine, customize the user interface. This ensures that the newmodels, routes, and methods appear when you use the list box on Propertiesforms.

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

Page 77: APLUS 111 System Management

Chapter 5

System Management 5-7Version 11.1

Adding Models, Routes, and Property Methods to theSimulation Engine

To add property models, routes, and methods to the simulation engine, you mustcreate a customization directory in which to work, then follow these steps:

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

2. Define each new major property route referenced by the new property methodusing the Major Property Route table (see Figure B.4). Look for asystem-defined route in the ppenmprt.dat file that has similar characteristicsas 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 asimilar route, you must create the route using the format in Figure B.4.

The new major property route can reference other major or subordinateproperty routes and property models, as follows:• For each new major property route, repeat step 2.• For each new subordinate property route, follow step 3.• For each new property model, follow step 4.

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

The new subordinate property route can reference other major or subordinateproperty routes. It can also reference property models. For each new majorproperty 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 ModelDefinition table (Figure B.1). Search the ppcnvpmd.dat file for asystem-defined model that has characteristics similar to the new model. Ifyou can locate a similar model, copy it, assign to it a new model name, andadd your changes.

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

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

Page 78: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-8 System ManagementVersion 11.1

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

System Fortran routine To call the Filename

ppuser_phcciu Initialization subroutine phcciu.f

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

ppuser_mdmon9 Remaining mainline subroutines mdmon9.f

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

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

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

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

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

Example for Adding a Property Method to the Simulation Engine

This example creates a customized version of the PENG-ROB property method, called PR-LK.The new property method uses:• The Lee-Kesler model to calculate mixture enthalpy, entropy, and Gibbs energy• An in-house model, VLMOD, to calculate liquid mixture molar volume

The VLMOD model is coded in a Fortran subroutine called VL900. You must create:• A new route, VLNEW, to use the VLMOD model• A new property parameter, VLLC, to store and pass the parameter for the VLMOD model

To add a property method to the simulation engine:

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

Page 79: APLUS 111 System Management

Chapter 5

System Management 5-9Version 11.1

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

Replace this route With this route

HVMX24 HVMX13

HLMX106 HLMX13

GVMX30 GVMX13

GLMX106 GLMX13

SVMX24 SVMX13

SLMX98 SLMX13

VLMX20 VLNEW

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

The underlined entries in the following table show how the routes appear in thepr-lk.sto file:PPSTOPTN REPLACE PR-LK

35PHIVMX PHIVMX38 PHILMX PHILMX104 HVMX HVMX13HLMX HLMX13 GVMX GVMX13 GLMX GLMX13SVMX SVMX13 SLMX SLMX13 VVMX VVMX24VLMX VLNEW MUVMX MUVMX02 MULMX MULMX03KVMX KVMX01 KLMX KLMX01 DVMX DVMX02DLMX DLMX02 SIGLMX SIGLMX02 PHIV PHIV09PHIL PHIL11 HV HV09 HL HL12GV GV09 GL GL11 SV SV09SL SL10 VV VV07 VL VL01DL DL01 DV DV02 MUL MUL01MUV MUV01 KV KV01 KL KL01SIGL SIGL01 PHIS PHIS06

2. 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 11VLMX VLMOD 1 9000000

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

3. In the ppcnvpmd.dat file, define the new model VLMOD. This model references theFortran subroutine VL900 and the property parameter VLLC. This model does not usework 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:

Page 80: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-10 System ManagementVersion 11.1

PPCNVPMD REPLACE VLMODVLMX 900 0111 00001 000010001VL9001VLLC

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

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

4. In the ppsublst.dat file, define the new subroutine VL900. Add the following line to the endof the ppsublst.dat file:PPSUBLST REPLACE VL900

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

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

User Molar Volume1 1 01 900 11D35144144

6. Prepare these TBS files for running TBS by creating the TBS update file. In a new filecalled pr-lk.lis, list all the TBS files:pr-lk.stoppenmprt.datppcnvpmd.datppsublst.datvllc.lcd

Create the TBS update file by using the command:maketbs @pr-lk.lis

This command creates the tbsupd.dat file.

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

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

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

Page 81: APLUS 111 System Management

Chapter 5

System Management 5-11Version 11.1

Adding Models, Routes, and Property Methods to theAspen Plus User Interface

You can modify simulation engine files to include models, routes, and propertymethods. You can also use most of these files to change the user interface RecordDefinition (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 thecustomization directory:C:\Program Files\AspenTech\APrSystem 11.1\GUI\custom

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

Then follow these steps:

1. To verify the customization, start the user interface and review the newmodels, routes, and property methods on the appropriate forms. To start theAspen Plus User Interface and use the locally modified RecDef file, you mustopen 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, usingthe following command:custinst

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

Page 82: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-12 System ManagementVersion 11.1

Adding Prompts and Help for Models, Routes, andProperty Methods

To add prompts and Help for your models, routes, and property methods, followthese steps:

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

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

3. Process the Help file to incorporate your prompts and Help into the userinterface 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 thefollowing:• A two-line prompt• Link to the Windows Help created in step 1.

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

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

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

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

Page 83: APLUS 111 System Management

Chapter 5

System Management 5-13Version 11.1

Example for Adding a Property Method to the User Interface

This example is a continuation of the example Adding a Property Method to the SimulationEngine. You can directly use the TBS file ppenmprt.dat created in the previous example afterdeleting all lines starting with the "C$" characters.

Append this file To this user interface file

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

vllc.lcd (parameter definition) lcd_cust.dat

vlmod.dat (model definition) mdl_cust.dat

vlnew.dat (route definition) ppenmprt.dat

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

Copy the above files to the customization directory for the Aspen Plus user interface, asfollows:C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom

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

1. Run MMTBS to update the user interface RecDef files using the TBS input files youcreated:mmcustom mmtbs

2. Create a new file, pr_lk.hxt, to store all your Help and prompts. To add the user interfaceHelp and prompts for the new property method PR-LK, add the following to the pr_lk.hxtfile:>p_replace P_PPSTOPTN_PR-LKPeng-Robinson with Lee-Kesler for enthalpy and in-house modelfor liquid molar volume. Help for description>endmessage

>h_replace H_PPSTOPTN_PR-LKcustom.hlp #1>endmessage

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

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

3. Add a prompt for the new major property route VLNEW to the pr_lk.hxt file.>p_replace P_PPENMPRT_VLMX_VLNEWLiquid 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_VLMODIn-house model for liquid mixture molar volume>endmessage

5. Add the prompt for the new liquid molar volume parameter VLLC to the pr_lk.hxt file:>p_replace P_PPLCDEFS_VLLCParameter for the in-house model for liquid mixture molar volume, VLMOD>endmessage

Page 84: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-14 System ManagementVersion 11.1

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

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

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

9. Examine the new prompts associated with these entries.

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

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

12. Install the RecDef and Help files into the user interface system directory by using thecommand:custinst

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

Page 85: APLUS 111 System Management

Chapter 5

System Management 5-15Version 11.1

Figure 5.1 shows an edited custom.rtf page.

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

#$>PR-LK Equation of State

This method employs the Standard Peng-Robinson Equation of State with the following changesto the listed properties below:

Property Change

Liquid Mixture Enthalpy Uses Lee-Kesler Enthalpy Model.

Liquid Mixture Entropy Uses Lee-Kesler Entropy Model.

Liquid Mixture Gibbs Free Energy Uses Lee-Kesler Gibbs Free Energy Model.

Liquid Molar Volume In-House Model.

# PR-LK Equation of State$ PR-LK Equation of State> Main

❖ ❖ ❖ ❖❖ ❖ ❖ ❖❖ ❖ ❖ ❖❖ ❖ ❖ ❖

Page 86: APLUS 111 System Management

ConfiguringPhysicalPropertyMethods

5-16 System ManagementVersion 11.1

Page 87: APLUS 111 System Management

Chapter 6

System Management 6-1Version 11.1

6 Configuring PressureRelief, Pipe, and ValveEquipment 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

Overview

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

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

Page 88: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-2 System ManagementVersion 11.1

The following data files can be changed:

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

This file Contains data for

liqtable.dat Liquid service safety relief valves

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

rupture.dat Rupture disks

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

ervtable.dat Emergency relief vents

transflo.dat Valves used in the inlet and tail pipes

valve.dat Valves used in the Valve unit operation model

Liquid Service Safety Relief Valves forPressure Relief

The Pres-Relief ReliefDevice SafetyValve sheet contains a table of liquid servicesafety relief valves. Aspen Plus uses this table if Service="Liquid only." The userchooses:• Valve type• Manufacturer• Series• Nominal diameter

Aspen Plus retrieves these specifications from the table:• Throat diameter• Inlet diameter• Outlet diameter• Discharge coefficient• Over-pressure factor

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

Page 89: APLUS 111 System Management

Chapter 6

System Management 6-3Version 11.1

The over-pressure factor defaults to 1.1. To customize the table, modify theliqtable.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 LIQUIDno_types

name_typeino_manuf

name_manufjno_series

serieskno_sizes

sizem t_diamm i_diamm o_diamm cdm opfmsizem+1 t_diamm+1 i_diamm+1 o_diamm+1 cdm+1 opfm+1...

seriesk+1...

name_manufj+1...

name_typei+1...

Where:no_types = Number of typesname_typei = Name of ith type. Repeat this section for each type.no_manuf = Number of manufacturersname_manufj = Name of jth manufacturer. Repeat this section for each

manufacturer.no_series = Number of series from the jth manufacturerseriesk = Name of kth series. Repeat this section for each series.no_size = Number of sizes for kth seriessizem = A character string specifying the nominal size, up to 20

characterst_diamm = Throat diameter for mth size in inchesi_diamm = Inlet diameter for mth size in incheso_diamm = Outlet diameter for mth size in inchescdm = Discharge for mth size coefficientopfm = Over-pressure factor for mth size factor

Page 90: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-4 System ManagementVersion 11.1

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

Figure 6.2 liqtable.dat File

Keywords and Data CommentsPRSRV REPLACE LIQUID Liquid service table1 There is one type.CONV The type is CONV.2 There are two manufacturers.CROSBY The first manufacturer is CROSBY.JLT The series is JLT.3 There are three sizes for series JLT.1_2_0.398_(D) 0.398 1.049 2.067 0.729 1.1

size t_diam i_diam o_diam cd opf†

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

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

DRESSER The second manufacturer is DRESSER.1 There is one series.1900 The series is 1900.4 There are four sizes for series 1900.1_2_0.4036_(D) 0.4036 1.049 2.067 0.744 1.1

size t_diam i_diam o_diam cd opf†

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

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

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

†Where:size = Valve sizet_diam = Throat diameter in inchesi_diam = Inlet diameter in incheso_diam = Outlet diameter in inchescd = Discharge coefficientopf = Over-pressure factor

Page 91: APLUS 111 System Management

Chapter 6

System Management 6-5Version 11.1

Gas/2-Phase Service Safety Relief Valvesfor Pressure Relief

The Pres-Relief ReliefDevice SafetyValve sheet also contains a table ofgas/2-phase service safety relief valves. Aspen Plus uses this table ifService="Gas or 2-phase." The user chooses:• Valve type• Manufacturer• Series• Nominal diameter

Aspen Plus retrieves these specifications from the table:• Throat diameter• Inlet diameter• Outlet diameter• Discharge coefficient

Page 92: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-6 System ManagementVersion 11.1

To customize the table, modify the gastable.dat file. Figure 6.3 shows theorganization 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-PHASEno_types

name_typeino_manuf

name_manufjno_series

serieskno_size

sizem t_diamm i_diamm o_diamm cdmsizem+1 t_diamm+1 i_diamm+1 o_diamm+1 cdm+1...

seriesk+1...

name_manufj+1...

name_typei+1...

Where:no_types = Number of typesname_typei = Name of ith typeno_manuf = Number of manufacturersname_manufj = Name of jth manufacturer. Repeat this section for each

manufacturer.no_series = Number of series from the jth manufacturerseriesk = Name of kth series. Repeat this section for each series.no_size = Number of sizes for kth seriessizem = A character string specifying the nominal size, up to 20

characters.t_diamm = Throat diameter for mth size in inchesi_diamm = Inlet diameter for mth size in incheso_diamm = Outlet diameter in inchescdm = Discharge coefficient

Page 93: APLUS 111 System Management

Chapter 6

System Management 6-7Version 11.1

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

Figure 6.4 gastable.dat File

Keywords and Data CommentsPRSRV REPLACE GAS/2-PHASE Gas or 2-phase service table.1 There is one type.CONV The type is CONV.2 There are two manufacturers.CROSBY The first manufacturer is CROSBY.1 There is one series.JOS The series is JOS.3 There are three sizes for series JOS.1_2_0.398_(D) 0.398 1.049 2.067 0.961

size t_diam i_diam o_diam cd†

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

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

DRESSER The second manufacturer is DRESSER.1 There is one series.1900 The series is 1900.4 There are four sizes for series 1900.1_2_0.4306_(D) 0.4036 1.049 2.067 0.950

size t_diam i_diam o_diam cd†

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

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

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

†Where:size = Valve sizet_diam = Throat diameter in inchesi_diam = Inlet diameter in incheso_diam = Outlet diameter in inchescd = Discharge coefficient

Page 94: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-8 System ManagementVersion 11.1

Rupture Disks for Pressure Relief

The Pres-Relief ReliefDevice RuptureDisk sheet contains the rupture disks table.The user chooses:• Manufacturer• Style• Nominal diameter

Aspen Plus retrieves these specifications from the table:• Actual diameter• Discharge coefficient

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

Figure 6.5 Rupture Disks File Organization

PRRUP REPLACE manufno_style

name_styleino_sizesnom_diamj act_diamj cdjnom_diamj+1 act_diamj+1 cdj+1...

name_stylei+1...

Where:manuf = Manufacturer typeno_style = Number of stylesname_stylei = Name of ith style. Repeat this section for each style.no_sizes = Number of sizes for ith stylenom_diamj = Nominal diameter for jth size, up to 10 charactersact_diamj = Actual diameter in inches for jth sizecdj = Discharge coefficient for jth size

Page 95: APLUS 111 System Management

Chapter 6

System Management 6-9Version 11.1

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

Figure 6.6 rupture.dat File

Keywords and Data CommentsPRRUP REPLACE ZOOK The first manufacturer is ZOOK.2 There are two styles.MONO The first style is MONO.3 There are three sizes of style MONO..5-IN .5 .888

nom_diam act_diam cd†

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

1-IN 1. .888nom_diam act_diam cd†

INVERTED The second style is INVERTED.2 There are two sizes of style INVERTED..5-IN .5 .779

nom_diam act_diam cd†

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

PRRUP REPLACE FIKE The second manufacturer is FIKE.2 There are two styles.P The first style is P.3 There are three sizes of style P..5-IN .5 .62

nom_diam act_diam cd†

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

1-IN .9568 .62nom_diam act_diam cd†

CP The second style is CP.4 There are four sizes of style CP..5-IN .5 .62

nom_diam act_diam cd†

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

1-IN .9568 .62nom_diam act_diam cd†

1.5-IN 1.5 .62nom_diam act_diam cd†

†Wherenom _diam = Nominal diameteract_diam = Actual diameter in inchescd = Discharge coefficient

Page 96: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-10 System ManagementVersion 11.1

Pipes for Pressure Relief and the PipeModel

The Pres-Relief InletPipes , Pres-Relief TailPipes, and Pipe Setup forms containthe pipe schedule table. The user chooses:• Material• Schedule• Nominal diameter

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

Figure 6.7 Pressure Relief Pipes File Organization

PRPIPE REPLACE materialno_sch

scheduleino_diam

nom_diamj act_diamj roughnessjnom_diamj+1 act_diamj+1 roughnessj+1...

schedulei+1...

Where:material = Material type, up to 12 charactersno_sch = Number of schedules available for material typeschedulei = Schedule value for ith schedule, up to 10 characters. Repeat

this section for each schedule.no_diam = Number of diameters for this schedulenom_diamj = Nominal diameter for jth diameter in inches, up to 10

characters.act_diamj = Actual internal diameter for jth diameter in inchesroughnessj = Absolute roughness in feet

Page 97: APLUS 111 System Management

Chapter 6

System Management 6-11Version 11.1

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

Figure 6.8 pipe.dat File

Keywords and Data CommentsPRPIPE REPLACE CARBON-STEEL The material is carbon-steel.2 There are two schedules.10 The first schedule is schedule 10.3 There are three sizes for schedule 10.0.25-IN 0.410 .00015

nom_diam act_diam roughness†

0.375-IN 0.545 .00015nom_diam act_diam roughness†

0.500-IN 0.674 .00015nom_diam act_diam roughness†

20 The second schedule is schedule 20.3 There are three sizes for schedule 20.1-IN 1.073 .00015

nom_diam act_diam roughness†

2-IN 2.111 .00015nom_diam act_diam roughness†

3-IN 3.164 .00015nom_diam act_diam roughness†

†Where:nom_diam = Nominal diameteract_diam = Actual diameter in inchesroughness = Absolute roughness in feet

Page 98: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-12 System ManagementVersion 11.1

Emergency Relief Vents for PressureRelief

The Pres-Relief ReliefDevice ReliefVent sheet contains a table of emergency reliefvents. The user chooses:• Manufacturer• Style• Nominal diameter

Aspen Plus retrieves these specifications from the table:• Diameter• Recommended setpoint

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

Figure 6.9 Emergency Relief Vents File OrganizationPRERV REPLACE manufno_style

name_stylejno_sizes

nom_sizej act_diamj setpointjnom_sizej+1 act_diamj+1 setpointj+1...

name_stylej+1...

no_stylei+1...

Page 99: APLUS 111 System Management

Chapter 6

System Management 6-13Version 11.1

Where:manuf = Manufacturer typeno_style = Number of styles for ith manufacturername_stylei = Name of styleno_sizes = Number of sizes in stylenom_diamj = Nominal diameter for jth size, up to 10 characters.act_diamj = Actual diameter in inches for jth sizesetpointj = Suggested setpoint in psig for jth size

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

Figure 6.10 ervtable.dat File

Keywords and Data CommentsPRERV REPLACE PROTECTOSEAL The first manufacturer is PROTECTOSEAL.2 There are two styles.7800 The first style is 7800.3 There are three sizes in this style.2-IN 1.888 -2

nom_diam act_diam setpoint†

3-IN 2.764 -2nom_diam act_diam setpoint†

4-IN 3.598 -2nom_diam act_diam setpoint†

9800 The second style is 9800.2 There are two sizes in this style.2-IN 1.487 2

nom_diam act_diam setpoint†

3-IN 2.263 2nom_diam act_diam setpoint†

PRERV REPLACE GROTH The second manufacturer is GROTH.1 There is one style.2100 The first style is 2100.3 There are three sizes in this style.16-IN 8.016 2

nom_diam act_diam setpoint†

20-IN 9.944 2nom_diam act_diam setpoint†

24-IN 12.092 2nom_diam act_diam setpoint†

†Where:nom_diam = Nominal diameteract_diam = Actual diameter in inchessetpoint = Suggested setpoint in psig

Page 100: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-14 System ManagementVersion 11.1

Inlet and Tail Pipe Valves for PressureRelief

The Pres-Relief InletPipes and Pres-Relief TailPipes forms also contain a valvetable that you can customize. Although designed for transflo valves, this tablecan include any valve that fits into the existing format. The user chooses:• Manufacturer• Style• Nominal diameter

Aspen Plus retrieves these specifications from the table:• Flow area• Flow coefficient (Cv)

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

2

4891CvdK =

Where d is the valve diameter in inches

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

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

Figure 6.11 Inlet and Tail Pipe File Organization

PRTRAN REPLACE manufno_styles

name_styleino_sizes

nom_diamj port_areaj flow_coeffjnom_diamj+1 port_areaj+1 flow_coeffj+1...

name_stylei+1...

Page 101: APLUS 111 System Management

Chapter 6

System Management 6-15Version 11.1

Where:manuf = Manufacturer typeno_styles = Number of styles available for manufacturer typename_stylei = Name for ith style. Repeat this section for each style.no_sizes = Number of sizesnom_diamj = Nominal diameter for jth size in inchesport_areaj = Port area in square inches for jth sizeflow_coeffj = Flow coefficients for jth size

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

Figure 6.12 transflo.dat File

Keywords and Data CommentsPRTRAN REPLACE KTM The manufacturer is KTM.2 There are two styles.BALL-L-PORT The first style is BALL-L-PORT.3 There are three sizes of style BALL-L-PORT.1.5-IN 2.03583 53. nom_diam port_area flow_coeff†2-IN 3.3556 110. nom_diam port_area flow_coeff†2.5-IN 4.78775 160. nom_diam port_area flow_coeff†BALL-T-PORT The second style is BALL-T-PORT.4 There are four sizes of style BALL-T-PORT.1.5-IN 2.03583 50. nom_diam port_area flow_coeff†2-IN 3.3556 100. nom_diam port_area flow_coeff†2.5-IN 4.78775 150. nom_diam port_area flow_coeff†3-IN 7.39265 240. nom_diam port_area flow_coeff†

†Where:nom_diam = Nominal diameterport_area = Port areaflow_coeff = Flow coefficients

Page 102: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-16 System ManagementVersion 11.1

Valves for the Valve Model

The Valve Input Valve Parameters sheet contains a table of valves. The userchooses:• Valve type• Manufacturer• Series/style• Size

Aspen Plus retrieves these specifications from the table:• Valve position• Flow coefficient (Cv)• Pressure drop ratio factor (XT)• Pressure recovery factor (Fl)

Page 103: APLUS 111 System Management

Chapter 6

System Management 6-17Version 11.1

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

Figure 6.13 Valve File OrganizationVALDAT REPLACE name_typeino_manufs

name_manufjno_series/styles

name_series/stylekno_sizes

sizelno_points

Vp1 Cv1 XT1 Fl1.Vpn Cvn XTn Fln

sizel+1.

name_series/stylek+1.

name_manufj+1.

VALDAT REPLACE name_typei+1

Where:name_typei = Name of ith valve typeno_manufs = Number of manufacturersname_manufj = Name of jth manufacturerno_series/style = Number of series/stylesname_series/stylek = Name of kth series/styleno_sizes = Number of valve sizessizel = A character string specifying the nominal valve sizeno_points = Number of entries for valve position, flow coefficient,

pressure drop ratio factor, and pressure recoveryfactor

Vp1 ... Vpn = n entries for valve position (as percentage ofmaximum opening)

Cv1 ... Cvn = n entries for corresponding valve flow coefficientXT1 ... XTn = n entries for corresponding pressure drop ratio factorFl1 ... Fln = n entries for corresponding pressure recovery factor

Page 104: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-18 System ManagementVersion 11.1

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

Figure 6.14 valve.dat File

Keywords and Data CommentsVALDAT REPLACE BALL The first valve type is BALL1 There is one manufacturerNELES-JAMESBURY The first manufacturer is NEL:ES-JAMESBURY2 There are two series/styles5000_REDUCED_PORT-FLANGED The first series/style is 5000_REDUCED_PORT-FLANGED20 There are 20 sizes of series/style

5000_REDUCED_PORT-FLANGED0.5-IN The first size is 0.5-IN10 There are 10 points10 0.1 0.91 0.82 Vp Cv XT Fl

20 0.2 0.91 0.82 Vp Cv XT Fl†

30 0.4 0.90 0.80 Vp Cv XT Fl†

40 0.7 0.88 0.75 Vp Cv XT Fl†

50 1.2 0.85 0.67 Vp Cv XT Fl†

60 1.9 0.80 0.57 Vp Cv XT Fl†

70 2.7 0.74 0.42 Vp Cv XT Fl†

80 4.2 0.65 0.28 Vp Cv XT Fl†

90 6.3 0.55 0.20 Vp Cv XT Fl†

100 9.0 0.48 0.15 Vp Cv XT Fl†

0.75-IN The second size is 0.75-INMETAL_SEATED_FULL_PORT The second series/style is METAL_SEATED_FULL_PORT16 There are 16 sizes of series/style

METAL_SEATED_FULL_PORT1-IN The first size is 1-IN10 There are 10 points10 0.68 0.91 0.82 Vp Cv XT Fl

20 1.51 0.91 0.82 Vp Cv XT Fl†

†Vp = Valve position as percent of maximum openingCv = Valve flow coefficientXT = Pressure drop ratio factorFl = Pressure recovery factor

continued

Page 105: APLUS 111 System Management

Chapter 6

System Management 6-19Version 11.1

Figure 6.14 valve.dat File (continued)

Keywords and Data Comments30 2.81 0.90 0.80 Vp Cv XT Fl

40 4.89 0.88 0.75 Vp Cv XT Fl†

50 7.70 0.85 0.67 Vp Cv XT Fl†

60 11.5 0.80 0.57 Vp Cv XT Fl†

70 17.0 0.74 0.42 Vp Cv XT Fl†

80 26.0 0.67 0.30 Vp Cv XT Fl†

90 38.0 0.59 0.20 Vp Cv XT Fl†

100 52.0 0.51 0.15 Vp Cv XT Fl†

1.5-IN The second size is 1.5-INVALDAT REPLACE BUTTERFLY The second valve type is BUTTERFLY1 There is one manufacturerNELES-JAMESBURY The first manufacturer is NELES-JAMESBURY2 There are two series/stylesANSI_CLASS_150 The first series/style is ANSI_CLASS_15013 There are 13 sizes of series/style ANSI_CLASS_1503-IN The first size is 3-IN10 There are 10 points10 12.5 0.76 0.42 Vp Cv XT Fl

20 31.3 0.79 0.42 Vp Cv XT Fl†

30 51.0 0.82 0.43 Vp Cv XT Fl†

40 75.0 0.83 0.44 Vp Cv XT Fl†

50 103.0 0.83 0.45 Vp Cv XT Fl†

60 137.0 0.82 0.42 Vp Cv XT Fl†

70 174.0 0.80 0.34 Vp Cv XT Fl†

80 208.0 0.75 0.25 Vp Cv XT Fl†

90 229.0 0.70 0.18 Vp Cv XT Fl†

100 235.0 0.65 0.15 Vp Cv XT Fl†

4-IN The second size is 4-IN

†Vp = Valve position as percent of maximum openingCv = Valve flow coefficientXT = Pressure drop ratio factorFl = Pressure recovery factor

❖ ❖ ❖ ❖

Page 106: APLUS 111 System Management

ConfiguringPressureRelief, Pipe,and ValveEquipmentData

6-20 System ManagementVersion 11.1

Page 107: APLUS 111 System Management

Chapter 7

System Management 7-1Version 11.1

7 Accounting Report

This chapter contains the following topics:• Generating a User-Based Accounting Report• Running the Accounting Program• Creating a New Accounting File• Making Accounting Information Required• Activating Accounting on Windows

You can use the Aspen Plus accounting program to generate reports on the use ofAspen Plus at a particular site. Every Aspen Plus run writes run information tothe Aspen Plus accounting file, which is stored in the Aspen Plus accountingdirectory. The accounting program generates reports based on information in theaccounting file. You specify the level of detail to include in the report. The toplevels 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 whenyou run the accounting program.

The accounting program has different reporting capabilities from theAspenTech License Manager, described in the AspenTech License ManagerInstallation and Reference Guide. The License Manager only recordssimultaneous use of Aspen Plus and layered products (that is, more than oneperson running Aspen Plus at the same time). The accounting program reportsinformation about each run.

Page 108: APLUS 111 System Management

AccountingReport

7-2 System ManagementVersion 11.1

The accounting file is not generated by default under Windows. To activate theaccounting file for Windows platforms, see Activating Accounting on Windows,this chapter. You must activate the accounting program before any Aspen Plususage will be recorded.

Generating a User-Based AccountingReport

This section describes how to generate user-based accounting reports. Under theterms of your software license agreement, these reports are required if you havea user-based license for Aspen Plus. To generate other account reports, seeRunning the Accounting Program, this chapter.

To generate a user-based accounting report:

1. Log in to an account that is set up for the Aspen Plus environment. See theAspen Plus Installation Guide for more information.

2. From the Start menu, select Programs | AspenTech | AspenEngineering Suite | Aspen Plus 11.1 | Aspen Plus Simulation Engine.

3. Start the accounting program by entering the following command:acr

You are prompted for the name of the accounting file. The default name isgiven 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.

5. You are prompted for a RunID. A default name is given in brackets:Enter the runid [ASPACT]

Press Enter to accept the default, or type in a name.

6. The following prompt appears:DO YOU WANT A USER-BASED PRICING REPORT? (YES/NO)

Answer yes.

7. The system asks for which calendar quarter you want to generate the report:PLEASE SELECT THE TIME PERIOD:

1 FIRST QUARTER2 SECOND QUARTER3 THIRD QUARTER4 FOURTH QUARTER5 OTHER TIME PERIOD

Page 109: APLUS 111 System Management

Chapter 7

System Management 7-3Version 11.1

Enter the number for the appropriate quarter.

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

Enter all four digits of the year.

9. 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 generatethe report if the number of runs reported in the standard report isquestionable. Generating the detailed report will increase the time requiredto run the program.

10. Answer yes or no.

The accounting program will begin running. The length of the run depends on thesize of the accounting file.

The files created by the accounting program are:

File Description

runid.rp1 Contains a table listing the users and the number of runs made. One table is created for each month.

runid.rp2 Contains a listing of each run made. This file is generated only if you answer yes in Step 9.

Note If you closed an accounting file during a quarter (see Creating aNew Accounting File, this chapter), you will need to run theaccounting program for both the old and new accounting files togenerate a complete report for the quarter. This might happen,for example, if you generally close the accounting file at the end ofeach quarter, but you miss the end of a quarter by a few days.

Page 110: APLUS 111 System Management

AccountingReport

7-4 System ManagementVersion 11.1

Running the Accounting Program

This section describes how to generate account reports other than the user-basedaccounting report. To generate a user-based account report, see Generating aUser-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 Plus Installation Guide for the operating system you are using,for more information.

2. From the Start menu, select Programs | AspenTech | AspenEngineering Suite | Aspen Plus 11.1 | Aspen Plus Simulation Engine.

3. Start the accounting program by entering the following command:acr

4. The system prompts you for the name of the accounting file. The defaultname is given in brackets:Enter the Aspen Plus Master Accounting Filename[C:\Progra~1\ASPENT~1\ASPENP~1.1\Engine\xeq\Aspen.msf]:

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

6. Press Enter to accept the default, or type in a name.

7. The following prompt appears:DO YOU WANT A USER-BASED PRICING REPORT? (YES/NO)

Answer no. (To generate a user-based pricing report, see Generating aUser-Based Accounting Report, this chapter.)

8. The system asks you what basis to use for the report:PLEASE SELECT ONE OF THE FOLLOWING NUMBERS TO REQUEST AN Aspen PlusUSAGE REPORT (OR ENTER 0 TO EXIT):

1 LOGON IDS2 ACCOUNTS3 PROJECT-IDS4 PROJECT-NAMES5 USER-NAMES

NOTE: THE REPORT PROVIDED TO ASPEN TECHNOLOGY FOR BILLING PURPOSESMUST BE BASED ON "USER-NAMES". OTHER REPORT TYPES AREAVAILABLE FOR YOUR OWN USE IN ANALYZING Aspen PlusUTILIZATION.

Page 111: APLUS 111 System Management

Chapter 7

System Management 7-5Version 11.1

The accounting report contains tables of usage based on your choices. Thelogon ID is the Windows account name. The remaining four items (accountnumber, project ID, project name, and user name) can be entered on theSetup Specifications Accounting sheet in the Aspen Plus user interface. Seethe 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)

9. Enter the start and end dates. The program selects and reports on theAspen Plus runs that occurred between the start and end dates.

You are asked if you want the detailed run statistic report and the userreport: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 thedate, time, and the input file name. In most cases, this information is notneeded. If you answer yes to this question, it takes considerably longer togenerate the accounting report.

10. Answer yes or no.

The accounting program begins running. The length of the run depends on thesize of the accounting file.

The accounting program creates these files:

File Description

runid.his History file. Contains information on the run, such as number of records read, run time, and options chosen.

runid.urp User report file. Contains detailed information on each ID found in the reporting period. Includes a log of everyAspen 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.

Page 112: APLUS 111 System Management

AccountingReport

7-6 System ManagementVersion 11.1

Creating a New Accounting File

If the accounting master file takes up too much disk space, you can close thecurrent file and create a new file. Large accounting files can take longer for thesimulation engine to append information to the file.

To close the current accounting file:

1. Log in to the account that owns the Aspen Plus files.

2. Set up to the Aspen Plus environment. See the Aspen PlusInstallation Guide for your operating system for more information.

3. Change the current directory to the accounting directory. Use the appropriatecommand:

Operating System Command

Windows CD "C:\Program Files\AspenTech\Aspen Plus 11.1\Engine\XEQ"†

†Where C:\Program Files\AspenTech\Aspen Plus 11.1 is the drive and directory where Aspen Plus is installed

4. Execute the accounting program. Use the appropriate command for youroperating system:

Operating System Command

Windows ACR NEWFILE

5. Save the old file for future reference.

Making Accounting Information Required

For sites with a user-based license, the user name field on the SetupSpecifications Accounting sheet in the user interface is required. Both theAspen 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 theinformation on the Setup Specifications Accounting sheet, you can modify theAspen Plus user interface to require this information.

From the Tools menu, select Options to go to the General sheet and check the boxlabeled "Accounting information required to complete input?"

Page 113: APLUS 111 System Management

Chapter 7

System Management 7-7Version 11.1

If you want to modify the Aspen Plus simulation engine to require accountinginformation, contact the AspenTech hotline. You need a License Key Certificatefor the AspenTech License Manager.

Activating Accounting on Windows

The Aspen Plus accounting file is not written to on a PC running Windows 95,Windows 98, or Windows NT by default. To enable the accounting program to rununder 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 tothe simulation engine directories. Follow these steps:

1. From the Aspen Plus program group, select the Aspen Plus SimulationEngine icon.

2. Change the directory to the Aspen Plus simulation engine system directory,as follows:CD "C:\Program Files\AspenTech\Aspen Plus 11.1\Engine\xeq"

If you installed the simulation engine on a different drive or directory,substitute the correct location.

3. Run the accounting program to initialize the accounting file:ACR NEWFILE

An accounting master file (ASPEN.MSF) will be generated in the currentdirectory.

4. Set the permissions on the accounting master file so that all Aspen Plus usershave write access.

If the simulation engine is on a shared file server and you do not wish to grantwrite access to the accounting master file in that directory, you can move theaccounting master file to another directory where users have write access. If youmove the accounting master file, you must change the MSF setting in the systemversion of the Aspen Plus Run Definition file (ASPFILES.DEF) to point to thenew location of the accounting master file. See Aspen Plus Run Definition File,Chapter 2 for more details.

Page 114: APLUS 111 System Management

AccountingReport

7-8 System ManagementVersion 11.1

Setting the Accounting Environment Variable

Each PC that executes the simulation engine must have the accountingenvironment variable set for Aspen Plus usage on that PC to be recorded. If thesimulation engine is installed on a network file server, each client PC mustdefine the accounting environment variable. If the simulation engine is installedon a remote Windows NT (Intel or AXP) host, the accounting environment mustbe set on the Windows NT host.

Windows 95/98

1. Append the following line to the bottom of the AUTOEXEC.BAT file for allappropriate PCs:SET ASPACCT=ON

2. Restart the PC for the settings to become active.

Windows NT

For Windows NT systems, set the accounting environment variable for thesystem rather for a single user account.

1. On the Task bar, click Start, then Settings, and Control Panel.

2. Double-click the System icon, and go to the Environments sheet.

3. Click any variable labeled as System Variables in the list.

4. At the bottom of the page, click the Variable field and replace the entry withASPACCT.

5. Click the Value field and replace the entry with ON.

6. Click Set, then OK to save the settings.

❖ ❖ ❖ ❖

Page 115: APLUS 111 System Management

Appendix A

System Management A-1Version 11.1

A Customizing the AspenPlus User Interface

This appendix describes how to customize the Aspen Plus user interface andcreate customized Help. Topics include:• MMTBS customization files• Modifying the MMTBS and Help driver files• Running the user interface customization system• Installing the new files

The major steps for customizing the user interface are:

1. Creating the Help source files for the Windows Help system. Several templatefiles have been provided to assist users in the creation of these source files.

2. Compiling the Help source files using the Microsoft Help Workshop utility

3. Modifying the Aspen Plus MMTBS and Help driver files

4. Installing the customization changes to the user interface

Page 116: APLUS 111 System Management

Customizingthe Aspen PlusUser Interface

A-2 System ManagementVersion 11.1

MMTBS Customization Files

Table A.1 lists the MMTBS customization files.

Table A.1 User Interface Customization Files

File Name Description

recsav.apr User interface record definition file in binary format (RecDef file)

mmg.hms Help file in binary format

pp***.dat User interface input files (See Table 7.1)

lcd_cust.dat User interface property parameter customization file

mdl_cust.dat User interface property model customization file

*.hxt User interface Help and prompt files

*.srt User interface table sort files

tbcustom.dat MMTBS driver file

tbcustom.hxt HTM Help driver file

The *.dat and *.hxt files for Windows are in the following Aspen Plus userinterface system directory:

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

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

1. Create a directory to store the customization files you need to modify.

2. Modify the files.

3. Test your customization in the new directory.

You can use most simulation engine TBS (Table Building System) files fordirectly running MMTBS.

For the simulation engine, Aspen Plus stores each property method or parameterdefinition separately in a .sto or .lcd file. The following table describes whereproperty methods and parameter definitions for the user interface are stored:

Page 117: APLUS 111 System Management

Appendix A

System Management A-3Version 11.1

All Are stored in

Property methods ppstoptn.dat

Parameter definitions pplcdefs.dat

For property methods, add your customized .sto file, without the TBS header andfooter, to the Aspen Plus user interface file, ppstoptn.dat.

For parameter definitions, store your customized TBS pplcdef.dat files in aspecial user interface file, lcd_cust.dat. Do not store them with the user interfacesystem file, pplcdefs.dat.

For property model definitions, store your customized files from the TBSppcnvpmd.dat file in a special user interface file, mdl_cust.dat. Do not store themwith the user interface system file ppcnvpmd.dat.

You can use the customized ppenmprt.dat and ppensprt.dat files directly in theuser interface.

For more information:

To modify the See this topic

pp***.dat customization fileslisted in Table A.1

Creating In-House Physical Property Models, Routes, and Methods, Chapter 5

Databank files Adding User and In-House Databanks, Chapter 4

Creating Help

Aspen Plus uses the Windows Help system to display Help. To create your ownHelp integrated with the Aspen Plus Help files, follow these steps:

1. Modify the existing Help source file(s) in Microsoft Word.

2. Assign map numbers to Help topics in the Help project file (.hpj).

3. Compile the Help source file(s) into a Windows Help file.

4. Modify the Aspen Plus user interface to integrate the new Help you created.

You can also build an optional table of contents file. Table A.2 lists the files youneed to create your own Help:

Page 118: APLUS 111 System Management

Customizingthe Aspen PlusUser Interface

A-4 System ManagementVersion 11.1

Table A.2 Files Required to Create Help

File Description Available from

custom.rtf Pre-formatted Help source file C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom

userdata.rtf Pre-formatted Help source file (databanks) C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom

custom.hpj Pre-formatted Help project file C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom

HCWSETUP.EXE Self-extracting executable installation file forthe Microsoft Help Workshop and Helpcompiler

http://support.microsoft.com

You need Microsoft's Help compiler to compile the Help source files into Help.You can obtain the Help compiler and utilities from:

http://support.microsoft.com/support/kb/articles/Q170/6/89.asp

Download the HCWSETUP.EXE, a self-extracting program that installs the Helpcompiler and Microsoft Help Workshop components. You can also use thefollowing optional file:

File Description Available from

custom.cnt Pre-formatted Help table of contents file C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom

The files listed in Table A.2 have been tested and work with Microsoft Word 7.0and the Microsoft Help Workshop 4.03.

Modifying the Help Source Files

AspenTech provides two Help source files with the formatting needed to createyour own online Help. We also provide a Microsoft Word template (AT_Help.dot)so your Help will look like an integral part of the Aspen Plus Help system.

Microsoft Word File For

C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom\custom.rtf Authoring Help for property customization

C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom\userdata.rtf Authoring Help for databanks you add to Aspen Plus

C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom\AT_Help.dot Formatting the Help text

It is recommended that you use Microsoft Word Version 7.0 to edit the Helpsource files. You can use any word processing program that reads and writesRich Text Format (RTF), but some of these programs may not be able to read theWord formatted template we provide.

Page 119: APLUS 111 System Management

Appendix A

System Management A-5Version 11.1

To modify the Help source files:

1. Open custom.rtf (or userdata.rtf) using Microsoft Word.

2. In place of the Topic1 heading, type the text you want as the heading for yourtopic. A topic is a discrete piece of information in the Help system that isdisplayed in one Help window.

3. In place of the text in the first topic, type your Help text. You can inserttables, bulleted lists, and numbered lists.

It is important that you do not change the formatting, styles, or footnoteinformation associated with this file. The Windows Help compiler relies onspecific formatting information in the .rtf file when building Help. Any changescan result in compiler errors.

If a Help topic you create will be viewed in a Help popup window, follow thesesteps to display the entire text in the popup window:

1. In the .rtf file, select the heading text for the topic (for example, #$>Topic1).

2. From the Format menu, select Paragraph.

3. Click the Text Flow tab.

4. Uncheck the Keep with Next check box.

The Keep with Next attribute forces text associated with it into the title region(or nonscrolling region) of a Help window. A Help topic with a nonscrollingregion, when appearing in a popup window, will only display the text in thenonscrolling region. You need to turn off the Keep with Next attribute so that allthe topic text will be displayed in a popup window. After changing the Keep withNext attribute, you can compile your files.

Note A Help popup window does not have scroll bars, so for helpdisplayed in a popup window, you should limit the amount ofinformation in a topic to a few lines.

If you want to add more topics than the number supplied in the custom.rtf file,you may copy and paste the example topic information into a new .rtf file. Youwill, however, need to change the topic identifier of the new topic. In WindowsHelp, each Help topic is identified by a unique topic ID. To change the topic IDafter copying and pasting a topic, follow these steps:

1. In the newly created file that contains the pasted example topic, from theView menu, select Footnotes. The system displays a # footnote with the text"Topic1" next to it.

2. Change the text "Topic1" to a topic ID of your choice. This ID must be unique,such as Topic4. It cannot begin or end with spaces, cannot begin with anumber, and it cannot contain these symbols: # = + @ * % !

Page 120: APLUS 111 System Management

Customizingthe Aspen PlusUser Interface

A-6 System ManagementVersion 11.1

3. Next to the $ footnote sign, change the title "Topic1" to the title of your Helptopic.

4. As you incrementally add Help topics in this way (one per .rtf file), ensurethat you change each topic's ID to a unique identifier every time.

When saving your Help source file(s) before compiling, make sure you save themwith the file extension .rtf. The Help compiler only accepts .rtf files.

Assigning Map Numbers to Help Topics

To display a Help topic from Aspen Plus by pressing F1 or using othercontext-sensitive methods, you must indicate which Help topic you wantAspen 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 topicin 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 tothe custom help. AspenTech programs will link to the help topic with mapnumber 2. In the unmodified custom help file, this is the topic entitled Topic1.

Note If you are importing customization made in previous versions intoversion 11.1, do not copy your old custom.hpj file over the onesupplied with Aspen Plus. Instead, use Notepad to copy thecontents of the [FILES] and [MAP] sections into the new file.

Follow these steps:

1. In Aspen Plus, specify a map number and Help file name for each field orbutton that will have Help. See Modifying the Aspen Plus Help File, thisappendix, for instructions on adding map numbers and Help file names toAspen Plus.

2. In the Help project file (custom.hpj), assign the same map number to the Helptopic you want displayed.

The map numbers for a topic in the Help project file (custom.hpj) andAspen Plus must be the same for Aspen Plus to recognize and display theparticular topic.

To assign map numbers to topics in the .hpj file, using Microsoft Help Workshop:

1. Open the .hpj file that AspenTech provides (custom.hpj), using Microsoft HelpWorkshop.

2. Click the Map button on the right side of the custom.hpj window.

The Map dialog box appears.

Page 121: APLUS 111 System Management

Appendix A

System Management A-7Version 11.1

3. Add a map number by clicking Add and entering the topic ID and mapnumber. Edit an existing Map number by selecting the topic and clicking edit.

The topic ID you enter must be the same as the topic ID you used for the #footnote for the topic in the .rtf file. See Modifying the Help Source Files, thischapter, for more information.

If you add more topics to your Help by creating new Help source (.rtf) files, thenyou need to add the names of the new files to the .hpj file:

1. Open the appropriate .hpj file that AspenTech provides (custom.hpj), usingMicrosoft Help Workshop.

2. Click the Files button on the right side of the custom.hpj window.

The Topic Files dialog box appears.

3. Click Add to add the names of your new .rtf files.

Important Do not change other sections of the .hpj file that AspenTechprovides. Some changes can result in compiler errors.

Compiling the Help Source Files

When your Help source files and Help project files are complete, you can compileyour Help project from the Help project file using Microsoft Help Workshop. Tocompile your Help project:

1. Open custom.hpj with Microsoft Help Workshop.

2. Click the Save and Compile button in the lower right corner of the custom.hpjwindow.

The compiling process produces a Microsoft Windows Help binary filecustom.hlp and a contents file custom.cnt. After you are done compiling andhave fixed any compiler errors:

3. Delete any *.gid files from this directory:C:\Program Files\AspenTech\APrSystem 11.1\GUI\Custom

4. Update the contents file, if desired. When you double-click the custom.cnt file,it should open in Help Compiler Workshop. Use the buttons at the right toadd additional topics and headings, or to rearrange them. When you add atopic, be sure to specify its topic ID (the string in its # footnote in the helpsource file).

5. To install and test your customized Help, you need to copy the files to thesystem using the custinst command (see Installing the New Files, thischapter). To just update the help files without updating other files, copy the.hlp and .cnt files to the GUI\xeq directory of programs which will use them,such as C:\Program Files\AspenTech\Aspen Plus 11.1\GUI\xeq .

Page 122: APLUS 111 System Management

Customizingthe Aspen PlusUser Interface

A-8 System ManagementVersion 11.1

Modifying the Aspen Plus Help File

Some list boxes in Aspen Plus require that you specify the map number for theHelp topic in a Help (.hxt) file that is part of MMTBS. To display context-sensitive Help (for example, property methods from a drop-down list box), youmust add the following information to the ppstoptn.hxt file:>h_replace H_PPSTOPTN_WILSON-Xcustom.hlp #100>endmessage

Where:

custom.hlp = Name of the Help file

#100 = Map number for the WILSON-X, property method Help topic

It is also useful to provide prompts for your customization. Prompts are includedin the Aspen Plus Help (*.hxt) file.

Prompts Format

Prompts have the following format in the Help file:>p_replace P_context_string_IDPrompt text>endmessage

Where:

>p_replace = Command that identifies the beginning of theprompt

P_context_string_ID = Unique text string that identifies the prompt. Theformat is P_filename_parameter. For example, thecontext string ID for the parameter CPIG isP_PPLCDEFS_CPIG.

Prompt text = Text to be displayed in the prompt area

>endmessage = A signal indicating the end of the prompt text

Prompts can be up to two lines, with 126 characters per line. Prompts forcomponent databanks use a different format and are stored in the tbmsg.txt file.See Adding Prompts and Help for a User or In-House Databank, Chapter 6, formore information.

Page 123: APLUS 111 System Management

Appendix A

System Management A-9Version 11.1

Example of Prompts for a Property Model

This example shows a prompt for the Wilson activity coefficient model. The context_string_IDis the TBS file name, property name, and model name:PPCNVPMD_GAMMA_GMWILSON

>p_replace P_PPCNVPMD_GAMMA_GMWILSONWilson model for liquid phase activity coefficient>endmessage

You must run the command Mmcustom to incorporate your changes into theinterface. See Running the User Interface Customization System, this appendix.

Building a Table of Contents File

The table of contents (TOC) for a Help file is displayed in the Help Topics dialogbox. You can view the Help contents for the Aspen Plus Help by selectingContents from the Help menu. This dialog box also appears when you click theContents button in any Aspen Plus Help window. Building a table of contents foryour Help is optional. AspenTech provides a sample table of contents file(custom.cnt) with entries for topics in the custom.rtf and userdata.rtf Help sourcefiles. You can edit the .cnt file using a text editor or Microsoft Help Workshop.For more information, see Compiling the Help Source files, this appendix.

In the .cnt file, each entry represents a Help topic or a heading that organizesHelp topics (represented by a book icon). To create a heading, type theappropriate heading text. For a Help topic, type the title text for the topic, as wellas the topic ID. See the Microsoft Help Workshop documentation for details onbuilding the TOC.

Modifying the MMTBS and Help DriverFiles

The Help driver files are:

Use this file To run To update

tbcustom.dat MMTBS The record definition file

tbcustom.hxt HTM The Help file (mmg.hms)

Page 124: APLUS 111 System Management

Customizingthe Aspen PlusUser Interface

A-10 System ManagementVersion 11.1

If you add property parameters, models, routes, and methods to the existingMMTBS files, you do not need to change the MMTBS driver file. If you save yourchanges in new files, modify the MMTBS driver file to include the names of thenew files.

If you add Help and prompts to existing Help files (*.hxt), list the names of themodified Help files in tbcustom.hxt before running the HTM program. If you saveyour Help and prompts in new files, list the new file names in the tbcustom.hxtfile.

Running the User InterfaceCustomization System

You need to run the Mmcustom to install your customization changes in the userinterface. Perform these steps:

1. Enter the following command to update the user interface Record Definition(RecDef) files with your changes:mmcustom mmtbs

2. Update the HTM driver file (tbcustom.hxt) to list the .hxt files that have beenadded or modified.

3. Enter the following command to update the user interface Help file with yourHelp and prompts:mmcustom htm

If you encounter problems while running Mmcustom, make sure themmcustom input files do not contain any typing errors or file format errors.

4. Use Microsoft Help Workshop to create the Windows .hxt files.

5. Test your changes in the user interface.

Page 125: APLUS 111 System Management

Appendix A

System Management A-11Version 11.1

Installing the New Files

To install the new RecDef and Help files:

1. Make sure you are in the directory that contains the customized RecDef andHelp files.

2. To copy the modified files into the user interface system directory, enter thecommand:custinst

When the user interface customization is complete, you may erase the RecDefand .hlp files in the customization directory. Save the TBS input, .hxt, .rtf, .cnt,and .hpj files for customizing future releases of the user interface.

❖ ❖ ❖ ❖

Page 126: APLUS 111 System Management

Customizingthe Aspen PlusUser Interface

A-12 System ManagementVersion 11.1

Page 127: APLUS 111 System Management

Appendix B

System Management B-1Version 11.1

B TBS File Descriptions

This appendix describes the TBS files required to create in-house physicalproperty 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, ormethod. TBS files have a fixed format. Each entry must be in its appropriatecolumn.

To create TBS files in house, follow these steps:

1. Copy similar tables from the system TBS files.

2. Use the table as a template for adding your changes.

Page 128: APLUS 111 System Management

TBS FileDescriptions

B-2 System ManagementVersion 11.1

Conventional Property Model DefinitionTable

The conventional property model definition table, located in the ppcnvpmd.datfile, defines every conventional property model in Aspen Plus. Each propertymodel 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

Figure B.1 shows the layout for the Conventional Property Model DefinitionTable:

Figure B.1 File Layout for the Conventional Property Model Definition Table

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPCNVPMD REPLACE modelnam

2 propname idxcgt mid1 mid2 mid3

3 iwaq iwal iwac rwaq rwal rwac

4 n1

5 opcode opcode opcode opcode

6 n2

7 intsub intsub intsub intsub

8 n3

9 mnsub mnsub mnsub mnsub

10 n4

11 ppname ppname ppname ppname

Page 129: APLUS 111 System Management

Appendix B

System Management B-3Version 11.1

Table B.1 describes parameters for this table:

Table B.1 Parameters for the Conventional Property Model Definition Table

Parameter Description

modelnam Model name

propname Property name†

idxcgt Property monitor computed-go-to index††

mid1mid2mid3

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

iwaqiwaliwac

Integer work area quadratic♦Integer work area linear♦Integer work area constant♦

rwaqrwalrwac

Real work area quadratic♦♦Real work area linear♦♦Real work area constant♦♦

n1opcode

Number of model option codes. Maximum = 10Model option codes entered as integer values♦♦♦

n2intsub

Number of initialization subroutinesInitialization subroutine name♦♦♦

n3mnsub

Number of mainline subroutinesMainline subroutine name♦♦♦

n4ppname

Number of property parametersProperty parameter name♦♦♦

†The parameter propname = EOS for mixture equation of state modelThe parameter propname = EOS0 for pure-component equation of state modelSee Aspen Plus Physical Property Methods and Models, Tables 4.1-4.3, for a list of all other property names.

††For in-house equation-of-state models, use values between 51-75. For all other in-house models, use values between 900-999.

†††Th e 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. Themid3 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 thesimulation. The integer work area required is determined by the size of any temporary integer storage area required in themainline subroutines.

♦♦ Real work area = rwaq * NCC2 + rwal*NCC + rwac, where NCC is the total number of conventional components in thesimulation. The real work area required is determined by the size of any temporary real storage area required in themainline subroutines.

♦♦♦ Enter four values or names on each line. Use as many lines as necessary.

Page 130: APLUS 111 System Management

TBS FileDescriptions

B-4 System ManagementVersion 11.1

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

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

MID Layout Description

mid1 dcba a = implementation of property.Options: 0 = not implemented; 1 = implemented

b = implementation of temperature derivatives (dn/dTn).Options: 0 = not implemented; 1 = d/dT; 2 = d/dT, and d2/dT2; 3 = d/dT, d2/dT2, and d3/dT3

c = implementation of first order pressure derivative (d/dP).Options: 0 = not implemented; 1 = implemented

d = implementation of composite temperature and pressure derivatives(d[n+1]/dPdTn).Options: 0 = not implemented; 1 = d2/dPdT; 2 = d2/dPdT, and d3/dPdT2

mid2 kjihg g = implementation of mole number composition derivative.Options: 0 = not implemented; 1 = d/dn implemented

h = implementation of mole number composition and first order temperature derivative.Options: 0 = not implemented; 1 = d2/dndT implemented

i = implementation of mole number composition and first order pressure derivative.Options: 0 = not implemented; 1 = d2/dndP implemented

j = implementation of mole number composition and second order temperature derivative.Options: 0 = not implemented; 1 = d3/dndT2 implemented

k = implementation of mole number composition and first order temperature and pressure derivatives.Options: 0 = not implemented; 1 = d3/dndTdP implemented

mid3 ponml l = implementation of mole fraction composition derivative.Options: 0 = not implemented; 1 = d/dx implemented

m = implementation of mole fraction composition and first order temperature derivative.Options: 0 = not implemented; 1 = d2/dxdT implemented

n = implementation of mole fraction composition and first order pressure derivative.Options: 0 = not implemented; 1 = d2/dxdP implemented

o = implementation of mole fraction composition and second order temperature derivative.Options: 0 = not implemented; 1 = d3/dxdT2 implemented

p = implementation of mole fraction composition and first order temperature and pressure derivatives.Options: 0 = not implemented; 1 = d3/dxdTdP implemented

Page 131: APLUS 111 System Management

Appendix B

System Management B-5Version 11.1

Example of a Conventional Property Model Definition Table in theppcnvpmd.dat File

The model name for the UNIQUAC activity coefficient model is GMUQUAC. This modelcalculates activity coefficients (propname = GAMMA). The subroutine returns analyticalestimates 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 modeldoes not have a model option code. It requires:• One initialization subroutine (GM07)• One mainline subroutine (GM06)• Six property parameters (GMUQR, GMUQQ, GMUQL, GMUQAA, GMUQQ1, and UNIQ)

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPCNVPMD REPLACE GMUQUAC

2 GAMMA 108 0021 00011 00011

3 0 0 0 2 6 0

4 0

5 1

6 GM07

7 1

8 GM06

9 6

10 GMUQR GMUQQ GMUQL GMUQAA

11 GMUQQ1 UNIQ

When the number of option codes is zero (n1 = 0), you do not need to supply the option codevalues. The line for entering opcode is skipped.

Page 132: APLUS 111 System Management

TBS FileDescriptions

B-6 System ManagementVersion 11.1

Property Parameter Definition Table

Most property models require model-specific parameters. Aspen Plus stores allproperty parameters in property parameter definition files, with the .lcdextension. For example, the definition for the critical temperature, TC, is storedin 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 theWilson binary parameter (WILSON)

• Discusses the units conversion formula

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

Figure B.2 File Layout for the Property Parameter Definition Table

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPLCDEFS REPLACE ppname

2 Parameter description

3 pptype ppinput dataset n0 kion

4 i j k ppno l m

5 default value default value default value default value

6 lower bound lower bound lower bound lower bound

7 upper bound upper bound upper bound upper bound

8 nominal value nominal value nominal value nominal value

9 regression code regression code regression code regression code

10 symmetric code symmetric code symmetric code symmetric code

11 param labal param label param label param label

12 units conv code units conv code units conv code units conv code

13 no units row

14 ur ur ur ur

15 encoded reverse polish units conversion formula

Page 133: APLUS 111 System Management

Appendix B

System Management B-7Version 11.1

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

Table B.3 Parameters for the Property Parameter Definition Table

Parameter Description

ppname Property parameter name (limited to six characters)

Parameter description Short description of parameter (limited to 64 characters)

pptype Property parameter type:1 = Unary parameter for conventional components2 = Binary parameter for conventional components3 = Unary parameter for nonconventional components4 = Binary parameters for nonconventional components5 = Unary parameters for UNIFAC groups6 = Binary parameters for UNIFAC groups8 = Pair parameters for electrolyte NRTL model

ppinput Property parameter input code:†0 = Do not allow user input. Parameter is used only for internal calculations.1 = Allow input2 = 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.

dataset Data set code:†0 = Allow only one data set (one set of values per parameter)1 = Allow more than one data set

n0 Units conversion subroutine index. No longer used.

kion Ionic species code:†0 = Ion is allowed1 = Only ionic species allowed2 = Ion is not allowed

i Number of elements for parameter. For example, PLXANT has nine elements.

j Lower and upper bounds code:†0 = Do not supply lower and upper bounds for parameter1 = Supply lower and upper bounds for parameter

k Nominal value code:†0 = Do not supply nominal value for parameter.1 = Supply nominal value for parameter.

ppno Property parameter index number:1-899 Reserved for Aspen Plus built-in parameters900-1199 Available for user in-house model parameters1200-1299 Reserved for USER-PROPS parameters1300- Reserved for Aspen Plus built-in parameters

†Defaults to zero.

continued

Page 134: APLUS 111 System Management

TBS FileDescriptions

B-8 System ManagementVersion 11.1

Table B.3 Parameters for the Property Parameter Definition Table (cont.)

Parameter Description

l Regression code:†0 = No regression code. Parameter cannot be regressed.1 = Supply regression code

m Symmetry code for binary parameters:†0 = No symmetry code1 = 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 Parameter nominal value (in SI units, one value per element)

regression code 0 = Cannot be regressed†1 = Can be regressed2 = Unconditionally used in regression. Defaulted on the Properties Regression form.> 5 = Delta T. If delta T of data is greater than the code value, the parameter can be regressed.< 0 = Number of data points. If number of data points is greater than the absolute value of the code, the parameter can be regressed.

symmetric code Symmetric code for binary parameters:†0 = Totally asymmetric (aij ≠ aji). Requires two labels.1 = Used for HENRY, VLCLK (restricted to aij; aji has no meaning). Requires one label.2 = Symmetric (aij = aji). Requires one label.3 = Anti-symmetric (aij = -aji). Requires two labels.

param label Parameter label displayed on the Properties Parameters forms (optional)

units conv code Encoded units conversion flag (see Units Conversion Flag, this chapter).

no units row Number of unique units row referenced in units conv code††

ur List of unique units row referenced in units conv code††

units conversion formula See Units Conversion Formula, this chapter.

† Defaults to zero.

†† Units rows for all units in Aspen Plus are summarized in Table B.4.

Page 135: APLUS 111 System Management

Appendix B

System Management B-9Version 11.1

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

Table B.4 Units Available in Aspen Plus

Units Row Description Units Row Description

1 Area 35 Filter resistance2 Composition 36 Specific filter resistance3 Density 37 Mole density4 Diffusivity 38 Mass density5 Energy 39 Mole enthalpy6 Enthalpy 40 Mass enthalpy7 Entropy 41 Mole entropy8 Fiscal 42 Mass entropy9 Flow 43 Mole volume10 Mass flow 44 Dimensionless11 Mole flow 45 Dipole moment12 Volume flow 46 Solubility parameter13 Enthalpy flow 47 Electrical power14 Force 48 Electric price15 Mole heat capacity 49 Mass heat capacity16 Heat transfer coefficients 50 UA17 Length 51 Moles18 Mass 52 Work19 Power 53 Heat20 Pressure 54 Area-price21 Surface tension 55 Volume-price22 Temperature 56 Item-price23 Thermal conductivity 57 Number concentration24 Time 58 Mass concentration25 Velocity 59 Inverse time26 Viscosity 60 Natural log of inverse time27 Volume 61 Flux28 Frequency 62 Area usage29 Unit-price 63 Volume usage30 Energy-price 64 Mole concentration31 Delta-T 65 Power-volume32 Angle 66 Mass transfer coefficients33 Head 67 Specific area34 Bond work index 68 Inverse length

continued

Page 136: APLUS 111 System Management

TBS FileDescriptions

B-10 System ManagementVersion 11.1

Table B.4 Units Available in Aspen Plus (continued)

Units Row Description Units Row Description

69 Chrom velocity 88 Volume enthalpy70 Mass flux 89 - 99 Reserved for in-house customization71 Solvent permeability 100 Volume flow / RPM72 Solute permeability 101 Friction factor73 Water rate 102 Mass per cycle74 Pressure drop per height 103 Moles per cycle75 Pressure drop 104 Volume per cycle76 Packing factor 105 Enthalpy per cycle77 Number concentration rate 106 Mass per operation78 Inverse area 107 Moles per operation79 Volume heat capacity 108 Volume per operation80 Heat flux 109 Enthalpy per operation81 Inverse temperature 110 Density times velocity squared82 Inverse pressure 111 Sound level83 Temperature-volume 112 Moment of inertia84 Vflow-length 113 Voltage85 Contents 114 Current86 Population density 115 Mass per volume87 Inverse heat transfer coefficient 116 Mass per length

Units Conversion Flag

The number of unit conversion flags equals the number of elements:

Flag Meaning

Units conversion code† Units row from Table B.4

-n Row number in the Units Conversion Formula section††

†Used for simple conversions that do not depend on any other element.

††For example, -1 means the units conversion formula for this element begins on the first line of the Units ConversionFormula 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 equalthe new value for the element.

• You can use more than one line of formula for each element.

Page 137: APLUS 111 System Management

Appendix B

System Management B-11Version 11.1

• Each line is limited to 72 columns.• Blanks separate each operand and variable.

Aspen Plus allows the following operands and variables in the units conversionformula:

Operand Description Example

A...Z Parameter element identifier in the unitsconversion formula

A = 1st element, Z = 26th element,AA = 27th element

[i] Units conversion multiplication factor of the ithunits row (see Table B.4.)

[20] = pressure

Special Case [22B] Addition conversion factor of temperature 273.15 for converting ºC to K

Aspen Plus allows the following functions in the units conversion formula:

Function Description Example

* Multiply x y * = x*y

/ Divide x y / = x/y

+ Add x y + = x+y

- Subtract x y - = x-y

^ Exponentiation x y ^ = xy

? Conditional x ? = x ?1:0; if x exists returns 1, if not returns 0

log Natural log x log = log(x)

; End of formula —

Use the conditional ("function?") to ask if a parameter exists (see the followingexample). 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 thetemperature conversion factor, [22B], is ignored. See the following example formore details.

Page 138: APLUS 111 System Management

TBS FileDescriptions

B-12 System ManagementVersion 11.1

Example for Units Conversion Formula

The following equation calculates liquid vapor pressure (PL) as a function of temperature. Theequation 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 aretemperature 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, youcan use G for the seventh element, and so on. Once you exhaust A to Z, you can use AA,AB,...AZ. After AZ, you can use BA, BB, and so on.

You can derive the following elements in the new units:

(new A) = A + ln[20] – (C*ln[22])–(D*[22B]/[22])(new B) = B*[22](new C) = C(new D) = D/[22](new E) = E*[22] + [22B](new F) = F*[22] + [22B]

Where:

[20] = Multiplicative conversion factor for pressure[22] = Multiplicative conversion factor for temperature[22B] = Additive conversion factor for temperature

If elements B and C are not zero, Aspen Plus can convert the formula only if it assumesabsolute temperature units (ºR or ºK). The conversion formula and conditional function (?)addresses this situation.

The units conversion codes, and units conversion formulas for the property parametersdefinition file of this parameter are listed in the following table:

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1

2 -1 -2 44 -3

3 22 22

4 3

5 20 22 44

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

7 B [22] * ;

8 D [22] / ;

Lines 2 and 3, above, list the units conversion codes.

Page 139: APLUS 111 System Management

Appendix B

System Management B-13Version 11.1

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). Thisconversion would have been –3, had the first formula wrapped to the second line. You can useup 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 TableB.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 ofelement four (D).

On the second line of the units conversion codes, (line 3, above) the two 22s indicate simpletemperature conversion for the lower and upper temperature limits.

Units conversion formulas are used for the second (B) and fourth (D) elements, although theirconversions do not involve other elements. Absolute temperature units must be used whenthese elements are non-zero. Only the multiplicative conversion factor [22] should be used. Ifyou use the simple conversion code of 22, the parameters will be converted incorrectly:

(new value) = (old value) * [multiplicative factor] + [additive factor]

To show the sequence of operation, parentheses are added to the conversion formula ofelement 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 thisfactor 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 ina 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 Cis non-zero.

The following lines taken from lines 4 and 5 in the table above indicate that the unitsconversions use three unique units rows. The units rows are 20, 22, and 44 (obtained fromTable B.6):320 22 44

Page 140: APLUS 111 System Management

TBS FileDescriptions

B-14 System ManagementVersion 11.1

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 alower bound of 5 ºK, upper bound of 5000 ºK, and a nominal value of 507.4 ºK. TC cannot beregressed 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).

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPLCDEFS REPLACE TC

2 Critical temperature

3 1 1 0 1

4 1 1 1 416

5 1D35

6 5.

7 5000.

8 0.5074D3

9 22

10 1

11 22

Page 141: APLUS 111 System Management

Appendix B

System Management B-15Version 11.1

Example of Property Parameter Definition for the Extended AntoineVapor Pressure Parameter, PLXANT

PLXANT is a unary parameter (pptype = 1) with a vector of length 9 (i = 9). It can have morethan 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 (element8) defaults to 0 ºK. The upper temperature limit (element 9) defaults to 1000 ºK. The lowerbound and upper bound for the parameter values are not provided (j = 0), but the nominalvalues are given (k = 1). The first seven elements can be regressed. The first four elementscan be defaulted automatically in DRS (regression code = 2). The fifth element defaults if theexperimental vapor pressure data cover a temperature range of 100 ºC or more. The last twoelements cannot be regressed because they are the temperature limits of the correlation. Theparameter 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 unitsrows are used (no units row = 3, ur = 20 for pressure, 22 for temperature, and 44 fordimensionless).

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPLCDEFS REPLACE PLXANT

2 Extended Antoineparameters

3 1 1 1 10

4 9 1 356 1

5 -1D35 0 0 0

6 0 0 0 0

7 1D3

8 .893609D2 0 0 0

9 0 0 0 0

10 1D3

11 2 2 2 2

12 100 1 1 0

13 0

14 -1 -3 -4 -5

15 44 -6 44 22

16 22

17 3

18 20 22 44

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

20 B [22] * ;

21 C [22] * [22B] 1 E ? - 1 F ? - 1 G ? - * * * - ;

22 D [22] / ;

23 F [22] G ^ / ;

Page 142: APLUS 111 System Management

TBS FileDescriptions

B-16 System ManagementVersion 11.1

Example of Property Parameter Definition for the Wilson BinaryParameter, WILSON

WILSON is a binary parameter (pptype = 2) with six elements (i = 6). It can have more thanone 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. Thetemperature limits cannot be regressed (regression code = 0) and are symmetric (symmetriccode = 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, and3, respectively, of the Units Conversion Formula section. Element 3 is dimensionless (unitsflag = 44). The last two elements have temperature units (units flag = 22).

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPLCDEFS REPLACE WILSON

2 Wilson binary parameters

3 2 3 1 1 2

4 6 0 480 1 1

5 0D0 0D0 0D0 0D0

6 0D0 1D3

7 60 2 100 1

8 0 0

9 0 0 0 0

10 2 2

11 aij aji bij bji

12 cij cji dij dji

13 Tlower Tupper

14 -1 -2 44 -3

15 22 22

16 2

17 44 22

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

19 B [22] * ;

20 D [22] / ;

Page 143: APLUS 111 System Management

Appendix B

System Management B-17Version 11.1

Physical Property Subroutine List Table

Figure B.3 shows the layout for the Physical Property Subroutine List tablecontained in the ppsublst.dat file. This table lists the mainline and initializationsubroutines for every property model defined in the conventional property modeldefinition table (ppcnvpmd.dat). See Conventional Property Model DefinitionTable, this chapter. Each subroutine listing contains the subroutine name.

Figure B.3 File Layout for the Physical Property Subroutine List Table

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPSUBLST REPLACE subrname

2

3

In Figure B.3, subrname is the subroutine name.

Modifying Aspen Plus System Routines

When you add new models to the conventional property model definition table,you must modify one or more Aspen Plus system Fortran routines.

Routine Requires modification for calling Filename

ppuser_phcciu Model initialization routines phcciu.f

ppuser_mdmon9 Non equation-of-state model mainline subroutines mdmon9.f

ppuser_esmnu Mixture equation-of-state model mainline subroutines esmnu.f

ppuser_esmnu0 Pure component equation-of-state model mainline subroutines esmnu0.f

Page 144: APLUS 111 System Management

TBS FileDescriptions

B-18 System ManagementVersion 11.1

Copies of these files are in the user subroutine template directory:

Aspen Plus Host Directory

Windows NT/95† C:\Program Files\AspenTech\Aspen Plus 11.1\Engine\USER

†If you install Aspen Plus on a different disk drive or directory, enter the appropriate drive name anddirectory location. The routines are extracted by issuing the user command at the command line prompt of the Aspen PlusSimulation Engine window.

After modifying any of these routines, you must rebuild the ppuser sharedlibrary. See Chapter 3.

For initialization routines, you must modify the phcciu.f file, asfollows:

1. Define NSUB in the PARAMETER statement to be the actual number ofinitialization 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 variableISUB. For example, suppose the two initialization routines are USRIN1 andUSRIN2. The DATA statement should read:DATA ISUB/4HUSRI, 4HN1 ,4HUSRI,4HN2 /

3. Modify the computed GO TO statement to add a unique label for eachinitialization routine. The existing GO TO statement is:GO TO (10), IGOTO

For example, with two initialization routines, the GO TO statement shouldread:GO TO (10, 20), IGOTO

4. For each label defined in step 3, call the initialization routine with the routinename defined in step 2. For example:10 CALL USRIN1 (MNDS)

GO TO 1000020 CALL USRIN2 (MNDS)

GO TO 10000

Where MNDS is the maximum number of data sets defined for this model andis in the argument list of phcciu.f. Do not define MNDS. Instead, pass MNDSas an input variable to the initialization routine.

For mainline subroutines (except for equation-of-state routines),you must modify the system routine ppuser_mdmon9 (filemdmon9.f), as follows:

1. Modify the computed GO TO statement to define a unique label for each mainline routine.GO TO (10, 20, 30), IGOTO

Page 145: APLUS 111 System Management

Appendix B

System Management B-19Version 11.1

Use label 10 to call the mainline subroutine defined for a property model thathas 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.

2. For each label defined in step 1, call the mainline subroutine. The followinginput variables are available:

Variable Type Dimension Description

T REAL*8 — Temperature (K)

PSYS REAL*8 — System pressure (N/m2)

B(P(1)) REAL*8 N System or vapor pressure (N/m2). Used for pure componentproperty.

N INTEGER — Number of component present

IDX INTEGER N Component index vector

X REAL*8 N Mole fraction vector (liquid or vapor)

KDIAG INTEGER — Property diagnostic level code

NDS INTEGER — Data set number

KCMOD INTEGER — Property calculation code0 = Do not calculate1 = Calculate property only2 = Calculate property derivative only3 = Calculate both

IB(LBB+9) INTEGER 10 Model option code

IRW5 INTEGER — Offset for real work array

IIW INTEGER — Offset for integer work array

The subroutine should return the results, as follows:

Variable Type Dimension Description

Q REAL*8 — Mixture property (SI units)

Q REAL*8 N Pure component or partial property (SI units)

Q(ID11) REAL*8 — Temperature derivative of mixture property (SI units)

Q(ID11) REAL*8 N Temperature derivative of pure component or partial property(SI units)

Equation-of-state subroutines for mixtures are used to calculate both pure andmixture properties when invoked from an equation-of-state-based propertymethod (for example, PENG-ROB). These user models are invoked from thesystem routine ppuser_esmnu (file esmnu.f). The pure component version of themodels is necessary only if the user wants the equation of state to also calculatepure component reference states for activity coefficient based methods. In thiscase, the user routines are invoked from the system routine ppuser_esmnu0 (fileesmnu0.f).

Page 146: APLUS 111 System Management

TBS FileDescriptions

B-20 System ManagementVersion 11.1

For equation-of-state subroutines (mainline subroutines for property=EOS andEOS0), 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 eachmainline equation state routine.GO TO (1010), IDXCGT

Label 1010 is used to call the first in-house equation-of-state model that has acomputed GO TO index of 51 (parameter idxcgt = 51 in Figure B.1 forpropname = EOS or parameter idxcgt = –51 for EOS0). Use label 1020 to callthe EOS subroutine corresponding to idxcgt = 52 (or –52 for EOS0). Thissection handles both property calculations and property temperaturederivative calculations.

Page 147: APLUS 111 System Management

Appendix B

System Management B-21Version 11.1

2. For each label defined in steps 1 and 2, call the mainline equation-of-stateroutine. The following input variables are available:

Variable Type Dimension Description

T REAL*8 — Temperature (K)

P REAL*8 — System pressure (N/m2)

X REAL*8 N Mole fraction vector (liquid or vapor)

N INTEGER — Number of component present

IDX INTEGER N Component index vector

IRW1 INTEGER — Offset for real work array

IIW INTEGER — Offset for integer work array

KVL INTEGER — Phase code to calculate properties:1 = Vapor phase properties2 = Liquid phase properties

NDS INTEGER — Data set number for parameters of the model

KDIAG INTEGER — Property diagnostic level code

IB(LBB+9) INTEGER 10 Model option code

KCALC (1) INTEGER — Calculation code for fugacity coefficients:1 = Calculate property only2 = Calculate temperature derivative of property only3 = Calculate both

KCALC (2) INTEGER — Calculation code for the enthalpy departure of a mixture

KCALC (3) INTEGER — Calculation code for the entropy departure of a mixture

KCALC (4) INTEGER — Calculation code for the Gibbs energy departure of a mixture

KCALC (5) INTEGER — Calculation code for the molar volume of a mixture

Page 148: APLUS 111 System Management

TBS FileDescriptions

B-22 System ManagementVersion 11.1

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

Variable Type Dimension Description

PHIMX REAL*8 N Vector of logarithms of fugacity coefficients of components ina mixture

PHIMX (NP1†) REAL*8 N Vector of temperature derivative of PHIMX

DHMX(1) REAL*8 — Enthalpy departure of a mixture (J/kgmole)

DHMX (2) REAL*8 — Temperature derivative of DHMX(J/kgmole-K)

DSMX (1) REAL*8 — Entropy departure of a mixture (J/kgmole-K)

DSMX (2) REAL*8 — Temperature derivative of DSMX(J/kgmole-K2)

DGMX (1) REAL*8 — Gibbs energy departure of a mixture (J/kgmole)

DGMX (2) REAL*8 — Temperature derivative of DGMX (J/kgmole)

VMX (1) REAL*8 — Molar volume of a mixture (m3/kgmole)

VMX (2) REAL*8 — Temperature derivative of VMX(m3/kgmole-K)

ZMX(1) REAL*8 — Compressibility factor

ZMX(2) REAL*8 — Temperature derivative of ZMX

CVMX(1) REAL*8 — Constant volume heat capacity (J/kgmole-K)

CVMX(2) REAL*8 — Temperature derivative of CVMX (J/kgmole-K2)

†NP1 is available from the argument list of the esmnu and esmnu0 routines.

All of your new routines and the system routines ppuser_phccin,ppuser_mdmon9, ppuser_esmnu, and ppuser_esmnu0 must be compiled. Leavethe object files in the customization directory. See Chapter 2 for information oncompiling Fortran subroutines and rebuilding system shared libraries.

Page 149: APLUS 111 System Management

Appendix B

System Management B-23Version 11.1

Major and Subordinate Property RouteTables

The major property route table is ppenmprt.dat. The subordinate property routetable is ppensprt.dat. These tables list every major and subordinate propertyroute 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 PlusPhysical Property Methods and Models, Chapter 4, for more information aboutproperty routes and calculation methods.

Figure B.4 File Layout for Major Property Route Table

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPENMPRT REPLACE routeid

2 propname method

3 n1

4 mdlprop model setno monitor

5 n2

6 m-opcode m-opcode m-opcode m-opcode m-opcode m-opcode

7 n3

8 majprop majprop majprop majprop majprop majprop

9 n4

10 subprop subprop subprop subprop subprop subprop

11 n5

12 r-opcode r-opcode r-opcode r-opcode r-opcode r-opcode

Page 150: APLUS 111 System Management

TBS FileDescriptions

B-24 System ManagementVersion 11.1

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

Table B.5 Parameters for the Major Property Route Table

Parameter Description

routeid Property route ID

propname Property name for this route†

method Property method code†

n1 Number of property models required for this route

mdlprop Property calculated by the model††

model Model name

setno Data set number

monitor Model monitor computed-go-to index†††

n2 Number of option codes for the model

m-opcode Model option code value

n3 Number of major properties required for this route

majprop Major property name

majroute Major property route ID

n4 Number of subordinate properties required for this route

subprop Subordinate property name

subroute Subordinate property route ID

n5 Number of route option codes for this route

r-opcode Route option code value

†See Aspen Plus Physical Property Methods and Models, Chapter 4.

††Where:propname = EOS for mixture equation of state modelpropname = EOS0 for pure-component equation of state modelSee Aspen Plus Physical Property Methods and Models, Tables 4.1-4.3, for a list of all other property names.

†††Obtained from property model definition. See Table B.1.

Page 151: APLUS 111 System Management

Appendix B

System Management B-25Version 11.1

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

Figure B.5 File Layout for Subordinate Property Route Table

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPENSPRT REPLACE routeid

2 propname method

3 n1

4 mdlprop model setno monitor

5 n2

6 m-opcode m-opcode m-opcode m-opcode m-opcode m-opcode

7 n3

8 majprop majprop majprop majprop majprop majprop

9 n4

10 subprop subprop subprop subprop subprop subprop

11 n5

12 r-opcode r-opcode r-opcode r-opcode r-opcode r-opcode

Page 152: APLUS 111 System Management

TBS FileDescriptions

B-26 System ManagementVersion 11.1

Table B.6 describes parameters for this table:

Table B.6 Parameters for the Subordinate Property Route Table

Parameter Description

routeid Property route ID

propname Property name for this route†

method Property method code†

n1 Number of property models required for this route

mdlprop Property calculated by the model††

model Model name

setno Data set number

monitor Model monitor computed-go-to index†††

n2 Number of option codes for the model

m-opcode Model option code value

n3 Number of major properties required for this route

majprop Major property name

majroute Major property route ID

n4 Number of subordinate properties required for this route

subprop Subordinate property name

subroute Subordinate property route ID

n5 Number of route option codes for this route

r-opcode Route option code value

†See Aspen Plus Physical Property Methods and Models, Chapter 4.

††Where:propname = EOS for mixture equation-of-state modelpropname = EOS0 for pure-component equation-of-state modelSee Aspen Plus Physical Property Methods and Models, Tables 4.1-4.3, for a list of all other property names.

†††Obtained from property model definition. See Table B.1.

Page 153: APLUS 111 System Management

Appendix B

System Management B-27Version 11.1

Example of an Encoded Major Property Route Table in the ppenmprt.datFile

Major property route PHILMX24 calculates liquid fugacity coefficients for components in themixture (propname = PHILMX) using calculation method 3. This route requires two propertymodels (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 fornoncondensable components.

This route uses To calculate Henry's constants for

A subordinate property route (HNRY01) Noncondensable components in each solvent (subprop=HNRY)

A mixing model (model=WHENRY) Each noncondensable component in the mixture from property HNRY

The WHENRY model has one model option code (n2 = 1). The option code value of 2(m-opcode = 2) indicates the Henry's constant in the mixture is calculated by surface-areaaveraging. For solvents, this route calculates the reference state fugacity coefficient (majprop= PHIL) by the major property route PHIL04. The major property route PHILMX24 uses oneroute option code (n5 = 1), with option code value of 1 (r-opcode = 1).

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPENMPRT REPLACE PHILMX24

2 PHILMX 3

3 2

4 GAMMA GMRENON 1 107

5 0

6 WHNRY WHENRY 1 203

7 1

8 2

9 1

10 PHIL PHIL04

11 1

12 HNRY HNRY01

13 1

14 1

Page 154: APLUS 111 System Management

TBS FileDescriptions

B-28 System ManagementVersion 11.1

Example of an Encoded Subordinate Property Route Table in theppensprt.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 enthalpydeparture is calculated from:• Vapor enthalpy departure at saturation condition (temperature and vapor pressure)• Enthalpy of vaporization• A term to account for the effect of pressure on liquid enthalpy

The vapor pressure (mdlprop = PL) is calculated from the extended Antoine model(model = PL0XANT) which has no model option code (n2=0). The heat of vaporization(mdlprop = DHVL) is calculated from the Watson model (model = DHVLWTSN). The vaporenthalpy departure (subprop = DHV) is calculated from subordinate property route DHV00. Theliquid enthalpy pressure correction (subprop = DHLPC) is calculated from subordinate propertyroute DHLPC00. This route does not reference any major property route (n3 = 0) and does notuse the route option code (n5 = 0).

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPENSPRT REPLACE DHL00

2 DHL 3

3 2

4 PL PL0XANT 1 101

5 0

6 DHVL DHVLWTSN 1 123

7 0

8 0

9 2

10 DHV DHV00 DHLPC DHLPC00

11 0

Page 155: APLUS 111 System Management

Appendix B

System Management B-29Version 11.1

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

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPSTOPTN REPLACE opsetid

2 n

3 propname routeid propname routeid propname routeid

4 propname routeid propname routeid propname routeid

5 propname routeid propname routeid propname routeid

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

opsetid Property method ID

n Number of major properties in this property method

propname Major property name

routeid Major property route ID

Page 156: APLUS 111 System Management

TBS FileDescriptions

B-30 System ManagementVersion 11.1

Example of Physical Property Method File NRTL.STO

123451

6789015

20

25

30

35

40

45

50

55

60

65

70

75

80

1 PPSTOPTN REPLACE NRTL

2 34

3 PHIMVX PHIVMX00 PHILMX PHILMX86 HVMX HVMX00

4 HLMX HLMX86 GVMX GVMX00 GLMX GLMX86

5 SVMX SVMX00 SLMX SLMX86 VVMX VVMX00

6 VLMX VLMX01 MUVMX MUVMX01 MULMX MULMX01

7 KVMX KVMX01 KLMX KLMX01 DVMX DVMX01

8 DLMX DLMX02 SIGLMX SIGLMX01 PHIV PHIV00

9 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

❖ ❖ ❖ ❖

Page 157: APLUS 111 System Management

System Management 1Version 11.1

Index

A

Accountingprogram 7-4report 7-1report, user-based 7-2required information 7-6

Accounting environment variablesetting 7-8

Accounting filecreating 7-6initializing 7-7

Accounting programactivating 7-8

Adding Helpfor databanks 4-7

Aspen PlusCOMMONs renamed 1-8customizing simulation engine 5-2customizing user interface 5-6debugging 3-5Help files, modifying A-8INCLUDE files 1-8in-house modifications 3-3introduction 2-2maintaining and updating 3-1modification levels 3-2routine names 1-9run definition file 2-6system modifications 3-3table building system, running 3-12, 5-5units rows available B-9user modifications 3-2utilities 2-9

Assigning map numbers A-6

B

Binary databanksadding 4-10creating input files 4-10

Building a Help table-of-contents file A-9Building system shared libraries 3-7

C

Command line qualifiers 2-9, 2-10Compatibility issues 1-2

load modules 1-4maintaining upward compatibility 1-4system definition files 1-3user interface initialization files 1-4

Compiling Help source files A-7Compiling user routines 3-4Configuring

physical property databanks 4-1physical property methods 5-1

ConvertingTBS input files 3-17user routines 3-9

Converting FortranCOMMONs renamed 1-8INCLUDE files 1-8inline 1-8routine names 1-9subroutines 1-8

Creatingcustom SDF files 3-9databank input files 4-4databanks 4-2Help files A-3physical property models, routes, methods B-1user interface input files 4-10

Customization filesMMTBS A-2

Customization system for user interfacerunning A-10

CustomizingAspen Plus simulation engine 5-2Aspen Plus user interface 5-6Help source files A-4

D

Databanksadding binary 4-10

Page 158: APLUS 111 System Management

2 System ManagementVersion 11.1

adding Help for 4-7adding in-house 4-1adding pair parameter 4-10adding user 4-1creating 4-2installing 4-8physical property, configuring 4-1rebuilding 1-2running MMTBS to add 4-7

DebuggingAspen Plus 3-5user routines on Windows 3-5

E

Electrolyte reaction databaseadding ionic reactions 4-17

Emergency relief vents 6-12

F

FilesMMTBS customization A-2simulation run 2-5

Formatprompts A-8

Fortranconverting subroutines 1-8inline, debugging 3-5modifying source code 3-9

G

Gas/2-phase service safety relief valves 6-5

H

Help driver filesmodifying A-9

Help filesadding for databanks 4-7adding for models, routes, property methods 5-12creating A-3customizing A-4modifying Aspen Plus A-8

Help source filescompiling A-7modifying A-4

I

In-house databanksadding 4-1

In-house models and subroutinesintegrating 3-8

Initialization files 1-4Inlet pipe valves 6-14Inline Fortran 3-4

converting 1-8Input file

binary databanks, creating 4-10header templates 4-14ionic reactions database, creating 4-18pair parameter databanks, creating 4-10

Installingdatabanks 4-8Help files A-11RECDEF files A-11system definition files 5-5

Ionic reactionsadding to electrolyte reaction database 4-17creating input file 4-18

L

Liquid service safety relief valves 6-2Load modules 1-4

M

Maintaining and updating Aspen Plus 3-1Maintaining upward compatibility 1-4Major property route table B-23

parameters B-24Map numbers

assigning to Help topics A-6MMTBS

customization files A-2running 4-7, 4-16, 4-20

MMTBS driver filemodifying 4-7, 4-16, 4-19, A-9

Modelsadding to simulation engine 5-7adding to user interface 5-11

ModifyingAspen Plus 3-2Aspen Plus Help files A-8Help driver files A-9Help source files A-4

Page 159: APLUS 111 System Management

System Management 3Version 11.1

in-house files 3-3MMTBS driver files 4-7, 4-16, 4-19, A-9system files 3-3user files 3-2

N

NRTL binary parameters 4-15

P

Pair parameter databanksadding 4-10creating input files 4-10

Physical property databanksconfiguring 4-1

Physical property method table B-29parameters B-29

Physical property methodsconfiguring 5-1

Physical property models, routes, methodscreating 5-6

Physical property subroutine list table B-17Pipes

pressure relief 6-10valves 6-14

Pressure reliefconfiguring equipment data 6-1pipes 6-10rupture disks 6-8

Promptsadding for models, routes, property methods 5-12format A-8

Property methodsadding to simulation engine 5-7adding to user interface 5-11example of file NRTL.STO B-30

Property model definition table B-2Property parameter definition table B-6

parameters B-7Property route tables

major B-23, B-27subordinate B-25, B-28

R

Relief valvesgas/2-phase service safety 6-5

Reportsaccounting 7-1

Routesadding to simulation engine 5-7adding to user interface 5-11

Routinesuser 3-4

Runningaccounting program 7-4MMTBS 4-7, 4-16, 4-20

Rupture disks 6-8

S

Scalar parameters 4-16SDF files

creating custom 3-9Simulation engine

adding models, routes, property methods 5-7command line qualifiers 2-9processes for running 2-2system files 2-4

Simulation run files 2-5Standard physical property method table B-29Subordinate property route table B-25

parameters B-26System configuration 2-1System definition files 1-3, 3-13

installing 5-5running report system 3-10updating 3-15

System filessimulation engine 2-4user interface 2-4

System overview 2-1System shared libraries

building 3-7Windows 3-7

T

Table building systemconverting files 3-17customization files 5-3, B-1file descriptions B-1file types 3-15files, creating from customization files 5-4, B-1program 3-14running 3-12, 5-5system definition files 3-13updating system definition files 3-15

Table-of-contents file for Helpbuilding A-9

Page 160: APLUS 111 System Management

4 System ManagementVersion 11.1

Tail pipe valves 6-14Templates for input file headers 4-14Testing changes in user interface 4-16

U

Units conversionflags B-10formulas B-10

Upgrading Aspen Plus 1-1Upgrading user interface files 1-2Upward compatibility

maintaining 1-4User databanks

adding 4-1User interface

adding models, routes, property methods 5-11creating databank files 4-4customizing A-1running customization system A-10system files 2-4testing changes in 4-16upgrading 1-2

User routinescompiling 3-4converting 3-9debugging on Windows 3-5maintaining 3-4

User-based accounting report 7-2

V

Valvesliquid service safety relief 6-2

Ventsemergency relief 6-12

W

Wilson binary parameters 4-15