Show HN: Kutta – a 2D wind tunnel in the browser

crgimenes2 pts0 comments

kutta — 2D wind tunnel in your browser

Fork me on GitHub

kutta

A 2D wind tunnel for aeromodelers and anyone who likes watching air misbehave.

Click the tunnel first so it takes the keyboard. Use ↑ ↓<br>for the angle of attack and V to change the field. The controls are<br>mouse and keyboard only, so on a phone or tablet the tunnel runs but nothing<br>responds to touch yet.

Controls

KeyAction<br>↑ ↓angle of attack<br>Tabcycle NACA profile<br>Vspeed / vorticity / pressure field<br>Sstreamlines<br>Gglow / bloom<br>[ ]inlet speed<br>Spacepause / resume<br>Nsingle step, while paused<br>Rreset the flow<br>Eopen the editor<br>Lplay / pause the animation<br>Escback to the foil

Type a code in the field at the top (2412, 0012,<br>23012) to pick any NACA 4- or 5-digit foil. Type neko<br>and you get a cat. It has terrible aerodynamics. That is the point.

What this is

It streams a flow past an airfoil and draws the speed field, the vorticity,<br>smoke streaklines and the lift/drag vectors while you turn the angle of<br>attack. Underneath is a Lattice-Boltzmann solver, so the wake, the separation<br>and the vortex street come out of the physics rather than being drawn on.<br>Press E and you can draw your own shape, cut a wing into wing plus<br>flap, and animate the control surfaces.

It is qualitative, not validated CFD . Lattice units stand in<br>for physical ones, so it gets the shape of the flow right and the actual<br>numbers wrong. Use it for intuition, not for sizing a real wing.

Files

A browser tab has no file dialog, so the two ends work differently here.<br>To load a scene, drag an .afoil or .svg<br>file onto the tunnel . To keep what you built, press<br>Save and the browser downloads the .afoil<br>wherever your downloads go. There is no Save As, because the browser picks<br>the destination.

The desktop version

This page is the whole simulator. The desktop build adds real open and save<br>dialogs, an SVG import menu, and a native menu bar.<br>Download it for<br>macOS, Windows or Linux, or on macOS run<br>brew install --cask crgimenes/tap/kutta.

tunnel browser kutta field wind angle

Related Articles