com.hummeling.if97
public class IF97 extends java.lang.Object
Steam tables for industrial use according to the international standard for the properties of water and steam, the IAPWS-IF97 formulation and the international standards for transport and other properties.
By default, units are as given in the book cited below. See
IF97.UnitSystem
for options.
Properties are generally available as functions of three quantity combinations: pressure & temperature (p, T), pressure & specific enthalpy (p, h), and specific enthalpy & specific entropy (h, s).
Modifier and Type | Class and Description |
---|---|
private static class |
IF97.Calculate
Calculate in default units.
|
static class |
IF97.Quantity
Quantities for partial derivatives.
|
static class |
IF97.UnitSystem
Unit systems.
|
Modifier and Type | Field and Description |
---|---|
(package private) static double |
BTU |
(package private) static double |
ft |
(package private) static double |
ft2 |
(package private) static double |
ft3 |
(package private) static double |
g |
static double |
hc
Critical enthalpy [kJ/kg].
|
(package private) static double |
hr |
(package private) static double |
in |
(package private) static double |
in2 |
(package private) static double |
lb |
(package private) static double |
lbf |
static double |
M
Molar mass of ordinary water [kg/kmol].
|
static double |
pc
Critical pressure [MPa].
|
(package private) static double |
psi |
static double |
R
Specific gas constant of ordinary water [kJ/kg-K].
|
(package private) static double |
Ra |
static double |
rhoc
Critical density [kg/m3].
|
static double |
Rm
Molar gas constant of ordinary water [kJ/kmol-K].
|
static double |
sc
Critical entropy [kJ/kg-K].
|
static double |
Tc
Critical temperature [K].
|
private IF97.UnitSystem |
UNIT_SYSTEM |
Constructor and Description |
---|
IF97()
Instantiate an IF97 object with the default unit system.
|
IF97(IF97.UnitSystem unitSystem)
Instantiate an IF97 object with the specified unit system.
|
Modifier and Type | Method and Description |
---|---|
double |
compressibilityHS(double enthalpy,
double entropy)
Isothermal compressibility as a function of specific enthalpy & specific
entropy.
|
double |
compressibilityPH(double pressure,
double enthalpy)
Isothermal compressibility as a function of pressure & specific enthalpy.
|
double |
compressibilityPT(double pressure,
double temperature)
Isothermal compressibility as a function of pressure & temperature.
|
(package private) static double |
convertFromDefault(double[] quantity,
double value) |
(package private) static double |
convertFromDefault(IF97.UnitSystem unitSystem,
IF97.Quantity quantity,
double value) |
(package private) static double |
convertToDefault(double[] quantity,
double value) |
double |
densityPH(double pressure,
double enthalpy)
Density as a function of pressure & specific enthalpy.
|
double |
densityPT(double pressure,
double temperature)
Density as a function of pressure & temperature.
|
double |
dielectricConstantPH(double pressure,
double enthalpy)
Dielectric constant.
|
double |
dielectricConstantPT(double pressure,
double temperature)
Dielectric constant.
|
double |
dielectricConstantRhoT(double density,
double temperature)
Dielectric constant.
|
double |
dynamicViscosityPH(double pressure,
double enthalpy)
Dynamic viscosity as a function of pressure & specific enthalpy.
|
double |
dynamicViscosityPT(double pressure,
double temperature)
Dynamic viscosity.
|
double |
dynamicViscosityRhoT(double density,
double temperature)
Dynamic viscosity.
|
double |
isobaricCubicExpansionCoefficientPH(double pressure,
double enthalpy)
Isobaric cubic expansion coefficient.
|
double |
isobaricCubicExpansionCoefficientPT(double pressure,
double temperature)
Isobaric cubic expansion coefficient.
|
double |
isobaricHeatCapacityPH(double pressure,
double enthalpy)
Specific isobaric heat capacity as a function of pressure & specific
enthalpy.
|
double |
isobaricHeatCapacityPT(double pressure,
double temperature)
Specific isobaric heat capacity as a function of pressure & temperature.
|
double |
isochoricHeatCapacityPH(double pressure,
double enthalpy)
Specific isochoric heat capacity as a function of pressure & specific
enthalpy.
|
double |
isochoricHeatCapacityPT(double pressure,
double temperature)
Specific isochoric heat capacity as a function of pressure & temperature.
|
double |
kinematicViscosityPH(double pressure,
double enthalpy)
Kinematic viscosity.
|
double |
kinematicViscosityPT(double pressure,
double temperature)
Kinematic viscosity.
|
double |
kinematicViscosityRhoT(double density,
double temperature)
Kinematic viscosity.
|
double |
partialDerivativePT(double pressure,
double temperature,
IF97.Quantity x,
IF97.Quantity y,
IF97.Quantity z)
Partial derivative of z with respect to x for constant y, as a function
of pressure and temperature.
|
double |
partialDerivativeRhoT(double density,
double temperature,
IF97.Quantity x,
IF97.Quantity y,
IF97.Quantity z)
Partial derivative of z with respect to x for constant y, as a function
of density and temperature.
|
double |
PrandtlHS(double enthalpy,
double entropy)
Prandtl number.
|
double |
PrandtlPH(double pressure,
double enthalpy)
Prandtl number.
|
double |
PrandtlPT(double pressure,
double temperature)
Prandtl number.
|
double |
pressureHS(double enthalpy,
double entropy)
Pressure as a function of specific enthalpy & specific entropy.
|
double |
refractiveIndexPTLambda(double pressure,
double temperature,
double wavelength)
Refractive index.
|
double |
refractiveIndexRhoTLambda(double density,
double temperature,
double waveLength)
Refractive index.
|
double |
saturationPressureH(double enthalpy)
Boundary saturation pressure for the boundary between regions 3 and 4.
|
double |
saturationPressureS(double entropy)
Boundary saturation pressure for the boundary between regions 3 and 4.
|
double |
saturationPressureT(double temperature)
Saturation pressure as a function of temperature.
|
double |
saturationTemperatureP(double pressure)
Saturation temperature as a function of pressure.
|
void |
setUnitSystem(IF97.UnitSystem unitSystem)
Set (change) the unit system.
|
double |
specificEnthalpyPS(double pressure,
double entropy)
Specific enthalpy as a function of pressure & specific entropy.
|
double |
specificEnthalpyPT(double pressure,
double temperature)
Specific enthalpy as a function of pressure & temperature.
|
double |
specificEnthalpyPX(double pressure,
double vapourFraction)
Specific enthalpy as a function of pressure & vapour fraction.
|
double |
specificEnthalpySaturatedLiquidP(double pressure)
Specific enthalpy as a function of pressure for saturated liquid.
|
double |
specificEnthalpySaturatedLiquidT(double temperature)
Specific enthalpy as a function of temperature for saturated liquid.
|
double |
specificEnthalpySaturatedVapourP(double pressure)
Specific enthalpy as a function of pressure for saturated vapour.
|
double |
specificEnthalpySaturatedVapourT(double temperature)
Specific enthalpy as a function of temperature for saturated vapour.
|
double |
specificEnthalpyTX(double temperature,
double vapourFraction)
Specific enthalpy as a function of temperature & vapour fraction.
|
double |
specificEntropyPH(double pressure,
double enthalpy)
Specific entropy as a function of pressure & specific enthalpy.
|
double |
specificEntropyPT(double pressure,
double temperature)
Specific entropy as a function of pressure & temperature.
|
double |
specificEntropyPX(double pressure,
double vapourFraction)
Specific entropy as a function of pressure & vapour fraction.
|
double |
specificEntropySaturatedLiquidP(double pressure)
Specific entropy as a function of pressure for saturated liquid.
|
double |
specificEntropySaturatedLiquidT(double temperature)
Specific entropy as a function of temperature for saturated liquid.
|
double |
specificEntropySaturatedVapourP(double pressure)
Specific entropy as a function of pressure for saturated vapour.
|
double |
specificEntropySaturatedVapourT(double temperature)
Specific entropy as a function of temperature for saturated vapour.
|
double |
specificEntropyTX(double temperature,
double vapourFraction)
Specific entropy as a function of temperature & vapour fraction.
|
double |
specificInternalEnergyHS(double enthalpy,
double entropy)
Specific internal energy as a function of specific enthalpy & specific
entropy.
|
double |
specificInternalEnergyPH(double pressure,
double enthalpy)
Specific internal energy as a function of pressure & specific enthalpy.
|
double |
specificInternalEnergyPT(double pressure,
double temperature)
Specific internal energy as a function of pressure & temperature.
|
double |
specificVolumePH(double pressure,
double enthalpy)
Specific volume as a function of pressure & specific enthalpy.
|
double |
specificVolumePT(double pressure,
double temperature)
Specific volume as a function of pressure & temperature.
|
double |
speedOfSoundPT(double pressure,
double temperature)
Speed of sound as a function of pressure & temperature.
|
double |
surfaceTensionT(double temperature)
Surface tension as a function of temperature.
|
double |
temperatureHS(double enthalpy,
double entropy)
Temperature.
|
double |
temperaturePH(double pressure,
double enthalpy)
Temperature.
|
double |
temperaturePS(double pressure,
double entropy)
Temperature.
|
double |
thermalConductivityPH(double pressure,
double enthalpy)
Thermal conductivity as a function of pressure & specific enthalpy.
|
double |
thermalConductivityPT(double pressure,
double temperature)
Thermal conductivity as a function of pressure & temperature.
|
double |
vapourFractionHS(double enthalpy,
double entropy)
Vapour fraction as a function of specific enthalpy & specific entropy.
|
double |
vapourFractionPS(double pressure,
double entropy)
Vapour fraction as a function of pressure & specific entropy.
|
double |
vapourFractionTS(double temperature,
double entropy)
Vapour fraction as a function of temperature & specific entropy.
|
private IF97.UnitSystem UNIT_SYSTEM
public static final double R
public static final double Rm
public static final double M
public static final double Tc
public static final double pc
public static final double hc
public static final double sc
public static final double rhoc
static final double BTU
static final double ft
static final double ft2
static final double ft3
static final double g
static final double hr
static final double in
static final double in2
static final double lb
static final double lbf
static final double psi
static final double Ra
public IF97()
public IF97(IF97.UnitSystem unitSystem)
unitSystem
- unit systempublic double PrandtlHS(double enthalpy, double entropy) throws OutOfRangeException
enthalpy
- specific enthalpyentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double PrandtlPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double PrandtlPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double compressibilityHS(double enthalpy, double entropy) throws OutOfRangeException
enthalpy
- specific enthalpyentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double compressibilityPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double compressibilityPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionstatic double convertFromDefault(IF97.UnitSystem unitSystem, IF97.Quantity quantity, double value)
static double convertFromDefault(double[] quantity, double value)
static double convertToDefault(double[] quantity, double value)
public double densityPH(double pressure, double enthalpy) throws OutOfRangeException
This is a convenience method which simply calls
1/specificVolumePH(pressure, enthalpy)
.
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionspecificVolumePH(double, double)
public double densityPT(double pressure, double temperature) throws OutOfRangeException
This is a convenience method which simply calls
1/specificVolumePT(pressure, temperature)
.
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionspecificVolumePT(double, double)
public double dielectricConstantPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double dielectricConstantPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double dielectricConstantRhoT(double density, double temperature) throws OutOfRangeException
density
- densitytemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double dynamicViscosityPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double dynamicViscosityPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double dynamicViscosityRhoT(double density, double temperature) throws OutOfRangeException
density
- densitytemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double isobaricCubicExpansionCoefficientPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double isobaricCubicExpansionCoefficientPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double isobaricHeatCapacityPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double isobaricHeatCapacityPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double isochoricHeatCapacityPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double isochoricHeatCapacityPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double kinematicViscosityPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double kinematicViscosityPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double kinematicViscosityRhoT(double density, double temperature) throws OutOfRangeException
density
- densitytemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double partialDerivativePT(double pressure, double temperature, IF97.Quantity x, IF97.Quantity y, IF97.Quantity z) throws OutOfRangeException
(∂z/∂x)y(p, T)
pressure
- pressuretemperature
- temperaturex
- any IF97.Quantity
y
- any IF97.Quantity
z
- any IF97.Quantity
OutOfRangeException
public double partialDerivativeRhoT(double density, double temperature, IF97.Quantity x, IF97.Quantity y, IF97.Quantity z) throws OutOfRangeException
(∂z/∂x)y(ρ, T)
density
- densitytemperature
- temperaturex
- any IF97.Quantity
y
- any IF97.Quantity
z
- any IF97.Quantity
OutOfRangeException
public double pressureHS(double enthalpy, double entropy) throws OutOfRangeException
enthalpy
- specific enthalpyentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double refractiveIndexPTLambda(double pressure, double temperature, double wavelength) throws OutOfRangeException
pressure
- pressuretemperature
- temperaturewavelength
- wavelengthOutOfRangeException
- out-of-range exceptionpublic double refractiveIndexRhoTLambda(double density, double temperature, double waveLength) throws OutOfRangeException
density
- density [kg/m3]temperature
- temperature [K]waveLength
- wave length [10^-6 m]OutOfRangeException
- out-of-range exceptionpublic double saturationPressureH(double enthalpy)
enthalpy
- specific enthalpypublic double saturationPressureS(double entropy)
entropy
- specific entropypublic double saturationPressureT(double temperature) throws OutOfRangeException
temperature
- saturation temperatureOutOfRangeException
public double saturationTemperatureP(double pressure) throws OutOfRangeException
pressure
- saturation pressureOutOfRangeException
public final void setUnitSystem(IF97.UnitSystem unitSystem)
unitSystem
- unit systempublic double specificEnthalpyPS(double pressure, double entropy) throws OutOfRangeException
pressure
- pressureentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double specificEnthalpyPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double specificEnthalpyPX(double pressure, double vapourFraction) throws OutOfRangeException
pressure
- pressurevapourFraction
- vapour fraction [-]OutOfRangeException
- out-of-range exceptionpublic double specificEnthalpySaturatedLiquidP(double pressure) throws OutOfRangeException
This is a convenience method which simply calls
specificEnthalpyPX(pressure, 0)
.
pressure
- saturation pressureOutOfRangeException
specificEnthalpyPX(double, double)
public double specificEnthalpySaturatedLiquidT(double temperature) throws OutOfRangeException
This is a convenience method which simply calls
specificEnthalpyTX(temperature, 0)
.
temperature
- saturation temperatureOutOfRangeException
specificEnthalpyTX(double, double)
public double specificEnthalpySaturatedVapourP(double pressure) throws OutOfRangeException
This is a convenience method which simply calls
specificEnthalpyPX(pressure, 1)
.
pressure
- saturation pressureOutOfRangeException
specificEnthalpyPX(double, double)
public double specificEnthalpySaturatedVapourT(double temperature) throws OutOfRangeException
This is a convenience method which simply calls
specificEnthalpyTX(temperature, 1)
.
temperature
- saturation temperatureOutOfRangeException
specificEnthalpyTX(double, double)
public double specificEnthalpyTX(double temperature, double vapourFraction) throws OutOfRangeException
temperature
- temperaturevapourFraction
- vapour fraction [-]OutOfRangeException
- out-of-range exceptionpublic double specificEntropyPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double specificEntropyPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double specificEntropyPX(double pressure, double vapourFraction) throws OutOfRangeException
pressure
- pressurevapourFraction
- vapour fraction [-]OutOfRangeException
- out-of-range exceptionpublic double specificEntropySaturatedLiquidP(double pressure) throws OutOfRangeException
This is a convenience method which simply calls
specificEntropyPX(pressure, 0)
.
pressure
- saturation pressureOutOfRangeException
specificEntropyPX(double, double)
public double specificEntropySaturatedLiquidT(double temperature) throws OutOfRangeException
This is a convenience method which simply calls
specificEntropyTX(temperature, 0)
.
temperature
- saturation temperatureOutOfRangeException
specificEntropyTX(double, double)
public double specificEntropySaturatedVapourP(double pressure) throws OutOfRangeException
This is a convenience method which simply calls
specificEntropyPX(pressure, 1)
.
pressure
- saturation pressureOutOfRangeException
specificEntropyPX(double, double)
public double specificEntropySaturatedVapourT(double temperature) throws OutOfRangeException
This is a convenience method which simply calls
specificEntropyTX(temperature, 1)
.
temperature
- saturation temperatureOutOfRangeException
specificEntropyTX(double, double)
public double specificEntropyTX(double temperature, double vapourFraction) throws OutOfRangeException
temperature
- temperaturevapourFraction
- vapour fraction [-]OutOfRangeException
- out-of-range exceptionpublic double specificInternalEnergyHS(double enthalpy, double entropy) throws OutOfRangeException
enthalpy
- specific enthalpyentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double specificInternalEnergyPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double specificInternalEnergyPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double specificVolumePH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double specificVolumePT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double speedOfSoundPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double surfaceTensionT(double temperature) throws OutOfRangeException
temperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double temperatureHS(double enthalpy, double entropy) throws OutOfRangeException
enthalpy
- specific enthalpyentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double temperaturePH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressure [MPa]enthalpy
- specific enthalpy [kJ/(kg)]OutOfRangeException
- out-of-range exceptionpublic double temperaturePS(double pressure, double entropy) throws OutOfRangeException
pressure
- pressureentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double thermalConductivityPH(double pressure, double enthalpy) throws OutOfRangeException
pressure
- pressureenthalpy
- specific enthalpyOutOfRangeException
- out-of-range exceptionpublic double thermalConductivityPT(double pressure, double temperature) throws OutOfRangeException
pressure
- pressuretemperature
- temperatureOutOfRangeException
- out-of-range exceptionpublic double vapourFractionHS(double enthalpy, double entropy) throws OutOfRangeException
enthalpy
- specific enthalpyentropy
- specific entropyOutOfRangeException
- out-of-range exceptionpublic double vapourFractionPS(double pressure, double entropy) throws OutOfRangeException
Note: for highest accuracy, use enthalpy to determine vapour fraction
(vapourFractionHS(double, double)
).
pressure
- pressureentropy
- specific entropyOutOfRangeException
- out-of-range exceptionvapourFractionHS(double, double)
public double vapourFractionTS(double temperature, double entropy)
Note: whenever possible, use enthalpy to determine vapour fraction
(vapourFractionHS(double, double)
) for highest accuracy.
temperature
- temperatureentropy
- specific entropyOutOfRangeException
- out-of-range exceptionvapourFractionHS(double, double)