I wrote this simulation while briefly working with a professor at Harvard University doing research in computational geomorphology.
The rate of erosion at every point is proportional to the slope of ground and the volume of rainwater that would pass over that point in the drainage network.