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.
A channel of water to play in: fluid enters from the left, leaves on the right, and whatever you draw into it becomes a wall the flow has to get around. Colored dye enters in stripes with the fluid, so you see where each layer goes: it splits around an obstacle, rolls up into eddies behind it and, above a Reynolds number of about 50, gets torn into a street of vortices.
What you see
A channel of 320 by 128 cells. Fluid enters at speed (lattice units) and carries six-cell stripes of dye along; the top and bottom are slippery walls. The dye is a passive tracer: it shows the flow but does not change it, like ink in water. Switch the display to vorticity, speed or pressure to see the flow itself.
Equation
The flow is the same lattice Boltzmann simulation as the Kármán vortex street on this site: populations moving along the nine directions of a square lattice relax toward a local equilibrium, and their moments obey the incompressible Navier-Stokes equations with viscosity . Obstacles reflect populations back the way they came (no slip). The dye follows , moved every 16 lattice steps by tracing each cell back along the flow.
The Reynolds number uses cells: the cylinder’s diameter, the plate’s length and the step’s height. Drawn walls of other sizes feel a Reynolds number in proportion to their size.
Presets
Cylinder in dye: Re = 120. The dye stripes wrap around the cylinder and roll up into the two rows of the Kármán street.
Inclined plate: Re = 150. A plate at 30 degrees to the flow sheds a large eddy from its trailing edge, then one from its leading edge, in turn.
Backward step: Re = 200. The channel widens suddenly; the flow separates at the corner and a long recirculation zone forms behind it.
Empty channel: Re = 120. Nothing but stripes: draw your own obstacles.
Parameters
Reynolds number Re: 20 to 220. Applies live.
Display: dye, vorticity, speed or pressure; streamlines can be drawn on top.
Built with my Rust simulation engine. Need a simulation like this for research, teaching or a product? Get in touch.