Skip to content

Blog

Curl and vorticity with the live sim

What swirl adds

Swirl on Fluidsimulation.net maps to vorticity. Higher values feed curling force from local spin so edges roll instead of sliding flat.

In the solver, this works through vorticity confinement, which takes the spin already present in the velocity field and feeds some of it back in. That keeps small eddies from flattening out too quickly. Raise Swirl and loose streaks start curling into tight little rolls instead of smearing in a straight line.

Low Swirl values look closer to a gentle current, where color drifts without much rotation. High values produce the churn you see in Fire mode, where edges never quite settle into a calm shape. The setting changes the character of every stroke you paint, not only the ones near an edge.

A controlled way to compare swirl

Run this test on the live WebGL fluid simulation. Drag one straight stroke instead of a scribble, since a straight line gives Swirl the clearest room to visibly bend an edge. Paint that stroke once at the default Swirl value, clear the canvas, then raise Swirl under Advanced and paint the identical stroke again.

Turn on Explain field before the second stroke so you watch the velocity field curl directly instead of judging by color alone. At the default value the field holds close to a straight line. With Swirl raised, the same stroke folds into tight rolls that keep spinning after you lift your finger, which is vorticity confinement feeding spin back into the field in real time.

If moving the slider back and forth feels fiddly, open fire mode and calm mode back to back instead. Fire locks Swirl near the top of its range for rolling, flame-like motion, while Calm locks it near the bottom for a quieter field, so switching between the two presets shows both ends of the range in two taps rather than one slider drag.

Keep expectations honest

This is a real-time teaching aid. It will not replace a research vorticity study. It will train your eye for curling flow.

A research study on vorticity usually runs a far finer grid, iterates much longer per frame, and reports numbers an engineer can check against a wind tunnel or a sensor reading. None of that fits inside a browser frame budget that has to render and respond within a few milliseconds.

What you get instead is a fast, interactive sense of how spin behaves, useful before you open heavier software. That boundary between intuition building and engineering grade CFD is covered in CFD vs browser fluid simulation.

Compare swirl across presets

Fire and Calm sit at the two extremes you just compared, Fire pushing swirl high for rolling, flame-like motion and Calm keeping it low for a quieter field.

Ink and Water sit between those two extremes. Ink uses medium swirl so ribbons of color stay legible instead of folding into chaos, while Water keeps swirl moderate too but pairs it with slower fade so the curling motion has time to read as flow rather than turbulence.

Switching modes changes several settings at once, so swirl alone is not the whole story behind the difference you see. If you want to isolate swirl by itself, start from Classic and change only that slider under Advanced instead of jumping between presets.

Where the term comes from

Vorticity is a real fluid dynamics measure of local spin, and engineering CFD software calculates it precisely for design work. This site borrows the idea for a real-time feel rather than a certified number.

In full CFD packages, vorticity comes out of a velocity field that a solver has already resolved on a fine mesh, often after minutes or hours of computation. The number means something specific to an engineer studying airflow over a wing or circulation inside a mixing tank.

Fluidsimulation.net uses vorticity confinement instead, a shortcut built for speed rather than precision. It approximates the feel of spin without solving the full physics behind it. The difference is laid out in CFD vs browser fluid simulation.

More notes