Contents - Index


PHASE$

 

PHASE$ returns a string that indicates the phase of the state.  The function must be supplied with sufficient information to fix the state, which for pure real fluid and ideal gas substances, is two independent properties.  Incompressible substances do not require any arguments other than the fluid name.  Phase$ should return one of the following strings, depending on the state.

 

'supercritical'     

'superheated'    

'saturated'

'liquid'

'solid'  {only implemented for ice}

'ideal gas'

incompressible solid'

'incompressible liquid'

 

Note that if the temperature is above the critical temperature, the term 'supercritical' will be returned.  If the temperature is below the critical temperature and the pressure is above critical pressure, Phase$ will indicate the state to be 'liquid'.

 

Note that the result of the function must be assigned to a string variable, which is identified by the $ character at the end of its name.

 

Example:  P$=PHASE$(Water, T=300 [C], P=100 [kPa])

 

Example:  PB$=PHASE$(Boron)

 

The list of property identifiers needed in the calling arguments and instructions are available in the Thermophysical Function help.