packageWaterIF97_base

Water: Steam properties as defined by IAPWS/IF97 standard

Extends from Interfaces.PartialTwoPhaseMedium (Base class for two phase medium of one substance).

Information

This model calculates medium properties for water in the liquid, gas and two phase regions according to the IAPWS/IF97 standard, i.e., the accepted industrial standard and best compromise between accuracy and computation time. For more details see Modelica.Media.Water.IF97_Utilities. Three variable pairs can be the independent variables of the model:

  1. Pressure p and specific enthalpy h are the most natural choice for general applications. This is the recommended choice for most general purpose applications, in particular for power plants.
  2. Pressure p and temperature T are the most natural choice for applications where water is always in the same phase, both for liquid water and steam.
  3. Density d and temperature T are explicit variables of the Helmholtz function in the near-critical region and can be the best choice for applications with super-critical or near-critical states.

The following quantities are always computed:

Variable Unit Description
T K temperature
u J/kg specific internal energy
d kg/m^3 density
p Pa pressure
h J/kg specific enthalpy

In some cases additional medium properties are needed. A component that needs these optional properties has to call one of the functions listed in Modelica.Media.UsersGuide.MediumUsage.OptionalProperties and in Modelica.Media.UsersGuide.MediumUsage.TwoPhase.

Many further properties can be computed. Using the well-known Bridgman's Tables, all first partial derivatives of the standard thermodynamic variables can be computed easily.

Parameters

TypeNameDefaultDescription
Modelica.Media.Interfaces.Choices.IndependentVariablesThermoStates (from PartialMedium)Enumeration type for independent variables
StringmediumName (from PartialMedium)"unusablePartialMedium"Name of the medium
String[:]substanceNames (from PartialMedium){mediumName}Names of the mixture substances. Set substanceNames={mediumName} if only one substance.
String[:]extraPropertiesNames (from PartialMedium)fill("", 0)Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused
BooleansingleState (from PartialMedium)= true, if u and d are not a function of pressure
BooleanreducedX (from PartialMedium)true= true, if medium contains the equation sum(X) = 1.0; set reducedX=true, if only one substance (see docu for details)
BooleanfixedX (from PartialMedium)false= true, if medium contains the equation X = reference_X
AbsolutePressurereference_p (from PartialMedium)101325Reference pressure of Medium: default 1 atmosphere
Temperaturereference_T (from PartialMedium)298.15Reference temperature of Medium: default 25 deg Celsius
MassFraction[nX]reference_X (from PartialMedium)fill(1/nX, nX)Default mass fractions of medium
AbsolutePressurep_default (from PartialMedium)101325Default value for pressure of medium (for initialization)
TemperatureT_default (from PartialMedium)Modelica.Units.Conversions.from_degC(20)Default value for temperature of medium (for initialization)
SpecificEnthalpyh_default (from PartialMedium)specificEnthalpy_pTX(p_default, T_default, X_default)Default value for specific enthalpy of medium (for initialization)
MassFraction[nX]X_default (from PartialMedium)reference_XDefault value for mass fractions of medium (for initialization)
ExtraProperty[nC]C_default (from PartialMedium)fill(0, nC)Default value for trace substances of medium (for initialization)
IntegernS (from PartialMedium)size(substanceNames, 1)Number of substances
IntegernX (from PartialMedium)nSNumber of mass fractions
IntegernXi (from PartialMedium)if fixedX then 0 else if reducedX then nS - 1 else nSNumber of structurally independent mass fractions (see docu for details)
IntegernC (from PartialMedium)size(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
Real[nC]C_nominal (from PartialMedium)1.0e-6*ones(nC)Default for the nominal values for the extra properties
BooleansmoothModel (from PartialTwoPhaseMedium)false= true, if the (derived) model should not generate state events
BooleanonePhase (from PartialTwoPhaseMedium)false= true, if the (derived) model should never be called with two-phase inputs
FluidConstantsfluidConstants (from PartialTwoPhaseMedium)Constant data for the fluid
IntegerRegion0Region of IF97, if known, zero otherwise
Booleanph_explicitTrue if explicit in pressure and specific enthalpy
BooleandT_explicitTrue if explicit in density and temperature
BooleanpT_explicitTrue if explicit in pressure and temperature

Contents

NameDescription
SaturationProperties
ThermodynamicStateThermodynamic state
BasePropertiesBase properties of water
density_phComputes density as a function of pressure and specific enthalpy
temperature_phComputes temperature as a function of pressure and specific enthalpy
temperature_psCompute temperature from pressure and specific enthalpy
density_psComputes density as a function of pressure and specific enthalpy
pressure_dTComputes pressure as a function of density and temperature
specificEnthalpy_dTComputes specific enthalpy as a function of density and temperature
specificEnthalpy_pTComputes specific enthalpy as a function of pressure and temperature
specificEnthalpy_psComputes specific enthalpy as a function of pressure and temperature
density_pTComputes density as a function of pressure and temperature
setDewStateSet the thermodynamic state on the dew line
setBubbleStateSet the thermodynamic state on the bubble line
dynamicViscosityDynamic viscosity of water
thermalConductivityThermal conductivity of water
surfaceTensionSurface tension in two phase region of water
pressureReturn pressure of ideal gas
temperatureReturn temperature of ideal gas
densityReturn density of ideal gas
specificEnthalpyReturn specific enthalpy
specificInternalEnergyReturn specific internal energy
specificGibbsEnergyReturn specific Gibbs energy
specificHelmholtzEnergyReturn specific Helmholtz energy
specificEntropySpecific entropy of water
specificHeatCapacityCpSpecific heat capacity at constant pressure of water
specificHeatCapacityCvSpecific heat capacity at constant volume of water
isentropicExponentReturn isentropic exponent
isothermalCompressibilityIsothermal compressibility of water
isobaricExpansionCoefficientIsobaric expansion coefficient of water
velocityOfSoundReturn velocity of sound as a function of the thermodynamic state record
isentropicEnthalpyCompute h(s,p)
density_derh_pDensity derivative by specific enthalpy
density_derp_hDensity derivative by pressure
bubbleEnthalpyBoiling curve specific enthalpy of water
dewEnthalpyDew curve specific enthalpy of water
bubbleEntropyBoiling curve specific entropy of water
dewEntropyDew curve specific entropy of water
bubbleDensityBoiling curve specific density of water
dewDensityDew curve specific density of water
saturationTemperatureSaturation temperature of water
saturationTemperature_derpDerivative of saturation temperature w.r.t. pressure
saturationPressureSaturation pressure of water
dBubbleDensity_dPressureBubble point density derivative
dDewDensity_dPressureDew point density derivative
dBubbleEnthalpy_dPressureBubble point specific enthalpy derivative
dDewEnthalpy_dPressureDew point specific enthalpy derivative
setState_dTXReturn thermodynamic state of water as function of d, T, and optional region
setState_phXReturn thermodynamic state of water as function of p, h, and optional region
setState_psXReturn thermodynamic state of water as function of p, s, and optional region
setState_pTXReturn thermodynamic state of water as function of p, T, and optional region
setSmoothStateReturn thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b