Calculation of fluid properties for moist air in the region from 143.15 Kelvin to 2000 Kelvin at pressures up to 10 MPa. This model of moist air is based on the diploma thesis of Hellriegel [10] with small modifications. Moist air is treated as an ideal mixture of the real fluids air and water.
The functions provided by this package shall be used inside of the restricted limits according to the referenced literature.
The package MoistAir can be used as any other medium model (see User's Guide of Media Library for further information). The package defines two boolean constants useEnhancementFactor and useDissociation, which give the user fine grained control of the calculations.
Constant | Default Value | Meaning |
useEnhancementFactor | false | The enhancement factor is used in the calculation of the saturation partial pressure of water in moist air. It is always very close to 1 except for high pressures (>2 MPa) and low temperatures (<233.15 K). For pressures less than 1 MPa this factor can be safely set to 1. Its calculation is very expensive, since it can only be calculated by an iterative method. |
useDissociation | true | The effect of dissociation is taken into account for temperatures greater than 773.15 K. |
p | Mixture pressure in Pa |
T | Temperature in K |
xw | Absolutue humidity in kg(water)/kg(dry air) |
xws | Absolutue humidity on saturation boundary in kg(water)/kg(dry air) |
φ | Relative humidity (only defined for unsaturated humid air) |
Ideal mixture of dry air and steam
Liquid fog (xw > xwsw) and T ≥ 273.16 K
Ideal mixture of saturated humid air and water
Ice fog (xw > xwsw) and T < 273.16 K
Ideal mixture of saturated humid air and ice
The saturation pressure pds of water in moist air is calculated by pds = f*psat, where
For temperatures above 773.15 K effects of dissociation are taken into account. Dissociation is modeled according to [11]. For high temperatures the calculated values for moist air with 0 kg(water)/kg(dry air) (i.e. dry air) may differ from those calculated by the package Modelica.Media.Air.ReferenceAir, because there no dissociation is considered.
The verification report for the development of this library is provided here.
This library was developed by XRG Simulation GmbH as part of the Clean Sky JTI project (Project title: MoMoLib-Modelica Model Library Development for Media, Magnetic Systems and Wavelets; Project number: 296369; Theme: JTI-CS-2011-1-SGO-02-026: Modelica Model Library Development Part I). The partial financial support for the development of this library by the European Union is highly appreciated.
Some parts of this library refer to the ThermoFluid library developed at Lund University (http://thermofluid.sourceforge.net).
In no event will XRG Simulation GmbH be liable for any direct, indirect, incidental, special, exemplary, or consequential damages, arising in any way out of the use of this software, even if advised of the possibility of such damage.
Name | Description |
---|---|
Water=1 | Index of water (in substanceNames, massFractions X, etc.) |
Air=2 | Index of air (in substanceNames, massFractions X, etc.) |
useEnhancementFactor=false | Use the enhancement factor in the calculations |
useDissociation=true | Take dissociation into account for high temperatures |
k_mair=steam.MM/dryair.MM | Ratio of molar weights |
dryair=ReferenceAir.Air_Utilities.Basic.Constants | |
steam=Utilities.Water95_Utilities.Constants | |
MMX={steam.MM,dryair.MM} | Molar masses of components |
ThermodynamicState | ThermodynamicState record for moist air |
BaseProperties | Moist air base properties record |
setState_pTX | Return thermodynamic state as function of pressure p, temperature T and composition X |
setState_phX | Return thermodynamic state as function of pressure p, specific enthalpy h and composition X |
setState_psX | Return thermodynamic state as function of pressure p, specific enthalpy h and composition X |
setState_dTX | Return thermodynamic state as function of density d, temperature T and composition X |
setSmoothState | Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b |
Xsaturation | Return absolute humitity per unit mass of moist air at saturation as a function of the thermodynamic state record |
xsaturation | Return absolute humitity per unit mass of dry air at saturation as a function of the thermodynamic state record |
massFraction_pTphi | Return mass fractions as a function of pressure, temperature and relative humidity |
massFractionWaterVapor | Return mass fraction of water vapor |
massFractionWaterNonVapor | Return mass fraction of liquid and solid water |
massFractionSaturation | Return saturation mass fractions |
massFractionSaturation_ppsat | Return mass fvraction at saturation boundary given pressure and saturation pressure |
massFraction_waterContent | Return mass fractions as a function of pressure, temperature and absolute humidity in kg(water)/kg(dry air) |
waterContent_X | Return water content in kg(water)/kg(dry air) given mass fractions |
relativeHumidity | Return relativ humidity |
gasConstant | Return ideal gas constant as a function from thermodynamic state, only valid for phi<1 |
saturationPressureLiquid | Return saturation pressure of water as a function of temperature T |
sublimationPressureIce | Return sublimation pressure of water as a function of temperature T between 223.16 and 273.16 K |
saturationPressure | Return saturation pressure of condensing fluid |
saturationTemperature | Return saturation temperature of condensing fluid |
enthalpyOfVaporization | Return enthalpy of vaporization of water |
enthalpyOfLiquid | Return enthalpy of liquid water |
enthalpyOfGas | Return specific enthalpy of gas (air and steam) |
enthalpyOfCondensingGas | Return specific enthalpy of steam |
enthalpyOfNonCondensingGas | Return specific enthalpy of dry air |
enthalpyOfDryAir | Return specific enthalpy of dry air |
enthalpyOfWater | Return specific enthalpy of water (solid + liquid + steam) |
enthalpyOfWaterVapor | Return specific enthalpy of steam |
enthalpyOfWaterNonVapor | Return enthalpy of liquid and solid water |
pressure | Returns pressure of ideal gas as a function of the thermodynamic state record |
temperature | Return temperature of ideal gas as a function of the thermodynamic state record |
density | Returns density as a function of the thermodynamic state record |
specificEnthalpy | Return specific enthalpy of moist air as a function of the thermodynamic state record |
specificInternalEnergy | Return specific internal energy of moist air as a function of the thermodynamic state record |
specificEntropy | Return specific entropy from thermodynamic state record, only valid for phi<1 |
specificGibbsEnergy | Return specific Gibbs energy as a function of the thermodynamic state record, only valid for phi<1 |
specificHelmholtzEnergy | Return specific Helmholtz energy as a function of the thermodynamic state record, only valid for phi<1 |
specificHeatCapacityCp | Return specific heat capacity at constant pressure as a function of the thermodynamic state record |
specificHeatCapacityCv | Return specific heat capacity at constant volume as a function of the thermodynamic state record |
isentropicExponent | Return isentropic exponent |
isentropicEnthalpy | Return isentropic enthalpy |
velocityOfSound | Return velocity of sound |
molarMass | Return the molar mass of the medium |
dynamicViscosity | Return dynamic viscosity as a function of the thermodynamic state record, valid from 73.15 K to 373.15 K |
thermalConductivity | Return thermal conductivity as a function of the thermodynamic state record, valid from 73.15 K to 373.15 K |
Utilities | Utilitiy package for moist air |
Inherited | |
specificEntropy_phX | Return specific entropy as a functio of pressure, specific enthalpy and mass fractions |
fluidConstants | Constant data for the fluid |
moleToMassFractions | Return mass fractions X from mole fractions |
massToMoleFractions | Return mole fractions from mass fractions X |
ThermoStates | Enumeration type for independent variables |
mediumName="unusablePartialMedium" | Name of the medium |
substanceNames={mediumName} | Names of the mixture substances. Set substanceNames={mediumName} if only one substance. |
extraPropertiesNames=fill("", 0) | Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused |
singleState | = true, if u and d are not a function of pressure |
reducedX=true | = true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details) |
fixedX=false | = true if medium contains the equation X = reference_X |
reference_p=101325 | Reference pressure of Medium: default 1 atmosphere |
reference_T=298.15 | Reference temperature of Medium: default 25 deg Celsius |
reference_X=fill(1/nX, nX) | Default mass fractions of medium |
p_default=101325 | Default value for pressure of medium (for initialization) |
T_default=Modelica.SIunits.Conversions.from_degC(20) | Default value for temperature of medium (for initialization) |
h_default=specificEnthalpy_pTX(p_default, T_default, X_default) | Default value for specific enthalpy of medium (for initialization) |
X_default=reference_X | Default value for mass fractions of medium (for initialization) |
nS=size(substanceNames, 1) | Number of substances |
nX=nS | Number of mass fractions |
nXi=if fixedX then 0 else if reducedX then nS - 1 else nS | Number of structurally independent mass fractions (see docu for details) |
nC=size(extraPropertiesNames, 1) | Number of extra (outside of standard mass-balance) transported properties |
C_nominal=1.0e-6*ones(nC) | Default for the nominal values for the extra properties |
FluidConstants | Critical, triple, molecular and other standard data of fluid |
prandtlNumber | Return the Prandtl number |
heatCapacity_cp | Alias for deprecated name |
heatCapacity_cv | Alias for deprecated name |
isobaricExpansionCoefficient | Return overall the isobaric expansion coefficient beta |
beta | Alias for isobaricExpansionCoefficient for user convenience |
isothermalCompressibility | Return overall the isothermal compressibility factor |
kappa | Alias of isothermalCompressibility for user convenience |
density_derp_h | Return density derivative w.r.t. pressure at const specific enthalpy |
density_derh_p | Return density derivative w.r.t. specific enthalpy at constant pressure |
density_derp_T | Return density derivative w.r.t. pressure at const temperature |
density_derT_p | Return density derivative w.r.t. temperature at constant pressure |
density_derX | Return density derivative w.r.t. mass fraction |
specificEnthalpy_pTX | Return specific enthalpy from p, T, and X or Xi |
specificEntropy_pTX | Return specific enthalpy from p, T, and X or Xi |
density_pTX | Return density from p, T, and X or Xi |
temperature_phX | Return temperature from p, h, and X or Xi |
density_phX | Return density from p, h, and X or Xi |
temperature_psX | Return temperature from p,s, and X or Xi |
density_psX | Return density from p, s, and X or Xi |
specificEnthalpy_psX | Return specific enthalpy from p, s, and X or Xi |
MassFlowRate | Type for mass flow rate with medium specific attributes |
AbsolutePressure | Type for absolute pressure with medium specific attributes |
Density | Type for density with medium specific attributes |
DynamicViscosity | Type for dynamic viscosity with medium specific attributes |
EnthalpyFlowRate | Type for enthalpy flow rate with medium specific attributes |
MassFraction | Type for mass fraction with medium specific attributes |
MoleFraction | Type for mole fraction with medium specific attributes |
MolarMass | Type for molar mass with medium specific attributes |
MolarVolume | Type for molar volume with medium specific attributes |
IsentropicExponent | Type for isentropic exponent with medium specific attributes |
SpecificEnergy | Type for specific energy with medium specific attributes |
SpecificInternalEnergy | Type for specific internal energy with medium specific attributes |
SpecificEnthalpy | Type for specific enthalpy with medium specific attributes |
SpecificEntropy | Type for specific entropy with medium specific attributes |
SpecificHeatCapacity | Type for specific heat capacity with medium specific attributes |
SurfaceTension | Type for surface tension with medium specific attributes |
Temperature | Type for temperature with medium specific attributes |
ThermalConductivity | Type for thermal conductivity with medium specific attributes |
PrandtlNumber | Type for Prandtl number with medium specific attributes |
VelocityOfSound | Type for velocity of sound with medium specific attributes |
ExtraProperty | Type for unspecified, mass-specific property transported by flow |
CumulativeExtraProperty | Type for conserved integral of unspecified, mass specific property |
ExtraPropertyFlowRate | Type for flow rate of unspecified, mass-specific property |
IsobaricExpansionCoefficient | Type for isobaric expansion coefficient with medium specific attributes |
DipoleMoment | Type for dipole moment with medium specific attributes |
DerDensityByPressure | Type for partial derivative of density with respect to pressure with medium specific attributes |
DerDensityByEnthalpy | Type for partial derivative of density with respect to enthalpy with medium specific attributes |
DerEnthalpyByPressure | Type for partial derivative of enthalpy with respect to pressure with medium specific attributes |
DerDensityByTemperature | Type for partial derivative of density with respect to temperature with medium specific attributes |
DerTemperatureByPressure | Type for partial derivative of temperature with respect to pressure with medium specific attributes |
SaturationProperties | Saturation properties of two phase medium |
FluidLimits | Validity limits for fluid model |
FixedPhase | Phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g., interactive use |
Basic | The most basic version of a record used in several degrees of detail |
IdealGas | The ideal gas version of a record used in several degrees of detail |
TwoPhase | The two phase fluid version of a record used in several degrees of detail |
Name | Description |
---|---|
standardOrderComponents | If true, and reducedX = true, the last element of X will be computed from the other ones |
Advanced | |
preferredMediumStates | = true if StateSelect.prefer shall be used for the independent property variables of the medium |
Name | Description |
---|---|
p | Pressure [Pa] |
T | Temperature [K] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
p | Pressure [Pa] |
s | Specific entropy [J/(kg.K)] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
d | Density [kg/m3] |
T | Temperature [K] |
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
x | m_flow or dp |
state_a | Thermodynamic state if x > 0 |
state_b | Thermodynamic state if x < 0 |
x_small | Smooth transition in the region -x_small < x < x_small |
Name | Description |
---|---|
state | Smooth thermodynamic state for all x (continuous and differentiable) |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
X_sat | Steam mass fraction of sat. boundary [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
x_sat | Absolute humidity per unit mass of dry air [kg/kg] |
Name | Description |
---|---|
p | Pressure [Pa] |
T | Temperature [K] |
phi | Relative humidity |
Name | Description |
---|---|
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
X | Mass fraction of water varpor [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
X | Mass fraction of water varpor [kg/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
Xsat[:] | Saturation mass fractions [kg/kg] |
Name | Description |
---|---|
p | Ambient pressure [Pa] |
psat | Saturation pressure [Pa] |
Name | Description |
---|---|
X[:] | Mass fraction [kg/kg] |
Name | Description |
---|---|
xw | Water content in kg(water)/kg(dry air) |
Name | Description |
---|---|
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
X[:] | Mass fractions [kg/kg] |
Name | Description |
---|---|
xw | Water content in kg(water)/kg(dry air) |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
phi | Relative humidity |
Name | Description |
---|---|
state | Thermodynamic state |
Name | Description |
---|---|
R | Mixture gas constant [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
psat | Saturation pressure [Pa] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
psat | Sublimation pressure [Pa] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
psat | Saturation pressure [Pa] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
Tsat | Saturation temperature [K] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
r0 | Vaporization enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Liquid enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy of water [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy of water [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
p | Pressure [Pa] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
T | Temperature [K] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
d | Density [kg/m3] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
u | Specific internal energy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
s | Specific entropy [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
g | Specific Gibbs energy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
f | Specific Helmholtz energy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
cp | Specific heat capacity at constant pressure [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
cv | Specific heat capacity at constant volume [J/(kg.K)] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
gamma | Isentropic exponent [1] |
Name | Description |
---|---|
p_downstream | Downstream pressure [Pa] |
refState | Reference state for entropy |
Name | Description |
---|---|
h_is | Isentropic enthalpy [J/kg] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
a | Velocity of sound [m/s] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
MM | Mixture molar mass [kg/mol] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
eta | Dynamic viscosity [Pa.s] |
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
lambda | Thermal conductivity [W/(m.K)] |