Gravity#

Gravity in synchronous gauge: the metric, the Friedmann sum and the initial mode.

The variables are those of Ma & Bertschinger (1995). Background turns the summed density rho into the conformal Hubble rate aH. Metric holds eta and the Einstein constraints for h' and alpha, Curvature the spatial curvature, and AdiabaticMode the growing-mode quantities the species’ initial conditions read.

class discoeb.components.gravity.Background(**overrides)[source]#

Bases: Gravity

The Friedmann equation of general relativity: the expansion rate from the fluids.

The species give their densities as physical ones, omega = Omega h^2, so the Hubble constant is no parameter: it is what this rate comes to today, H_0 = aH(a = 1) (Model.H_0). A theory with another Friedmann equation replaces this component and provides aH (and aH_prime if something reads it) its own way.

class discoeb.components.gravity.Metric(**overrides)[source]#

Bases: Gravity

The synchronous-gauge metric: eta and the Einstein constraints.

With k_c^2 = k^2 (1 - 3 K / k^2), which is k^2 when flat,

h' = 2 (k_c^2 eta + 4 pi G a^2 delta_rho) / aH, eta' = (4 pi G a^2 (rho + p) theta + K h' / 2) / k_c^2, alpha = (h' + 6 eta') / (2 k^2) = (h' / 2 + 12 pi G a^2 (rho + p) theta / k^2) / k_c^2.

class discoeb.components.gravity.Curvature(**overrides)[source]#

Bases: Gravity

Spatial curvature K = -omega_k H100^2, with omega_k = Omega_k h^2, and the metric factor.

It is geometry: it enters the Friedmann equation through K and contributes to none of the sums.

class discoeb.components.gravity.AdiabaticMode(**overrides)[source]#

Bases: Component

The adiabatic growing mode deep in radiation domination.

The series of Ma & Bertschinger at x = k tau << 1, normalised to unit comoving curvature: the free-streaming fraction of the radiation Rv, the matter-radiation parameter om and their combinations. Both come from sums over the species (rho_matter, rho_radiation, rho_free_streaming). The host evaluates them from the background densities when it assembles the initial state, and the states’ initial functions read them by name. The primordial spectrum A_s (k / k_p)^(n_s - 1) scales the mode. The matter power spectrum reads it and the solve does not.