The Procedure block contains special intrinsic functions which allow you to retrieve component properties directly into the code. For these functions, the component identifying number is used as a parameter. Property values are retrieved in the dimensional units used for the simulation input. The total number of components and reactions may also be retrieved and used as limits for loop calculations, etc.
The following table lists the available component property intrinsic functions:
Function |
Description of Property |
Pure Component Properties |
CMW(cno) |
Molecular Weight |
CNBP(cno) |
Normal boiling temperature |
CSPGR(cno) |
Specific gravity (60F/60F) |
CTC(cno) |
Critical temperature |
CPC(cno) |
Critical pressure |
CVC(cno) |
Critical volume, cc/gm-mole |
COMEGA(cno) |
(cno) = Integer component number.
All the FORTRAN intrinsic functions can be used in the Procedure block statements. The following table lists all the available functions (all function parameters must be real numbers):
Function |
Description |
Result Type |
ABS(x) |
Absolute Value |
real |
DIM(x) |
Positive Difference |
real |
EXP(x) |
Exponential e |
real |
INT(x) |
Truncation |
integer |
LOG(x) |
Natural Logarithm |
real |
LOG10(x) |
Common Logarithm |
real |
MIN(x,y,...) |
Minimum Value |
real |
MAX(x,y,...) |
Maximum Value |
real |
MOD(x,y) |
Remainder |
real |
NINT(x) |
Nearest Integer |
integer |
SQRT(x) |
Square Root |
real |
SIN(x) |
Sine (radians) |
real |
COS(x) |
Cosine (radians) |
real |
TAN(x) |
Tangent (radians) |
real |
ASIN(x) |
Arc Sine (radians) |
radian |
ACOS(x) |
Arc Cosine (radians) |
radian |
ATAN(x) |
Arc Tangent (radians) |
real |
SINH(x) |
Hyperbolic Sine |
real |
COSH(x) |
Hyperbolic Cosine |
real |
TANH(x) |
Hyperbolic Tangent |
real |
Syntax: nn TRACE option
This statement controls printing of an historical trace as calculations proceed. This facilitates debugging the code in the Procedure block. The options available are:
ON Prints line number, statement number and (a) the action taken, or (b) the new variable value, as each statement executes.
BRANCH Prints TRACE information only for branching statements such as IF, GOTO or DO.
OFF Turns off all TRACE options.