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)
233 stars 288 forks source link

Problem with Dark Energy fluid behaving as radiation in the early Universe #378

Open DavidFigueruelo opened 3 years ago

DavidFigueruelo commented 3 years ago

Hi all,

I am studying a model where an interacting dark energy behaves first like "radiation" w_DE (a<<1)=1/3 and then It goes to a typical cosmological constant w_DE (a~1)=-1. To do so, I have modified the fluid DE equation of state module background_w_fld with the new equation that has no particular or problematic point as the transition is more or less smooth, and also this model needs to have the sound speed equal to 1/3 so in the .ini file cs2_fld=0.333333. Apart from that, there is no other modification in the background (Despite the interaction, both DE and CDM have the usual continuity equations as the interaction only affects the perturbations). I have also modified the perturbation equations, both for DE and dark matter and, again, it has no problematic point where some numerical problem could arise.

The problem arises when comparing the evolution of the perturbation variables delta and theta of DE and dark matter between CLASS and CAMB as both have totally different behaviors while both codes show the same background evolution. We have also solved the perturbation system numerically and it seems to agree with CAMB.

There are a few points I am not sure if CLASS is properly working with this model because the following modifications were required :

-I have to set tol_initial_Omega_r= 0.9 as this radiation behavior of DE has a non negligible contribution to the early Universe. -I commented the following warning as the DE fluid is non negligible at early time and its equation of state is clearly larger than zero: `

/* check values of w_fld at initial time and today */
class_call(background_w_fld(pba,     0.,   &w_fld_ini,&dw_over_da_fld,&integral_fld), pba->error_message, ppt->error_message);
class_call(background_w_fld(pba,pba->a_today,&w_fld_0,&dw_over_da_fld,&integral_fld), pba->error_message, ppt->error_message);

/*class_test(w_fld_ini >= 0.,
           ppt->error_message,
           "The fluid is meant to be negligible at early time, and unimportant for defining the initial conditions of other species. You are using parameters for which this assumption may break down, since at early times you have w_fld(a--->0) = %e >= 0",w_fld_ini);
*/`

Maybe it has to do with that two modification but, in any case, a hint/suggestion or comment about what could be happening will be helpful!!

ThomasTram commented 3 years ago

Hi

There are a few things to be aware of here.

  1. Did you modify the initial conditions for the perturbations? Since DE is non-vanishing at early times in this model, it must be taken into account. (In this case as an extra contribution to radiation)
  2. Are you using PPF or fluid equations? Both are available in both CLASS and CAMB, but I forgot what the defaults in the codes are.

Cheers, Thomas

DavidFigueruelo commented 3 years ago

Hi,

Thanks for your answer.

1) I have modified the initial conditions for DE setting each one (delta and theta) equal to the photon ones. I also tried keeping the original ones and also setting both DE initial perturbations to zero but nothing seems to help. Is there any other place where I should modify to take into account this non-vanishing DE for the initial conditions?

2) Fluid equations as I use use_ppf = no

Thanks again!

ThomasTram commented 3 years ago

Hi David

  1. Yes, in the beginning of perturb_initial_conditions(), you need to add rho_fld to rho_r.
  2. You also need to check what CAMB does (PPF or fluid).

Other than that I think you just need to make all the cross-checks that you can.

Cheers, Thomas