Presets
Playback
Flow
Body
Dye and speed
Real-world scale
Colour field
Camera
Layers
Quality
Model check
The science
What you are looking at
Fluid flowing past a blunt body separates from its surface. Above a critical Reynolds number the two shear layers roll up into vortices that peel off alternately from the upper and lower side. The result is a staggered double row of counter-rotating vortices, the von Kármán vortex street. Each shed vortex gives the body a sideways kick, so the lift oscillates at the shedding frequency and the drag at twice that frequency. This is what makes wires sing in the wind, chimneys and bridge cables vibrate, and periscopes and tall masts need strakes.
Governing equations
Incompressible flow: ∂u/∂t + (u·∇)u = −∇p/ρ + ν ∇²u, ∇·u = 0. Everything depends on one number, the Reynolds number Re = U D / ν (inertia over viscous forces; D is the frontal height of the body). The vortex shedding frequency is reported as the Strouhal number St = f D / U; for a circular cylinder it grows slowly with Re, St ≈ 0.2684 − 1.0356 / √Re for 47 < Re < 180 (Fey, Konig and Eckelmann 1998), about 0.165 at Re = 100 and 0.2 at Re = 200. Force coefficients are Cd = Fx / (½ ρ U² D) and Cl = Fy / (½ ρ U² D). Vorticity is ω = ∂v/∂x − ∂u/∂y, shown as ω D / U.
Flow regimes of a circular cylinder
- Re < 5: creeping flow, the streamlines close behind the body, no separation.
- 5 < Re < 47: a steady pair of attached recirculation eddies whose length grows roughly linearly with Re.
- 47 < Re < 190: the wake loses stability through a Hopf bifurcation and a periodic, two-dimensional vortex street appears.
- 190 < Re < 260: in real life the wake becomes three-dimensional (spanwise instabilities, modes A and B). A purely 2D solver, like this one, keeps producing a tidy street there and therefore overestimates its order.
- Re above about 300: the wake is turbulent. The 2D view is then only a cartoon.
The numerical method (lattice Boltzmann, D2Q9, BGK)
The fluid is represented by nine particle populations fi that hop to neighbouring cells with velocities ei and relax towards the local equilibrium fieq = wi ρ [1 + 3 ei·u + 4.5 (ei·u)² − 1.5 u²]: fi(x+ei, t+1) = fi(x,t) − (fi − fieq) / τ. A Chapman-Enskog expansion shows that this reproduces the Navier-Stokes equations with kinematic viscosity ν = (τ − 1/2) / 3 in lattice units and pressure p = ρ / 3. The inflow speed is fixed at U = 0.1 cells per step (Mach number 0.17), so for a chosen Re and body size the code sets ν = U D / Re, i.e. τ = 3 U D / Re + 1/2. Solid cells use half-way bounce-back; the force on the body is the momentum exchanged on every cut link, F = −2 ∑ ei fi. The inlet is a fixed equilibrium state, the outlet copies the upstream column (zero gradient) and the top and bottom walls are free-slip mirrors. The dye is a cloud of passive tracer particles moved with the local velocity by a second-order Runge-Kutta step, so they trace true streaklines.
Measuring the shedding frequency
A probe records the transverse velocity behind the body every 16 steps. The shedding frequency is the mean spacing of its upward zero crossings (with linear interpolation); the spectrum graph shows the same signal through a Hann-windowed FFT, whose peak should land at the same Strouhal number. The graph of St against Re collects the points you measure and compares them with the correlation.
Independent checks run in the page
- Viscosity: a doubly periodic box carries a sinusoidal shear wave
ux = A sin(k y); the exact Navier-Stokes solution decays asexp(−ν k² t). The code measures the decay and compares the implied viscosity with(τ − 1/2)/3. - Strouhal number: measured from the live wake and compared with the published correlation (circular cylinder, 55 < Re < 200).
- Low-Mach condition and mean density, which must stay close to 1.
Honest simplifications
- The grid is small (320 × 128). A body 16 cells high blocks 12.5 % of the channel, which pushes St up by a few percent and moves the onset of shedding slightly below the unbounded value Re = 47.
- The staircase wall of the body makes the force signal noisy and the effective diameter uncertain by about half a cell.
- BGK collision becomes inaccurate for very small τ (high Re at coarse resolution). The slider stops at Re = 260.
- The model is two-dimensional. Real cylinders have end effects, spanwise cells, and a free surface when floating in water.
- Real-world readouts (speed, frequency) only rescale the lattice numbers with the viscosity of the fluid you choose:
U = Re ν / D,f = St U / D.
What the 3D scene shows
The tabletop flume, pump, honeycomb flow straightener, dye rake, overhead camera and control desk were modelled and baked in Blender. The water surface is driven by the same lattice-Boltzmann field as the 2D page: its colour shows the field you select, and its height follows the pressure (vortex cores are low-pressure dimples, exaggerated about ten times). The dye particles ride on the surface, the optional columns are as tall as the local vorticity, and the display on the control box shows live Re, St, drag and the real-world speed and frequency. The flow itself is still two-dimensional, as if the water layer were very shallow.