# Natural convection in a cavity - CFD Simulation

Source: https://help.sim-flow.com/validation/natural-convection
Last updated: 2026-10-14

[Video](https://help.sim-flow.com/validation/images/natural-convection.mp4)

## Introduction

Natural convection phenomena are often encountered in many practical applications, from simple domestic situations like room heating to industrial and nuclear installations. Though the process seems to be simple, in fact it might be very complex, mostly because in such a heated cavity that we are going to consider, at the same time we will find regions of fully turbulent flow and regions of low turbulent Reynolds number. It is also possible to find in such situations regions of laminar flow or even regions of stagnation. Because of these reasons, simple turbulence modeling of such flows with standard near-wall treatment may not give accurate results.

In this article, we will conduct a numerical simulation that replicates the experiment of [\[Betts et al. (2000)\]](https://help.sim-flow.com/validation/natural-convection#betts). We will model the rectangular cavity in **SimFlow** and set the temperature difference between two vertical walls at \(19.6^oC\) and \(39.9^oC\), resulting in Rayleigh numbers (based on the width) of \(0.86 \cdot 10^6\) and \(1.43 \cdot 10^6\). At the end of the article, we will compare numerical results to the test data available on [\[ERCOFTAC database\]](https://help.sim-flow.com/validation/natural-convection#ERCOFTAC) to demonstrate high accuracy and predictability of **SimFlow**.

## Geometry and numerical mesh

The geometry of the cavity is a cuboid with dimensions H x W x D being: 2.18m x 0.076m x 0.52m - [Figure 1](https://help.sim-flow.com/validation/natural-convection#fig-cavity-geometry).

![image17](https://help.sim-flow.com/validation/images/natural-convection/image17.png)

Figure 1. Cavity geometry. Source: [\[Betts et al. (2000)\]](https://help.sim-flow.com/validation/natural-convection#betts)

The numerical mesh was created in the **Box Base Mesh** utility, which is an integral part of **SimFlow**. It is a very basic mesh generator available in OpenFOAM that allows creating parametric meshes in a very simple and fast way. For meshing the cavity, the tool is very useful and sufficient.
Mesh convergence studies were performed in order to define the most optimal mesh density. The final mesh consists of 11 million cells, with uniform grading applied in the x, y and z directions.
The mesh details are presented in [Figure 2](https://help.sim-flow.com/validation/natural-convection#fig-mesh).

![image20](https://help.sim-flow.com/validation/images/natural-convection/image20.png)

Figure 2. Numerical mesh details

## Model setup and boundary conditions

The **Buoyant Simple** solver was selected to model the flow in the cavity. The solver is dedicated to modeling steady-state, compressible flows with buoyancy and turbulence phenomena.
The working fluid is air with thermophysical properties given in [Table 1](https://help.sim-flow.com/validation/natural-convection#tab-properites). The perfect gas equation of state was used.

Table 1. Thermodynamic properties of air

| \(M \; [\frac{g}{mol}]\) | \(C_p \; [\frac{J}{kg \cdot K}]\) | \(\mu \; [Pa \: s]\) | \(P_r \; [-]\) |
| --- | --- | --- | --- |
| \(28.96\) | \(1005\) | \(1.8\cdot 10^{-5}\) | \(0.7\) |

The \(k{-}\omega\) turbulence model was selected for the validation. Since \(y^+\) values vary between less than 1 up to 5, the low Re wall function treatment was used. All domain boundaries are wall type boundary conditions. The exact set-up of boundary conditions is presented in [Table 2](https://help.sim-flow.com/validation/natural-convection#tab-bc).

Table 2. Boundary conditions summary for the cavity

| Boundary Type | Cold Wall | Hot Wall | Top and bottom walls | Front and back walls |
| --- | --- | --- | --- | --- |
| Velocity | \(0 \; [\frac{m}{s}]\) | \(0 \; [\frac{m}{s}]\) | \(0 \; [\frac{m}{s}]\) | \(0 \; [\frac{m}{s}]\) |
| Modified pressure | Fixed Flux Pressure | Fixed Flux Pressure | Fixed Flux Pressure | Fixed Flux Pressure |
| Temperature | \(288.15 \; [K]\) | \(307.75/328.05 \; [K]\) | Zero Gradient | Zero Gradient |
| k | \(0 \; [\frac{J}{kg}]\) | \(0 \; [\frac{J}{kg}]\) | \(0 \; [\frac{J}{kg}]\) | \(0 \; [\frac{J}{kg}]\) |
| \(\omega\) | Standard Wall Function | Standard Wall Function | Standard Wall Function | Standard Wall Function |
| \(\nu\) | Low Re Wall Function | Low Re Wall Function | Low Re Wall Function | Low Re Wall Function |
| \(\alpha\) | Standard Wall Function | Standard Wall Function | Standard Wall Function | Standard Wall Function |

Both momentum and turbulence transport equations were discretized using the Linear second-order accuracy scheme.
The **GAMG** linear solver was used for pressure and PBiCGStab with DILU preconditioner for velocity and turbulence. A very small value of tolerance was used for all equations, at the level of 1e-08 for pressure and 1e-15 for velocity and turbulence.
**SimFlow** allows plotting the residuals and selected monitors on-the-run. In this case, we concluded that the solution was converged when residuals were at the level of 1e-06 and the monitored fluid variables were constant.

## Results

Simulations were performed for two different Rayleigh numbers. The Rayleigh number is described by the equation:

\(Ra_x=\frac{g \beta }{\nu \alpha} (T_s - T_{\infty})x^3\)

where:

- **\(Ra_x\)** - is the Rayleigh number for characteristic length x
- **\(x\)** - is the characteristic length
- **\(g\)** - is the acceleration due to gravity
- **\(\beta\)** - is the thermal expansion coefficient
- **\(\nu\)** - is the kinematic viscosity
- **\(\alpha\)** - is the thermal diffusivity
- **\(T_s\)** - is the surface temperature
- **\(T_{\infty}\)** - is the quiescent temperature (fluid temperature far from the surface of the object)

We modeled the rectangular cavity in **SimFlow** and set the temperature difference between two vertical walls at \(19.6^oC\) and \(39.9^oC\), resulting in Rayleigh numbers (based on the width) of \(0.86 \cdot 10^6\) and \(1.43 \cdot 10^6\).

Velocity and temperature profiles are plotted at selected section cuts of the domain as presented in [Figure 3](https://help.sim-flow.com/validation/natural-convection#fig-profile-position) and then compared to test data.

![image19](https://help.sim-flow.com/validation/images/natural-convection/image19.png)

Figure 3. Representation of the profile plot position in the domain, for \(z=0\) at \(y/H=0.5\), \(y/H=0.4\), \(y/H=0.1\) and \(y/H=0.05\)

- Low Rayleigh number \(0.86 \cdot 10^6\)

![image1](https://help.sim-flow.com/validation/images/natural-convection/image1.png)

Figure 4. Velocity profiles for \(y/H=0.05\) - test vs. SimFlow

![image3](https://help.sim-flow.com/validation/images/natural-convection/image3.png)

Figure 5. Velocity profiles for \(y/H=0.1\) - test vs. SimFlow

![image5](https://help.sim-flow.com/validation/images/natural-convection/image5.png)

Figure 6. Velocity profiles for \(y/H=0.4\) - test vs. SimFlow

![image7](https://help.sim-flow.com/validation/images/natural-convection/image7.png)

Figure 7. Velocity profiles for \(y/H=0.5\) - test vs. SimFlow

![image2](https://help.sim-flow.com/validation/images/natural-convection/image2.png)

Figure 8. Temperature profiles for \(y/H=0.05\) - test vs. SimFlow

![image4](https://help.sim-flow.com/validation/images/natural-convection/image4.png)

Figure 9. Temperature profiles for \(y/H=0.1\) - test vs. SimFlow

![image6](https://help.sim-flow.com/validation/images/natural-convection/image6.png)

Figure 10. Temperature profiles for \(y/H=0.4\) - test vs. SimFlow

![image8](https://help.sim-flow.com/validation/images/natural-convection/image8.png)

Figure 11. Temperature profiles for \(y/H=0.5\) - test vs. SimFlow

- High Rayleigh number \(1.43 \cdot 10^6\)

![image9](https://help.sim-flow.com/validation/images/natural-convection/image9.png)

Figure 12. Velocity profiles for \(y/H=0.05\) - test vs. SimFlow

![image11](https://help.sim-flow.com/validation/images/natural-convection/image11.png)

Figure 13. Velocity profiles for \(y/H=0.1\) - test vs. SimFlow

![image13](https://help.sim-flow.com/validation/images/natural-convection/image13.png)

Figure 14. Velocity profiles for \(y/H=0.4\) - test vs. SimFlow

![image15](https://help.sim-flow.com/validation/images/natural-convection/image15.png)

Figure 15. Velocity profiles for \(y/H=0.5\) - test vs. SimFlow

![image10](https://help.sim-flow.com/validation/images/natural-convection/image10.png)

Figure 16. Temperature profiles for \(y/H=0.05\) - test vs. SimFlow

![image12](https://help.sim-flow.com/validation/images/natural-convection/image12.png)

Figure 17. Temperature profiles for \(y/H=0.1\) - test vs. SimFlow

![image14](https://help.sim-flow.com/validation/images/natural-convection/image14.png)

Figure 18. Temperature profiles for \(y/H=0.4\) - test vs. SimFlow

![image16](https://help.sim-flow.com/validation/images/natural-convection/image16.png)

Figure 19. Temperature profiles for \(y/H=0.5\) - test vs. SimFlow

## Summary

**SimFlow** was used to simulate the natural convection process in an enclosed cavity with two vertical heated walls. The accuracy of the simulation results was verified against the test data. It was proven that **SimFlow** is capable of predicting with high accuracy buoyancy-driven flows.

## Literature

- [Betts et al. (2000)] Betts, P L & Bokhari, H I 2000, "Experiments on turbulent natural convection in an enclosed tall cavity", International Journal of Heat and Fluid Flow, vol. 21, pp. 675-683
- [ERCOFTAC database] ERCOFTAC database: Turbulent Natural Convection in an Enclosed Tall Cavity [http://cfd.mace.manchester.ac.uk/ercoftac/doku.php?id=cases:case079](http://cfd.mace.manchester.ac.uk/ercoftac/doku.php?id=cases:case079)
