Previous Section - SPARTA WWW Site - SPARTA Documentation - SPARTA Commands - Next Section

7. Example problems

The SPARTA distribution includes an examples sub-directory with several sample problems. Each problem is in a sub-directory of its own. They are all small problems that run quickly, requiring at most a couple of minutes to run on a desktop machine. Many are 2d so that they run more quickly and can be easily visualized. Each problem has an input script (in.*) and produces a log file (log.*) when it runs. The data files they use for chemical species or reaction parameters are copied from the data directory so the problems are self-contained.

Sample log file outputs on different machines and different numbers of processors are included in the directories to compare your answers to. E.g. a log file like means it ran on P processors of machine "foo", using the dated SPARTA version.

If the "dump image" lines in each script are uncommented, a series of image snapshots will be produced. Animations of several of the examples can be viewed on the Movies section of the SPARTA WWW Site.

These are the sample problems in the examples sub-directories. See the examples/README file for more details.

Here is how you might run and visualize one of the sample problems:

cd free
cp ../../src/spa_g++ .           # copy SPARTA executable to this dir
spa_g++ <                # run the problem 

Running the simulation produces the file log.sparta and optionall image.*.jpg. If you have the freely available ImageMagick toolkit on your machine, you can run its "convert" command to create an animated GIF, and visualize it from the FireFox browser as follows:

convert image*ppm movie.gif
firefox ./movie.gif 

A similar command should work with other browsers. Or you can select "Open File" under the File menu of your browser and load the animated GIF file directly.