WINDTUNNEL.JETTM.DEV — AERODYNAMICS LAB
WIND TUNNEL
A real-time, GPU-accelerated 2D flow solver for testing NACA airfoils — lift, drag, and pressure, computed live in your browser.
WHAT IS THIS
A wind tunnel,
in WebGL2
No physics engine, no WebAssembly — the solver is a stack of hand-written GLSL fragment shaders, ping-ponging between framebuffers on the GPU. Every frame it advects velocity through the grid, diffuses it, adds forces, then projects it divergence-free with a Jacobi pressure solve, applying vorticity confinement along the way so the vortices shedding off the wing don't just diffuse away.
SOLVER
Stable-fluids incompressible Navier–Stokes, run entirely as GLSL shaders on a 512×256 texture grid, decoupled from display resolution.
AIRFOIL
A NACA 4-digit generator rasterizes the wing into an obstacle mask each time you reshape it, drag its angle, or move a control surface.
FORCES
Pressure is sampled directly off the surface of that mask, every frame, and integrated into lift, drag, and the coefficients aerodynamicists actually read.
STACK
TypeScript + Vite, WebGL2 for both the solver and the renderer, zero runtime dependencies.
TYPESCRIPT
WEBGL2 + GLSL
VITE
ZERO RUNTIME DEPS
NACA AIRFOIL
Shape
the wing
Camber, thickness, and chord sliders regenerate a NACA 4-digit airfoil live. Or skip the panel entirely and drag the wing in the tunnel to set its angle of attack by hand.
NACA 2412
AoA 6.0°
CAMBER (M)2%
THICKNESS (XX)12%
CHORD28% of tunnel
CONTROL SURFACES
Slats, flaps,
ailerons
A leading-edge slat, a trailing-edge flap, and an aileron on the outer tip each deflect independently — bending part of the wing's geometry and reshaping the flow around it in real time.
SLAT −12° AILERON +18° FLAP +14°
SLAT (LEADING EDGE)−12°
FLAP (TRAILING EDGE)+14°
AILERON (OUTER TIP)+18°
LIVE FORCES
Lift and drag,
every frame
Surface pressure gets integrated into lift, drag, Cl, Cd, and Reynolds number as the sim runs. A rolling graph tracks the coefficients over time, so a stall shows up as a visible break in the curve.
LIFT (L)842.6
DRAG (D)96.3
CL1.184
CD0.135
REYNOLDS2.41e5
AOA (DEG)6.0
CL CD
VISUALIZATION
Watch the
air move
Up to 50,000 GPU particles trace streamlines through the tunnel and thin out where the flow separates. Switch to the false-color pressure field — the same blue-to-red map real CFD tools use — to watch high- and low-pressure zones form around the wing.
PRESSURE FIELD
LOW
HIGH
HOW IT'S BUILT
Under the hood
SOLVER
Advect → diffuse → add forces → project, via an 80-iteration Jacobi pressure solve, with vorticity confinement layered on top to keep vortex shedding alive.
GRID
A fixed 512×256 simulation texture, fully decoupled from canvas/display resolution.
RENDER
GLSL fragment shaders composite the pressure field, particle trails, and obstacle mask into a single frame at full framerate.
FORCES
Surface pressure is sampled straight off the obstacle mask every frame and integrated into lift, drag, and the standard coefficients.
FULL THROTTLE
Run it yourself
TRY IT LIVE
VIEW THE CODE
WINDTUNNEL.JETTM.DEV, an independent project.