Dark Energy models
- class camb.dark_energy.DarkEnergyModel(*args, **kwargs)[source]
Abstract base class for dark energy model implementations.
- class camb.dark_energy.DarkEnergyEqnOfState(*args, **kwargs)[source]
Bases:
DarkEnergyModelAbstract base class for models using w and wa parameterization with use w(a) = w + (1-a)*wa parameterization, or call set_w_a_table to set another tabulated w(a). If tabulated w(a) is used, w and wa are set to approximate values at z=0.
- Variables:
w – (float64) w(0)
wa – (float64) -dw/da(0)
cs2 – (float64) fluid rest-frame sound speed squared
use_tabulated_w – (boolean) using an interpolated tabulated w(a) rather than w, wa above
- set_params(w=-1.0, wa=0, cs2=1.0, use_tabulated_w=False, wde_a_array=None, wde_w_array=None)[source]
Set the parameters so that P(a)/rho(a) = w(a) = w + (1-a)*wa
- Parameters:
w – w(0)
wa – -dw/da(0)
cs2 – fluid rest-frame sound speed squared
use_tabulated_w – whether use interpolated w
wde_a_array – array of scale factors
wde_w_array – array of w(a)
- set_w_a_table(a, w) DarkEnergyEqnOfState[source]
Set w(a) from numerical values (used as cubic spline). Note this is quite slow.
- Parameters:
a – array of scale factors
w – array of w(a)
- Returns:
self
- class camb.dark_energy.DarkEnergyFluid(*args, **kwargs)[source]
Bases:
DarkEnergyEqnOfStateClass implementing the w, wa or splined w(a) parameterization using the constant sound-speed single fluid model (as for single-field quintessence).
- set_w_a_table(a, w) DarkEnergyEqnOfState[source]
Set w(a) from numerical values (used as cubic spline). Note this is quite slow.
- Parameters:
a – array of scale factors
w – array of w(a)
- Returns:
self
- class camb.dark_energy.DarkEnergyPPF(*args, **kwargs)[source]
Bases:
DarkEnergyEqnOfStateClass implementing the w, wa or splined w(a) parameterization in the PPF perturbation approximation (arXiv:0808.3125) Use inherited methods to set parameters or interpolation table.
Note PPF is not a physical model and just designed to allow crossing -1 in an ad hoc smooth way. For models with w>-1 but far from cosmological constant, it can give quite different answers to the fluid model with c_s^2=1.
- class camb.dark_energy.Quintessence(*args, **kwargs)[source]
Bases:
DarkEnergyModelAbstract base class for single scalar field quintessence models.
For each model the field value and derivative are stored and splined at sampled scale factor values.
To implement a new model, need to define a new derived class in Fortran, defining Vofphi and setting up initial conditions and interpolation tables (see TEarlyQuintessence as example).
- Variables:
DebugLevel – (integer)
astart – (float64)
integrate_tol – (float64)
sampled_a – (float64 array)
phi_a – (float64 array)
phidot_a – (float64 array)
- class camb.dark_energy.EarlyQuintessence(*args, **kwargs)[source]
Bases:
QuintessenceExample early quintessence (axion-like, as arXiv:1908.06995) with potential
V(phi) = m^2f^2 (1 - cos(phi/f))^n + Lambda_{cosmological constant}
- Variables:
n – (float64) power index for potential
f – (float64) f/Mpl (sqrt(8piG)f); only used for initial search value when use_zc is True
m – (float64) mass parameter in reduced Planck mass units; only used for initial search value when use_zc is True
theta_i – (float64) phi/f initial field value
frac_lambda0 – (float64) fraction of dark energy in cosmological constant today (approximated as 1)
use_zc – (boolean) solve for f, m to get specific critical redshift zc and fde_zc
zc – (float64) redshift of peak fractional early dark energy density
fde_zc – (float64) fraction of early dark energy density to total at peak
npoints – (integer) number of points for background integration spacing
min_steps_per_osc – (integer) minimum number of steps per background oscillation scale
fde – (float64 array) after initialized, the calculated background early dark energy fractions at sampled_a
- class camb.dark_energy.AxionEffectiveFluid(*args, **kwargs)[source]
Bases:
DarkEnergyModelExample implementation of a specific (early) dark energy fluid model (arXiv:1806.10608). Not well tested, but should serve to demonstrate how to make your own custom classes.
- Variables:
w_n – (float64) effective equation of state parameter
fde_zc – (float64) energy density fraction at z=zc
zc – (float64) decay transition redshift (not same as peak of energy density fraction)
theta_i – (float64) initial condition field value