functiondensity_pTX
Density of air as a function of pressure, temperature and species concentration
Extends from Modelica.Icons.Function (Icon for functions).
Information
Function to compute the density of moist air for given pressure, temperature and water vapor mass fraction.
Note that the water vapor mass fraction is in kg/kg total air.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Pressure | p | Absolute pressure of the medium | |
| Modelica.Units.SI.Temperature | T | Dry bulb temperature | |
| Modelica.Units.SI.MassFraction | X_w | Water vapor mass fraction per unit mass total air |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Density | d | Mass density |
Revisions
-
September 19, 2025, by Michael Wetter:
Inlined function, as this function is often used by the multizone airlfow models. This further improves the computing time.
This is for IBPSA, #2043. -
November 23, 2015 by Filip Jorissen:
Added derivative information for avoiding numerical Jacobians. -
February 24, 2015 by Michael Wetter:
First implementation.