A model for the perfect espresso coffee

Coffee is one of the most widely consumed drinks in the world. Several brewing methods can be used to prepare it depending on the consumer’s taste – or the lack of it – as well as cultural and geographical habits.

My father, for example, had a ritual every time he wanted a coffee. He took whole no-sugar-added roasted grains and grind them manually down to a precise size. The ground coffee, measured in spoonfuls, was introduced in the basket of a Moka pot which had its bottom chamber already filled with fresh water up to the safety valve. Once closed, the pot would go onto the small burner until all the boiling water went through the coffee to the collecting chamber at the top. The whole apartment would be filled with a delicious coffee aroma when the process was finished.

This way of preparing a proper coffee is very time consuming. So it is no surprise that other methods were developed, even though that meant less organoleptic quality. In many countries, drip brew is the traditionally consumed beverage, filter coffee. This method for brewing coffee involves pouring water over roasted and ground coffee contained on a filter (coffee bed). Water seeps through the coffee, absorbing its extractable fraction solely under gravity, and then passes through the bottom of the filter. The used coffee grounds are retained in the filter with the liquid falling (dripping) into a collecting vessel such as a carafe or pot.

In order to recover part of the original coffee organoleptic experience, espresso coffee in capsules is enjoying a big worldwide success, even though there is some fashion component in it – what else? This success is due to the fact that capsules, or portioned systems in general, make espresso preparation a no-brainer even at home.

Traditional espresso brewing requires specialized equipment, like Moka pots, that have to heat water to a temperature between 92 °C and 94 °C and pressurize it to 9 ± 2 bar. The process is applied (percolation time) until the beverage volume in the cup meets the consumer’s personal preference or the regional traditions (or both). For example, in Italy, the volume ranges from 20 mL or less (ristretto) to 50 mL or more (lungo), with a typical volume of 20–30 mL for a regular espresso shot.

The application of pressure makes espresso brewing more complex than drip brewing from a physicochemical point of view. In particular, during the passage of hot water through the coffee bed, the following chemical and physical phenomena can be described:

Firstly, we find an initial imbibition of the porous coffee matrix with the consequent irreversible progressive swelling of the coffee particles, what causes a progressive decrease in the porosity of the matrix and therefore an increase in hydraulic resistance. During this process, there is also a reversible migration of small coffee particles in the direction of the water flow.

At this point, the solubilization of the hydrophilic substances contained in the coffee bed results in a progressive increase of density and viscosity of the percolating fluid flow and the partial erosion of the coffee particles. This includes carbon dioxide (present in the coffee bed) solubilization in water at high pressure and temperature leading to supersaturation conditions in the final cup and resulting in the development of bubbles (have you ever wondered what espresso coffee foam or crema was?).

Then, coffee lipids are extracted thanks to the pressurized hot water and progressive emulsification of lipophilic substances due to the action of surfactants naturally occurring in roasted coffee, with a further progressive increase in viscosity of the percolating fluid.

The result of this whole set of phenomena is a polyphasic beverage constituted by a foam layer of small bubbles on top of an emulsion of microscopic oil droplets in an aqueous multicomponent solution with dispersed gas bubbles and solid particles. Could such a complexity be modeled? To make things even more difficult, from a coffee-cup-quality point of view, in addition to model the physics of the espresso extraction itself, it is necessary to take into the account the modeling of the mass transfer of the chemical compounds related to savor, both solubles and not-solubles, from roasted coffee.

Now, Ikerbasque Research Professor Marco Ellero (BCAM) and Luciano Navarini (Illycaffè S.p.A.) provide a novel simulation framework 1 to describe coffee espresso extraction taking into account the complex mesoscopic structure of the coffee bed.

Sketch of the SPH model. (a) Large solid grains representing the fixed porous structures are denoted as a black circles and are modelled by stationary solid boundary particles located inside the prescribed domain. (b) Small solid fragments, i.e. the “fines”, are modelled as independent solid moving particles. (c) The smallest dispersed molecular components – the chemical species – are treated on a continuum level via a concentration field advected by the fluid particles: color map in the figure describes a typical snapshot of the concentration field (violet: maximum – red:zero).

The authors use the numerical technique called Smoothed Particle Hydrodynamic (SPH) method. SPH is a popular Lagrangian method to resolve the flow of simple and complex liquids by relying on an kernel-based discretization of prescribed set of partial differential equations describing the flow locally. Complex flow through porous media describing the full microstructure have generally focused on geophysical problems such as carbon dioxide storage or fossil fuel recovery. There is a number of applications of SPH mainly for these geophysical flow problems, however, little has been done for complex filtration dynamics in the context of food process modelling.

The model incorporates some essential features such as bimodal granulometry (finescoarses) of the coffee bed, double (liquid/intra-granular) molecular diffusion and solid-liquid release mechanism. The porous structures (‘coarses’) are modelled as stationary solid regions whereas the migration of cellular fragments (‘fines’) is described by single-particles advected by the flow. The boundary filter is modelled as a buffer region where fines are immobilized while entering it, therefore providing a transient flow impedance.

The results show that the transient permeability of the coffee bed under direct-inverse discharge observed in experiments is quite well captured by the model, showing the importance of fines migration on the hydrodynamics of the extraction. The concentration kinetics for different molecular compounds (i.e caffeine, trigonelline and chlorogenic acid), when compared to experimental data for a traditional espresso extraction, show excellent accord. This means that we can control and engineer coffee flavors by monitoring the balance of specific key-odorant or taste-active compounds in the beverage. Once key molecular components are experimentally individuated, the present model could be used to explore their presence in the final brew as an effect of the different applied flows. A simulated virtual analysis of coffee flavor under different extraction conditions, that is. My father would be impressed.

Author: César Tomé López is a science writer and the editor of Mapping Ignorance.


  1. Marco Ellero & Luciano Navarini (2019) Mesoscopic modelling and simulation of espresso coffee extraction Journal of Food Engineering doi: 10.1016/j.jfoodeng.2019.05.038

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>