Fluid Dynamics Simulation
Real-time 2D aerodynamic and hydrodynamic simulation around barriers, presets, or uploaded images.
Click and drag the crosshair probe on the simulation canvas to inspect local fluid values.
About Fluid Dynamics Simulation & Lattice Boltzmann Methods
The Fluid Dynamics Simulation provides real-time, interactive 2D aerodynamic and hydrodynamic computational modeling right in your web browser. It computes fluid flow, vortex shedding, Reynolds numbers, and pressure gradients around custom obstacles and aerodynamic airfoils.
The Physics Engine: Navier-Stokes & Lattice Boltzmann (LBM)
Rather than solving the non-linear partial differential Navier-Stokes equations directly via continuous grid discretization, this engine utilizes the discrete Lattice Boltzmann Method (LBM D2Q9 model):
- Microscopic Particle Distributions: Space is discretized into a 2D lattice where each grid node tracks particle velocity distribution functions across 9 discrete velocity vectors (D2Q9).
- Collision Step (BGK Approximation): Particles at each node relax toward a local Maxwell-Boltzmann equilibrium distribution determined by local density and macroscopic fluid velocity.
- Streaming Step: Particles propagate along their discrete velocity directions to neighboring lattice nodes.
- Boundary Bounce-Back: When fluid encounters solid barrier obstacles (or user-drawn barriers), velocity distribution vectors are reversed, ensuring the physical no-slip boundary condition.
Visualization Modes
- Curl / Vorticity Map: Visualizes microscopic rotational fluid shear, clearly demonstrating the formation of the Kármán Vortex Street behind bluff bodies.
- Speed & Velocity Vectors: Color-codes fluid velocity from laminar low-speed zones to accelerated low-pressure flow over airfoils.
- Interactive Tracers: Injects virtual dye particles into the flow stream to track streamlines in real time.
Frequently Asked Questions (FAQ)
What is the Kármán Vortex Street?
It is a repeating pattern of swirling alternating vortices caused by the unsteady separation of fluid flow around blunt obstacles, visible in cloud formations behind islands and smoke behind cables.
Can I draw custom obstacles?
Yes! Click and drag directly on the canvas to draw solid barriers, or select presets like airfoils, cylinders, or flat plates.