Driving home one night last week, Auckland's Spaghetti Junction was more than normally congested and my thoughts turned to physics. Sluggish traffic provided my initial topic – the differences between sand and water. – as well as letting me follow my train of thought (an actual train would be a welcome option, but that's another story) without endangering my fellow road-users. Admittedly, many of the differences between sand and water are obvious to anyone who visits a beach, but I was thinking about how sand sometimes flows like a liquid.

Anyone who has seen an old-fashioned egg timer knows sand can flow, but flowing sand is not the same as flowing water. If a hose is leaking from a pinprick, increasing the pressure makes the water flow faster. On the other hand, pressing down on sand flowing through a narrow funnel can cause the grains to lock together, stopping the flow entirely. The technical term for this is "jamming", which is how I got to be thinking about sand while sitting in traffic.

Simulation showing spontaneous jamming in a granular material.

Physicists often explain the properties of "granular materials" like sand by looking at interactions between adjacent grains. The same reasoning can be used with other systems – the complex movements of flocking birds are reproduced by boids, "birdoid-objects" that obey a few simple rules; avoid collisions but stay close to the flock...

Simulated starlings...

Just as scientists can explain the flocking of birds, we can also model the "flocking" of cars, exploring how patterns in traffic arise and dissipate. For instance, the videos below show an experimental traffic jam in Nagoya and a simulation from a group at MIT, each capturing the same phenomenon:

A person stuck in traffic might wonder why scientists would want an artificial traffic jam, but figuring out how they form is a step towards preventing them. As a physicist, I was pleased (but not surprised) to see that both studies were published in physics journals – the Nagoya group published in the online New Journal of Physics while the MIT paper appeared in the Physical Review. And, just in case you are wondering, I looked these papers up after I had arrived home.  

The MIT group treated traffic as if it was a fluid, but real vehicles are more like a flock of birds than water in a pipe. (OK, only to a physicist: car don't look much like birds OR liquids, but bear with me.) However, there are "agent models" or microsimulations that simulate the behavior of individual road users and the surprisingly lifelike scene below which includes vehicles sharing lanes (more common in places with lots of motorbikes or "tuk-tuks") was generated by an agent-based simulation: 

A visualization of a PTV Vissim simulation featuring non-lane-based traffic. Different vehicles with a variety of widths interact with each other and find their way wherever there is enough space to fit.

The moral of this story, if it needs one, is that some science lies just beneath the irritation of city traffic and, for this physicist at least, contemplating it made a slow drive home pass more quickly. 

Coda: The Sand Reckoner is the title of a short piece by Archimedes, where he works out the number of grains of sand the universe could hold. Physicists have been thinking about sand and the universe for a very long time.