- #1

- 12

- 0

## Main Question or Discussion Point

Hello! I'm studying various dark energy models, and as a part of the project, I need to be able to numerically solve the Klein-Gordon (KG) equation and the Friedmann Equation (FE) in the context of a canonical scalar field. I wasn't sure whether or not this belonged here or in the computational section, so forgive me if I chose wrong. Anways, the KG equation is:

$$ \ddot{\phi} + 3H\dot{\phi} + V_{,\phi} = 0 $$

And the FE is:

$$ H^2 = \frac{8\pi G}{3} \left [ \frac{1}{2} \dot{\phi}^2 + V(\phi) + \rho_M \right ] $$

Where ## H ## is the Hubble parameter, ## \phi ## is the scalar field (both functions of time), a dot represents a derivative with respect to time, and ## V_{,\phi} = \frac{dV(\phi)}{d\phi} ##. ## V(\phi) ## is the potential of the scalar field. ## G ## is simply Newton's gravitational constant. ## \rho_M ## is the energy density of the other matter components in the Universe (both relativistic and non-relativistic). There is also an equation that governs the evolution of ## H ##:

$$ \dot{H} = -\frac{8\pi G}{2} \left ( \dot{\phi}^2 + \rho_M + P_M \right ) $$

Where ## P_M ## is the general relativistic pressure corresponding to ## \rho_M ##. Additionally, for the energy density I used:

$$ \rho_M = \rho_m + \rho_r = \rho_{m,0}a^{-3} + \rho_{r,0}a^{-4} $$

Where ## a ## is the scale factor. The pressure is:

$$ P_M = \frac{\rho_r}{3} = \frac{\rho_{r,0} a^{-4}}{3} $$

What I have tried doing is using the gsl's ode (ordinary differential equations) library to solve this system. I wrote the KG equation as a first order equation by introducing the variable ## \theta \equiv \dot{\phi} ## and then changed variables from ## t ## to ## a ##. This gave me three equations in the system that needed to be solved: the KG equation, ## \dot{\phi} = \theta ## and the ## \dot{H} ## equation. However, when I run my code the gsl appears not to update ## H ## despite updating both ## \theta ## and ## \phi ##. ## H ## is simply stuck at the initial value that I gave it.

I was just wondering if anyone knew what was wrong with this approach and/or if there is a better way to do it? I've read about the slow roll parameters and how they can be used to make simplifications to the KG and FE equations, but I wasn't sure when in the time evolution this approximation was valid. Thank you very much!

$$ \ddot{\phi} + 3H\dot{\phi} + V_{,\phi} = 0 $$

And the FE is:

$$ H^2 = \frac{8\pi G}{3} \left [ \frac{1}{2} \dot{\phi}^2 + V(\phi) + \rho_M \right ] $$

Where ## H ## is the Hubble parameter, ## \phi ## is the scalar field (both functions of time), a dot represents a derivative with respect to time, and ## V_{,\phi} = \frac{dV(\phi)}{d\phi} ##. ## V(\phi) ## is the potential of the scalar field. ## G ## is simply Newton's gravitational constant. ## \rho_M ## is the energy density of the other matter components in the Universe (both relativistic and non-relativistic). There is also an equation that governs the evolution of ## H ##:

$$ \dot{H} = -\frac{8\pi G}{2} \left ( \dot{\phi}^2 + \rho_M + P_M \right ) $$

Where ## P_M ## is the general relativistic pressure corresponding to ## \rho_M ##. Additionally, for the energy density I used:

$$ \rho_M = \rho_m + \rho_r = \rho_{m,0}a^{-3} + \rho_{r,0}a^{-4} $$

Where ## a ## is the scale factor. The pressure is:

$$ P_M = \frac{\rho_r}{3} = \frac{\rho_{r,0} a^{-4}}{3} $$

What I have tried doing is using the gsl's ode (ordinary differential equations) library to solve this system. I wrote the KG equation as a first order equation by introducing the variable ## \theta \equiv \dot{\phi} ## and then changed variables from ## t ## to ## a ##. This gave me three equations in the system that needed to be solved: the KG equation, ## \dot{\phi} = \theta ## and the ## \dot{H} ## equation. However, when I run my code the gsl appears not to update ## H ## despite updating both ## \theta ## and ## \phi ##. ## H ## is simply stuck at the initial value that I gave it.

I was just wondering if anyone knew what was wrong with this approach and/or if there is a better way to do it? I've read about the slow roll parameters and how they can be used to make simplifications to the KG and FE equations, but I wasn't sure when in the time evolution this approximation was valid. Thank you very much!