Few of us have not paused at one time or another to marvel at the beauty of a soap bubble. The iridescent, evanescent orbs, which can persist for minutes before vanishing in an instant, have captivated bubble-blowing children and pensive bathtub recliners alike.

They have also caught the eye of physicists and mathematicians, who have strived for hundreds of years to understand and predict the properties of bubbles at a fundamental level. Clusters of multiple bubbles carry a particular mathematical allure: they obey a series of geometric rules (such as bubble surfaces always meeting at certain angles), and behave as a kind of rudimentary computer, constantly shifting and rearranging to solve an optimization problem—how to limit the surface area of the bubbles.

The serious study of bubbles stretches back at least to 19th-century Belgian physicist Joseph Plateau, for whom the junctions between bubble membranes (Plateau borders) are known, and includes more recent contributions from researchers such as Kenneth Brakke of Susquehanna University, a mathematician whose Surface Evolver software computes the geometry of liquid surfaces.

Now a new computer model that describes the behavior of ensembles of bubbles—better known as foams—may give researchers a better handle on bubble physics, which could in turn lead to better fire retardants, bicycle helmets and other foam-based products.

The new model, devised by two mathematicians at the University of California, Berkeley, breaks down the evolution of a foam into three discrete stages: First the foam rearranges its macroscopic structure as surface tension and the flow of air push the bubbles around until the foam settles into a stable configuration. Then liquid drains from the thin membranes, known as lamellae, that encase the individual bubbles until one of those lamellae thins too much to support the bubble. Finally, in the third stage, the thinned lamella breaks and the bubble pops, knocking the entire foam out of equilibrium and starting the process over. The research appears in the May 10 issue of Science.

Each of the three stages of foam evolution plays out on its own scale of space and time. The microscopic thinning of a bubble’s lamellae, for example, takes place very slowly, sometimes over hundreds of seconds, explains study co-author James Sethian, professor of mathematics at Berkeley. Then the rupture of those lamellae “happens at hundreds of meters per second,” he adds. One of the hurdles in simulating the dynamics of a foam is capturing the requisite detail of the small-scale processes without bogging down the simulation on less salient details.

The solution put forth by Sethian and his co-author Robert Saye treats each scale differently—in effect, zooming in on the small-scale processes when they occur and zooming back out during the slower, macroscopic processes. “You can deal with them separately and then couple them together,” says physicist Denis Weaire of Trinity College Dublin. The end results of each stage of the simulation feeds into the next stage in a feedback loop—the macroscopic motions of bubbles in a foam influence the microscopic draining of fluid from lamellae, which in turn triggers the rapid rupture of a thin lamella, thereby setting the bubbles in motion once more (see video below). But the simulation handles each of those processes in isolation. “They’ve made an attempt to do this in the paper,” Weaire says. “It’s way beyond anything we’ve attempted before.”

Relatively static foams, such as the bubbles in a head of beer—“foams that are just sitting there”—have been studied extensively, Weaire says. But there has been little progress on foams in flux, he notes, since he and a co-author published a book called The Physics of Foams more than a decade ago; a passage at the end of that book urged colleagues to advance the understanding of dynamic processes. “I wouldn’t say we’ve moved very far in that direction in 10 years,” Weaire says. But the new work, he adds, “is a step in that direction. It is a first step.” He notes that the new model has some limitations, such as dealing only with so-called dry foams—those with relatively low liquid contents.

Still, tools such as the one designed by Sethian and Saye might someday help industrial engineers tweak their products to make them stronger, lighter or springier. “Foams are enormously important in industry,” Weaire says, adding that the tools required to modify those industrial foams have been lacking. “If you want to redesign the whole thing,” he says, “they just don’t have design principles, they don’t have mathematical models to describe the things that they’re doing.”