Around 60 million coffee machines are sold each year. A coffee machine is great for creating a quick drink with a fairly consistent taste, meaning the coffee produced should taste the same each time. And yet, two espressos, despite being made with the same ingredients and by the same machine, can taste different.
There’s many factors which can influence the variation in a coffee’s flavour: water quality, ratio of coffee to water, temperature. This study focused on the extent to which coffee beans were ground and how this impacted the flavour, and how what implications this would have on industry.

The use of mathematical models
Mathematical models are used all the time by engineers, mathematicians and scientists in particular. The can be used for a multitude of things, including predicting herd growth with increased feed, or estimating power generation by a wind turbine. So there’s no doubt they’re useful things.

How is an espresso made? Hot water under high pressure is forced through finely ground compacted coffee. The coffee is compacted using a tamper in a process aptly named “tampering” which promotes an even penetration or flow of the water through the grounds. A “grind setting” can be altered to vary the size of the coffee particles through which water flows through.
A mathematical model can be made which involves aspects of both fluid and solid mechanics to represent water poured through a bed of coffee grains to produce coffee.
So now I present this question: if you want a stronger cup of coffee, should you grind the coffee beans more or less?

Common sense would say more. The finer the grains are made, the larger their surface area of the coffee exposed to water so the stronger the final product. But the model actually predict a courser grind because when the coffee was ground too fine, the particles tended to clog up the portafilter (the spoon-shaped coffee holder) and prevent water flowing through.
The more of the bed of coffee that becomes clogged, the less efficient the machine as more coffee is wasted and doesn’t end up in the final product
“They have found, that fewer coffee beans, ground more coarsely, are the key to a drink that is cheaper to make, more consistent from shot to shot, and just as strong.”

Figure 1.
The image to the left compares two sizes of coffee particles, dubbed “fines” and “boulders” and the pore space. The model looked at the coffee grain size in comparison to the coffee produced.
There is a whole host of equations used to create the model. I hesitate to put them here as I don’t have faith in my own abilities to properly understand and explain them, but they are readily available online. I’ve provided a link to the published paper below if, for some reason, you did want to take a look at the maths.

As shown in the graph above, there is a certain grind setting (of the EK 43 coffee grinder machine), around 1.7, which produces the maximum extraction yield even under a partially clogged flow.
Of course, there is still some truth in common sense. If the coffee particles are too small, your coffee will have a more bitter and harsh taste- this is called over-extraction. If the coffee particles are too large, your coffee will been too acidic. There is a careful balance here, and while maths is no doubt useful in cases such as these, there will perhaps always be an artistic element to finding that balance that cannot be modelled or predicted.
If you would like to read more in depth about the research, here’s a link to the published study in the journal “Matter”.
What’s the use of all this?
Optimising flavour from coffee beans means more efficient production and less coffee going to waste. The water footprint of coffee is reported to be around 140 litres per cup, where water footprint is the water used to produce the coffee + the water used to process the coffee. Looking at the info graphic below, you can see that coffee’s footprint is four times as big as tea’s. By reducing the amount of coffee grown, we can reduce its impact on our global water sources.
This study tested its prediction in a cafe in Oregan which produced around 27,850 espressos each year. Each espresso previously contained 20 grams of coffee costing $0.53. The study changed the production so that the coffee used was ground less, which resulted in a stronger product so 25% less coffee needed to be used, saving the cafe $0.13 per drink. This amounted to a saving of $3,620 over a year long period. Clearly, using this mathematical model to increase the efficiency of the cafe had a financial benefit as well.
Other work on coffee tastes
There’s many factors to a great cup of coffee. Using filtered water, for one, helps to combat that hard water taste due to its high concentrations of minerals such as calcium and magnesium. Calcium carbonate will mute acidity, and change the flavour.
Maintaining a good ratio of coffee to water ensures a better product. The Speciality Coffee Association suggests 60g of coffee to every litres of water. Apparently, a teaspoon contains around 6g of ground coffees (my preferred way of measuring coffee) so about 10 teaspoons per litre should you ever desire to drink a litre of coffee. I know I have.
And of course, using high quality ingredients will often lead to a high quality taste. More expensive coffee beans often mature longer, meaning they have more fats, carbohydrates, sugars and complex acids.
Thanks for reading! You can check out some of my other posts here:
- Norimaki Synthesizer Taste Display: a tasty sample of science
- Applying to Cambridge Natural Sciences, a guide
- Michael Crichton, an author to remember
- Taking Lego down to near absolute zero with the first Lego cryonaut
- The standardisation of espresso flavour using maths
References
- https://people.maths.bris.ac.uk/~madjl/course_text.pdf
- https://www.port.ac.uk/news-events-and-blogs/news/brewing-a-better-espresso-with-a-shot-of-maths
- https://en.wikipedia.org/wiki/Espresso#Brewing
- https://www.sciencefocus.com/science/how-to-make-the-perfect-cup-of-coffee/
- Cameron et al., Systematically Improving Espresso: Insights from Mathematical Modeling and Experiment,Matter (2019), https://doi.org/10.1016/j.matt.2019.12.019
