by Dirk Brockmann

This explorable illustrates a process known as percolation. Percolation is a topic very important for understanding processes in physics, biology, geology, hydrology, horstology, epidemiology, and other fields. Percolation theory is the mathematical tool designed for understanding these processes.

Percolation is best understood in terms of the following physical situation: Let’s say you have a porous medium, e.g. ground coffee in your percolator or porous soil of some depth. You pour a liquid on the medium and would like to know whether the liquid can make it through the medium and if so how this depends on the porosity of the medium (i.e. the fraction of the material that is empty). In the lattice model below, this scenario is modeled.

Press Play and keep on reading….

This is how it works

The situation can be modeled by a two-dimensional square lattice in which individual sites can be occupied by the medium (e.g. a grain of ground coffee and depicted in black above) or they can be empty (depicted in white). The porosity $p$ is the fraction of empty sites. The liquid (depicted in red) can pass through the medium across adjacent empty sites. By adjacent we mean the 4 next neighbors (north-west-south-east) of a site in a square lattice.

We imagine that liquid is poured into the center of the lattice, initially there’s a “red dot” of liquid.

Asking “Does the liquid make it all the way to the borders of the systems?” is then equivalent to asking “Is there a path of adjacent empty sites that connects the center and boundary of the square?”. It turns out that this is an easy question to ask that, however, is tyically very difficult to answer. The particular system above (square 2-d lattice with 4 neighbors) has a critical porosity

$$ \Large p_c=0.592746 $$

and if $p < p_c$ the liquid almost never makes it to the bottom, whereas if $p > p_c$ it almost always does. This is why $p_c$ is called a percolation threshold.

Intially the system is set up such that every site is occupied with a coffee grain with a probability of $1-p$. You can vary the porosity with slider in the control panel. Liquid is supplied continuously at the center of the lattice. At every iteration the liquid expands to all empty neighboring sites until no more empty sites can be reached. For sufficiently high porosity, the liquid will make it all the way to the boundary and fill almost all empty sites. If $p$ is too small the liquid doesn’t get very far.

You start the simulation by pressing the play button. Press the reload button to re-initialize the system.

Try to find the critical porosity $p_c$, the point at which the liquid sometimes makes it to the bottom and some times does not.

This explorable has Orli’s magic switch to make things prettier. For an explanation of it, check out the Explorable Orli’s Flock’n Roll.

Difficult math

Although the model above is conceptually straightforward and can be easily generalized to more than 2 dimensions and other types of lattices, e.g. hexagonal and triangular lattices, and more esoteric types of lattices, computing the value of $p_c$ is mathematically quite challenging in most cases and for many systems the exact value is still unknown. Entire books have been written about it.


The physical metaphor of a liquid expanding through a porous medium is only one way to think of percolation. Another application is the spread of infectious disease in which the liquid becomes an infectious disease, empty sites are susceptible individuals and occupied sites are immune. In this case the percolation threshold is the epidemic threshold.

Another application is the dynamics of forest fires in which the liquid is a fire that expands across an area of vegetation and the porosity is equivalent to the density of trees.

Related Explorables:

Critical HexSIRSize

The stochastic, spatial SIRS model

Dr. Fibryll & Mr. Glyde

Pulse-coupled oscillators

Dr. Fibryll & Mr. Glyde

Pulse-coupled oscillators

Horde of the Flies

The Vicsek-Model

Horde of the Flies

The Vicsek-Model


Oscillators that sync and swarm