Now we need to add a satellite galaxy to our main one. Modeling it as a point mass, we will start it a distance r_init from the center of the big one. Provided r_init is greater than 30 kpc (it will be), we find the escape velocity from the Keplerian potential. As calculated before, this is sqrt(2|phi(r)|), in our case, v_esc = sqrt(2*GM/r_init + 2*C). In adapting the previous version of code to this one, we need to calculate the acceleration at a point in the Keplerian potential. As usual, this is the negative gradient of the potential, or a_i = -G M_tot i / r^3. All particles within the cutoff radius of the main galaxy will see the logarithmic potential, with a_i = -2 v0^2 i / r^2. The previous assignment generated an exponential disk which was rotating circularly, with a scale length of 0.3 (model units) and a circular velocity of sqrt(2) (model units). Now, we multiply all positions by 10/3 to obtain units of kpc (matching the scale length of the logarithmic potential), and leave the velocities the same (now in km/s), in accordance with v_circ = sqrt(v0) = sqrt(1 km/s) The satellite is started 2 truncation radii above the main galaxy, and offset from the center of the galaxy by one third of the scale length, to avoid troublesome interactions with the center of the potential. It is given a variety of masses, in terms of the main galaxy's mass: 0.1, 1, 2, 3, 4, 5%. All simulations are availible as animated gif files at this website: http://astronomy.case.edu/steven/hw/astr306/hw6/movie*.gif The "best match" for each simulation is shown on the following graphs, to be compared with the Cartwheel Galaxy. From these, it seems that the companion galaxy in the Cartwheel was probably around 4% of its mass. The satellites with mass less than 4% make weak or short-lived rings, and none form the central concentration. The satellite with 4% mass forms a tight central concentration surrounded by a well-defined ring, as in the Cartwheel galaxy. Increasing only one percent to 5% yields a galaxy without and central concentration but with a strong ring (that does not appear to turn around for quite a while). At satellite masses of 5% and higher, the main galaxy's potential begins to be dragged away, and that is a result that should not be believed from this simulation (there is some lurking error or oversight).