CFD (Lattice Boltzmann)

A three-dimensional lattice Boltzmann solver for weakly compressible flows (Mach number up to about 0.1): wind tunnels and external aerodynamics, channels and ducts, flows around buildings, mixing, and flows around moving rigid bodies.

Methods

  • D3Q19 lattice with BGK, TRT or recursive-regularised collisions; Smagorinsky and WALE large-eddy models for turbulent flows.
  • Interpolated bounce-back on obstacles, so curved bodies are not staircases; moving and spinning bodies (a rolling road with turning wheels) are moving walls.
  • Open boundaries that do not reflect: velocity inlets, pressure outlets, free-slip walls.
  • Forces by momentum exchange: drag, lift and their coefficients on every body in the flow, and two-way coupling that lets the flow push a body.
  • Output: velocity, pressure, vorticity and Q-criterion fields, VTK files, slice images.
  • GPU: the first solver with a Vulkan compute path, opted into per solver or per scene, with an optional half-precision lattice for previews (in development).

In Divooka

Planned. The plan is a flow description with bodies in it and force read-outs per body, for the car-in-a-tunnel scene.

Validation

Test Result
Cylinder in a channel (Schäfer–Turek benchmark) C_d ≈ 5.64 against the reference 5.58
Sphere drag, Re ≤ 300, 16 cells per diameter within 6–9 % of the literature
Poiseuille flow tested against the analytic profile
Kármán vortex street Strouhal number measured live in the sample
1 and N threads bit-identical

Cost

A 64³ lattice step costs about 16 ms on one core and 7 ms on two. The catalog's wind tunnel runs at about 21 ms per frame at preview quality and 290 ms at full quality.

Limits

  • At high Reynolds numbers a coarsely resolved body reads 15–40 % high in drag (there is no wall model): treat high-Re drag as comparative. The sample car reads C_d ≈ 1.1 at its resolution, against about 0.3 for a real saloon.
  • Single phase: no free surface (use SPH or FLIP for liquids).
  • Low Mach number only.

Sample scenes

wind-tunnel, vortex-street.