WHAT IS IT?
-----------
     This program simulates the behavior of gas molecules in
a box.  It was one of the original CM StarLogo applications
(under the name GPCEE) and is now ported to mac StarLogo as
part of the Connected Mathematics Modeling Project. This is
a preliminary version. The final version will come out with
a set of "kinetic molecular kits" that are under development
as part of the project.
     Molecules are modeled as single particles with mass 
and velocity. Collisions with the box and between molecules 
are elastic. Particles are colored according to speed -- blue
for slow, green for medium, and red for high speeds.

HOW TO USE IT
-------------
     Because of the number of variables used in this
simulation you must open the starlogo.patch file and
increase the turtle length from 256 to 384 and the stack
size from 28 to 40.
     To start set the number of molecules by setting the
"number" slider, the initial speed by setting the "intvelc"
slider, set the initial mass of all particles by setting
the "intmass" slider, and set ths size of the box as a
percentage of the size of the StarLogo window with the
"boxsize" slider.  Using high initial velocity may cause
problems with "energy" overflowing the 32k Starlogo variable
limit.  The "setup" button will create the molecules all
with the same speed and mass. The go button will run the 
simulation. 
     As the simulation runs you can histogram the velocity
of the molecules or the energy of the molecules in the plot
window.  The plotfrq slider determines how many clock ticks
will seperate each update of the histogram and the histgrm
slider determines how many bins the histogram function will
use.  You can also plot the number of molecules of each
color or the total energy of the system as line graphs in
plot window.    

RUNNING the MODEL
-----------------

        THINGS TO NOTICE
        ----------------

        What is happening to the molecule colors?

        Why are there more blue molecules than red ones?

        The molecule histograms quickly converge on the 
	classic Maxwell-Boltzman distrbution. What's special 
	about this curve?


        THINGS TO TRY
        -------------

        * Set all the molecules in the center of the box - 
	what happens?

        * Create two different gases, by setting half the 
	particles to a different mass. What happens to the 
	heavier molecules?

        * What do you notice about the histogram of speeds? 
	Are there other interesting quantities to histogram?


EXTENDING THE MODEL
-------------------

How can you measure pressure in the box?

What would happen if you introduced a piston into the box,
that compressed and released the gas?

What happens if the collisions are non-elastic?

What happens if you introduce heat and/or cold plates?

How does the 2-D model differ from the 3-D model?

What happens if the molecules are modeled as diatomic? 
multi-atomic?

STARLOGO FEATURES
-----------------

Notice the use of the plot window to do histograms. 
Histograms can also be implemented using the StarLogo window.

Collisions are detected by the turtles. What happens if we 
let the patches detect them?