In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from scipy.integrate import odeint
from IPython.html.widgets import interact, fixed
from solve import *
from plot import *
from energy import *
plt.ioff()


:0: FutureWarning: IPython widgets are experimental and may change in the future.
WARNING:py.warnings:/usr/local/lib/python3.4/dist-packages/skimage/filter/__init__.py:6: skimage_deprecation: The `skimage.filter` module has been renamed to `skimage.filters`.  This placeholder module will be removed in v0.13.
  warn(skimage_deprecation('The `skimage.filter` module has been renamed '

Abstract

This notebook will explore galactic interactions through a numerical approach to the restricted 3-body problem. The 3-body problem consists of three interacting masses, here they are referred to as M,S, and m. Particle m will be a star around the main galaxy. It has a mass much less than the mass of M and S, such that it does not affect the motion of particles M,S, and any other m particles in the system. This allows me to simulate the interaction of an N body galaxy with a single disrupting mass by solving the equations of motion for each m separately and plotting them all. A disrupting mass will approach on a hyperbolic or parabolic path where the nearest distance between the mass and galaxy is 25 kiloparsecs. This fly-by situation ensures a brief interaction time that will hopefully facilitate the creation of spiral arms and bridges on our main galaxy.

Introduction

A galactic collision is predicted to occur in about 4 billion years between the Milky Way and Andromeda galaxies. Each of those galaxies contain a central supermassive black hole. This interaction is similar to the situation studied in this notebook where the disrupting mass is essentially a massive point particle and the stars on the main galaxy are also orbiting a central point particle of large mass.

First I aim to reproduce the results of Toomre and Toomre in the specific case of a retrograde parabolic passage. Then I will move on and explore different combinations of the mass ratio between M and S, hyperbolic passages, and direct orbits. I will animate these situations while switching between a frame located at the center of mass and a frame located on the main galaxy.

Retrograde vs Direct refers to the relative motion of the orbiting stars and the disrupting galaxy. Retrograde corresponds to the stars moving in the opposite direction as S, and in the direct case they are moving in the same direction.

Equations of Motion

$$ \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}$

The $\ddot{\mathbf{r}}$ is form the motion of the stars, it is affected by gravitational forces determined by its distance from M and S, and the third term is included to account for the fact that M is a non-inertial frame because it is accelerating towards S.

$ \ddot{\boldsymbol\Re} $ is for the motion of the disrupting galaxy according to the M frame. Here we see our approximation that m has no mass, because $\ddot{\boldsymbol\Re}$ does not account for the gravitational interaction because m and S.

Initial Conditions for Disrupting Galaxy.

One of the first things we have do to is place our disrupting mass on a collision path. These are the tangential velocities for Hyperbolic and Parabolic passages. They both depend on the masses of M and S, and the initial distance between the two.

Parabolic Velocity :

\begin{equation*} v_{parabolic} = \sqrt{\frac{2\gamma (M+S)}{R}} \end{equation*}

where

  • $R$ is the Distance Between the Disrupting Galaxy and the Main Galaxy

Hyperbolic Velocity :

\begin{equation*} v_{hyperbolic} = \sqrt{\mu \biggl(\frac{2}{R}-\frac{1}{a}\biggr)} \end{equation*}

where

  • $R$ is the Distance Between the Disrupting Galaxy and the Main Galaxy
  • $\mu$ is the standard gravitational parameter.
\begin{equation*} \mu = \gamma (M+S) \end{equation*}

Initial Conditions for Stars. Circular Orbital Velocity :

\begin{equation*} v = \sqrt{\frac{\gamma M}{r}} \end{equation*}

where

  • $v$ is the Circular Orbital Velocity.
  • $r$ is the Distance Between the Star and Main Galaxy

My Results vs Toomre and Toomre :

At time -1 both simulations are slightly flattened on one side and elongated on the other, then as time moves forward the shells slowly expand away from the center.

Animations :

Animations are done over 400 or 800 million years. For now they both have the same mass, which is about equal to the mass of our sun times 1^10.

Motion relative to M Frame

At eight seconds in the animation we see two spiral arms formed on the main galaxy.


In [2]:
data = np.load('Par_Dir_M.npz')
animation = M_Animation(data,15);
plt.title('Parabolic Direct Passage')
animation.ipython_display(fps=50)



Out[2]:

All of the retrograde orbits have very non-violent and somewhat uniform interactions for all of the stars. The orbits tend to widen and slightly disform, then eventually the orbits nearly collapse back into their circular shape. There is no one group of stars that is constantly close to the disrupting galaxy because they are moving away instead of in the same direction.


In [3]:
data = np.load('Par_Ret_M.npz')
animation = M_Animation(data,25)
plt.title('Parabolic Retrograde Passage')
animation.ipython_display(fps=50)



Out[3]:

The Hyperbolic Retrograde Passage is nearly as mild as the Parabolic Passage. The outermost orbit gains a slightly long arm in this scenario compared to the Parabolic Retrograde. In both cases the inner most stars are basically unaffected.


In [4]:
data = np.load('Hyp_Ret_M.npz')
animation = M_Animation(data,20)
plt.title('Hyperbolic Retrograde Passage')
animation.ipython_display(fps=50)



Out[4]:

Motion relative to CM Frame

Our coordinate system is transformed from the three vectors $\mathbf{r}, \boldsymbol{\rho}$, and $\mathbf{R} $ to a new set of vectors that I will call $\mathbf{d},\mathbf{R_1}$,and $\mathbf{R_2}$

$$ \mathbf{d} = \mathbf{r} - \frac{S }{M+S} $$$$ \mathbf{R_1} = -\mathbf{R} \frac{S}{M+S} $$$$ \mathbf{R_2} = \mathbf{R} \frac{M}{M+S} $$

where

  • $\mathbf{d}$ is the vector from the center of mass to the star, m.
  • $\mathbf{R_1}$ is the vector from the center of mass to the home galaxy, M.
  • $\mathbf{R_2}$ is the vector from the center of mass to the disrupting galaxy, S.

Notice that the Parabolic Direct passages seem to create the most violent interactions and the disrupting mass tends to capture the outmost stars of the main galaxy and they remain in a relatively stable orbit.


In [5]:
data = np.load('Par_Dir_Cen.npz')
animation = CM_Animation(data,20)
plt.title('Parabolic Direct Passage')
animation.ipython_display(fps=50)



Out[5]:

The Hyperbolic Direct passage seems to remove the same amount of stars from the main galaxy as the parabolic passage, but in this case the stars are not capture by the disrupting mass and are instead left as stray stars between the main masses.


In [6]:
data = np.load('Hyp_Dir_Cen.npz')
animation = CM_Animation(data,12)
plt.title('Hyperbolic Direct Passage')
animation.ipython_display(fps=50)



Out[6]:

Heavy Mass Disruptor :

At the 4s mark during this animation you can see the stars forming a bridge that links the two galaxies together for a short period of time. The mass of S is three times that of the mass of M. We see a very long spiral arm forming on the top of the main galaxy.


In [7]:
data = np.load('Par_Dir_Cen_H.npz')
animation = CM_Animation(data,20)
plt.title('Parabolic Direct Passage')
animation.ipython_display(fps=50)



Out[7]:

The Heavy Mass Hyperbolic Direct passage affects even the innermost stars of the main galaxy, and violented rips of many of the outtermost stars.


In [8]:
data = np.load('Hyp_Dir_M_H.npz')
animation = M_Animation(data,10)
plt.title('Hyperbolic Direct Passage')
animation.ipython_display(fps=50)



Out[8]:

Sources and Citations :

Toomre, A., & Toomre, J. (n.d.). Galactic Bridges and Tails. ApJL ApJ The Astrophysical Journal, 623-623.

Taylor, J. (2005). Classical mechanics. Sausalito, Calif.: University Science Books.

"Basics of Space Flight: Orbital Mechanics." Basics of Space Flight: Orbital Mechanics. N.p., n.d. Web. 09 June 2015.