Class molecular.MolecularMembrane

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----sTools.SApplet
                                           |
                                           +----molecular.MolecularMembrane

public class MolecularMembrane
extends SApplet

Constructor Index

 o MolecularMembrane()
 

Method Index

 o addParticleDataSource(int)
 
 o addParticleL(double, double, double, double, double)
Adds one particle to the ensemble
 o addParticleR(double, double, double, double, double)
Adds one particle to the ensemble
 o createParticlesL(int)
 
 o createParticlesR(int)
 
 o forward()
Start the animation
 o getAppletInfo()
 
 o getBWPos()
Returns the bottom wall position
 o getEnsembleLeftID()
Returns the id of the left ensemble.
 o getEnsembleRightID()
Returns the id of theright ensemble.
 o getHistogramLeftID(int, double, double)
Returns the id of the velocity histogram of the left ensemble.
 o getHistogramRightID(int, double, double)
Returns the id of the velocity histogram of the right ensemble.
 o getLWPos()
Returns the left wall position
 o getParameter(String, String)
 
 o getParameterInfo()
 
 o getRWPos()
Returns the right wall position
 o getTWPos()
Returns the top wall position
 o init()
 
 o pause()
Stop the animation
 o removeParticle(int)
Removes ith particle from ensemble
 o removeWallTemp(String)
 
 o setAutoRefresh(boolean)
 
 o setBackgroundRGBL(int, int, int)
Sets Background color inside left ensemble
 o setBackgroundRGBR(int, int, int)
Sets Background color inside right ensemble
 o setBoltzmann(double)
 
 o setDefault()
 
 o setDefaultColor(int, int, int)
Sets default color when adding new particles.
 o setDefaultMass(double)
Sets default mass when adding new particles.
 o setDefaultSize(double)
Sets default size when adding new particles.
 o setDefaultTemp(double)
 
 o setDt(double)
Sets calculation time step
 o setFPS(int)
Sets frames per second of animation
 o setMaxParticles(int)
Sets maximum number of particles that can be stored in arrays of each ensemble
 o setParticleMass(int, double)
Sets mass of particle default value is 1 unit.
 o setParticlePos(int, double, double)
Sets Position of particle
 o setParticleRGBL(int, int, int, int)
Sets color of particles in Right ensemble
 o setParticleRGBR(int, int, int, int)
Sets color of particles in left ensemble
 o setParticleSize(int, double)
Sets size of particle default value is 1 in world units.
 o setParticlesL(int)
 
 o setParticlesR(int)
 
 o setParticleVel(int, double, double)
Sets Velocity of particle
 o setPeriodicV(boolean)
Sets Periodic periodic boundary conditions ion vertical direction
 o setPistonMass(double)
Sets mass of piston between two ensembles
 o setPistonWidth(double)
Sets width of piston between two ensembles
 o setPpu(int)
Sets pixels per unit of ensemble
 o setProbabilityFunction(String)
Sets probability of particle passing through membrane function must go between 0 and 1.
 o setShowControls(boolean)
Shows or hides control panel
 o setWallTempL(String, double)
Sets wall temperature for walls in left ensemble
 o setWallTempR(String, double)
Sets wall temperature for walls in right ensemble
 o start()
 
 o stepForward()
Steps simulation forward one time step

Constructors

 o MolecularMembrane

 public MolecularMembrane()

Methods

 o getParameter

 public String getParameter(String key,
                            String def)

 o init

 public void init()
Overrides:
init in class Applet

 o getAppletInfo

 public String getAppletInfo()
Overrides:
getAppletInfo in class Applet

 o getParameterInfo

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

 o start

 public void start()
Overrides:
start in class Applet

 o setShowControls

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

 o setDefault

 public void setDefault()

 o pause

 public void pause()
Stop the animation

 o forward

 public void forward()
Start the animation

 o stepForward

 public void stepForward()
Steps simulation forward one time step

 o addParticleL

 public int addParticleL(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

 o addParticleR

 public int addParticleR(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

 o createParticlesL

 public void createParticlesL(int n)

 o createParticlesR

 public void createParticlesR(int n)

 o removeParticle

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

 o setParticlesL

 public void setParticlesL(int n)

 o setParticlesR

 public void setParticlesR(int n)

 o setMaxParticles

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

 o setPistonWidth

 public void setPistonWidth(double w)
Sets width of piston between two ensembles
Parameters:
w - double default is 3.

 o setPistonMass

 public void setPistonMass(double m)
Sets mass of piston between two ensembles
Parameters:
m - double default is 100.

 o setBackgroundRGBL

 public void setBackgroundRGBL(int r,
                               int g,
                               int b)
Sets Background color inside left ensemble
Parameters:
r - int red
g - int green
b - int blue

 o setBackgroundRGBR

 public void setBackgroundRGBR(int r,
                               int g,
                               int b)
Sets Background color inside right ensemble
Parameters:
r - int red
g - int green
b - int blue

 o 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

 o 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

 o 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

 o setDefaultTemp

 public void setDefaultTemp(double t)

 o setParticleRGBR

 public void setParticleRGBR(int i,
                             int rd,
                             int gr,
                             int bl)
Sets color of particles in left ensemble
Parameters:
i - int particle number
rd - int red value ( gr - int green value ( bl - int blue value (

 o setParticleRGBL

 public void setParticleRGBL(int i,
                             int rd,
                             int gr,
                             int bl)
Sets color of particles in Right ensemble
Parameters:
i - int particle number
rd - int red value ( gr - int green value ( bl - int blue value (

 o 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.

 o setProbabilityFunction

 public void setProbabilityFunction(String str)
Sets probability of particle passing through membrane function must go between 0 and 1.
Parameters:
str - String function of mass

 o 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

 o 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

 o 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.

 o addParticleDataSource

 public int addParticleDataSource(int i)

 o setFPS

 public void setFPS(int f)
Sets frames per second of animation
Parameters:
f - int

 o setAutoRefresh

 public void setAutoRefresh(boolean ar)

 o setDt

 public void setDt(double d)
Sets calculation time step
Parameters:
d - double timestep dt

 o setBoltzmann

 public void setBoltzmann(double kb)

 o setWallTempR

 public void setWallTempR(String wall,
                          double t)
Sets wall temperature for walls in right ensemble

 o setWallTempL

 public void setWallTempL(String wall,
                          double t)
Sets wall temperature for walls in left ensemble

 o removeWallTemp

 public void removeWallTemp(String wall)

 o setPpu

 public void setPpu(int p)
Sets pixels per unit of ensemble
Parameters:
p - int

 o setPeriodicV

 public void setPeriodicV(boolean p)
Sets Periodic periodic boundary conditions ion vertical direction
Parameters:
p - boolean

 o getRWPos

 public double getRWPos()
Returns the right wall position
Returns:
double

 o getLWPos

 public double getLWPos()
Returns the left wall position
Returns:
double

 o getTWPos

 public double getTWPos()
Returns the top wall position
Returns:
double

 o getBWPos

 public double getBWPos()
Returns the bottom wall position
Returns:
double

 o getEnsembleLeftID

 public int getEnsembleLeftID()
Returns the id of the left ensemble. This id can be used to make data connections.
Returns:
int The id.

 o getEnsembleRightID

 public int getEnsembleRightID()
Returns the id of theright ensemble. This id can be used to make data connections.
Returns:
int The id.

 o getHistogramLeftID

 public int getHistogramLeftID(int nbins,
                               double vmin,
                               double vmax)
Returns the id of the velocity histogram of the left ensemble. 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.

 o getHistogramRightID

 public int getHistogramRightID(int nbins,
                                double vmin,
                                double vmax)
Returns the id of the velocity histogram of the right ensemble. 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.