cosmo

package
v0.0.0-...-b5d641a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GMks    = 6.67259e-11
	MpcMks  = 3.08560e+22
	MSunMks = 1.98900e+30
	CMks    = 2.99792e+08
)

Variables

This section is empty.

Functions

func HubbleFrac

func HubbleFrac(omegaM, omegaL, z float64) float64

HubbleFrac calculates h(z) = H(z)/H0. Here H(z) is from Hubble's Law, H(z)**2 + k (c/a)**2 = H0**2 h100**2 (OmegaR a**-4 + OmegaM a**-3 + OmegaL). The hubble's constant in const.go is H0 = H(z = 0). An alternate formulation is h(a) = da/dt / (a H0). Assumes k, r = 0.

func RhoAverage

func RhoAverage(H0, omegaM, omegaL, z float64) float64

RhoAverage calculates the average density of matter in the universe. The returned value is in cosmological units / h.

func RhoCritical

func RhoCritical(H0, omegaM, omegaL, z float64) float64

RhoCritical calculates the critical density of the universe. This shows up (among other places) in halo definitions and in the definitions of the omages (OmegaFoo = pFoo / pCritical). The returned value is in comsological units / h.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL