At a recent math conference, Rouslan Krechetnikov watched his colleagues gingerly carry cups of coffee. Why, he wondered, did the coffee sometimes spill and sometimes not? A research project was born.

Although the problem of why coffee spills might seem trivial, it actually brings together a variety of fundamental scientific issues. These include fluid mechanics, the stability of fluid surfaces, interactions between fluids and structures, and the complex biology of walking, explains Krechetnikov, a fluid dynamicist at the University of California, Santa Barbara.

In experiments, he and a graduate student monitored high-speed video of the complex motions of coffee-filled cups people carried, investigating the effects of walking speed and variability among those individuals. Using a frame-by-frame analysis, the researchers found that after people reached their desired walking speed, motions of the cup consisted of large, regular oscillations caused by walking, as well as smaller, irregular and more frequent motions caused by fluctuations from stride to stride, and environmental factors such as uneven floors and distractions.

Coffee spilling depends in large part on the natural oscillation frequency of the beverage—that is, the rate at which it prefers to oscillate, much as every pendulum swings at a precise frequency given its length and the gravitational pull it experiences. When the frequency of the large, regular motions that a cuppa joe experiences is comparable to this natural oscillation frequency, a state of resonance develops: the oscillations reinforce one another, much as pushing on a playground swing at the right point makes it go higher and higher, and the chances of coffee sloshing its way over the edge rise. The small, irregular movements a cup sees can also amplify liquid motion and thus spilling. These findings were to be detailed at a November meeting of the American Physical Society in Baltimore.

Once the key relations between coffee motion and human behavior are understood, it might be possible to develop strategies to control spilling, “such as using a flexible container to act as a sloshing absorber,” Krechetnikov says. A series of rings arranged up and down the inner wall of a container might also impede the liquid oscillations.