Contents

This copy of Gassim is supplied freely for the purposes of evaluation only. Should you decide that you want to use the program for teaching, demonstration or other purposes you should purchase a licensed copy. For pricing and ordering information contact:

IME Software

P.O. Box 1153,

Toowong QLD 4066,

AUSTRALIA

Phone/Fax: +61 7 870 2317

Please make this evaluation copy available to others whom you think might be interested in using Gassim.

Some functions have been disabled in the evaluation copy of Gassim. This includes the ability of save simulations.

You can purchase a single user licence or a site licence depending upon your needs. A site licence allows the program to be used on any number of computers within the one organisational area.

To learn some of the basics about Gassim choose on of the following topics:

Introduction to GASSIM

How do I ... ?

Why does ... happen?

Menus


Introduction
Introduction to GASSIM

Look in any introductory physics text with a section on statistical mechanics or kinetic theory and you will probably find diagrams illustrating the motions of the molecules of an ideal gas. Concepts such as Mean free path, Brownian motion, Maxwell-Boltzmann distributions etc all rely upon visualising and describing the motions of many particles. Mathematical relationships can be developed but, unlike many other areas of physics, it is difficult to devise experiments which can be used to directly demonstrate or verify the theory.

GASSIM brings these concepts to life with an animated simulation of the motions of "molecules" within a box. The simulation is two dimensional but the underlying concepts and theories need little modification from those of the three dimensional world.

A huge range of possibilities exist for the use of GASSIM in demonstrations... simple collisions processes between two molecules, propagation of pressure disturbances, diffusions relationships, the vertical distribution of molecules under the influence of gravity etc.

I hope you find GASSIM to be of use and would welcome any feedback which you care to supply regarding possible future improvements.


How do I ... ?
How do I ...

Change the size of the molecules?

Speed up the simulation?

Find the "temperature" of the molecules?

Find out how much "time" has passed in the simulation?

Find out how big the box is?

Extract numerical data from a simulation?

Find the coordinates/velocity of a molecule?


Why does ... happen?

Molecules sometimes appear to overlap.

Molecules (or parts of them) seem to change colour.

The title bar say "Another Molecule Simulator!?"

Other programs run slowly when GASSIM is running.

Molecule tracks are erased sometimes.


Menus

For specific help on a menu item select the top level menu:

File

Set up

Boundaries

Data

Run

Options

Info


File menu
Menu: File

Save

Retrieve

Work directory

About

Quit


Saving a simulation
Menu: File -- Save (Saving a simulation)

A simulation can be saved at any point by selecting this menu item.

A dialog box prompting for a file name will appear. Enter the desired filename in the space indicated. A default extension of .SIM is added automatically. However you may enter a different extension if you desire.

The file will be saved in the same directory from which GASSIM was started.

If a file with this name already exists then you will be asked if you want to replace the file or not. If you answer NO then the save operation is aborted.

All currently selected parameters including the window size are saved along with any data which has been generated, eg. MFP data.


Retrieving a simulation
Menu: File -- Retrieve (Retrieving a simulation)

You may retrieve a previously saved simulation from disk using this menu item.

A dialog box prompting for the filename to be retrieved will appear. You may either:

Enter the desired filename and press Ok.

If no extension is specified a default extension of .SIM is added.

Enter a wild card filename and press Ok.

The list of files in the list box will be updated.

Select a file from the list box and click on Ok or double click on the filename in the list box.

The list box displays files in the current directory. The directory may be changed by moving to the end of the list and selecting one of the directories listed there.


Working directory
Menu: File -- Work Directory

Use this menu item to bring up a dialog box which enables you to set the default directory for save and retrieve operations.


Exiting GASSIM
Menu: File -- Quit (Exiting GASSIM)

You may exit GASSIM at any time simply by selecting this menu item or double clicking on the system menu bar at the top left hand corner of the window.

All information will be lost unless you have saved the simulation.


About GASSIM
Menu: File -- About

This menu item brings up a message box containing information about the version number and release date of GASSIM and the rightful owner of the paricular copy of the program.


Set up menu
Menu: Set up

Reset

Parameters

Initial speeds

Zero speeds

Sample box

Grid size

Modify


Reseting the simulation
Menu: Set up -- Reset

At the start of a simulation the position and speed of each molecule is chosen randomly (subject to any overriding constraints). Selecting this menu item resets all molecule positions and speeds to new random values.


Parameters
Menu: Set up -- Parameters

Selecting this menu item starts a dialog box containing slider bars which allows you to vary:

The total number of molecules in the simulation.

The maximum number of molecules has been set to 1000.

How the total number of molecules is divided up between species one and species two.

For simplicity set this parameter after you have set the total number.

The drawn radii of species one and two.

The interaction radii of species one and two.

The mass of species two relative to species one.

This slider bar has a logarithmic scale giving finer control at smaller settings.

The acceleration due to gravity. This maximum value is 1 px/tk/tk.

To the right of each slider bar is the number associated with the parameter.


Initial speeds
Menu: Set Up -- Initial Speeds

Selecting this menu item starts a dialog box which allows you to specify the distribution of initial speeds for the molecules.

GASSIM always assigns a molecule an initial speed somewhere between zero and a preset maximum value that is appropriate for the simulation. Unless you specify otherwise (see below) the initial speeds will be distributed uniformly over this range. Once the molecules begin colliding, the distribution of speeds quickly evolves toward some equilibrium distribution (provided there are a large number of molecules).

For the purposes of specifying a non-uniform distribution of initial speeds, the range from zero to the maximum assigned speed is broken up into ten sub-ranges or bins. Within the initial speeds dialog box you will see ten slider bars. The relative position of these sliders represents the relative number of molecules which will be assigned speeds within each of the correspondings sub-ranges or bins. The actual number of molecules in each bin appears below the slider bars. Note: because you are distributing a fixed number of molecules, if you change one slider bar the numbers assigned to the others must also change.

You can assign different initial speed distributions to the two molecular species. Select the radio button corresponding to the species which you want to set. If you want to assign the same distribution to both species then choose "Both".

When you are satisfied with the shape of the distribution press Ok. Pressing Cancel will return the initial distributions to whatever state they were in previously.

In general if you want to make a hot gas, set the initial speed distribution to have most of the molecules in the right hand speed bins. Conversely a cold gas will have most of the molecules in the left hand speed bins.

Notes:

The distribution of molecules is still random within each of the ten sub-ranges and the actual distribution as indicated by the distribution viewer will show random variations from what you have specified.

Although GASSIM initially limits the maximum speed assigned to a molecule, the random collisions of molecules will mean that some molecules end up with speeds greater then this initial maximum. Thus if you have fixed the X axis of a speed distribution in the distribution viewer you might find that the right hand bin begins to fill up since it will now contain all the molecules which have increased their speed beyond the limit of the X axis.

See also: Rescale maxmimum speed


Zeroing molecule speeds
Menu: Set up -- Zero Speeds (Zeroing molecule speeds)

Selecting this menu item will set the speeds of all the molecules to zero. There may not seem to be much point in doing this, and there isn't, unless you then manually modify the speed of some of the molecules.


Sample Box
Menu: Set Up -- Sample Box (Sample Box)

Selecting this menu item will display the sample box if it is not already active and allows you to modify its position and size. After selecting the menu item, move the mouse cursor into the GASSIM window, click and hold down the left mouse button. The cursor will jump to the top left hand corner of the sample box and you can drag the box around the window. When the top left hand corner is where you want it, release the left mouse button.

Click and hold the left mouse button again and the mouse cursor will jump to the bottom right hand corner of the sample box. Drag the box to size and release the left mouse button.

You can repeat these steps any number of times, each click of the left button swaps between dragging and sizing the box.

When you have finished click once on the right mouse button, the sample box is then defined.

See also: Sample Box Count, Distributions, Full Dump


Grid size
Menu: Set Up -- Grid size

This menu item starts a dialog box which allows you to change the number of grid spacings in the x and y directions. Enter the desired number of grids (between 2 and 20) and click on OK. To see the grid or to update the grid display before exiting the dialog box, use the Grid On/Off button to turn the grid on. (If the grid is already on then push the button once to turn it off and a second time to turn it back on with the new settings.


Modifying positions and speeds
Menu: Set Up -- Modify

Selecting this menu item allows you to modify the position and velocity of individual molecules. The simulation is stopped when this menu item is selected.

You can also use this function to obtain information on the coordinates or velocity of individual molecules (for example when observing Brownian motion).

A molecule info dialog box will appear which will display the position, velocity, speed and identification number of the molecule you choose to select. There are two buttons in this dialog box:

Done

Use this button when you have finished all the modifications that you want to make.

Close

Use this button if you want to hide the molecule info dialog box but still make modifications. You can make the dialog box reappear by reselecting the Set Up -- Modify menu item.

You modify the position of a molecule by pointing to it with the mouse and clicking the left button. The cursor will change to a cross at the centre of the molecule. Drag the cross to a new position and release the button to reposition the molecule. A "rubber band" will join the cursor position to the molecule that is to be moved.

You change the velocity of a molecule by pointing to it with the mouse and clicking the right mouse button. The cursor will change to a rubber banding arrow anchored to the centre of the molecule. The arrow represents the current velocity of the molecule. Drag the velocity vector to obtain the desired direction and speed and release the right mouse button to finish.

Click and release the right mouse button on a molecule to update the information display without changing the molecules position or motion.

The modify process will be ended if you run the simulation.


Boundary menu
Menu: Boundary

Hole in wall

Tube on hole

Size hole

Recirculate

Free Wall

Randomising walls


Separating wall
Menu: Boundary -- Hole in wall

GASSIM allows you to position a wall vertically within the window. This wall generally has a hole in it.

Checking this menu item turns on the display of this wall. To turn the wall off reselect the menu item.

When the simulation is reset and a separating wall is present, species one molecules are confined to the left side of the wall and species two molecules to the right.

After checking this menu item you can reposition the wall and size the hole using the mouse, see Menu: Boundary -- Size Hole


Exiting tube
Menu: Boundary -- Tube on Hole

Checking this menu item draws an exit tube on the hole in the separating wall. Molecules can pass along this tube and exit the simulation at the right hand edge of the window.

You can use this tube to investigate the apparent viscosity of gasses as a function of the mean free path or demonstrate the escape of gas from a punctured space vessel.

When the exit tube is active you can only have one species of molecules in the simulation.

When all the molecules have exited the Setup Parameters dialog box is started automatically.

See also: Recirculate, Exit times


Positioning wall/Sizing Hole
Menu: Boundary -- Size Hole

To position the separating wall and size the hole, select this menu item then move the mouse cursor into the window and click and hold the left mouse button. The cursor will jump to the top of the hole. You may slide the wall horizontally and change the size of the hole by moving the mouse while holding down the left mouse button.

When you have finished press the right mouse button to disable further changes to the wall or hole until the Size Hole menu item in reselected.

When you first check the Hole in Wall menu item the wall and hole may be adjusted in the manner just described without explicitly selecting the Size Hole menu item.


Recirculate
Menu: Boundary -- Recirculate

This menu item is used in conjunction with an exit tube. When molecules exit the right hand side of the tube they are lost from the simulation unless this menu item is checked, in which case molecules hitting the right hand end of the exit tube are transported back to the left hand side of the window and re-enter the simulation.

When molecules are recirculated in this fashion, they re-enter with the same velocity and the same Y coordinate as they left the right hand side so that the overall kinetic energy and gravitational potential energy (if gravity is active) of the system are maintained.


Free Wall
Menu: Boundary -- Free Wall

If a dividing wall has been enabled by checking the Hole in Wall then checking this item will allow the wall to move in response to the collisions with molecules. This allows a hot gas on one side to expand against a cold gas on the other - thus demonstrating the tranfer of energy between the gases by work done.

Note that if the Randomising walls option is checked then checking Free Wall will have no effect.

The wall is taken to have 1000 times the mass of the species one molecules, a value which gives reasonable looking results.


Randomising Walls
Menu: Boundary -- Randomising Walls

Normally molecules interact with walls as if the walls were perfect "mirrors". The angle of incidence equalling the angle of reflection. Checking this menu causes the angle of reflection to be randomised. The speed of the rebounding molecule is unchanged, only the direction is affected.

This option is provided to partially model the affect of "real" walls which, at a moelcular level, must be rough and cause specular type reflections.

Checking this menu item has a dramatic effect on the passage of molecules along an exit tube and demonstrates the difficulty of evacuating a vessel through a tube when the mean free path is long comared to the diameter of the tube.


Data menu
Menu: Data

The items in this menu are concerned with exporting numerical data from the simulation for use in speadsheets etc.

Numerical data is copied to the clipboard from where it can be pasted into other applications or saved as a text file.

MFP data

Clear MFP data

Tagged History

Clear tagged history

Sample box

Distributions...

Functions of time...

Exit times

Pressure...

Entropy...


MFP data
Menu: Data -- MFP data

MFP = Mean Free Path. Selecting this menu item puts the data from which the mean free path of the molecules can be calculated into the clipboard.

If you want to differentiate between two species, the data for species one is dumped first. For example if you have 300 molecules in species one and 100 in species two then information on all 400 molecules is copied to the clipboard and the first 300 entries correspond to species one.

For more information see Menu: Options -- MFP Calcs


Clearing MFP data
Menu: Data -- Clear MFP data

Data is collected on the mean free path of molecules for the life of the simulation. If changes are made to the parameters, eg. interaction radius you will probably want to obtain fresh data to calculate the MFP. Selecting this menu item clears out the arrays containing the information on inter-molecular collisions.

For more information see Menu: Options -- MFP Calcs


Tagged History
Menu: Data -- Tagged History

If a molecule has been tagged then information on the collisions it has undergone may be copied to the clipboard by selecting this menu item. Information on the distance travelled between collisions for up to 250 collisions is stored.

Once the tagged molecule has undergone 250 collisions, no more data is collected unless the Clear Tagged History menu item is selected.

The tagged molecule history may be used to look at the statistics (dispersion) of the distance travelled by a molecule between collisions rather than simply at the mean value which is obtained with the mean free path data.


Tagged History
Menu: Data -- Clear Tagged History

Selecting this menu item clears the tagged molecule history and allows fresh information to be collected on up to another 250 collisions.


Sample Box Data
Menu: Data -- Sample box

This menu item brings up a sub menu with the following items:

Count Molecules

Full Dump


Sample Box Count
Menu: Data -- Sample box -- Count Molecules

Selecting this menu item counts the molecules within the sample box and copies the results to the clipboard. If two species are involved then each species is counted independently.


Sample Box Dump
Menu: Data -- Sample box -- Full Dump

Selecting this menu item copies full information on the positions and velocities of all molecules within the sample box into the clipboard. If two species are involved then information is separated according to species.


Export Format
Menu: Data -- Export Format

This menu item brings up a sub menu containing two items, one of which may be checked at a time:

Flat Ascii.

If this item is checked then data copied to the clipboard will be in a simple text format which may be pasted into almost all spreadsheets (it may need to be parsed once pasted) or pasted into a text editor etc.

Microsoft SYLK.

If this item is checked then data copied to the clipboard is in a microsoft SYmbolic LinK format which can be pasted into microsoft spreadsheets (eg. Excel). The use of this format means that data will be separated into cells correctly and will not need to be parsed.


Exit Times
Menu: Data -- Exit Times

If an exit tube is in use and molecules have been lost from the right hand end of it then selecting this item copies a list of the times (in ticks) at which each molecule left the simulation to the clipboard.


Pressure
Menu: Data -- Pressure...

Selecting this menu item brings up a dialog box which displays the "pressure" acting against each of the walls of the window. The "pressure" is calculated from the component of momentum transferred perpendicular to the wall by the molecules hitting the wall. The momentum transferred is divided by the time interval over which it occurs and the length of the wall, exactly analogous to basic kinetic theory in three dimensions.

Note that normally any momentum exchanged between molecules and a wall will be perpendicular to the wall. However, if the Randomising walls option is checked then the momentum transferred during each collision need not be perpendicular to the wall. Averaged over many collisions the tangential component will turn out to be zero.

Click on the Reset button to clear the accumulated momentum transfer values and restart the time interval.


Entropy
Menu: Data -- Entropy...

Selecting this menu item brings up a dialog box which displays the "entropy" of the simulation.

Since GASSIM works at the "microscopic" level it is necessary to use a statistical measure of entropy. Entropy could be calculated from the other state variable of the simulation, i.e. temperature and volume, in much the same way as can be done for a real ideal gas. However this will always return the same number. That is because the calculation involved assumes the system is in thermal equilibrium - generally a macroscopic concept. Gassim simulations need not be in thermal equilibrium hence there will be entropy changes as the simulation evolves.

The method used in calculating the entropy looks at both the spatial distribution of the molecules with the window and their speed distribution.

The spatial distribution is used as follows: The window is divided up into regions 40px square. The number of molecules withing each such square is counted. If there are M squares in the window and N1, N2, N3, ... NM molecules in squares 1, 2, 3, ... M respectively, then the spatial distribution contributes to the entropy according to the formula: log [ N!/N1!/(N-N1!) * (N-N1)!/N2!/(N-N1-N2)! * (N-N1-N2)!/N3!/(N-N1-N2-N3)! ]

Some factors cancel in this expression, it is written out this way to establish the link with the number of ways of "selecting marbles and putting them into boxes".

The speed distribution is treated in the same way. The molecular speeds are histogrammed in bins 2px/tk wide. The same sort of calculation is done using the number of molecules in each speed bin. The two contributions, spatial and speed, are calculated, summed and displayed after each tick. Since the calculation is done by summing logarithms not calculating all the products (to avoid overflow problems) it can take some time to update the entropy display. This will slow the simulation down considerably except in the case of large numbers of molecules where the extra calculation time is smaller than the time taken to update the molecular positions.


Distribution Viewer
Menu: Data -- Distributions (Distribution Viewer)

Selecting this menu item starts the distribution viewer dialog box. The distribution viewer displays histograms of molecular speeds, velocities and spatial distribution. The histogram information can also be copied to the clipboard for data analysis using other packages.

At the bottom of the distribution viewer dialog box there are three groups of radio button controls:

Species:

These buttons (One, Two and Both) select whether the distribution of an individual species (One or Two) or all the molecules (Both) is displayed. The radio buttons Two and Both will only function if the two-species option is set.

Type:

These buttons (Spd, Vel, En, Pos) select whether the distribution is of molecular speed (Spd), components of molecular velocity (Vel), molecular energy (En) or molecular position (Pos).

In the case of velocity and position distributions the relevant axis should also be selected (see below). In the case of a position distribution, the number of bins in the histogram is the same as the number of grid spacings along the relevant axis.

When a speed distribution is displayed the RMS speed of the molecules is indicated by a vertical line in the distribution window. If both species are selected for the distribution then three lines are displayed. The red line is the average RMS speed of all the molecules, the green line is the RMS speed of species one and the yellow line is the RMS speed of species two.

When an energy distribution is displayed vertical lines indicate the mean energy as for the speed distribution.

Speed, velocity and energy histograms are always displayed with 50 bins.

Axis:

The radiobuttons X and Y only have an effect when a velocity or position distribution is selected. When this is the case they determine which velocity compontent (Y for vertical X for horizontal) is used. For velocity distributions the signed value of the velocity is used and the histogram is offset so that zero speed is the boundary between bins 24 and 25.

The third button in this group (Grid) displays the two dimensional distribution of molecules by drawing a grid of rectangular boxes which represent the number of molecules in each grid section.

The next group of controls contains four check boxes:

Auto Update:

When checked the distribution display will be updated each time the position of all the molecules is updated. If not checked, the display is only updated when the Update button is used or the settings of the radiobuttons are changed.

Hold X:

This control only has an effect when either speed or velocity distributions are being viewed. It has the effect of freezing the horizontal scale of the histogram. If not checked the horizontal scale adjusts automatically to keep the maximum value in range.

Hold Y:

Similar to Hold X but freezes the vertical axis of the display. When Pos and Grid are selected, Hold Y freezes the scaling used in drawing the rectangular boxes.

Sample Box:

When a sample box has been defined checking this box causes the distributions to be calculated using only molecules within the sample box. By setting this checkbox you can use the sample box as a probe to look at conditions in different parts of the window, for example measuring the mean energy to infer the temperature. Watch out though, when the number of molecules in the sample box is small the statistics will be terrible and you will have to time average to obtain anything meaningful.

Finally there are three push buttons on the right hand side:

Update:

This button may be used to update the display of the distribution. If the Auto Update check box is unchecked then the display remains frozen until this button is pushed or the settings of the radio buttons is changed.

Export:

When this button is pushed, information on the currently displayed distribution is copied to the clipboard for use with other packages.

When either speed, velocity or energy histograms are exported the bin width is also exported to allow you to scale axes correctly.

Close:

Click on this button to close the distribution viewer dialog box.


Functions of time
Menu: Data -- Functions of time...

Selecting this menu item starts a dialog box which allows you to view plots of some variables (e.g. entropy, etc.) as a function of time. You can view up to eight different variables at the one time using eight different coloured "traces". Each trace can be scaled independently but all have the same time axis (like an oscilloscope).


Run menu
Menu: Run

Run

Step one tick

Step N ticks


Run/Stop
Menu: Run -- Run (Stop)

Select this menu item to start or stop a simulation. The menu item changes to stop whenever the simulation is running.

Whenever a simulation is started by selecting RUN it is saved in a file called LAST.SIM in the current working directory. You can always recover your initial state by loading this file if you find something of interest occurs and you want to re-run exactly the same simulation again.

When selected the Set Up -- Modify function is terminated if active.


Step One Tick
Menu: Run -- Step One

Selecting this item causes a single update of the position of all the molecules. Time advances by one tick


Step N Ticks
Menu: Run -- Step N Ticks

Selecting this item starts a dialog box which allows you to specify the number of times to update the position of all the molecules. If you stop the simulation before the N ticks have passed, the default number of ticks is set to the number remaining.


Options menu
Menu: Options

Collisions

Two species

Tag one

Track it

Track All

Clear Track

MFP calcs

Grid

Sample box

Be A System Hog

Rescale maximum speed

Colours...

Default colours


Collisions
Menu: Options -- Collisions

When this menu item is checked then the molecules will collide with one another. When it is not checked there is no interaction between the molecules which will then only collide with the walls.

The purpose of having this option is simply so that things like random variations in spatial distribution can be demonstrated for a large number of molecules without the added complication of collision processes. Also the speed and velocity distributions remain static in the absence of collisions.

(Actually its not a very useful option but it was trivial to include.)


Colours
Menu: Options -- Colours

This menu item starts a standard Windows colour selection dialog box. To set the colours for GASSIM you must click on the Define custom colours button and set the first nine custom colours.

In order these colours are:

Background

Species one

Species two

Tagged molecule

Grid

Sample box

Dividing wall

Text (tick counter when minimised)

Tracks

Note that GASSIM uses an XOR function when drawing molecules to the screen and unfortunately the method which Windows uses to combine the existing screen colour with the specified colour is unfathomable. You may need to try trial and error to get the colour you actually want when using a background which is not black.

The current colour selection is saved in the file GASSIM.CLR and is re-used each time you start GASSIM. You can use the Default Colours command to return to the standard colour scheme.


Default Colours
Menu: Options -- Default Colours

This menu item resets the colour scheme to the standard factory settings.


Two Species
Menu: Options -- Two Species

When this menu item is checked, the total number of molecules is divided up into two different species. These species are coloured differently and may be used to demonstrate diffusion processes among other things.

The way in which the molecules are divided up between the two species types is controlled by the Species One slider bar in the parameters dialog box.

When this menu option is unchecked then there will only be one species regardless of the settings in the parameters dialog box. You can achieve the same end result as unchecking the menu item by setting the Species One slider bar all the way to the right in the parameters dialog box.

The drawn radius, interaction radius and the relative masses of the two species can be set independently by the control in the parameters dialog box.

Spatial, speed and velocity distributions can be viewed for both species either independently of combined.


INFO menu
Menu: Info

Time

Window

Sample box


Elapsed simulation time
Menu: Info -- Time (Elapsed simulation time)

Select this menu item to find out how many ticks have passed.


Window size
Menu: Info -- Window (Window size)

Select this menu item to find out the dimensions of the window and/or the position of dividing wall (if any) and size of hole in the wall


Sample box size and position
Menu: Info -- Sample box (Sample box size and position)

This menu item provides the coordinates of the corners of the sample box if it is defined


Tagging a molecule
Menu: Options -- Tag One (Tagging a molecule)

When this menu item is checked a molecule will be tagged for identification.The tagged molecule will be coloured blue.

When this item is first selected a molecule will be selected at random and tagged. While the menu item is checked you may move the tag to any molecule simply by pointing at the desired molecule and clicking the left mouse button once.

To turn the tag off, simply reselect the same menu item.

You may tag a molecule simply to aid in observing its motion around the window or to enable specific data about its motion to be collected.

See also: Tracking a molecule, Tagged History


Tracking the tagged molecule
Menu: Options -- Tag One (Tracking the tagged molecule)

If this menu item is checked then a line or "track" will be drawn behind the tagged molecule. The trail is useful for qualitative observations of the motion of the molecule over an extended period of time.


Tracking all molecules
Menu: Options -- Track All (Tracking all molecules)

When this menu item is checked, then a line or "track" will be drawn behind every molecule in the simulation. This feature is really intended for simulations with small numbers of molecules. In particular, GASSIM can be used to demonstrate collision processes between colliding balls in much the same ways as an air table with pucks. The difference here is that there are no frictional losses. The best way to do this is to set up a simulation with two (or a small number) of molecules, set the positions and speeds using the Set up -- Modify menu item and track all the molecules for a set number of ticks.


Mean Free Path calculations
Menu: Options -- MFP calcs

MFP = Mean Free Path. When this item is checked, GASSIM sets aside memory to hold information about the number of collisions that each molecule has undergone and the total distance that each molecule has travelled. These two pieces of information can be used to calculate the mean free path by dividing the distance travelled by the number of collisions and averaging over all the molecules.

If you are short of memory, you may get an error message that these calculations cannot be performed.

Since the calculations add some little time to that taken to update the position of the molecules, you can obtain a modest increase in speed by leaving this option unchecked.

When calculating the total distance travelled, collisions with the walls are taken into account correctly. The number of collisions is that with other molecules and does not include collisions with walls.

The arrays which hold the information necessary to calculate the MFP are saved along with other simulation data.

See also: Menu: Data -- MFP data and Menu: Data -- Clear MFP data


Grid display
Menu: Options -- Grid (Grid display)

Checking this menu item turns on an overlaying grid against which the motion of the molecules can be observed. This grid defines the size of the histogram bins used in displaying the spatial distribution of molecules.

See also: Menu: Set Up -- Grid Spacing


Sample box display
Menu: Options -- Sample Box (Sample box display)

Checking this menu item turns on the display of a sample box. The sample box can be used to gather information on molecules in a specific part of the window as compared to the total window.

The size and position of the sample box are set using the Set Up -- Sample Box menu item.

See also: Sample Box Count, Distributions, Full Dump


Time
Time (ticks)

GASSIM updates the positions of the molecules at discrete simulation time intervals. These intervals are called ticks. Since the dimensions of GASSIM land have no direct relationship with the physical world, the "size" of a tick cannot be expressed in seconds or any other real unit of time. Hence time in GASSIM is measured and expressed in ticks, tk for short.


Distance
Distance (pixels)

The dimensions of objects in GASSIM land have no direct relationship with the physical world and hence a unit of length must be defined. It is most convenient to use the smallest dot that can be drawn on the display, the pixel, to measure lengths.

The size of molecules, the distances they travel etc are all expressed in pixel units or pxfor short.


Clearing the track(s)
Menu: Options -- Clear Track (Clearing the track(s))

Selecting this menu re-paints the display so that all tracks are erased.

Complete information about tracks is not recorded. The tracks exist only as lines on the window display. Thus the use of the tracks is limited to qualitative observations.

Whenever the window is re-painted the tracks will be erased and are not recoverable. Some things other than this menu item that cause the window to be re-painted are:

Minimising and restoring the window.

Uncovering part of the window that was covered by another window.

Changing the molecule that is tagged.

Changing the drawn radius of the molecules.Screen saver becoming active.


Interaction radius and simulation speed

GASSIM reduces the number of calculations it needs to perform when checking for colisions with a molecule by only checking other molecules which are "nearby". What "nearby" means depends upon how big a molecule is; the larger the interaction radius of the molecules, the bigger is the surrounding area that must be checked. Hence there are likely to be more molecules in the surrounding area, requiring a corresponding increase in processing each of these neighbours.


Drawn radius of molecule
Drawn radius

The drawn radius is the radius of filled circle displayed on the screen. It has no effect except the visual one. If two species are being used then they may have different drawn radii.

You change the drawn radius by using the Parameters dialog box.


Interaction radius of molecule
Interaction radius

The interaction radius is the radius which GASSIM uses when deciding whether a molecule has collided with a wall or another molecule. If two species are being used then may have different interaction radii.

You change the interaction radius by using the Parameters dialog box.


Running multiple copies of GASSIM

You may run more than one copy of GASSIM at a time. This may be intentional or simply a mistake.

To alert you to the fact that more than one copy of GASSIM is running, the title of the window is changed to "Another Molecule Simulator!?".

You may want to run several copies of GASSIM to demonstrate the effect of varying some parameter in two different windows. However, GASSIM is a significant user of system resources and you can expect things to grind to a halt pretty quickly if you run several simulations containing large numbers of molecules.


Hogging the system
Menu: Options -- Be A System Hog (Hogging the system)

This option controls how frequently GASSIM will "yield" to the system to allow switching between applications.

If the option is checked then GASSIM will update the position of all the molecules before yielding to the system.

If the option is not checked then GASSIM will yield to the system after updating each molecule.

The effect of this option will vary depending upon what other applications are running. You can expect GASSIM to slow down by at about 10% to 20% under typical circumstances if this option is not checked.

If the option is checked and you are running a simulation with a large number of molecules then you can expect GASSIM to take a second or more (depending on the parameters) to complete the update. During this time, other applications will appear to freeze.

The setting of this option will have little effect when only a small number of molecules are in the simulation.


Rescale maximum speed
Menu: Options -- Rescale maximum speed

This option controls whether or not GASSIM chooses a more appropriate maximum initial speed for molecules when the size of the window is changed. If it is checked then the maximum speed is rescaled in proportion to the smallest of the window's dimensions and the average kinetic energy will change significantly if the window is resized. If the option is not checked then the current maximum speed is kept regardless of changes in window size and the mean kinetic energy will only change because of the random differences in initial speeds when the window is resized. If you choose to uncheck this item then be warned that it is possible, if the window size is changed from very large to very small that some fast molecules may "jump out of the window" on each iteration and hence the collisions with the walls will not look particularly nice.


Speeding up GASSIM

There are several things you can do to obtain the best possible speed from GASSIM apart from buying a faster computer.

Even though the molecules are drawn by "blitting" pre-drawn bitmaps onto the display, GASSIM generally spends more time updating the display for large number of molecules than it does in performing other calculations.

The largest increase in speed can therefore be obtained without compromising other parameters by minimising the amount of drawing that needs to be done.

You can several things in this regard:

Make the drawn radius of a molecule small. This reduces the number of pixels which must be changed on the display at each refresh and can dramatically increase the speed.

Minimise GASSIM's window when you are simply waiting rather than observing. When a simulation is running, GASSIM's icon represents the top left corner of it's normal window. Molecules are only drawn when they enter this corner and for reasonable sized windows this can mean a great increase in speed.

Cover most of the window with another window or move the window so that most of it is off the screen.

There are some other things which affect the speed of GASSIM:

Large interaction radii coupled with large numbers of molecules. Why?

Whether the Be a System Hog option is set or not.

Whether the MFP calcs options is set or not.


Initialisation constraints
Initialisation constratins

Things that constrain the initial positioning and speed of molecules:

Initial speeds

Separating Wall


Temperature

The "temperature" of the molecules is related to the average kinetic energy. In the real world, each degree of freedom of a molecule contributes kT/2 to it's mean energy. Where k is Boltzmann's Constant and Tis the absolute temperature. In Gassim land there are only two degrees of freedom for each molecule so the mean energy of the molecules is simply kTcompared to 3kT/2 in the real world. You can find the mean energy of molecules by starting the distribution viewer which displays this information at the top of it's window.

Boltzmann's constant of course has no real meaning in Gassim land and we are free to choose any value for k in Gassim which then defines the temperature scale. If you take k = 1 then the mean energy is numerically equal to the temperature. Once again we need a unit for the temperature, call them degrees GASSIM.


Mass

Mass is measured in terms of the molecular mass of species one molecules, abreviated by the letter u.


Energy

Since distance is measured in px, time is measured in tk and the unit of mass is the molecular mass, u, then the unit of energy would be the combination of molecular mass multiplied by pixel per tick squared. This deserves a name -- lets call it the Pep and abreviate it by Pe. As with all the other units in Gassim there is no relationship between the Pep and the Joule of three dimensional fame.


Overlapping molecules

Time in the simulation progresses as a series of small steps called ticks. The motion of a molecule is calculated as a series of steps or jumps which correspond to the distance that would have been travelled during one tick. It is possible that two molecules will land either on top of one another or at least overlap to some extent after they have both "jumped". These overlaps will occur quite frequently when the area occupied by the molecules becomes a substantial fraction of the area of the window.

Overlapping rarely causes problems with the statistical modelling of GASSIM and can be an interesting topic for investigation when it does!

When molecules overlap the overlapping portion changes colour.

When a simulation is reset no attempt has been made to prevent molecules overlapping. This might bias mean free path results etc. To avoid this you might want to run the simulation until things sort themselves out and then clear the MFP data to obtain unbiased results. However if you plan to run the simulation for a large number of ticks then the effect of any initial overlaps will generally be insignificant.


Gravity

If a non-zero value for gravity has been set in the parameters dialog box then molecules will accelerate towards the bottom of the window.


---***---NOT YET IMPLEMENTED---***---


MFP = Mean Free Path