Click to let the water move

Use the arrows to tip and slide the tank

slowfast
00.2 m/s
Slide
Tilt

A tank of water

Water, air, honey and blood all move according to the same two rules, written down by Claude-Louis Navier (1822) and George Gabriel Stokes (1845). They are Newton's force = mass × acceleration, applied to every tiny parcel of a fluid.

What the equations say

Moving the tank

The simulation runs inside the tank, so the tank never moves as far as the water is concerned. Instead, moving it shows up as extra forces. Tilting it turns gravity toward another wall. Sliding it pushes the water back against the trailing wall, the way coffee sloshes when you start walking. Turning it adds the forces you feel on a roundabout: the push outward (centrifugal) and the sideways drift of anything moving (Coriolis).

The glowing light in the sky is a second source of gravity. It swings from far left to far right and back every two and a half seconds, pulling the water after it, so the water sloshes from wall to wall. Sway turns it on and off.

How this simulation works

The water is about ten thousand particles that carry their own velocity, as in film effects (the FLIP method). Each step, their velocities are copied onto a 20 × 20 × 20 grid, the grid's pressure is solved so no cell gains or loses water, and the correction is copied back. Each particle is painted as a brush stroke, deep blue when slow and white foam when fast, and the tilt-shift blur makes it look like a model.

Controls