Skip to content
Snippets Groups Projects
Commit 4730553f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'JB_changes_cosmology_theory' into 'cosmology'

Minor proofreading changes

See merge request !496
parents 51cc6ebd b6d495f8
No related branches found
No related tags found
2 merge requests!509Cosmological time integration,!496Minor proofreading changes
\subsection{Choice of co-moving coordinates} \subsection{Choice of co-moving coordinates}
\label{ssec:ccordinates} \label{ssec:ccordinates}
Note that unlike the \gadget convention we do not express quantities Note that, unlike the \gadget convention, we do not express quantities with
with ``little h'' included. We hence use $\rm{Mpc}$ and not ``little h'' ($h$) included; for instance units of length are expressed in
${\rm{Mpc}}/h$ for instance. Similarly, the time integration operators units of $\rm{Mpc}$ and not ${\rm{Mpc}}/h$. Similarly, the time integration
(see below) also include an $h$-factor via the explicit appearance of operators (see below) also include an $h$-factor via the explicit appearance of
the Hubble constant.\\ the Hubble constant.\\
In physical coordinates, the Lagrangian for a particle $i$ in the In physical coordinates, the Lagrangian for a particle $i$ in the
\cite{Springel2002} flavour of SPH with gravity reads \cite{Springel2002} flavour of SPH with gravity reads
...@@ -15,7 +15,7 @@ In physical coordinates, the Lagrangian for a particle $i$ in the ...@@ -15,7 +15,7 @@ In physical coordinates, the Lagrangian for a particle $i$ in the
m_i \phi m_i \phi
\end{equation} \end{equation}
Introducing the comoving positions $\mathbf{r}'$ such that $\mathbf{r} Introducing the comoving positions $\mathbf{r}'$ such that $\mathbf{r}
= a(t) \mathbf{r}'$ and comoving densities $\rho' \equiv a^3(t)\rho$ ,we get = a(t) \mathbf{r}'$ and comoving densities $\rho' \equiv a^3(t)\rho$,
\begin{equation} \begin{equation}
\Lag = \Lag =
\frac{1}{2} m_i \left(a\dot{\mathbf{r}}_i' + \dot{a}\mathbf{r}_i' \frac{1}{2} m_i \left(a\dot{\mathbf{r}}_i' + \dot{a}\mathbf{r}_i'
...@@ -23,8 +23,8 @@ Introducing the comoving positions $\mathbf{r}'$ such that $\mathbf{r} ...@@ -23,8 +23,8 @@ Introducing the comoving positions $\mathbf{r}'$ such that $\mathbf{r}
\frac{1}{\gamma-1}m_iA_i'\left(\frac{\rho_i'}{a^3}\right)^{\gamma-1} \frac{1}{\gamma-1}m_iA_i'\left(\frac{\rho_i'}{a^3}\right)^{\gamma-1}
- m_i \phi, - m_i \phi,
\end{equation} \end{equation}
where we chose to define $A'=A$ such that the equation of state for where $A'=A$ is chosen such that the equation of state for
the gas and thermodynamics relations between quantities have the same the gas and thermodynamic relations between quantities have the same
form (i.e. are scale-factor free) in the primed coordinates as form (i.e. are scale-factor free) in the primed coordinates as
well. This implies well. This implies
\begin{equation} \begin{equation}
...@@ -41,22 +41,23 @@ $\Psi \equiv \frac{1}{2}a\dot{a}\mathbf{r}_i^2$ and obtain ...@@ -41,22 +41,23 @@ $\Psi \equiv \frac{1}{2}a\dot{a}\mathbf{r}_i^2$ and obtain
\phi' &= a\phi + \frac{1}{2}a^2\ddot{a}\mathbf{r}_i'^2.\nonumber \phi' &= a\phi + \frac{1}{2}a^2\ddot{a}\mathbf{r}_i'^2.\nonumber
\end{align} \end{align}
Finally, we introduce the velocities $\mathbf{v}' \equiv Finally, we introduce the velocities $\mathbf{v}' \equiv
a^2\dot{\mathbf{r}'}$ used internally by the code. Note that these a^2\dot{\mathbf{r}'}$ that are used internally by the code. Note that these
velocities do not have a physical interpretation. We caution that they velocities \emph{do not} have a physical interpretation. We caution that they
are not the peculiar velocities, nor the Hubble flow, nor the total are not the peculiar velocities, nor the Hubble flow, nor the total
velocities\footnote{One additional inconvenience of our choice of velocities\footnote{One additional inconvenience of our choice of
generalised coordinates is that our velocities $\mathbf{v}'$ and generalised coordinates is that our velocities $\mathbf{v}'$ and
sound-speed $c'$ do not have the same dependencies on the sound-speed $c'$ do not have the same dependencies on the
scale-factor. The signal velocity entering the time-step calculation scale-factor. The signal velocity entering the time-step calculation
will hence read $v_{\rm sig} = a\dot{\mathbf{r}'} + c = will hence read $v_{\rm sig} = a\dot{\mathbf{r}'} + c =
\frac{|\mathbf{v}'|}{a} + a^{1-3(\gamma-1)/2}c'$.}. Using the SPH \frac{|\mathbf{v}'|}{a} + a^{1-3(\gamma-1)/2}c'$.}.
This choice implies that $\dot{v}' = a \ddot{r}$. Using the SPH
definition of density, $\rho_i = definition of density, $\rho_i =
\sum_jm_jW(\mathbf{r}_{j}'-\mathbf{r}_{i}',h_i') = \sum_jm_jW(\mathbf{r}_{j}'-\mathbf{r}_{i}',h_i') =
\sum_jm_jW_{ij}'(h_i')$, we can follow \cite{Price2012} and apply the \sum_jm_jW_{ij}'(h_i')$, we can follow \cite{Price2012} and apply the
Euler-Lagrange equations to write Euler-Lagrange equations to write
\begin{alignat}{3} \begin{alignat}{3}
\dot{\mathbf{r}}_i'&= \frac{1}{a^2} \mathbf{v}_i'& \label{eq:cosmo_eom_r} \\ \dot{\mathbf{r}}_i'&= \frac{1}{a^2} \mathbf{v}_i'& \label{eq:cosmo_eom_r} \\
\dot{\mathbf{v}}_i' &= \sum_j m_j &&\left[\frac{1}{a^{3(\gamma-1)}}f_i'A_i'\rho_i'^{\gamma-2}\mathbf{\nabla}_i'W_{ij}'(h_i)\right. \nonumber\\ \dot{\mathbf{v}}_i' &= -\sum_j m_j &&\left[\frac{1}{a^{3(\gamma-1)}}f_i'A_i'\rho_i'^{\gamma-2}\mathbf{\nabla}_i'W_{ij}'(h_i)\right. \nonumber\\
& && + \left. \frac{1}{a^{3(\gamma-1)}}f_j'A_j'\rho_j'^{\gamma-2}\mathbf{\nabla}_i'W_{ij}'(h_j)\right. \nonumber\\ & && + \left. \frac{1}{a^{3(\gamma-1)}}f_j'A_j'\rho_j'^{\gamma-2}\mathbf{\nabla}_i'W_{ij}'(h_j)\right. \nonumber\\
& && + \left. \frac{1}{a}\mathbf{\nabla}_i'\phi'\right] \label{eq:cosmo_eom_v} & && + \left. \frac{1}{a}\mathbf{\nabla}_i'\phi'\right] \label{eq:cosmo_eom_v}
\end{alignat} \end{alignat}
...@@ -66,11 +67,11 @@ with ...@@ -66,11 +67,11 @@ with
\rho_i'}{\partial h_i'}\right]^{-1}, \qquad \mathbf{\nabla}_i' \rho_i'}{\partial h_i'}\right]^{-1}, \qquad \mathbf{\nabla}_i'
\equiv \frac{\partial}{\partial \mathbf{r}_{i}'}. \nonumber \equiv \frac{\partial}{\partial \mathbf{r}_{i}'}. \nonumber
\end{equation} \end{equation}
These corresponds to the equations of motion for density-entropy SPH These correspond to the equations of motion for density-entropy SPH
\citep[e.g. eq. 14 of][]{Hopkins2013} with cosmological and \citep[e.g. eq. 14 of][]{Hopkins2013} with cosmological and
gravitational terms. SPH flavours that evolve the internal energy $u$ instead of the gravitational terms. SPH flavours that evolve the internal energy $u$ instead of the
entropy the additional equation of motion describing the evolution of entropy require the additional equation of motion describing the evolution of
$u'$ becomes: $u'$:
\begin{equation} \begin{equation}
\dot{u}_i' = \frac{P_i'}{\rho_i'^2}\left[3H\rho_i' + \frac{1}{a^2}f_i'\sum_jm_j\left(\mathbf{v}_i' - \dot{u}_i' = \frac{P_i'}{\rho_i'^2}\left[3H\rho_i' + \frac{1}{a^2}f_i'\sum_jm_j\left(\mathbf{v}_i' -
\mathbf{v}_j'\right)\cdot\mathbf{\nabla}_i'W_{ij}'(h_i)\right], \mathbf{v}_j'\right)\cdot\mathbf{\nabla}_i'W_{ij}'(h_i)\right],
......
\subsection{Background evolution} \subsection{Background evolution}
\label{ssec:flrw} \label{ssec:flrw}
In \swift we assume a standard FLRW metric for the evolution of the In \swift we assume a standard FLRW metric for the evolution of the background
background density of the Universe and use the Friedmann equations to density of the Universe and use the Friedmann equations to describe the
describe the evolution of the scale-factor $a(t)$. As always, we evolution of the scale-factor $a(t)$. We scale $a$ such that its present-day
scale $a$ such that its value at present-day is $a_0 \equiv a(t=t_{\rm value is $a_0 \equiv a(t=t_{\rm now}) = 1$. We also define redshift $z \equiv
now}) = 1$. We also define redshift $z \equiv 1/a - 1$ and the 1/a - 1$ and the Hubble parameter
Hubble parameter at a given redshift
\begin{equation} \begin{equation}
H(t) \equiv \frac{\dot{a}(t)}{a(t)} H(t) \equiv \frac{\dot{a}(t)}{a(t)}
\end{equation} \end{equation}
with its present-day value denoted as $H_0 = H(t=t_{\rm with its present-day value denoted as $H_0 = H(t=t_{\rm now})$. Following
now})$. Following normal conventions we write $H_0 = 100 normal conventions we write $H_0 = 100
h~\rm{km}\cdot\rm{s}^{-1}\cdot\rm{Mpc}^{-1}$ and use $h$ as the input h~\rm{km}\cdot\rm{s}^{-1}\cdot\rm{Mpc}^{-1}$ and use $h$ as the input parameter
parameter for the Hubble constant. for the Hubble constant.
To allow for general expansion histories we use the full Friedmann To allow for general expansion histories we use the full Friedmann equations
equations and write and write
\begin{align} \begin{align}
H(a) &\equiv H_0 E(a) \\ E(a) &\equiv\sqrt{\Omega_m a^{-3} + \Omega_r H(a) &\equiv H_0 E(a) \\ E(a) &\equiv\sqrt{\Omega_m a^{-3} + \Omega_r
a^{-4} + \Omega_k a^{-2} + \Omega_\Lambda a^{-3(1+w(a))}}, a^{-4} + \Omega_k a^{-2} + \Omega_\Lambda a^{-3(1+w(a))}},
\label{eq:friedmann} \label{eq:friedmann}
\end{align} \end{align}
where the dark energy equation-of-state is evolving according to the where the dark energy equation-of-state evolves according to the formulation of
formulation of \cite{Linder2003}: \cite{Linder2003}:
\begin{equation} \begin{equation}
w(a) \equiv w_0 + w_a~(1-a). w(a) \equiv w_0 + w_a~(1-a).
\end{equation} \end{equation}
The cosmological model is hence fully defined by specifying the The cosmological model is hence fully defined by specifying the dimensionless
dimensionless constants $\Omega_m$, $\Omega_r$, $\Omega_k$, constants $\Omega_m$, $\Omega_r$, $\Omega_k$, $\Omega_\Lambda$, $h$, $w_0$ and
$\Omega_\Lambda$, $h$, $w_0$ and $w_a$ as well as the starting $w_a$ as well as the starting redshift (or scale-factor of the simulation)
redshift (or scale-factor of the simulation) $a_{\rm start}$ and final $a_{\rm start}$ and final time $a_{\rm end}$. \\ At any scale-factor $a_{\rm
time $a_{\rm end}$. \\ At any scale-factor $a_{\rm age}$, the time age}$, the time $t_{\rm age}$ since the Big Bang (age of the Universe) can be
$t_{\rm age}$ since the Big Bang (age of the Universe) can be computed computed as \citep[e.g.][]{Wright2006}:
as \citep[e.g.][]{Wright2006}:
\begin{equation} \begin{equation}
t_{\rm age} = \int_{0}^{a_{\rm age}} dt = \int_{0}^{a_{\rm age}} t_{\rm age} = \int_{0}^{a_{\rm age}} dt = \int_{0}^{a_{\rm age}}
\frac{da}{a H(a)} = \frac{1}{H_0} \int_{0}^{a_{\rm age}} \frac{da}{a H(a)} = \frac{1}{H_0} \int_{0}^{a_{\rm age}}
\frac{da}{a E(a)}. \frac{da}{a E(a)}.
\end{equation} \end{equation}
For a general set of cosmological parameters, this integral can only For a general set of cosmological parameters, this integral can only be
be evaluated numerically, which is too slow to be evaluated accurately evaluated numerically, which is too slow to be evaluated accurately during a
during a run. At the start of the simulation we, hence, evaluate this run. At the start of the simulation we tabulate this integral for $10^4$ values
integral for $10^4$ values of $a_{\rm age}$ equally spaced between of $a_{\rm age}$ equally spaced between $\log(a_{\rm start})$ and $\log(a_{\rm
$\log(a_{\rm start})$ and $\log(a_{\rm end})$. These are obtained via end})$. The values are obtained via adaptive quadrature using the 61-points
adaptive quadrature using the 61-points Gauss-Konrod rule implemented Gauss-Konrod rule implemented in the {\sc gsl} library \citep{GSL} with a
in the {\sc gsl} library \citep{GSL} with a relative error limit of relative error limit of $\epsilon=10^{-10}$. The value for a specific $a$ (over
$\epsilon=10^{-10}$. The value for a specific $a$ (over the course of the course of a simulation run) is then obtained by linear interpolation of the
a simulation run) is then obtained by linear interpolation of that
table. table.
\subsubsection{NOTES FOR PEDRO} \subsubsection{Typical Values of the Cosmological Parameters}
Typical values for the constants are: $\Omega_m = 0.3, Typical values for the constants are: $\Omega_m = 0.3, \Omega_\Lambda=0.7, 0 <
\Omega_\Lambda=0.7, 0 < \Omega_r<10^{-3}, |\Omega_k | < 10^{-2}, \Omega_r<10^{-3}, |\Omega_k | < 10^{-2}, h=0.7, a_{\rm start} = 10^{-2}, a_{\rm
h=0.7, a_{\rm start} = 10^{-2}, a_{\rm end} = 1, w_0 = -1\pm 0.1, end} = 1, w_0 = -1\pm 0.1, w_a=0\pm0.2$ and $\gamma = 5/3$.
w_a=0\pm0.2$ and $\gamma = 5/3$.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment