Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
explore-for-students
GitHub Repository: explore-for-students/python-tutorials
Path: blob/main/Group exercises/Group exercise 1.ipynb
968 views
Kernel: Python 3 (ipykernel)

Group exercise 1: Evidence for dark matter

The rotation curve for the Andromeda galaxy (M31) is shown here, which historically provided some of the first key evidence for galaxies being surrounded by massive dark matter halos.

image.png

Figure credit Rubin and Dunlap, taken from Reuben (2006)

In this exercise, you will study the M31 rotation curve to deduce two key features of dark matter halos:

  • There is more mass in dark matter than in the normal luminous matter (visible stars and gas made up of atoms).

  • The dark matter is far more extended than the luminous matter, with the former dominating the latter at large distances from the center of the galaxy.

Reading:

  • Lesson 1 - Python Basics

  • Lesson 2 - Control Structures

Part I:

Recall for a spherically-symmetric mass distribution, the circular velocity vv at a measured radius rr is given by the formula

v(r)=GM(r)rv(r) = \sqrt{\frac{G M(r)}{r}}

where M(r)M(r) is the enclosed mass profile, denoting the amount of total mass enclosed within a sphere of radius rr. Using the rotation curve data provided below, make an error bar plot of M(r)M(r) as a function of rr.

For comparison, the total mass of baryons stars and gas is of order 1011M10^{11} \, M_{\odot}.

Note about units: It is common to work in units of km/s for velocity, kiloparsecs (kpc) for distance, and solar masses (MM_\odot) for mass. However, in the data below, as in the figure above, radius is quoted in angular scales (arcmin). To convert to physical distance (kpc), you will need to know that the distance to M31 is 770 kpc.

import numpy as np import matplotlib.pyplot as plt # Data for rotation curve of M31 (Andromeda galaxy) # From Carignan et al (2006) https://arxiv.org/abs/astro-ph/0603143 # Circular velocity in km/s for rotation curve v_obs = np.array([222.1, 222.3, 224.4, 224.9, 225.6, 225.7, 226. , 226.8, 227.4, 227.5, 227.6, 228.1, 229.3, 230.4, 231.1, 232. , 232.8, 235.5, 235.7, 242.9, 245.5, 251. , 251.1, 251.8, 252.1, 255.1, 258.9, 262. ]) # Error in velocity (km/s) for rotation curve v_err = np.array([ 0.7, 0.8, 1. , 2.1, 4.6, 5.7, 6.9, 7.4, 13.8, 14.2, 17.1, 17.8, 18.6, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8, 28.8]) # Radius values where each circular velocity is measured (units are arcmin) r_obs = np.array([ 25. , 30. , 35. , 40. , 45. , 50. , 55. , 60. , 65. , 70. , 75. , 80. , 85. , 90. , 94.5, 99. , 103.5, 108. , 112.5, 117. , 121.5, 126. , 130.5, 135. , 139.5, 144. , 148.5, 153. ]) # Useful value for Newton's constant G in units of (km/s)^2 * kpc / M_sun G = 4.30e-6
# Your solution to Part I here

Part II:

Here we try to model the M31 rotation curve. For the luminous matter, we divide up the baryons into two components:

  • Stellar bulge: the dense clump of stars in the center of the galaxy.

  • Stellar disk: the disk of stars, which is more extended than the bulge.

We assume that the enclosed mass profile for the bulge takes the form

Mbulge(r)=Mbr2(r+ab)2M_{\rm bulge}(r) = \frac{M_b r^2}{(r + a_{b})^2}

where Mb=2.0×1010  MM_b = 2.0 \times 10^{10} \; M_\odot is the total bulge mass and ab=2  arcmina_b = 2 \; {\rm arcmin} is the characteristic size of the bulge. For the purposes of this exercise, we also assume that the disk takes a similar parametric form as the bulge

Mdisk(r)=Mdr2(r+ad)2M_{\rm disk}(r) = \frac{M_d r^2}{(r + a_{d})^2}

with a disk mass Md=1.4×1011  MM_{d} = 1.4 \times 10^{11} \; M_\odot and larger size ad=25  arcmina_d = 25 \; {\rm arcmin}. (This is a bit of a "spherical cow" approximation, which we take for simplicity. Mass is not distributed in a spherically-symmetric fashion for a disk.)

Lastly, we have a dark matter halo. The Navarro-Frenk-White (NFW) profile has been proposed to describe the universal structure of all dark matter halos. The NFW enclosed mass profile is

MNFW(r)=4πρsrs3(ln(1+r/rs)rr+rs),M_{\rm NFW}(r) = 4 \pi \rho_s r_s^3 \left( \ln(1 + r/r_s) - \frac{r}{r + r_s} \right) \, ,

where ρs\rho_s and rsr_s are constants. This follows by integrating the NFW density profile MNFW(r)=0rd3rρNFW(r)M_{\rm NFW}(r) = \int^r_0 d^3 r^\prime \, \rho_{\rm NFW}(r^\prime). It turns out that the dark matter halo is so large that we can approximately treat rsr_s as being much larger than the rr values for the rotation curve. In that limit, we have

Mhalo(r)Ar2M_{\rm halo}(r) \approx A r^2

where A=2πρsrsA = 2\pi \rho_s r_s.

Your tasks are as follows:

  • Given the inputs described above, determine the best value of AA to fit the data.

  • Plot the ratios Mhalo(r)Mtot(r),Mbaryons(r)Mtot(r)\frac{M_{\rm halo}(r)}{M_{\rm tot}(r)} , \quad \frac{M_{\rm baryons}(r)}{M_{\rm tot}(r)} showing the relative mass fractions for dark matter vs baryons for the range of radii [0,153  arcmin][0,153 \; {\rm arcmin}], using your best fit value of AA.

# Your solution: fit A
# Your solution: plot the ratios