Last Updated: December 13 2009
AIRES Cosmic Ray Simulations in the Cube
My project involved importing some simulations of various cosmic ray air-showers into the Cube environment. There are several simulations available in a format readable by Stuart Levy's Partiview on the web, compiled by Maximo Ave, Dinoj Surendran, Tokonatsu Yamamoto, Randy Landsberg, and Mark SubbaRao of the University of Chicago. Files readable by Partiview should not be difficult to import into the Cube. The team at the University of Chicago used the AIRES (AIRshower Extended Simulations) package developed by S. J. Sciutto at the Department of Physics of the Universidad Nacional de La Plata, Argentina to develop their simulations. AIRES is written almost entirely in FORTRAN77 and is very well documented. Partiview was developed by Stuart Levy of the NCSA, and I am in contact with him through the UIUC Astronomical Society if I have any questions.
Cosmic rays were discovered in the early part of the 20th century by Victor Hess and the term "cosmic ray" was coined by Robert Millikan in the 1930's. The term "cosmic ray" is used to describe a variety of energetic extra-terrestrial particles, mostly protons, which interact with the Earth's upper atmosphere to create a shower of secondary particles known as an "air shower" detectable by a variety of satellite and ground detectors. The origin, energy and type of the particles which create these air showers vary greatly.
I am working with AIRES version 2.6.0, the same version used by the University of Chicago team. AIRES is a modulated simulation program, meaning that the code is broken up into a large number of files containing groups of related sub-routines which makes modifying a specific part of the program easier. The distribution contains a 250 page manual which has thus far been detailed yet comprehendable.
AIRES uses a stack of particles, which it iterates through and modifies for each step in the simulation. The step is analogous to the concept of a frame of a movie. The step size can be defined by the user, and corresponds to the time length of the step (200 nanoseconds is a common value). When a particle is removed from the stack, AIRES analyzes every possible interaction that particle can experience, determines which one is most probable at the time of the analysis and modifies the particle accordingly. The physical processes which AIRES accounts for include electromagnetic propagation (i.e. compton scattering), hadronic processes (nucleon collisions and decay), geomagnetic interactions, atmospheric conditions, and statistical sampling. The particle stack represents all "alive" particles, i.e. the incident particle is the first entry into the stack, it's decay erases the incident particle and adds the decay particles.
Practical computing problems
In a cosmic ray air-shower, there is an extraordinary number of secondary particles generated (for a 10^20 eV shower, the number of secondary particles created is on the order of 10^11). There is no practically possible way to create an air-shower simulation involving 10^11 particles, so a statistical sampling method (known as a "thinning algorithm") is used to reduce the number of secondary particles to a more maneagable size.
Partiview (short for Particle Viewer) is a 4-D visualization program which is used to animate particle data. The program was written in C++/OpenGL by Stuart Levy of the NCSA, who currently works nearby. The program is completely self contained, and can be run from the command prompt by typing partiview filenameandpath.cf if in a Windows environment, or alternatively by typing ./partiview_osx filenameandpath.cf in a mac terminal. Partiview can also read .cmap and .speck files. Partiview allows you to move around during the real-time animation of the data to dynamically experience the shower. A screenshot of the program is located at the top of the page.
From AIRES output to Partiview input
In order to view the output of the AIRES simulation in Partiview, the team from the University of Chicago modified 4 routines in the AIRES program and wrote a Perl script to convert the output type of the AIRES simulations to Partiview format. The modifications that they made to the subroutines basically snagged the intermediate data calculated during each step (which is normally discarded by AIRES). The Perl script is the bridge from AIRES to Partiview.
Addendum: November 12, 2009
So far, the AIRES simulations constructed by the UChicago team have been successfully run on the Fire console and, so I've been told, in the Cube. There are several next steps which differ slightly from the ones originally proposed.
I need to write a script or a series of scripts which animate the partiview file automatically and stop the animation to allow the user to manually navigate if he/she presses a button on the wand. Partiview is able to read Wavefront (.wf file extension), essentially a flypath. Each line of the .wf file contains 7 double numbers which indicate translational position (x, y, z), the Euler angles of the frame (Angle(x), Angle(y), Angle(z)) as well as the frame's angular field of view. I have written a Java program which takes the .wf formatted frames, seamlessly creates a linear transition between them (with a user-specified number of intermediate frames), and writes the transitions to a .wf file.
AIRES has been tested on Linux machines. Linux has an pre-installed gcc FORTRAN77 compiler, and all of the instructions for creating an AIRES simulation written by the UChicago team are written for Linux. Installing Linux on my PC requires a hard drive partition for Linux so that Vista and Linux can run side by side. I have successfully installed a partition on my external drive with enough disk space to operate AIRES. I was able to compile AIRES version 2-6-0 (which is the version used by the UChicago team) but I was not able to compile the AIRES program after I replaced the original versions of heavycharged.f, heavyneutral.f, eplusminus.f and gammarays.f with the new versions supplied by the UChicago team in the /src/aires directory of the AIRES program directory. Stuart Levy might have found the fix for the solution, but I have not been able to compile the source myself.