Skip to main content

Professor William Lee from the University of Huddersfield talks about his mathematical research into the science of brewing coffee.

On average every person in the UK drinks two cups of coffee a day. I contribute to that statistic by relying on several cups of coffee first thing in the morning to help me wake up. (I am not at my brightest in the morning.) Just after lunch I usually need another cup of coffee prepared by the cheerful staff at one of the University of Huddersfield’s many coffee outlets.

The human race has known about coffee for over a millennium. Legend has it that coffee was discovered by an Ethiopian goatherd called Kaldi, who was intrigued by the invigorating properties of a shrub whose cherries were popular with his goats. Coffee permeated the Islamic world via Kaldi and his goats, and then, as with algebra and the Hindu-Arabic numbers, made its way to Europe. Mathematician Alfréd Rényi even coined an informal definition of a mathematician: “a machine for turning coffee into theorems”.

You would think that we already knew everything there was to know about making coffee, but in fact the roasting and brewing of coffee is still an active area of research.  I work with mathematical colleagues from Portsmouth and Limerick on developing mathematical models for brewing coffee, collaborating with chemists and baristas. Our aim is to guide the world to better quality coffee, produced more cheaply and with less environmental cost. Also, brewing coffee is mathematically similar to a number of related processes found in carbon capture and storage, lithium ion batteries, and pharmaceutical tablet dissolution so we hope that insights gained from modelling coffee may have applications in other areas.

Why is brewing coffee so complicated that you need mathematics to investigate it? Coffee is complex on many levels. Chemically it is a mixture of nearly 2,000 chemicals, a similar level of chemical complexity to that found in wine. A ground coffee bed is also affected by several different physical features – firstly there is the shape of the coffee bed, for instance cylindrical or conical is important. Then there is the size and spatial distribution of the grains within the bed, these control how fast water flows through the bed and the area available for extraction of coffee. Finally, the individual grains are themselves porous: water has to infiltrate the grains and dissolve their soluble content before extraction can begin.

A recent study we carried out on the effects of grind size on coffee extraction brought home to us how much we don’t understand about coffee brewing, and how much potential there is for mathematics to improve the taste and reduce economic and environmental costs of this industry. We developed mathematical models to describe espresso coffee extraction from coffee beds made with different size settings on a commercial grinder and compared them with an experiment. For each grind setting the same amount of coffee and the same amount of water was used. How would you expect the amount of coffee extracted from the coffee bed to change as we grind the coffee more finely?

We thought that finer grinding would lead to increased extraction of the coffee.  This is caused by a “triple whammy” of factors including (1) increasing the flow resistance of the bed so water spends more time in contact with coffee, (2) a higher surface area for exchange between the grains and the water, (3) shorter distances for coffee to travel to get out of the grains.

What was surprising was that the real-life experiment didn’t agree with our model. The increasing extraction with decreasing grind size trend was followed up to a point and then reversed. This, of course, wasn’t a setback: it was a chance to learn something new.

After a week or so of confusion we realised that the result could be explained if the water was only reaching part of the coffee bed. When we adjusted our models to only allow the water access to a fraction of available coffee we were able to reproduce the experimental data.  Our next mathematical step is to investigate potential mechanisms to explain this. However, we already have enough information to potentially have a significant impact on the coffee industry.

Figure 1: The orange line shows how the extraction yield initially increases as the grind setting is increased.  This is assuming a partially clogged flow.

Conventional barista wisdom agrees with the original model: grind smaller for stronger coffee. Our results say you may need to grind coarser for stronger coffee. Or grind coarser and you can use less coffee. Making a small saving of even 1% of the coffee required for a shot of espresso could be an enormous economic boost to the coffee industry. A small pilot study at a coffee shop involved in this research suggests that much greater savings are possible. More importantly it would avoid the environmental costs of gathering, roasting, transporting, grinding and then disposing of thousands of tonnes of coffee every year.

I’m writing this while sipping my morning coffee. Wouldn’t it be great if mathematics could help us enjoy better coffee while reducing the economic and environmental costs?


Image Credits

Featured Image by Pexels from Pixabay
Coffee plant by Rodrigo Flores on Unsplash
Coffee Machine by Clau M from Pixabay