|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.sip.ch08.md.LJParticles
public class LJParticles
LJParticlesApp evolves a two-dimensional system of interacting particles via the Lennard-Jones potential using a Verlet ODESolver. getHeatCapacity method corrected based on bug report by Mike Cooke.
Field Summary | |
---|---|
double[] |
ax
|
double[] |
ay
|
double |
dt
|
java.lang.String |
initialConfiguration
|
double |
initialKineticEnergy
|
double |
Lx
|
double |
Ly
|
int |
N
|
int |
nx
|
int |
ny
|
double |
radius
|
double |
rho
|
double[] |
state
|
int |
steps
|
double |
t
|
double |
totalKineticEnergyAccumulator
|
double |
totalKineticEnergySquaredAccumulator
|
double |
totalPotentialEnergyAccumulator
|
double |
virialAccumulator
|
Constructor Summary | |
---|---|
LJParticles()
|
Method Summary | |
---|---|
void |
computeAcceleration()
|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws a representation of an object in a drawing panel. |
double |
getHeatCapacity()
Gets the heat capacity. |
double |
getMeanEnergy()
|
double |
getMeanPressure()
|
double |
getMeanTemperature()
|
void |
getRate(double[] state,
double[] rate)
Gets the rate of change using the argument's state variables. |
double[] |
getState()
Gets the state variables. |
void |
initialize()
|
void |
resetAverages()
|
void |
setRandomPositions()
|
void |
setRectangularLattice()
|
void |
setTriangularLattice()
|
void |
setVelocities()
|
void |
step(HistogramFrame xVelocityHistogram)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double[] state
public double[] ax
public double[] ay
public int N
public int nx
public int ny
public double Lx
public double Ly
public double rho
public double initialKineticEnergy
public int steps
public double dt
public double t
public double totalPotentialEnergyAccumulator
public double totalKineticEnergyAccumulator
public double totalKineticEnergySquaredAccumulator
public double virialAccumulator
public java.lang.String initialConfiguration
public double radius
Constructor Detail |
---|
public LJParticles()
Method Detail |
---|
public void initialize()
public void setRandomPositions()
public void setRectangularLattice()
public void setTriangularLattice()
public void setVelocities()
public double getMeanTemperature()
public double getMeanEnergy()
public double getMeanPressure()
public double getHeatCapacity()
public void resetAverages()
public void computeAcceleration()
public void getRate(double[] state, double[] rate)
ODE
getRate
in interface ODE
state
- the state arrayrate
- the rate arraypublic double[] getState()
ODE
getState
in interface ODE
public void step(HistogramFrame xVelocityHistogram)
public void draw(DrawingPanel panel, java.awt.Graphics g)
Drawable
draw
in interface Drawable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |