Context
Personal project
Role
Sole developer
Stack
C++20, CUDA 13, Qt 6, CMake
Status
v13 released; v14 active
NACA 0012 at 14° angle of attack. Bright ridges are high finite-time Lyapunov exponent: the material lines that bound the separated shear layers and each shed vortex.

Why FTLE instead of smoke

Smoke tracers show where particles went. The finite-time Lyapunov exponent shows where the flow pulls neighbouring particles apart, so separation bubbles, shear layers and vortices appear as sharp curves instead of a diffuse cloud. The textbook method re-integrates every trajectory for every frame, which is why earlier tools offered a "calculate" button. This app instead advances the backward flow map with one semi-Lagrangian step per frame, so the field is live and its cost does not grow with the integration window.

FTLE field behind a NACA 0012 at 10 degrees: alternating vortex street
10°: a regular alternating vortex street.
FTLE field behind a climbing kite: wake inclined downwards
A climbing kite. The climb is applied as an inclined inflow, so the wake leaves at an angle and the effective angle of attack changes.

How it works

  • Solver. D2Q9 lattice Boltzmann with regularised collision and a Vreman LES subgrid model, exact-distance Bouzidi walls on the foil, and sponge layers that absorb outgoing waves.
  • Forces. Lift and drag by momentum exchange, consistent with the Bouzidi wall, plotted live alongside the Strouhal number.
  • Honest numbers. The on-screen readout gives the target Reynolds number of the real kite and the lower one the grid can actually resolve, instead of implying the two are the same.
  • Checked against a CPU oracle. A double-precision CPU reference for the lattice-Boltzmann core and the FTLE, plus Couette, Poiseuille and Taylor–Green tests.
  • Speed. One lattice step at 480 × 240 takes 0.14 ms on a laptop RTX 3070, about 800 million lattice updates per second.
  • Output. H.264 recording, PNG and VTK export with JSON metadata, and saved presets.

Validation at Re 1000

An automated polar sweep from 0° to 12°, compared with Kurtulus (2015). Drag at zero incidence is 0.125 against 0.12 in the literature. Alternating shedding starts at 8°, the angle where that paper first reports it, with a chord-based Strouhal number St = f c / U of 0.878 against the 0.876 reported there (0.888 and 0.883 at 9° and 10°).

shedding 0.10 0.14 0.18 0.22 0° 2° 4° 6° 8° 10° 12° angle of attack 0°: Cd 0.125 1°: Cd 0.125 2°: Cd 0.126 3°: Cd 0.128 4°: Cd 0.131 5°: Cd 0.134 6°: Cd 0.139 7°: Cd 0.142 8°: Cd 0.150 9°: Cd 0.168 10°: Cd 0.174 11°: Cd 0.192 12°: Cd 0.213 literature 0.12literature 0.12
Drag coefficient. Diamond: literature value at 0°.
shedding 0.0 0.2 0.4 0.6 0° 2° 4° 6° 8° 10° 12° angle of attack 0°: Cl -0.000 1°: Cl 0.052 2°: Cl 0.110 3°: Cl 0.157 4°: Cl 0.200 5°: Cl 0.245 6°: Cl 0.275 7°: Cl 0.289 8°: Cl 0.320 9°: Cl 0.373 10°: Cl 0.398 11°: Cl 0.455 12°: Cl 0.513
Lift coefficient. Shaded: angles with alternating vortex shedding.

Two kites, one above the other

In the tidal-kite concept two foils fly stacked on one tether system. The app places two NACA 0012 kites 3 m apart (15 chords) and shows how the upper kite's wake reaches the lower one while both climb.

Two stacked kites at 0° pitch, climbing at 3 m/s in a 1 m/s current, so the relative flow arrives from above at about 72° and each wake sweeps down towards the kite below. The top and bottom edges are periodic, which makes the pair repeat as an endless column 3 m apart. Frames where the solver paused to let the GPU cool have been cut, so playback is continuous.

Lessons

  • A frozen reference pays for itself. Porting a browser prototype to CUDA was tractable because the core kernels could be compared with a CPU version; the gaps in that oracle are the next thing on the list.
  • Resolution limits belong on screen. A 64-cells-per-chord grid cannot reach a full-scale Reynolds number, and saying so up front avoids over-reading the pictures.