CLASS MANUAL
|
#include "background.h"
#include "evolver_ndf15.h"
#include "evolver_rkck.h"
#include "wrap_hyrec.h"
#include "wrap_recfast.h"
#include "injection.h"
Go to the source code of this file.
Data Structures | |
struct | thermodynamics |
struct | thermo_vector |
struct | thermo_diffeq_workspace |
struct | thermo_reionization_parameters |
struct | thermo_workspace |
struct | thermodynamics_parameters_and_workspace |
Macros | |
#define | f1(x) (-0.75*x*(x*x/3.-1.)+0.5) |
#define | f2(x) (x*x*(0.5-x/3.)*6.) |
Some limits imposed on cosmological parameter values: | |
#define | _YHE_BIG_ 0.5 |
#define | _YHE_SMALL_ 0.01 |
#define | _Z_REC_MAX_ 2000. |
#define | _Z_REC_MIN_ 500. |
Enumerations | |
enum | recombination_algorithm |
enum | reionization_parametrization { reio_none , reio_camb , reio_bins_tanh , reio_half_tanh , reio_many_tanh , reio_inter } |
enum | reionization_z_or_tau { reio_z , reio_tau } |
Documented includes for thermodynamics module
struct thermodynamics |
All thermodynamics parameters and evolution that other modules need to know.
Once initialized by thermodynamics_init(), contains all the necessary information on the thermodynamics, and in particular, a table of thermodynamical quantities as a function of the redshift, used for interpolation in other modules.
Data Fields | ||
---|---|---|
double | YHe |
: primordial helium mass fraction rho_He/(rho_H+rho_He), close but not exactly equal to the density fraction 4*n_He/(n_H+4*n_He) |
double | bbn_alpha_sensitivity |
Related to variation of fundamental constants (sensitivity of YHe to alpha) |
enum recombination_algorithm | recombination |
recombination code |
enum recfast_photoion_modes | recfast_photoion_mode |
photo-ionization coefficient mode of the recfast algorithm |
enum reionization_parametrization | reio_parametrization |
reionization scheme |
enum reionization_z_or_tau | reio_z_or_tau |
is the input parameter the reionization redshift or optical depth? |
double | tau_reio |
if above set to tau, input value of reionization optical depth |
double | z_reio |
if above set to z, input value of reionization redshift |
short | compute_cb2_derivatives |
do we want to include in computation derivatives of baryon sound speed? |
short | compute_damping_scale |
do we want to compute the simplest analytic approximation to the photon damping (or diffusion) scale? |
short | has_idm_b |
parameters for interacting dark matter Do we have idm with baryons? |
short | has_idm_g |
Do we have idm with photons? |
short | has_idm_dr |
Do we have idm with dark radiation? |
double | reionization_width |
parameters for reio_camb width of H reionization |
double | reionization_exponent |
shape of H reionization |
double | helium_fullreio_redshift |
redshift for of helium reionization |
double | helium_fullreio_width |
width of helium reionization |
int | binned_reio_num |
parameters for reio_bins_tanh with how many bins do we want to describe reionization? |
double * | binned_reio_z |
central z value for each bin |
double * | binned_reio_xe |
imposed value at center of each bin |
double | binned_reio_step_sharpness |
sharpness of tanh() step interpolating between binned values |
int | many_tanh_num |
parameters for reio_many_tanh with how many jumps do we want to describe reionization? |
double * | many_tanh_z |
central z value for each tanh jump |
double * | many_tanh_xe |
imposed value at the end of each jump (ie at later times) |
double | many_tanh_width |
sharpness of tanh() steps |
int | reio_inter_num |
parameters for reio_inter with how many jumps do we want to describe reionization? |
double * | reio_inter_z |
discrete z values |
double * | reio_inter_xe |
discrete values |
short | has_exotic_injection |
parameters for energy injection true if some exotic mechanism injects energy and affects the evolution of ionization and/or temperature and/or other thermodynamics variables that are relevant for the calculation of CMB anisotropies (and spectral distorsions if requested). |
struct injection | in |
structure to store exotic energy injections and their energy deposition |
double | annihilation |
parameter describing CDM annihilation (f <sigma*v> / m_cdm, see e.g. 0905.0003) |
short | has_on_the_spot |
flag to specify if we want to use the on-the-spot approximation |
double | decay |
parameter describing CDM decay (f/tau, see e.g. 1109.6322) |
double | annihilation_variation |
if this parameter is non-zero, the function F(z)=(f <sigma*v> / m_cdm)(z) will be a parabola in log-log scale between zmin and zmax, with a curvature given by annihlation_variation (must be negative), and with a maximum in zmax; it will be constant outside this range |
double | annihilation_z |
if annihilation_variation is non-zero, this is the value of z at which the parameter annihilation is defined, i.e. F(annihilation_z)=annihilation |
double | annihilation_zmax |
if annihilation_variation is non-zero, redshift above which annihilation rate is maximal |
double | annihilation_zmin |
if annihilation_variation is non-zero, redshift below which annihilation rate is constant |
double | annihilation_f_halo |
takes the contribution of DM annihilation in halos into account |
double | annihilation_z_halo |
characteristic redshift for DM annihilation in halos |
short | has_varconst |
parameters for varying fundamental constants presence of varying fundamental constants? |
int | index_th_xe |
ionization fraction |
int | index_th_dkappa |
Thomson scattering rate (units 1/Mpc) |
int | index_th_tau_d |
Baryon drag optical depth |
int | index_th_ddkappa |
scattering rate derivative |
int | index_th_dddkappa |
scattering rate second derivative |
int | index_th_exp_m_kappa |
|
int | index_th_g |
visibility function |
int | index_th_dg |
visibility function derivative |
int | index_th_ddg |
visibility function second derivative |
int | index_th_T_idm |
idm temperature |
int | index_th_c2_idm |
idm sound speed squared |
int | index_th_T_idr |
idr temperature |
int | index_th_dmu_idm_dr |
scattering rate of idr with idm_g_dr (i.e. idr opacity to idm_g_dr scattering) (units 1/Mpc) |
int | index_th_ddmu_idm_dr |
derivative of the idm_g_dr scattering rate |
int | index_th_dddmu_idm_dr |
second derivative of the idm_g_dr scattering rate |
int | index_th_dmu_idr |
idr self-interaction rate |
int | index_th_tau_idm_dr |
optical depth of idm_dr (due to interactions with idr) |
int | index_th_tau_idr |
optical depth of idr (due to self-interactions) |
int | index_th_g_idm_dr |
visibility function of idm_idr |
int | index_th_dmu_idm_g |
idm_g scattering rate (analogous to Thomson scattering) (see 1802.06589 for details) |
int | index_th_ddmu_idm_g |
derivative of idm_g scattering, |
int | index_th_dddmu_idm_g |
second derivative of idm_g scattering rate, |
int | index_th_exp_mu_idm_g |
|
int | index_th_R_idm_b |
idm_b interaction coefficient |
int | index_th_dR_idm_b |
derivative of idm_b interaction coefficient wrt conformal time |
int | index_th_ddR_idm_b |
second derivative of ibm_b interaction coefficient wrt conformal time |
int | index_th_Tb |
baryon temperature |
int | index_th_dTb |
derivative of baryon temperature |
int | index_th_wb |
baryon equation of state parameter |
int | index_th_cb2 |
squared baryon adiabatic sound speed |
int | index_th_dcb2 |
derivative wrt conformal time of squared baryon sound speed (only computed if some non-minimal tight-coupling schemes is requested) |
int | index_th_ddcb2 |
second derivative wrt conformal time of squared baryon sound speed (only computed if some non0-minimal tight-coupling schemes is requested) |
int | index_th_rate |
maximum variation rate of , g and , used for computing integration step in perturbation module |
int | index_th_r_d |
simple analytic approximation to the photon comoving damping scale |
int | th_size |
size of thermodynamics vector |
int | tt_size |
number of lines (redshift steps) in the tables |
double * | z_table |
vector z_table[index_z] with values of redshift (vector of size tt_size) |
double * | tau_table |
vector tau_table[index_tau] with values of conformal time (vector of size tt_size) |
double * | thermodynamics_table |
table thermodynamics_table[index_z*pth->tt_size+pba->index_th] with all other quantities (array of size th_size*tt_size) |
double * | d2thermodynamics_dz2_table |
table d2thermodynamics_dz2_table[index_z*pth->tt_size+pba->index_th] with values of (array of size th_size*tt_size) |
double | z_rec |
z at which the visibility reaches its maximum (= recombination redshift) |
double | tau_rec |
conformal time at which the visibility reaches its maximum (= recombination time) |
double | rs_rec |
comoving sound horizon at recombination |
double | ds_rec |
physical sound horizon at recombination |
double | ra_rec |
conformal angular diameter distance to recombination |
double | da_rec |
physical angular diameter distance to recombination |
double | rd_rec |
comoving photon damping scale at recombination |
double | z_star |
redshift at which photon optical depth crosses one |
double | tau_star |
confirmal time at which photon optical depth crosses one |
double | rs_star |
comoving sound horizon at z_star |
double | ds_star |
physical sound horizon at z_star |
double | ra_star |
conformal angular diameter distance to z_star |
double | da_star |
physical angular diameter distance to z_star |
double | rd_star |
comoving photon damping scale at z_star |
double | z_d |
baryon drag redshift |
double | tau_d |
baryon drag time |
double | ds_d |
physical sound horizon at baryon drag |
double | rs_d |
comoving sound horizon at baryon drag |
double | tau_cut |
at at which the visibility goes below a fixed fraction of the maximum visibility, used for an approximation in perturbation module |
double | angular_rescaling |
[ratio ra_rec / (tau0-tau_rec)]: gives CMB rescaling in angular space relative to flat model (=1 for curvature K=0) |
double | tau_free_streaming |
minimum value of tau at which free-streaming approximation can be switched on |
double | tau_idr_free_streaming |
trigger for dark radiation free streaming approximation (idm-idr) |
double | tau_idr |
decoupling time for idr |
double | tau_idm_dr |
decoupling time for idm from idr |
double | tau_ini |
initial conformal time at which thermodynamical variables have been be integrated |
double | fHe |
: primordial helium-to-hydrogen nucleon ratio 4*n_He/n_H |
double | n_e |
total number density of electrons today (free or not) |
double | m_idm |
dark matter mass for idm |
double | a_idm_dr |
strength of the coupling between interacting dark matter and interacting dark radiation (idm-idr) |
double | b_idr |
strength of the self coupling for interacting dark radiation (idr-idr) |
double | n_index_idm_dr |
temperature dependence of the interactions between dark matter and dark radiation |
double | cross_idm_b |
cross section between interacting dark matter and baryons |
int | n_index_idm_b |
temperature dependence of the interactions between dark matter and baryons |
double | n_coeff_idm_b |
numerical n-dependent coefficient for idm_b |
double | cross_idm_g |
cross section between interacting dark matter and photons |
double | u_idm_g |
ratio between idm_g cross section and idm mass |
int | n_index_idm_g |
temperature dependence of the interactions between dark matter and photons |
short | inter_normal |
flag for calling thermodynamics_at_z and find position in interpolation table normally |
short | inter_closeby |
flag for calling thermodynamics_at_z and find position in interpolation table starting from previous position in previous call |
short | thermodynamics_verbose |
flag regulating the amount of information sent to standard output (none if set to zero) |
short | hyrec_verbose |
flag regulating the amount of information sent to standard output from hyrec (none if set to zero) |
ErrorMsg | error_message |
zone for writing error messages |
struct thermo_vector |
Other structures that are used during the thermodynamics module execution (i.e. during thermodynamics_init()) but get erased later on: thus they cannot be accessed by other modules. Vector of thermodynamical quantities to integrate over, and indices of this vector
struct thermo_diffeq_workspace |
Workspace for differential equation of thermodynamics
struct thermo_reionization_parameters |
Workspace for reionization
struct thermo_workspace |
General parameters relevant to thermal history and pointers to few other more specialised worspaces
Data Fields | ||
---|---|---|
int | Nz_reco_lin |
number of redshifts linearly sampled for recombination during the evolver loop |
int | Nz_reco_log |
number of redshifts logarithmically sampled for recombination during the evolver loop |
int | Nz_reco |
number of redshifts for recombination during the evolver loop |
int | Nz_reio |
number of redshift points of reionization during evolver loop |
int | Nz_tot |
total number of sampled redshifts |
double | YHe |
defined as in RECFAST : primordial helium mass fraction |
double | fHe |
defined as in RECFAST : primordial helium-to-hydrogen nucleon ratio |
double | SIunit_H0 |
defined as in RECFAST : Hubble parameter today in SI units |
double | SIunit_nH0 |
defined as in RECFAST : Hydrogen number density today in SI units |
double | Tcmb |
CMB temperature today in Kelvin |
double | const_NR_numberdens |
prefactor in number density of nonrelativistic species |
double | const_Tion_H |
ionization energy for HI as temperature |
double | const_Tion_HeI |
ionization energy for HeI as temperature |
double | const_Tion_HeII |
ionization energy for HeII as temperature |
short | has_ap_idmtca |
flag to determine if we have idm tight-coupling approximation |
double | z_ap_idmtca |
redshift at which we start idm tight-coupling approximation |
double | reionization_optical_depth |
reionization optical depth inferred from reionization history |
int | last_index_back |
nearest location in background table |
struct thermo_diffeq_workspace * | ptdw |
pointer to workspace for differential equations |
struct thermo_reionization_parameters * | ptrp |
pointer to workspace for reionization |
struct thermodynamics_parameters_and_workspace |
temporary parameters and workspace passed to the thermodynamics_derivs function
#define f1 | ( | x | ) | (-0.75*x*(x*x/3.-1.)+0.5) |
Two useful smooth step functions, for smoothing transitions in recfast. goes from 0 to 1 when x goes from -1 to 1
#define f2 | ( | x | ) | (x*x*(0.5-x/3.)*6.) |
goes from 0 to 1 when x goes from 0 to 1
#define _YHE_BIG_ 0.5 |
maximal
#define _YHE_SMALL_ 0.01 |
minimal
List of possible recombination algorithms.
List of possible reionization schemes.