Every college freshman knows that hitting the mouth of a beer bottle will cause suds to erupt out of it, and now researchers say they have identified the mechanics behind the common party prank. 

Scientists from Carlos III University in Madrid, Spain and Universite Pierre et Marie Curie, Institut Jean le Rond d'Alembert, France say the secret has to do with a phenomenon called cavitation, or the creation of gas bubbles in a flowing liquid.

Back and forth movements of compression and expansion waves are formed after a sudden impact against a bottle's mouth that cause the bubbles to appear and dissolve. Upon further investigation, the researchers found that the cavitation-induced collapse of larger "mother" bubbles led to the creation of clouds of much smaller carbonic gas "daughter bubbles." These second-generation bubbles expanded much faster than their predecessors, giving the foam its bouyancy.

"Buoyancy leads to the formation of plumes full of bubbles, whose shape resembles very much the mushrooms seen after powerful explosions," Javier Rodriguez-Rodriguez, the lead researcher from Carlos III University, explained in a statement "And here is what really makes the formation of foam so explosive: the larger the bubbles get, the faster they rise, and the other way around."

This process, he said, is due to fast moving bubbles' ability to entrain more carbonic gas.

Believed to be the first quantitative analysis of its kind, the research could have implications far beyond the college town bar. Other engineering systems and serious natural phenomena such as the sudden release of dissolved carbon dioxide in the Lake Nyos tragedy could both benefit from the study's findings.

In the case of the 1986 Lake Nyos disaster, some 1,700 people died when an unknown trigger caused the Cameroon lake to emit a suffocating cloud of carbon dioxide.

The scientists presented the study at the annual meeting of the American Physical Society Division of Fluid Dynamics.