A test page for the SwingJS system.
A simple JApplet.
The JavaScript below simulates random elastic collisions of units in a container.
The simulation graphically presents a profile of the distribution
of energy among these units during the process where a large
number of collisions occur.
The following items are selectable:
- their initial energy (for example 30 - 500), minimum=1
- the number of units (typical values are 100-10,000), minimum=50
- the number of collisions (to reach equilibrium generally
requires > 2.5 times the number of units), minimum=200
A target and projectile are selected at random and the energy
lost by the projectile to the target is also selected at random.
This process continues for the selected number of collisions,
which can be over 100,000.
The initial energy distribution is one in which all the units
have the same energy. By varying the number of collisions it is
possible by monitoring Ln W to see how many are required before
an "equilibrium" distribution results. This appears as a
Boltzmann-like curve.
To note
The START button initially appears green. During the
simulation this changes to grey and will revert to green when it
is finished. (needs fixing).
The values in the textbox show the population of the energy
levels and the value of Ln W taken at 100 intervals throughout
the simulation. Use the right mouse button to click in the
textbox to copy the information to the clipboard for use in a
Spreadsheet.
SwingJS (to convert Java to JavaScript) is in development by Prof Bob Hanson.
Authors:
R. M. Hanson (hansonr@stolaf.edu),
Debbie-Ann Facey, R.J. Lancashire (robert.lancashire@uwimona.edu.jm)
and W.R. Pinnock (willard.pinnock@uwimona.edu.jm) Department of Chemistry,
C. Muir, (christopher.muir@uwimona.edu.jm) FST, UWI, Mona Campus, Kgn 7, JAMAICA,