PRO/II Intrinsic Functions

 

image\BMDMLINE.gif

 

Component Intrinsic Functions

 

image\BMDMLINE.gif

 

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:

 

image\LINE06.gif

Function

Description of Property 

image\LINE06.gif

 

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)

image\LINE06.gif

 

(cno) = Integer component number.

image\BMDMLINE.gif

FORTRAN Intrinsic Functions

 

image\BMDMLINE.gif

 

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

image\LINE05.gif

Function

Description

Result Type

image\LINE05.gif

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

image\LINE05.gif

 

image\BMDMLINE.gif

 

Trace statement

 

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.

 

 

image\BMDMLINE.gif