CAMB: modifying equations.f90

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Filip Strubbe
Posts: 2
Joined: December 23 2019
Affiliation: Ghent university

CAMB: modifying equations.f90

Post by Filip Strubbe » December 23 2019

Hi,

I am working with CAMB-1.0.12, and I am trying to modify some physics. My first aim is to artificially suppress the growth of only the small scale (large wavenumber k) density perturbations of the cold dark matter species.

I tried to modify the “equation of motion” for the CDM in the “equations.f90” file, which normally reads:
Clxdot=-k*z

I then recompiled using “python setup.py make”, but when I run the simulation, I see no difference in the result, even when replacing the above equation with Clxdot=-k*z*0.

My questions are:
1) I should see some effect of a modified equation of motion, so what am I doing wrong? Am I modifying the wrong equation, or in the wrong file? Is there a problem with recompiling?

2) In “equations.f90” I found the baryon equation of motion: clxbdot=-k*(z+vb). But this equation seems different than what I expected from e.g. Eq. 5-30 in arXiv:astro-ph/9804301v2. Also “dz” seems different than expected from Eq. 5-31. I have looked around but didn’t find exactly the underlying theory behind “equations.f90”. Am I missing something here?

3) Is there a simple intuitive argument why the evolution of perturbations of one species (e.g. Delta_baryon) is independent of the choice of Omega_bh^2 or Omega_cdm^2? From Eq. 6-22 in in arXiv:astro-ph/9804301v2 I would expect that the evolution of each species depends on the SUM of all densities and pressures of all other species.

All feedback is much appreciated,
Filip

Antony Lewis
Posts: 1618
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CAMB: modifying equations.f90

Post by Antony Lewis » December 28 2019

Sounds OK, make sure you re-start Python. The equations neglect some very small pressure terms (matter pressure is only important when coupled via derivatives so the last term in 5-30 is very small).

The evolution equations are not independent of those quantities (except in some limits).

Filip Strubbe
Posts: 2
Joined: December 23 2019
Affiliation: Ghent university

Re: CAMB: modifying equations.f90

Post by Filip Strubbe » January 02 2020

Hi,

I have now managed to change the equations of motion in the file "equations.f90", to compile and run - so far so good...

But I still have trouble locating the following equations found in ScalEqs.txt in the file "equations.f90":

drhob:=-3*H(t)*(rhob(t)+pb(t))
drhoc:=-3*H(t)*rhoc(t);

Can somebody point out exactly in which line of equations.f90 these calculations (namely the effect of expansion on the densities of each species) are carried out?

Thanks a lot,

Filip

Post Reply