{{Percolation Simulation}}
Given an rectangular array of cells numbered , assume is horizontal and is downwards. Each is bounded by (horizontal) walls and ; (vertical) walls and
Assume that the probability of any wall being present is a constant where
:
Except for the outer horizontal walls at and which are always present.
;The task:
Simulate pouring a fluid onto the top surface () where the fluid will enter any empty cell it is adjacent to if there is no wall between where it currently is and the cell on the other side of the (missing) wall.
The fluid does not move beyond the horizontal constraints of the grid.
The fluid may move “up” within the confines of the grid of cells. If the fluid reaches a bottom cell that has a missing bottom wall then the fluid can be said to 'drip' out the bottom at that point.
Given repeat the percolation times to estimate the proportion of times that the fluid can percolate to the bottom for any given .
Show how the probability of percolating through the random grid changes with going from to in increments and with the number of repetitions to estimate the fraction at any given as .
Use an grid of cells for all cases.
Optionally depict fluid successfully percolating through a grid graphically.
Show all output on this page.