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