Home
Help
Resources
Extensions
FAQ
NetLogo Publications
Donate

Models:
Library
Community
Modeling Commons

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

## NetLogo User Community Models

## WHAT IS IT?

This model shows how an oil spill can percolate down through permeable soil. It was inspired by a similar model meant to be done by hand on paper (see "Forest Fires, Oil Spills, and Fractal Geometry", Mathematics Teacher, Nov. 1998, p. 684-5).

## HOW IT WORKS

The soil is modeled as a checkerboard of hard particles (gray squares) and semi-permeable spaces in between these hard particles (brown squares). (You may need to zoom in to see the individual squares.)

Water cannot enter the solid gray squares, but it may pass through the brown squares.

Some soils are more porous ("holey") than other soils. In this model the porosity value of the soil determines the probability that the water will be able to enter any given brown soil square.

The model represents an rain as a finite number of rain "particles", or simply rain drops.

The rain spill starts at the top of the grey layer, and percolates downward.

The water level is represented by red squares, and every square that oil has passed through (or "saturated") is shown as white.

The water sinks downward through the soil by moving diagonally to the right or left, slipping between the hard gray particles.

## HOW TO USE IT

Push the SETUP button to place the soil and start the water (shown as red) at the top of the grey layer.

Press the GO button to run the model.

The POROSITY slider controls the percent chance that water will be able to enter each brown square, as it works its way downward.

The model can be run as long as you like;

The two plots show how large the dissolution surface is (red) and how much soil has been saturated (black).

## NETLOGO FEATURES

This is a good example of a cellular automaton, because it uses only patches. It also uses a simple random-number generator to give a probability, which in turn determines the average large-scale behavior.

This is also a simple example of how plots can be used to reveal, graphically, the average behavior of a model as it unfolds.

In the pen-and-paper activity the soil was represented by rectangles arranged in a brickwork pattern, where each rectangular cell had two neighboring rectangular cells below it. Since NetLogo's patches are always squares in an aligned grid, our replica of the model uses a checkerboard pattern instead. Can you see how the two models would have the same behavior, despite having different ways of visualizing them?