packageAir_Base

Properties of dry air calculated using the equation of state by Lemmon et. al.

Extends from Modelica.Media.Interfaces.PartialPureSubstance (Base class for pure substances of one chemical substance).

Information

This model calculates medium properties for air in the liquid, gas and two phase regions. 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.
  2. Pressure p and temperature T are the most natural choice for applications where air is always in the same phase (liquid or gas).
  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
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
ThermodynamicStateThermodynamic state
BasePropertiesBase properties of air
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
dynamicViscosityReturn dynamic viscosity as a function of the thermodynamic state record
thermalConductivityThermal conductivity of air
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 air
specificHeatCapacityCpSpecific heat capacity at constant pressure of air
specificHeatCapacityCvSpecific heat capacity at constant volume of air
isentropicExponentReturn isentropic exponent
isothermalCompressibilityIsothermal compressibility of air
isobaricExpansionCoefficientIsobaric expansion coefficient of air
velocityOfSoundReturn velocity of sound as a function of the thermodynamic state record
density_derh_pDensity derivative by specific enthalpy
density_derp_hDensity derivative by pressure
setState_dTXReturn thermodynamic state of air as function of d and T
setState_phXReturn thermodynamic state of air as function of p and h
setState_psXReturn thermodynamic state of air as function of p and s
setState_pTXReturn thermodynamic state of air as function of p and T
setSmoothStateReturn thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b
isentropicEnthalpy
molarMassReturn the molar mass of the medium