Saturday, January 10, 2009

The science of espresso, with a dash of geology


Almost every morning, I start the day with an experiment on flow in porous media. First, I generate some fine-grained sediment with a well-defined average grain size and proper sorting; then I use that sediment to fill a little basin of sort and try to mimic compaction. Finally, I use a machine to put water under pressure and force it to flow through this miniature sedimentary basin. Then I sit down to drink the fluid which is not simple water anymore, due to its interaction with the grains; and its taste and consistency tell me whether I got the grain size and the porosity right.

That's a geologist's view of making espresso. Unless you have a fully automated and ultra-expensive espresso machine, creating a high-quality caffeine concoction is not trivial, because the water must have the right temperature and has to spend the right amount of time in contact with the coffee grains that have the right size. The right temperature is 85–95 °C (185–203 °F), and, at least with our simple machine, the trick is to start the brewing at the right time. Better espresso machines do not use steam to generate pressure because that makes the water too hot; instead, they have a motor-driven pump that generates the ~9 bars of pressure. The correct grain size is easily achieved with a burr grinder (as opposed to a simple blender); a good espresso grind is a fine grind, because the water spends relatively little time in contact with the grains.

The duration of this contact is the most difficult bit to get right. To get a good shot with lots of crema, it cannot be less or more than 20 to 30 seconds. Not just grain size, but grain sorting as well play a role. If the coffee grinder produces a poorly sorted 'sediment' (and that's what a blender does), the coffee will not be porous and permeable enough. Another factor is how well the sediment is compacted; that is, how much pressure do you apply to the coffee during tamping. This affects permeability again. Finally, it matters how much coffee you put in the coffee holder; the thicker the layer that the water has to go through, the longer the trip becomes for the same amount of water.

After using the machine hundreds of times, I still manage from time to time to produce something undrinkable. The art and science of espresso making started to make more sense once I started to think of it in terms of Darcy's Law.

Henry Darcy was a French engineer who initially had made a name for himself by designing an enclosed and gravity-driven water-supply system for the town of Dijon. Later he had time and opportunity to do experiments of his own interest. In 1855 he measured the discharge of water under variable hydraulic heads through sand columns of different heights, and found that the discharge was directly proportional with the hydraulic head and inversely related to the height of the sand column:

Q = AK(H1-H2)/L,

where A is the cross sectional area of the sand column, L is the height of the sand column, K is the hydraulic conductivity (which is constant for the same granular material and same fluid), and H1-H2 is the hydraulic head. This is Darcy's drawing of his experimental setup:



The hydraulic conductivity depends on both the properties of the fluids and of the granular material; these properties are the viscosity and density of the fluid, and the permeability of the sediment:

K = kρg/μ,

where K = hydraulic conductivity, k = permeability, ρ = fluid density, and μ is the dynamic viscosity.

In coffee speak, the hydraulic head is given by the pressure generated by the machine, and is fixed; one cannot change the density and viscosity of water either. The most important variable is coffee permeability, which is influenced by size, sorting, and packing (compaction) of the coffee grains. Also, it helps if you get the value of L right, that is, you shouldn't try to save coffee.

Darcy's Law was established with some simple experiments, and it has since then been generalized and derived from the Navier-Stokes equations, but it has a huge range of applicability, from ground-water hydrology to soil physics and petroleum engineering.

Add to that list everyday espresso making.

ps. Fantastic resource on Darcy's work and his law here.

5 comments:

Silver Fox said...

That's a great post. I'm going to have to think about an espresso machine!

Anonymous said...

A post with sedimentology AND coffee automatically becomes one of my favorites!

Zoltan says: "The most important variable is coffee permeability, which is influenced by size, sorting, and packing (compaction) of the coffee grains."

Perhaps one could systematically test the different types of coffee to evaluate variability as a function of coffee grain shape and its impact on sorting? Or, are all the grain shapes the same regardless of coffee type since you grind them yourself?

Anonymous said...

Very nice! I always like it when there are everyday analogs to geological (or other scientific) laws.

As me flat mate is an avid espresso maker and drinker, with his own mill, I should perhaps take some coffee grains and sieve them for their size distribution…

I think you shouldn't dismiss viscosity so easily (“one cannot change the density and viscosity of water”) . Between 85 and 95 °C it changes by roughly 10%. Probably not so important for the coffee example, but not completly neglible. On the other hand, k values vary more widely, shadowing viscosity and density effects.

Unknown said...

Brian, I think one could do relatively easily an experiment to see how different coffee grain sizes affect the discharge (and coffee taste... I can predict that it's going to be really bad as soon as you use coffee that is just a bit coarser than necessary). You would have to make sure that the same amount of pressure has been applied during tamping. With regards to different types of coffee -- I am not sure, but I think that you tend to get similar grain sizes and shapes if you use a burr grinder, regardless of coffee type. But haven't tested that...

Effjot - yepp, I oversimplified when I wrote that "one cannot change the density and viscosity of water". One could some experiments to see how the discharge varies with increasing water temperature... Especially if you have a machine with a good control of temperature.

Anonymous said...

As a geologist myself, I appreciate this perspective on espresso. Although not something most people would do at home, roasting also is a key aspect, and maybe the writer could say something about how low temperature, slow oxidation reactions alter the materials present in the raw beans, and how the bean also is physically modified, thus changing the way it crushes and fractures during grinding. Roasting rate also is probably important--though I have not done my research on this; you would think that the extent of oxidation as a function of depth within each bean and that is going to be controlled by the period of roasting, the temperature, and supply of oxygen, as well as by the extent to which beans are turned and roasted homogeneously, or instead burned heterogeneously. As a working hypothesis, I'd say that roasting has to be as key as the grinding and leaching processes. And I am sure that coffee growers will have something to say about the environment of growing, flowering, fruiting, and ripening conditions, as well as how the beans are picked and stored until roasting. Fortunately for me, the very best coffee is produced in my daughter's coffee shop, Caffe Adagio, in Bellingham, Washington; the beans are roasted by Cafe d'Arte in Seattle. And the roaster obviously knows how to roast and they presumably know how to get good beans from the best growers. So experts all along the way make my favorite coffee, which I typically sip with a copy of the New York Times; the coffee helps me come to grips with this bad, bad and still wonderful world. Alas, my present cup of coffee in Tucson was brewed by me; either I need more geology of coffee lessons, or I need to make my way back to Bellingham.

 
Copyright 2009 Hindered Settling. Powered by Blogger Blogger Templates create by Deluxe Templates. Sponsored by: Website Templates | Premium Themes. Distributed by: blog template