Until now only a uniform spherical mass distribution has been considered, being mathematically simple from the point of view of constructing the shell model. However, nbody.f90 can easily be adapted to simulate the collapse of more complex systems. Here we consider the collapse of two spherical mass distributions (representing the collision of two galaxies), observing the systems' behaviour qualitatively if not quantitatively. It has been hypothesised[7][9] that intergalactic collisions can initiate the formation of the spiral arms which are visible in real galaxies, and it was attempted here to simulate this phenomenon numerically.
Figure 14 shows six snapshots of the gravitational collapse of two spherical (
= 10) galaxies initially placed a distance of 30 units apart and each containing 500 masses. The two galaxies collapse in on themselves individually first, and then fall in on each other. The distribution of the `stars' is by the final frame indistinguishable from the distribution resulting from the collapse of a single galaxy.
A more interesting case is the collision of rotating disc galaxies. In the example shown in Figure 15, one galaxy is seven times larger than the other and both are given an initial rotation. They collide at high speed and fragment rapidly, flinging some matter off into unbound orbits and some into bound orbits, which falls back in later frames to the large concentration of mass from whence it was nucleated.
It is difficult to illustrate the true behaviour of the system with a montage of frames like Figure 15, so in this case a program was written to plot the positions of the masses in real time (i.e. produce an animation of the time evolution of the system). The program, makebmp.bas (see Appendix B), reads the data file containing the masses' positions at various moments in time, which was produced by nbody.f90, and produces a monochrome bitmap file for each frame of the animation. The bitmaps can then be glued together either as a montage (Figure 15) or as an animated GIF file, showing the collapse in much greater detail.
An animation was produced of this collapse, and can be accessed online at http://www.dur.ac.uk/thomas.wood/nbody. The animation clearly shows the `hot' nature of the mass distribution, as it rotates and pulsates vigorously following the collapse. Unfortunately, no conclusive evidence of spiral arm formation can be found in any of the frames--evidently, more experimentation is needed to achieve the initial conditions necessary for this effect.
|