# Contrib massBuoyantBoussinesqSimpleFoam

## 1 Brief description

Steady-state solver for buoyant, turbulent, incompressible flows with vapor and contaminant scalar transport for HVAC and similar applications.

## 2 Governing Equations

The solver is based on buoyantBoussinesqSimpleFoam. Two new mass transfer equations are added to solve for water vapor and contaminant concentration fields.

Transport equation for contaminant concentration: $\mathbf{U} \cdot \nabla \omega_c = D_{ca} \nabla^2 \omega_c$

Transport equation for water vapor concentration: $\mathbf{U} \cdot \nabla \omega_w = D_{wa} \nabla^2 \omega_w$

where $D_{ca}$ is diffusion coefficient for contaminant gas/air and $D_{wa}$ is diffusion coefficient for water/air.

## 3 Calculating humidity

According to ASHRAE Fundamentals 2009 Handbook, humidity is obtained by $\phi = \frac{p_w}{p_{ws}}$

In which, $p_w = \frac{(101325 + p) \omega_w}{0.62198 + 0.37802*\omega_w}$

and $p_{ws} = \exp (-0.58002206*10^4*T^{-1}$ $+ 0.13914993*10^1$ $- 0.48640239*10^{-1}*T$ $+ 0.41764768*10^{-4}*T^2$ $- 0.14452093*10^{-7}*T^3$ $+ 0.65459673*10^1*\ln(T))$

## 4 Installation and running

### 4.1 Installation

The solver must be compiled at first. For compiling do the following steps:

• tar xzf massBuoyantBoussinesqSimpleFoam.tar.gz
• mkdir -p $WM_PROJECT_USER_DIR/applications/solvers (If you already have this folder, skip this step.) • copy the downloaded package into$WM_PROJECT_USER_DIR/applications/solvers
• cd \$WM_PROJECT_USER_DIR/applications/solvers/massBuoyantBoussinesqSimpleFoam
• wmake

### 4.2 Running a sample case

Note that for using this sample its needed to have swak4foam utility installed.

Do the following steps:

• tar xzf room.tar.gz
• Open system/decomposeParDict and change number of processors which is suitable for your machine (Default is set to 2).
• cd room
• decomposePar
• mpirun -np <n> massBuoyantBoussinesqSimpleFoam -parallel >log (note that <n> is number of processors you have set in decomposeParDict).

Now openFoam starts solving the problem. To see how residuals are changing do these steps:

• open an another terminal
• cd room
• gnuplot residuals -

This sample includes a room which have an air inlet and an outlet. Cold clean air is supplied to the room through inlet and after cooling down the temperature and cleaning the room from contaminants is exhausted through outlet. Field Averages for $T$, $U$, $\omega_c$ and humidity are calculated using swak4foam utility.