Lattice Gas Explorer, previously at http://code.google.com/p/latticegas
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.travis.yml
BUILD.txt
CMakeLists.txt
LICENSE.txt
README.md

README.md

Build Status

Lattice Gas Explorer

Explore lattice gases, from the basics of implementation to the analysis of the flow patterns.

http://lh5.ggpht.com/_L3XQL9bgmnM/SR9UsJfZuyI/AAAAAAAABvo/AfxEGYkSQdA/s400/eddies.jpg

A visualisation of the eddies in the wake of an obstacle placed in a flow. The eddies alternate between clockwise and anti-clockwise.

Videos:

The flow behind an obstacle, showing periodic fluctuations from side to side as vortices are shed.

The gas particles live on a square lattice, with at most one particle to a square. Here their colour indicates the direction they are moving (N,NE,E,SE, etc.). Grey particles are at rest, but actually jiggle about on the spot because of the way PI-LGA works.

More images:

A close-up of the lattice gas around a circular obstacle, showing the scale of the simulation. The density is visibly higher on the upstream side of the obstacle (left) than the downstream side. Vortices have formed behind the obstacle but these can't be seen without drawing flow lines.

The flowlines at a similar time to the image above, showing the flow around the obstacle and the vortices behind it. (The flowlines pass through the object but this is only because the flow average is taken over a large area.)

Another closeup of the gas particles, showing the underlying LGA-PI grid with room for up to four particles in each square. The cells' colour and the small flow lines show the direction they are travelling in. When the same flow lines are averaged over larger areas we see the flow patterns in the images above. (And the gas is usually at a much higher density.)

More information:

  • We currently only implement "pair-interaction lattice gases" (PI-LGA). Other methods could be added, to show their differences.
  • A blog entry says a little more about the context of lattice gases and has links to papers and so on: http://ferkeltongs.livejournal.com/22630.html
  • The intention is that the program is useful as a demo, for learning about LGA. But it hasn't gone very far in this direction. Its implementation isn't particularly efficient, I'm sure you could do better.