def age(R):
H0 = 2.3e-18
OmegaM0 = 0.27
yr = 365.25 * 24 * 3600
T0 = 13.7e9
return T0 - (2./3./H0/np.sqrt(1-OmegaM0)) * np.arcsinh(np.sqrt( (1/OmegaM0-1)*R**3 )) / yr
# return the radius of a particle (in kpc) given its mass (in Msun) and density (in Msun/kpc3)
评论列表
文章目录