Galaxy Mergers

The idea for this project came from Jorge Moreno, who visited our department to give a colloquium on his research in Winter 2014.


Introduction

One of the fundamental questions in astrophysics is how galaxies form, evolve and interact. It might seem surprising that galaxies separated by vast distances could interact with one another, but their immense masses and the gravitational forces that govern their formation and evolution nevertheless can lead to violent interactions. The Milky Way galaxy is right now on a collision course with the Andromeda galaxy and they are predicted to collide in about 4 billion years. Even though both galaxies are made up of hundreds of billions of stars, the separation between stars in the galaxies means that the chances of direct stellar collisions are extremely small. Nevertheless, if our descendents are still around to experience it, the view of our night sky will definitely change as a result of this interaction.

Here is a computer simulation of the merger generated using data from the Hubble Space Telescope and our knowledge of the gravitational interaction among the constituents.


In [35]:
from IPython.display import YouTubeVideo
YouTubeVideo('4disyKG7XtU')


Out[35]:

So how does one go about simulating the collision of two galaxies? The video above was probably generated on massive supercomputers running full blast for a very long time to generate the paths of all of the individual stars as the galaxies merged. Is it really possible that we could generate something like that using a laptop and the basic programming skills from PHYS 202? The answer is yes, if we make some simplifying assumptions.

In this project you will create a simulation of galaxy mergers using the methods of Toomre and Toomre, two brothers who used state of the art computers at MIT and NYU in 1972 (the year I was born!) to investigate the dynamics of massless point particles orbiting a massive galactic nucleus $M$ in a parabolic orbit about the center of mass with another massive galactic nucleus $S$. Their work was an extension of a previous paper published in German in 1963 describing the system of equations and an early attempt to investigate how the spiral structure of galaxies emerges.

Toomre and Toomre's 1972 paper on the simulation of galaxy mergers with Newtonian mechanics.

Pfleiderer 1963 is in German, but includes the equations and the set up of the problem. I translated the relevant parts of the paper to come up with a description of the equations and variables that were used by Pfeliderer and the Toomres to do their simulation. Knowing a foreign language can come in handy sometimes!

The Equations

This is a restricted 3-body problem in which particles composing the outer disk of galaxy $M$ are massless but nevertheless interact through inverse square laws with the mass centers of their galactic central mass ($M$) and the central mass of the disrupting galaxy ($S$).

The calculation is performed in the rest frame of the mass $M$ lying at the origin, with the starting positions for the massless point particles $m_i$ (stars) in the orbits around it given by $(\boldsymbol{r_0})_i$ and the position of mass $S$ relative to $M$ given by $\boldsymbol{\Re}$. The evolution of the positions of the stars $m_i$ and galaxy $S$ relative to $M$ is dictated by the set of differential equations:

$$ \ddot{\mathbf{r}} = -\gamma \left\{ \frac{M}{r^3}\mathbf{r} -\frac{S}{\rho^3}\boldsymbol{\rho} + \frac{S}{R^3}\boldsymbol\Re \right\} $$$$ \ddot{\boldsymbol\Re} = -\gamma \frac{M+S}{R^3}\boldsymbol\Re$$

where

  • $\gamma$ is the Gravitational constant.
  • $M$ is the central mass of the main galaxy and $S$ is the central mass of the disrupting galaxy
  • $\mathbf{r}$ is the radius vector from mass $M$ to massless point particle $m$, representing a single (massless) star in the outer disk of the main galaxy.
  • $\boldsymbol\Re$ is the radius vector from $M$ to $S$
  • $\boldsymbol{\rho} = \boldsymbol{\Re} - \boldsymbol{r}$

One starts with a position and velocity vector for $S$, and the $m_i$ (remember that we are in the rest frame of $M$ so it is at rest at the origin of the coordinate system) and then solves these differential equations to get the positions of $S$, and the set of $m_i$ ($i$ = 0,...,$N$) as a function of time under the influence of pure Newtonian gravity.

After the equations are solved, one can either draw static images of the system at specific points in time, or form an animated movie of the interaction. For this project, you will do both.

In the image from Toomre and Toomre shown below, they transformed to the center-of-mass of the $M$+$S$ system for the first 4 frames and then switched back to the rest frame of $M$ for the six subsequent frames.

Section II of the paper describes exactly the algorithm used to compute the results, followed by four examples.

The Project

You will set up your program to be able to solve all four examples (direct passage, retrograde passage, light mass disruptor, and heavy mass disruptor) from the Toomre paper and create visualizations of the output, both static and animated, from multiple perspectives - the center-of-mass of the system, and the rest frames of the two interacting galaxies $M$ and $S$.

Pfleiderer's paper lists a variety of interactions and initial conditions ($t$ = 0), including elliptical orbits for the interacting galaxies, from which the Toomre examples are a subset. You may be asked to compute other examples from this list for your project demo.

TypePosition $X$Position $Y$Velocity $U$Velocity $V$ Eccentricity Ratio Mass ratio $S/M$
S1+10> 0011
S1-10< 0011
S2+10> 0021
S2-10< 0021
S3+10> 0043
S3-10< 0043
S4100> 043
S5100> 011
S601> 0043
S701> 0011

Note: The exercises related to Ordinary Differential Equations are useful guidance for how to set up your solution. Consider first a single point mass orbiting the main galaxy and its interactions with the disrupting galaxy. Setting up the derivative function and the call to odeint will be very similar to the coupled differential equations for quadratic drag. Once you have it working for a single test mass, add in more until you have a complete solution.


All content is under a modified MIT License, and can be freely used and adapted. See the full license text here.