The data initialization (INI) file is required for a third-party unit operation module to utilize the advanced interface features of the PRO/II user-added unit operations. The INI file maps the data storage in a structure supported by PRO/II. Data types, identifiers, and units of measure are all declared here. Access data is included (so PRO/II can call the calculation module). Additionally, unit configuration data (number of sides, feeds and products per side, etc.) allows PRO’II to manipulate the unit so it is properly represented and well behaved on a flowsheet PFD.
When a UAUOP is registered with PRO/II in the [UAUOP] section of the P2UASReg.ini file, the name of the INI file is required. The name or location of the executable DLL is not registered. Once PRO/II can access the INI file, it has all the information necessary to interface successfully with the user-added module. To accomplish this, the .ini file must be stored in the PRO/II System directory, where many other essential PRO/II resources are stored.
The INI file of a new user-added unit operation is structured to contain several sections of data. Their purposes and availability are summarized below.
[Access Data] Location and access mode to calculation DLL. Fortran interface is fully functional; others are not.
[Sides] Number and configuration of sides (feeds, products). Fully functional.
[Ports] Refinements for feed/product ports. Not functional.
[UOM] Declare, assign UOM’s to data. Fully functional.
[Data Definition] Declare, map data. Fully functional.
[Input Data] GUI input DEW configuration. Partially functional.
[OutPut] GUI and written reports. Not functional.
[Ports], [OutPut] are not supported in PRO/II Version 7.0 and should not be used.
[Access Data]
This section contains information to access the calculation DLL developed by third parties. It includes the Simsci reserved keywords UATYpe, DESCription, PROTocol, PATH and SYNTax. Each of these keywords, with its value, must appear in a separate line. The syntax is
Keyword = value The equals sign (=) is a required delimiter. For example,
UATYPE = "MYUAUOP"
UATYPE: Required. The value uniquely identifies the unit operation type to PRO/II. The value is also entered when the unit operation is registered in the P2UASREG registration file. If this identifier differs between the INI and PwUASREG files, PRO/II throws an error. This allows upgrading the unit operation with new versions and avoids incompatibilities that such upgraded could cause. The value may contain up to 32 characters. It is not case sensitive.
DESCRIPTION: Optional. This is basically a NOTE that allows up to 255 characters of descriptive text for documentation purposes. If the last character of the line is an ampersand (&), the text is continued on the next line.
PROTOCOL: Required. The only value currently supported is "DLL".
PATH: Required. Defines a fully qualified path to the directory that stores the calculation DLL of the user-added unit operation.. A typical path is D:\simsci\proiidll\system\. Do not use quotes for path. The maximum length of this field is 255 characters. An ampersand as the last character on the line continues the value entry on the next line. The ampersand is not considered part of the value.
SYNTAX: Optional. . In PRO/II version 8.2, the only valid value is "FORTRAN". This determines the calling conventions used to call the user-added calculation DLL.
[Sides]
This section declares and configures all the sides allowed and required in the UAUOP. Data for each side occupies a single line. The section begins with the keyword MAXSIDES that defines the maximum sides allowed in the unit operation. One SIDE statement is required for each side declared by MAXSIDES. information about number of sides followed by single line information related to each side with the Simsci reserved keywords MAXSides and SIDE.
MAXSIDES Optional. The default is MAXSIDES = 1. Declares the maximum number of sides supported by the unit operation
SIDE Required. One SIDE statement for each side declared by MAXSIDES.
SideNo Required. The value must range between 1 and MAXSIDES. Sides should be declared in ascending numerical order of SideNo.
SideIdName Required. A unique identifier for the side that may contain up to 32 characters. No spaces are allowed in the ID, and the entry should not appear inside quotation marks.
Maximum Feeds Products Required. The first value declares the maximum feed streams supported by the side. The second value declares the maximum products allowed. The values may be zero or greater.
Required Feeds Products Required. The first value declares the minimum feed streams allowed by the side. The second value declares the minimum products allowed. The values may be zero or greater, but must not exceed the corresponding maximum value declared just previously.
Is Pseudo Side Option to configure corresponding side to have only pseudo products, value 0 = False and 1 = True. User have the option to set only product sides to have pseudo products, feed side with value 1 is ignored and treated as actual process stream.
Example: The [Sides] section shown below should be self-explanatory:
[UOM]
This section defines the system of dimensional units of measure and the individual unit of each dimensional class used by the unit operation. (Table UOM Keywords).
All the data in this section is optional with SI as the default system. Once the developer defines the dimensional system, the unit of measure for each dimensional class defaults to the unit of measure for that system. The developer may overwrite the unit of each class with an individual Simsci reserved keyword for each UOM in each class. These are the same key words as used in PRO/II keyword input for declaring dimensional units. Values for the data will be converted to this unit before being delivered to the calculation DLL through the data transfer interface routines. Similarly, Data sent back fron the user DLL to PRO/II will be received in the declared units. PRO/II converts all data to internal units before storing the data. This allows developer to code in any consistent set of UOM’s of their choosing, with no impact on the internal storage considerations of PRO/II.
[Data Definition] section defines Unit operation sizing data with the simsci reserved keywords MAXINT, TOTINT, MAXPAR, TOTPAR, MAXDBL, TOTDBL for maximum data items and total storage requirements for integers, scalar real (8) parameters and Doubles. As integers and Parameters are scalars, total & maximum size will be same. For Doubles, as this data type supports real(8) arrays, MAXDBL represents the maximum number of double data items used and the TOTDBL represents the total DBL storage to be allocated.
After the sizing data is defined, each data item in the new unit operation should be defined by adding a single line of information consisting of data type, ID No, size, UOM class, size, default value, Lower bound, Upper bound of a data item. Default value, Lower bound, Upper bound of a data item should be supplied in the units specified in the [UOM] section.
Sample for a single double data item is shown below which is self-explanatory:
;type IdNo IDName size UomClass default value lower bound upper bound
;---- ---- ------------ ---- -------- ----------------------- ----------------------- -------------------------------
DBL 1 "TubeSideTemp" 1 TEMP +1.23d+000 -1.234d+000 +1.234d+000
[Input Data] section is responsible for customizing the Data Entry Window. Data Entry Window (henceforth called as DEW) consists of grids for displaying the integer, parameter and double data for maximum of 2 sides. The information present in this section enables the DEW to customize the display of data item labels and the Required/Optional nature of the field. . With the help of the data present in the Data Definition section, UOM’s, Range will be displayed for each data item based on the UOM class, default value, Lower bound, Upper bound specified.
This consists of Simsci reserved Keywords: WINDOW, COLUMN, GRID, INT, PAR, DBL, END GRID, END COLUMN, END WINDOW.
Data in this section consists of different subsections such as WINDOW, COLUMN, and GRID.
The WINDOW subsection starts with the keyword WINDOW followed by its title to be displayed in quotes separated by space, e.g., WINDOW "MYUAUOP". This section ends with the keyword END WINDOW.
Within the WINDOW subsection, the information related to each side can be updated with COLUMN and END COLUMN keywords. COLUMN subsection starts with the keyword COLUMN followed by column number and the title for the column in quotes, e.g., COLUMN 1 "Hot side information".
Within the COLUMN subsection, the information related to each GRID can be updated with GRID and END GRID keywords. GRID subsection starts with the keyword GRID followed by grid type and the title for the grid in quotes, e.g., GRID INT "Hot side integer data". PRO/II supports the grid types INT, PAR, DBL only once in the COLUMN subsection.
Within the GRID subsection, the information related to that grid can be updated by adding new line for each data item. Each data item information starts with its grid type keyword followed by the index number, label for that data item in quotes and the keyword REQ or OPT based on the nature of requirement of that data item, e.g., INT 1 "Hot side heat loss %" REQ.
Sample [Input Data] section is shown below which is self-explanatory:
[Input Data]
;
WINDOW "MYUAUOP"
COLUMN 1 " Hot side information"
GRID INT " Hot side integer data"
;Type IdNo Descriptive label (up to 40 char in quotes) Required
;---- ---- ------------------------------------------- --------
INT 1 "Calculation Mode" Required
END GRID INT
GRID PAR " Hot side Parameter Data"
PAR 1 "Hot side In temperature" Required
PAR 2 " Hot side Out temperature "
END GRID PAR
GRID DBL " Hot side Double Data"
;No data in this section
END GRID DBL
END COLUMN
COLUMN 2 "Cold side information"
GRID INT " Cold side integer data"
;Type IdNo Descriptive label (up to 40 char in quotes) Required
;---- ---- ------------------------------------------- --------
INT 1 "Calculation Mode" Required
END GRID INT
GRID PAR " Cold side Parameter Data"
PAR 1 "Cold side In temperature" Required
PAR 2 " Cold side Out temperature "
END GRID PAR
GRID DBL " Cold side Double Data"
;No data in this section
END GRID DBL
END COLUMN
END WINDOW
;
;
Note:
Lines starting with ";" will be treated as comment lines.
Space will be treated as the delimiter. Contiguous multiple spaces are treated as single space.
Developers are requested to avoid blank lines in the .ini file.
Developers are not allowed to alter the Simsci reserved keywords, specified
in different sections of this file.
Developers are requested to avoid Space and Tabs in the beginning of the
valid lines.
Stepwise procedure to add new UAUOP
Registering a new UAUOP with PRO/II
New Interface functions for managing Component, Stream, and unit op data