Beer, sparkling wine, a Coke, and other fizzy drinks are liquids which are supersaturated with gas.
Although thermodynamics favours the gas bubbling out of the dissolved state, bubble formation is unlikely since bubbles must start small.
The pressure of these tiny bubbles can reach about 30 atmospheres in a bubble only 0.1 micrometres in diameter. Because the solubility of gases increases with increasing pressure (Henry’s law), the gas is forced back into solution as quickly as it comes out.
Bubbles can form around dust particles, surface irregularities and scratches.
These nucleation sites are hydrophobic and allow gas pockets to grow without first forming tiny bubbles. Once the gas pocket reaches a critical size, it bulges out and rounds up into a properly convex bubble whose radius of curvature is sufficiently large to prevent self-collapse.
In addition, there is a cascade effect. If the quantity of bubbles reaches a certain critical number per unit volume, this in itself constitutes a physical disturbance and results in the release of yet more bubbles.
Nucleation may be precipitated by a variety of imperfections.
Minute crystals of salts, such as calcium sulphate, may remain if the glass has been left to dry by evaporation after being washed in hard water.
Tiny cotton fibers may be left behind if the glass has been dried with a tea cloth. Dust particles may have settled on the glass if it has been left standing upright for any length of time.
And tiny scratches will be present on the inside surface of all but brand-new glasses.
Once the inside of the glass is wet, any salt crystals will have dissolved and any cotton fibers will no longer function as centres of nucleation.
Most of the dust particles and all of the scratches will, of course, still be there.
However, these will have been coated with liquid and the fresh carbonated liquid can only reach them very slowly, by diffusion. Bubbles will still be produced, but at a rate that is too slow for the cascade effect to come into play. As a result, the drink will not froth over.
To demonstrate the above, take a glass and thoroughly coat the inside with an oil, which is a more efficient surface covering agent than water. Then add a less expensive carbonated drink such as lemonade. The effervescence will be nil or minimal.
Add a few million centres of nucleation from a large spoonful of granulated sugar and the effervescence will be volcanic.
Thanks to modern production techniques, today’s glasses are of such good quality that some manufacturers build in deliberate imperfections, especially in beer glasses, in order to generate enough bubbles to maintain the head on the top of your tipple.