CAMB, unable to perform complicated calculations
-
- Posts: 7
- Joined: August 19 2018
- Affiliation: IAUCTB
CAMB, unable to perform complicated calculations
I have written equations of a holographic dark energy model with interaction in CAMB. (w_de rho_de which are ODE and must be solved numerically).
I have tested the CAMB with simple code and it printed list of numbers so fast and plotted it using Gnuplot.
But, as I replace the equations with my model, CAMB takes more than 10 hours to print just half of that list while saying rombint failed to converge...
I do not know how should I do, the equation I wrote for my model is ODE which works properly. I use RungeKutta 45 for solving that (w_de)
this is my w_de
w_de =-1-(1/(3 * rkomgd(a))) * (3 * wa_ppf * (rkomgd(a) + rkomgd(a)**2/((3 * rkomgd(a)/w_lam**2) - 2)) + 3 + rkomgd(a) * (2 - 3/(w_lam**2))) * (-3 * (-2 + rkomgd(a) * ((3/w_lam**2) - 1)) + 3 * wa_ppf * (rkomgd(a) + rkomgd(a)**2/((3 * rkomgd(a)/w_lam**2) - 2)))/(rkomgd(a) * ((3/w_lam**2) - 1) - w_lam**2 - 1)
in which rkomgd(a) is solving another fuction using runge kutta
also my qrho_de is rkomgd(a)
I have tested the CAMB with simple code and it printed list of numbers so fast and plotted it using Gnuplot.
But, as I replace the equations with my model, CAMB takes more than 10 hours to print just half of that list while saying rombint failed to converge...
I do not know how should I do, the equation I wrote for my model is ODE which works properly. I use RungeKutta 45 for solving that (w_de)
this is my w_de
w_de =-1-(1/(3 * rkomgd(a))) * (3 * wa_ppf * (rkomgd(a) + rkomgd(a)**2/((3 * rkomgd(a)/w_lam**2) - 2)) + 3 + rkomgd(a) * (2 - 3/(w_lam**2))) * (-3 * (-2 + rkomgd(a) * ((3/w_lam**2) - 1)) + 3 * wa_ppf * (rkomgd(a) + rkomgd(a)**2/((3 * rkomgd(a)/w_lam**2) - 2)))/(rkomgd(a) * ((3/w_lam**2) - 1) - w_lam**2 - 1)
in which rkomgd(a) is solving another fuction using runge kutta
also my qrho_de is rkomgd(a)
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB, unable to perform complicated calculations
For the background evolution you should precompute and interpolate the functions, like what use_tabulated_w option does for equations_ppf or the improved devel branch.
-
- Posts: 7
- Joined: August 19 2018
- Affiliation: IAUCTB
Re: CAMB, unable to perform complicated calculations
Thank you. my rho_de is ODE. If I use w_de from table, solving rho_de gets error again?Antony Lewis wrote: ↑August 24 2018For the background evolution you should precompute and interpolate the functions, like what use_tabulated_w option does for equations_ppf or the improved devel branch.
-
- Posts: 7
- Joined: August 19 2018
- Affiliation: IAUCTB
Re: CAMB, unable to perform complicated calculations
Nope, it works properly using table and rungekutta simultaneously.ehsan sadri wrote: ↑August 24 2018Thank you. my rho_de is ODE. If I use w_de from table, solving rho_de gets error again?Antony Lewis wrote: ↑August 24 2018For the background evolution you should precompute and interpolate the functions, like what use_tabulated_w option does for equations_ppf or the improved devel branch.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: CAMB, unable to perform complicated calculations
Hi,
I am also trying to solve for holographic model. I solved the background evolution equations seperately and then interpolated those using spline and cubicsplint. In a seperate code every thing works fine. When put into equation_ppf.f90 the background evolution part itself is working well. But
Can you please help?
Thanks
Srijita
I am also trying to solve for holographic model. I solved the background evolution equations seperately and then interpolated those using spline and cubicsplint. In a seperate code every thing works fine. When put into equation_ppf.f90 the background evolution part itself is working well. But
warning message is there. After 10mins the code stops with messagerombint2 failed to converge
Code: Select all
Reionization_zreFromOptDepth: Did not converge to optical depth
tau = -3.053052958849836E-005 optical_depth = 9.000000000000000E-002
50.0000000000000 49.9984741210938
(If running a chain, have you put a constraint on tau?)
Error result Reionization did not converge to optical depth
Thanks
Srijita
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB, unable to perform complicated calculations
Looks like an optical depth issue. However equations_ppf.f90 does not exist in version 1.x so you must be using an old version.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: CAMB, unable to perform complicated calculations
I am using CAMB-0-1-7. Which one should I use?
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: CAMB, unable to perform complicated calculations
The latest version is on pip or github.
-
- Posts: 32
- Joined: April 12 2019
- Affiliation: Indian Institute of Science Education and Research Kolkata
Re: CAMB, unable to perform complicated calculations
Thank you. I will try that.
But for equations_ppf, the problem is with the definition of dtauda, I changed it and that is not working properly.
In that context I want to ask-- how shall I define grho_de and H, in terms of scale factor a or ln(a) or conformal time? I did something wrong there. I solved the coupled differential equations and used spline and cubicsplint to get the interpolated values.
But for equations_ppf, the problem is with the definition of dtauda, I changed it and that is not working properly.
In that context I want to ask-- how shall I define grho_de and H, in terms of scale factor a or ln(a) or conformal time? I did something wrong there. I solved the coupled differential equations and used spline and cubicsplint to get the interpolated values.