org.opensourcephysics.sip.ch14.latticegas
Class LatticeGas

java.lang.Object
  extended by org.opensourcephysics.sip.ch14.latticegas.LatticeGas
All Implemented Interfaces:
Drawable

public class LatticeGas
extends java.lang.Object
implements Drawable

LatticeGas models fluid flow using a cellular automaton based algorithm.


Field Summary
 double arrowSize
           
 double flowSpeed
           
 int[][] lattice
           
 int Lx
           
 int Ly
           
 int[][] newLattice
           
 int spatialAveragingLength
           
 
Constructor Summary
LatticeGas()
           
 
Method Summary
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Draws a representation of an object in a drawing panel.
 void initialize(int Lx, int Ly, double density)
           
 void step()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flowSpeed

public double flowSpeed

arrowSize

public double arrowSize

spatialAveragingLength

public int spatialAveragingLength

Lx

public int Lx

Ly

public int Ly

lattice

public int[][] lattice

newLattice

public int[][] newLattice
Constructor Detail

LatticeGas

public LatticeGas()
Method Detail

initialize

public void initialize(int Lx,
                       int Ly,
                       double density)

step

public void step()

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Description copied from interface: Drawable
Draws a representation of an object in a drawing panel.

Specified by:
draw in interface Drawable