IAN HELFRICH / SITE INDEXFind anything.
71 records
Hidden Rivers

Dye & vortices

DENSITY & ROTATION

Dye & vortices

A denser drop sinks and sets the surrounding water turning. Follow the dye, or choose Vorticity to see the rotation in a cross-section.

See the water
View
3D dye0.0 s
24 × 18 × 18 cm10 °C

Dye shows the path of the released water. Switch to Vorticity to see where the flow turns.

Choose an experiment

Set the water and drop

The drop is denser than the water.

Advanced display
Measuring display and simulation.

Display follows the screen’s refresh rate. Finer uses four times as many cells as the middle setting; a larger salinity difference also takes more computation. Requested pace is reached only when the calculation can keep up.

Drag to turn the tank; scroll or pinch to zoom. Tap to add dye on the release plane. Choose “Pour dye” for continuous drops. Water and resolution changes start a new tank.

Gold marks a saltier or matching addition; coral marks a fresher one.

Dye starts underwater without a push. A density difference drives the water; the dye follows it. In stratified water, a plume can spread sideways near a layer of similar density. Turn the view to see motion through the tank’s full depth.

What the physics includes

Three-dimensional incompressible Boussinesq flow runs entirely in your browser, with velocity in all three directions. Salt and both pigments use conservative cell-face transfers. Half-step transport before and after the velocity update keeps the density response centered in time. TEOS-10 supplies standard-composition seawater density at 10 °C and atmospheric pressure; the controls use Absolute Salinity in g/kg. Glass sides and bottom resist sliding. The flat top is a rigid lid with zero shear.

Resolution controls change the actual calculation: 32³, 64 × 32 × 32 or 64³ cells. The finest grid has 3.75 × 2.81 × 2.81 mm cells. Where WebGPU is available, momentum transport uses single precision on the GPU; density, pressure and conservative salt/dye transfers remain in double precision. Other devices use the double-precision reference calculation. Limited transport reduces smearing; it cannot resolve molecular mixing, turbulent entrainment or a drop striking a free surface. Temperature and viscosity are held fixed. The simulated clock can run more slowly on a finer grid or slower device.

The 3D display traces light through the calculated volume and blends a short queue of computed frames at the screen’s refresh rate. Smooth display motion can continue while the simulated clock runs more slowly. The cross-section samples one physical plane; its slider also places new drops. Cyan and coral show opposite turning directions on that plane, with x right and y down. Drawing resolution adjusts to device performance. WebGL integrates pigment attenuation along the view and light rays to reveal folds and depth. The optical coefficients, colors, lighting and glass are artistic; interpolation adds no physical detail. Salinity uses 0–40 g/kg and flow speed 0–50 mm/s display scales. Vorticity is the curl of the calculated velocity: strength uses 0–8 s⁻¹; signed depth-axis rotation uses −8 to +8 s⁻¹. The signed colors use a square-root stretch to make weaker rotation visible; the endpoints clip. This diagnostic adds no force. Stable-layer, conservation, symmetry, pressure and replay checks accompany grid, timestep and GPU comparisons. Time coupling ↗ · Vorticity method ↗ · Equations ↗ · Reference results ↗ · GPU method ↗ · GPU comparisons ↗

TEOS-10 seawater density ↗ · Bridson's fluid simulation notes ↗