A few days ago I got stuck on what I thought was a simple question. When you pull a shot of espresso, the hot water comes out of a metal plate full of small holes, the shower screen, and lands on the coffee as a gentle, even rain. How does water get through holes that small so neatly? I had a picture in my head for this: a bathroom shower, water sitting up top, gravity doing the work, the holes letting it dribble through. Both halves of that picture were wrong, and the real answer is a lot more interesting.

Start with gravity, because it barely shows up. The pump in the machine pushes water at about 9 bar, roughly nine times the pressure of the air around us. The water sitting above the screen is maybe a centimetre deep, and a centimetre of water presses down with about a thousandth of a bar. So the pump pushes something like nine thousand times harder than gravity does. The water is not falling through those holes. It is being shoved through them.

Then there is the route it takes. Water leaves the boiler through one pipe and enters the group head, the heavy round block the portafilter locks into. Inside, it hits a dispersion block that splits the single stream into a few jets, and those jets spray into a thin, sealed gap just above the shower screen. What I had not appreciated is that this gap fills up first. Once it is full, the water inside is trapped between the pump on one side and the coffee on the other, and trapped water behaves in a very particular way. Blaise Pascal worked it out in the 1600s: press on a liquid that has nowhere to go, and the pressure spreads equally to every surface it touches. Every hole in the screen gets the same push at the same moment, whether it sits right under a jet or out at the rim. As a lawyer, I have a soft spot for a rule that treats everyone in the room the same.

That is also why the holes are small. A plate with a few big holes would let water run straight out of whichever holes happen to sit under the jets, before the gap ever filled, and you would get a soaked patch in the middle of the coffee and dry edges around it. Small holes hold the water back just long enough for it to well up and spread across the whole face first. A common shower screen is a plate with around a hundred holes of about 3 mm, backed by a fine steel mesh whose openings are a fraction of a millimetre. So the truly tiny holes are in that mesh, not in the plate you can see when you look up into the machine.

Once the shot is running, the water passing through the screen is in no hurry at all. A shot flows at roughly one and a half millilitres a second. Spread over a hundred holes of 3 mm, that is about two millimetres a second through each one, which is the pace of a reasonably motivated snail. The dashes in the figure below move faster than that, for your benefit.

If the screen isn’t slowing things down, the coffee is. Ground fine and tamped hard, the puck is dense enough that almost all of the 9 bar gets used up forcing water through it, and that resistance is what keeps the flow down to a trickle. Run the same machine with an empty basket and it simply gushes. Below the puck, the coffee leaves through the basket. A precision 58 mm basket has around 640 holes of 0.3 mm, and at a shot’s pace each one lets out about three centimetres a second, which is why espresso arrives as a slow, syrupy ribbon instead of a jet.

The figure below has the whole thing running. The group head is pulled apart on two posts so you can see between the layers; in a real machine they are clamped tight together. Move your pointer from left to right to raise the pump pressure, or use the arrow keys. Leave it alone and it pulls a shot by itself: five seconds at 3 bar to soak the coffee, then about twenty at 9.

Full-page version here.

The gauge, the water, the level in the cup and the readout in the corner all move off the same handful of numbers: 9 bar at the pump, one and a half millilitres a second through the puck, 640 holes in the basket. It was built with Anatomy, an open source kit that draws a machine as a real object and then checks its own drawing.

What stays with me is how wrong my picture was, and how sensible the right one is. I imagined water drifting down through a sieve. What happens is a pump building pressure in a sealed space, a plate that makes the water wait until it has reached every corner, and a bed of coffee doing the hard work of slowing it down. The holes are small to make the water wait its turn. The next time I stand there watching thirty seconds of espresso trickle into a cup, I will at least know the machine is being fair about it.