Waves

The coffee that spills at walking pace

A full mug carried across a room spills less from clumsiness than from arithmetic. The liquid in it has one slow way of sloshing, a tilt from side to side, and in a mug eight centimetres across that slosh rings a little above three times a second — almost exactly twice the rate of an ordinary walk. Every step shakes the hand twice, and the coffee answers the second shake as a wine glass answers a singer. A soup bowl is wide enough to ring at the pace of the steps themselves, which is why soup is harder still.

Assumes: The frequency that gets an answer, and the quarter cycle nobody mentions · The tide a lake makes by itself

Anyone who has carried a full mug of coffee from a kitchen to a desk knows the pattern. The first few steps go well. Then the surface starts to rock, a little more with each stride, until a wave climbs the side and goes over the rim. Walking more carefully seems to make it worse. Walking more slowly sometimes helps and sometimes does not, and a person carrying a bowl of soup in the same way has trouble sooner.

None of this is clumsiness. It is resonance, of the plainest kind, and the numbers line up with a precision that is almost suspicious. The liquid in a cup has one slow way of moving that matters, and for a mug of ordinary size that motion rings at almost exactly twice the rate of an ordinary walk. The frequency that gets an answer described what a driven oscillator does when the drive and the natural frequency agree; a mug of coffee carried across a room is that oscillator, and the walk is the drive.

A cup has one note that matters

A liquid at rest in a cylinder can move in many ways — rings that rise and fall at the centre, waves that run round the wall, patterns with several crests across — and each has its own frequency, set by the cup’s width and the depth of the liquid. The slowest is the one that spills coffee. In it, the surface tips: up on one side, down on the other, with a line of no motion across the middle, and back again. It is the cup’s version of the slow sway of water in a lake that the tide a lake makes by itself followed in Lake Geneva, made a thousand times smaller and correspondingly quicker.

The frequency of that tipping mode follows from the same dispersion relation as any wave on deep water, ω2=gktanh⁡kH\omega^2 = gk\tanh kH, with the wavelength fixed by the cup. A wave in a circular cup has to meet the wall with its surface level in the radial direction, and the condition for the tipping mode is that kRkR be the first zero of the slope of the Bessel function J1J_1, 1.841. So

ω12=1.841 gRtanh⁡1.841 HR,\omega_1^2 = \frac{1.841\,g}{R}\tanh\frac{1.841\,H}{R},

with RR the radius and HH the depth. The Bessel function enters for the reason the chain that swings in Bessel’s notes found it in a hanging chain: a wave confined by a circular or tapering boundary has the shape of the boundary built into it, and in a circle that shape is a Bessel function rather than a sine.

A mug sloshes at twice the pace of a walk. The frequency of the slowest slosh of liquid in a cylindrical cup against the cup's width, filled deep (solid) and with 3 cm of liquid (dashed), over the band of a walker's steps, 1.6 to 2.2 Hz, and the band at twice the steps. A mug 8 cm across sloshes at 3.38 Hz, inside the second band; a soup bowl 22 cm across at 2.04 Hz, inside the first; a 6 cm cup at 3.91 Hz. The frequency falls as one over the square root of the width, and only a shallow fill lowers it further.
Fig. 1 The frequency of the slowest slosh in a cylindrical cup against its width, filled deep (solid) and with 3 cm of liquid (dashed), over the band of a walker’s steps, 1.6–2.2 a second, and the band at twice that. A mug 8 cm across sloshes at 3.38 Hz, inside the upper band; a soup bowl 22 cm across at 2.04 Hz, inside the lower; a 6 cm cup at 3.91 Hz.

Nothing in the formula depends on what the liquid is. Coffee, tea, water and soup all have the same frequency in the same cup, because the restoring force is the liquid’s weight and the inertia is the liquid’s mass, and the density cancels. Only gravity and the geometry are left. A mug eight centimetres across, filled well up, rings at 3.38 hertz; an espresso cup six centimetres across at 3.91; a wide soup bowl of twenty-two centimetres at 2.04. The frequency falls as one over the square root of the width, so doubling the width of a vessel lowers its slosh by about a third.

The depth hardly matters once the liquid is deeper than about one radius, because the hyperbolic tangent has already reached one: the water at the bottom of a tall mug barely moves. That is the second line in the figure. Even with only three centimetres of liquid, a mug’s frequency falls by less than a fifth.

Shaking a cup sideways shakes only its slowest mode

A hand carrying a cup does not tip it; it moves it, forward and back, side to side, up and down, with the cup kept roughly level. The question is which of the liquid’s many modes such a motion excites, and the answer is that one of them takes nearly everything.

A cup accelerated steadily sideways would, given time, settle with its surface tilted, the liquid piled up on the trailing side by exactly the slope a/ga/g. That straight tilt is what a sideways shake asks of the surface, and how much of each mode it excites depends on how much each mode resembles it.

The slowest slosh is nearly the whole of a tilt. Across a diameter of a cylindrical cup, the straight tilt a steady sideways acceleration would give the surface (dashed), and the shape of the slowest slosh mode, a Bessel function J₁(1.841 r/R), scaled to its share of that tilt (solid). The one mode reproduces 83.7% of the tilt's height at the wall; the remaining 16.3% belongs to modes that ring at several times its frequency, far above any walking pace. Shaking a cup sideways is very nearly shaking only its slowest mode.
Fig. 2 Across a diameter of a cylindrical cup, the straight tilt a steady sideways acceleration would give the surface (dashed), and the shape of the slowest slosh mode, a Bessel function J1(1.841 r/R)J_1(1.841\,r/R), scaled to its share of that tilt (solid). The one mode carries 83.7% of the tilt’s height at the wall; the other 16.3% belongs to modes several times faster.

The tipping mode is very nearly a straight tilt itself — a Bessel function that rises from zero at the centre and flattens towards the wall — and expanding the straight tilt in the cup’s modes gives the first of them a share of 2/(1.8412−1)=0.8372/(1.841^2 - 1) = 0.837 at the wall. The next mode with the same left-right pattern rings at 5.331/1.841=1.70\sqrt{5.331/1.841} = 1.70 times the frequency and takes about seven per cent; the rest share the remainder. So a sideways shake at walking frequencies drives one mode hard and lets the others follow the shaking quasi-statically, without resonating.

That simplification is what makes the problem tractable and also what makes the cup so sensitive. It means the coffee behaves like a single pendulum with one natural frequency and a little damping, which is the system the pendulum and its small lie built a whole subject from. A system with many modes of comparable weight would spread a periodic push across them; a cup concentrates it.

What a walk puts into the hand

Walking is periodic, but not at one frequency. Each step lifts and drops the body, decelerates it as the heel strikes and accelerates it as the other foot pushes off. The trunk rocks forward and back once a step and side to side once a stride, which is two steps. The hand, hanging from a swinging arm, inherits all of it, filtered by the arm and by whatever the carrier does to keep the cup steady.

An ordinary walking pace is about 1.6 to 2.2 steps a second, and the fore-and-aft acceleration of the body has its strongest component at the step frequency and a weaker one at twice the step frequency, because each step contains both a braking and a pushing phase and the motion within one step is not a pure sine. The figures here model the hand’s fore-and-aft acceleration as 1.0 m/s² at the step frequency and 0.3 m/s² at twice it. Those are round numbers chosen to be of the right order for a hand carrying something carefully, not measurements of a particular walker, and the conclusions below depend on their ratio to the resonance far more than on their exact size.

The shaded bands in the first figure are those two frequencies over the range of ordinary paces. The mug’s line runs through the upper band and the bowl’s through the lower. A cup is a pendulum, and a walk drives it in two places at once.

The pace that empties a mug

For a driven oscillator with damping ratio ζ\zeta, the response near resonance is larger than the static response by a factor up to 1/2ζ1/2\zeta. The width that is a lifetime related that factor to the time a resonance takes to ring down; for liquid in a cup the damping comes mainly from the thin layer at the wall where the moving liquid has to come to rest, whose thickness the shear that only reaches so far found to be 2ν/ω\sqrt{2\nu/\omega}. For water-like coffee at three hertz that is a third of a millimetre against a radius of forty, and the damping ratio is of order one per cent. The figures use 0.01, which makes the amplification at resonance about fifty.

The pace at which a mug spills. The steady height of the slosh at the rim against walking pace, for a mug 8 cm across and a bowl 22 cm across, with the hand's fore-and-aft acceleration modelled as 1.0 m/s² at the step frequency and 0.3 m/s² at twice it, and a damping ratio of 0.01. The mug's peak sits at 1.69 steps a second, where twice the step frequency meets its slosh at 3.38 Hz, and rises far above the 1 cm between liquid and rim; at 1.9 steps a second the same mug swings 9.3 mm. The bowl resonates with the steps themselves, near 2.0 a second, and its curve leaves the chart. Linear theory stops well before either peak, where the liquid simply leaves the cup.
Fig. 3 The steady height of the slosh at the rim against walking pace, for a mug 8 cm across and a bowl 22 cm across, with the hand’s fore-and-aft acceleration modelled as 1.0 m/s² at the step frequency and 0.3 m/s² at twice it and a damping ratio of 0.01. The mug’s peak sits at 1.69 steps a second, where twice the steps meets its slosh at 3.38 Hz; at 1.9 steps a second the same mug swings 9 mm. The bowl resonates with the steps themselves near 2.0 a second and leaves the chart.

The mug’s curve has one sharp peak, at 1.69 steps a second, where the walk’s second harmonic lands exactly on the slosh. At that pace the linear theory predicts a swing of over five centimetres at the rim, which is to say that the coffee leaves the mug long before the theory finishes. Away from the peak the swing falls to about a centimetre — 9 millimetres at 1.9 steps a second, made mostly of the plain quasi-static tilt the steps produce directly. A centimetre is roughly how far below the rim a full mug is usually filled. A normal walk with a full mug is therefore not safe by a wide margin even off resonance; it is safe by a few millimetres, and a slightly fuller mug or a slightly stronger stride erases the margin.

The bowl is worse in a different way. Its slosh frequency, near two hertz, is in the band of the steps themselves, where the drive is about three times stronger, so its peak is three times taller in proportion and it sits right in the middle of ordinary walking. A bowl is also wide, and the quasi-static tilt at its rim is proportionally larger — the same tilt across twenty-two centimetres lifts the rim almost three times as high as across eight. Carrying soup is harder than carrying coffee for both reasons at once.

The narrow espresso cup is the safest of the three: at 3.91 hertz it would need a brisk 1.95 steps a second to be driven by the second harmonic, and its small radius gives a small tilt. Waiters carrying coffee to a table do it in small cups for reasons that may be partly to do with this.

Two seconds to overflow

A resonance does not deliver its full amplitude at once. A lightly damped oscillator driven exactly at its frequency grows linearly at first and approaches its steady swing over a time of order 1/ζω1/\zeta\omega — for the mug, about five seconds. A walk across a kitchen takes about that long, and the interesting question is what happens inside it.

How long a tuned walk takes to empty the mug. The swing at the rim of an 8 cm mug, from rest, when the walk's second harmonic (0.3 m/s²) drives it exactly at its slosh frequency, 3% off it, and 6% off it, damping ratio 0.01. In tune, the swing passes 1 cm after 1.2 s and is still growing; 3% off, it beats, rising and falling as the walk drifts in and out of step with the liquid; 6% off, it never reaches 1.6 cm. Whether coffee spills is decided within a few percent of pace.
Fig. 4 The swing at the rim of an 8 cm mug, from rest, when the walk’s second harmonic (0.3 m/s²) drives it exactly at its slosh frequency, 3% off it and 6% off it, with damping ratio 0.01. In tune, the swing passes 1 cm after 1.2 s and is still growing; 3% off, it rises to about 2 cm and falls back as the walk drifts in and out of step; 6% off, it never reaches 1.6 cm.

In tune, the coffee overtops a one-centimetre margin in a little over a second — three or four steps. That is the pattern people describe: a few good steps and then a spill. Three per cent off tune, the swing beats: it grows while the walk and the liquid are in step, then the slight difference in frequency brings them out of step and the walk starts taking energy back out. The beat period is one over the frequency difference, about ten seconds here, and the peak of the beat is about twice the steady detuned swing. Six per cent off tune, the swing never reaches a centimetre and a half.

So the outcome is decided within a few per cent of pace. A walker who happens to stride at 1.69 a second spills; one at 1.86, ten per cent quicker, gets less than a centimetre from the resonance and, with a little more freeboard than usual, may well arrive dry. And walking does not hold its pace to a few per cent from step to step, which is the main reason the predicted catastrophe is not universal: the drive wanders in and out of tune, and the beating it causes keeps the swing from settling at its full resonant height. The irregular stride of someone concentrating on the cup may help more than the concentration does.

There is a second, quieter way the walker is not a simple drive. A person watching the surface reacts to it, steadying the hand when the liquid moves. That feedback is slow — reaction times are a few tenths of a second, about one period of the slosh — and a correction that arrives a period late can push in phase with the motion rather than against it. The clock that is pulled into step followed how two oscillators coupled this way can lock together. Whether careful carrying sometimes locks the hand to the coffee, and drives it, is not something the figures can say, but it is consistent with the common experience that staring at the mug does not help.

Drinking does not retune the mug

The obvious remedy is to carry less. It works, but not for the reason it seems to.

Drinking a little does not retune the mug. The slosh frequency of liquid in a mug 8 cm across against the depth of liquid in it. Above a depth of about one radius the liquid at the bottom barely moves and the frequency stays at its deep value of 3.38 Hz: 3.30 Hz at 4 cm. Only below that does it fall, to 2.88 Hz at 2 cm. Drinking the top centimetre off a full mug changes the note by almost nothing; what it changes is the freeboard, the height the slosh has to climb before it leaves.
Fig. 5 The slosh frequency of liquid in a mug 8 cm across against the depth of liquid in it. Above a depth of about one radius the frequency stays at its deep value of 3.38 Hz; with 4 cm of liquid it is 3.30 Hz, and only below that does it fall, to 2.88 Hz at 2 cm.

The depth of the liquid enters only through tanh⁡(1.841 H/R)\tanh(1.841\,H/R), which is within two per cent of one as soon as the depth exceeds the radius. Drinking the top two centimetres off a full mug leaves its frequency where it was. What drinking changes is the freeboard — the height between the surface and the rim — and since the swing at the rim is set by the drive and the damping, not by how much liquid lies beneath, every extra centimetre of freeboard is a centimetre of swing that can happen without loss. A mug filled to two centimetres below the rim survives a walk that one filled to one centimetre does not, and both slosh at the same frequency.

Only a really shallow layer retunes the cup. With two centimetres of liquid in an eight-centimetre mug the frequency drops to 2.88 hertz, and with one centimetre to about 2.2; such a cup is no longer driven at twice the steps but approaches the steps themselves, and the problem changes character rather than going away. That is the slow, sliding slosh of a shallow tray of water, the same shallow-water physics the speed that depends on the length traced in the ocean.

What the formula suggests, and what it rules out

The analysis says where the levers are. The frequency depends only on width and gravity, so a cup cannot be made safe by changing the liquid, and only a change of shape moves the note. A narrow cup is high-pitched and small in tilt; a very wide one is low-pitched and drifts into the band of the steps. Somewhere around five or six centimetres across, a cup sits above both bands for most walkers.

The damping can be raised. Anything that adds friction at the surface or the wall — a layer of foam, a textured inner wall, a baffle — lowers the resonant peak in proportion. A centimetre of milk foam on a cappuccino is a surprisingly effective damper, because a foam is a sponge of thin films that must be sheared and stretched whenever the surface moves. The same principle is used in fuel tanks, where baffles and foam stop the sloshing that would otherwise rock a vehicle, and in the tuned liquid dampers that tall buildings carry: tanks of water sized so that their slosh matches the building’s sway and soaks it up, the liquid version of the damper in the mass that makes another stand still.

The drive can be changed. Walking more slowly lowers the step frequency and moves the second harmonic down below the mug’s slosh; walking more briskly moves it above. Either works if the change is large enough, and the figures say how large: about a sixth of a step a second either side of 1.69, ten per cent, brings the resonant swing under a centimetre. Holding the cup so that the arm absorbs more of the body’s motion — a loose grip from above, a hand moving with the trunk rather than against it — reduces the drive at every frequency.

And a mug can be carried in a way that removes the horizontal drive altogether. If the cup is shaken up and down rather than sideways, the tipping mode is not driven directly at all; vertical shaking excites sloshing only parametrically, at half its own frequency, by the mechanism the ripples that answer at half the shaking found in a vibrated tray. A walk’s vertical bounce at twice the steps would need to be at twice the slosh frequency for that, and it is not, so vertical motion is far less dangerous than horizontal.

What the single-mode picture cannot show

The figures treat the coffee as one linear oscillator in a cylindrical cup, driven by a clean two-component acceleration. Real mugs taper, have handles and rounded bottoms; the frequency shifts by a few per cent but the argument does not change. Real walks are not two pure tones but a broad spectrum with peaks, varying from stride to stride and from person to person. The forcing amplitudes used here are representative orders of magnitude rather than measured values, and a person who carries a cup with a rigid wrist puts much more of the body’s motion into it than one who lets the arm hang.

More fundamentally, the linear theory stops working well before the coffee leaves the cup. When the slosh height becomes a sizeable fraction of the radius, the surface no longer moves as a tilting plane: crests sharpen, the frequency shifts with amplitude, and a planar slosh in a circular cup can become unstable and turn into a swirl, the liquid running round the wall in one direction. Swirling is well documented in fuel tanks and in laboratory cylinders shaken sideways near resonance, and it is a wholly nonlinear effect that the figures here cannot contain. Nor can they capture the moment of spilling itself, which involves a wave climbing a wall and detaching from it.

The model’s domain of validity, stated plainly: cylindrical cups, swing small compared with the radius, damping light, and forcing smooth enough to be described by its strongest few frequencies. Inside that domain the conclusion is robust, because it rests on a ratio of frequencies that is fixed by gravity and a cup’s width.

Still open: how a sloshing liquid chooses to swirl

When a cylinder of liquid is shaken sideways close to its slosh frequency, the planar motion can give way to a rotating one, and which happens depends on the amplitude and the exact frequency in a way that has been mapped experimentally and described by weakly nonlinear theory, with regions of planar motion, swirling, and irregular switching between them. A walk is not a steady shake, and whether the swirling regime is reached in a carried mug, how quickly, and how much it adds to spilling, is not settled by anything here. Nor is the role of the carrier’s own corrections, which act on the timescale of the slosh and could damp it or drive it.

The coffee in a cylindrical mug has one slow mode that carries 84% of any sideways shake, with ω12=(1.841 g/R)tanh⁡(1.841 H/R)\omega_1^2 = (1.841\,g/R)\tanh(1.841\,H/R): 3.38 Hz in a mug 8 cm across whatever the liquid, almost exactly twice an ordinary walking pace, so that a walk at 1.69 steps a second drives it at resonance and, with a damping ratio near 0.01, overtops a one-centimetre margin in about a second — while 10% off that pace the resonant swing stays under a centimetre, a 22 cm soup bowl resonates with the steps themselves, and filling the mug less helps only by adding freeboard, because depth does not move the note until the liquid is shallower than the cup is wide. The mug is a pendulum, and the walk is its drive.

Part 15 of 15

This essay is one argument about Resonance. The others:

The objects named here

The third axis, after the field and the reading path: the things themselves, and every essay that touches each one.

DetuningHarmonicNormal modeQuality factorResonanceSloshing