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 291 forks source link

growth factor for wCDM #136

Open amoradinejad opened 7 years ago

amoradinejad commented 7 years ago

Hi,

When using CLASS to calculate the matter power spectrum for a dark energy model with EoS: w(z) = w0 + wa(1-a), I noticed in class documentation that the growth factor is calculated using the equation D = H int [da/(aH)3] which is only valid when w = -1. (see http://home.fnal.gov/~dodelson/pritchard.pdf, for instance the notes by J. Pritchard discussing this issue for the case of constant EoS for DE). I was wondering why this equation is being used.

ThomasTram commented 7 years ago

Hi

This is a very good question. First, it is important to state that the growth factor D(a) is never used by CLASS internally but it was simply added as an output from the background module due to popular demand. The problem of D(a) is even deeper than what you say, since even for w=-1, D = H int [da/(aH)3] is not a solution to the perturbation equations. The reason is that this integral is only true in strict LCDM, i.e. without including radiation in the Hubble function. But in CLASS, radiation is of course included. Even at z=49 the error is at the 4% level.

It is very likely that the definition of D(a) in CLASS will be changed in the next code release in order to be the exact growing mode of the 2nd order ODE.

Cheers, Thomas

amoradinejad commented 7 years ago

Hi Thomas,

Thank you for prompt response.

Can you refer me to the equation that Class is solving when including the dark energy with varying equation of state.

I came across this issue, as when I calculate the growth factor and use it to calculate the linear matter power spectrum at redshift z by multiplying Class matter power spectrum at z=0, I don’t get the same power spectrum calculated by class at that redshift. Checking the documentation, I thought the growth factor calculated in module background is what class uses and so that is the source of the discrepancy.

As a reference of what I am calculating, assuming that DE doesn’t cluster on scales smaller than the horizon, I am solving Eqs. 10 and 11 in Pritchard's note. In Eq. 12 for E(a), I replace the last term for DE with constant equation of state with that of w(z) and since I need matter power spectrum in matter-dominated era, I neglect the radiation. So I have H(z) given by Eq. 2 of arXiv:astro-ph/0305286 adding an extra term for curvature.

Thanks, Azadeh

miguelzuma commented 7 years ago

It would be very desirable to do that, or even add a comment in the output background file. I've come across several people using the background growth factor for models where it was not a correct approximation.

ThomasTram commented 7 years ago

Hi Azadeh

As I understand you are using the correct energy density in the Hubble factor H(a) and in E(a). If you compare to CLASS with a (w_0, w_a)-parametrised fluid, the integral in Eq. 2 of astro-ph/0305286 can be performed analytically by the way. But if you neglect radiation, you will not get the correct matter power spectrum at redshift larger than perhaps z=10 or so, depending on the precision you are interested in.

If you want to reproduce the matter power spectrum of CLASS at any redshift, you need to solve the full coupled system of perturbation equations described in http://arxiv.org/pdf/astro-ph/9506072.pdf which is exactly what CLASS is doing. Otherwise your power spectrum will be affected by any of the following approximations:

However, I think that correcting radiation in the background is likely to give you a reasonably accurate growth factor.

Cheers, Thomas

amoradinejad commented 7 years ago

Hi Thomas,

Thank you very much for the clarification. I included the radiation in the background and as you mentioned it improves the agreement to the sub-percent level, but at z>10, the agreement is between 1-10 %. Since I am interested in lower redshifts, it solved my problem. Thanks again.

cheers, --Azadeh