Tidal Tails of Interacting Galaxies


This webpage contains various bits from my university computational physics coursework.

The coursework involved the implementation of a simple N-body simulation of two interacting galaxies in Fortran. The Verlet Method was used to implement Newton's Law of motion, and the galaxies modelled as a central hub surrounded by a disc of test particles arranged in concentric rings about the central hub. The test particles were only considered to be attracted to the central hubs of the two galaxies and not to each other, to simplify the algorithm. A source code package is here. It contains the Fortran 90 source files, a Makefile, two small C programs to plot the results of the Fortran programs, and the latex source to my writeup. The Makefile assumes you will be using linux. A free Fortran 90 compiler, GNU G95 is available. Their Sourceforge page contains the source and statically linked binaries for linux and cygwin.

The writeup in pdf is here.


Below are links to some animated gifs produced from data generated by the simulation. Each frame was ploted using gnuplot and the animated gif was then produced using Whirlgif:

  • Galaxies in parabolic orbit, close approach
  • Parabolic orbit, far separation
  • Elliptical orbit
  • Elliptical orbit, far separation, long time
  • Elliptical orbit, close approach
  • 3D plot of parabolic orbit
  • A text file with a summary of the parameters to generate each gif is here. The units are arbitarily chosen so that all values in the simulation are about unity, to ensure the algorithms work properly. One length unit is about 80 parsecs (about 240 light years). One iteration of the simulation is about 15 million years, but only every fifth iteration is ploted. So one frame of each gif is about 75 million years, except for Ellipse-Far-lt.gif, where each frame is 150 million years. The blue line represents the path of each galaxy


    mdl27 - updated Sun Jan 11 15:12:56 GMT 2004