felib.iapwsif97 class

The Iapwsif97 determines the water/steam region, performs the calculation of specific volume, mass density, saturation pressure and temperature, boundary pressure and temperature (between regions 2 and 3), specific internal energy, specific isobaric and isochoric heat capacities, speed of sound, thermal conductivity, viscosity, isentropic exponent and dielectric constant in accordance with:

IAPWS-IF97: Release on the IAPWS, Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam

Table 1: Description of the iapwsif97 class interface: properties (variables), methods (functions) and error flags.

 PROPERTIES

DESCRIPTION SET PROPERTY VALUE GET PROPERTY VALUE
Pressure [MPa] void SetPressureMPa(double newP) double GetPressureMPa()
Temperature [K] void SetTemperatureK(double newT) double GetTemperatureK()
Error status

-

long int GetErrorFlag()
Specific volume [m^3/kg]

-

double GetSpecificVolume()
Density [kg/m^3]

-

double GetMassDensity()
Saturation pressure [MPa]

-

double GetSaturationPressure()
Saturation temperature [K]

-

double GetSaturationTemperature()
Boundary pressure [MPa] (Between regions 2&3)

-

double GetBoundaryPressure()
Boundary temperature [K] (Between regions 2&3)

-

double GetBoundaryTemperature()
Specific internal energy [kJ/kg]

-

double GetSpecificInternalEnergy()
Specific isobaric heat capacity [kJ/(kg*K)]

-

double GetSpecificIsobaricHC()
Specific isochoric heat capacity [kJ/(kg*K)]

-

double GetSpecificIsochoricHC()
Speed of sound [m/s]

-

double GetSpeedOfSound()
Thermal conductivity [mW/(m*K)]

-

double GetThermalConductivity()
Viscosity [Pa*s]

-

double GetViscosity()
Isentropic exponent

-

double GetIsentropicExponent()
Dielectric constant

-

double GetDielectricConstant()
Specific enthalpy [kJ/kg]

-

double GetSpecificEnthalpy()
Specific entropy [kJ/(kg*K)]

-

double GetSpecificEntropy()
Water/steam sub-region

-

short int GetWaterSteamSubRegion()

METHODS

Calculation of water/steam properties long CalculateProperties(); calculates the above properties, determines the corresponding water/steam region and returns long int error status

ERROR STATUS

Error status bits are cleared or set upon the completion of long CalculateProperties() method as follows
Bit 0 =1 (0000001H) The pressure <= 0 MPa or pressure > 100 MPa, or pressure > 10 MPa for temperatures above 1073.15 K.
Bit 1 =1 (0000002H) The temperature < 273.15 K or temperature > 1073.15 K.
Bit 24 =1 (1000000H) Incorrect key-code entered.
Bits 2,...,23,25,...,31 All other bits are unused.

The output parameters do have the corresponding pressure/temperature (p,t) range of validity. The result will be set to "-1" if the corresponding (p,t) range of validity was not satisfied. The result is valid only if it was not set to "-1" and if the error flag was equal to zero.