Top | ![]() |
![]() |
![]() |
![]() |
Functions
NcHIPertAdiab * | nc_hipert_adiab_new () |
NcHIPertAdiab * | nc_hipert_adiab_ref () |
void | nc_hipert_adiab_free () |
void | nc_hipert_adiab_clear () |
void | nc_hipert_adiab_prepare_wkb () |
void | nc_hipert_adiab_wkb_zeta () |
void | nc_hipert_adiab_wkb_zeta_Pzeta () |
void | nc_hipert_adiab_wkb_v () |
gdouble | nc_hipert_adiab_wkb_maxtime () |
gdouble | nc_hipert_adiab_wkb_maxtime_prec () |
void | nc_hipert_adiab_set_init_cond () |
void | nc_hipert_adiab_set_init_cond_wkb () |
void | nc_hipert_adiab_evolve () |
void | nc_hipert_adiab_get_values () |
Description
This object provides the computation of the adiabatic mode for the cosmological perturbations. It solves the equation of motion for the gauge invariant variable (see Vitenti (2013) for notation and details) $$\zeta \equiv \Psi - \frac{2\bar{K}}{\kappa(\bar{\rho} + \bar{p})} + H\mathcal{V}.$$ Its conjugated momentum is give by \begin{split} P_\zeta &= \frac{2\bar{D}^2_\bar{K}\Psi}{x^3H}, \end{split}
The equations of motion in their first order form are
\begin{align}
\zeta^\prime &= \frac{P_\zeta}{m_\zeta}, \\
P_\zeta^\prime &= -m_\zeta\mu_\zeta^2\zeta.
\end{align}
The mass $m_\zeta$ and the frequency $\mu_\zeta$ are defined by
\begin{align}
m_\zeta &= \frac{3\Delta_\bar{K}(\bar{\rho} + \bar{p})}{\rho_\text{crit0} N x^3 c_s^2 E^2}, \\
\mu_\zeta^2 &= x^2N^2c_s^2k^2,
\end{align}
where $\bar{\rho} + \bar{p}$ is the background total energy density plus pressure,
$E^2 = H^2/H_0^2$ is the dimensionless Hubble function squared (nc_hicosmo_E2()
), $c_s^2$ the speed of sound,
$N$ is the lapse function that in this case (using $\alpha$ as time variable) is $N \equiv \vert{}E\vert^{-1}$, $\rho_\text{crit0}$
is the critical density today defined by $\rho_\text{crit0} \equiv 3H_0^2/\kappa$ and $$\Delta_\bar{K} \equiv \frac{k^2}{k^2 + \Omega_{k0}}.$$
Functions
nc_hipert_adiab_new ()
NcHIPertAdiab *
nc_hipert_adiab_new (void
);
Creates a new NcHIPertAdiab object.
nc_hipert_adiab_ref ()
NcHIPertAdiab *
nc_hipert_adiab_ref (NcHIPertAdiab *pa
);
Increases the reference count of pa
.
nc_hipert_adiab_free ()
void
nc_hipert_adiab_free (NcHIPertAdiab *pa
);
Decreases the reference count of pa
.
nc_hipert_adiab_clear ()
void
nc_hipert_adiab_clear (NcHIPertAdiab **pa
);
Decreases the reference count of *pa
and sets *pa
to NULL.
nc_hipert_adiab_prepare_wkb ()
void nc_hipert_adiab_prepare_wkb (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble prec
,gdouble alpha_i
,gdouble alpha_f
);
Prepare the object for WKB calculations using the cosmology cosmo
.
Parameters
pa |
||
cosmo |
a NcHICosmo. |
|
prec |
Required precision. |
|
alpha_i |
initial log-redshift time. |
|
alpha_f |
final log-redshift time. |
nc_hipert_adiab_wkb_zeta ()
void nc_hipert_adiab_wkb_zeta (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble alpha
,gdouble *Re_zeta
,gdouble *Im_zeta
);
Computes the WKB solution $\zeta_\text{WKB}$ for the mode $k$ at the time $\alpha$.
Parameters
pa |
||
cosmo |
a NcHICosmo. |
|
alpha |
the log-redshift time. |
|
Re_zeta |
Real part of the wkb solution. |
[out caller-allocates] |
Im_zeta |
Imaginary part of the wkb solution. |
[out caller-allocates] |
nc_hipert_adiab_wkb_zeta_Pzeta ()
void nc_hipert_adiab_wkb_zeta_Pzeta (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble alpha
,gdouble *Re_zeta
,gdouble *Im_zeta
,gdouble *Re_Pzeta
,gdouble *Im_Pzeta
);
Computes the WKB solution $\zeta_\text{WKB}$ and its momentum for the mode $k$ at the time $\alpha$.
Parameters
pa |
||
cosmo |
a NcHICosmo. |
|
alpha |
the log-redshift time. |
|
Re_zeta |
Real part of the wkb solution. |
[out caller-allocates] |
Im_zeta |
Imaginary part of the wkb solution. |
[out caller-allocates] |
Re_Pzeta |
Real part of the wkb solution momentum. |
[out caller-allocates] |
Im_Pzeta |
Imaginary part of the wkb solution momentum. |
[out caller-allocates] |
nc_hipert_adiab_wkb_v ()
void nc_hipert_adiab_wkb_v (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble alpha
,gdouble *Re_v
,gdouble *Im_v
);
nc_hipert_adiab_wkb_maxtime ()
gdouble nc_hipert_adiab_wkb_maxtime (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble alpha0
,gdouble alpha1
);
Search for the root of $\nu_A^2$ between $\alpha_0$ and $\alpha_1$.
Parameters
pa |
||
cosmo |
a NcHICosmo. |
|
alpha0 |
the initial log-redshift time. |
|
alpha1 |
the final log-redshift time. |
nc_hipert_adiab_wkb_maxtime_prec ()
gdouble nc_hipert_adiab_wkb_maxtime_prec (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,NcHIPertWKBCmp cmp
,gdouble prec
,gdouble alpha0
,gdouble alpha1
);
Search for the instant at which the WKB approximation starts to fails within the asked precision.
Parameters
pa |
||
cosmo |
a NcHICosmo. |
|
cmp |
Comparison type. |
|
prec |
Required precision. |
|
alpha0 |
the initial log-redshift time. |
|
alpha1 |
the final log-redshift time. |
nc_hipert_adiab_set_init_cond ()
void nc_hipert_adiab_set_init_cond (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble alpha_i
,gdouble Re_zeta
,gdouble Im_zeta
,gdouble Re_Pzeta
,gdouble Im_Pzeta
);
Sets the initial conditions for the zeta evolution.
Parameters
pa |
||
cosmo |
a NcHICosmo. |
|
alpha_i |
the log-redshift time. |
|
Re_zeta |
Real part of the wkb solution. |
|
Im_zeta |
Imaginary part of the wkb solution. |
|
Re_Pzeta |
Real part of the wkb solution momentum. |
|
Im_Pzeta |
Imaginary part of the wkb solution momentum. |
nc_hipert_adiab_set_init_cond_wkb ()
void nc_hipert_adiab_set_init_cond_wkb (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble alpha_i
);
Sets the initial conditions for the zeta evolution using the value of the WKB solution at alpha_i
.
nc_hipert_adiab_evolve ()
void nc_hipert_adiab_evolve (NcHIPertAdiab *pa
,NcHICosmo *cosmo
,gdouble alphaf
);
Evolve the system until alphaf
.
nc_hipert_adiab_get_values ()
void nc_hipert_adiab_get_values (NcHIPertAdiab *pa
,gdouble *alpha_i
,gdouble *Re_zeta
,gdouble *Im_zeta
,gdouble *Re_Pzeta
,gdouble *Im_Pzeta
);
Get the current time and values of the numerical solution.
Parameters
pa |
||
alpha_i |
Current time. |
[out caller-allocates] |
Re_zeta |
Real part of the solution. |
[out caller-allocates] |
Im_zeta |
Imaginary part of the solution. |
[out caller-allocates] |
Re_Pzeta |
Real part of the solution momentum. |
[out caller-allocates] |
Im_Pzeta |
Imaginary part of the solution momentum. |
[out caller-allocates] |