Enter the maze

Simulating Brownian Motion

By Peter Millican, Hertford College University of Oxford and Paul Curzon, Queen Mary University of London

Turtle Brownian Motion

Once you can write programs confidently you have a new way of understanding things. Rather than just read about them, watch videos or do experiments, you can write programs that simulate things you are trying to understand. This is called ‘computational modelling’ and it is now one of the main ways scientists work too, to understand new phenomena they are studying. For example, physicists are using simulations of particles to better understand the way reality works. The simulations help test their theories, and can highlight situations where the theory does not actually match reality. When that happens the theory needs to be refined. Brownian motion is a good example of a simple theory that can be explored through computational modelling.

In 1827, the Scottish botanist Robert Brown, using a microscope to examine pollen grains suspended in water, noticed that the grains seemed to move around randomly, as though being hit by some tiny invisible objects. Brown himself couldn’t explain why it was happening.

This phenomenon was named Brownian motion in Robert Brown’s honour. You can see it happening in lots of different situations, where large particles are suspended in a liquid. For example, this video shows Brownian Motion of fat globules in milk, and then of paint pigment particles in watercolour paint, as seen through a microscope.

Brownian Motion was fully explained by Albert Einstein in one of his great papers of 1905. He argued that the pollen particles were being moved about because they were being hit by individual molecules of water, and that this therefore showed that water, and other liquids, were made up of lots of separate, independent particles. Even though no one had actually seen a molecule, it provided the strongest evidence up to that time of the real existence of molecules and so of the atomic theory of matter.

If Einstein was right, then if we program a computer simulation of lots of small particles and a single big particle, and model Newtons laws of what happens when particles of different sizes collide, then we should get an accurate simulation of Brownian motion as seen through a microscope. If there are differences then our understanding of what is going on (or our implementation of it in the simulation) may be wrong.

If you can program then try and write a simulation yourself. In doing so you will get a much deeper understanding of Brownian motion. The Oxford Turtle System is a good environment to do it in (in either Python, Pascal or BASIC). Alternatively just watch our simulation in Turtle with the code. To then see the code that created it, just follow the Turtle Brownian Motion link (“5.2 Brownian Motion”)

All the jittery particles you can see in the real Brownian motion correspond to the big blue particle in the simulation. The red 'molecules' are of course so small as to be invisible on the real video.

To program a simulation like this, essentially, you need to program a series of particles (or blobs). Each particle will be drawn on the screen as a circle and have an (x,y) position and velocity or speed in a given direction. They will also have a size and a mass. One (the pollen particle) will be large. The others (water molecules) small. First randomly set up lots of particles. Then set them going. You need to be able to detect when water molecules collide with the pollen particle, and also implement Newton’s Laws to change its motion whenever hit. The simulation is then a series of ticks of time. On each tick the new state of every particle is calculated, and all the new positions drawn.

The motion we see in our simulation is the same jittery motion of the microscope, adding to the evidence that Einstein’s theory was right. Liquids are made up of molecules!