CLASS MANUAL
|
Functions | |
int | thermodynamics_at_z (struct background *pba, struct thermo *pth, double z, short inter_mode, int *last_index, double *pvecback, double *pvecthermo) |
int | thermodynamics_init (struct precision *ppr, struct background *pba, struct thermo *pth) |
int | thermodynamics_free (struct thermo *pth) |
int | thermodynamics_indices (struct thermo *pth, struct recombination *preco, struct reionization *preio) |
int | thermodynamics_helium_from_bbn (struct precision *ppr, struct background *pba, struct thermo *pth) |
int | thermodynamics_onthespot_energy_injection (struct precision *ppr, struct background *pba, struct recombination *preco, double z, double *energy_rate, ErrorMsg error_message) |
int | thermodynamics_energy_injection (struct precision *ppr, struct background *pba, struct recombination *preco, double z, double *energy_rate, ErrorMsg error_message) |
int | thermodynamics_reionization_function (double z, struct thermo *pth, struct reionization *preio, double *xe) |
int | thermodynamics_get_xe_before_reionization (struct precision *ppr, struct thermo *pth, struct recombination *preco, double z, double *xe) |
int | thermodynamics_reionization (struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, struct reionization *preio, double *pvecback) |
int | thermodynamics_reionization_sample (struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, struct reionization *preio, double *pvecback) |
int | thermodynamics_recombination (struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, double *pvecback) |
int | thermodynamics_recombination_with_hyrec (struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, double *pvecback) |
int | thermodynamics_recombination_with_recfast (struct precision *ppr, struct background *pba, struct thermo *pth, struct recombination *preco, double *pvecback) |
int | thermodynamics_derivs_with_recfast (double z, double *y, double *dy, void *parameters_and_workspace, ErrorMsg error_message) |
int | thermodynamics_merge_reco_and_reio (struct precision *ppr, struct thermo *pth, struct recombination *preco, struct reionization *preio) |
int | thermodynamics_output_titles (struct background *pba, struct thermo *pth, char titles[_MAXTITLESTRINGLENGTH_]) |
Documented thermodynamics module
Julien Lesgourgues, 6.09.2010
Deals with the thermodynamical evolution. This module has two purposes:
The logic is the following:
In summary, the following functions can be called from other modules:
int thermodynamics_at_z | ( | struct background * | pba, |
struct thermo * | pth, | ||
double | z, | ||
short | inter_mode, | ||
int * | last_index, | ||
double * | pvecback, | ||
double * | pvecthermo | ||
) |
Thermodynamics quantities at given redshift z.
Evaluates all thermodynamics quantities at a given value of the redshift by reading the pre-computed table and interpolating.
pba | Input: pointer to background structure |
pth | Input: pointer to the thermodynamics structure (containing pre-computed table) |
z | Input: redshift |
inter_mode | Input: interpolation mode (normal or growing_closeby) |
last_index | Input/Output: index of the previous/current point in the interpolation array (input only for closeby mode, output for both) |
pvecback | Input: vector of background quantities (used only in case z>z_initial for getting ddkappa and dddkappa; in that case, should be already allocated and filled, with format short_info or larger; in other cases, will be ignored) |
pvecthermo | Output: vector of thermodynamics quantities (assumed to be already allocated) |
Summary:
int thermodynamics_init | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct thermo * | pth | ||
) |
Initialize the thermo structure, and in particular the thermodynamics interpolation table.
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
pth | Input/Output: pointer to initialized thermo structure |
Summary:
int thermodynamics_free | ( | struct thermo * | pth | ) |
Free all memory space allocated by thermodynamics_init().
pth | Input/Output: pointer to thermo structure (to be freed) |
int thermodynamics_indices | ( | struct thermo * | pth, |
struct recombination * | preco, | ||
struct reionization * | preio | ||
) |
Assign value to each relevant index in vectors of thermodynamical quantities, as well as in vector containing reionization parameters.
pth | Input/Output: pointer to thermo structure |
preco | Input/Output: pointer to recombination structure |
preio | Input/Output: pointer to reionization structure |
Summary:
int thermodynamics_helium_from_bbn | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct thermo * | pth | ||
) |
Infer the primordial helium fraction from standard BBN, as a function of the baryon density and expansion rate during BBN.
This module is simpler then the one used in arXiv:0712.2826 because it neglects the impact of a possible significant chemical potentials for electron neutrinos. The full code with xi_nu_e could be introduced here later.
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
pth | Input/Output: pointer to initialized thermo structure |
Summary:
int thermodynamics_onthespot_energy_injection | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct recombination * | preco, | ||
double | z, | ||
double * | energy_rate, | ||
ErrorMsg | error_message | ||
) |
In case of non-minimal cosmology, this function determines the energy rate injected in the IGM at a given redshift z (= on-the-spot annihilation). This energy injection may come e.g. from dark matter annihilation or decay.
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
preco | Input: pointer to recombination structure |
z | Input: redshift |
energy_rate | Output: energy density injection rate |
error_message | Output: error message |
int thermodynamics_energy_injection | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct recombination * | preco, | ||
double | z, | ||
double * | energy_rate, | ||
ErrorMsg | error_message | ||
) |
In case of non-minimal cosmology, this function determines the effective energy rate absorbed by the IGM at a given redshift (beyond the on-the-spot annihilation). This energy injection may come e.g. from dark matter annihilation or decay.
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
preco | Input: pointer to recombination structure |
z | Input: redshift |
energy_rate | Output: energy density injection rate |
error_message | Output: error message |
int thermodynamics_reionization_function | ( | double | z, |
struct thermo * | pth, | ||
struct reionization * | preio, | ||
double * | xe | ||
) |
This subroutine contains the reionization function (one for each scheme; so far, only the function corresponding to the reio_camb scheme is coded)
z | Input: redshift |
pth | Input: pointer to thermo structure, to know which scheme is used |
preio | Input: pointer to reionization structure, containing the parameters of the function ![]() |
xe | Output: ![]() |
Summary:
int thermodynamics_get_xe_before_reionization | ( | struct precision * | ppr, |
struct thermo * | pth, | ||
struct recombination * | preco, | ||
double | z, | ||
double * | xe | ||
) |
This subroutine reads in the recombination table at the time at which reionization starts. Hence it provides correct initial conditions for the reionization function.
ppr | Input: pointer to precision structure |
pth | Input: pointer to thermo structure |
preco | Input: pointer to recombination structure |
z | Input: redshift z_reio_start |
xe | Output: ![]() |
int thermodynamics_reionization | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct thermo * | pth, | ||
struct recombination * | preco, | ||
struct reionization * | preio, | ||
double * | pvecback | ||
) |
This routine computes the reionization history. In the reio_camb scheme, this is straightforward if the input parameter is the reionization redshift. If the input is the optical depth, need to find z_reio by dichotomy (trying several z_reio until the correct tau_reio is approached).
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
pth | Input: pointer to thermo structure |
preco | Input: pointer to filled recombination structure |
preio | Input/Output: pointer to reionization structure (to be filled) |
pvecback | Input: vector of background quantities (used as workspace: must be already allocated, with format short_info or larger, but does not need to be filled) |
Summary:
int thermodynamics_reionization_sample | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct thermo * | pth, | ||
struct recombination * | preco, | ||
struct reionization * | preio, | ||
double * | pvecback | ||
) |
For fixed input reionization parameters, this routine computes the reionization history and fills the reionization table.
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
pth | Input: pointer to thermo structure |
preco | Input: pointer to filled recombination structure |
preio | Input/Output: pointer to reionization structure (to be filled) |
pvecback | Input: vector of background quantities (used as workspace: must be already allocated, with format short_info or larger, but does not need to be filled) |
Summary:
int thermodynamics_recombination | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct thermo * | pth, | ||
struct recombination * | preco, | ||
double * | pvecback | ||
) |
Integrate thermodynamics with your favorite recombination code.
int thermodynamics_recombination_with_hyrec | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct thermo * | pth, | ||
struct recombination * | preco, | ||
double * | pvecback | ||
) |
Integrate thermodynamics with HyRec.
Integrate thermodynamics with HyRec, allocate and fill the part of the thermodynamics interpolation table (the rest is filled in thermodynamics_init()). Called once by thermodynamics_recombination(), from thermodynamics_init().
HYREC: Hydrogen and Helium Recombination Code Written by Yacine Ali-Haimoud and Chris Hirata (Caltech)
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
pth | Input: pointer to thermodynamics structure |
preco | Output: pointer to recombination structure |
pvecback | Input: pointer to an allocated (but empty) vector of background variables |
Summary:
int thermodynamics_recombination_with_recfast | ( | struct precision * | ppr, |
struct background * | pba, | ||
struct thermo * | pth, | ||
struct recombination * | preco, | ||
double * | pvecback | ||
) |
Integrate thermodynamics with RECFAST.
Integrate thermodynamics with RECFAST, allocate and fill the part of the thermodynamics interpolation table (the rest is filled in thermodynamics_init()). Called once by thermodynamics_recombination, from thermodynamics_init().
RECFAST is an integrator for Cosmic Recombination of Hydrogen and Helium, developed by Douglas Scott (dscot) based on calculations in the paper Seager, Sasselov & Scott (ApJ, 523, L1, 1999). and "fudge" updates in Wong, Moss & Scott (2008). t@as tro.u bc.c a
Permission to use, copy, modify and distribute without fee or royalty at any tier, this software and its documentation, for any purpose and without fee or royalty is hereby granted, provided that you agree to comply with the following copyright notice and statements, including the disclaimer, and that the same appear on ALL copies of the software and documentation, including modifications that you make for internal use or for distribution:
Copyright 1999-2010 by University of British Columbia. All rights reserved.
THIS SOFTWARE IS PROVIDED "AS IS", AND U.B.C. MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, U.B.C. MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
Version 1.5: includes extra fitting function from Rubino-Martin et al. arXiv:0910.4383v1 [astro-ph.CO]
ppr | Input: pointer to precision structure |
pba | Input: pointer to background structure |
pth | Input: pointer to thermodynamics structure |
preco | Output: pointer to recombination structure |
pvecback | Input: pointer to an allocated (but empty) vector of background variables |
Summary:
int thermodynamics_derivs_with_recfast | ( | double | z, |
double * | y, | ||
double * | dy, | ||
void * | parameters_and_workspace, | ||
ErrorMsg | error_message | ||
) |
Subroutine evaluating the derivative with respect to redshift of thermodynamical quantities (from RECFAST version 1.4).
Computes derivatives of the three variables to integrate: .
This is one of the few functions in the code which are passed to the generic_integrator() routine. Since generic_integrator() should work with functions passed from various modules, the format of the arguments is a bit special:
z | Input: redshift |
y | Input: vector of variable to integrate |
dy | Output: its derivative (already allocated) |
parameters_and_workspace | Input: pointer to fixed parameters (e.g. indices) and workspace (already allocated) |
error_message | Output: error message |
int thermodynamics_merge_reco_and_reio | ( | struct precision * | ppr, |
struct thermo * | pth, | ||
struct recombination * | preco, | ||
struct reionization * | preio | ||
) |
This routine merges the two tables 'recombination_table' and 'reionization_table' inside the table 'thermodynamics_table', and frees the temporary structures 'recombination' and 'reionization'.
ppr | Input: pointer to precision structure |
pth | Input/Output: pointer to thermo structure |
preco | Input: pointer to filled recombination structure |
preio | Input: pointer to reionization structure |
Summary:
int thermodynamics_output_titles | ( | struct background * | pba, |
struct thermo * | pth, | ||
char | titles[_MAXTITLESTRINGLENGTH_] | ||
) |
Subroutine for formatting thermodynamics output