Top |
$ \newcommand{\He}{\text{He}} \newcommand{\HeI}{\text{HeI}} \newcommand{\HeII}{\text{HeII}} \newcommand{\HeIII}{\text{HeIII}} \newcommand{\Hy}{\text{H}} \newcommand{\HyI}{\text{HI}} \newcommand{\HyII}{\text{HII}} \newcommand{\e}{{\text{e}^-}} $
The NcRecomb abstract object describe a general recombination process. To describe the functions we have the following definitions, more details in Weinberg (2008).
We refer to the total number of hydrogen nucleus (ionized or not) as $n_{\Hy}$, the neutral hydrogen atoms as $n_{\HyI}$ and ionized hydrogen as $n_{\HyII}$ and, therefore, $n_{\HyI} + n_{\HyII} = n_{\Hy}$. Similarly, the number of helium nuclei is $n_{\He}$ and the neutral, single and double ionized are $n_{\HeI}$, $n_{\HeII}$ and $n_{\HeIII}$, respectively.
We also define the helium primordial abundance as the ratio of the helium mass to the total baryonic mass, i.e., \begin{align}\label{def:Yp} Y_p = \frac{n_{\He} m_{\He}}{(n_{\He} m_{\He} + n_{\Hy} m_{\Hy})}, \end{align} where $m_{\Hy}$ and $m_{\He}$ are the hydrogen and helium masses.
The element abundances are defined as the ratio of the element by the total number of free protons $n_p \equiv n_\Hy$: \begin{align} X_{f} = \frac{n_{f}}{n_p}, \end{align} where $f$ is any one of the elements described above and $\e$ represent the number of free electrons.
These fractions have the following properties: \begin{align}\label{eq:Hy:add} X_\HyI + X_{\HyII} &= 1, \\ \label{eq:He:add} X_{\HeI} + X_{\HeII} + X_{\HeIII} &= X_{\He}, \\ X_{\He} &\equiv \frac{m_p}{m_{\He}}\frac{Y_p}{1-Y_p}. \end{align} We also define the number of free electrons as $n_\e$. Assuming a neutral universe we have \begin{equation}\label{eq:def:Xe} X_\e = X_{\HyII} + X_{\HeII} + 2X_{\HeIII}. \end{equation}
Equilibrium ratio $X_{\HyII}X_\e / X_\Hy$ through Saha equation, i.e.,
\begin{equation}\label{eq:saha:HyI}
\frac{X_{\HyII}X_\e}{X_\HyI} = \frac{e^{-\HyI_{1s}/(k_BT)}}{n_{\Hy}\lambda_{\e}^3},
\end{equation}
where $\HyI_{1s}$ is the hydrogen $1s$ binding energy ncm_c_HI_ion_E_1s_2S0_5()
,
$\lambda_{\e}$ is the electron thermal wavelength, i.e.,
\begin{equation}
\lambda_{\e} = \sqrt{\frac{2\pi\hbar^2}{m_\e{}k_BT}},
\end{equation}
$k_K$ is the Boltzmann constant ncm_c_kb()
, $m_\e$ the electron mass and
$\hbar$ is the Planck constant ncm_c_hbar()
.
This calculation is done using the Saha equation as in Weinberg (2008).
The equilibrium single/non-ionized helium ratio $X_{\HeII}X_\e/X_{\HeI}$
through Saha equation, i.e.,
\begin{equation}\label{eq:saha:HeI}
\frac{X_{\HeII}X_\e}{X_{\HeI}} = \frac{e^{-\HeI_{1s}/(k_BT)}}{4n_{\Hy}\lambda_{\e}^3},
\end{equation}
where $\HeI_{1s}$ is the helium I $1s$ binding energy ncm_c_HeI_ion_E_1s_1S0()
.
This calculation is done using the Saha equation as in
Seager (2000).
The equilibrium double/single-ionized helium ratio $X_{\HeIII}X_\e/X_{\HeII}$
through Saha equation, i.e.,
\begin{equation}\label{eq:saha:HeII}
\frac{X_{\HeIII}X_\e}{X_{\HeII}} = \frac{e^{-\HeII_{1s}/(k_BT)}}{4n_{\Hy}\lambda_{\e}^3},
\end{equation}
where $\HeII_{1s}$ is the helium II $1s$ binding energy ncm_c_HeII_ion_E_1s_2S0_5()
.
This calculation is done using the Saha equation as in
Seager (2000).
The default value of the helium primordial abundance
is given by nc_hicosmo_Yp_4He()
.
The primordial Helium fraction is define by nc_hicosmo_XHe()
.
The derivative of the optical depth $\tau$ with respect to the redshift
time $\lambda \equiv -\ln(x) = -\ln(1 + z)$ is
\begin{equation}\label{eq:def:dtaudlambda}
\frac{d\tau}{d\lambda} = -\frac{c\sigma_Tn_BX_\e}{H},
\end{equation}
where $c$ is the speed of light [ncm_c_c()
], $\sigma_T$ is the Thomson
cross section [ncm_c_thomson_cs()
], $n_B$ is the number density of baryons
and $H$ the Hubble function. We define the optical depth $\tau$ integrating
from the present time, i.e.,
\begin{equation}\label{eq:def:tau}
\tau = \int_0^\lambda\frac{d\tau}{d\lambda}.
\end{equation}
Using the equations above we define the visibility function $v_\tau$ as
\begin{equation}\label{eq:def:vtau}
v_\tau = \frac{d\tau}{d\lambda}e^{-\tau}.
\end{equation}
NcRecomb *
nc_recomb_ref (NcRecomb *recomb
);
Increases the reference count of recomb
.
void
nc_recomb_clear (NcRecomb **recomb
);
Decreases the reference count of *recomb
if
*recomb
is not NULL, then sets *recomb
to NULL.
void nc_recomb_prepare (NcRecomb *recomb
,NcHICosmo *cosmo
);
Prepares the object using the model cosmo
.
void nc_recomb_prepare_if_needed (NcRecomb *recomb
,NcHICosmo *cosmo
);
Prepares the object using the model cosmo
if it was changed
since last preparation.
void nc_recomb_set_zi (NcRecomb *recomb
,const gdouble zi
);
Sets the initial redshift of the integration $[0, z_i]$.
void nc_recomb_require_zi (NcRecomb *recomb
,const gdouble zi
);
Requires the initial redshift of at least $z_i$ = zi
.
gdouble nc_recomb_Xe (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Calculates the value of $X_\e$ at lambda
.
[virtual Xe]
gdouble nc_recomb_XHII (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Calculates the value of $X_\HyII$ at lambda
.
[virtual XHII]
gdouble nc_recomb_XHeII (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Calculates the value of $X_\HeII$ at lambda
.
[virtual XHeII]
gdouble nc_recomb_HI_ion_saha (NcHICosmo *cosmo
,const gdouble x
);
Calculates the equilibrium ionized/non-ionized hydrogen abundance ratio $X_{\HyII}X_\e / X_{\HyI}$. See Eq. \eqref{eq:saha:HyI}.
gdouble nc_recomb_HeI_ion_saha (NcHICosmo *cosmo
,const gdouble x
);
Calculates the equilibrium single/non-ionized helium ratio $X_{\HeII}X_\e/X_{\HeI}$. See Eq. \eqref{eq:saha:HeI}.
gdouble nc_recomb_HeII_ion_saha (NcHICosmo *cosmo
,const gdouble x
);
Calculates the equilibrium double/single ionized helium ratio ($X_{\HeIII}X_\e/X_{\HeII}$). See Eq. \eqref{eq:saha:HeII}.
gdouble nc_recomb_HeII_ion_saha_x (NcHICosmo *cosmo
,const gdouble f
);
Calculates the redshift where the ratio $$X_{\HeIII}X_\e/X_{\HeII} = f.$$
This calculation is done by finding the value of $x$ where $$\frac{e^{-\HeII_{1s}/(k_BT)}}{4n_{\Hy}\lambda_{\e}^3} = f.$$
gdouble nc_recomb_HeII_ion_saha_x_by_HeIII_He (NcHICosmo *cosmo
,const gdouble f
);
Calculates the redshift where the ratio $$X_{\HeIII}/X_{\He} = f.$$
This calculation is done assuming that hydrogen and helium are fully ionized, i.e., $\HyI = 0 = \HeI$. In this case $$\frac{X_{\HeIII}X_\e}{X_{\HeII}} = \frac{f}{1-f}\left[1 + X_\He(1+f)\right].$$
gdouble nc_recomb_He_fully_ionized_Xe (NcHICosmo *cosmo
,const gdouble x
);
Assuming that all helium is single or double ionized and all hydrogen is
ionized, we have $$X_\e = 1 + X_\HeII + 2X_\HeIII,\quad X_\He = X_\HeII +
X_\HeIII,$$ thus, $$X_\HeIII = X_\e-X_\He-1,\quad X_\HeII = 1 + 2X_\He -
X_\e.$$ Using nc_recomb_HeII_ion_saha()
and nc_hicosmo_XHe()
we obtain
$X_\e$.
gdouble nc_recomb_equilibrium_Xe (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble x
);
Calculates the ionization fraction $X_\e$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.
gdouble nc_recomb_equilibrium_XHI (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble x
);
Calculates the hydrogen-I fraction $X_\HyI$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.
gdouble nc_recomb_equilibrium_XHII (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble x
);
Calculates the hydrogen-II fraction $X_\HyII$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.
gdouble nc_recomb_equilibrium_XHeI (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble x
);
Calculates the helium-I fraction $X_\HeI$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.
gdouble nc_recomb_equilibrium_XHeII (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble x
);
Calculates the helium-II fraction $X_\HeII$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.
gdouble nc_recomb_equilibrium_XHeIII (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble x
);
Calculates the helium-III fraction $X_\HeIII$ assuming equilibrium at all times. It solves the system containing all Saha's equations Eqs \eqref{eq:saha:HyI}, \eqref{eq:saha:HeI} and \eqref{eq:saha:HeII} and the constraints Eq \eqref{eq:Hy:add}, \eqref{eq:He:add} and \eqref{eq:def:Xe}.
gdouble nc_recomb_dtau_dx (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the derivative of the optical depth with respect to $x = 1 + z$,
$\frac{\mathrm{d}\tau}{\mathrm{d}x}$, at lambda
.
gdouble nc_recomb_dtau_dlambda (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the derivative of the optical depth with respect to $\lambda$,
$\frac{\mathrm{d}\tau}{\mathrm{d}\lambda}$, at lambda
.
gdouble nc_recomb_d2tau_dlambda2 (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the second derivative of the optical depth with respect to $\lambda$,
$\frac{\mathrm{d}^2\tau}{\mathrm{d}\lambda^2}$, at lambda
.
gdouble nc_recomb_d3tau_dlambda3 (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the third derivative of the optical depth with respect to $\lambda$,
$\frac{\mathrm{d}^3\tau}{\mathrm{d}\lambda^3}$, at lambda
.
gdouble nc_recomb_tau (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the optical depth [Eq. \eqref{eq:def:tau}] at lambda
.
gdouble nc_recomb_tau_drag (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the drag depth, $$\tau_d \equiv \int_0^\lambda \mathrm{d}\lambda R^{-1} \frac{n_e \sigma_T}{1+z},$$ where $R = \frac{3\bar{\rho}_b}{4\bar{\rho}_\gamma}$.
gdouble nc_recomb_tau_lambda0_lambda1 (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda0
,const gdouble lambda1
);
Computes the optical depth between lambda1
and lambda0
.
gdouble nc_recomb_log_v_tau (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the logarithm base e of the visibility function [Eq. \eqref{eq:def:vtau}] at lambda
.
gdouble nc_recomb_v_tau (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the visibility function [Eq. \eqref{eq:def:vtau}] at lambda
.
gdouble nc_recomb_dv_tau_dlambda (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the derivative of the visibility function [Eq. \eqref{eq:def:vtau}] at lambda
.
gdouble nc_recomb_d2v_tau_dlambda2 (NcRecomb *recomb
,NcHICosmo *cosmo
,const gdouble lambda
);
Computes the second derivative of the visibility function [Eq. \eqref{eq:def:vtau}] at lambda
.
void nc_recomb_v_tau_lambda_features (NcRecomb *recomb
,NcHICosmo *cosmo
,gdouble logref
,gdouble *lambda_max
,gdouble *lambda_l
,gdouble *lambda_u
);
Calculates the maximum of the visibility function [Eq \eqref{eq:def:vtau}], i.e, the value of $\lambda_\text{max}$ where $dv_\tau(\lambda_\text{max})/d\lambda = 0$, and the values where the visibility drops to $v_\tau(\lambda_\text{max})e^{-\text{logref}}$ to the left $\lambda_l$ and to the right $\lambda_u$ of $\lambda_\text{max}$.
gdouble nc_recomb_get_v_tau_max_lambda (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the maximum of the visibility function [Eq. \eqref{eq:def:vtau}], the value of $\lambda_\text{max}$ where $dv_\tau(\lambda_\text{max})/d\lambda = 0$.
gdouble nc_recomb_get_tau_lambda (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the value of $\lambda$ where the optical depth [Eq \eqref{eq:def:tau}] is equal to one, i.e., $\tau(\lambda^\star) = 1$.
gdouble nc_recomb_get_tau_drag_lambda (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the value of $\lambda$ where the optical depth times $R$ [Eq. \eqref{eq:def:tau}] is equal to one, i.e., $\tau_\mathrm{drag}(\lambda^\star) = 1$.
gdouble nc_recomb_get_tau_cutoff_lambda (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the value of $\lambda$ where the optical depth [Eq \eqref{eq:def:tau}] attains a value such that $e^{-\tau(\lambda_\text{cutoff})} = \epsilon_\text{double}$, i.e., equal to the smallest value of a double which add to one.
gdouble nc_recomb_get_v_tau_max_z (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the maximum of the visibility function [Eq. \eqref{eq:def:vtau}], the value of $z(\lambda_\text{max})$ where $dv_\tau(\lambda_\text{max})/d\lambda = 0$.
gdouble nc_recomb_get_tau_z (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the value of $z(\lambda)$ where the optical depth [Eq \eqref{eq:def:tau}] is equal to one, i.e., $\tau(\lambda^\star) = 1$.
gdouble nc_recomb_get_tau_drag_z (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the value of $z(\lambda)$ where the optical depth times $R$ (drag depth) [Eq. \eqref{eq:def:tau}] is equal to one, i.e., $\tau_\mathrm{drag}(\lambda^\star) = 1$.
gdouble nc_recomb_get_tau_cutoff_z (NcRecomb *recomb
,NcHICosmo *cosmo
);
Calculates the value of $z(\lambda)$ where the optical depth [Eq \eqref{eq:def:tau}] attains a value such that $e^{-\tau(\lambda_\text{cutoff})} = \epsilon_\text{double}$, i.e., equal to the smallest value of a double which add to one.
gdouble nc_recomb_dtau_dlambda_Xe (NcHICosmo *cosmo
,const gdouble lambda
);
The derivative of the optical depth [Eq. \eqref{eq:def:dtaudlambda}] over the ionization fraction $X_\e$ [Eq. \eqref{eq:def:Xe}].
gdouble nc_recomb_He_fully_ionized_dtau_dlambda (NcHICosmo *cosmo
,const gdouble lambda
);
The derivative of the optical depth [Eq. \eqref{eq:def:dtaudlambda}], considering
fully ionized helium and hydrogen [nc_recomb_He_fully_ionized_Xe()
].
“init-frac”
property “init-frac” double
Initial fraction to start numerical integration.
Owner: NcRecomb
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 1e-11
“prec”
property “prec” double
The precision used in the calculations.
Owner: NcRecomb
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 1e-07