
Running Water Through Lattice Boltzmann
I ran water through virtual pucks packed from Grind Simulator distributions using a 3D lattice Boltzmann method. Dry-bed permeability came out at 0.9–1.9 times the Kozeny–Carman formula, and removing fines raised it 60-fold. Yet the espresso-grind pucks passed water more than a thousand times more easily than a real shot: the shape of dry grounds alone cannot explain espresso. Includes a 2D lattice Boltzmann tool that runs in the browser.
"Porous Media 101" used the Kozeny–Carman formula to calculate permeability from a grind's size distribution. The formula approximates a bed of grounds as a bundle of winding tubes. If you actually push water between the grains, how well does it hold up?
I built a virtual puck and ran water through it. A 1.1 mm cube packed with 20,000 particles from Grind Simulator v1's distribution was painted on a 10 µm grid, and the flow was calculated with the 3D lattice Boltzmann method. The permeability of the dry bed came out at 0.9–1.9 times the Kozeny–Carman formula, within a factor of two. Removing the fines made it 60 times larger. And for every grind, it was about a thousand times larger than a real espresso shot's.
The lattice Boltzmann method

The D2Q9 lattice of 2D lattice Boltzmann: the fluid in each cell is split into shares moving in nine directions. This calculation used its 3D extension, D3Q19 (nineteen directions) · Figure: LackOfInspiration1, Wikimedia Commons, CC BY-SA 4.0
The lattice Boltzmann method treats water not as individual molecules but as a distribution of "how many particles are moving in which direction". Space is divided into a cubic grid, and each cell holds distributions for a fixed set of directions (19 here). At every step, the distributions move to neighbouring cells (streaming) and collide within each cell, relaxing toward equilibrium (collision). Repeating these simple rules, their average obeys the equations of viscous flow. Distributions that hit a solid cell are bounced straight back, which makes a wall. Because it can use complex pore shapes such as CT images directly, it is widely used for porous media.
Wadsworth and colleagues (2026) used this method too. They ran lattice Boltzmann flow through 21 CT images of untamped coffee grounds at 2.7–3.0 µm voxels, obtaining permeabilities of 1.6×10⁻¹¹ to 1.9×10⁻¹⁰ m², and built a formula predicting permeability from connected porosity and surface area.
Checking first
I first checked that my own code was right. Flow between spheres in a simple cubic array has an exact result from Sangani and Acrivos (1982). At a sphere volume fraction of 0.13, my calculated permeability was 0.984 times that result. At first I got 1.18–1.55 times, a mistake in how the body force was applied; once fixed, changing a numerical parameter (the relaxation time) gave the same value.
Flow through the virtual puck
As in "Looking Inside the Puck with CT", I drew spheres from Grind Simulator v1's distribution and packed them with a little overlap allowed, into a cube 1.12 mm on a side whose faces wrap around (periodic boundaries), with 10 µm cells. A 38 µm fine spans about four cells. I pushed the water one way with a body force and ran until the flow stopped changing (1,200–2,800 iterations per case).

Water runs fast along the wide gaps between coarse particles and barely passes through narrow gaps packed with fines. Speeds differ by more than tenfold within a single slice.
Compared with the formula
I calculated five espresso grinds (flat burr gaps of 150, 200 and 250 µm, conical 250 µm and a dark roast at 250 µm), a slightly coarser 350 µm gap, and grounds with the fines removed. Packed the same way, porosity still ranged from 0.23 to 0.40 depending on the distribution. So rather than ranking permeability by gap, I compared it with the Kozeny–Carman estimate from each grind's porosity and Sauter mean size.

Lattice Boltzmann permeability was 0.9–1.9 times the Kozeny–Carman estimate, with the five espresso grinds clustered at 1.2–1.5 times. For dry beds, the formula holds within a factor of two. In Wadsworth's CT images, too, lattice Boltzmann permeability was a little above the Kozeny–Carman formula (a geometric mean of about 1.7 times, calculated from their table).
The effect of fines showed up again. For the same 250 µm gap, removing fines raised permeability from 2.7×10⁻¹² to 1.6×10⁻¹⁰ m², 60 times. Without fines, the Sauter mean size grew from 135 to 329 µm and porosity from 0.23 to 0.38.
Still a thousandfold
The espresso-grind virtual pucks had permeabilities of 2.5–4.4×10⁻¹² m²: ten to a hundred times the espresso beds Corrochano and colleagues measured in the lab (2.6×10⁻¹⁴ to 3.4×10⁻¹³ m²), and more than a thousand times the value backed out of a typical shot (2.3×10⁻¹⁵ m²). Dropping Kozeny–Carman and actually running water through, the thousandfold gap from "Porous Media 101" remains. The shape of dry grounds alone cannot explain a real shot. What is left are things that happen once water gets in: particles swelling, the puck being squeezed and fines moving.
Run it yourself
The tool below reduces the same calculation to two dimensions and runs it in your browser. Push water into a 1.6 mm bed of disk-shaped grains, and as iterations accumulate the water paths emerge and permeability settles to a value. Change the solid share and fines share and repack: more fines narrow the paths and lower the permeability.
What this conclusion leaves out
- The virtual puck is made of spheres. Real grounds are angular and elongated; Wadsworth and colleagues used real CT images
- The box is small. A 1.12 mm cube holds only a few coarse particles. Fines-removed grounds gave 1.23×10⁻¹⁰ m² in a 1.44 mm box and 1.60×10⁻¹⁰ m² in a 1.12 mm box, about 30% apart. For the 350 µm gap, particles larger than half the box (10% of the mass) were left out
- Fines span about four cells. On a 10 µm grid, a 38 µm fine has a stair-stepped outline. Painting the same 250 µm-gap puck on 20 µm cells made permeability 3.7 times larger (fines shrink to two cells and largely vanish). If even 10 µm cells miss some of the fines, the true permeability of a dry bed is lower than calculated here, and the gap to a real shot correspondingly smaller
- I did not wait for the flow to stop completely. Values extrapolated from the trend over the last few hundred iterations agreed with the last values within 2%, so I used the last values
- Porosity was not matched. Packed the same way, different distributions gave different porosities, so the effect of grind alone could not be isolated
Summary
- The lattice Boltzmann method computes flow through complex pores by streaming and colliding particle distributions in several directions on a grid. My code reproduced the exact permeability of a sphere array to within 0.984
- Running water through virtual pucks packed from Grind Simulator v1's distributions, dry-bed permeability was 0.9–1.9 times the Kozeny–Carman estimate, within a factor of two
- Removing fines raised permeability 60-fold (2.7×10⁻¹² → 1.6×10⁻¹⁰ m²)
- The espresso-grind virtual pucks (2.5–4.4×10⁻¹² m²) are more than a thousand times more permeable than a typical shot. The shape of dry grounds alone cannot explain a real shot
References
- Krüger T, Kusumaatmaja H, Kuzmin A, Shardt O, Silva G, Viggen EM (2017). The Lattice Boltzmann Method: Principles and Practice. Springer — bibliographic details only
- Chen S, Doolen GD (1998). Lattice Boltzmann method for fluid flows. Annual Review of Fluid Mechanics 30, 329–364. doi:10.1146/annurev.fluid.30.1.329 — bibliographic details only
- Sangani AS, Acrivos A (1982). Slow flow through a periodic array of spheres. International Journal of Multiphase Flow 8(4), 343–360. doi:10.1016/0301-9322(82)90047-790047-7) — bibliographic details only
- Wadsworth FB et al. (2026). A model for the permeability of coffee pucks validated using X-ray computed micro-tomography. Royal Society Open Science 13, 252031. doi:10.1098/rsos.252031
- Corrochano BR, Melrose JR, Bentley AC, Fryer PJ, Bakalis S (2015). A new methodology to estimate the steady-state permeability of roast and ground coffee in packed beds. Journal of Food Engineering 150, 106–116. doi:10.1016/j.jfoodeng.2014.11.006
Image credits
- D2Q9 lattice: LackOfInspiration1, Wikimedia Commons, CC BY-SA 4.0
- All other charts, the cover and the tool: made by me