A head of beer, soda, foam in a glass forms and collapses at different rates...

Pour a bottle of beer in a glass, or any carbonated drink over ice in a glass.* The foam rises. You hope it stops foaming and/or collapses before it spills over.

Foam bubbles up at some rate. What is it?–though I presume it depends on liquid and surface exposure of ice. Ice==nucleation sites? Similarly for nucleation, everyone knows about the angle of the pour and the amount of glass the beer comes in contact with. Does temperature matter? Why does that foam foam?

Foam collapses at some rate. What is it? “Strength” and number of bubbles, determined as above? And gravity, of course. Pouring beers on the Moon must be more perilous.

So somewhere there should be a formula to figure out the maximum amount that can be poured in the quickest time without foam-over, for example.
*I write this query after having just performed the first.
**I can think of other fun applications, but I’ll hold off until I’ve had more beer.

That new invention that fills cups from the bottom up, four at a time.

Entire books have been written (mostly by Dr. Charles Bamforth) on beer foam. I recently attended a ~3 hour presentation on foam he gave to the American Chemical Society

Foam stability in beer is dependent on a number of factors, most notably the vigor of the pour, the hoppiness of the beer (more hops, more stable foam) and the malts used.

In fact, foam per se is an important “thing” in industrial technology, quite aside from its applications to libation technology.

That puffy plastic (commonly but wrongly called “styrofoam”) they make cheap cups and packing material from? That’s a foam. Real bona-fide styrofoam? That’s a foam.

Here’s an article about a graphite-based foam, used as a heat transfer agent in ocean thermal energy conversion (OTEC).

Foams, made of many different materials, have many important industrial applications, and there is a whole science about them.

(I happen to know about this OTEC application from a freshman-level oceanography class term paper I did circa 25 years ago.)