- Parameters:
- i - int particle number
- rd - int red value (
gr - int green value (
bl - int blue value (
setParticleMass
public void setParticleMass(int i,
double m)
- Sets mass of particle default value is 1 unit.
- Parameters:
- i - int particle number
- m - double mass.
setDefault
public void setDefault()
setMaxParticles
public void setMaxParticles(int p)
- Sets maximum number of particles that can be stored in arrays
- Parameters:
- p - max particles
setAutoRefresh
public void setAutoRefresh(boolean ar)
setBorderWidth
public void setBorderWidth(int w)
setBackgroundRGB
public void setBackgroundRGB(int r,
int g,
int b)
- Sets Background color inside piston
- Parameters:
- r - int red
- g - int green
- b - int blue
setBG2Color
public void setBG2Color(int r,
int g,
int b)
- Sets Background color above piston head
- Parameters:
- r - int red
- g - int green
- b - int blue
setDefaultMass
public void setDefaultMass(double m)
- Sets default mass when adding new particles. All particles created after calling this
method will have this mass
- Parameters:
- m - double mass
setDefaultSize
public void setDefaultSize(double r)
- Sets default size when adding new particles. All particles created after calling this
method will have this radius
- Parameters:
- r - double radius
setDefaultColor
public void setDefaultColor(int r,
int g,
int b)
- Sets default color when adding new particles. All particles created after calling this
method will have this color
- Parameters:
- r - int red
- g - int green
- b - int blue
setDefaultPiston
public void setDefaultPiston()
setDefaultTemp
public void setDefaultTemp(double t)
setParticlePos
public void setParticlePos(int i,
double xin,
double yin)
- Sets Position of particle
- Parameters:
- i - int particle number
- xin - double initial x-position
- yin - double initial y-position
setParticleVel
public void setParticleVel(int i,
double xvel,
double yvel)
- Sets Velocity of particle
- Parameters:
- i - int particle number
- xvel - double initial x-velocity
- yvel - double initial y-velocity
setInitialPistonPos
public void setInitialPistonPos(double h)
setBoltzmann
public void setBoltzmann(double kb)
setWallTemp
public void setWallTemp(String wall,
double t)
- Sets Velocity of particle
- Parameters:
- wall - string Which wall? [top, bottom, right, left]
- t - double The wall temperature
removeWallTemp
public void removeWallTemp(String wall)
setFPS
public void setFPS(int f)
- Sets frames per second of animation
- Parameters:
- f - int
setDt
public void setDt(double d)
- Sets calculation time step
- Parameters:
- d - double timestep dt
setDelay
public void setDelay(int d)
- Sets calculation time delay
- Parameters:
- d - int delay milliseconds
removeParticle
public void removeParticle(int i)
- Removes ith particle from ensemble
- Parameters:
- i - int particle number
setParticles
public void setParticles(int n)
setTemp
public void setTemp(double temp)
- Set the temperature of the ensemble in 1 step.
- Parameters:
- temp - double The new temperature.
setTemperature
public void setTemperature(double temp,
int steps)
- Set the temperature of the ensemble in n steps. Data will be sent to data listeners
after each step.
- Parameters:
- temp - double The new temperature.
- steps - int The number of steps.
setPpu
public void setPpu(int p)
- Sets pixels per unit of ensemble
- Parameters:
- p - int
setPeriodicH
public void setPeriodicH(boolean p)
- Sets Periodic periodic boundary conditions
- Parameters:
- p - boolean
setPeriodicV
public void setPeriodicV(boolean p)
- Sets Periodic periodic boundary conditions
- Parameters:
- p - boolean
setKE
public void setKE(double k)
- Puts value in kinetic energy field
- Parameters:
- k - double value to be inserted in field
setOrientation
public void setOrientation(String or)
setVolume
public void setVolume(double vol,
int steps)
- Move the piston to set the volume for the ensemble.
- Parameters:
- vol - The new volume.
- numSteps - The number of dV steps for the move.
setVolumeIsothermal
public void setVolumeIsothermal(double vol,
int steps)
- Move the piston to set the volume for the ensemble.
- Parameters:
- vol - The new volume.
- numSteps - The number of dV steps for the move.
setPiston
public void setPiston(String str,
boolean parsemode)
getPistonPos
public double getPistonPos()
getRWPos
public double getRWPos()
- Returns the right wall position
- Returns:
- double
getLWPos
public double getLWPos()
- Returns the left wall position
- Returns:
- double
getTWPos
public double getTWPos()
- Returns the top wall position
- Returns:
- double
getBWPos
public double getBWPos()
- Returns the bottom wall position
- Returns:
- double
getEnsembleID
public int getEnsembleID()
- Returns the id of the ensemble. This id can be used to make data connections.
- Returns:
- int The id.
getHistogramID
public int getHistogramID(int nbins,
double vmin,
double vmax)
- Returns the id of the velocity histogram. This id can be used to make data connections.
- Parameters:
- nbins - int The number of bins in the histogram.
- min - double The minimum velocity
- max - double The maximum velocity
- Returns:
- int The id.
setPistonMass
public void setPistonMass(double m)
- Sets Mass of piston
- Parameters:
- m - double new mass of piston
setGravity
public void setGravity(double gr)
- Sets Gravitational constant that acts on piston
- Parameters:
- gr - double