baudren / montepython_public

Public repository for the Monte Python Code
MIT License
65 stars 115 forks source link

the value of "c" (the speed of light) in CLASS #79

Closed mahtaparsa closed 7 years ago

mahtaparsa commented 7 years ago

Hi everybody, I have confused with the correct value of the speed of light in perturbative formula used in the CLASS code. Let us not consider "rho_CLASS = 8PiG / (3c^2) rho_physical" and use the exact rho_physical in all background and perturbation equations. Usually the factor "8PiG / (3c^2)" will remove automatically from the equations, however in some modifications for new physics the factor would remain in the equations (which I have faced to it in my model). So the problem is that what is the value of "c" in this case? And according to the fact that in the metric, I (and also in CLASS) get the c (which is coefficient of the dt^2) equal to one, should we consider the "c" in the factor "8PiG / (3c^2)" or put it to one here too? because I think considering the value of "c" would result in a different metric and also different equations that contain "c" too. Considering these facts, what is the correct value of the "c" in CLASS code (because there are some equations in the code which contain "c" with the value 2.99792458e8 according to the background.h file), while I need it in perturbative equations in the factor "8PiG / (3c^2)" for considering rho_physical. I really need your suggestions. Thanks in advance.

ThomasTram commented 7 years ago

In CLASS, the unit system is such that hbar=k_B=c=1. This leaves one dimensionfull unit which is taken to be Mpc.

mahtaparsa commented 7 years ago

So in CLASS the "natural units" are used generally ( [energy]=1/[length] ), and G is in units of "Mpc^2", rho_physical is in units of "Mpc^-4", and consequently rho_class is in units of "Mpc^-2" (while so far I thought the CLASS code is not in natural units unless for the inflation module.)

mahtaparsa commented 7 years ago

What is the value of the factor "8PiG / 3" now? Can we consider the reduced Planck units and put this factor equal to one (and so do not write it in equations)? Or should we write it exactly, with considering the unit conversion to Mpc, and let the code use the value of "G" and the unit conversion value "_Mpc_overm" from the background.h file in order to find the correct value of this factor?

ThomasTram commented 7 years ago

Hi

Naming the unit convention as 'natural' is dangerous. The convention is what I wrote before, every internal quantity is expressed in Mpc. A factor like (8 Pi G / 3) is then given in the usual way by inserting missing factors of k_B, c and hbar. Specifically, (8 Pi G / 3) = (8 Pi G / 3) (hbar/c^3) = 2.298e-114 Mpc^2. The 'CLASS way' to deal with unit conversions is to enter all natural constants in SI units () [available in background.h] and then use Mpc/m [available in background.h] in the correct power to convert back.

As a final remark, the definition of "rho_CLASS = 8PiG / (3c^2) rho_physical" should never be interpreted as some redefinition of units since rho_CLASS does not have the correct dimension to be an energy density.

Cheers, Thomas Tram

mahtaparsa commented 7 years ago

Thanks for your reply.