🌬️Virtual Wind Tunnel - Kármán Vortex Street, Airfoil Flow, Drag and Lift
A 2D wind tunnel that runs live in your browser. Uniform flow enters from the left and a D2Q9 lattice Boltzmann solver (BGK collisions with an optional Smagorinsky subgrid model) computes the flow, so you can watch a Kármán vortex street peel off a cylinder, the pressure difference across an airfoil, or the recirculation zone behind a building. Pick a preset or draw any obstacle with your mouse or finger. The tool measures the force on the body by momentum exchange, plots drag and lift coefficients over time and estimates the Strouhal number from the lift oscillation.
Free · No sign-up · Runs in your browserLast updated:
Loading tool...
How to use Virtual Wind Tunnel (2D Flow Simulation)
- 1Pick a preset (cylinder, airfoil, plate, car, building, tandem cylinders) or start with an empty tunnel
- 2Set the inflow speed and viscosity and watch the Reynolds number; for the airfoil, adjust the angle of attack
- 3Switch between vorticity, speed and pressure views and turn on streaklines or tracer particles
- 4Press and drag on the canvas to draw or erase obstacles and watch the flow reorganise
- 5Read the drag and lift coefficient chart and the Strouhal number and compare them with classic experiments
FAQ
- How does a Kármán vortex street form?
- As fluid flows past a cylinder, the boundary layer separates on both sides into two shear layers. Above a Reynolds number of about 47 the symmetric wake becomes unstable: vortices roll up alternately on each side and shed downstream in two staggered rows of opposite spin. Each shed vortex flips the sideways force, so the lift coefficient oscillates at a frequency f with St = fD/U ≈ 0.2. Singing power lines and vortex-induced vibration of chimneys and bridges come from the same effect.
- How is the lattice Boltzmann method different from ordinary CFD?
- Conventional CFD discretises the Navier–Stokes equations directly. The lattice Boltzmann method instead evolves particle distribution functions on a regular grid through local collisions and streaming to neighbouring cells. Each cell stores just 9 directions, the collision step is purely local and streaming is a data shift, so the code is short and parallel, and arbitrary hand-drawn obstacles only need to be marked solid with bounce-back. At low Mach number it recovers the incompressible Navier–Stokes equations with viscosity ν = (τ − ½)/3.
- Why is the speed in tiny 'lattice units', capped at 0.15?
- Lattice Boltzmann is weakly compressible and its error grows with the Mach number squared; the lattice sound speed is 1/√3 ≈ 0.577. An inflow of 0.1 is about Mach 0.17, which is acceptable, but flow around sharp corners can speed up two or three times and go unstable. That is why the tool raises the Reynolds number by lowering the viscosity rather than raising the speed, and why it has a speed clamp and an automatic reset.
- How accurate are the drag coefficient and Strouhal number?
- In a check at Re = 100 with a 16-cell cylinder, the tool gives C_d ≈ 1.68 and St ≈ 0.18, against about 1.35 and 0.165 for an unbounded cylinder in experiments. Most of the difference is blockage: the cylinder fills 1/7 of the tunnel height, so the walls squeeze the flow and speed it up. A coarse grid and the 2D approximation (real high-Re wakes are 3D) add further error, so treat the numbers as good for comparisons and teaching, not as a substitute for an engineering wind tunnel.
- Why does airfoil lift rise and then fall as the angle of attack increases?
- At small angles the flow follows the upper surface and speeds up, lowering the pressure there, so lift grows roughly linearly with angle. At large angles the adverse pressure gradient on the upper surface makes the boundary layer separate into a large recirculating region: lift drops and drag jumps, which is stall. The Reynolds numbers here are only hundreds to a few thousand, far below a real aircraft, so the maximum lift coefficient and stall angle are lower than textbook values, but the trend is the same.
Features
- D2Q9 lattice Boltzmann solver with a Smagorinsky turbulence model, an outflow sponge and automatic reset if it blows up
- Seven presets: cylinder vortex street, NACA 2412 airfoil with adjustable angle of attack, flat plate, car, building and tandem cylinders
- Draw or erase any obstacle, including on touch screens
- Colour maps of vorticity, speed and pressure, plus streaklines and random tracer particles
- Momentum-exchange forces with live drag and lift coefficient plots and a Strouhal estimate
- Adapts steps per frame to your device, selectable grid resolution, pauses when the tab is hidden