MANUAL: INTERGALACTIC GRAVITATIONAL MOTION SIMULATOR
Background
The Intergalactic Gravitational
Motion Simulator (version 3.2), or IGMS, was
developed
by Daniel Perley in early 2000 for use as part of a science fair project.
Written
in Borland C, it models the gravitational interaction between galaxies, which
is
thought
to be the major cause of peculiar galactic structure seen in the universe. The
simulation
model is Newtonian, so all motion is based on Newton's laws, most
fundamentally
the universal law of gravitation.
Outline
The simulator models two galaxies,
each with a rotating disk of a user-
specified
number of tracer particles. The orbit
of the galaxies is specified by a
number of parameters, as are the properties
of each galaxy.
The simulation consists of three
'pages' (scroll through using F2), each
with
a distinct function. The 'properties'
page is used to save and load files and
to activate various simulation options, such
as coloration and tracking. This page
is
the only one from which the simulation can be run (using the F1 command). The
'galaxies'
page specifies the essential galactic and intergalactic model parameters
and
is used to change the sizes of the galaxies, the shape of their orbit,
etc. The
'particles'
page, which cannot be accessed if there is an error in the galaxies page
inputs,
simply lists the essential properties for each particle.
Page 1 – Properties
File
Simulation
Name – the file name under which the simulation will be stored if
Output is set to disk of the file to be loaded if Input
is set to file
Input
– the source of the coordinate data
simulation – use the simulator to move the particles
file – load positions from a disk file
Output
– where to store the coordinate data
none – no data storage
RAM – temporarily hold data in memory (this is unlikely to be used)
disk – save data to a disk file
Record
Frequency – data stored to disk is recorded every n timesteps
(not every n sdu.)
Since the simulation size is limited to 65
recordings, you should
set this to the duration of your intended
simulation (in
timesteps) divided by 65.
Load
Settings – Load the interface settings from a previously saved file.
Save
Settings – Save all entered fields to disk as a .SET file.
Note: The size of an average simulation file is 1 megabyte. If you have a
shortage
of disk space, do not store simulations to disk; use the Save
Settings command instead.
Note: When Input is set to file, pressing F1 – Check will load the
file's interface
settings
from disk and change to F1 – Run. If
you want to modify the settings,
change Input back to simulation, and
the loaded settings will be retained.
Time
Coarse
Timestep – how often the simulator recalculates the position of every
particle. The smaller this value is, the more accurate
the simulation, but
the longer it takes to
run. Generally a value of 5 is
adequate, although
for smaller-scale work this
should be set to 1 or less.
Fine
Timestep – identical to coarse timestep.
Delay
– slows down the simulation with a timing loop. This would only be
useful if the total
number of particles is very small or if you are loading
data from disk.
Graphics
Monitoring
– non-functional command
Redraw
Method – how the simulator erases and redraws the particles
flash – erases all particles, then redraws all particles. This makes the
galaxies appear to scintillate.
sequence – erases and redraws each particle one by one. Adequate
except at
regions of high particle density, where one particle
may blacken
another.
sequence++ – erases and redraws each particle one by one, then
redraws all
particles a second time to make sure none were
erased. This is the
best redraw method, although it is slightly
slower than
the others.
Particle
Style – the appearance of the particles
point – particles are single pixels
cross – particles are five-pixel crosses
circle – particles are large circles (very slow)
varsmall – massive particles are crosses, massless particles are
points
varlarge – massive particles are circles, massless particles are
crosses
Tracking
– fix the camera over the specified point.
none – camera is centered wherever the user specifies.
galaxy 1 – camera is centered over the centroid of galaxy 1
galaxy 2 – camera is centered over the centroid of galaxy 2
center of mass – camera is centered over the galaxies' center of
mass
Doppler
Mimicry – color-codes particles according to how fast they are
approaching
or receding along the line of sight.
Z-Axis
Fade – color-codes particles according to their distance along the line
of sight.
Scaling
sdu
– the basic unit of distance, defined as one pixel on the screen at 100%
zoom.
smu
– the basic unit of mass, defined as the mass required to generate an
acceleration of G
smu/stu2 at a distance of 1 sdu
stu – the basic unit of time, defined as one timestep at timestep = 1.
G
– the gravitational constant from Newton's Law of Universal Gravitation.
F1
– Check: When the galaxies (below)
have been set up and the properties are set to
satisfaction,
press F1 to have the simulator make sure all inputs are adequate.
If there is an error a message will
appear; else this will change to run.
F1
– Run: Initialize the simulation and
run.
F2
– Galaxies: Move to the next page.
F3
– Exit: Exit the IGMS.
Page 2 – Galaxies
The
galaxy model has three elements: the
centroid (massive particle at the center), the
disk
(revolving rings of massless particles), and the halo (spherical region of
gravitating
dark
matter.)
Centroid
Properties
x,
y, z – the initial x, y, and z coordinates of each galaxy. Generally, this
is not
a very good way to set
up the simulation; it is much better to use the
retrotrajectory feature
(below) to find these automatically.
vx,
vy, vz – the initial x, y, and z velocities of each galaxy. Generally, this
is not
a very good way to set up
the simulation; it is much better to use the
retrotrajectory feature
(below) to find these automatically.
Mass
– the mass of the centroid of each galaxy.
This should always be
entered; if set to zero,
the simulator will assume the galaxy does not exist.
Disk
Properties
Rmin
– the radius of the innermost particle ring of the galaxy.
Rmax
– the radius of the outermost particle ring of the galaxy.
Rings
– the total number of particle rings in the galaxy.
Particles
– the total number of particles per ring.
Tilt
– the angle of x-z inclination of the galaxy above the x-y plane.
Skew
– the angle of x-y rotation of the galaxy within the x-y plane.
Color
– the color of the disk particles.
Note: the simulation limits the total number of particles to 502,
including the
centroids. This means that (particles x rings) for
galaxy 1 + (particles x rings)
for galaxy 2 cannot exceed 500, or
the program will not allow you to proceed
to the next page.
Note: Tilt and skew for galaxy 1 should always be set to zero if
retrotrajectory
is used.
Retrotrajectory
Distance
– the distance between the two centroids at perigalacticon (the point
of closest approach in
their orbits) in sdu.
Eccentricity
– the shape of the galaxies' orbit (a function of velocity). 0 = e is
a circle, 0<e<1 is
an ellipse, 1 = e is a parabola, and e>1 is a hyperbola.
A parabolic orbit (e =
1) is standard.
Inclination
– the angle the orbital plane the second galaxy makes with the
rotational plane of the
first galaxy, in degrees. 0 describes a
perfectly
flat interaction, 90
defines a vertical interaction in which the second
galaxy rises directly
above the first galaxy, and 180 defines a flat but
retrograde interaction.
Argument
– the rotation of galaxy 2's orbit within its orbital plane, in degrees.
Initial
Time – how long the simulation starts before closest approach, in stu.
This
should always be negative. The
simulation is not realistic unless this
number is relatively large,
at least 300 in most cases.
Halo
Properties
Cent.
Density – The relative density of dark matter in the center of the galaxy.
Edge
Density – The relative density of dark matter at the edge of the halo.
Massive
Radius – The radius of the spherical halo, in sdu.
F2
– Particles: Upon pressing this the
simulator will first check if inputs are OK; if not,
an error will be generated. If so, the simulator will proceed to set up
the
particles in the simulation. If you
plan to use retrotrajectory, make sure you
press F4 before F2, as the inputs in the
coordinate/velocity fields are used.
F3
– Exit: Exit the IGMS.
F4
– Retroproject: Based on the
retrotrajectory and centroid mass inputs, the
simulator will run the simulation
with the centroids in reverse time to determine
the coordinate/velocity data for the
centroids. Always run this before
continuing
to the next page if you plan to use
the retrotrajectory fields.
Page 3 – Particles
From here the user can scroll
through a listing of all particles in the simulation
(although there should be no need
for this)
Simulator Commands
[Esc] Terminate the simulation and return to the interface.
[space] Pause
or unpause the simulation.
[?] Pause
and display simulation header information.
[–] Decrease
the delay.
[+] Increase
the delay.
[ I ] Zoom in by 33%.
[ O ] Zoom out by 50%.
[ ] Move camera down.
[ ¯ ] Move camera up.
[®] Move camera left.
[¬] Move camera right.
[P] Rotate
image along y-z plane.
[{] Rotate
image along y-z plane.
[L] Rotate
image along x-z plane.
[ ; ] Rotate image along x-z plane.
[<] Rotate image along x-y plane.
[>] Rotate image along x-y plane.
[R] Recenter
image.
[J] Decrease
color intercept (rest vel).
[K] Increase
color intercept (rest vel).
[N] Decrease
contrast value.
[M] Increase
contrast value.
[T] Toggle
tracers.
[C] Clear
tracers and headers
[S] Save
visual data as snapshot file (requires reader software to view)
[A] Pause
and display as monochrome color scheme for easy printing.
[PrintScrn] Save
on-screen data in memory as a bitmap (load using Paint)
Walkthrough of a basic
simulation.
1.
Double-click on the IGMS icon.
2.
Maximize the screen (if this is not done automatically)
3.
Press [à] to open the 'Simulation Name'
field for input.
4.
Delete the default name and give the simulation a name.
5.
If you have a slow computer, scroll down using [¯] to 'Timestep' and
increase the timestep
value to 3 by pressing [à] twice. Otherwise
don't change it.
6.
Press [F2] to go to the galaxies screen.
7.
Scroll down to 'Mass' in the first column and enter '200' (this is a
typical
mass for a spiral
galaxy)
8.
Scroll down to 'Rmin' in the first column and enter '15'.
9.
Scroll down to 'Rmax' and enter '50'.
10.
Scroll down to 'Rings' and enter '10'.
11.
Scroll down to 'Particles' and enter '50'.
12.
Scroll to 'Mass' in the second column and enter '100'.
13.
Leave the disk property fields empty (0) for now for the second galaxy.
14.
Scroll over to the 'Retrotrajectory' fields.
15.
Scroll to 'Distance' and enter '90'.
16.
Scroll to 'Eccentricity' and enter '1'.
17.
Leave 'Inclination' and 'Argument' at zero for now.
18.
Scroll to 'Initial Time' and enter '-600'
19.
Leave the halo model fields (below) at zero for now.
20.
Press [F4] to retroproject.
Various numbers should appear in the
coordinate fields for
each galaxy (x, y, z, vx, vy, vz). If
not, correct
any errors and retry.
21.
Press [F2] to set up the particles and go to the next screen. No errors
should appear, if they
do, correct any mistakes.
22.
Press [F2] again to go back to the 'Properties' page.
23.
Press [F1] to check all inputs.
24.
Press [F1] to launch the simulation.
25.
Press [space] to unpause. A
simulation should proceed.
26.
When the simulation appears to be over, press [Esc] to terminate.