# HumidityRhoThermo by Tobias Holzmann

**contributor**: Tobias Holzmann**affiliation**: Holzmann CFD**contact**: click here for email address**OpenFOAM version**: v8**published under**: GPL v3 license

# HumidityRhoThermo Library

This page describes the usage of the OpenFOAM thermodynamic library named humidityRhoThermo. The library is intended to be used in Heat Ventilation and Air Condition situations (HVAC) in which humidity effects do play an important role and could be considered as a driving force for the flow. The library is ready-to-use for different OpenFOAM versions (ESI and Foundation). The idea of the thermodynamic library is simple:

- due to the boundary conditions and initial values, a transport equation of the specific humidity is solved
- the specific humidity field is used to calculate
- based on an approach one is using, the saturation pressure of water vapor is calculated for each cell in the domain (only temperature dependent)
- knowing the saturation pressure of water vapor and the specific humidity, the partial pressure of water vapor is calculated
- finally, the air density is calculated as sum of the density of water vapor and dry air

The library further calculates different fields such as the relative humidity, the maximum possible specific humidity or the water mass content of each cell. These quantities are ***defined*** as **NO_READ** quantities. Hence, the library does not output these fields in the default mode. However, each field can be written for post-processing purposes by using the **writeObjects** object function in OpenFOAM.

## Validity and Models

The thermodynamic model can only be used in for pressure values around 101325 Pa (atmospheric pressure) as the models used to calculate the saturation pressure of water vapor are only valid for these pressure values. Furthermore, the user can choose between two approaches to calculate the saturation pressure of water vapor:

- August-Roche-Magnus equation valid between -50 °C to 100 °C
- Buck equation valid between 0 °C and 100 °C

The default model in use it the ***Buck*** formulation as this as the calculation of the saturation vapour pressure is more accurate. It is worth to mention that both equations are very accurate and that the ***humidity*** changes the density not significantly. An example at 101325 Pa:

- Air at 5 °C and 0 % humidity => Density ~ 1.269 kg/m³
- Air at 5 °C and 100 % humidity => Density ~ 1.258 kg/m³

- Air at 20 °C and 0 % humidity => Density ~ 1.204 kg/m³
- Air at 20 °C and 100 % humidity => Density ~ 1.194 kg/m³

- Air at 60 °C and 0 % humidity => Density ~ 1.060 kg/m³
- Air at 60 °C and 100 % humidity => Density ~ 1.050 kg/m³

As we can see, the higher the air temperature gets, the more negligible the density change due to humidity gets. Furthermore, we can directly see that the influence of the temperature onto the density is more significant compared to the humidity influence. Therefore, the humidity thermodynamic library is of main interest if the humidity is the driving force for, e.g., clean rooms (pharmacy) or exclusive HVAC analysis.

The models used to calculate the saturation pressure of water vapour are mainly used for atmospheric pressure.

## Using the thermodynamic library

The library is hosted on Tobias GitHub account. The repository contains different OpenFOAM versions and includes the following:

- thermodynamic library
- boundary condition for applying relative humidity at patches
- solvers
- tutorials

The repository contains a readme file which explains the compiling steps. The tutorials included in the official repository are mainly test-cases and no validation cases. Everybody is warmly welcomed for a push request regarding new tutorial cases (more complex one).