org.opensourcephysics.sip.ch14.latticegas
Class LatticeGas
java.lang.Object
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.
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 |
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
LatticeGas
public LatticeGas()
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