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.
Where two layers of fluid slide past each other, the boundary between them cannot stay flat. Any ripple is pushed further out by the faster flow on its crest, and within a few periods the interface curls into a row of rolling vortices. Hermann von Helmholtz (1868) and Lord Kelvin (1871) worked out this instability; it shapes the billow clouds at the top of an inversion, the edges of jets, the bands of Jupiter, and the mixing at the bottom of the sea.
What you see
Vorticity, the local spin of the fluid, in a square box of 200 by 200 cells whose edges wrap around: red and blue mark spin of opposite sense. The middle half of the box moves to the right at speed , the outer half to the left, so there are two shear layers, a quarter of the box from the top and from the bottom, of opposite spin. (A single layer would leave a second, hidden jump where the box wraps.) A small sine ripple seeds both layers.
The ripples grow, steepen and roll up into a chain of vortices on each layer. Later, neighboring vortices orbit each other and merge, so the vortices grow in size and drop in number: the energy moves to larger scales, as it does in two-dimensional turbulence.
Equation
The lattice Boltzmann method evolves populations moving along the nine directions of a square lattice, which relax toward a local equilibrium:
Their moments obey the Navier-Stokes equations with viscosity . Each shear layer is a tanh profile of thickness cells,
Michalke (1964) found that such a layer is unstable for wavenumbers and grows fastest at , at the rate . On this box one to four waves are all unstable ( from 0.13 to 0.50), and three or four grow fastest. Viscosity thickens the layer as , which slows the growth and stabilizes short waves. The readout gives the layer’s Reynolds number . A frame is 20 lattice steps.
Presets
Two waves: , (Reynolds number 160). Two vortices roll up on each layer within about 2 seconds and keep circling.
Fast roll-up: , , three waves. The rolls form within a second; after about 5 seconds they have merged into one large vortex per layer.
Viscous layer: , seven times the viscosity of the default, one wave. The layer thickens as fast as the ripple grows: one broad, slow roll per layer after about 5 seconds.
Four waves that pair: four vortices form within a second; after about 5 seconds they have paired into two.
Parameters
Layer speed U: each half moves at , so the jump across a layer is ; 0.04 to 0.15 in lattice units (below 0.3 the fluid behaves as incompressible). Applies on Reset.
Relaxation time τ: sets the viscosity, 0.51 to 0.6. Applies live.
Waves: periods of the seed ripple along each layer, 1 to 4. Applies on Reset.
Display: vorticity, speed or pressure, with a choice of color map; streamlines can be drawn on top.