lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
223 stars 292 forks source link

How to fix the scale factor at matter radiation equality? #439

Closed dimig230 closed 3 years ago

dimig230 commented 3 years ago

Hi,

I am relatively new to Class and am trying to reproduce the phase shift in the TT spectrum as a function of N_eff which necessitates the scale factor at matter-radiation equality (a_eq) be fixed. As far as I can tell from reading explanatory.ini, there is no input parameter associated with a_eq that can be set fixed. The parameters Omega_m and Omega_r, which could be used to fix a_eq according to a_eq=Omega_m/Omega_r, I also can't figure out how to set since Class does not read them as input parameters. (I do know how to obtain their values for a given cosmology, but not how to set a specific value).

Can anyone help me understand what I'm missing? Thank you!

ShazAlvi commented 3 years ago

If you set the universe to be flat then the density parameters are bound to sum up to one. You can fix Omega_b, Omega_CDM, and Omega_lambda and I think that will fix the omega_r according to the above identity for the flat universe.

Someone, please correct me if I am wrong in this explanation. While we are on the subject, you might find this interesting. https://pdg.lbl.gov/2019/reviews/rpp2019-rev-neutrinos-in-cosmology.pdf

dimig230 commented 3 years ago

Hi,

I appreciate your comment. I was able to figure it out by using Omega_m = Omega_cdm + Omega_b for massless neutrinos and Omega_r = Omega_g + Omega_nu, so Omega_m/Omega_r = (Omega_cdm + Omega_b)/(Omega_g + Omega_nu). Omega_g is essentially fixed and Omega_b I fix, so it is merely a problem of finding the right Omega_cdm for a given N_eff.

Thank you again!