(Wikipedia/Spiff) Tiny Coca-Cola bubbles.
Whirlpools in a Soda Pop
Delicious Reddit

FEBRUARY 06, 2009
April Holladay, HappyNews Columnist

Q: Everyone knows that a shaken soda bottle will spray soda when opened, but exactly why does shaking the bottle cause carbonated beverages to spew violently?
Lanney, Albuquerque, New Mexico, USA
A: Researching the Internet for the answer led nowhere.
"I can almost guarantee you," emails physicist Craig Bohren, professor emeritus at Penn State University, "that you will not find a correct explanation of why a shaken bottle of soda erupts when the cap is removed."
But the answer is straightforward. The puzzle has six pieces. We shall fit them together into an answer.
1. How gas gets into the soda. Consider the pop bottle before shaking it. Carbonated soda is essentially water containing dissolved carbon dioxide gas. During processing, the bottlers
- added carbon dioxide to the soda,
- pressurized the bottle to two atmospheres (double the outside air pressure),
- filled the bottle with the carbonated soda and
- capped the bottle.
Thus, the pressure throughout the bottle is twice the pressure of the outside air, and, therefore, the pressure of the gaseous carbon dioxide in the neck of the capped bottle is at two atmospheres, too. This process resulted in a two-bottle volume of gaseous carbon dioxide in the bottle. (More about this volume later.)
Gas molecules in the neck bop around at high speeds (over 1000 mph or 1600 km/hr). Some hit the liquid below and enter the soda. Other gas molecules dissolved in the soda escape into the neck region.
2. The concept of equilibrium. Gradually the rate at which gas molecules leave the neck and enter the soda equals the rate they leave the soda for the neck, and the soda is in equilibrium. The bottle achieved an equilibrium state after bottling and later on the shelf.
3. How much carbon dioxide gas is in the bottle (Henry's Law). The bottle temperature is constant; the gas is in equilibrium and the bottle contains a given gas-soda combination — namely the bottled soda. So we can apply Henry's Law, which says in this case, the amount (concentration) of dissolved gas in the soda is proportional to the pressure of the gas in the bottle's neck above the soda. Since the neck gas pressure is double the atmospheric pressure, the bottle contains double the concentration of carbon dioxide gas as it would at one atmosphere — that is, two bottles of carbon dioxide gas. Qualification.
4. Why the capped, quiescent bottle has no bubbles. The bottle has been sitting on the shelf for some time. We look at it and see no bubbles, because bubbles can only exist if their pressure is at least as great as the surrounding liquid. It takes work to make a bubble. But, since the bottle is in a state of relative rest, the pressure is the same (the bottling pressure of two atmospheres) all over, so no bubbles can form.
5. How bubbles form when you shake the bottle. You might think the pressure inside the bottle increases when shaken, but it does not.
"By shaking the bottle (capped), I could not increase the pressure above the pressure at which the soda was carbonated (about two atmospheres)," Bohren emails.
Something else causes the eruption of foam. What? Find out by a simple experiment. Stir a glass of soda with a spoon, and create a small whirlpool. Look! There's a string of bubbles in the vortex. That's the mechanism. The pressure of a simple vortex decreases toward the center. Bubbles form in the lower pressure.
6. Why soda explodes out. Back to our capped bottle. Shake it. The shaking creates little whirlpools in the bottle. The pressure towards the center of the soda whirlpools is smaller than the surrounding soda pressure, so bubbles can develop and, when the pressure drops upon uncapping, bubbles will preferentially form in the whirlpool eddies.
The surface tension, however, of a developing small bubble threatens to collapse the bubble before it can begin, unless the pressure inside the liquid surrounding the bubble is much lower than the pressure inside the bubble. And the capped bottle is still at essentially two atmospheres of pressure all over.
But there is still a way for a bubble to start — as a microscopic bubble in the pits and cracks of tiny particles that float in the soda. A bubble simply begins as a crack. The 'crack' bubble already has surface areas that separate the bubble gas from the liquid soda. The surface-area work is done. Lots of minuscule bubbles develop in this way.
Take the cap off, and the bottle pressure drops to one atmosphere. The bottle still contains whirlpools from the shaking. The pressure inside the whirlpool microscopic bubbles is roughly twice the surrounding liquid's pressure (because the bottler pumped the carbon dioxide gas into the soda at two atmospheres of pressure). The tiny bubbles, therefore, explode in size.
The potential two-bottle volume of carbon dioxide gas that was dissolved in the liquid under two atmospheres of bottling pressure is now at only half bottling pressure. The two-bottle gas volume abruptly comes out of solution.
Soda spews!
Note that swirling whirlpool eddies are essential for getting soda to spew. "If you shake the soda violently, then let it sit for a while, removing the cap does not result in an explosion of foam," says Bohren.
I am indebted to Craig Bohren for this answer.
Further Reading:
Why little bubbles form along the bottom and the sides of a cup containing carbonated drinks, WonderQuest
Clouds in a Glass of Beer by Craig F. Bohren, New York: John Wiley & Sons, Inc., 1987.
(Answered Feb. 9, 2009)