How the foam on your beer keeps it from spilling
New study explains how a beer's foamy top clings to the glass, stopping the slosh

Have froth? Won't slosh.
A new study in the Physics of Fluids journal has explained how a beer's foamy top can reduce the chance of spillage.
Why is beer less prone to spilling than other beverages?

The foam dampens the sloshing around of a liquid. We've known this intuitively and scientifically for a while, but what was never understood was exactly what forces are at play that allow the frothy top to help control spillage. The new study, a collaboration between the Massachusetts Institute of Technology and École Polytechnique Fédérale de Lausanne in Switzerland, finally gives us a definitive answer.
How does foam stop spills?
It all comes down to capillary forces. Capillary action is the force that acts on a liquid when it clings to a surface — the reason why pen ink crawls up the shaft or how plants wick up water up to the highest branches through their water vessels.
When it comes to beer, the foam on top adheres to the sides of the cup and it doesn't allow the brew to travel as far up the container as compared with a froth-free beverage. It's the surface tension of the many tiny bubbles on top that cling to the glass, and even though these forces are small, they still provide a buffer to movement.

Researchers also found that the foam doesn't have to be thick — even foam only five bubbles thick will have a measurable effect. And the thicker the foam the better at preventing spillage, so Guinness could often be the least spillable beer at the counter.
How was this measured? Did a bunch of physicists at a bar slosh their glasses back and forth?
It was a bit more scientific than that I'm afraid. They didn't use beer, or even coffee for that matter — they used soapy liquid in water. They also controlled the average diameter of the bubbles by squeezing soapy water through a grid with specific pore sizes.
They then tilted the container that had the water and foam and took high-speed photographic images of it. They watched as the wave slowly died down as it rocked back and forth in the canister. In comparing to water alone, the frothy water wave died down much faster than expected.
Before this study, physicists surmised that the wave of sloshing beer would get smaller and smaller, but never actually disappear — even though anyone who has been jostled while holding a liquid can attest that the waves most certainly disappear eventually.
So, this research overturned the scientific theory that popular wisdom already implicitly knew. And it turns out, the masses were right! Beer does spill less than cider or tea or coffee or anything without a foam.
Do these findings apply to anything beyond beer and coffee?
As fascinating as it is to understand the physics of beer, there's a lot more to it than that — this research could transform how we transport large amount of liquids.

There's also an application to rocket science. Rockets have been the victim of something called pogo-oscillation, where the fuel moves up and down in a wave-like fashion and can actually cause the entire rocket to move up and down like a pogo stick. This phenomenon has been less of an issue as rocket designs have been modernized, but it's something that is a constant threat. Applying a foam may ensure it never happens again.
So there you have it — safer rockets and spill-free beer. Bottoms up!