Adiabatic Perturbation Object

Adiabatic Perturbation Object — Perturbation object for adiabatic mode only

Types and Values

Object Hierarchy

    GEnum
    ╰── NcHIPertAdiabVars
    GObject
    ╰── NcHIPert
        ╰── NcHIPertAdiab

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 defined by nc_hicosmo_rhopp(), $E^2 = H^2/H_0^2$ is the adimensional Hubble function squared (nc_hicosmo_E2()), $c_s^2$ the speed of sound (nc_hicosmo_cs2()), $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_k}.$$

Functions

nc_hipert_adiab_new ()

NcHIPertAdiab *
nc_hipert_adiab_new (void);

Creates a new NcHIPertAdiab object.

Returns

a new NcHIPertAdiab.

[transfer full]


nc_hipert_adiab_ref ()

NcHIPertAdiab *
nc_hipert_adiab_ref (NcHIPertAdiab *pa);

Increases the reference count of pa .

Parameters

pa

a NcHIPertAdiab.

 

Returns

pa .

[transfer full]


nc_hipert_adiab_free ()

void
nc_hipert_adiab_free (NcHIPertAdiab *pa);

Decreases the reference count of pa .

Parameters

pa

a NcHIPertAdiab.

 

nc_hipert_adiab_clear ()

void
nc_hipert_adiab_clear (NcHIPertAdiab **pa);

Decreases the reference count of *pa and sets *pa to NULL.

Parameters

pa

a NcHIPertAdiab.

 

nc_hipert_adiab_prepare_wkb ()

void
nc_hipert_adiab_prepare_wkb (NcHIPertAdiab *pa,
                             NcHICosmo *cosmo,
                             gdouble alpha_i,
                             gdouble alpha_f);

Prepare the object for WKB calculations using the cosmology cosmo .

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha_i

initial log-redshift time.

 

alpha_f

final log-redshift time.

 

nc_hipert_adiab_prepare_ewkb ()

void
nc_hipert_adiab_prepare_ewkb (NcHIPertAdiab *pa,
                              NcHICosmo *cosmo,
                              gdouble alpha_i,
                              gdouble alpha_f);

Prepare the object for exact WKB calculations using the cosmology cosmo . Instead of using the wkb approximation as in nc_hipert_adiab_prepare_wkb it solves the non-linear equation of motion for $\nu_A$.

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha_i

initial log-redshift time.

 

alpha_f

final log-redshift time.

 

nc_hipert_adiab_prepare_patched ()

void
nc_hipert_adiab_prepare_patched (NcHIPertAdiab *pa,
                                 NcHICosmo *cosmo,
                                 gdouble prec,
                                 gdouble alpha_i,
                                 gdouble alpha_f);

Prepare the object for exact WKB calculations using the cosmology cosmo . Instead of using the wkb approximation as in nc_hipert_adiab_prepare_wkb it solves the non-linear equation of motion for $\nu_A$.

Parameters

pa

a NcHIPertAdiab.

 

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

a NcHIPertAdiab.

 

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

a NcHIPertAdiab.

 

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_ewkb_zeta ()

void
nc_hipert_adiab_ewkb_zeta (NcHIPertAdiab *pa,
                           NcHICosmo *cosmo,
                           gdouble alpha,
                           gdouble *Re_zeta,
                           gdouble *Im_zeta);

Computes the solution $\zeta_\text{ewkb}$ for the mode $k$ at the time $\alpha$.

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha

the log-redshift time.

 

Re_zeta

Real part of the exact WKB solution.

[out caller-allocates]

Im_zeta

Imaginary part of the exact WKB solution.

[out caller-allocates]

nc_hipert_adiab_ewkb_zeta_Pzeta ()

void
nc_hipert_adiab_ewkb_zeta_Pzeta (NcHIPertAdiab *pa,
                                 NcHICosmo *cosmo,
                                 gdouble alpha,
                                 gdouble *Re_zeta,
                                 gdouble *Im_zeta,
                                 gdouble *Re_Pzeta,
                                 gdouble *Im_Pzeta);

Computes the exact WKB solution $\zeta_\text{ewkb}$ and its momentum for the mode $k$ at the time $\alpha$.

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha

the log-redshift time.

 

Re_zeta

Real part of the exact WKB solution.

[out caller-allocates]

Im_zeta

Imaginary part of the exact WKB solution.

[out caller-allocates]

Re_Pzeta

Real part of the exact WKB solution momentum.

[out caller-allocates]

Im_Pzeta

Imaginary part of the exact WKB solution momentum.

[out caller-allocates]

nc_hipert_adiab_patched_zeta ()

void
nc_hipert_adiab_patched_zeta (NcHIPertAdiab *pa,
                              NcHICosmo *cosmo,
                              gdouble alpha,
                              gdouble *Re_zeta,
                              gdouble *Im_zeta);

Computes the solution $\zeta_\text{ewkb}$ for the mode $k$ at the time $\alpha$.

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha

the log-redshift time.

 

Re_zeta

Real part of the patched solution.

[out caller-allocates]

Im_zeta

Imaginary part of the patched solution.

[out caller-allocates]

nc_hipert_adiab_patched_zeta_Pzeta ()

void
nc_hipert_adiab_patched_zeta_Pzeta (NcHIPertAdiab *pa,
                                    NcHICosmo *cosmo,
                                    gdouble alpha,
                                    gdouble *Re_zeta,
                                    gdouble *Im_zeta,
                                    gdouble *Re_Pzeta,
                                    gdouble *Im_Pzeta);

Computes the patched solution $\zeta_\text{ewkb}$ and its momentum for the mode $k$ at the time $\alpha$.

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha

the log-redshift time.

 

Re_zeta

Real part of the patched solution.

[out caller-allocates]

Im_zeta

Imaginary part of the patched solution.

[out caller-allocates]

Re_Pzeta

Real part of the patched solution momentum.

[out caller-allocates]

Im_Pzeta

Imaginary part of the patched 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

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha0

the initial log-redshift time.

 

alpha1

the final log-redshift time.

 

Returns

the root of $\nu_A^2$ between $\alpha_0$ and $\alpha_1$ or NaN if not found.


nc_hipert_adiab_wkb_maxtime_prec ()

gdouble
nc_hipert_adiab_wkb_maxtime_prec (NcHIPertAdiab *pa,
                                  NcHICosmo *cosmo,
                                  gdouble prec,
                                  gdouble alpha0,
                                  gdouble alpha1);

Search for the instant at which the WKB approximation starts to fails within the asked precision.

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

prec

Required precision.

 

alpha0

the initial log-redshift time.

 

alpha1

the final log-redshift time.

 

Returns

the instant $\alpha$ between $\alpha_0$ and $\alpha_1$ or NaN if not found.


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

a NcHIPertAdiab.

 

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 .

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha_i

the log-redshift time.

 

nc_hipert_adiab_set_init_cond_ewkb ()

void
nc_hipert_adiab_set_init_cond_ewkb (NcHIPertAdiab *pa,
                                    NcHICosmo *cosmo,
                                    gdouble alpha_i);

Sets the initial conditions for the zeta evolution using the value of the exact wkb solution at alpha_i .

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha_i

the log-redshift time.

 

nc_hipert_adiab_set_init_cond_patched ()

void
nc_hipert_adiab_set_init_cond_patched (NcHIPertAdiab *pa,
                                       NcHICosmo *cosmo,
                                       gdouble alpha_i);

Sets the initial conditions for the zeta evolution using the value of the patched solution at alpha_i .

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alpha_i

the log-redshift time.

 

nc_hipert_adiab_evolve ()

void
nc_hipert_adiab_evolve (NcHIPertAdiab *pa,
                        NcHICosmo *cosmo,
                        gdouble alphaf);

Evolve the system until alphaf .

Parameters

pa

a NcHIPertAdiab.

 

cosmo

a NcHICosmo.

 

alphaf

the final log-redshift time.

 

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

a NcHIPertAdiab.

 

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]

Types and Values

enum NcHIPertAdiabVars

Perturbation variables enumerator.

Members

NC_HIPERT_ADIAB_RE_ZETA

$\text{Re}(\zeta)$

 

NC_HIPERT_ADIAB_IM_ZETA

$\text{Im}(\zeta)$

 

NC_HIPERT_ADIAB_RE_PZETA

$\text{Re}(P_\zeta)$

 

NC_HIPERT_ADIAB_IM_PZETA

$\text{Im}(P_\zeta)$