xzackli / Bolt.jl

differentiable boltzmann code
MIT License
42 stars 5 forks source link

speed of sound term #41

Open xzackli opened 3 years ago

xzackli commented 3 years ago

From @jmsull,

When I look at the MB expression (eqn 67) for the baryon velocity, there is a speed of sound term that is proportional to delta_b that is missing in Callin/Dodelson (and Bolt). Shouldn't we have that?

I should get to the bottom of this...

jmsull commented 3 years ago

Tangentially related - this paper argues that CLASS and CAMB are both wrong in the baryon EoMs (and that MB is not consistent with itself between eqn 30 and 67). I have not looked through the details but the changes presented in the conclusion would seem to take next to no effort to implement (but haven't thought about cost).

jmsull commented 3 years ago

And coming back to the original question, the sound speed term is just dropped in Dodelson because he reuses the cdm eqns (in which the first moment of boltzmann has (p/E)^2 terms dropped) but with the additional photon coupling term. So the assumption of doing this is that baryons are cold and have no sound speed just like cdm. The reason given for keeping it in MB is that even though cs_b << 1, at high enough k the cs^{2} k^{2} \delta{b} term is still important (baryons are not totally cold).

xzackli commented 3 years ago

We should insert the cs^2 k^2 \delta{b} term into the current hierarchy!. This is a really nice catch! I'll add a c_s function in ionization.jl. We can get the matter and radiation temperature out of both RECFAST and Peebles, which I hope to finish by the end of this week (it's slightly involved as RECFAST internally calculates a background, and I need to adapt that to our bg).

The Pookkillath paper is a lot of fun, and we should definitely make those photon/baryon Boltzmann equations an option. It looks to be very subdominant, so I think we can safely put that off for some time.

xzackli commented 3 years ago

Should close this when we finish adding it in.

jmsull commented 3 years ago

I added a spline for this to IonizationHistory in #44, cs2b(x) seems to match roughly with CLASS at intermediate times (1st attached), but something is happening at high redshift, and we also do not have reionization (2nd attached is an internal comparison of CLASS with default reionization and with it switched off, vertical line is at redshift 8). I will open a new issue for reionization. csb2_comparison reio_no_reio-CLASS

jmsull commented 3 years ago

Both of these issues are qualitatively fixed in 43954ae - the high and low redshift disagreement in csb^2 was due to the previous expression (which I got out of MB) neglecting time evolution of mean mu, which is relevant early on and during reionization. Separately, this now agrees with CLASS with reionization turned on after including change in baryon temp due to reionization (#51).

There is still some offset and numerical wiggling going on around the transition to reionization at the level of 2% - warrants further checking but I think this is ok for now(?).

csb2_agreement_class_time_evoln_mu

Quick plot attached, bottom is csb2_Bolt/csb2_CLASS. nr is the no-reionization model.