Library with psychrometric functions
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).
Name | Description |
---|---|
Functions | Package with psychrometric functions |
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] |
WetBul_pTX | Block to compute the wet bulb condition for given dry bulb temperature and humidity |
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 |
Examples | Collection of models that illustrate model use and test models |
BaseClasses | Package with base classes for Buildings.Utilities.Psychrometrics |
Saturation pressure as a function of temperature
Saturation pressure of water, computed from temperature, according to Wagner et al. (1993). The range of validity is between 190 and 373.16 Kelvin.
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).
Type | Name | Description |
---|---|---|
input RealInput | TSat | Saturation temperature [K] |
output RealOutput | pSat | Saturation pressure [Pa] |
Saturation pressure as a function of temperature
Saturation pressure of water above the triple point temperature computed from temperature. The range of validity is between 273.16 and 373.16 Kelvin.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | TSat | Saturation temperature [K] |
output RealOutput | pSat | Saturation pressure [Pa] |
Saturation pressure as a function of temperature
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.
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).
Type | Name | Description |
---|---|---|
input RealInput | TSat | Saturation temperature [K] |
output RealOutput | pSat | Saturation pressure [Pa] |
Model to compute the dew point temperature for given water vapor pressure of moist air
Dew point temperature calculation for moist air above freezing temperature.
The correlation used in this model is valid for dew point temperatures between
0 degC
and 200 degC
. 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).
Type | Name | Description |
---|---|---|
input RealInput | p_w | Water vapor partial pressure |
output RealOutput | T | Dew point temperature [K] |
Model to compute the wet bulb temperature based on relative humidity
This block computes the 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.
For a model that takes the mass fraction instead of the relative humidity as an input, see Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi.
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).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
Boolean | approximateWetBulb | false | Set to true to approximate wet bulb temperature |
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] |
Model to compute the wet bulb temperature based on mass fraction
This block computes the 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.
For a model that takes the relative humidity instead of the mass fraction as an input, see Buildings.Utilities.Psychrometrics.TWetBul_TDryBulPhi.
For a use of this model, see for example Buildings.Fluid.Sensors.WetBulbTemperature
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).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
Boolean | approximateWetBulb | false | Set to true to approximate wet bulb temperature |
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 |
Block to convert absolute humidity from [kg/kg total air] to [kg/kg dry air]
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).
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] |
Block to convert absolute humidity from [kg/kg dry air] to [kg/kg total air]
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).
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 |
Block to compute the wet bulb condition for given dry bulb temperature and humidity
Block to compute the temperature and mass fraction at the wet bulb condition for a given dry bulb state.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | TDryBul | Dry bulb temperature [K] |
input RealInput | XDryBul | Dry bulb temperature [1] |
input RealInput | p | Pressure [Pa] |
output RealOutput | TWetBul | Wet bulb temperature [K] |
output RealOutput | XWetBul | Water vapor mass fraction at wet bulb temperature [1] |
Return steam mass fraction as a function of relative humidity phi and temperature T
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).
Type | Name | Default | Description |
---|---|---|---|
Boolean | use_p_in | true | Get the pressure from the input connector |
Pressure | p | 101325 | Fixed value of pressure [Pa] |
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 |
Humidity ratio for given water vapor pressure
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).
Type | Name | Default | Description |
---|---|---|---|
Boolean | use_p_in | true | Get the pressure from the input connector |
Pressure | p | 101325 | Fixed value of pressure [Pa] |
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] |
Model to compute the water vapor pressure for a given dew point temperature of moist air
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 degC
and 200 degC
. 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).
Type | Name | Description |
---|---|---|
output RealOutput | p_w | Water vapor partial pressure |
input RealInput | T | Dew point temperature [K] |
Water vapor pressure for given humidity ratio
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).
Type | Name | Default | Description |
---|---|---|---|
Boolean | use_p_in | true | Get the pressure from the input connector |
Pressure | p | 101325 | Fixed value of pressure [Pa] |
Type | Name | Description |
---|---|---|
input RealInput | p_in | Atmospheric Pressure [Pa] |
input RealInput | X_w | Species concentration at dry bulb temperature |
output RealOutput | p_w | Water vapor pressure [Pa] |