Bernoulli percolation on a cubic lattice
Channel: Nils Berglund
Date: 15/09/2022

This is a first example on this channel of percolation in three dimensions. Each of the seven parts of this video features a large cube, made of several smaller cubes. The number of small cubes increases in each part:
4x4x4 lattice: 0:00
8x8x8 lattice: 0:31
16x16x16 lattice: 1:02
32x32x32 lattice: 1:33
64x64x64 lattice: 2:04
128x128x128 lattice: 2:35
256x256x256 lattice: 3:07
The cubes forming the left back side of the large cube are all "open". All other small cubes are open with probability p, and closed with probability 1-p, where the parameter p increases from 0 to 1 in the course of the each part of the video. The cubes are open or closed independently of all others.  
Only open cubes are shown. Whenever open cubes share a face, they are considered to belong to the same cluster. Cubes of the same cluster have the same color, and the color depends on the size of the cluster. Cubes in the cluster forming the left back side are considered as being flooded, because this system models water flowing through porous rock. 
The graph shows two curves: the ratio between the number of flooded cubes and the number of open cubes is shown in blue. The cyan curve shows the number of clusters, divided by the total number of small cubes.
Percolation models have the particularity that there is a critical value pc of the probability p, such that, when p is smaller than pc, there are many small clusters, and it is unlikely that the cluster of flooded cells reaches the face opposite to the initially flooded face. When p is larger than pc, on the other hand, if is very likely that there is one giant cluster of flooded cells, meaning that water is able to flow through the system. Numerical simulations show that the critical probability pc is close to 0.311604, although its exact value is not known. The transition between the two regimes becomes sharper as the number of small cubes increases. 

Render time: 1 hour 59 minutes
Color scheme: Viridis by Nathaniel J. Smith, Stefan van der Walt and Eric Firing
https://github.com/BIDS/colormap

Music: "Bonos" by Coyote Hearing@TRUEBLUEMUSICLTD

Current version of the C code used to make these animations: 
https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html

Some outreach articles on mathematics:
https://images.math.cnrs.fr/_Berglund-Nils-1343_.html
(in French, some with a Spanish translation)