Skip to content Skip to sidebar Skip to footer

Solving System Of Odes In Python; Excess Work Done On This Call

I am trying to solve a system of coupled ODEs in python for different potentials. It works for a particular type of potential (exponential) but once the potential is described by a

Solution 1:

The quintessence dark energy model (see physics.SE as an arbitrary reference) is

x'' + 3*H*x' + V'(x) = 0

H = a'/a

Here, from what is written,

H = kr1/sqrt(3) * sqrt(E) with

E = 0.5*x'^2 + V(x) + a^(-3)

(( which leads to
   E' = x'*(x''+V'(x)) - 3*a^(-4)*a' = - 3*H*x'^2 -3*a^(-3)*H 
      = -3*H*(x'^2+a^(-3))
))

I would implement this system in exactly these parts, as

defV(x): return ...
defdV(x): return ...

defquintessence(u,t):
    a,x,dx = u
    E = 0.5*dx**2 + V(x) + a**-3
    H = kr1/3**0.5 * E**0.5
    da = a*H
    ddx = -3*H*dx -dV(x)
    return [da, dx, ddx]

Post a Comment for "Solving System Of Odes In Python; Excess Work Done On This Call"