# Humid Air Properties¶

Contents

If you are feeling impatient, jump to Sample HAPropsSI Code, or to go to the code documentation `CoolProp.HumidAirProp`

, otherwise, hang in there.

The equations implemented in CoolProp are based on a publication by Hermann et al. [2], which describes the outcome of the ASHRAE research project ASHREA-RP1485. The same source has been used in the ASHRAE Handbook 2009 to generate reference saturation property tables. The code implemented here passes all tests and reproduces the original data with a very high accuracy. It is applicable for pressure from 0.01 kPa up to 10 MPa, in a temperature range from -143.15 °C up to 350 °C with a humidity ratio from 0 kg of water up to 10 kg of water per kg of dry air.

Humid air can be modeled as a mixture of air and water vapor. In the simplest analysis, water and air are treated as ideal gases but in principle there is interaction between the air and water molecules that must be included through the use of interaction parameters.

Because humid air is a mixture of dry air (treated as a pseudo-pure gas) and water vapor (treated as a real gas), three variables are required to fix the state by the state postulate.

In the analysis that follows, the three parameters that are ultimately needed to calculate everything else are the dry bulb temperature \(T\), the total pressure \(p\), and the molar fraction of water \(\psi_w\). The molar fraction of air is simply \(\psi_a=1-\psi_w\).

Of course, it is not so straightforward to measure the mole fraction of water vapor molecules, so other measures are used. There are three different variables that can be used to obtain the mole fraction of water vapor without resorting to iterative methods.

- Humidity ratio

The humidity ratio \(W\) is the ratio of the mass of water vapor to the mass of air in the mixture. Thus the mole fraction of water can be obtained from

or

where the ratio of mole masses \(\varepsilon\) is given by \(\varepsilon=M_w/M_a\)

- Relative Humidity

The relative humidity \(\varphi\) is defined as the ratio of the mole fraction of water in the humid air to the saturation mole fraction of water. Because of the presence of air with the water, the pure water saturated vapor pressure \(p_{w,s}\) must be multiplied by an enhancement factor \(f\) that is very close to one near atmospheric conditions.

Mathematically, the result is

where

The product \(p_s\) is defined by \(p_s=fp_{w,s}\), and \(p_{w,s}\) is the saturation pressure of pure water (or ice) at temperature \(T\). This yields the result for \(\psi_w\) of

- Dewpoint temperature

The dewpoint temperature is defined as the temperature at which the actual vapor pressure of water is equal to the saturation vapor pressure. At the given dewpoint, the vapor pressure of water is given by

and the mole fraction of water vapor is obtained from

Once the state has been fixed by a set of \(T,p,\psi_w\), any parameter of interest can be calculated

## Molar Volume¶

The bracketed term on the right hand side is the compressibility Z factor, equal to 1 for ideal gas, and is a measure of non-ideality of the air. The virial terms are given by

where the virial coefficients are described in ASRAE RP-1485 and their values are provided in Humid Air Validation. All virial terms are functions only of temperature.

Usually the temperature is known, the water mole fraction is calculated, and \(\bar v\) is found using iterative methods, in HAProps, using a secant solver and the first guess that the compressibility factor is 1.0.

## Molar Enthalpy¶

The molar enthalpy of humid air is obtained from

with \(\bar h\) in kJ/kmol. For both air and water, the full EOS is used to evaluate the enthalpy

which is in kJ/kmol, using the mixture \(\bar v\) to define the parameter \(\delta=1/(\bar v \bar \rho_c)\) for each fluid, and using the critical molar density for the fluid obtained from \(\bar \rho_c=1000\rho_c/M\) to give units of mol/m^{3}. The offset enthalpies for air and water are given by

respectively. The enthalpy per kg of dry air is given by

## Enhancement factor¶

The enhancement factor is a parameter that includes the impact of the air on the saturation pressure of water vapor. It is only a function of temperature and pressure, but it must be iteratively obtained due to the nature of the expression for the enhancement factor.

\(\psi_{w,s}\) is given by \(\psi_{w,s}=fp_{w,s}/p\), where \(f\) can be obtained from

## Isothermal Compressibility¶

For water, the isothermal compressibility [in 1/Pa] is evaluated from

with

in kPa/(kg/m^{3}). And for ice,

## Sample HAPropsSI Code¶

To use the HAPropsSI function, import it and do some calls, do something like this

```
#import the things you need
In [1]: from CoolProp.HumidAirProp import HAPropsSI
#Enthalpy (J per kg dry air) as a function of temperature, pressure,
# and relative humidity at dry bulb temperature T of 25C, pressure
# P of one atmosphere, relative humidity R of 50%
In [2]: h = HAPropsSI('H','T',298.15,'P',101325,'R',0.5); print h
File "<ipython-input-2-04ce9ee48974>", line 1
h = HAPropsSI('H','T',298.15,'P',101325,'R',0.5); print h
^
SyntaxError: invalid syntax
#Temperature of saturated air at the previous enthalpy
In [3]: T = HAPropsSI('T','P',101325,'H',h,'R',1.0); print T
File "<ipython-input-3-7575078e82ea>", line 1
T = HAPropsSI('T','P',101325,'H',h,'R',1.0); print T
^
SyntaxError: invalid syntax
#Temperature of saturated air - order of inputs doesn't matter
In [4]: T = HAPropsSI('T','H',h,'R',1.0,'P',101325); print T
File "<ipython-input-4-fa2d6d9f898e>", line 1
T = HAPropsSI('T','H',h,'R',1.0,'P',101325); print T
^
SyntaxError: invalid syntax
```

## Table of Inputs/Outputs to HAPropsSI¶

Parameter | Units | Input/Output | Description |
---|---|---|---|

`B` , `Twb` , `T_wb` , `WetBulb` |
K | Input/Output | Wet-Bulb Temperature |

`C` , `cp` |
J/kg dry air/K | Output | Mixture specific heat per unit dry air |

`Cha` , `cp_ha` |
J/kg humid air/K | Output | Mixture specific heat per unit humid air |

`D` , `Tdp` , `DewPoint` , `T_dp` |
K | Input/Output | Dew-Point Temperature |

`H` , `Hda` , `Enthalpy` |
J/kg dry air | Input/Output | Mixture enthalpy per dry air |

`Hha` |
J/kg humid air | Input/Output | Mixture enthalpy per humid air |

`K` , `k` , `Conductivity` |
W/m/K | Output | Mixture thermal conductivity |

`M` , `Visc` , `mu` |
Pa-s | Output | Mixture viscosity |

`psi_w` , `Y` |
mol water/mol humid air | Input/Output | Water mole fraction |

`P` |
Pa | Input | Pressure |

`P_w` |
Pa | Input | Partial pressure of water vapor |

`R` , `RH` , `RelHum` |
Input/Output | Relative humidity in [0, 1] | |

`S` , `Sda` , `Entropy` |
J/kg dry air/K | Input/Output | Mixture entropy per unit dry air |

`Sha` |
J/kg humid air/K | Input/Output | Mixture entropy per unit humid air |

`T` , `Tdb` , ``T_db` |
K | Input/Output | Dry-Bulb Temperature |

`V` , `Vda` |
m \(^3\) /kg dry air | Input/Output | Mixture volume per unit dry air |

`Vha` |
m \(^3\) /kg humid air | Input/Output | Mixture volume per unit humid air |

`W` , `Omega` , `HumRat` |
kg water/kg dry air | Input/Output | Humidity Ratio |

`Z` |
Output | Compressibility factor (\(Z = pv/(RT)\)) |

## Humid Air Validation¶

Values here are obtained at documentation build-time using the Humid Air Properties module

```
In [5]: execfile('fluid_properties/Validation/HAValidation.py')
File "fluid_properties/Validation/HAValidation.py", line 4
print ' Replicating the tables from ASHRAE RP-1485'
^
SyntaxError: invalid syntax
```