## CAMB: cmbmain.f90: fixq and density perturbation evolution

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Dahee Lee
Posts: 8
Joined: April 16 2018
Affiliation: Kyungpook National University

### CAMB: cmbmain.f90: fixq and density perturbation evolution

Hello.
I'm beginner of CAMB.

I would like to plot density perturbation evolution using cmbmain.f90.
In cmbmain.f90, I use fixq = 0 for computing power spectrum(scalCls.dat).

q is used instead of k in parts of the code (for non-flat models). You can write out whatever you like.

At this sentence, I understood that fixq is k for non-flat model.
So, how can I use it for flat model?
I'm so confused.

For plotting density perturbation evolution, I changed value of fixq(like 1, 0.1, 0.01)
but I think that is non-flat because of changing fixq.

I want to calculate density perturbation evolution and scalCls.dat at the same time.
How can I do for this?

Any help would be appreciated.

Code: Select allp>

real&#40;dl&#41; &#58;&#58; fixq = 0._dl !Debug output of one q

Code: Select allp>

!!Example code for plotting out variable evolution
if &#40;fixq/=0._dl&#41; then
tol1=tol/exp&#40;AccuracyBoost−1&#41;
call CreateTxtFile&#40;'evolve.txt',1&#41;
do j=1,1000
tauend = taustart+&#40;j−1&#41;*&#40;CP%tau0-taustart&#41;/1000
call GaugeInterface_EvolveScal&#40;EV,tau,y,tauend,tol1,ind,c,w&#41;
yprime = 0
call derivs&#40;EV,EV%ScalEqsToPropagate,tau,y,yprime&#41;
ddelta= &#40;yprime&#40;3&#41;*grhoc+yprime&#40;4&#41;*grhob&#41;/&#40;grhob+grhoc&#41;
delta=&#40;grhoc*y&#40;3&#41;+grhob*y&#40;4&#41;&#41;/&#40;grhob+grhoc&#41;
write &#40;1,'&#40;7E15.5&#41;'&#41; tau, delta, growth, y&#40;3&#41;, y&#40;4&#41;, y&#40;EV%g_ix&#41;, y&#40;1&#41;
end do
close&#40;1&#41;
stop
end if

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

### Re: CAMB: cmbmain.f90: fixq and density perturbation evoluti

I suggest you use the python wrapper, examples in

Dahee Lee
Posts: 8
Joined: April 16 2018
Affiliation: Kyungpook National University

### CAMB: cmbmain.f90: fixq and density perturbation evolution

But I still don't know about fixq for flat model.
Is it right that changing fixq(like 1, 0.1, 0.01) is non-flat?

Any help would be appreciated.

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

### Re: CAMB: cmbmain.f90: fixq and density perturbation evoluti

q=k in a flat model.

Dahee Lee
Posts: 8
Joined: April 16 2018
Affiliation: Kyungpook National University

### CAMB: cmbmain.f90: fixq and density perturbation evolution

Thank you. I got it.
That question was my misunderstanding.