Hello everyone,
I'm working on a project where I need to modify CAMB to account for a model in which the Omegas are factored differently (adding more parameters), but only in the context of background dynamics. That is, I want to modify the form of the Hubble parameter without affecting the actual fluid densities.
After some initial research, it seems that the `equation.f90` file might be relevant to this modification. However, I'm unsure about where I need to change this file and whether there are other parts of the code that should also be adjusted.
I would greatly appreciate any guidance or suggestions.
Thank you very much for your help!
CAMB: Modifications for Altered Background Dynamics
-
- Posts: 13
- Joined: June 02 2024
- Affiliation: Weizmann Institute of Science
-
- Posts: 1983
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: Modifications for Altered Background Dynamics
The help assistant can answer this one (help_assist.php)
Modify dtauda Subroutine: The subroutine dtauda(a) in equations.f90 returns dt/da and is used wherever the background evolution is needed. You can modify this subroutine to implement your new model for the Hubble parameter【4:0†source】.
-
- Posts: 13
- Joined: June 02 2024
- Affiliation: Weizmann Institute of Science
Re: CAMB: Modifications for Altered Background Dynamics
Thank you very much! :)
-
- Posts: 13
- Joined: June 02 2024
- Affiliation: Weizmann Institute of Science
Re: CAMB: Modifications for Altered Background Dynamics
Hi Antony,
I hope you're doing well.
I've been exploring the `dtauda(a)` subroutine in `equations.f90`, and I’m having some trouble understanding how to proceed with my modifications. Specifically, I’m looking to define effective densities for radiation and matter, relevant only to background dynamics.
From what I can gather, it seems like I might need to adjust `grhoa2` by modifying `this%grho_no_de(a)`. However, I’m unclear on the exact meaning of `this%grho_no_de(a)`, and I couldn’t find where `grho_no_de(a)` is defined.
If you could provide any guidance or point me in the right direction, I would be very grateful. To make it easier, I’ve included the part of `equations.f90` where the `dtauda(a)` subroutine is defined:
Thank you so much for your time and assistance.
Best regards,
Dror
P.S. The comment before `dtauda(a)` in `equations.f90` says:
Is `dtauda(a)` calculates dt/da or d[math]/da?
I hope you're doing well.
I've been exploring the `dtauda(a)` subroutine in `equations.f90`, and I’m having some trouble understanding how to proceed with my modifications. Specifically, I’m looking to define effective densities for radiation and matter, relevant only to background dynamics.
From what I can gather, it seems like I might need to adjust `grhoa2` by modifying `this%grho_no_de(a)`. However, I’m unclear on the exact meaning of `this%grho_no_de(a)`, and I couldn’t find where `grho_no_de(a)` is defined.
If you could provide any guidance or point me in the right direction, I would be very grateful. To make it easier, I’ve included the part of `equations.f90` where the `dtauda(a)` subroutine is defined:
Code: Select all
function dtauda(this,a)
use results
use DarkEnergyInterface
implicit none
class(CAMBdata) :: this
real(dl), intent(in) :: a
real(dl) :: dtauda, grhoa2, grhov_t
call this%CP%DarkEnergy%BackgroundDensityAndPressure(this%grhov, a, grhov_t)
! 8*pi*G*rho*a**4.
grhoa2 = this%grho_no_de(a) + grhov_t * a**2
if (grhoa2 <= 0) then
call GlobalError('Universe stops expanding before today (recollapse not supported)', error_unsupported_params)
dtauda = 0
else
dtauda = sqrt(3 / grhoa2)
end if
end function dtauda
Best regards,
Dror
P.S. The comment before `dtauda(a)` in `equations.f90` says:
Code: Select all
! Background evolution, return d tau/ d a, where tau is the conformal time
-
- Posts: 1983
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB: Modifications for Altered Background Dynamics
it is $d\tau/d a$. The grho_no_de function definition is commented in the source to describe what it is.
-
- Posts: 13
- Joined: June 02 2024
- Affiliation: Weizmann Institute of Science
Re: CAMB: Modifications for Altered Background Dynamics
Thank you so much for your helpful response!
To clarify my original question, I was specifically looking for where `grho_no_de` is defined in the CAMB source code. I’ve since located it in `results.f90` and made the adjustments I needed.
That said, does `grho_no_de` influence anything other than `dtauda`? Would modifying `dtauda` be sufficient to alter the background evolution alone (i.e., adjust the Hubble parameter without impacting other physical processes)?
Thanks again. I really appreciate your continued support!
To clarify my original question, I was specifically looking for where `grho_no_de` is defined in the CAMB source code. I’ve since located it in `results.f90` and made the adjustments I needed.
That said, does `grho_no_de` influence anything other than `dtauda`? Would modifying `dtauda` be sufficient to alter the background evolution alone (i.e., adjust the Hubble parameter without impacting other physical processes)?
Thanks again. I really appreciate your continued support!