CosmoRec
CosmoRec
This page contains the cosmological recombination code CosmoRec, which was developed to
solve the recombination problem including the following main processes:
•recombinations to highly exited states (Chluba et al. 2007; Grin et al. 2010; Chluba, Vasil & Dursi 2010)
•corrections to the 2s-1s two-photon channel (Chluba & Sunyaev 2006; Kholupenko et al. 2006)
•HI Lyn-feedback (Chluba & Sunyaev 2007; Switzer & Hirata 2008; Hirata 2008)
•n>2 two-photon profile corrections (Chluba & Sunyaev 2008; Hirata 2008; Chluba & Thomas 2010)
•n≥2 Raman-processes (Hirata 2008; Chluba & Thomas 2010)
•time-dependent aspects for Ly-α (Chluba & Sunyaev 2009)
•the thermodynamic correction factor for Ly-α (Chluba & Sunyaev 2010)
•Ly-α diffusion (Grachev & Dubrovich 2008; Forbes & Hirata 2009; Chluba & Sunyaev 2009)
•electron scattering (Chluba & Sunyaev 2009; Ali-Haimoud et al. 2010)
•the effect of HeI intercombination transitions (Dubrovich & Grachev 2005; Wong et al. 2008)
•absorption of helium photons by hydrogen (Switzer & Hirata 2008; Kholupenko et al. 2008; Rubino-Martin et al. 2008)
•feedback of helium photons and quadrupole lines (Switzer & Hirata 2008; Chluba & Sunyaev 2010; Chluba, Fung & Switzer, 2012)
The effect of collisions is not included, but has shown to be small (Chluba, Vasil & Dursi, 2010).
For a more detailed overview see Sunyaev & Chluba 2009
and Rubino-Martin et al. 2010.
In batch mode the current version of CosmoRec (CosmoRec v2.0.3 beta) runs within ~1 seconds for default settings. This performance was
achieved using the effective multi-level approach, proposed by Ali-Haimoud & Hirata 2010. Effective rates for both hydrogen and helium
were implemented. With the startup file it is currently possible to include the effective rates for up to 500 shells for hydrogen, and 30 shells for helium.
The precision of the output should be ≤ 0.1% for hydrogen recombination and similar to 0.1%-0.2% during helium recombination.
Several different setting for the considered physical processes were implemented. Two-photon and Raman processes for nmax= 8 can be included. The HI diffusion correction can be switched on/off. For helium, feedback can be switched on/off, as well as the effect of HI continuum absorption. Furthermore, the effective number of hydrogen levels can be varied (in the 'lite' version of CosmoRec only the rates for 500 shells are included). For details about installation and how to run the code we refer the user to the ‘README’ file of the distribution.
Fig. 1: Corrections to the ionization history. The curves were computed using CosmoRec with different cosmological models. The effective rates for a 500-shell hydrogen model were used. Changes of this type cannot be modelled easily using fudges.
•Chluba & Thomas, 2011, MNRAS, 412, 748-764
(arXiv:1010.3631)
•Chluba, Vasil & Dursi, 2010, MNRAS, 407, 599–612
(arXiv:1003.4928)
A patch for CAMB can be downloaded here.
For use with CAMB and CosmoMC we recommend CosmoRec v2.0.3 beta (see below for details on the update).
The tar-ball is about 20MB large (mainly because of the precomputed recombination database which provides large flexibility).
We also put a 'lite' version (3.0MB), for which the database is cut down to the default case only. For maximum flexibility we recommend the full version.
When using CosmoRec please consider referring to:
For comments, questions, or bug reports please email: Jens@Chluba.de.
Lastest Updates
•
added simple OPENMP support for ODE and PDE solver.
•
added precomputed Pesc-data to distribution (avoids initial setup)
•
memory checked with valgrind.
Hydrogen specific:
•
added possibility to change A2s1s two-photon decay rate
•
Hydrogen nD-1s line corrections can be activated (default off; changes needed in
'./PDE_Problem/Solve_PDEs.cpp' and './Modules/Diffusion_correction.cpp').
•
HI diffusion correction can be added in two parametrizations ('./Modules/Diffusion_correction.cpp').
•
hydrogen quadrupole lines can be activated (default off; changes need in './Modules/HI_routines.cpp')
Helium specific:
•
radiative transfer problem for helium photons can now be explicitly solved. This module can be
called instead of the simple approximate treatment of HI absorption on the escape probabilities
of the main helium resonances. Furthermore, it allows computing the precise feedback between
partially overlapping lines. The corresponding module is located in './PDE_Problem_HeI'. The
feature can be switched on/off using the helium diffusion flag (see './runfiles/parameters.dat'
for more explanation). The solver takes the processes discussed in Fung, Chluba and Switzer,
MNRAS, 2011 into account. In particular, electron scattering can be included using the full
Compton kernel. The corresponding parameters have to be set in
'./PDE_Problem_HeI/Solve_PDEs_HeI.cpp', however, note that the runtime of CosmoRec increases
significantly when this module is activated.
•
new helium runmodes that can be changed when calling from CosmoMC.
•
helium feedback in the analytic model of Chluba & Sunyaev, MNRAS, 402, 1221–1248 (2010) can
now be included for up to 10 shells.
•
added (optional) 'Grace' support, which can be used for runtime visualization of the PDE solution for hydrogen.
This option can be activated in the 'Makefile.in' and outputs can be controlled from
'./PDE_Problem/Solve_PDEs.cpp' and './PDE_Problem/Solve_PDEs_Grace.cpp'.
•
thinned the effective rate tables (only for HI n=3 can one vary the number of shells that are
included for the effective rate calculation).
•
tidied HI two-photon and Raman profile computations up (./Development/Line_profiles).
Small bug-fix for 3d1s profile, but the difference was below Planck sensitivity.
•
2s-1s two-photon decay previously were computed using the simple fitting formula for the
two-photon profile given by Nussbaumer & Schmutz, 1984. This has been replaced with the latest
computation of the 2s-1s two-photon profile. The normalization of the new profile can be set
in './Development/Definitions/physical_constants.h', and is currently set to 8.2206 1/sec
(Labzowsky et al. 2005). Difference was again below Planck sensitivity.
•
optimized the control over the distribution of grid points in the radiative transfer problem.
The distributions of grid points is now determined using density parameters in the Doppler core
and Lorentzian wings (see './PDE_Problem/Solve_PDEs_grid.cpp' for setup of the grid and
'./PDE_Problem/Solve_PDEs.cpp' for control parameters). The computation of two-photon and Raman
events for up to 8 shells was sped up in this way without loss of precision.
•
tidied up and improved ODE and PDE solvers (./Development/ODE_PDE_Solver).
•
Iterations over radiative transfer solver set to 1 (for batchmode) and 2 when calling
CosmoRec directly. For higher precision, this can be changed in './CosmoRec.cpp' and
'./Modules/global_variables.cpp' (parameter Diff_iteration_max), respectively.
•
PDE-setup and integration over resonances was tidied up and improved.
•
updated helium atom & setup routines
•
added possibility to set Hubble function from CAMB using function pointer
•
fixed small problem with gsl-1.15 compatibility of spline routine
•
added HeI rates for nHe=2 to lite-version (CAMB compatibility of lite-version)
•
additional cosmetic changes to some of the routines
•
added possibility to load Hubble factor from CAMB
•
additional cosmetic changes to some of the routines
•
added interface for 'Camb' support
•
added new runmode for Recfast++ with corrections function
•
small changes to ODE and PDE-solver
•
cosmetic changes to some of the routines
•
tables for the HI rates were extended to allow 'full' computations down to redshift z=50.
•
implemented switch for different accuracies of the recombination model used by CosmoRec in the batch mode.
•
Extended HeI effective rate tables. Now ground state transition from levels with n≤10 can be included.
•
Added HeI nD-1S Singlet (n≤10) quadrupole lines (can be switch on/off in './Modules/He_routines.cpp'). They lead to a small additional acceleration of helium recombination at z~2200 (Chluba & Sunyaev, 2010).
•
HeI-feedback model now also includes nD-1S Singlet quadrupole lines. This increases the feedback correction.
•
fixed a small bug in ΔPesc interpolation routine connected with HeI-intercombination line. This had no important effect on the ionization history.
•
Confirmed CosmoRec helium model for concordance model using multi-level recombination code. Agreement was better than 0.001% when doing physically identical cases.
•
compiled CosmoRec with Intel C++ compiler (icpc)
•
CosmoRec also was extensively tested together with CosmoMC. Everything is running smoothly!
•
parameter estimations were performed including dark matter annihilation.
•
improved the stability of the PDE-solver. The radiative transfer corrections are now only included at 500 < z < 2000.
•
ran tests for default case over a wide range of cosmologies.
For flat Universes CosmoRec now returns the electron
fraction without encountering problems for:
0.01 ≤ Ωbh2 ≤ 0.04;
0.05 ≤ Ωcdmh2 ≤ 0.22;
0.6 ≤ h100 ≤ 0.8;
2.6K ≤ T0 ≤ 2.8K;
0.1 ≤ Yp ≤ 0.6;
1.0 ≤ Nν ≤ 6.0. Ωk=0 in all cases.
•
implemented additional error handling for ODE-solver.
•
switched to 4. order in ODE-solver. This increases the stability without affecting the performance.
•
for default settings CosmoRec now runs in 1.3 sec average per cosmology.
•
fixed additional memory leak using 'valgrind'
•
further improved module accounting for HI continuum absorption of HeI photons. In particular the code should now run
for a wide range of input parameters, without calling ΔPesc integrals explicitly.
•
changed the interface for batch mode. The curvature has to be specified now instead of ΩΛ. ΩΛ is computed
internally using Ωtot= 1-Ωk-Ωm-ΩΛ-Ωrel
(Ωtot: total; Ωk: curvature; Ωm: cold dark matter + baryons; ΩΛ: Lambda;
Ωrel: photons & neutrinos)
•
Added a simple module (./Modules/DM_annihilation.cpp) to account for the effect of dark matter annihilation according to
Chluba, 2010, MNRAS, 402, 1195-1207. The DM annihilation efficiency can be set in the parameter file.
•
the HeI feedback module was improved.
•
several small bugs and memory leaks were fixed.
•
CosmRec now has an interface to be called in batch mode for different cosmologies.
•
the module accounting for HI continuum absorption of HeI photons was strongly improved.
•
effective rates for 30 shells of helium were added
•
the interpolation scheme for the effective rates was improved.
•
a CosmoRec 'lite' version with decreased recombination-database is now available.
•
formatting of the code has been improved.