This simulation needs WebAssembly, and it could not start in this browser.
The image is a frame from a real run. Check that JavaScript is on, or try another browser.
Heat a layer of fluid from below and cool it from above. Warm fluid is lighter and wants to rise, but viscosity holds it back and heat diffuses away before a parcel gets far. Only when buoyancy wins by a large enough margin does the layer turn over into convection rolls. Bénard saw the hexagonal cells in 1900, and Lord Rayleigh worked out the threshold in 1916. The same instability drives weather, the circulation in the Earth’s mantle and the granulation on the surface of the Sun.
What you see
Temperature in a slice through the layer: hot fluid (red) at the bottom plate, cold (blue) at the top, in a box twice as wide as it is high that wraps around at the sides. The fluid starts at rest with a linear temperature profile and a faint random disturbance. Above the threshold the disturbance grows into rolls; hot plumes rise from the bottom boundary layer, spread under the top plate and sink again as cold plumes. At higher Rayleigh numbers the plumes detach in bursts and the rolls wander.
Equation
In the Boussinesq approximation density changes matter only through buoyancy. For the vorticity and the temperature :
with the velocity from the streamfunction, . Two numbers set the behavior: the Rayleigh number and the Prandtl number . The plates are free-slip (no shear stress, no flow through them) and held at fixed temperatures.
With free-slip plates the threshold is exact: a roll of wavenumber grows once , lowest at . This box holds rolls with and up, so convection starts at . The simulation reproduces the linear growth rate of that roll within 2% at Ra = 2000 and its decay at Ra = 700.
Numerics
A 128 by 64 grid, streamfunction and vorticity at the cell corners, temperature at the cell centers. Vorticity is advected with Arakawa’s Jacobian, temperature with a limited upwind flux that creates no new extremes, and time advances with a three-stage Runge-Kutta scheme. The Poisson equation is solved exactly with a Fourier transform sideways and a tridiagonal solve between the plates.
Presets
Rising plumes: Ra = . Thin thermal boundary layers at both plates shed plumes that feed a few large rolls.
Steady rolls: Ra = 3000, a few times the threshold. The disturbance settles into a steady pair of rolls.
Water, Pr = 7: the same Ra with a more viscous fluid. Momentum diffuses faster than heat, so the plumes are thinner and slower.
Vigorous convection: Ra = . Plumes detach in bursts and the large-scale circulation keeps changing.
Parameters
Rayleigh number Ra: 500 to , logarithmic. Below 779 every disturbance dies out. Applies live.
Prandtl number Pr: 0.1 to 10. Applies live.