Ever open up a beer bottle only to have your friend tap the bottle’s mouth? Disaster ensues and the beer you planned on drinking ends up on the floor. While it seems like magic, there is a scientific explanation for such a trick.

Beer Tapping
Researchers have explained the physics behind the beer tapping prank. A compression wave starts at the bottom of the beer bottle leading to the foam overflow. avier Rodriguez-Rodriguez et al.

The beer tapping trick is broken down by researchers from Carlos III University in Spain and University Pierre et Marie Marie Curie, Institut Jean le Rond d’Alembert, in France. The research, presented at the American Physical Society’s 66th Annual Division of Fluid Dynamics Meeting, was titled “Why does a beer bottle foam up after a sudden impact on its mouth?”

For the researchers it’s all about cavitation, the formation of bubbles after an impact. In this case, larger bubbles form in beer after a sudden impact, such as the bottom of a friend’s bottle with the mouth of the bottle you are holding, and soon break up. The breaking-up process is due to “back and forth movement of compression and expansion wave,” which cause the bubbles to form and then collapse. The wave starts at the bottom of the bottle and works its way to the top.

The overflow is caused by larger bubbles, dubbed “mother” bubbles, collapsing to form smaller “daughter” bubbles. These daughter bubbles expand at a much faster rate than mother bubbles, which causes the foam to rise past the point of no return, to the chagrin of the victim but to the delight of the prankster. The smaller bubbles are more carbonic, drawing in more carbon dioxide that’s already present in the beer.

Lead researcher Javier Rodriguez-Rodriguez, from Carlos III University, said in a statement, “Buoyancy leads to the formation of plumes full of bubbles, whose shape resembles very much the mushrooms seen after powerful explosions.” The researchers note that the findings could help explain other engineering problems and natural disasters, like one that occurred in 1986 at Lake Nyos in Cameroon.

Lake Nyos is an exploding lake, due to volcanic activity under it that produces a carbon dioxide leak. The CO2 dissolves in water to become carbonic acid. A huge output of CO2 gas in 1986 led to the suffocation deaths of village residents and animals, with the estimated human death toll at 1,700. Scientists are currently investigating ways to degas Lake Nyos to prevent another disaster.