Buildings.Utilities.Psychrometrics
Library with psychrometric functions
Information
This package contains blocks and functions for psychrometric calculations.
The nomenclature used in this package is described at Buildings.UsersGuide.Conventions.
Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Package Content
Name | Description |
---|---|
Constants | Library of constants for psychometric functions |
Density_pTX | Block to compute the density for given pressure, dry bulb temperature and moisture mass fraction |
Phi_pTX | Block to compute the relative humidity for given pressure, dry bulb temperature and moisture mass fraction |
SaturationPressure | Saturation pressure as a function of temperature |
SaturationPressureLiquid | Saturation pressure as a function of temperature |
SublimationPressureIce | Saturation pressure as a function of temperature |
TDewPoi_pW | Model to compute the dew point temperature for given water vapor pressure of moist air |
TWetBul_TDryBulPhi | Model to compute the wet bulb temperature based on relative humidity |
TWetBul_TDryBulXi | Model to compute the wet bulb temperature based on mass fraction |
ToDryAir | Block to convert absolute humidity from [kg/kg total air] to [kg/kg dry air] |
ToTotalAir | Block to convert absolute humidity from [kg/kg dry air] to [kg/kg total air] |
X_pTphi | Return steam mass fraction as a function of relative humidity phi and temperature T |
X_pW | Humidity ratio for given water vapor pressure |
pW_TDewPoi | Model to compute the water vapor pressure for a given dew point temperature of moist air |
pW_X | Water vapor pressure for given humidity ratio |
Functions | Package with psychrometric functions |
Examples | Collection of models that illustrate model use and test models |
BaseClasses | Package with base classes for Buildings.Utilities.Psychrometrics |
Buildings.Utilities.Psychrometrics.Density_pTX
Block to compute the density for given pressure, dry bulb temperature and moisture mass fraction
Information
Block to compute the mass density of air for given pressure, temperature and water vapor mass fraction.
Note that the water vapor mass fraction must be in kg/kg total air, and not dry air.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | T | Dry bulb temperature [K] |
input RealInput | X_w | Water vapor mass fraction per unit mass total air [1] |
input RealInput | p | Pressure [Pa] |
output RealOutput | d | Density [kg/m3] |
Modelica definition
Buildings.Utilities.Psychrometrics.Phi_pTX
Block to compute the relative humidity for given pressure, dry bulb temperature and moisture mass fraction
Information
Block to compute the relative humidity of air for given pressure, temperature and water vapor mass fraction.
Note that the water vapor mass fraction must be in kg/kg total air, and not dry air.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | T | Dry bulb temperature [K] |
input RealInput | X_w | Water vapor mass fraction per unit mass total air [1] |
input RealInput | p | Pressure [Pa] |
output RealOutput | phi | Relative humidity [1] |
Modelica definition
Buildings.Utilities.Psychrometrics.SaturationPressure
Saturation pressure as a function of temperature
Information
Saturation pressure of water, computed from temperature, according to Wagner et al. (1993). The range of validity is between 190 and 373.16 Kelvin.
References
Wagner W., A. Saul, A. Pruss. International equations for the pressure along the melting and along the sublimation curve of ordinary water substance, equation 3.5. 1993. http://www.nist.gov/data/PDFfiles/jpcrd477.pdf.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TSat | Saturation temperature [K] |
output RealOutput | pSat | Saturation pressure [Pa] |
Modelica definition
Buildings.Utilities.Psychrometrics.SaturationPressureLiquid
Saturation pressure as a function of temperature
Information
Saturation pressure of water above the triple point temperature computed from temperature according to Wagner et al. (1993). The range of validity is between 273.16 and 373.16 Kelvin.
References
Wagner W., A. Saul, A. Pruss. International equations for the pressure along the melting and along the sublimation curve of ordinary water substance, equation 3.5. 1993. http://www.nist.gov/data/PDFfiles/jpcrd477.pdf.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TSat | Saturation temperature [K] |
output RealOutput | pSat | Saturation pressure [Pa] |
Modelica definition
Buildings.Utilities.Psychrometrics.SublimationPressureIce
Saturation pressure as a function of temperature
Information
Sublimation pressure of water below the triple point temperature, computed from temperature, according to Wagner et al. (1993). The range of validity is between 190 and 273.16 Kelvin.
References
Wagner W., A. Saul, A. Pruss. International equations for the pressure along the melting and along the sublimation curve of ordinary water substance, equation 3.5. 1993. http://www.nist.gov/data/PDFfiles/jpcrd477.pdf.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TSat | Saturation temperature [K] |
output RealOutput | pSat | Saturation pressure [Pa] |
Modelica definition
Buildings.Utilities.Psychrometrics.TDewPoi_pW
Model to compute the dew point temperature for given water vapor pressure of moist air
Information
Dew point temperature calculation for moist air above freezing temperature.
The correlation used in this model is valid for dew point temperatures between 0°C and 200°C. It is the correlation from 2005 ASHRAE Handbook, p. 6.2. In an earlier version of this model, the equation from Peppers has been used, but this equation yielded about 15 Kelvin lower dew point temperatures.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | p_w | Water vapor partial pressure [Pa] |
output RealOutput | T | Dew point temperature [K] |
Modelica definition
Buildings.Utilities.Psychrometrics.TWetBul_TDryBulPhi
Model to compute the wet bulb temperature based on relative humidity
Information
This block computes the wet bulb temperature for a given dry bulb temperature, relative air humidity and atmospheric pressure.
If the constant approximateWetBulb
is true
,
then the block uses the approximation of Stull (2011) to compute
the wet bulb temperature without requiring a nonlinear equation.
Otherwise, the model will introduce one nonlinear equation.
The approximation by Stull is valid for a relative humidity of 5% to 99%,
a temperature range from -20°C to 50°C
and standard sea level pressure.
For this range of data, the approximation error is -1 Kelvin to +0.65 Kelvin,
with a mean error of less than 0.3 Kelvin.
Otherwise a calculation based on an energy balance is used. See #474 for a discussion. The model is validated in Buildings.Utilities.Psychrometrics.Examples.TWetBul_TDryBulPhi.
For a model that takes the mass fraction instead of the relative humidity as an input, see Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi.
References
Stull, Roland. Wet-Bulb Temperature from Relative Humidity and Air Temperature Roland Stull. Journal of Applied Meteorology and Climatology. Volume 50, Issue 11, pp. 2267-2269. November 2011 DOI: 10.1175/JAMC-D-11-0143.1
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
Boolean | approximateWetBulb | false | Set to true to approximate wet bulb temperature |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model | |
input RealInput | TDryBul | Dry bulb temperature [K] |
input RealInput | phi | Relative air humidity |
input RealInput | p | Pressure [Pa] |
output RealOutput | TWetBul | Wet bulb temperature [K] |
Modelica definition
Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi
Model to compute the wet bulb temperature based on mass fraction
Information
This block computes the wet bulb temperature for a given dry bulb temperature, mass fraction and atmospheric pressure.
If the constant approximateWetBulb
is true
,
then the block uses the approximation of Stull (2011) to compute
the wet bulb temperature without requiring a nonlinear equation.
Otherwise, the model will introduce one nonlinear equation.
The approximation by Stull is valid for a relative humidity of 5% to 99%,
a temperature range from -20ˆC to 50ˆC
and standard sea level pressure.
For this range of data, the approximation error is -1 Kelvin to +0.65 Kelvin,
with a mean error of less than 0.3 Kelvin.
Otherwise a calculation based on an energy balance is used. See #474 for a discussion.
For a model that takes the relative humidity instead of the mass fraction as an input, see Buildings.Utilities.Psychrometrics.TWetBul_TDryBulPhi.
References
Stull, Roland. Wet-Bulb Temperature from Relative Humidity and Air Temperature Roland Stull. Journal of Applied Meteorology and Climatology. Volume 50, Issue 11, pp. 2267-2269. November 2011 DOI: 10.1175/JAMC-D-11-0143.1
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
Boolean | approximateWetBulb | false | Set to true to approximate wet bulb temperature |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model | |
input RealInput | TDryBul | Dry bulb temperature [K] |
input RealInput | p | Pressure [Pa] |
output RealOutput | TWetBul | Wet bulb temperature [K] |
input RealInput | Xi[Medium.nXi] | Species concentration at dry bulb temperature |
Modelica definition
Buildings.Utilities.Psychrometrics.ToDryAir
Block to convert absolute humidity from [kg/kg total air] to [kg/kg dry air]
Information
Block that converts humidity concentration from [kg/kg total air] to [kg/kg dry air].
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
output RealOutput | XiDry | Water vapor concentration in [kg/kg dry air] |
input RealInput | XiTotalAir | Water vapor concentration in [kg/kg total air] |
Modelica definition
Buildings.Utilities.Psychrometrics.ToTotalAir
Block to convert absolute humidity from [kg/kg dry air] to [kg/kg total air]
Information
Block that converts humidity concentration from [kg/kg dry air] to [kg/kg total air].
This block may be used, for example, to convert absolute humidity that is received from EnergyPlus to [kg/kg total air], which is the convention used by Modelica.Media.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
output RealOutput | XiTotalAir | Water vapor concentration in [kg/kg total air] |
input RealInput | XiDry | Water vapor concentration in [kg/kg dry air] |
output RealOutput | XNonVapor | Mass fraction of remaining substances |
Modelica definition
Buildings.Utilities.Psychrometrics.X_pTphi
Return steam mass fraction as a function of relative humidity phi and temperature T
Information
Block to compute the water vapor concentration based on pressure, temperature and relative humidity.
If use_p_in
is false (default option), the p
parameter
is used as atmospheric pressure,
and the p_in
input connector is disabled;
if use_p_in
is true, then the p
parameter is ignored,
and the value provided by the input connector is used instead.
Extends from Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure (Humidity ratio for given water vapor pressure).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Boolean | use_p_in | true | Get the pressure from the input connector |
Pressure | p | 101325 | Fixed value of pressure [Pa] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | p_in | Atmospheric Pressure [Pa] |
input RealInput | T | Temperature [K] |
input RealInput | phi | Relative humidity (0...1) |
output RealOutput | X[Medium.nX] | Steam mass fraction |
Modelica definition
Buildings.Utilities.Psychrometrics.X_pW
Humidity ratio for given water vapor pressure
Information
Block to compute the humidity ratio for a given water vapor partial pressure.
If use_p_in
is false (default option), the p
parameter
is used as atmospheric pressure,
and the p_in
input connector is disabled;
if use_p_in
is true, then the p
parameter is ignored,
and the value provided by the input connector is used instead.
Extends from Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure (Humidity ratio for given water vapor pressure).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Boolean | use_p_in | true | Get the pressure from the input connector |
Pressure | p | 101325 | Fixed value of pressure [Pa] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | p_in | Atmospheric Pressure [Pa] |
output RealOutput | X_w | Species concentration at dry bulb temperature |
input RealInput | p_w | Water vapor pressure [Pa] |
Modelica definition
Buildings.Utilities.Psychrometrics.pW_TDewPoi
Model to compute the water vapor pressure for a given dew point temperature of moist air
Information
Block to compute the water vapor pressure for a given dew point temperature.
The correlation used in this model is valid for dew point temperatures between 0°C and 30°C. It is an approximation to the correlation from 2005 ASHRAE Handbook, p. 6.2, which is valid in a wider range of temperatures and implemented in Buildings.Utilities.Psychrometrics.Functions.pW_TDewPoi. The approximation error of this simplified function is below 5% for a temperature of 0°C to 30°C. The benefit of this simpler function is that it can be inverted analytically, whereas the other function requires a numerical solution.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
output RealOutput | p_w | Water vapor partial pressure |
input RealInput | T | Dew point temperature [K] |
Modelica definition
Buildings.Utilities.Psychrometrics.pW_X
Water vapor pressure for given humidity ratio
Information
Block to compute the water vapor partial pressure for a given humidity ratio.
If use_p_in
is false (default option), the p
parameter
is used as atmospheric pressure,
and the p_in
input connector is disabled;
if use_p_in
is true, then the p
parameter is ignored,
and the value provided by the input connector is used instead.
Extends from Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure (Humidity ratio for given water vapor pressure).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Boolean | use_p_in | true | Get the pressure from the input connector |
Pressure | p | 101325 | Fixed value of pressure [Pa] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | p_in | Atmospheric Pressure [Pa] |
input RealInput | X_w | Water concentration at dry bulb temperature |
output RealOutput | p_w | Water vapor pressure [Pa] |