Home / Science / Physics / Fluid dynamics / Lattice Boltzmann wind tunnelTool #957

Lattice Boltzmann wind tunnel: 2D flow past a cylinder, airfoil or your own drawing, with vortex shedding live

A live 2D wind tunnel in the browser: pick a cylinder, square, plate or airfoil, or draw your own shape, set the Reynolds number and watch the wake form and shed a Kármán vortex street, with drag, lift and Strouhal number measured as it runs.

Keep it one tap away for everyday use.

Bookmark Lattice Boltzmann wind tunnel?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Shape
  2. Reynolds
  3. Wake
  4. Forces
Nothing is uploadedWorks offline once open

Wind tunnel

Air flows in from the left at 0.1 lattice units per step (Mach 0.17 in lattice terms). The Reynolds number sets the viscosity from the body's height across the flow: ν = U × height ÷ Re. Changing the body, size, grid or Re restarts the tunnel. Draw on the tunnel to add walls; switch to Erase to remove them.

Starting…

D2Q9 lattice Boltzmann with BGK collisions and bounce-back walls; forces by momentum exchange. Drag and lift coefficients use the body's height across the flow. The top and bottom edges hold the inflow speed, so a large body is "blocked" like one in a narrow tunnel and drags more than in open air. A teaching model: for study and planning, not a substitute for professional judgement or a validated CFD code.

Download

What it does

This is a small computational wind tunnel. Instead of solving the Navier-Stokes equations directly, the lattice Boltzmann method moves packets of “fluid particles” between the cells of a grid along nine directions and lets them collide. Averaged over a cell, the result behaves like a real viscous fluid, and the method is simple enough to run live in a browser.

Fluid enters from the left. Put a body in the stream and watch: at low Reynolds numbers the flow wraps smoothly round it; above about 47 for a cylinder the wake starts to swing and sheds a Kármán vortex street, alternating swirls that make flags flutter and power lines hum. The page measures the drag and lift forces on the body and, once it sheds, the Strouhal number, the shedding frequency in dimensionless form.

How to use it

  1. Choose a body: cylinder, square, flat plate, NACA 0012 airfoil, or nothing.
  2. Set its size in grid cells and, for the plate and airfoil, the angle of attack.
  3. Set the Reynolds number. The page picks the viscosity to match it. Very high values need a finer grid or a bigger body, or the simulation becomes unstable (the page says so).
  4. Draw on the tunnel with a finger or mouse to add walls, Erase to remove them, or Off to scroll the page past it on a phone.
  5. Show vorticity (how the fluid spins: blue one way, red the other), speed, or pressure.
  6. Leave it running until at least 50 body heights of flow have passed, then read the averages, download the drag and lift history, or save a report.

Worked example

The page opens on a cylinder 20 cells across at Re = 100 in a 300 × 120 grid. The wake starts to wobble after a few thousand steps and settles into a regular vortex street. By step 10000 to 12000 the page shows a drag coefficient of about 1.78 and a Strouhal number of about 0.196 (the exact values drift a little as the averages settle). Free-stream measurements give Cd ≈ 1.35 and St ≈ 0.165 at this Reynolds number; this tunnel is narrow (the cylinder fills a sixth of its height) and its edges hold the inflow speed, which raises both, as in a real blocked wind tunnel. Run offline in a taller 640 × 200 tunnel (8 % blockage), the same code gives St 0.172 and Cd 1.52, closer to the free-stream values.

Tips

  • Try Re = 20 to see the two steady eddies behind the cylinder, then Re = 200 for a livelier street.
  • Tilt the airfoil to 8° and watch the lift coefficient turn positive; push it to 20° and the flow separates.
  • Draw a second cylinder downstream of the first to see wake interference.

FAQ

Is this real CFD? It is a genuine, if basic, solver. It checks out against the exact solution for flow in a channel, but it is two-dimensional, laminar and coarse: a teaching model, not a substitute for professional judgement or a validated CFD code.

Why does it slow down on my phone? Every cell is updated nine times per step. Use the 200 × 80 grid on slower devices.

Does anything get uploaded? No. Everything runs in your browser.

Where the numbers come from

  • Lattice Boltzmann method (D2Q9, BGK collision, halfway bounce-back, Guo forcing): Krüger, T. et al. (2017), The Lattice Boltzmann Method: Principles and Practice (Springer). Momentum-exchange force: Ladd, A. J. C. (1994), Journal of Fluid Mechanics 271, 285 to 309.
  • NACA 4-digit thickness formula: Jacobs, Ward and Pinkerton (1933), NACA Report 460 (public domain).
  • Checked against the exact Poiseuille profile in a forced channel and against an independent NumPy D2Q9 code written for the tests (forces equal step by step).

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Dimensionless numbers calculator #956 Give a fluid, a speed and a length and get the Reynolds, Mach, Froude, Weber, capillary, Bond, Ohnesorge, Prandtl, Péclet, Grashof, Rayleigh, Richardson, Strouhal and Knudsen numbers, each with a plain note on what regime the flow is in. Water wave calculator #139 From a wave's period, height and the water depth, get the wavelength (solving the dispersion relation exactly), phase and group speed, energy and power, orbital velocity at the bed, then follow the wave into shallow water with shoaling and refraction to find where and how high it breaks, and the breaker type. Airfoil calculator #958 Type a NACA 4-digit code and an angle of attack to get the lift coefficient from thin airfoil theory and from a vortex panel method, the zero-lift angle, quarter-chord moment, pressure distribution, lift per metre of span, a rough drag estimate and, for a wing of given aspect ratio, induced drag. Potential flow builder #959 Build an ideal 2D flow from a uniform stream, sources, sinks, vortices and doublets, tap to add them, and see the streamlines, stagnation points, the speed everywhere, the velocity and pressure at any point, and the lift and drag from Blasius's theorem. Flat plate boundary layer calculator #960 For flow along a smooth flat plate, get the Reynolds number, where the boundary layer turns turbulent, its thickness, displacement and momentum thickness, the local skin friction and wall shear stress, and the plate's drag, with the exact Blasius profile for laminar flow and the 1/7 power law for turbulent flow. PIV lite #961 Open two frames of a seeded flow and get the velocity vector field by FFT cross-correlation of interrogation windows, with sub-pixel peaks, a second pass, outlier detection and replacement, speeds in m/s from the pixel size and frame interval, and a CSV of the vectors. Your images never leave your device. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser.