Class molecular.MolecularApplet
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----sTools.SApplet
|
+----molecular.MolecularApplet
- public class MolecularApplet
- extends SApplet
MolecularApplet()
-
addParticle(double,
double, double, double, double)
- Adds one particle to the ensemble
addParticleDataSource(int)
-
createParticles(int)
-
forward()
- Start the animation
getAppletInfo()
-
getBWPos()
- Returns the bottom wall position
getEnsembleID()
- Returns the id of the ensemble.
getHistogramID(int, double, double)
- Returns the id of the velocity histogram.
getLWPos()
- Returns the left wall position
getParameter(String,
String)
-
getParameterInfo()
-
getRWPos()
- Returns the right wall position
getTWPos()
- Returns the top wall position
init()
-
pause()
- Stop the animation
removeParticle(int)
- Removes ith particle from ensemble
removeWallTemp(String)
-
setAutoRefresh(boolean)
-
setBackgroundRGB(int, int, int)
- Sets Background color inside ensemble
setBoltzmann(double)
-
setBorderWidth(int)
-
setDefault()
- Reset to time t=0; public void resetClock(){ pause(); ensemble1.reset(); }
setDefaultColor(int, int, int)
- Sets default color when adding new particles.
setDefaultMass(double)
- Sets default mass when adding new particles.
setDefaultSize(double)
- Sets default size when adding new particles.
setDefaultTemp(double)
-
setDt(double)
- Sets calculation time step
setFPS(int)
- Sets frames per second of animation
setMaxParticles(int)
- Sets maximum number of particles that can be stored in arrays
setParticleMass(int, double)
- Sets mass of particle default value is 1 unit.
setParticlePos(int, double, double)
- Sets Position of particle
setParticleRGB(int, int, int, int)
- Sets color of particle
setParticles(int)
-
setParticleSize(int, double)
- Sets size of particle default value is 1 in world units.
setParticleVel(int, double, double)
- Sets Velocity of particle
setPeriodicH(boolean)
- Sets Periodic periodic boundary conditions in horizontal direction
setPeriodicV(boolean)
- Sets Periodic periodic boundary conditions ion vertical direction
setPpu(int)
- Sets pixels per unit of ensemble
setShowControls(boolean)
- Shows or hides control panel
setTemp(double)
- Set the temperature of the ensemble in one step.
setTemperature(double, int)
- Set the temperature of the ensemble in n steps.
setWallTemp(String, double)
-
start()
-
stepForward()
- Steps simulation forward one time step

MolecularApplet
public MolecularApplet()

getParameter
public String getParameter(String key,
String def)

init
public void init()
- Overrides:
- init in class Applet

getAppletInfo
public String getAppletInfo()
- Overrides:
- getAppletInfo in class Applet

getParameterInfo
public String[][] getParameterInfo()
- Overrides:
- getParameterInfo in class
Applet

start
public void start()
- Overrides:
- start in class Applet

setShowControls
public void setShowControls(boolean s)
- Shows or hides control panel
- Parameters:
- s - boolean

setDefault
public void setDefault()
- Reset to time t=0; public void resetClock(){ pause(); ensemble1.reset(); }

pause
public void pause()
- Stop the animation

forward
public void forward()
- Start the animation

stepForward
public void stepForward()
- Steps simulation forward one time step

addParticle
public int addParticle(double xin,
double yin,
double xvel,
double yvel,
double r)
- Adds one particle to the ensemble
- Parameters:
- xin - double initial xposition
- yin - double initial yposition
- xvel - double initial x-velocity
- yvel - double initial y-velocity
- r - double particle radius
- Returns:
- s int new particle number

createParticles
public void createParticles(int n)

setParticles
public void setParticles(int n)

setTemp
public void setTemp(double temp)
- Set the temperature of the ensemble in one 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.

removeParticle
public void removeParticle(int i)
- Removes ith particle from ensemble
- Parameters:
- i - int particle number

setMaxParticles
public void setMaxParticles(int p)
- Sets maximum number of particles that can be stored in arrays
- Parameters:
- p - max particles

setBackgroundRGB
public void setBackgroundRGB(int r,
int g,
int b)
- Sets Background color inside ensemble
- 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

setDefaultTemp
public void setDefaultTemp(double t)

setParticleRGB
public void setParticleRGB(int i,
int rd,
int gr,
int bl)
- Sets color of particle
- 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.
setBorderWidth
public void setBorderWidth(int w)
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
setParticleSize
public void setParticleSize(int i,
double s)
- Sets size of particle default value is 1 in world units.
- Parameters:
- i - int particle number
- s - double size.
addParticleDataSource
public int addParticleDataSource(int i)
setFPS
public void setFPS(int f)
- Sets frames per second of animation
- Parameters:
- f - int
setAutoRefresh
public void setAutoRefresh(boolean ar)
setDt
public void setDt(double d)
- Sets calculation time step
- Parameters:
- d - double timestep dt
setBoltzmann
public void setBoltzmann(double kb)
setWallTemp
public void setWallTemp(String wall,
double t)
removeWallTemp
public void removeWallTemp(String wall)
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 in horizontal direction
- Parameters:
- p - boolean
setPeriodicV
public void setPeriodicV(boolean p)
- Sets Periodic periodic boundary conditions ion vertical direction
- Parameters:
- p - boolean
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.
All Packages Class Hierarchy This Package Previous Next Index