Growth. A bubble that has left its nucleation site grows by diffusion of dissolved CO₂ through its surface; for a thin diffusion layer dr/dt = K/r, so r² = r₀² + 2Kt. K scales with the CO₂ excess and rises with temperature through the diffusion coefficient D.
Rise. Newton's second law with added mass: (ρg + ½ρl)V dv/dt = (ρl − ρg)Vg − ½ρlCd(Re)πr²v². Drag uses the Schiller–Naumann law Cd = 24(1 + 0.15Re0.687)/Re. For Re ≪ 1 this gives Stokes' v = 2(ρl − ρg)g r²/(9μ); because r grows, the speed rises along the way, which is why bubble trains widen and speed up.
Loss of CO₂. Each bubble that bursts takes n = PV/(RT) moles of CO₂ with it; the "CO₂ lost" readout adds these up. The foam collar height balances inflow (bursting bubbles) against drainage with a time constant of a few seconds.
Honest simplifications. Surfactants make real bubbles behave closer to rigid spheres than the clean-interface law used here; bubble–bubble wake interaction and the induced convection in the liquid are not modelled; the foam is a visual collar, not a bubble-by-bubble foam. Bubble radii on screen are optionally exaggerated for visibility.
What to try. Warm the glass to 20 °C (faster diffusion, bigger bubbles at the surface); raise the chains to 40 and watch the CO₂ loss; clink the glass for a burst of extra nucleation.