LAST SEEN ONLINE:
NOV 22, 2026 11:36 UTC
LOCAL_TIME_SYNC:
--:--:-- | -- _
2026 · complete · buoyantBoussinesqSimpleFoam

Part 3: Running the 1x1 Case

Execution and analysis of the 1x1 Differentially Heated Cavity case in OpenFOAM, exploring steady-state natural convection.

OpenFOAMLinuxCFD

Author: Martin Mathew | Date: 2026-10-07 | Category: Thermal CFD Tutorial

1. Expectations: The Physics of Natural Convection

Before hitting “run”, a good CFD engineer always visualizes the expected flow field.

We have a hot wall on the left (310310 K) and a cold wall on the right (290290 K). When the simulation starts from a zero-velocity initial condition, conduction is the only heat transfer mechanism. However, very quickly, the air adjacent to the hot wall will heat up, its density will decrease, and buoyancy forces will drive it upwards. Conversely, the air near the cold wall becomes dense and sinks.

What to expect at steady-state:

  1. The Convection Loop: A large primary vortex will form, circulating clockwise around the entire 1x1 domain.
  2. Thermal Boundary Layers: Because the convective forces are so strong (Ra≈109Ra \approx 10^9), heat will not diffuse evenly across the room. Instead, extreme temperature gradients will be confined to very thin boundary layers right next to the hot and cold walls.
  3. Core Stratification: The center of the cavity will be mostly stagnant and exhibit thermal stratification—meaning the temperature will be relatively uniform horizontally, but will gradually increase from the bottom of the cavity to the top.
Geometry of the Differentially Heated Cavity
Figure 1: Case Geometry
50x50 Hexahedral Mesh
Figure 2: 50x50 Structured blockMesh

2. Launching the Simulation

We have configured system/controlDict to run buoyantBoussinesqSimpleFoam for 2000 iterations. Because this is a steady-state solver (SIMPLE algorithm), “time” actually represents iteration steps.

To execute the run neatly, we use our automated script:

./runCase.sh

This script will:

  1. Generate the 50×5050 \times 50 hexahedral mesh.
  2. Launch the solver in the background.
  3. Automatically execute our Python validation and PyVista visualization scripts once it finishes.

3. Monitoring Convergence

As the solver marches towards 5,000 iterations, it calculates the residuals for Pressure (p_rgh), Velocity (U), and Temperature (T).

Because we are using a first-order upwind scheme (bounded Gauss upwind in fvSchemes) on a coarse mesh, the solver benefits from high numerical diffusion. This artificial “thickness” stabilizes the highly buoyant flow, allowing the residuals to drop smoothly and plateau. In a fully turbulent high-Ra flow like this, achieving machine-zero residuals is rarely possible on a coarse mesh; instead, we look for the residuals to flatten out, indicating a pseudo-steady state has been reached.

4. Analyzing the Results

Once the simulation completes, we expect the visual contours to exactly match our physical intuition.

Temperature Contour
Figure 3: Temperature Contour at Steady-State

In the temperature contour, look for the sharp red and blue zones hugging the vertical walls. This confirms the presence of thin thermal boundary layers. Notice how the top of the cavity is significantly warmer than the bottom, perfectly illustrating thermal stratification.

Velocity Contour
Figure 4: Velocity Magnitude Contour
Velocity Vectors
Figure 5: Velocity Vectors (Glyphs)

In the velocity fields, the streamlines will reveal the massive clockwise vortex. The highest velocities will be concentrated tightly against the walls where the buoyancy driving force is maximized, while the core remains relatively slow-moving.

To further validate our results quantitatively, we extract data along the horizontal and vertical mid-planes:

Temperature along Horizontal Mid-plane
Figure 6: Temperature along the Horizontal Mid-plane
Horizontal Velocity along Vertical Mid-plane
Figure 7: Horizontal Velocity along the Vertical Mid-plane
Temperature along Vertical Mid-plane
Figure 8: Temperature along the Vertical Mid-plane
Vertical Velocity along Horizontal Mid-plane
Figure 9: Vertical Velocity along the Horizontal Mid-plane

Next Steps

Running the case and getting a pretty picture is only half the battle. While our coarse 50×5050 \times 50 mesh provides a fantastic qualitative understanding of the convection loop, the heavy numerical diffusion from the first-order schemes means our quantitative data (like the Nusselt number) is likely inaccurate for such a high Rayleigh number.

In future modules, we will perform a Grid Independence Study and upgrade to Second-Order Schemes to capture the true, mathematically rigorous physics!

Related Projects