Demonstration · Flow and shapeFluid solver running in your browser

Give flow a better path.

A support strut sits in a cooling channel. Its cross-section is fixed by strength, its drag costs pumping power every hour it runs. Watch the wake shed vortices, change the shape yourself, or let the optimiser search, solving the flow for every candidate.

Solver
Lattice Boltzmann D2Q9
Grid
240 × 80 cells
Body
fixed area · convex · ≥ 0.5 D thick
Reynolds
100
Search
Nelder–Mead · 4 shape modes
Field
Shape
Re
Flow enters from the left with a parabolic profile; walls are no-slip.

Drag, measured as it happens.

The force on the body is the momentum that fluid particles exchange with it every step. Behind a bluff body that force swings as vortices peel off alternately from each side; the frequency of the swing gives the Strouhal number. The drag coefficient here uses the diameter of a circle of the same area, so every shape is compared fairly.

Drag and lift over timecoefficient · last 4,000 steps
DragLiftRunning mean drag
Optimisation historydrag coefficient of each solved candidate
CandidateBest so far
Shapes triedsame area · flow left to right
CircleCandidatesBest
Does it hold on a finer grid?same flow at 1.5× resolution

After an optimisation, the circle and the winning shape are re-solved on a 360 × 120 grid. A gain that disappears on a finer grid was a discretisation artefact.

What runs underneath.

Lattice Boltzmann

Particle distributions on a D2Q9 lattice stream and collide each step. A two-relaxation-time collision keeps the scheme stable at low viscosity. Around 30 million cell updates a second run in a background thread.

f_i(x+c_i, t+1) = f_i − ω⁺(f_i⁺ − f_i^eq⁺) − ω⁻(f_i⁻ − f_i^eq⁻)

Boundaries and forces

Walls and body use half-way bounce-back. The inlet imposes a parabolic profile at equilibrium; the outlet copies its neighbour. Drag comes from momentum exchange on every link that crosses the body surface.

Shape

r(θ) = R (1 + Σ a_k cos kθ), k = 1…4

R is rescaled so the area never changes. The body must be convex, at least half a diameter thick and at most 3.6 diameters long.

Search

Nelder–Mead over the four mode amplitudes, starting from the circle. Every candidate starts from rest, runs 2,000 steps and is measured over the next 1,000, so all shapes are judged by the same protocol. Shapes that break a constraint are rejected before solving.

What this model leaves out

The flow is two-dimensional and laminar, at Reynolds numbers far below a real cooling channel, and the body is a staircase of grid cells rather than a smooth surface. Turbulence, three-dimensional effects and heat transfer are not modelled. A production study would carry the winning family of shapes into a validated three-dimensional solver.

Improve a geometry.

We build simulation-driven design studies: parameterised geometry, fast physics for screening, and the optimisation loop around them, before you commit to expensive high-fidelity runs.

Discuss your project