Sloppy, muddy puddles created by summer rainstorms owe their boundaries to the dips in pavement or ground. But if a glass of wine spills on a (hypothetically) perfectly flat countertop, what keeps the puddle from spreading out forever? Until now, physicists’ description of fluid flows couldn’t really account for why puddles stop.

Researchers from the the Massachusetts Institute of Technology have the answer, reports Charles Q. Choi for Inside Science.

Using the classic model, physicists would describe liquid spreading as the result of a “competition between gravity and surface tension,” Choi writes. Gravity pulls liquid down and spreads the puddle, while surface tension, where the molecules hang tightly to each other, makes droplets bead up.

But whereas the classic model can be used to explain the final shape of a puddle, it doesn’t explain how the puddle started spreading in the first place. The calculations instead imply that the forces at the puddle’s edge would be too strong to allow spreading at all. “Within a macroscopic view of this problem, there’s nothing that stops the puddle from spreading. There’s something missing here,” explains Amir Pahlavan, a graduate student at MIT in a press release.

Clearly, puddles do spread, so physicists tweak their model to explain why. Michael Schirber writes for APS Physics:

One popular solution is to assume that a thin microscopic film coats the surface ahead of the puddle. Such precursor films have been observed for puddles that expand out completely to a thin flat sheet — the so-called “complete wetting” case — but they can’t explain puddles that spread a short distance and then stop (partial wetting).

Now, Pahlavan and his colleagues have figured out what stops the puddle — forces acting at the nanoscale. The researchers considered a film of liquid less than 100 nanometers thick, where something called the van der Waals force starts acting. This interaction describes a phenomenon where the cloud of electrons buzzing around an atom randomly fluctuates and their charge tends to pile up in one area of a molecule, creating slightly positive and slightly negative areas. Neighboring molecules do the same, with the result that molecules are either attracted or repulsed by each other.

These forces, acting within the liquid, the air around the puddle and the surface the puddle sits upon are enough to keep the puddle from spreading, regardless of its size. The researchers published their results in the journal Physical Review Letters.

Their model could have applications for a number of things, from how to cool electronics by flowing liquid over them to sequestering carbon dioxide underground (some plans include injecting a carbon-dioxide-laden liquid into porous rock). But for those applications, the researchers will need to expand the model to explain how liquids flow over rough surfaces. “A real surface is never completely flat and smooth,” Pahlavan tells Choi for Inside Science. “[T]here’s always some roughness to take into account, which causes many new features to arise.”