Using the simple tutorial provided, extend the examples to carry out the following tasks:
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:
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...
#=====================================================
#=====================================================
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.
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...
#=====================================================
#=====================================================
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:
# Solution to Exercise 3 should go here...
#=====================================================
#=====================================================
Note: To compare with abundance matching, use the analytical formula from Guo et al. (2010):
where
# Solution to Exercise 4 should go here...
#=====================================================
#=====================================================
# Solution to Exercise 5 should go here...
#=====================================================
#=====================================================
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...
#=====================================================
#=====================================================