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

Growth of delta_cdm in radiation domination in synchronous gauge #478

Closed akshay-ghalsasi closed 2 years ago

akshay-ghalsasi commented 2 years ago

Hello,

I am a little confused by the behaviour of delta_cdm that CLASS outputs when the mode is outside the horizon. Below I show a plot for the groth of the mode for $k=100 Mpc^-1$. For small tau when $k\tau$ <<1, delta_cdm should grow as (ktau)^2 (in fact this is how the initial conditions are being set, Ma and Bertschinger Eq. 96 https://arxiv.org/pdf/astro-ph/9506072.pdf)

However the CLASS plot shows a near constant delta_cdm small taus and no quadratic growth. I realize that CLASS plots delta_cdm in the gauge comoving with matter, but since theta_cdm = 0 in synchronous gauge (assuming small shear perturbations), delta_cdm_comoving = delta_cdm_synchronous.

Can someone explain the behavior of delta_cdm at small $\tau$ and why there is no quadratic growth.

Screen Shot 2022-04-07 at 6 57 50 PM

Any help is much appreciated. Thanks, Akshay

ThomasTram commented 2 years ago

Hi Akshay

This is because the perturbation output is converted into Newtonian gauge, due to this line: https://github.com/lesgourg/class_public/blob/aa92943e4ab86b56970953589b4897adf2bd0f99/source/perturbations.c#L8437-L8438 You can change the if statement to something like if (0 == 1) to avoid this gauge transformation. The original intention was that it would be easy to see if there was a problem in either gauge, since one could run the code in both gauges and then compare the output directly. However, this is highly confusing at this point, and I think the gauge transformation should be either completely removed or be made optional....

Cheers, Thomas

akshay-ghalsasi commented 2 years ago

Thanks Thomas for the quick reply! That gave me the expected behavior

I have 2 more questions

1) Is the P(k) reported in gauge comoving with matter? 2) When I choose a k in k_output values, is it in units of Mpc^-1 or h^-1 Mpc^-1?

Thanks, Akshay

ThomasTram commented 2 years ago

Hi again

For 1, yes I remember it as being in this weird "matter co-moving gauge" which is slightly different from the usual comoving gauge. (I don't know why!)

For 2, it is 1/Mpc.

Cheers, Thomas

akshay-ghalsasi commented 2 years ago

Thank you!