TQSETC

Fortran

TQSETC(STAVAR, INDEXP, INDEXC, VAL, NUMCON, IWSG, IWSE)

C-interface

tq_setc(TC_STRING condition,TC_INT indexp,TC_INT indexc,TC_FLOAT val,TC_INT* numcon,TC_INT* iwsg,TC_INT* iwse);

Full name:

Set Condition.

Purpose:

To set conditions for an equilibrium calculation.

Comments:

In STAVAR the mnemonic of the state variable must be given, see Possible State Variables to Set Conditions in TQSETC. In some cases just the mnemonic is needed, like for temperature or pressure, but in many cases a phase index or a component index must be used to specify the condition. If both a phase index and a constituent index is supplied the condition is set for the specified constituent in the specified phase.

The application program must set exactly the same number of conditions as degrees of freedom in the defined system. The degrees of freedom are equal to the number of system components plus two (usually temperature and pressure). Setting a phase FIXED using TQCSP decrease the degrees of freedom in the system by 1. Resetting the phase ENTERED using TQCSP restores one degree of freedom.

Possible combinations of STAVAR and indices are listed in Possible State Variables to Set Conditions in TQSETC. Here it is shown that the same value of STAVAR may be used with or without an index. In the case there should not be an index, the value of INDEXP or INDEXC must be negative.

Some combination of conditions may be thermodynamically impossible. The TQ-Interface provides relevant help for such cases.

Arguments

Name

Type

Value set on call or returned

STAVAR

Character*8

Set as a state variable

INDEXP

Integer

Set as a phase index (if needed).

INDEXC

Integer

Set as a component or constituent index (if needed).

VAL

Double precision

Set to the value.

NUMCON

Integer

Returned as an identification of the condition.

IWSG

Integer array

Workspace

IWSE

Integer array

Workspace