You are on page 1of 100

Aspen Custom Modeler 11.1

SPEEDUP® 5 Source
Converter
Version 11.1

September 2001
Copyright 2001 by Aspen Technology, Inc. All rights reserved.
AspenTech product names that are mentioned in this manual, e.g., Aspen Custom Modeler™, Aspen Dynamics™,
SPEEDUP® 5, Plantelligence and Enterprise Optimization and the aspen leaf logo are trademarks or registered
trademarks of Aspen Technology, Inc., Cambridge, MA.
All other brand and product names are trademarks or registered trademarks of their respective companies.
This manual is intended as a guide to using AspenTech's software. This documentation contains AspenTech
proprietary and confidential information and may not be disclosed, used, or copied without the prior consent of
AspenTech or as set forth in the applicable license agreement. Users are solely responsible for the proper use of the
software and the application of the results obtained.
Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the software may
be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NO
WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS
DOCUMENTATION, ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A
PARTICULAR PURPOSE.

Corporate
Aspen Technology, Inc.
Ten Canal Park
Cambridge, MA 02141-2201
USA
Phone: (1) (617) 949-1000
Toll Free: (1) (888) 996-7001
Fax: (1) (617) 949-1030
URL: http://www.aspentech.com/

Division
Design, Simulation and Optimization
AspenTech Ltd.
Sheraton House
Castle Park
Cambridge CB3 0AX
United Kingdom
Phone: +44 (0) 1223 819700
Fax: +44 (0) 1223 366980
URL: http://www.aspentech.com/
Contents
Introduction v
What You Need To Use This Manual ................................................................................. v
Associated Manuals............................................................................................................ vi
For More Information........................................................................................................ vii
Online Help ........................................................................................................... vii
Printing Portable Document Format Files (PDFs) ...............................................viii
World Wide Web .................................................................................................viii
Technical Support ................................................................................................viii

1 About the Conversion Process 1-1


Preparing a SPEEDUP 5 Text File for Conversion..........................................................1-2
Generating the SPEEDUP 5 Text File .................................................................1-2
Handling SPEEDUP 5 Libraries ..........................................................................1-2
Handling Polymers Plus Simulations ...................................................................1-3
Opening a SPEEDUP 5 Input File ...................................................................................1-4
Default Options Used in Conversion ...............................................................................1-5
Running the Converter .....................................................................................................1-6
Specifying the Text Editor ...................................................................................1-6
Overview of the Converter Dialog Box ...........................................................................1-7
About the Preferences File ...............................................................................................1-8
Using Keywords ...............................................................................................................1-8
What the Preferences File Contains After Conversion ....................................................1-9
Modifying the Initial Preferences File............................................................................1-10
About the Listing File.....................................................................................................1-11
Example Listing File ......................................................................................................1-12

2 Sections Handled by the Converter 2-1


CDI ...................................................................................................................................2-2
Example of the Conversion of a CDI Section ......................................................2-2
Declare .............................................................................................................................2-3
Conversion of the Type Subsection......................................................................2-3
Conversion of the Stream Subsection ..............................................................................2-3
Estimation ........................................................................................................................2-7
Example of the Conversion of an Estimation Section with Dynamic Data .........2-7
External ............................................................................................................................2-9

SPEEDUP 5 Source Converter Contents • i


Example of the Conversion of an External Section ...........................................2-10
Flowsheet .......................................................................................................................2-11
Example of the Conversion of a Flowsheet Section ..........................................2-11
Function Sections ...........................................................................................................2-12
Example of the Conversion of a Function..........................................................2-12
Homotopy.......................................................................................................................2-13
Example of the Conversion of a Homotopy Section..........................................2-13
Procedure Sections .........................................................................................................2-13
Example of the Conversion of a Procedure........................................................2-14
Title ................................................................................................................................2-14
Options ...........................................................................................................................2-14
Table of Run Time Options............................................................................................2-16
Example of the Conversion of an Options Section ............................................2-17
Model .............................................................................................................................2-18
Set Subsection of Model ....................................................................................2-18
Array Variables in Type Subsection of Model...................................................2-18
Connection Variables in Type Subsection of Model......................................................2-19
Subsection in Model.......................................................................................................2-20
Equation and Procedure Subsections in Model..................................................2-20
Example Conversion of a Complete Model ...................................................................2-21
When NOCOMP has More than 1 Value...........................................................2-22
Macro .............................................................................................................................2-23
Example of Macro..............................................................................................2-24
Defining the Sizing Parameters..........................................................................2-24
Unit.................................................................................................................................2-25
Example of Converting Units.............................................................................2-25
Operation........................................................................................................................2-26
Example of the Conversion of an Operation Section.........................................2-26
Global .............................................................................................................................2-27
Example of the Conversion of a Global Section ................................................2-28
Result/Rcode ..................................................................................................................2-28
Comments ......................................................................................................................2-29

ii • Contents SPEEDUP 5 Source Converter


3 Overview of Text Processing 3-1
About Simple Text Processing Commands......................................................................3-2
Example of Conversion to an Array of Ports .......................................................3-3
About SIGMA Calculations .............................................................................................3-4
Example of Emulating a SIGMA Function if ?REPEAT Follows ( ...................3-4
Solutions for Difficult Text Processor Conversions ........................................................3-5
Using the Text Processor to Create Name Tags for Connection Statements .......3-5
Embedding Numbers Inside Identifiers................................................................3-5
Parameterizing Model Types in Macros...............................................................3-6
Selecting Types of Variables Conditionally.........................................................3-6
Parsing Text Processor Conditions Used to Vary the Variable List in a Stream
Definition .............................................................................................................3-7
Text Processor Conditions Inside Equations........................................................3-8

4 Importing Files into Aspen Custom Modeler 4-1


Handling SPEEDUP 5 Fortran for Procedures and Functions .........................................4-3

5 Restriction Messages 5-1


Severe Warnings ..............................................................................................................5-2
Warnings ..........................................................................................................................5-7

SPEEDUP 5 Source Converter Contents • iii


iv • Contents SPEEDUP 5 Source Converter
Introduction

This manual contains information on processing a SPEEDUP 5


input file and generating a new input file (.acmf) for use in Aspen
Custom Modeler™.
This chapter describes:
• The contents of this manual
• Where to find further information

What You Need To Use This Manual


To use this manual, you need Aspen Custom Modeler™ installed
on PC or PC file server running Windows 2000 or Windows NT.
For information on how to do this, read the Installation Guide
supplied with the product, or contact your system administrator.

SPEEDUP 5 Source Converter Introduction • v


Associated Manuals
Aspen Custom Modeler is also supplied with the following
manuals in PDF file format.

Manual Title Description


Getting Started Tutorials Contains basic hands-on
tutorials to help you become
familiar with Aspen Custom
Modeler
Examples Contains more complex and
extensive examples of using
Aspen Custom Modeler
Modeling Language Reference Contains detailed reference
information about the modeling
language, including syntax
details and examples
Library Reference Contains reference information
on control models, property
procedure types, utility routines,
port types, and variable types
Aspen Modeler Reference Contains information on using
automation, solver options,
physical properties, the Control
Design Interface (CDI)),
Simulation Access eXtensions,
online links, and using external
nonlinear algebraic solvers
Using DMCplus® Controllers Contains information on using
DMCplus with Aspen Custom
Modeler or Aspen Dynamics™

vi • Introduction SPEEDUP 5 Source Converter


For More Information
You can obtain information on Aspen Modeler products by:
• Accessing the comprehensive online Help system
• Reading the printed manuals supplied with your product
• Printing the Portable Document Format (PDF) files supplied on
the installation CD
• Accessing Aspen Technology's web page
If you need more detailed assistance than that provided in the
online Help and the PDF files, you can contact Technical Support.
This section explains how to use the online help, print PDF files,
find Aspen Technology on the web, and contact Technical Support.
Online Help To access online Help:
• From the Help menu, click Help Topics and then do one of the
following:
To Do this

Display a hierarchy of topics by Click the Contents tab


category
Display an index of all Help topics Click the Index tab and then type
the word you require
Search for words or phrases within Click the Find tab and then type
the Help topics the word or phrase you require

Tip To display Help on buttons, fields, menu commands, and


other screen elements, click the What's This button: or , at the
top of the window, and then click the element.

Printing Online Help


To display information on how to print online Help:
1. Open your Aspen Modeler product and from the Help menu,
click Help Topics.
2. On the Contents tab, double-click Using Help and then
double-click Print Help Topics.

SPEEDUP 5 Source Converter Introduction • vii


Printing Portable To print these manuals you must have Adobe Acrobat Reader
Document Format installed on your machine.
Files (PDFs) Tip If you do not have the Adobe Acrobat Reader, you can
download a free copy from the Adobe web site at
http://www.adobe.com.
Note Adobe and Acrobat are trademarks of Adobe Systems,
Incorporated.
After you have installed the Adobe Acrobat Reader, you can open
the files to view and print the manuals. To do this:
• From the Start menu, point to Programs, then AspenTech,
Aspen Engineering Suite, Product Name 11.1, Documentation,
and then click the name of the manual you want to access.
World Wide Web For additional information about AspenTech products and services,
check the AspenTech World Wide Web home page on the Internet
at: http://www.aspentech.com/
Technical Support AspenTech customers with a valid license and software
maintenance agreement can 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 Support e-
Bulletins. These e-Bulletins are used to proactively alert users to
important technical support information such as:
• Technical advisories
• Product updates
• Service Pack announcements
• Product release announcements
Customer support is also available by phone, fax, and email for
customers with a current support contract for this product. For the
most current contact information, please see the Online Technical
Support Center at http://support.aspentech.com.

viii • Introduction SPEEDUP 5 Source Converter


Operating Hours

North 8:00 – 20:00 Eastern Time


America
South 9:00 – 17:00 Local time
America
Europe 8:30 – 18:00 Central European time
Asia and 9:00 – 17:30 Local time
Pacific
Region

Phone Numbers

North 1-888-996-7100 Toll-free from U.S., Canada, Mexico


America 1-281-584-4357 North America Support Center
(52) (5) 536-2809 Mexico Support Center
South (54) (11) 4361-7220 Argentina Support Center
America (55) (11) 5012-0321 Brazil Support Center
(0800) 333-0125 Toll-free to U.S. from Argentina
(000) (814) 550- Toll-free to U.S. from Brazil
4084
8001-2410 Toll-free to U.S. from Venezuela
Europe (32) (2) 701-95-55 European Support Center
Country specific toll-free numbers:
Belgium (0800) 40-687
Denmark 8088-3652
Finland (0) (800) 1-19127
France (0805) 11-0054
Ireland (1) (800) 930-024
Netherlands (0800) 023-2511
Norway (800) 13817
Spain (900) 951846
Sweden (0200) 895-284
Switzerland (0800) 111-470
UK (0800) 376-7903
Asia and (65) 395-39-00 Singapore
Pacific (81) (3) 3262-1743 Tokyo
Region

SPEEDUP 5 Source Converter Introduction • ix


Fax Numbers

North 1-617-949-1724 (Cambridge, MA)


America 1-281-584-1807 (Houston, TX: both Engineering and
Manufacturing 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 (54) (11) 4361-7220 (Argentina)
America (55) (11) 5012-4442 (Brazil)
Europe (32) (2) 701-94-45
Asia and (65) 395-39-50 (Singapore)
Pacific (81) (3) 3262-1744 (Tokyo)
Region

E-mail

North support@aspentech.com (Engineering Suite)


America atmdsupport@aspentech.com (Aspen ICARUS products)
mimi.support@aspentech.com (Aspen MIMI products)
pims.support@aspentech.com (Aspen PIMS products)
aspenretail.support@aspentech.com (Aspen Retail products)
acs.support@aspentech.com (Advanced Control products)
AMS.support@aspentech.com (Manufacturing Suite)
Gabriela.Torres@aspentech.com (Mexico)
South info@tecnosolution.com.ar (Argentina)
America tecnosp@aspentech.com (Brazil)
Europe atesupport@aspentech.com (Engineering Suite)
AMS.support@aspentech.com (All other suites)
cimview@aspentech.com (CIMVIEW products)
Asia and atasupport@aspentech.com (Singapore: Engineering Suite)
Pacific SG_support@aspentech.com (Singapore: All other suites)
Region atjsupport@aspentech.com (Tokyo: Engineering Suite)
TK_Support@aspentech.com (Tokyo: All other suites)

x • Introduction SPEEDUP 5 Source Converter


1 About the Conversion
Process

The SPEEDUP 5 Source Converter processes a SPEEDUP 5 input


file and generates a new input file (.acmf) for use in Aspen Custom
Modeler.
In some cases, this conversion can be accomplished automatically
in a single pass, but often it may require an iterative process.
To help with the conversion process, you can:
• Customize a preferences file
• Review the diagnostic information provided in the Converter
Messages pane of the Converter
The complete iterative conversion process consists of these key
steps:
1. Preparing the SPEEDUP 5 file
• Generating SPEEDUP 5 text file
• Handling SPEEDUP 5 libraries
2. Opening a SPEEDUP 5 file
3. Running the Converter and analyzing output (.prf, .lis, .acmf)
If successful, go to Step 4, otherwise modify the SPEEDUP 5
input and/or the preferences file and re-run the converter.
4. Making final checks before loading the file

SPEEDUP 5 Source Converter About the Conversion Process • 1-1


Preparing a SPEEDUP 5 Text File for
Conversion
Before you begin converting to Aspen Custom Modeler™:
• Use SPEEDUP 5 to check the syntax of the input file.
• Correct any missing, stray or incorrect delimiters.
• Modify the source file to remove all errors and warnings
reported by SPEEDUP 5 during translation.
• If your simulation uses a library, merge the Library's
DECLARE section with the one in your simulation, giving
preference to variable types in your simulation. Ensure
especially that you merge the properties options of stream
definitions in your simulation with the types and parameters
from streams with the same name in the Library.
• Remove redundant sections. Removing unused RESULTS will
speed up the conversion process.
• If you do not have a converted version of the Library for Aspen
Custom Modeler, you must include in your source file all the
MODELS, MACROS, PROCEDURES and FUNCTIONS that
it uses from the Library.
Generating the Use the SPEEDUP 5 DUMP command to transfer the problem
SPEEDUP 5 Text File from the SPEEDUP database to a text file in the current directory.

DUMP filename (problem {section_type section_type…} )

filename The name of the SPEEDUP 5 text file.


Do not add the SPEEDUP extension to the file name.
problem The name of the problem be dumped
section_type The section types to be dumped from the named problem
Handling SPEEDUP 5 If your SPEEDUP 5 simulation uses a library, then you must do
Libraries one of the following:
• Create an equivalent Aspen Custom Modeler™ Library
• Merge relevant sections of the library into your simulation file
To merge relevant sections of the library:
1. Use the SPEEDUP 5 DUMP command to transfer the
library from the SPEEDUP database to a text file in the
current directory.

1-2 • About the Conversion Process SPEEDUP 5 Source Converter


2. Use a text editor to add the relevant library Models,
Macros, Procedures, and/or Functions to the SPEEDUP 5
input file.

– or –

Use the SPEEDUP 5 COPY command to copy the required


sections from the library to your current problem.

In both cases you must merge and reconcile the variable and stream
types from the library DECLARE section with the DECLARE
section of the current problem. This step involves removing
duplicate type definitions by giving precedence typically to the
types listed in the input file.
Where the same stream is defined in both the Library and the
simulation, and differ only in the properties options, you should
merge the variable types from the library with the properties
options in the simulation into a single stream definition in the
simulation.

Copying Sections from a Library to the Current Problem


To copy required sections from a library to your current problem,
you can use the SPEEDUP 5 COPY command:

COPY problem source_type { source_name target_name } (OW)

problem Name of the Library problem from which the section is to


be copied.
source_type The source section type to be copied.
source_name The source section name (where applicable).
target_name The name that you want to give the copied section in the
current problem. The character "=" can be used to make the
target name the same as the source name.
(OW) This is needed if the section already exists in the current
problem, and you wish to overwrite it.
Handling Polymers The interface to Polymers Plus® supports a much wider range of
Plus Simulations polymer applications resulting in a significant change in:
• The polymer stream structure
• The arguments to the polymer kinetic procedures
• The polymer conservation equations in models
The converter can be used with these SPEEDUP 5.5 inputs but will
not support these new structures automatically. After converting,
you will need to do some additional editing for it to work in Aspen
Custom Modeler™.

SPEEDUP 5 Source Converter About the Conversion Process • 1-3


Opening a SPEEDUP 5 Input File
To load a SPEEDUP 5 input file into the Converter:
1. Click the Start button, and point to Programs, then
AspenTech, then Aspen Custom Modeler, then click
SPEEDUP 5 Source Converter.

2. In the Converter, click Select.

3. In the Open dialog box, do one of the following:

• In the File Name text box, type the name of the


SPEEDUP 5 input file then click Open.
– or –

Move to the directory where the file is located and then


double-click the file that you want to load.

The file is then displayed in the Source File text box.

4. You are now ready to convert the file.

Note To open another file for converting, you need to click the
Select button again.

1-4 • About the Conversion Process SPEEDUP 5 Source Converter


Default Options Used in Conversion
This table shows the options that are used for conversion:

If you select this Then Set as


option Default

Use Existing The Converter will use the Preferences file that exists. By default a Yes
Preferences File template preferences file is supplied. Use this template to define:
• The shared libraries for your procedures and functions
• The working directory for your physical properties system
• The run identification for Properties interface
Click here to see the supplied Preferences file.
Exclude Comments Comments present in the SPEEDUP 5 input file will not be No
Transfer transferred to the Aspen Custom Modeler input file
Allow Extended Warning messages will not be issued if the SPEEDUP file input Yes
Character Set contains characters such as ß and é
Relaxed Port Type The Converter infers variable type inheritance based on the names of No
Matching the variables types. Thus the variable type ENTH_MOL_VAP is
assumed to be derived from the variable type ENTH_MOL, because
the name of the first starts with the name of the second.
The Converter will also match a port containing an
ENTH_MOL_VAP to a stream definition that use an ENTH_MOL, if
there is no stream definition that contains an ENTH_MOL_VAP.
Finally procedure defintions that contain ENTH_MOL_VAP will be
modified to use ENTH_MOL.
Ignore Results If the SPEEDUP 5 input file contains result sections, these sections Yes
Sections will not be converted
Preserve HELP text The text between HELP and $ENDHELP in Model, Procedure, and No
as comments Function sections of the SPEEDUP 5 source will be copied to the
output as comments.
If you select this, you will often need to amend the text so that it
corresponds to the new variable names.
Suppress stream The Converter will not generate STREAM type definitions, nor any No
instances and types instances of these types. All connections will be made using the built-
in default stream types. This results in fewer variables in the Aspen
Custom Modeler simulation, but there will be a reduced
correspondence to the SPEEDUP 5 simulation. This is useful for very
large simulations. Default is to create specific stream types and
instances to match the SPEEDUP 5 simulation as closely as possible.

SPEEDUP 5 Source Converter About the Conversion Process • 1-5


Running the Converter
When you have prepared the file, you are ready to run the
converter. To do this:
1. Select the file you want to convert.
2. On the Converter dialog box, click Convert.

After successful conversion, there is a summary of the number of


warning messages generated and the preferences file used.
Sometimes the entire SPEEDUP 5 flowsheet section is instanced
as a single model called the GlobalModel and if so, this warning
message appears:
SU5CONVERT: Writing to destination file Chp.acmf
Warning 130: Encapsulating FLOWSHEET as a Model
as it contains arrays
The Aspen Custom Modeler input file can be improved and
customised by providing your own aliases in the preferences file.
Specifying the Text If you want to use a text editor other than the default (Notepad) set
Editor the environment variable AMEditor to invoke your chosen editor.
For example under Windows NT 4:
1. Click the Start menu, and point to Settings, then click
Control Panel.
2. Double-click on System and when the dialog appears, click
the Environment tab.
3. In the Variable box, type AMEditor.
4. In the Value box, enter the executable file of the editor you
wish to use and click OK.

1-6 • About the Conversion Process SPEEDUP 5 Source Converter


Overview of the Converter Dialog Box
This illustration shows the converter dialog box with the default
options checked:

This table describes the files used in the conversion process:


Name of File Description

Source File The SPEEDUP 5 input file with the extension .spe or .speedup
to be converted.
Destination File The Aspen Custom Modeler text file generated with the
extension .acmf.
Preferences File The preferences file with the extension .prf containing a list of
aliases used for SPEEDUP 5 names.
Listing File The list file with the extension .lis is a listing of the SPEEDUP
5 input with interspersed errors and /or warning messages.

SPEEDUP 5 Source Converter About the Conversion Process • 1-7


About the Preferences File
The converter automatically uses a preferences file (i.e.,
su5filename.prf) .
The preferences file defines the working directory and the runid for
the Properties Interface and defines what .dll should be used for
external routines. The preferences file also contains a list of aliases
used for SPEEDUP 5 names in the Aspen Custom Modeler input
file. There are three places in particular where aliases are needed:
• For generating names for port variables
• Where two sections have been given the same name, which is
not permitted in Aspen Custom Modeler.
• Where the name used is a keyword in Aspen Custom Modeler,
for example, CONTROLLER, TIME.
If you do not want to use an existing .prf file, you can specify that
the converter overwrite it with a new initial preferences file. To do
this,
• On the Converter dialog box, clear the Use Existing
Preferences File checkbox.

Using Keywords
Unlike SPEEDUP 5, the Converter does not allow you to use
keywords as names.
For example, in SPEEDUP 5 you could declare a variable called
OUTPUT in your model and SPEEDUP would allow it, provided
you did not use it in a stream. The Converter does not allow this
and reports a syntax error at such names. You need to replace these
keywords in SPEEDUP 5 input.
Note The Converter converts SPEEDUP 5 input files with
keywords such as "PRINT, "TEAR", "FEED", "THERMO" and
"MEASURE" when they are used as model names.
For example, if OUTPUT is used as a variable name, you will get
the following error during conversion:
MODEL MEREACTOR
16: OUTPUT as FLOWRATE
**** ^
**** syntax error at or near "OUTPUT"
Conversion failed: 1 errors

1-8 • About the Conversion Process SPEEDUP 5 Source Converter


What the Preferences File Contains
After Conversion
The initial template preferences file after conversion will contain
the following information:

{file written by SU5CONVERT:} 1 2 1


# Library "SU5lib.acml"{ACM10 library for models etc}
# Code "libproc.dll" {Shared library for procedures & functions}
# WorkingDir "props" {Working directory for properties procedures}
# RunID "GPP" {Run Identification for Properties Interface}
{Aliases in PortType MAINSTREAM_Port}
Alias MAINSTREAM_Port VOL_FLOW1 as "VOL_FLOW1"
Alias MAINSTREAM_Port PRESSURE2 as "PRESSURE2"
{Aliases in Model INDEX}
Alias INDEX G as "G"
Alias INDEX R as "R"
Alias INDEX AREA_ as "AREA_"
Alias INDEX P0 as "P0"
Alias INDEX PTANK as "PTANK"
Alias INDEX VG as "VG"
Alias INDEX VTOT as "VTOT"
Alias INDEX CV1 as "CV1"
Alias INDEX CV2 as "CV2"
Alias INDEX TEMP as "TEMP"
Alias INDEX Z as "Z"
Alias INDEX N as "N"
Alias INDEX RHO as "RHO"
Alias INDEX I1 as "I1"
Alias INDEX O1 as "O1"
{Aliases in Problem index}
Alias FLOWSHEET TANK1 as "TANK1"

SPEEDUP 5 Source Converter About the Conversion Process • 1-9


Modifying the Initial Preferences File
You can make the following modifications to the initial
preferences file and re-run the converter to update automatically
the Aspen Custom Modeler file:
• Rename instances by placing the new name in quotes on the
alias line. For example, use the following line to rename the
variable CV in model LIQ_VALVE to CVnew:
Alias LIQ_VALVE CV as "CVnew"
• Rename types by adding a RENAME directive. For example,
to rename the variable type as RATIO_:
Rename Ratio as "Ratio_"
• Replace a count parameter which is automatically generated by
the converter with an existing parameter. This is done by
substituting the command Alias with Replace and the old
parameter name with the new one. For example, changing the
following preferences line from:
Alias CASCADE STG_Count as "STG_Count"
to
Replace CASCADE STG_Count as "NSTAGES"
where NSTAGES is a parameter set elsewhere in the
SPEEDUP 5 input, which also exists in the .acmf file.
• Set the value of an instance. For example, the number of
stages (NS) in model COLUMN1 can be set equal to 20 by
using:
Alias COLUMN1 NS as "NS"="20"
This is also commonly used to initialize sets correctly:
Alias CASCADE IndexSet1 as "IndexSet1" =
"[2:NS-1]"
To set the value of a StringParameter, the value has quotes
as part of the value, which must be included and doubled.
This means that there are three quotes either side of the
value:
Alias ACTION as "ACTION" = """CLIP"""

1-10 • About the Conversion Process SPEEDUP 5 Source Converter


About the Listing File
The listing (.lis) file provides a listing of the input for each
SPEEDUP 5 section with interspersed error and/or warning
messages. The number of warnings for each section is provided
along with the total number of warnings for the entire input file.
Warning messages are classified in two categories:
• Warnings
• Severe warnings
You should carefully review all warning messages before trying to
import the .acmf file into Aspen Custom Modeler™.
Note Even with severe warnings, the converter may report that
the conversion was successful (that is, no errors and a complete
.acmf file). In such cases, you will most likely encounter errors
when trying to load and/or run the simulation in Aspen Custom
Modeler. You should use the error information from Aspen
Custom Modeler together with list of warnings from the converter
to diagnose and correct the problems with your .acmf file.

SPEEDUP 5 Source Converter About the Conversion Process • 1-11


Example Listing File
A complete listing file is shown as follows:

Converting OPTIONS
1: OPTIONS
2: execution
3: time_step = 0.1
4: intervals = 50
5:
Conversion was successful.
Converting DECLARE
6: DECLARE
7: TYPE
8: area #m2# = 5 : 0 : 100
9: pressure#bar# = 1.01325: 0: 25

10: volume #m3# = 10 : 0: 50


11: valve_constant = 50 : 0: 100
12: temperature #K# = 373 : 283: 500
13: length #m# = 10 : 0: 50
14: no_moles #kmol# = 10 : 0: 50
15: density #kg/kmol# = 800 : 0: 1000
16: vol_flow #m3/hr# = 100 : 0: 500
17:
18: STREAM MAINSTREAM
19: type vol_flow, pressure
20:
Conversion was successful.
Converting MODEL index
21:
22: model index
23:
24: set
25: G = 9.81 {m/s2}
26: R = 8.314 {kJ/kmol K}
27:
28:

# Example of a closed tank by Lefkopoulos and Stadtherr, 1989


29:
30: Type
31: Area as Area
32: P0, Ptank, pin, pout as pressure
Warning 115: Instance/Type name collision "AREA"; renamed instance as AREA_
33: Vg, Vtot as volume
34: Cv1, Cv2 as valve_constant
35: Temp as Temperature
36: z as length
37: n as no_moles
38: rho as density
39: fin, fout as vol_flow
40:
41: Stream
42: input 1 fin, pin
43: output 1 fout, pout
44:
45: Equation
46:

1-12 • About the Conversion Process SPEEDUP 5 Source Converter


47: $z = 1/Area * (fin - fout);
48: fin = Cv1*sqrt(pin - Ptank);
49: fout = Cv2*sqrt(Ptank - pout);
50: Ptank = P0 + rho*g*z*1E-5 ;
51: P0*Vg*1e2 = n*R*Temp;
52: Vg = Vtot - Area*z;
53:
54:
Conversion was successful; 1 warnings.
Converting UNIT tank1
61: unit tank1 is a index
62:
Conversion was successful.
Converting FLOWSHEET
55:
56: FLOWSHEET
57:
58: feed is input of tank1
59: product 1 is output of tank1
60:
Conversion was successful.
Converting OPERATION
63: OPERATION
64: Set
65: within tank1
66: area= 5
67: Cv1= 70
68: Cv2= 80
69: rho= 1000
70: fin= if t < 0.5 then 100 else 110 endif
71: pin= 5
72: Temp= 348.15
73: n = 0.5
74: vtot = 10
75: # fout = 100
76: # pout = 1.5
77: # z = 1
78: # p0 = 2
79:
Conversion was successful.
Converting PREFERENCES
1: Preferences
2: {file written by SU5CONVERT:} 1 2 1
3: # Library "SU5lib.acml"{ACM10 library for models etc}
4: # Code "libproc.dll" {Shared library for procedures & functions}
5: # WorkingDir "props" {Working directory for Properties Interface}
6: # RunID "GPP" {Run Identification for Properties Interface}
7:
Conversion was successful.
Conversion of source file index.spe was successful
with 1 warning

SPEEDUP 5 Source Converter About the Conversion Process • 1-13


1-14 • About the Conversion Process SPEEDUP 5 Source Converter
2 Sections Handled by the
Converter

The converter handles the following SPEEDUP 5 sections:


• CDI
• Declare
• Estimation
• External
• Flowsheet
• Function
• Global
• Homotopy
• Macro
• Model
• Operation
• Options
• Procedure
• Result/Rcode
• Title
• Unit
All other sections are ignored:
• Conditions
• Profile
• Report

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-1


CDI
A SPEEDUP 5 CDI section is converted into two scripts:
• One script to set up the CDI analysis. This script is called
CDI_XXXX_SETUP, where XXXX is the name of the
SPEEDUP 5 CDI section.
• One script to run the analysis which is called
CDI_XXXX_RUN.
The SCALING sub-section of the SPEEDUP 5 CDI section is
ignored; scaling may be done in the RUN script, if necessary.
Example of the This CDI section in SPEEDUP 5:
Conversion of a CDI
Section CDI LINEAR
input
col1cc1.set_point
mf.tot_flow
mf.x(1)
output
boil1.temp
"col1s1.dtray(7)".x(1)
"col1s1.dtray(7)".temp
FILES LIS
minnonzero 1e-16
#scaling data...#
scaling input LINEARVALUE
output LINEARVALUE
state LINEARVALUE
is converted to these two scripts:

TYPE CDI_LINEAR_SETUP ROLE "SCRIPT" TEXT


Set Doc = ActiveDocument
Set LINEAR = Doc.CDI
LINEAR.Reset
LINEAR.ZeroTolerance = 1e-16
LINEAR.AddInputVariable COL1CC1.SET_POINT
LINEAR.AddInputVariable MF.TOT_FLOW
LINEAR.AddInputVariable MF.X(1)
LINEAR.AddOutputVariable BOIL1.TEMP
LINEAR.AddOutputVariable
COL1S1.DTRAY_(7).X(1)
LINEAR.AddOutputVariable
COL1S1.DTRAY_(7).TEMP
ENDTEXT;
TYPE CDI_LINEAR_RUN ROLE "SCRIPT" TEXT
Set Doc = ActiveDocument
Set LINEAR = Doc.CDI
LINEAR.Calculate "CDI_LINEAR"
ENDTEXT;

2-2 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Declare
The Declare section in SPEEDUP 5 has two parts:
• Type subsection containing the variable types of the problem
• Stream subsection containing the stream types of the problem
Conversion of the The type subsection converts straightforwardly into individual
Type Subsection variable types in the Aspen Custom Modeler input file.
For example, this SPEEDUP 5 Type subsection:
DECLARE
TYPE
notype = 1.0:-1.0E9:1.0E9 UNIT= "-"
length = 1: 0 : 100 unit = "m"
flow = 1: 0 : 1e6 unit = "kg/s"
converts to:
VARIABLE NOTYPE
Value:1.0 {-};
Lower:-1.0E9 {-};
Upper:1.0E9 {-};
end;
VARIABLE LENGTH
Value:1 {m};
Lower:0 {m};
Upper:100 {m};
end;
VARIABLE FLOW
Value:1 {kg/s};
Lower:0 {kg/s};
Upper:1e6 {kg/s};
end;
Note The variable types, RATIO and TIME, in the SPEEDUP 5
Library Declare section have been renamed to RATIO_ and TIME_
in the supplied Aspen Custom Modeler library, Modeler.
Conversion of the The Stream types of the Declare section can be converted into three
Stream Subsection type definitions in the Aspen Custom Modeler input file, that is:
• Port types
• Properties definition
• Stream types

Port Types
The converter tries to create the minimum number of port types
and component lists in the Properties definition. If two stream
types in SPEEDUP 5 differ only in their list of components or
options, then the result is one port type and two component lists. If
two stream types have the same list of components and options, but
different variable types, then the result is two port types and one
component list.

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-3


For each different list of variable types in the SPEEDUP 5 stream
types, a port type is created in the Aspen Custom Modeler input
file. Stream parameters in a SPEEDUP 5 Set subsection are put in
the port type. The name of this port type is the SPEEDUP 5 stream
name with "_Port" suffixed, for example, MAINSTREAM_Port.
Variables names are generated for the port type by taking the first 8
characters of the variable type names in the SPEEDUP 5 Type
subsection of the stream type, followed by an index number to
create unique names.

Properties Definition
For each different list of components and options in the SPEEDUP
5 stream types, a ComponentList property is created in a single
Properties definition in the Aspen Custom Modeler input file. Lists
are the same if and only if, the components are the same and in the
same order, and the options and their values are the same, and in
the same order. The name of this ComponentList is the same as the
SPEEDUP 5 stream name, e.g., MAINSTREAM. The
WorkingDirectory and RunId data are taken from the preferences
file, with defaults "\My Simulations\properties\" for the working
directory, and "GPP" for the RunId of a Properties Plus input file.

2-4 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Stream Type
For each STREAM in the SPEEDUP 5 input file, the converter
creates one STREAM type, which has two ports, both of which use
the corresponding PORT type. This type is only output to the
Aspen Custom Modeler input file if it is subsequently used to
connect ports. The name of this stream is the SPEEDUP 5 stream
name with "_Stream" suffixed, e.g., MAINSTREAM_Stream.
Note The converter does not handle options BINARY and
TERTIARY in stream types.

Example of Conversion of Stream Subsection of Declare


The SPEEDUP 5 stream subsection looks like this:
STREAM MAINSTREAM
SET
NOCOMP = 3
TYPE
FLOW_MOL, MOLEFRACTION(NOCOMP), TEMPERATURE, PRESSURE, ENTH_MOL
COMPONENTS
BENZENE,TOLUENE,OXYLENE

STREAM LIQUID
SET
NOCOMP = 3
TYPE
FLOW_MOL_LIQ, MOLEFRACTION(NOCOMP), TEMPERATURE, PRESSURE,
ENTH_MOL_LIQ
COMPONENTS
BENZENE,TOLUENE,OXYLENE

STREAM VAPOUR
SET
NOCOMP = 3
TYPE
FLOW_MOL_VAP, MOLEFRACTION(NOCOMP), TEMPERATURE, PRESSURE,
ENTH_MOL_VAP
COMPONENTS
BENZENE,TOLUENE,OXYLENE

****
The above example converts to a properties definition with a single
ComponentList property called Mainstream since the component
names were the same for all 3 stream types in the SPEEDUP 5
input file, 3 port types and 3 stream types. These port and stream
types are named after original the stream types in the SPEEDUP 5
input file ie MAINSTREAM, LIQUID and VAPOUR. The stream
types are created in this example, because they are subsequently
used to connect ports in the flowsheet definition.

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-5


Conversion of the Stream Subsection of Declare
The Aspen Custom Modeler file looks like this:
PROPERTIES
//WorkingDirectory: "\My Simulations\properties\";
//Runid: "GPP";
MAINSTREAM as ComponentList;
MAINSTREAM.Components : ["BENZENE","TOLUENE","OXYLENE"];
End;
Port MAINSTREAM_Port
NOCOMP as IntegerParameter(3);
FLOW_MOL1 as FLOW_MOL;
MOLEFRAC2(ComponentList) as MOLEFRACTION;
TEMPERAT3 as TEMPERATURE;
PRESSURE4 as PRESSURE;
ENTH_MOL5 as ENTH_MOL;
End;
Stream MAINSTREAM_Stream
Source as input MAINSTREAM_Port;
Dest as output MAINSTREAM_Port;
End;
Port LIQUID_Port
FLOW_MOL1 as FLOW_MOL_LIQ;
MOLEFRAC2(ComponentList) as MOLEFRACTION;
TEMPERAT3 as TEMPERATURE;
PRESSURE4 as PRESSURE;
ENTH_MOL5 as ENTH_MOL_LIQ;
End;
Stream LIQUID_Stream
Source as input LIQUID_Port;
Dest as output LIQUID_Port;
End;
Port VAPOUR_Port
FLOW_MOL1 as FLOW_MOL_VAP;
MOLEFRAC2(ComponentList) as MOLEFRACTION;
TEMPERAT3 as TEMPERATURE;
PRESSURE4 as PRESSURE;
ENTH_MOL5 as ENTH_MOL_VAP;
End;
Stream VAPOUR_Stream
Source as input VAPOUR_Port;
Dest as output VAPOUR_Port;
End;

2-6 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Estimation
A SPEEDUP 5 Estimation section is converted into a flowsheet
script called EstimationScript. Most of the estimation features will
be converted except for time history weightings for dynamic
experiments and results in the Measure subsection that are not
supported in Aspen Custom Modeler.
For example, if you supply such a time history weighting to a
dynamic experiment, you will receive the following warning
message:
DYNEXP
MEASURE
R1.Ya = <(0.001,1),

:
(5.0, 0.001)> : 2
Warning 153: Dynamic measurement weight (2) on DYNEXP ignored.
Example of the This estimation section in SPEEDUP 5:
Conversion of an
Estimation Section
with Dynamic Data
ESTIMATION

Estimate
REACTOR.K1
REACTOR.K2
REACTOR.K3
DYNEXP
Measure
REACTOR.Ya,REACTOR.Yq = <(0.025,0.741,0.199) :2,
(0.050,0.588,0.281),
(0.075,0.488,0.307),
(0.100,0.417,0.307),
(0.125,0.364,0.292),
(0.150,0.323,0.271),
(0.175,0.290,0.247),
(0.200,0.263,0.223),
(0.225,0.241,0.200),
(0.250,0.222,0.178),
(0.300,0.192,0.140),
(0.350,0.169,0.110),
(0.400,0.151,0.086),
(0.450,0.137,0.068),
(0.500,0.125,0.054),
(0.550,0.115,0.043),
(0.650,0.099,0.029),
(0.750,0.087,0.020),
(0.850,0.078,0.014),
(0.950,0.070,0.011)>
****

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-7


Converts to:
TYPE EstimationScript ROLE "SCRIPT" TEXT
' standard script preamble
dim applic
set applic=application
set simul=application.simulation
simul.AddEstimateVariable "REACTOR_.K1"
simul.AddEstimateVariable "REACTOR_.K2"
simul.AddEstimateVariable "REACTOR_.K3"
SET EXP001 = simul.NewExperiment("EXP001","Dynamic")
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.025, 0.741, 2
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.025, 0.199, 2
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.050, 0.588, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.050, 0.281, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.075, 0.488, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.075, 0.307, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.100, 0.417, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.100, 0.307, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.125, 0.364, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.125, 0.292, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.150, 0.323, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.150, 0.271, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.175, 0.290, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.175, 0.247, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.200, 0.263, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.200, 0.223, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.225, 0.241, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.225, 0.200, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.250, 0.222, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.250, 0.178, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.300, 0.192, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.300, 0.140, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.350, 0.169, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.350, 0.110, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.400, 0.151, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.400, 0.086, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.450, 0.137, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.450, 0.068, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.500, 0.125, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.500, 0.054, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.550, 0.115, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.550, 0.043, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.650, 0.099, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.650, 0.029, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.750, 0.087, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.750, 0.020, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.850, 0.078, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.850, 0.014, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YA", 0.950, 0.070, 1.0
EXP001.AddDynMeasurePoint "REACTOR_.YQ", 0.950, 0.011, 1.0
simul.AddExperiment(EXP001)
ENDTEXT;

2-8 • Sections Handled by the Converter SPEEDUP 5 Source Converter


External
The SPEEDUP 5 External section is converted into a
SimulationAccessExtension definition. The RECEIVE list is
converted into the Outputs list, and the TRANSMIT list is
converted to the Inputs list.
The Converter will only deal with variable names and variable
attributes, and not any of the SPEEDUP 5 keywords SET,
NOT_SET, VARIABLES, DERIVATIVES, and STATES.
If your input uses any of the keywords UBOUND, LBOUND,
ULAGRANGE, or LLAGRANGE for any variables, these will be
ignored and the variable name only will be written to the output.
This may cause duplicates in the generated list.
Tag names are also converted to assignments in the flowsheet
definition. Tag names given for derivative variables or bounds are
ignored as they may cause duplicate assignments.
CONSTRAINTs are converted into the equivalent Slack variable.
Before you can run the converted .acmf file, you need to build a
DLL containing your EDI code and the code to emulate EDI when
using the Simulation Access eXtensions (SAX). To do this:
1. Compile your EDI code and link it against the following files:
• sax_support.lib
• libatdll.lib
• edi_emulation.obj
These files are in the Program Files\AspenTech\AMSystem
11.1\Procedures folder.
2. After you have built the DLL, enter its name on the Procedure
tab of the Simulation Access eXtensions dialog box.

The EDI emulation supports the following EDI subroutines:


• EXTINI
• EXTTRA
• EXTREC
• EXTGET
• EXTPUT
• EXTWAI
• EXTTRM
• EXTOPT
• USRINI
• USRTRM

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-9


Note The emulation of the EDI functionality may behave slightly
differently from EDI. Please test that your application works as
expected.
In particular, you may need to modify the code to handle the
possibility of the simulation being rewound to arbitrary times. Give
careful consideration to the handling of FORTRAN common
blocks within your EDI code. Because Aspen Modeler products
require the code to be in a dll, rather than permanently linked in, do
not rely on BLOCKDATA to initialize them. It is safer to rewrite
the BLOCKDATA as a subroutine containing a sequence of
assignments, and call this subroutine either from EDIINI, or from
an integer function with no arguments called DLLINITIALIZE.
This function should return a value of 0; it will be called when the
dll is first loaded.
For more information on the Simulation Access eXtensions (SAX)
library, see the Aspen Custom Modeler CDI Reference in Help.
Example of the This External section in SPEEDUP 5:
Conversion of an
External Section
EXTERNAL
receive
global.profit_factor is "Methanol Value $"
transmit
PURGE.FRACTION is "Purge Fraction"
REACTOR.TEMP is "Reactor Temperature C"
REACTOR.PRESSURE is "Reactor Pressure C"
CONSTRAINT(5) is "5th Constraint"
is converted to:
SimulationAccessExtension
Call : EDIEmulation;
Library : "\my simulations\meth_edi\external";
Enabled : True;
Outputs:
{PROFIT_FACTOR};
Inputs:
{PURGE.FRACTION},
{REACTOR.TEMP},
{REACTOR.PRESSURE} ,
{Slack0005};
Events: Before Step, Before Initialization, After Step, After
Initialization;
End;

2-10 • Sections Handled by the Converter SPEEDUP 5 Source Converter


:
:
FlowSheet
:
PROFIT_FACTOR.Tag : "Methanol Value $";
PURGE.FRACTION.Tag : "Purge Fraction";
REACTOR.TEMP.Tag : "Reactor Temperature C";
REACTOR.PRESSURE.Tag : "Reactor Pressure C";
Slack0005.Tag : "5th Constraint";
End;

Flowsheet
The SPEEDUP 5 connectivity statements of a Flowsheet section
convert to Aspen Custom Modeler CONNECT statements.
If the connectivity statement contains a STREAM keyword, an
instance of a stream is declared in the Aspen Custom Modeler
input file.
Example of the This SPEEDUP 5 flowsheet section:
Conversion of a
Flowsheet Section
FLOWSHEET
# Material streams #
Stream "RAW ACID FEED" FEED 1 is Input 1 of CST
Stream "ALKALI FEED" FEED 2 is Input of VALVE
Stream HYDROXIDE Output 1 of VALVE is Input 2 of CST
Stream "TANK OUTLET" Output of CST is Input of PH_SENSOR
Stream EFFLUENT PRODUCT 1 is Output of PH_SENSOR

# Information streams #
Stream PH_SIGNAL Connection 1010 of PH_SENSOR is
Connection 1011 of CONTROLLER
Stream CONTROL_OUTPUT Connection 1012 of CONTROLLER is
Connection 1011 of VALVE
Converts to:
FlowSheet
// Material Streams
Connect CST.I1 With RAW_ACID_FEED;
Connect VALVE_.O1 And CST.I2 With HYDROXIDE;
Connect CST.O1 And PH_SENSOR_.I1 With TANK_OUTLET;
Connect PH_SENSOR_.O1 With EFFLUENT; // Information streams
Connect PH_SENSOR_.SIGNAL And CONTROLLER_.SIGNAL;
Connect CONTROLLER_.CONTROL_ACTION And VALVE_.CONTROL_ACTION;

The Unit CONTROLLER has been renamed to CONTROLLER_


because CONTROLLER is a keyword in Aspen Custom Modeler.

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-11


Function Sections
The SPEEDUP 5 Function section converts to Aspen Custom
Modeler procedure definitions. In all cases:
• Functions are renamed to include a "p" in front of the original
name.
• The Compatibility property is set to "SPEEDUP".
• The Language property is set to Fortran, because SPEEDUP 5
did not implicitly support Procedures or Functions in any other
language.
• The Call property is set to the name of the external routine.
• The Implementation property is assigned FUNCTION
• All the input variable types are converted to REAL so that
Aspen Custom Modeler does not type check the inputs and the
variable type for the output variable is transferred.
If you supply the name of a dynamic linked library (.dll) to the
Code property in the preferences file, this library name is assigned
to the Library property of every procedure definition in the Aspen
Custom Modeler language file. Otherwise, you need to add the
Library property, along with the path and library name, to the
procedure definitions yourself. For help on how to generate a .dll
file for a procedure definition, click here.
If the Function contains its FORTRAN in a CODE …
$ENDCODE subsection, the FORTRAN is copied exactly to a file
with the same name as the call property of the function, with the
suffix .for. This is written to the same directory as the .dll if there
is one, or to the current directory.
Example of the This SPEEDUP 5 function:
Conversion of a FUNCTION BOUND1
Function Input NOTYPE, NOTYPE
Output NOTYPE
****
Converts to:
Procedure pBOUND1
Compatibility : "SPEEDUP";
Language : FORTRAN;
Inputs : Real, Real;
Outputs : RealVariable;
Call : "BOUND1";
Implementation : FUNCTION "BOUND1.for";
Library : "c:\dynamic\dynevap.dll";
End;

2-12 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Homotopy
A SPEEDUP 5 Homotopy section is converted into a Homotopy
definition.
The data in the Options subsection of the SPEEDUP 5 Homotopy
section is transferred to the Options definition in the Aspen
Custom Modeler Language file.
Example of the This Homotopy section in SPEEDUP 5:
Conversion of a HOMOTOPY
Homotopy Section vary
cc_resi.sp = 140
options
maxhomstep = .01
is converted to:
Options
:
Homotopy.MaximumStep : .01;
End;

Homotopy
CC_RESI.SP : 140;
End;

Procedure Sections
The SPEEDUP 5 Procedure section converts to Aspen Custom
Modeler procedure definitions. In all cases:
• Procedures are renamed to include a "p" in front of the original
name.
• The Compatibility property is set to "SPEEDUP".
• The Language property is set to Fortran, because SPEEDUP 5
did not implicitly support Procedures or Functions in any other
language.
• The Call property is set to the name of the external routine.
• The Implementation property is assigned SUBROUTINE.
• The lists of variable types for the input and output arguments
for Procedures are transferred; explicit array bounds are
replaced by asterisks.
If you supply the name of a dynamic linked library (.dll) to the
Code property in the preferences file, this library name is assigned
to the Library property of every procedure definition in the Aspen
Custom Modeler language file. Otherwise, you need to add the
Library property, along with the path and library name, to the
procedure definitions yourself. For help on how to generate a .dll
file for a procedure definition, click here.

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-13


If the Procedure contains its FORTRAN in a CODE …
$ENDCODE subsection, the FORTRAN is copied exactly to a file
with the same name as the call property of the procedure, with the
suffix .for. This is written to the same directory as the .dll if there
is one, or to the current directory.
Example of the This SPEEDUP 5 procedure:
Conversion of a PROCEDURE COSTS: ENERGY
Procedure Input
flow_mol_liq, enthflow
Output
Cost(N)
****
Converts to:
Procedure pCOSTS
Compatibility : "SPEEDUP";
Language : Fortran;
Inputs : FLOW_MOL_LIQ, ENTHFLOW ;
Outputs : COST(*);
Call : "ENERGY";
Implementation : SUBROUTINE;
End;

Title
The Title section is converted to a Description property in the
flowsheet definition. For example:
TITLE
Closed-Loop 3 CSTRs in series
****
Converts to:
Description: "Closed-Loop 3 CSTRs in series";

Options
The Options section has three subsections:
The Routines subsection is converted into several solver
assignments. The keyword SUPERDAE has been replaced by
GEAR. Routines such as DAE, SRQP, FRONTAL and
SPAR2PAS are not supported by Aspen Custom Modeler and are
automatically discarded by the converter.
The Translate subsection is ignored during conversion because the
rules for variable type checking in streams is no longer applicable

2-14 • Sections Handled by the Converter SPEEDUP 5 Source Converter


and the print section, used for specifying the output level during
translation of the sections, is now obsolete.
Most of the SPEEDUP 5 options in the Execution subsection have
direct equivalents in Aspen Custom Modeler; the SPEEDUP 5
statements are replaced by assignments to the appropriate
properties of the Options definition. The following options are not
supported in Aspen Custom Modeler and are therefore discarded
during conversion:
• TARGET
• MAXEXP
• MAXPOINTS
• RECORD
• RTE
• EDI_TOL
• WORKSPACE
• DEBUG
• DELAYSIZE
A full list of the mapping between supported SPEEDUP 5 and
Aspen Custom Modeler options is also included.

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-15


Table of Run Time Options
This table lists the run time options:

SPEEDUP 5 Name Aspen Custom Modeler Name

PrintLevel Print
PropLevel PropInfo
Abs_Tol AbsTol
Rel_Tol RelTol
ResTol EqnTol
SS_Tol
Opt_Tol Feasopt.OptTol
Time_Step TimeSettings.CommunicationInterval
Tear Tearing
Hiinterrors Gear.HighestErrors, VSIE.HighestErrors
Reinit Gear.Reinit
Boundcheck Gear.BoundCheck
Event_Tol Gear.EventTol
MaxIntStep Gear.MaximumStep, VSIE.MaximumStep,
RK4.MaximumStep
MinIntStep Gear.MinimumStep, VSIE.MinimumStep
IniIntStep Gear.InitialStep, RK4.InitialStep, VSIE.InitialStep
IntStep ImpEuler.Step
Iterations Nonlinear.MaxIter
RangeFrac Nonlinear.RangeFrac
BoundFrac Nonlinear.BoundFrac
DogLeg Nonlinear.Dogleg
ConvTest Nonlinear.ConvCrit
FDPerturb Nonlinear.AbsPert
SingulFactor Nonlinear.SingPert
MaxStepRed Nonlinear.MaxStepRed
HiVarSteps Nonlinear.HiVarSteps
HiResiduals Nonlinear.HiResidual
MaxVarStep Nonlinear.MaxVarStep
NonRedlter NonLinear.MaxDivSteps
NL2RFCTol Nl2sol.RelFuncTol
NL2AFCTol Nl2sol.AbsFuncTol
NL2XCTol Nl2sol.SolTol
NL2Print Nl2sol.Print
Derivcheck Check ProcDerivs

2-16 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Scaling Scaling
Maxcoriter Gear.MaxCorIter
VSIETearTol VSIE.TearErrTol
VSIAbstol VSIE.AbsErrTol
VSIMaxIter VSIE.MaxCorIter
JacUpdate Gear.JacUpdate
MaxTearIts MaxTearIter
NL2Iter NL2Sol.MaxIter
IntStep Euler.StepSize, ImpEuler.Step
Routines Integrator
Routines Nonlinear.Method
Routines LinearSolver
Routines NonlinearSolver
Routines Optimizer

Example of the This SPEEDUP 5 Options section:


Conversion of an OPTIONS
Options Section routines newton, superdae
Execution
time_step = 600
intervals = 750
restol = 1e-7
boundcheck = on
Converts to:
OPTIONS
Nonlinear.Method: "Newton";
Integrator: "Gear";
TimeSettings.StepFor : 750;
TimeSettings.EnableStepFor : True;
TimeSettings.CommunicationInterval : 600;
EqnTol: 1e-7;
Gear.BoundCheck: "Track";
End;

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-17


Model
A SPEEDUP 5 Model is converted into a Model in the Aspen
Custom Modeler input file. The conversion is relatively simple.
The Category subsection is converted to a StringParameter with its
default value set to the value in the original model (although Aspen
Custom Modeler does not use this property).
Any help text between HELP and $ENDHELP is discarded.
Set Subsection of If the model contains a Set subsection, the parameters and
Model constants defined in it are converted to parameters in the Aspen
Custom Modeler™ output. The converter attempts to identify the
type of the parameter, but it defaults to IntegerParameter if the
model does not specify a value for the parameter. This may be
changed if a subsequent UNIT SET subsection does assign a value
to the parameter. Note that SPEEDUP 5 would allow an array to be
sized on a parameter that had a REAL value, but Aspen Custom
Modeler will not allow you to do this.
For example, this SPEEDUP 5 set subsection:
SET
noelements=20,
pi = 3.1415926,
emissivity = 0.1,
stefan = 5.67e-8
converts to:
NOELEMENTS as IntegerParameter(20);
PI as RealParameter(3.1415926);
EMISSIVITY as RealParameter(0.1);
STEFAN as RealParameter(5.67e-8);
Array Variables in If any variables are declared as arrays, the variables will be indexed
Type Subsection of either over:
Model • ComponentList, if components and options are defined for
stream types in the Declare section and the array is sized on the
appropriate stream parameter (usually NOCOMP).
• An IntegerSet with appropriate bounds; this is re-used for any
subsequent arrays with the same bounds. The upper bound is
declared as an IntegerParameter within the model; while the
lower bound is always 1.

2-18 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Connection Variables in Type
Subsection of Model
Connection variables are giving the qualifier input,output in the
Aspen Custom Modeler input file. This qualifier is used as the
converter will not know the value for the direction qualifier from
the SPEEDUP 5 input file.
# SET
nocomp
TYPE
X as array(nocomp) of molefraction;
Y as array(nocomp) of molefraction;
Converts to:
X(ComponentList) as MOLEFRACTION;
Y(ComponentList) as MOLEFRACTION;
:
MAINSTREAM as ComponentListName("MAINSTREAM");
# MODEL MEREACTOR
Set NOCOMP
Type
X as Array (NOCOMP) of MOLEFRACTION

Converts to:
Model MEREACTOR
NOCOMP as IntegerParameter;
IndexSet1 as IntegerSet([1:NOCOMP]);
X(IndexSet1) as MOLEFRACTION;
# Connection:
*Q AS enthflow # heat input/output
Converts to:
# Connection:
Q as input,output enthflow // heat input/output

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-19


StreamSubsection in Model
The Stream subsection declarations are converted into port
declarations; the converter attempts to match the declared types of
the variables in the putative port against the list of ports generated
when the Declare section was converted. A warning is issued if no
match can be found. The port name is derived from the connection
tag in the SPEEDUP 5 input file and the type of connection.
The tag is prefixed with O or O_ (for Output) or I or I_ (for Input).
If the tag is "F", "N", "R", or "S", the prefix will be O_ or I_
(otherwise the generated name would be a keyword). If there is no
tag, it is assumed to be "1". All the variables in the port are
removed from the model's list of declarations. In the complete
example, the STREAM OUTPUT 1 is matched with the definition
of a MAINSTREAM_Port, and the port is renamed O1. The
original stream variable H_OUT becomes the port variable
O1.ENTH_MOL5 in the converted output.
Equation and Equations are converted directly (with appropriate name changes).
Procedure "Daisy chain" equations (of the form X = Y = Z) are broken up into
Subsections in Model separate equations (X = Y and X = Z) . Note that the original
spacing of the equations will be lost; each equation will appear on
a single line, however complex the equation. Embedded comments
will be moved to the end of the equation. Conditional equations
convert with no changes other than name aliasing. The converter
attempts to maintain sensible indenting. Procedures are converted
into CALL statements with stream association, where appropriate.
Functions present will also be converted into CALL statements,
whose output is a dummy RealVariable. The following message
will appear, when this occurs during conversion:
Warning 148: Changing function call(s) to
procedure equation(s)
It sometimes happens that an equation containing a FUNCTION is
inside an IF; when this happens, the converter will issue this severe
warning:
Severe Warning 19: Dummy equation(s) generated
inside IF statement(s)
to enable conversion of FUNCTION to PROCEDURE
You must check IFs are still balanced before
running problem
Equations that contain embedded text-processor conditions will be
detected in the pre-parse, and the converter will attempt to rewrite
them so that the conditions appear outside the equation.

2-20 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Example Conversion of a Complete
Model
This SPEEDUP 5 model:
MODEL mol_feed
{
Model Version 1.0A
SPEEDUP Model Library
Copyright, 1982-1995 Aspen Technology, Inc. All rights
reserved.
This copyright statement must not be deleted and must be
included in any modification or adaptation of this Model.
}
CATEGORY Feed_Units
HELP
Flashes a specified mixture to produce a completely specified
Output stream to be used as a feed to a flowsheet
OUTPUT 1 : Outlet stream of unknown phase type
MAINSTREAM
Preferred Sets : F_out, z_out, T_out, P_out
Parameter : nocomp
$ENDHELP

SET
nocomp # number of components

TYPE
# Output:
*F_out AS flow_mol
*z_out AS ARRAY(nocomp) OF molefraction
*T_out AS temperature
*P_out AS pressure
h_out AS enth_mol
# Internal:
hl AS enth_mol_liq # liquid spec. enthalpy
hv AS enth_mol_vap # vapour spec. enthalpy
vf AS vapfraction # vapour fraction
x AS ARRAY(nocomp) OF molefraction # liq. composition
y AS ARRAY(nocomp) OF molefraction # vap. Composition
T AS temperature # manipulated temperature
STREAM

OUTPUT 1 F_out, z_out, T_out, P_out, h_out # mixed/unknown


phase feed
Connection Temp T
EQUATION

# Material balance - complete the mole fraction array


SIGMA( z_out ) = 1 ;

# Energy balance
h_out = vf*hv + ( 1 - vf )*hl ;
T_out = T;

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-21


PROCEDURE
( y, x, vf, hv, hl ) flash ( T_out, P_out, z_out ) OUTPUT 1
****
Converts to:
Model MOL_FEED
//
// Model Version 1.0A
// SPEEDUP Model Library
// Copyright, 1982-1995 Aspen Technology,Inc. All rights
reserved.
// This copyright statement must not be deleted and must be
// included in any modification or adaptation of this Model.
Category as StringParameter("FEED_UNITS");
HL as ENTH_MOL_LIQ; // liquid spec. enthalpy
HV as ENTH_MOL_VAP; // vapour spec. enthalpy
VF as VAPFRACTION; // vapour fraction
X(ComponentList) as MOLEFRACTION; // liq. composition
Y(ComponentList) as MOLEFRACTION; // vap. composition
T as input,output TEMPERATURE; // manipulated temperature
O1 as output MAINSTREAM_Port; // mixed/unknown phase feed
MAINSTREAM as ComponentListName("MAINSTREAM");
Sigma(O1.MOLEFRAC2) = 1; // Energy balance
O1.ENTH_MOL5 = VF*HV+(1-VF)*HL;
O1.TEMPERAT3 = T;
Call (Y,X,VF,HV,HL) = pFLASH
(O1.TEMPERAT3,O1.PRESSURE4,O1.MOLEFRAC2) MAINSTREAM;
End;
When NOCOMP has If the SPEEDUP 5 input file has different component lists for
More than 1 Value different stream types and use the NOCOMP parameter to size
array variables in a model, the converter utility sometimes uses the
incorrect component list for verifying equations if they have been
written for a specific component list.
The converter will issue a warning of the form, for example:
10769: Fc_sbbl(1) = F_in * z_in_f(1)* 0.0498 *2.205 ; { H2O }
10770: Fc_sbbl(2) = F_in * z_in_f(2)* 0.1232 *2.205 ; { H2S }
10771: Fc_sbbl(3) = F_in * z_in_f(3)* 0.0823 *2.205 ; { H2 }
Warning 135: Attempt to use component #3 of 2 in AIR
In the above example, one stream type, AIR, had 2 components
while another stream type had 27 components. However, the model
was written specifically for the latter stream type.
The converter has not used the correct component list for verifying
the equations and instead is using a constant, #3, to index an array
defined using a component list, in this case AIR.
It is recommended that you rewrite the above equation to be
generic for any component list present in the SPEEDUP 5 input
file.

2-22 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Fc_sbbl = F_in * z_in_f * factor *2.205 ;
Where factor is an array index over NOCOMP in the SPEEDUP 5
input file which will subsequently be converted to array variable
indexed over ComponentList.

Macro
A Macro section is converted into a Model in the Aspen Custom
Modeler input file. The model list is converted to a series of block
declarations. The flowsheet connectivity statements are converted
to a series of CONNECT or LINK statements. Ports are declared as
they are encountered.
You must include alphanumeric tags for the connectivity
statements in the Flowsheet subsection. If they are absent, you will
get a syntax error during conversion as follows:
92: FLOWSHEET
93: #External connections
94: feed is input of basicbed 1
95: product is output of basicbed ?(no_beds)
**** ^
**** syntax error at or near "1"
Conversion was unsuccessful; 1 errors; 1
warnings.
You need to correct the above as follows:
FLOWSHEET
#External connections
feed 1 is input 1 of basicbed 1
product 1 is output 1 of basicbed ?(no_beds)
Note Link statements will be retained as comments if during the
conversion process, if models required for the LINK statements are
not present in the SPEEDUP 5 input file:
Severe Warning 11: Converter was unable to connect
P214STH.CTHROT_I and D210.CTHROT2_O (models were missing from
SPEEDUP 5 input file)

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-23


Example of Macro This SPEEDUP 5 Macro section:

MACRO BIG
?set no_models=5 ?end
model mac
flowsheet
#external streams
feed 1 is input 1 of mac ?(no_models - (no_models-1))
output 1 of mac ?(no_models) is product 1
#internal streams
?repeat
output1 of mac ?(I) is input 1 of mac ?(I+1)
?with I=<1:no_models-1>
****
Converts to:
Model BIG
MAC__Lower as IntegerParameter(1); // Created by converter
MAC__Upper as IntegerParameter; // Created by converter
IndexSet1 as IntegerSet([MAC__Lower: Mac__Upper]);
MAC_(IndexSet1) as MAC;
NO_MODELS as IntegerParameter(5);
I1 as input MAINSTREAM_Port;
O1 as output MAINSTREAM_Port;
IndexSet2 as IntegerSet([1:NO_MODELS-1]);
// External streams
Link I1 And MAC_(1).I1;
Link O1 And MAC_(NO_MODELS).O1; // Internal streams
For I in IndexSet2 Do
Connect MAC_(I).O1 And MAC_(I+1).I1;
EndFor;
End;
Defining the Sizing During the conversion of Macros, the converter will generate two
Parameters parameters for sizing the array of models:
• Lower bound parameter with the suffix "_Lower", with a
default value of 1
• Upper bound parameter with the suffix "_Upper", with no
default value
When the resulting model is subsequently instanced, you will get
the following severe warning, for example:

Severe Warning 10: BASICBED__Upper in model


TOTALBED has no value in BED
You must supply an appropriate value for the _Upper parameter
before the simulation will run. The _Upper parameter can often be
replaced by a parameter that already exists in the source file. This
can be done by:
• Using REPLACE in the preferences file
– or –

2-24 • Sections Handled by the Converter SPEEDUP 5 Source Converter


• Correcting the example.
However, ensure that the parameters are defined correctly as arrays
of models in Macros are often discontinuous, that is, some
elements are missing. Often the first and/or last elements of an
"array" are actually different from the remainder. In columns, the
feed tray may be different from the rest of the "array" of tray
models. For such models, you must change the value of the
_Lower parameter from 1 to its appropriate value.
The Aspen Customer Modeler input file should be corrected to
read:
Model BIG
NO_MODELS as IntegerParameter(5);
IndexSet1 as IntegerSet([1:NO_MODELS]);
MAC_(IndexSet1) as MAC;
I1 as input MAINSTREAM_Port;
O1 as output MAINSTREAM_Port;
IndexSet2 as IntegerSet([1:NO_BEDS-1]);
// External streams
Link I1 And MAC_(1).I1;
Link O1 And MAC_(NO_MODELS).O1; // Internal streams
For I in IndexSet2 Do
Connect MAC_(I).O1 And MAC_(I+1).I1;
EndFor;
End;

Unit
All Unit sections are converted to block declarations in the
flowsheet definition.
Any Set subsections are converted as a set of parameters to the
block declaration.
Example of This SPEEDUP 5 section:
Converting Units
UNIT COL1CC1 is a P_I_CONTROLLER
****
UNIT COL1CN1 is a LCONC
Set KEY = 3
****
Converts to:
COL1CC1 as P_I_CONTROLLER;
COL1CN1 as LCONC(KEY:3);

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-25


Operation
The Operation section is converted to assignments in the flowsheet
definition. Explicit discontinuities are converted to Run-time If
equations.
In SPEEDUP 5, a SET took precedence over an INITIAL, which in
turn took precedence over a PRESET, and the order of the
statements did not matter. In Aspen Custom Modeler™, the
assignments are processed in the order they are encountered in the
input. The converter will issue a warning if it finds a PRESET after
an INITIAL or SET for a variable, or if it finds an INITIAL after a
SET. In each case, the later assignment is omitted; however, you
should check that the variable is assigned the expected value.
Example of the This SPEEDUP 5 Operation section:
Conversion of an
Operation Section OPERATION
Set
Within CST
FLOW_ACID = If T > 20.0 Then
0.030
Else
0.025
Endif
CONC_ACID = 0.1
CONC_ALKALI = 1.0
TANK_VOLUME = 5.0
Within PH_SENSOR
LAG = 12.0
Within CONTROLLER
GAIN = 0.6
RESET_RATE = 210.0
SET_POINT = 4.0
Within VALVE
K = 3.56E-3
Initial
Within CST
$CONC_BULK = 0.0
Within CONTROLLER
$INTEGRAL_ERROR = 0.0
****
Converts to:

2-26 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Within CST
If (Time>20.0) Then
I1.VOL_FLOW1 = 0.030;
Else
I1.VOL_FLOW1 = 0.025;
Endif;
I1.NORMALIT2 : 0.1,Fixed;
I2.NORMALIT2 : 1.0,Fixed;
TANK_VOLUME : 5.0,Fixed;
EndWithin; /* CST */
Within PH_SENSOR_
LAG : 12.0,Fixed;
EndWithin; /* PH_SENSOR_ */
Within CONTROLLER_
GAIN : 0.6,Fixed;
RESET_RATE : 210.0,Fixed;
SET_POINT : 4.0,Fixed;
EndWithin; /* CONTROLLER_ */
Within VALVE_
K : 3.56E-3,Fixed;
EndWithin; /* VALVE_ */
Within CST
$CONC_BULK : 0.0;
CONC_BULK : RateInitial;
EndWithin; /* CST */
Within CONTROLLER_
$INTEGRAL_ERROR : 0.0;
INTEGRAL_ERROR : RateInitial;
EndWithin; /* CONTROLLER_ */
end;

Global
If a Global section is present, it becomes part of the Flowsheet
definition (by default). The Global local variables are given the
type RealVariable.
The MAXIMIZE, MINIMIZE statement is converted to an
objective function expression.
The inequality CONSTRAINT statements are converted to
equations involving slack variables.
The equality CONSTRAINT statements are converted directly to
equations.

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-27


Example of the This SPEEDUP 5 Global section:
Conversion of a
Global Section
GLOBAL
Variables
PROFIT_FACTOR, MAX_EFFLUENT_CONCENTRATION,
MAX_TEMPERATURE, MIN_TEMPERATURE,
MAX_PRESSURE, MIN_PRESSURE, PROFITS
Maximize
PROFITS
Constraint
PROFITS = PROFIT_FACTOR * SEPARATOR.FLOWOUT1 (3) -
PURGE .TOTAL2;
PURGE . X1 (3) <= MAX_EFFLUENT_CONCENTRATION ;
REACTOR . TEMP >= MIN_TEMPERATURE ;
REACTOR . TEMP <= MAX_TEMPERATURE ;
REACTOR . PRESSURE >= MIN_PRESSURE ;
REACTOR . PRESSURE <= MAX_PRESSURE
****
Converts to:
Constraints
PROFIT_FACTOR as RealVariable;
MAX_EFFLUENT_CONCENTRATION as RealVariable;
MAX_TEMPERATURE as RealVariable;
MIN_TEMPERATURE as RealVariable;
MAX_PRESSURE as RealVariable;
MIN_PRESSURE as RealVariable;
PROFITS as RealVariable;
ObjectiveFunction as RealVariable(0.0);
Slack0001 as RealVariable(0.0);
Slack0002 as RealVariable(0.0);
Slack0003 as RealVariable(0.0);
Slack0004 as RealVariable(0.0);
Slack0005 as RealVariable(0.0);
ObjectiveFunction = -(PROFITS);
PROFITS = PROFIT_FACTOR*SEPARATOR.O1.FLOWRATE1(3)-

PURGE.TOTAL2;
Slack0001+PURGE.X1(3) = MAX_EFFLUENT_CONCENTRATION;
(-Slack0002)+REACTOR.TEMP = MIN_TEMPERATURE;
Slack0003+REACTOR.TEMP = MAX_TEMPERATURE;
(-Slack0004)+REACTOR.PRESSURE = MIN_PRESSURE;
Slack0005+REACTOR.PRESSURE = MAX_PRESSURE;
end; // Constraints

Result/Rcode
Each Result/Rcode section is converted to a single Snapshot
definition with the same name as the Result/Rcode section. The
variables will be renamed to match those valid for the Aspen

2-28 • Sections Handled by the Converter SPEEDUP 5 Source Converter


Custom Modeler input file. Currently when loaded into Aspen
Custom Modeler, the results will be shown as not converged and
its description will be the title of the original result name.
Snapshot INIRES
TEST(1).BED_(1).VOIDAGE : 0.4;
TEST(1).BED_(1).V : 0.6331;
TEST(1).BED_(1).I1.VELOCITY1 : 0.6331;
TEST(1).BED_(1).O1.VELOCITY1 : 0.6331;
TEST(1).BED_(1).CP_G : 2.417;
TEST(1).BED_(1).CP_S : 1.047;
TEST(1).BED_(1).RHO_G : 0.5359;
TEST(1).BED_(1).RHO_S : 1750;

Comments
Comments are preserved by default. These are usually moved to
the end of statements within the Aspen Custom Modeler input file.
Multi-line comments are retained as blocks comments. The
converter will also insert comments of its own. For example, when
it generates the __Lower and __Upper parameters used to define
IntegerSets for indexing arrays of models. Sometimes, comments
may be moved or lost seemingly unpredictably.
You may suppress the transfer of comments by checking the
Exclude Comments Transfer on the Converter Dialog box.

SPEEDUP 5 Source Converter Sections Handled by the Converter • 2-29


2-30 • Sections Handled by the Converter SPEEDUP 5 Source Converter
3 Overview of Text Processing

For help on text processing, click one of these topics:


• Simple text processing commands
• SIGMA calculations
• Solutions for difficult text processor conversions

SPEEDUP 5 Source Converter Overview of Text Processing • 3-1


About Simple Text Processing
Commands

Most simple text processor commands are converted directly to


Aspen Custom Modeler constructs, for example, ?REPEAT/?WITH
commands are converted into FOR loops.
If the text processor was used to define the number of input and
output streams in a model, this will be converted into an array of
ports.
In some cases, you may have to rewrite your text processing
command so that your SPEEDUP 5 input file will convert. For
example:
VARIABLE = 1/?(TPVAR).0 ;
will not convert. However, it could be rewritten as:
VARIABLE = 1.0/?(TPVAR) ;
without losing the meaning of the statement and the converter will
handle the above syntax.
Where a function call is used in a text processor loop to set
elements of an array, the replacement procedure call may end up
assigning to a scalar. You can remedy this by replacing the dummy
result variable with the appropriately indexed array element,
thereby eliminating the need for a dummy variable.
It is recommended that you change your function into a procedure
using array arguments—this would be more efficient as only one
call would be needed.

3-2 • Overview of Text Processing SPEEDUP 5 Source Converter


Example of If the text processor is used to define the number of input and
Conversion to an output streams in a model, this will be converted into an array of
Array of Ports ports.
For example, the SPEEDUP 5 syntax:
STREAM
input 1 Fin,Yin,Tin,Pin,Hin
?REPEAT
output ?(i)
Fout?(I),Yout?(i),Tout?(i),Pout?(i),Hout?(i)
?with i=<1:NS>
is converted to this Aspen Custom Modeler syntax:
I1 as input LIQSTREAM_Port;
O_Lower as IntegerParameter(1);
O_Upper as IntegerParameter;
IndexSet4 as IntegerSet([O_Lower:O_Upper]);
O(IndexSet4) as output LIQSTREAM_Port;
If you do not want to have an array of ports in your .acmf file, you
need to either:
• Remove the ?repeat/?with statement in the SPEEDUP 5
input file, do the expansion manually and then convert the
file
STREAM
input 1 Fin, Yin, Tin, Pin,
Hin
output 1 Fout1, Yout1, Tout1, Pout1, Hout1
:
output NS FoutNS, YoutNS, ToutNS, PoutNS,
HoutNS
– or –

• Edit the .acmf file, remove the array definition and ensure
that all references to the ports and port variables are
corrected from an array definition to a scalar definition.
For example:
I1 as input LIQSTREAM_Port;
O1 as output LIQSTREAM_Port;
:
ONS as output LIQSTREAM_Port;

SPEEDUP 5 Source Converter Overview of Text Processing • 3-3


About SIGMA Calculations
Where the text processor was used to emulate a SIGMA
calculation, the converter will use the SIGMA function in the
Aspen Custom Modeler input file and issue a warning as follows:
138: # Temperature relationship
139: TEMP_OUT*FLOW_OUT = 0
140: ?REPEAT + FLOW_IN_?(N) *TEMP_IN_?(N)
141: ?WITH N = <1 : NO_FEEDS>;
Warning 151: Conversion of Sigma emulation(s) by
Text Processor will need checking
This is what the above equation looks like in the .acmf file
O1.TEMPERAT2*O1.FLOWRATE1 =
0+Sigma(I([1:NO_FEEDS]).FLOWRATE1*I([1:NO_FEEDS])
.TEMPERAT2);
// Mass and Heat balance
However, the converter cannot parse text processor commands
used to emulate a SIGMA function if the ?REPEAT is the first
token in the equation or immediately follows the = or a (.
Example of Emulating The original equation in SPEEDUP 5 looks like this:
a SIGMA Function if Constant1- Avogadro * (
?REPEAT Follows ( ?REPEAT
+ K (?(i)) * Temp (?(i))
?WITH i = <1:N>
) * 1e-3 - vr1 - vr2 ;
The error in listing file is:
558: Avogadro * (
559: ?REPEAT
**** ^
**** syntax error at or near "REPEAT"
Conversion was unsuccessful; 1 errors.
Conversion of source file energ.spe was
unsuccessful
with 1 warning
The solution is to insert 0.0 (and possibly a +) in front of the
?REPEAT.
557: Avogadro * ( 0
558: ?REPEAT
559: + K (?(i)) * Temp (?(i))
560: ?WITH i = <1:N>
Warning 151: Conversion of Sigma emulation(s) by
Text Processor will need checking

3-4 • Overview of Text Processing SPEEDUP 5 Source Converter


Solutions for Difficult Text Processor
Conversions
There are a number of uses of the Text Processor where conversion
is unsuccessful. For example:
• Using the text processor to create name tags for connection
statements
• Embedding numbers inside identifiers
• Parameterizing model types in macros
• Selecting conditional types of variables
• Parsing text processor conditions used to vary the variable
list in a stream definition
• Text processor conditions inside equations
191: stream
Using the Text 192:
Processor to Create 193: ?REPEAT
Name Tags for 194: Temp?(I)
Connection 195: connection ?(i)
196: Press?(i)
Statements
197: connection ?(i+100) Pray_?(i)
Warning 116: C has been re-declared as an array
with unknown upper bound C_Upper
**** ^
**** syntax error at or near "connection"
Conversion was unsuccessful; 1 errors; 1
warnings.
Conversion of source file Test.spe was
unsuccessful with 1 warning
It is recommended that you remove line 197 from the SPEEDUP 5
input and create control variables in the Aspen Custom Modeler
input file.
Embedding Numbers The Text Processor is sometimes used to embed numbers inside
Inside Identifiers identifiers.
Text processor expressions embedded in identifiers (for example,
TURB?(N)A) are handled by moving the expression to the end of
the identifier and treating it as a subscript or instantiation value, for
example TURBA(N). That is, your scalar models or variables will
now be converted to arrays. This may lead to problems if your
input is not consistent with the use of the ?( ) operators in such
names when the expression is a constant. For example, if the input
has TURB1A instead of TURB?(1)A.
Check your .acmf file for such inconsistencies before loading it
into Aspen Custom Modeler.

SPEEDUP 5 Source Converter Overview of Text Processing • 3-5


Parameterizing Model The converter does not handle text processor commands used to
Types in Macros parameterize model types in macros.
For example:
MACRO COMPR_DP

?SET COPT = COMPR_OPT ?END


MODEL COMPR?(modeltype)_?(COMPR_OPT)

?If nprocin>1 ?then


MODEL MIX?(nprocin)
?Endif
results in the following failure:
42305: MODEL COMPR?(modeltype)_?(COMPR_OPT)
42306:
42307: ?If nprocin>1 ?then
**** ^
**** 1 Parameterised model names not supported by
Aspen Custom Modeler 10.0 at or near "If"
Conversion was unsuccessful; 1 errors.
Conversion of source file dplib.spe was
unsuccessful with 11 severe warnings and 242
warnings
You should remove the parameterized model type and conditional
in the macro and explicitly list the models, for example:
MACRO COMPR_DP
MODEL COMPR1_2
MODEL MIX2
Selecting Types of It also does not handle text processor commands used to select
Variables conditionally types of variables.
Conditionally Example listing file:
V_in_f AS ?if HASREB=1 ?then flow_mol_pos
?else ?flow_mol ?endif
**** syntax error at or near "if"
Conversion was unsuccessful; 1 error
You should remove the conditional and decide on the variable type
for the variable for example:
V_in_f AS flow_mol

3-6 • Overview of Text Processing SPEEDUP 5 Source Converter


Parsing Text It does not parse text processor conditions used to vary the variable
Processor Conditions list in a stream definition in a model. This leads to syntax errors.
Used to Vary the Example Listing (.lis ) file
Variable List in a
Stream Definition STREAM
OUTPUT V1 V_out, PV_out, y_out_f, hv_out_f,
y_out_r, hv_out_r
?if ISCOLTOP=0 ?then
,L_out_ent, x_out_enth, hl_out_ent
?endif
****syntax error at or near ","
Conversion was unsuccessful; 1 error
A solution is to remove the conditional so that all the variables in
the list are defined, for example:
V_out, PV_out, y_out_f, hv_out_f, y_out_r,
hv_out_r, L_out_ent, x_out_enth, hl_out_ent
# FF(?(SECTIONS)) = FUNCTION FF(RE(?(SECTIONS)),
E, DIAM ) ;
Converts to:
FuncResult1 as RealVariable; // Created by
converter
Call (FuncResult1) = pFF (RE(I),E,DIAM); //
Generated by converter
FF(I) = FuncResult1;
The SPEEDUP 5 syntax is:
UNIT TANK1 IS A START_TANK
****
UNIT TANK2 IS A TANK
****
UNIT TANK3 IS A TANK
****
UNIT TANK4 IS A TANK
****
UNIT TANK5 IS A TANK
****
UNIT TANK6 IS A TANK
****
UNIT TANK7 IS A TANK
****
UNIT TANK8 IS A END_TANK
****
In the .acmf file this will have been incorrectly defined as follows:
IndexSet1 as IntegerSet([1:8]);
TANK(IndexSet1) as START_TANK;
You should correct the .acmf file to:

SPEEDUP 5 Source Converter Overview of Text Processing • 3-7


// assume Tank, Start_Tank, End_Tank are already
defined
model BlockWithArrays
IndexSet1 as IntegerSet([2:7]);
TANK1 as START_TANK;
TANK(IndexSet1) as TANK;
TANK8 as END_TANK;
// etc
end;

Flowsheet
TheBlock as BlockWithArrays;
end;
You cannot have more than 1 instance with the same name (hence
Tank(1) and Tank(IndexSet1) cannot co-exist). You cannot have
arrays of blocks in the flowsheet., so you must rename TANK(1) as
TANK1, and TANK(8) as TANK8.
Text Processor The converter attempts to rewrite equations with embedded text-
Conditions Inside processor conditions so that the conditions are moved outside the
Equations equations. The result is a series of equations in a number of IF
statements. Since the converter has no knowledge of the meaning
of the conditions, there are sometimes branches in the IF that are
unreachable, and sometimes there are conditions that are overly
complex.
For example:
Original:
X = 10
?if p1 < 1 ?then
+ y
?else
?if p1 > 2 ?then
- Z
?else
+ Z
?endif
?endif
*
?if ?(UOM=1) ?then
?(100*UOM)
?else
?(12*UOM)
?endif;
Converts to:
If ((P1>1) And (UOM==1)) Then
X = 10+Y*(100*UOM);
Else
If ((P1>1) And ( Not(UOM==1))) Then
X = 10+Y*(12*UOM);
Else

3-8 • Overview of Text Processing SPEEDUP 5 Source Converter


If ( Not(P1>1) And (P1<2) And (UOM==1)) Then
X = 10-Z*(100*UOM);
Else
If ( Not(P1>1) And (P1<2) And ( Not(UOM==1))) Then
X = 10-Z*(12*UOM);
Else
If ( Not(P1>1) And ( Not(P1<2) And (UOM==1))) Then
X = 10+Z*(100*UOM);
Else
If ( Not(P1>1) And ( Not(P1<2) And (
Not(UOM==1)))) Then
X = 10+Z*(12*UOM);
Endif;
Endif;
Endif;
Endif;
Endif;
Endif;
Note that in the third and fourth conditions [( Not(P1>1) And
(P1<2) And (UOM==1))] the second expression [(P1<2)] is
redundant because it is implied by the first [Not(P1>1)].
In the last two conditions, Not(P1>1) and Not(P1<2) cannot
simultaneously be true, so they are unreachable.

SPEEDUP 5 Source Converter Overview of Text Processing • 3-9


3-10 • Overview of Text Processing SPEEDUP 5 Source Converter
4 Importing Files into Aspen
Custom Modeler

To avoid potential problems when trying to load or run your


simulation in Aspen Custom Modeler, you should ensure that:
• You have addressed any warnings issued during conversion.
• Typically, you have supplied a value for the parameter
"__Upper".
• You have checked that the NOCOMP parameter has been
defined correctly. Sometimes the converter does not detect the
value for this parameter from a stream definition and fails to
put it in the .acmf file.
• The array of models generated is correct.
• If you have used "Relaxed Port Type Matching", there are no
variable-type mismatches in procedure calls. If you are
following AspenTech's internal conventions for naming
variable types, which uses ENTH_MOL_VAP and
ENTH_MOL, the converter will infer the inheritance for you.
• If you are not using AspenTech's internal conventions, you can
manually correct the inheritances of the variable types by
adding USES.
For example, if Aspen Custom Modeler gives the error
Procedure input should be, or inherit … VAP_ENTH_MOL,
modify the procedure definition in the .acmf file to accept
ENTH_MOL, and add USES ENTH_MOL to the definition of
the VAP_ENTH_MOL variable type (immediately after the
type name).
• The information required for procedures and functions is
available.
Tip You may want to improve your input by changing array of
ports into multiports and giving specifications of Initial or Fixed to
variables within models.

SPEEDUP 5 Source Converter Importing Files into Aspen Custom Modeler • 4-1
Example of Using Inheritance to Prevent Variable Type
Mismatch in Procedure Calls
Change:
VARIABLE enth_mol
value:0.050 { GJ/kmol};
lower:-1000 { GJ/kmol};
upper:1000 { GJ/kmol};
END
VARIABLE enth_mol_liq
value:0.025 {GJ/kmol};
lower:-100 {GJ/kmol};
upper:100 {GJ/kmol};
END
VARIABLE enth_mol_vap
value:0.060 {GJ/kmol};
lower:-1000 {GJ/kmol};
upper:1000 {GJ/kmol};
END
To:
VARIABLE enth_mol
value:0.050 { GJ/kmol};
lower:-1000 { GJ/kmol};
upper:1000 { GJ/kmol};
END
VARIABLE enth_mol_liq uses enth_mol
value:0.025 {GJ/kmol};
lower:-100 {GJ/kmol};
upper:100 {GJ/kmol};
END
VARIABLE enth_mol_vap uses enth_mol
value:0.060 {GJ/kmol};
lower:-1000 {GJ/kmol};
upper:1000 {GJ/kmol};
END

4-2 • Importing Files into Aspen Custom Modeler SPEEDUP 5 Source Converter
Handling SPEEDUP 5 Fortran for
Procedures and Functions
This section describes how to handle SPEEDUP 5 user-written
Fortran for procedures and functions.
This table shows the four ways in which you can link user-written
Fortran into SPEEDUP 5 executables and what happens:

If you have Then

Placed the Fortran source between The converter utility automatically


the CODE and $ENDCODE writes the Fortran source into a
delimiters within the relevant suitable file in your working directory
Function or Procedure section. or the directory specified in the
preferences file for the CODE
property.
Placed the object to be linked into a You must place the Fortran source for
file called USEROBJ.OBJ in the the Fortran objects and/or libraries
same directory as the SPEEDUP into your working directory.
database.
Placed the object to be linked into You must place the Fortran source for
an object library called the Fortran objects and/or libraries
USERLIB.LIB in the same into your working directory.
directory as the SPEEDUP
database.
Listed objects files in a file called You must place the Fortran source for
SPEEDUP.INC in the same the Fortran objects and/or libraries
directory as the SPEEDUP into your working directory.
database.

After running the converter, you must check that the argument list
in your Fortran is correct. To do this:
1. Open the .acmf file containing your procedure definitions in
Aspen Custom Modeler
2. From the Tools menu, click Generate Procedure Code.
3. Use this dialog box to create the wrappers for your
procedures. You can then compare the arguments in the
generated wrapper with those in your Fortran.

SPEEDUP 5 Source Converter Importing Files into Aspen Custom Modeler • 4-3
4-4 • Importing Files into Aspen Custom Modeler SPEEDUP 5 Source Converter
5 Restriction Messages

These three messages indicate constructs that are not supported by


Aspen Custom Modeler Version 11.1 In each case, the conversion
of the current section is abandoned:
1 Parameterised model names not supported by
Aspen Custom Modeler 11.1

2 Conditional instance parameter lists not


supported by Aspen Custom Modeler 11.1

3 Parameterisation of type-names not supported by


Aspen Custom Modeler 11.1

SPEEDUP 5 Source Converter Restriction Messages • 5-1


Severe Warnings
Severe Warning 10
Severe Warning 10: PARAMETERNAME in type TYPENAME
has no value in INSTANCENAME
The named parameter has not been supplied a value in the
specified instance. Usually the parameter is one generated by the
Converter.
You can avoid this message by modifying the preferences file to
supply a value for the parameter or to REPLACE it with another
parameter in the same type.

Severe Warning 11
Severe Warning 11: Converter was unable to
connect UNIT. TAG and UNIT. TAG (models were
missing from SPEEDUP 5 input file)
Your input uses CONNECTIONS to link together two units,
neither of which have models in the input file. Since the models are
absent, the Converter cannot supply the correct variable name(s)
for the connection(s).
Either include the model(s) in the input or edit the .acmf file before
loading. The Converter inserts this message as a comment in the
.acmf file to assist you in editing correctly.

Severe Warning 12
Severe Warning 12: Couldn't find a CONNECTTYPE
called TAGNAME in TYPENAME
CONNECTTYPE is one of INPUT, OUTPUT, CONNECTION,
PRODUCT, FEED or LINK. TYPENAME will be a MODEL or
MACRO name, TAGNAME identifies the connection that is
needed. The model or macro does not define a connection with the
necessary tag; edit your input so that it does. This warning implies
that your SPEEDUP 5 input file would not have translated
correctly; it may be that it includes models or macros that are not
needed.

Severe Warnings 13 and 14


Severe Warning 13: Variable Type NOTYPE not
defined; substituted "RealVariable"
Severe Warning 14: Variable Type TYPENAME not
defined
You have declared a variable that uses an undefined type. If the
type is NOTYPE, the Converter replaces it with RealVariable,

5-2 • Restriction Messages SPEEDUP 5 Source Converter


otherwise it is used. If there is a suitable definition of the variable
type in an Aspen Custom Modeler library when you load the .acmf
file, there is no need to provide a definition of the type, unless you
need to allow it to be inherited from some other type by Relaxed
Port Type Matching.
These messages are issued only once for each missing type.

Severe Warnings 15 and 16


Severe Warning 15:Type TYPENAME could not be
found (declaring INSTANCENAME)
Severe Warning 16: Type TYPENAME could not be
found
Your input does not define the specified type; it may not be
necessary for it to do so if a suitable type is available in an Aspen
Custom Modeler Library.
These messages are issued only once for each missing type.

Severe Warning 17
Severe Warning 17: Definition of PROCEDURE
PROCNAME not found
Severe Warning 17: Definition of FUNCTION
FUNCNAME not found
Your input references a Procedure or Function for which there is
no definition in the input.
It may not be necessary to supply one if there is a suitable
definition in an Aspen Custom Modeler Library.
These messages are issued only once for each missing procedure or
function.

Severe Warning 18
Severe Warning 18: Emulated array NAME had
elements of different types
Your input has units with names of the form NAME1, NAME2,
NAME3 and uses a Text Processor ?REPEAT loop to connect
them together in FLOWSHEET or supply specifications in
OPERATION.
The Converter has had to create an array to handle the ?REPEAT,
but the units are based on different models. The easiest way to fix
this is to expand the ?REPEAT loop(s) by hand in the SPEEDUP
input file.
If the "array" is homogeneous except for the first and/or last
element(s), you may only have to deal with those units, leaving the

SPEEDUP 5 Source Converter Restriction Messages • 5-3


central part of the "array" as an array. This may mean renumbering
your units.

Severe Warning 19
Severe Warning 19: Dummy equation(s) generated
inside IF statement(s) to enable conversion of
FUNCTION to PROCEDURE You must check IFs are
still balanced before loading the .acmf file.
The Converter replaces FUNCTION calls with PROCEDURES,
inserting dummy variables and equations to handle the result of the
call. When the FUNCTION call is inside an IF statement, this may
result in different numbers of equations on either branch of the
"IF".
For example:
IF (FLOW>0.) THEN
FF = FUNCTION FRICTION(FLOW)
ELSE
FF = 0.0
ENDIF
Converts to:
IF (FLOW>0.) THEN
CALL (DummyResult1) FRICTION(FLOW);
FF = DummyResult1;
ELSE
FF = 0.0;
ENDIF;
which has two equations in one branch and one in the other: so it
will be unbalanced. In this case, you will need to edit the .acmf file
to this:
IF (FLOW>0.) THEN
CALL (DummyResult1) FRICTION(FLOW);
ELSE
DummyResult1 = 0.0;
ENDIF;
FF = DummyResult1;

Severe Warning 20
Severe Warning 20: ?REPEAT in CONSTRAINT will
require adjustments to the SLACK variables
The Converter has found a ?REPEAT in the CONSTRAINT
subsection of GLOBAL. This probably implies that one or more of
the slack variables will need to be arrays but the Converter is
unable to deduce which. It is usually straightforward to make the
necessary changes in the .acmf file after inspecting the original
input.

5-4 • Restriction Messages SPEEDUP 5 Source Converter


Severe Warning 21
Severe Warning 21: The variable VARNAME cannot be
specified VARY, because it is not FIXED.
This is probably is because it is a stream
variable and the variable at the other end of the
stream has been FIXED.
The Converter found the named variable in a VARY statement but
it had not been noted as a FIXED variable. The second form of the
message is issued if the offending variable is a stream variable,
otherwise the first form is issued.
This is caused by one of the following:
• An error in the SPEEDUP 5 input.
• The variable is SET in OPERATION but in a time-dependent
IF which the Converter has changed to equation(s). If so, you
should rewrite the IF as a TASK, and place a FIXED
specification on the variable.
• The variable is SET in OPERATION but by an expression
involving non-SET variables which the converter has changed
to equations.
• The variable is a stream variable, and the variable at the other
end of the stream has been SET in the SPEEDUP 5 input. If so,
you should move the specification to the variable named in the
message.
The VARY statement is output to the .acmf file as a comment.

Severe Warning 22
Severe Warning 22: Unable to find NAME in model
MODELNAME, assuming it's MAINSTREAM
The Converter could not find the named port in the named model
(or MACRO). The Converter will assume that the port is a
MAINSTREAM_Port. The most likely cause of this is a faulty
input file.

Severe Warning 23
Severe Warning 23 Component list LISTNAME had no
options - you will need to check that the ACM
defaults are appropriate
A STREAM declaration in your DECLARE section has a
component list but no OPTIONS. You will need to ensure that the
default physical properties options used by Aspen Custom
Modeler™ are appropriate for your simulation, they may be
different from the defaults used by SPEEDUP. Users of the
Properties Plus interface should check the option HENRY-

SPEEDUP 5 Source Converter Restriction Messages • 5-5


COMPS, for example. The converter inserts comments into the
.acmf file as a hint:
//You need to check that the default options are
appropriate for your //problem
//MAINSTREAM.Option("HENRY-COMPS") : "<none>";

Severe Warning 24
Severe Warning 24 Could not convert
PARAMETER1:PARAMETER2 to a list of components as
PARAMETER has no value
Could not convert PARAMETER1:PARAMETER2 to a list of
components as the value of PARAMETER1 is greater than the
value of PARAMETER2
The integer slice expression could not be converted to a list of
components for some reason. Usually this is because one or both of
the parameters specifying the slice has not been given a default
value in the model (this gives the first form of the message,
specifying which parameter needs a value). The simplest solution
is to supply a suitable default value in the SPEEDUP 55 model.
The second form of the message is given when default values are
supplied for both parameters, but they are such that the slice is
inverted.

5-6 • Restriction Messages SPEEDUP 5 Source Converter


Warnings

Warning 101
Warning 101: Unterminated string : "STRING"
There is no closing quote for the string in the input. The Converter
will supply one. You should check that the string is the correct one.

Warning 102
Warning 102: 'IDENTIFIER' is too long, truncating
to 27 characters
The name is too long for Aspen Custom Modeler and has been
truncated. This is only important if two different identifiers are
truncated to the same name.

Warning 103
Warning 103: Parsing section of input rewritten
by pre-parse
The Converter is processing a section of input which has been
rewritten by the pre-parse, usually because the pre-parse has found
text processor conditionals embedded in the middle of an equation.
The conditionals are collected together and placed around a series
of equations.
You should review the .acmf file to verify that the conditionals are
correct. You can often remove some of the conditions from the
final output because they are redundant.
For example:
x = ?if p<1 ?then +y ?endif ?if p<2 ?then +z
?endif + y * z;
will convert to:

SPEEDUP 5 Source Converter Restriction Messages • 5-7


If ((P<1) And (P<2)) Then
X = +Y+Z+Y*Z;
Else
If ((P<1) And ( Not(P<2))) Then
X = +Y+Y*Z;
Else
If ( Not(P<1) And (P<2)) Then
X = +Z+Y*Z;
Else
If ( Not(P<1) And ( Not(P<2))) Then
X = +Y*Z;
Endif;
Endif;
Endif;
Endif;
In this example, the second condition (P<2) will be true if the first
is (P<1), and the first will be false if the second is. It therefore
follows that some of the branches are unreachable and can be
removed.

Warning 104
Warning 104: Unrecognized token "TOKEN" ignored
The specified lexical token has been ignored. For example, an
exclamation mark, which is the only character that is permitted in a
SPEEDUP 5 identifier that is not permitted in Aspen Custom
Modeler.
If this message is followed by a syntax error, it is usually because
the unrecognized token has appeared in the middle of a longer one.
In this case, you should remove the token from your input.

Warning 105
Warning 105: Ignoring HELP subsection(s)
The HELP .. $ENDHELP subsections of your PROCEDUREs,
FUNCTIONs, and MODELs are being omitted from the .acmf file.
This is usually because they require substantial revision before they
are relevant to the converted output.

Warning 106
Warning 106: Earlier revision of preferences file
has been ignored
The preferences file found by the Converter has a version number
which indicates that it is no longer valid, or it may not be a
Converter preferences file.
The existing file will be ignored and will be replaced by a new one.

5-8 • Restriction Messages SPEEDUP 5 Source Converter


Warnings 107, 108, 109, 110
Warning 107: Command line -l option overrides
preferences file
Warning 108: Command line -o option overrides
preferences file
Warning 109: Command line -w option overrides
preferences file
Warning 110: Command line -r option overrides
preferences file
These warnings can only appear when using the command-line
version of the Converter, and indicate that the specified command-
line option contradicts the same information in the preferences file;
the command-line data is used.

Warning 111
Warning 111: ROUTINES in UNIT ignored (not
available in Aspen Custom Modeler 10.0)
The input supplies information for mixed-mode integration which
is not supported by Aspen Custom Modeler. The information is
ignored.

SPEEDUP 5 Source Converter Restriction Messages • 5-9


Warning 112
Warning 112: INITIAL SSTATE ignored
The SPEEDUP language directive INITIAL SSTATE which told
SPEEDUP 5 to INITIAL variables from the steady-state
simulation, has no direct equivalent in Aspen Custom Modeler.
To achieve the same effect:
1. Load the .acmf file into Aspen Custom Modeler.
2. Select Dynamic mode.
The specification indicator should look like this :{bmc
help0012.bmp} or {bmc help0013.bmp}.

If there is no red triangle, the INITIAL SSTATE was


redundant.

3. Double-click the specification indicator.


4. In the Status window that appears, click the Initial
Changes tab, and click the Steady State button.

Warning 113
Warning 113: Discarded condition (CONDITION) in
GLOBAL VARIABLES
Your GLOBAL VARIABLES subsection contains text processor
?IF statements which have been discarded: it is not an error in
Aspen Custom Modeler to declare variables and then not use them.
You should check that the .acmf file does not contain repeat
declarations, which may happen if the input declares the same
variable differently on each branch of a Text processor ?IF.

Warning 114
Warning 114: The name NAME would be illegal in
Aspen Custom Modeler 10.0; modified preferred
name to CHANGEDNAME
The specified name contains characters that are not allowed in an
identifier in Aspen Custom Modeler 10 (usually hyphens). The
Converter will replace these characters with underscores.

Warning 115
Warning 115: Instance/Type name collision NAME;
renamed instance as NAME_
The input has a declaration where the instance and the type use the
same identifier. This can cause problems in Aspen Custom

5-10 • Restriction Messages SPEEDUP 5 Source Converter


Modeler, so the Converter appends one or more underscores to the
instance name to make it unique. If the preference file renames or
replaces the instance, this warning will not appear.

Warning 116 and 117


Warning 116: ARRAY has been re-declared as an
array with unknown upper bound ARRAY_Upper
Warning 117: ARRAY has been re-declared as an
array
These messages appear when text processor loops are used to
emulate arrays. The Converter creates a pair of integer parameters
to be the bounds of the array. The lower bound (ARRAY_Lower)
is supplied a default value of 1, while the upper bound
(ARRAY_Upper) is left without a value.
If the type containing the array is instanced, you will get a Severe
Warning indicating that the upper bound parameter has no value. If
you supply a value for this parameter, or REPLACE the parameter,
in the preference file, the later Severe Warning will be suppressed,
and the second form of this warning will be output.

Warning 118
Warning 118: Retrieved value of PARAMETER from
TYPENAME definition
The value of the named parameter has been found by reference to
SPEEDUP 5 STREAM definition.
The TYPENAME in this message will be that of a SPEEDUP 5 port
type; the parameter is nearly always NOCOMP or an equivalent
parameter.

Warning 119
Warning 119:Type NOTYPE could not be found,
RealVariable substituted
Your input file does not define NOTYPE as a variable type, so the
Converter will substitute RealVariable wherever it occurs.

Warning 120
Warning 120: Generated port name PORTNAME
collides with existing instance
The Converter generates names for ports by prefixing the
SPEEDUP 5 tag with I, O or C.
The name thus generated already exists in the SPEEDUP 5 input
and the Converter appends an underscore to the generated name.

SPEEDUP 5 Source Converter Restriction Messages • 5-11


You should check that the .acmf file does not confuse the two
instances.

Warning 121
Warning 121: No stream definition for port
PORTNAME in model MODELNAME
You will need to check the definition for Undefined #_Port.
The # in this message is an integer; undefined port types are
numbered from 1 upwards.
The Converter matches ports to their port type by comparing the
variable types and dimensions of the variables in the port (that is,
the SPEEDUP 5 Model Stream definitions).
Unless you have requested Relaxed Port Type Matching, this
matching must be exact. The Converter will create port type
definitions for any unmatched ports which may then be used for
subsequent ports.
You should check the generated port types carefully.

Handling Undefined Ports


Undefined Ports arise when the Converter is unable to match a
stream in a model with any of the available defined stream types in
the input's Declare section. For small problems, you may be able to
use the dummy port definition generated by the Converter, but, for
most problems, you will have to make some changes to remove the
undefined port type.
If Then

You have omitted the Add the correct definition to your


definition of the appropriate Declare section.
stream type in your Declare
section (possibly because
SPEEDUP was using a library
definition)
The problem arises because of In the Options part of the Converter
the differences in the way dialog box, select Relaxed Port Type
connections between models Matching. See also Undefined Port
are handled by Aspen Custom Types and Relaxed Port Type
Modeler™ and SPEEDUP® Matching.

Note Undefined Ports are normally caused by a lack of rigor in


the SPEEDUP input file. The inheritance mechanism used by
Aspen Custom Modeler prevents this, by ensuring that models
always work from the generic to the more specialized, and never
the other way round.

5-12 • Restriction Messages SPEEDUP 5 Source Converter


Connections in SPEEDUP vs. Aspen Custom Modeler
SPEEDUP® allowed connections between models where the
stream definitions were of the same structure and where the types
of the variables involved were compatible. Variable types were
compatible if they were the same type, or if the units of
measurement strings were the same, and the ranges (as defined by
the two types' upper and lower bound values) overlapped. By
default, the Converter expects exact type-for-type matching.
Aspen Custom Modeler uses an inheritance mechanism to check
the validity of connections. If a port definition expects (say) a
variable of type ENTH_MOL, you can connect a variable to that
port provided that the variable's type is ENTH_MOL, or is a type
derived from ENTH_MOL. The inheritance is indicated by a USES
clause in the following type definition:
Variable ENTH_MOL
:
End;
Variable ENTH_MOL_VAP Uses ENTH_MOL
:
End;
These two mechanisms are radically different, and there is no
simple way to map between the two. However, the libraries
provided with SPEEDUP used a naming convention that allows the
corresponding Aspen Custom Modeler inheritance to be inferred.
For example, ENTH_MOL_VAP is a specialization of
ENTH_MOL. To get the Converter to exploit this, in the Options
part of the Converter dialog box, select Relaxed Port Type
Matching.

Undefined Port Types and Relaxed Port Type Matching


You may find that you get Undefined Port Types even when you
use Relaxed Port Type Matching. This is because the Aspen
Custom Modeler inheritance mechanism works from the general to
the more specialized only, whereas SPEEDUP allowed the
connections both ways round.
For example, if your input attempts to connect a general stream to a
vapor stream, the Converter may not find a suitable match, and will
generate an Undefined Port Type for the mis-match. The most
convenient way to cure this is to generalize the stream definition in
the input's Declare section.
Alternatively, you may find that a model incorrectly uses a generic
type for a stream variable. For example, if your Declare section
allows for liquid and vapor versions of a stream-type, but not a
generic (that is mixed liquid and vapor) one, and your model

SPEEDUP 5 Source Converter Restriction Messages • 5-13


defines one of its stream variables as a generic type, then a
mismatch may occur:
DECLARE
TYPE
ENTH_MOL = ...
ENTH_MOL_LIQ = ...
ENTH_MOL_VAP = ...

STREAM LIQUID
TYPE ENTH_MOL_LIQ
STREAM VAPOR
TYPE ENTH_MOL_VAP
****
MODEL INCORRECT
TYPE
H_IN as ENTH_MOL
H_OUT as ENTH_MOL_VAP
:
STREAM
INPUT 1 H_IN # Liquid in
OUTPUT 1 H_OUT # Vapor out
:
****
The above will generate an undefined port type for I1, as there is
no stream type defined that contains the ENTH_MOL type. You
could introduce a MIXED stream-type in Declare, but you may
then find that ports that are expected to be of a specific phase end
up as MIXED. If you change the type of H_IN to
ENTH_MOL_LIQ, then I1 will be defined as a LIQUID_Port (as
the comment in the model indicates it should).
However, changing the type of H_IN in the SPEEDUP file may
mean that the file can no longer be loaded successfully, if H_IN is
also passed to a procedure. Because of this, the Converter also
modifies procedure definitions when the Relaxed Type Matching
option is selected, by using the most general type available. Thus it
will change a procedure specifying ENTH_MOL_VAP to one
specifying ENTH_MOL. Aspen Custom Modeler™ allows an
ENTH_MOL_VAP variable to be passed to a procedure expecting
ENTH_MOL, but not a variable of type ENTH_MOL to a
procedure expecting ENTH_MOL_VAP. The procedure can quite
easily verify that its arguments are in the appropriate range for the
expected phase.

5-14 • Restriction Messages SPEEDUP 5 Source Converter


Warning 122
Warning 122: Using relaxed match to type PORTTYPE
for port PORTNAME in model MODELNAME
The Converter has not found an exact match for the specified port,
but has found a near match. This message indicates which it is
using.

Warning 123
Warning 123: There were COUNT relaxed matches for
this port
This is attached to the previous message if there was more than 1
near match for the port.

Warning 124
Warning 124: Connecting array variables with
equations
One or more of your CONNECTION streams contains array(s).
Because Aspen Custom Modeler cannot handle CONNECT
statements in a FOR loop, the Converter has substituted equations
for them.

Warning 125
Warning 125: Name collision for stream
STREAMNAME; renamed as STREAMNAME_
Your input uses the same name for a stream in a FLOWSHEET
connectivity statement as some other instance. The Converter has
renamed the stream by appending an underscore.

Warning 126
Warning 126: Could not determine stream type for
STREAMNAME in NAME, using Connection
The type needed for the named stream is not defined in your input
(it is probably in the LIBRARY). The Converter has substituted the
generic stream type Connection.

Warning 127
Warning 127: Array(s) with size 1 ignored
Your input declares an array with a constant size of 1. The
Converter treats it as a scalar and omits the subscripts.

SPEEDUP 5 Source Converter Restriction Messages • 5-15


Warning 128
Warning 128: PORTTYPE duplicates the existing
EXISTINGPORT and has been eliminated
Your input contains two STREAM definitions in DECLARE that
have the same variable types and dimensions. The port type based
on the second will be replaced by the first in the .acmf file. If the
properties part of the stream definitions differ, they will generate
different PROPERTIES definitions in the .acmf file.

Warning 129
Warning 129: Inheriting TYPENAME1 from TYPENAME2
You have specified relaxed port type matching so that the
Converter infers inheritance of variable types by matching names
and inserting a USES clause in the definition of the type doing the
inheriting. For example, ENTH_MOL_VAP will inherit
ENTH_MOL.

Warning 130
Warning 130: Encapsulating FLOWSHEET as a Model
as it contains arrays
The Converter has created arrays of units or arrays of streams in
your FLOWSHEET, which cannot be represented graphically by
Aspen Custom Modeler. The Converter outputs the FLOWSHEET
as a model and instances it in a smaller FLOWSHEET.

Warning 131
Warning 131: Modified Input NUMBER of
PROCEDURENAME from TYPE1 to TYPE2
Warning 131: Modified Output NUMBER of
PROCEDURENAME from TYPE1 to TYPE2
When relaxed port type matching is selected, the Converter
modifies the variable types used in procedure definitions, replacing
types that inherit from other types with the inherited type. Thus,
ENTH_MOL_VAP will be replaced by ENTH_MOL.

Warning 132
Warning 132: File "FORTRANFILE" could not be
opened
The file named could not be opened, so the Fortran in the
procedure or function CODE … $ENDCODE could not be written
out. Fortran files are written to the current directory or the directory
specified for the CODE .dll.

5-16 • Restriction Messages SPEEDUP 5 Source Converter


Check that the preferences file specifies a valid .dll name and path,
and that you have write access to that directory.

Warning 133
Warning 133: Overriding ComponentList "Default"
with "NAME"
The Converter has inserted a statement that assigns the component
list in the flowsheet, thus overriding the Aspen Custom Modeler
default.
You should check that the Converter has chosen a good default; it
uses the first one in the generated Properties section.

Warning 134
Warning 134: There is no component NUMBER in
component list COMPONENTLISTNAME
The Converter has tried to change an integer subscript into the
corresponding component name and has been unable to do so
because there are no components. This may indicate an error in the
original SPEEDUP file.

Warning 135
Warning 135: Attempt to use component #NUMBER of
COUNT in COMPONENTLISTNAME
The Converter has tried to change an integer subscript into the
corresponding component name and has found that there are
insufficient components in the named component list. This usually
indicates that the Converter is using the wrong component list
because there is insufficient information for a correct match in the
input file or because the input file is incorrect.

Warning 136
Warning 136: Component List NAME1 duplicates
Component List NAME2 and has been eliminated
The components and options in the DECLARE STREAM
definition for the two streams named are identical so only the first
is retained in the .acmf file. All references to NAME1 are changed
into references to NAME2.

SPEEDUP 5 Source Converter Restriction Messages • 5-17


Warning 137
Warning 137: Overriding Aspen Custom Modeler 10.0
default integrator with Gear (formerly SuperDAE)
The input does not specify an integrator to use so the Converter has
specified GEAR as the integrator, which was the default in
SPEEDUP 5.
Note GEAR is the Aspen Custom Modeler name for SuperDAE.
The default integrator in Aspen Custom Modeler 10 is Implicit
Euler, not Gear.

Warning 138
Warning 138: Overriding Aspen Custom Modeler 10.0
default for Gear.EventTol with 1.0e-5
The Converter is specifying a value for Gear.EventTol that
corresponds to the SPEEDUP 5 default value. The SPEEDUP 5
default value is different from the Aspen Custom Modeler default
value. The input file specified SuperDAE (explicitly or by default)
and no value for EventTol.

Warning 139
Warning 139: Changing IMPEULER integrator to VSIE
Your input file specifies the IMPEULER integrator and a value for
IniIntStep, which implies a variable step size. This is the same as
requesting Variable Step Implicit Euler (VSIE) in Aspen Custom
Modeler.

Warning 140
Warning 140: Input specifies more than 1
integrator
The ROUTINES list in OPTIONS specifies more than one
integrator; only the first is used. Later ones are retained as
comments. This may be because the SPEEDUP 5 simulation used
mixed-mode integration which is not supported in Aspen Custom
Modeler.

Warnings 141 and 142


Warning 141: IntegerParameter NAME is being
assigned a real value (VALUE) - changed to
RealParameter
Warning 142 IntegerParameter NAME is being
assigned a string value (VALUE)- changed to
StringParameter

5-18 • Restriction Messages SPEEDUP 5 Source Converter


These warnings are issued when a parameter in a model has no
assignment in that model and is therefore assumed to be integer,
but a later assignment in a UNIT SET subsection indicates that the
parameter should be a real or a string. The declaration in the model
will be modified.
Note SPEEDUP 5 treated both integer and real parameters as
real, and so it is possible to assign a real value to a parameter that
is used to size an array. This will result in an error in Aspen
Custom Modeler.

Warning 143
Warning 143: IDENTIFIER is a keyword in Aspen
Custom Modeler 10.0; IDENTIFIER_ substituted
The Converter appends an underscore to identifiers that are Aspen
Custom Modeler keywords. You cannot suppress this warning by
renaming or replacing the identifier in the preferences file.

Warning 144
Warning 144: Identifiers starting with an
underscore are not legal in Aspen Custom Modeler
10.0; XXX prefixed
The Converter prefixes identifiers beginning with an underscore
with three X's so that they will be legal in Aspen Custom Modeler.
You cannot change this prefix, although you can change the name
through the preferences file. This warning is not suppressed by
making preference file changes.

Warning 145
Warning 145: IDENTIFIER starts with a digit;
_IDENTIFIER substituted
This message will only be issued if the input uses quoted
identifiers and one of them starts with a digit (inside the quotes).
Identifiers cannot begin with a digit in Aspen Custom Modeler, so
an underscore is prefixed. This will always be followed by the
previous message, and the final name will be XXX_TOKEN.

Warning 146
Warning 146: IDENTIFIER contained illegal
characters
The identifier specified contained illegal characters which have
been replaced by underscores. This usually arises from names
given in the preferences file.

SPEEDUP 5 Source Converter Restriction Messages • 5-19


Warning 147
Warning 147: STREAM NAME definition incomplete in
DECLARE: no variable types
The definition of the named stream did not contain any variable
types (presumably they were being "inherited" from the SPEEDUP
5 Library definition). You may need to supply the variable types in
the definition for the conversion to complete properly.

Warning 148
Warning 148: Changing function call(s) to
procedure equation(s)
The Converter replaces FUNCTION calls with CALL statements in
the .acmf file.

Warning 149
Warning 149: IF nesting has reached a depth of
NUMBER; Consider using TASKs.
Your input contains too many nested IF statements. It is possible
that rewriting parts of the .acmf file as TASKs would be helpful. If
the nesting is too deep, you will be unable to load the file into
Aspen Custom Modeler.

Warning 150
Warning 150: UNIT.VARIABLE already Fixed, INITIAL
ignored
Warning 150: UNIT.VARIABLE already Fixed, PRESET
ignored
Warning 150: UNIT.VARIABLE already Initial,
PRESET ignored
Your input gives contradictory specifications to the named
variable. If a PRESET occurs after a SET or INITIAL, or an
INITIAL after a SET, then the later specification is ignored, and
this warning issued. If the later specification is more binding, no
message is issued: Aspen Custom Modeler uses the last one
encountered. You should check that the variable has the correct
value as well as specification type.

Warning 151
Warning 151: Conversion of Sigma emulation(s) by
Text Processor will need checking
The Converter has detected Text Processor ?REPEAT loops used
to sum over an array or array expression, and has converted these
to SIGMA functions. You should check these; it is often possible

5-20 • Restriction Messages SPEEDUP 5 Source Converter


to improve on the converted version because the original had to
leave the first and/or last element of the array outside the loop.
The Aspen Custom Modeler version of the SIGMA function is
more powerful than the SPEEDUP 5 one – it can sum expressions
and lists as well as arrays and array slices.

Warning 152
Warning 152: ?IF in CONSTRAINT subsection ignored
One or more text processor ?IF statements in the GLOBAL
constraints subsection have been omitted by the Converter.

Warning 153
Warning 153: Dynamic measurement weight (VALUE)
on DYNEXP ignored
The input specifies a weight for a dynamic experiment in
ESTIMATION. This has been ignored: it is not available in Aspen
Custom Modeler. If the weight is necessary, you should multiply
the weights for all the data points in the experiment by the omitted
value.

Warning 154
Warning 154: Declaration of NAME moved outside
scope of IF statement in TYPENAME
The Converter has moved a conditionally declared variable outside
of the IF that contained it, thus making it unconditional. You
should verify that in doing so, the Converter has not created
multiple declarations of the same instance.

Warning 155
Warning 155: No components for Stream NAME in
Declare
You are using the named stream in an association with a procedure
call requiring properties, but the definition of the stream in declare
does not contain a COMPONENTS list.

Warning 156
Warning 156: THERMO in STREAM1 references a
stream (STREAM2) that has no COMPONENTS, THERMO
ignored
The THERMO keyword appears in the definition of STREAM1 that
references another stream (STREAM2) that does not have any
COMPONENTS defined. The Converter will be unable to change

SPEEDUP 5 Source Converter Restriction Messages • 5-21


integer indices into string indices for arrays defined on component
lists in this stream type.
Either the THERMO keyword is not needed for the SPEEDUP 5
input, or you are converting a LIBRARY, where it is legal to do
this.

Warning 157
Warning 157: Input has a normal declaration of
INSTANCENAME and uses text processor array
emulation on the same name. You will need to
rename one or other in the input
Your SPEEDUP 5 input file has a declaration for
INSTANCENAME (usually an array) and uses names of the form
INSTANCENAME?(i), where i is a Text Processor expression.
The Converter maps both of these into the same Aspen Custom
Modeler array, which will cause problems if you have equations of
the form:
INSTANCENAME(?(i)) = INSTANCENAME?(i);
This is usually to allow elements of an array to be passed into a
function or a connection.
You can avoid this by either renaming one or other in the input —
usually it is easier to rename the ordinary array, or by editing the
.acmf file yourself.

Warning 158
Warning 158: Operation assignment(s) involving
Time changed to Equation(s)
Your OPERATION section contains assignments where the right
side is an expression involving TIME (the special variable T in
SPEEDUP 5). These assignments have been changed into
equations and the variables are not specified FIXED.

Warnings 159 and 160


Warning 159: Variable Type TYPENAME not defined;
substituted RealVariable

Warning 160: Variable Type TYPENAME not defined


The named variable type could not be found while reading the
variable declarations in a Model. For some variable types, for
example. NOTYPE, the Converter substitutes RealVariable; for all
others, the variable type name is used unchanged (unless it is a
keyword) on the assumption that a library containing the definition
will be available when the .acmf file is loaded.

5-22 • Restriction Messages SPEEDUP 5 Source Converter


Warning 161
Warning 161 Operation assignment(s) involving
non-fixed variable(s) changed to equation(s)
Your OPERATION section contains assignments where the right-
hand side is an expression involving variables that are not fixed.
These assignments have been changed into equations and the
variables are not specified FIXED.

Warning 162
Warning 162 Parameter <name> changed to
StringParameter
The parameter named is being used to index a componentlist and
therefore has to be a string type in Aspen Custom Modeler™.

Warning 164
Warning 164 Attempt to Transmit/Receive variable
attribute - substituting variable
Your EXTERNAL section contains UBOUND or LBOUND in the
TRANSMIT or RECEIVE lists, or ULAGRANGE or
LLAGRANGE in the TRANSMIT list.
Aspen Custom Modeler does not support the specification of
variable attributes in the Simulation Access Extension lists, so the
Converter automatically adds the name of the variable to the
appropriate list. This may result in duplicate variable warnings
when the file is loaded.
You should modify your EDIEmulation function (or its equivalent)
to access the appropriate attributes of the variables.

Warning 165
Warning 165 Attempt to Transmit/Receive variable
attribute tag-name - ignored
Your EXTERNAL section specifies tag-names for UBOUND,
LBOUND, ULAGRANGE, or LLAGRANGE. These are likely to
generate multiple tag-names in the .acmf file, so the Converter
ignores them.
You can modify your EDIEmulation function (or its equivalent) to
pass appropriate strings to your EDI Fortran, if required.

SPEEDUP 5 Source Converter Restriction Messages • 5-23


Warning 166
Warning 166 Constraint NUMBER does not exist -
ignored
Your EXTERNAL section specifies a CONSTRAINT that does not
exist. Your input probably does not contain a GLOBAL section
with CONSTRAINTS.

Warning 167
167 Mixed component offset array accesses: check
.acmf file
An array equation is being sliced using different slices for different
variables. At least one of the variables is indexed on a
ComponentList, you will need to check the .acmf file to ensure that
the converter has chosen the correct sub-set of the component list.
This warning is usually only given once in each model, so you
should check the remainder of the model for similar equations.
This warning is often followed by one or more Warning 168
messages.

Warning 168
168 Modified type of index set of VARIABLE to
StringSet
This warning usually follows a warning 167, and implies that only
some of the variables in the equation are known to be indexed
using component lists. The converter assumes that the slices are in
fact identical, and replaces any integer index sets with lists of
components. Usually this list is a sub-set of a ComponentList
already in use in the model.

5-24 • Restriction Messages SPEEDUP 5 Source Converter


Index

defaults 1-5
A difficulties 3-5
examples 2-2, 2-5, 2-7, 2-10, 2-11, 2-12,
Aliases
2-13, 2-14, 2-17, 2-21, 2-24, 2-26, 2-
using 1-8, 1-10
28, 3-3
Allow Extended Character Set option 1-5
files used 1-7
AMEditor 1-6
performing 1-6
Array variables 2-18
Polymers Plus simulations 1-3
sizing 2-22, 2-24
preparing 1-2
Assignments
solutions 3-5
options definitions 2-15
text processor commands 3-2
Converting
B
files 1-6
BINARY stream type 2-5 options 1-5
COPY command 1-2
C
Calculations D
SIGMA 3-4 Declare section
CALL statements 2-20 about 2-3
CDI section stream subsection 2-3
about 2-2 Type subsection 2-3
Commands Defaults
converting 3-2 options 1-5
COPY 1-2 Description property 2-14
Comments Diagnosing errors 1-11
about 2-29 Duplication
ComponentList property 2-4 section names 1-8
Components
lists 2-3, 2-4 E
CONNECT statements 2-11, 2-23
EDIEmulation function 2-9
Connection variables 2-19
Editing
Connectivity statements 2-11
text 1-6
Conversion

SPEEDUP 5 Source Converter Restriction Messages • 5-1


Equations H
conversion 2-20 Homotopy section
Errors about 2-13
diagnosing 1-11
Estimation section I
converting 2-7
EstimationScript 2-7 Ignore Results Sections option 1-5
Examples Inconsistencies 3-5
CDI 2-2
conversion to array of ports 3-3 K
Declare 2-5 Keywords
Estimation section 2-7 aliases 1-8
External section 2-10 as names 1-8
Flowsheet section 2-11
Function 2-12 L
Global section 2-28
Homotopy 2-13 Libraries
listing file 1-12 handling 1-2
Macro 2-24 LINK statements 2-23
Model 2-21 Listing file
Operation section 2-26 about 1-11
Options section 2-17 example 1-12
procedure 2-14
Exclude Comments Transfer option 1-5 M
External section Macro section
converting 2-9 converting 2-23
ExternalInterface definition 2-9 Messages
restriction 5-1
F Model section
Files converting 2-18
description 1-7 functions 2-20
opening 1-4 stream subsections 2-20
Flowsheet section 2-11
warning 1-6 N
Fortran 4-3 NOCOMP parameter 2-22
Functions 2-20 Numbers
embedded 3-5
G
GEAR keyword 2-14 O
Global section Opening files 1-4
conversion 2-27 Operation section
GlobalModel 1-6 conversion 2-26
Options section
converting 2-15

2 • Index SPEEDUP 5 Source Converter


P Severe Warning 12 5-2
Polymers Plus simulations 1-3 Severe Warning 13 5-2
Ports Severe Warning 14 5-2
example of array 3-3 Severe Warning 15 5-3
types 2-3 Severe Warning 16 5-3
variables 1-8 Severe Warning 17 5-3
Preferences file Severe Warning 18 5-3
about 1-8 Severe Warning 19 2-20, 5-4
after conversion 1-9 Severe Warning 20 5-4
contents 1-9 Severe Warning 21 5-5
default 1-5 Severe Warning 22 5-5
initial 1-9, 1-10 Severe Warning 23 5-5
modifying 1-10 Severe Warning 24 5-6
suppressing 1-8 SIGMA calculations 3-4
Procedure section Sizing 2-24
converting 2-13 Snapshots
Procedure subsections 2-20 Result Rcode 2-29
Properties definition 2-4 Solutions
text processing 3-5
R
SPEEDUP 5
libraries 1-2
Receive list 2-9 STREAM keyword 2-11
Relaxed Port Type Matching option 1-5 Stream subsections 2-20
Renaming Stream types
variables 1-10 BINARY 2-5
Restriction messages 5-1 converting 2-3
Result Rcode section 2-29 creating 2-5
Routines merging 1-2
supported 2-14 reconciling 1-2
Run time options 2-16 TERTIARY 2-5
Running, Converter 1-6 StringParameter 2-18
SUPERDAE keyword 2-14
S
Scaling subsection 2-2 T
Sections Tag names
CDI 2-2 converting 2-9
Declare 2-3 TERTIARY stream type 2-5
Estimation 2-7 Text editor
Flowsheet 2-11 specifying 1-6
Homotopy 2-13 using 1-6
name duplication 1-8 Text processing
Procedure 2-13 conversion 3-2
Result Rcode 2-29 parameterizing 3-6
Severe Warning 10 2-24, 2-25, 5-2 solutions 3-5
Severe Warning 11 5-2 Time history weighting 2-7

SPEEDUP 5 Source Converter Index • 3


Title section Warning 125 5-15
converting 2-14 Warning 126 5-15
Transmit list 2-9 Warning 127 5-15
Troubleshooting 1-11, 3-5, 3-6, 4-1 Warning 128 5-16
Type definitions Warning 129 5-16
duplicates 1-2 Warning 130 1-6, 5-16
Type subsection 2-3 Warning 131 5-16
Warning 132 5-16
U Warning 133 5-17
Warning 134 5-17
Use Existing Preferences File option 1-5
Warning 135 2-22, 5-17
Warning 136 5-17
V
Warning 137 5-18
Variable types Warning 138 5-18
merging 1-2 Warning 139 5-18
reconciling 1-2 Warning 140 5-18
Variables Warning 141 5-18
array 2-18 Warning 142 5-18
connection 2-19 Warning 143 5-19
Warning 144 5-19
W Warning 145 5-19
Warning 101 5-7 Warning 146 5-19
Warning 102 5-7 Warning 147 5-20
Warning 103 5-7 Warning 148 2-20, 5-20
Warning 104 5-8 Warning 149 5-20
Warning 105 5-8 Warning 150 5-20
Warning 106 5-8 Warning 151 3-4, 5-20
Warning 107 5-9 Warning 152 5-21
Warning 108 5-9 Warning 153 2-7, 5-21
Warning 109 5-9 Warning 154 5-21
Warning 110 5-9 Warning 155 5-21
Warning 111 5-9 Warning 156 5-21
Warning 112 5-10 Warning 157 5-22
Warning 113 5-10 Warning 158 5-22
Warning 114 5-10 Warning 159 5-22
Warning 115 5-10 Warning 160 5-22
Warning 116 3-5, 5-11 Warning 161 5-23
Warning 117 5-11 Warning 162 5-23
Warning 118 5-11 Warning 164 5-23
Warning 119 5-11 Warning 165 5-23
Warning 120 5-11 Warning 166 5-24
Warning 121 5-12 Warning 167 5-24
Warning 122 5-15 Warning 168 5-24
Warning 123 5-15
Warning 124 5-15

4 • Index SPEEDUP 5 Source Converter


Warnings
Flowsheet section 1-6
messages 1-11
time history weighting 2-7
time history weightings 2-7

SPEEDUP 5 Source Converter Index • 5


6 • Index SPEEDUP 5 Source Converter

You might also like