Exercises Module 1

Exercises on Simulation Data Handling

Using the simple tutorial provided, extend the examples to carry out the following tasks:

Exercise 1 - Quick Inspection of Simulation Data

1) Visualize the distribution of dark matter, gas, and stellar particles. Discuss the resulting plots.

2) To visualize the three-dimensional distribution of particles, rotate the entire simulation box along the Y-axis and present the result.

Note: You can perform arbitrary rotations along the three orthogonal axes (X, Y, and Z) by multiplying the coordinates of a point (or an array of points) with the following rotation matrices:

\[R_{x} (\theta) = \begin{pmatrix} 1 & 0 & 0\\ 0 & \cos(\theta) & -\sin(\theta)\\ 0 & \sin(\theta) & \cos(\theta) \end{pmatrix}\] \[R_{y} (\theta) = \begin{pmatrix} \cos(\theta) & 0 & \sin(\theta)\\ 0 & 1 & 0\\ -\sin(\theta) & 0 & \cos(\theta) \end{pmatrix}\] \[R_{z} (\theta) = \begin{pmatrix} \cos(\theta) & -\sin(\theta) & 0\\ \sin(\theta) & \cos(\theta) & 0\\ 0 & 0 & 1 \end{pmatrix}\]

To rotate a set of particles, apply the following operation:

\[P_{\rm rot} = P_{0} R_{x} R_{y} R_{z}\]

where \(P_{0}\) is the matrix of the original positions of the particles, and \(P_{\rm rot}\) is the rotated matrix.

Finally, remember that rotation is performed relative to the origin.

# Solution to Exercise 1 should go here...
#=====================================================









#=====================================================

Exercise 2 - Selecting Individual Halos

  1. Use the group position dataset to find the centers of MW-like halos with masses \(10^{12} < M_{200} / M_{\odot} < 2 \times 10^{12}\). Visually inspect the morphology of their central galaxies.

  2. Plot the distributions of dark matter, gas, and stars around each halo. Describe the diversity in galaxy morphology you observe. Discuss possible origins of this diversity and explore possible methods to test your hypotheses.

# Solution to Exercise 2 should go here...

#=====================================================









#=====================================================

Exercise 3 - Dark Matter Halos’ Density Profile

  1. Measure the Dark Matter Density Profile:
    • Select dark matter halos within a narrow mass range.
    • Calculate the dark matter density profile for these halos.
    • Plot the mean density profile in natural (dimensionless) units.
    • Compare this profile with the Navarro-Frenk-White (NFW) density profile.
  2. Analyze Density Profiles in Different Mass Bins:
    • Measure the dark matter density profiles for halos in three distinct mass bins.
    • Use natural (dimensionless) units for these profiles.
    • To speed up calculations, limit the analysis to at most 100 halos per mass bin.
    • Compare the profiles across different mass bins. Are there systematic differences? If so, why?
  3. Examine Halo Concentration:
    • Use the measured profiles to determine whether halo concentration increases or decreases with mass.
    • Discuss possible reasons for this observed dependence.

Note: In natural (dimensionless) units, the NFW profile is given by:

\[\tilde{\rho} = \left( \frac{c^3}{4\pi f_c} \right) \frac{1}{c \tilde{r} \left(1 + c \tilde{r} \right)^2}\]

where:

\[\tilde{\rho} = \frac{\rho(\tilde{r})}{\rho_{0}}\] \[\tilde{r} = \frac{r}{r_{200}}\] \[\rho_{0} = \frac{M_{200}}{r_{200}^3}\] \[f_c = \ln(1 + c) - \frac{c}{1 + c}\]

Additional Exercises:

  1. Derive the above expression for the NFW profile.
  2. Measure the mass-concentration relation and compare it with the \(\Lambda\)CDM mass-concentration relation. Why are massive halos more concentrated than naively expected?
# Solution to Exercise 3 should go here...
#=====================================================









#=====================================================

Exercise 4 - How galaxies populate dark matter halos?

  1. Plot the Stellar vs. Halo Mass Relation:
    • Create a plot of stellar mass versus halo mass for the simulated galaxies in this volume.
    • Compare your results with the abundance-matching results.
    • Note: Since this relation applies to central galaxies only, it is sufficient to consider the FOF groups.
  2. Calculate Mass Functions:
    • Compute the halo mass function and the galaxy stellar mass function for the simulations.
  3. Interpret the Results:
    • Analyze the relationship between the halo mass function and the galaxy mass function.
    • Use the abundance-matching plot from the previous step to help interpret these results.

Note: To compare with abundance matching, use the analytical formula from Guo et al. (2010):

where

# Solution to Exercise 4 should go here...
#=====================================================









#=====================================================

Excercise 5 - The Galaxy Colour Bimodality

  1. Study whether the simulated galaxy population exhibits a colour bimodality. To this end produce a plot that shows, for instance, the (g-r) galaxy colour as a function of galaxy stellar mass.
  2. Discuss possible origins of the bimodality and find a third property that provides further support to your interpretation. This could be a third property that correlates with the galaxy coulour.
# Solution to Exercise 5 should go here...
#=====================================================









#=====================================================

Exercise 6 - The Star Formation Rate Density (SFRD)

1) Study the Star Formation Rate Density as a function of redshift for the simulated volume.

To study the SFRD, you first need to determine the physical time corresponding to a given redshift. This can be obtained by solving:

\(t(z) = \displaystyle\int_{0}^{a(z)} \displaystyle\frac{da}{\dot a} = \displaystyle\frac{1}{H_0} \displaystyle\int_{z}^{\infty} \displaystyle\frac{dz'}{(1+z') E(z')}\).

with \(E(z) \approx \left [ \Omega_{\Lambda,0} + \left ( 1 - \Omega_{0} \right ) (1.0+z)^2 + \Omega_{m,0} (1+z)^3 \right ]^{1/2}\)

However, for a flat Universe, in which \(\Omega_{m,0} + \Omega_{\Lambda,0} = 1\), the solution is analytic:

\(t(z) = \displaystyle\frac{1}{H_{0}} \displaystyle\frac{2}{3 \sqrt{\Omega_{\Lambda,0}}} \ln \left [ \displaystyle\frac{\sqrt{\Omega_{\Lambda,0} (1+z)^{-3}} + \sqrt{\Omega_{\Lambda,0} (1+z)^{-3} + \Omega_{m,0}} } {\sqrt{\Omega_{m,0}}} \right ]\).

in which \(H_{0}^{-1} = 9.78 h^{-1}\) Gyr.

2) Compare the results with data from, e.g., Behroozi et al. (2013)

# Solution to Exercise 6 should go here...
#=====================================================









#=====================================================