---
title: "How a Thermal Gradient Organizes into Rolls Interactive Lab | Sandbox Physics"
description: "When does a fluid layer heated from below start to convect?"
canonical_url: "https://sandboxphysics.com/labs/rayleigh-benard-convection/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/rayleigh-benard-convection/"
last_modified: "2026-10-27"
---

Fluid dynamics · from rolls to chaos

# Rayleigh–Bénard Convection

**When does a fluid layer heated from below start to convect?** When the Rayleigh number, which compares buoyancy with viscous and thermal diffusion, passes a critical value. Above it, any small disturbance grows into steady convection rolls, and stronger heating can make the rolls reverse again and again. With no disturbance at all, the layer keeps conducting heat without moving.

Start from a small perturbation and integrate three convection modes. Rotate the view to watch hot and cold fluid trade places and tracers follow the flow, then compare the temperature profile, heat transport and phase-space trajectory as steady rolls form and lose stability.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

The Lorenz truncation uses stress-free boundaries at fixed temperature, with $a^2=1/2,\quad \mathrm{Ra}_c=27\pi^4/4\approx657.5$. The 3D view stretches a 2D field across the depth; the Lab does not solve for rigid walls or 3D turbulence.

Physics tutorial

## Convection: a perturbation becomes steady rolls—or reversals

**Background** Heating from below makes the lower fluid lighter, but viscosity and thermal diffusion resist motion. This Lab does not draw ready-made rolls. It starts from a perturbation, integrates three coupled modes and builds the velocity and temperature fields from them.

**Why it matters** Convection ties together heat transport, linear instability and deterministic chaos. Every trajectory you see can be checked against the same equations, the steady solutions and the heat-flux readouts.

Start with the essentials

- **Focus question**: Why do some perturbations disappear, some settle into circulation, and others reverse repeatedly?
- **One-sentence intuition**: The drive ratio $r$ decides whether pure conduction is stable, but instability cannot create a disturbance from nothing. With no seed, the fluid stays in the exact conducting state; only a nonzero disturbance can grow.

### Core mathematical model

#### Buoyancy, damping and geometry

$$
\mathrm{Ra}=\frac{g\alpha\Delta T H^3}{\nu\kappa},\quad r=\frac{\mathrm{Ra}}{\mathrm{Ra}_c},\quad \mathrm{Pr}=\frac{\nu}{\kappa},\quad \mathrm{Ra}_c=\frac{27\pi^4}{4}
$$

For stress-free boundaries held at fixed temperature, the chosen horizontal wave number gives the lowest onset threshold. Rigid walls have a different threshold.

#### Three modes that evolve together

$$
\frac{dX}{d\tau}=\mathrm{Pr}(Y-X),\quad \frac{dY}{d\tau}=rX-Y-XZ,\quad \frac{dZ}{d\tau}=XY-bZ,\quad b=\frac{8}{3}
$$

The circulation, the hot–cold contrast and the distortion of the mean temperature profile evolve together. RK4 advances them with a fixed step in model time. A companion run starts with a tiny extra amount of circulation.

#### Velocity field from a streamfunction

$$
\psi=\frac{\sqrt{2}\kappa(1+a^2)}{a}X\sin\!\left(\frac{\pi ax}{H}\right)\sin\!\left(\frac{\pi z}{H}\right),\quad u=-\partial_z\psi,\quad w=\partial_x\psi,\quad a^2=\frac12
$$

Writing the flow with a streamfunction guarantees zero divergence, and no fluid passes through either plate. The flow is periodic in the horizontal direction. The spatial view stretches the same field across the depth and adds no motion in the third dimension.

#### Temperature field, with no clipping

$$
\frac{T-T_c}{\Delta T}=1-\frac{z}{H}+\frac{\sqrt{2}Y\cos(\pi ax/H)\sin(\pi z/H)-Z\sin(2\pi z/H)}{\pi r}
$$

Both plate temperatures are fixed. Outside the range between them only the color scale saturates; the temperature values are not clipped. The reduced model can overshoot that range, especially under strong drive.

#### Two measures of heat transport

$$
\mathrm{Nu}_p=1+\frac{2Z}{r},\quad \mathrm{Nu}_v=1+\frac{2XY}{br},\quad \mathrm{Nu}_v-\mathrm{Nu}_p=\frac{2}{br}\frac{dZ}{d\tau}
$$

While the heat stored in the layer is still changing, the temperature gradient at the plate and the volume-averaged total heat flux differ. On a steady branch they agree. Both are computed from the current modes.

#### Steady solutions and time scale

$$
X_*=Y_*=\pm\sqrt{b(r-1)},\quad Z_*=r-1,\quad \mathrm{Nu}_*=3-\frac{2}{r},\quad \tau=\pi^2(1+a^2)\frac{\kappa t}{H^2}
$$

The nonzero steady branches exist only above onset. The clock shows dimensionless model time, not seconds. Under strong drive, the Lorenz dynamics do not predict laboratory turbulence quantitatively.

### Common difficulties

#### Boundary conditions set the threshold

**Typical misconception** Every heated layer shares one universal onset value.

**Better mental model** This model has stress-free boundaries at fixed temperature and a fixed horizontal wave number. Its onset value does not apply to rigid no-slip walls.

#### A phase portrait is not a particle path

**Typical misconception** The two-wing modal trajectory depicts two physical vortices.

**Better mental model** Each point in the portrait gives mode amplitudes that describe the whole flow. The tracers in the apparatus mark real positions. Both are driven by the same state, but they are plotted in different spaces.

#### Instability does not mean real turbulence

**Typical misconception** Once the steady branches become unstable, the picture shows fully resolved three-dimensional turbulence.

**Better mental model** Three modes leave out the small-scale structure of strongly driven convection. The chaotic reversals belong to this truncated system and do not give a quantitative law for turbulent heat transfer.

### Run the experiment

1. 01

   #### Let a perturbation decay

   Choose Perturbation decays and advance several model-time units.

   **What to observe:** The circulation fades, the mean temperature returns to the straight-line conduction profile, and both heat-flux values approach one.

2. 02

   #### Build steady rolls

   Choose Steady rolls and compare early and late heat-flux history.

   **What to observe:** The two heat-flux values differ at first. As the orbit in mode space settles, both approach the dashed steady-state value.

3. 03

   #### Watch deterministic reversals

   Choose Lorenz reversals and keep playing, or increase playback rate.

   **What to observe:** The circulation keeps reversing direction, and the trajectory loops around both branches. A tiny difference in the starting state can grow. Playback rate changes only the clock, not the equations.

4. 04

   #### Remove the seed

   Choose No seed and advance, then set a nonzero initial perturbation.

   **What to observe:** The exact zero state never starts circulating by itself. Setting a seed restarts the experiment from time zero.

Physical conclusion

The readouts, the temperature field and the tracers all come from one evolving state. The Lab integrates a low-order convection model, and its limits stay visible: truncation, stress-free boundaries and possible temperature overshoot.

Fields & matter · Starter path

## From a field to an electron microscope

Map an electric field and steer a charged particle. Then find the electron's wavelength and use electron beams to see a crystal and a surface.

[Start here → **Make an Electric Field Visible** Move the probe around a dipole and check that the field always points downhill on the potential landscape. Observe · 8 min](https://sandboxphysics.com/labs/electric-field/)

1. [1 Make an Electric Field Visible](https://sandboxphysics.com/labs/electric-field/)
2. [2 A Charge Bending through Fields](https://sandboxphysics.com/labs/charged-particle/)
3. [3 Electron Wavelength & Voltage](https://sandboxphysics.com/labs/electron-wavelength/)
4. [4 Electron Diffraction & Reciprocal Space](https://sandboxphysics.com/labs/electron-diffraction/)
5. [5 TEM Bright Field, Dark Field & SAED](https://sandboxphysics.com/labs/tem-mode-selector/)
6. [6 SEM Secondary-Electron Topography](https://sandboxphysics.com/labs/sem-topography/)

[View the full path →](https://sandboxphysics.com/topics/fields-and-matter/#starter-path)
