SHARE
TWEET

Hubbleparameter nach Zeit, Skalenfaktor und Rotverschiebung

Yukterez Jan 26th, 2018 (edited) 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (* lcdm.yukterez.net *) (* redshift.yukterez.net *) (* cosmology.yukterez.net *) (* Syntax: Wolfram *)
  2.  
  3. kg=1; m=1; sek=1; K=1; (* Units *)
  4. set={"GlobalAdaptive", "MaxErrorIncreases"->100,
  5. Method->"GaussKronrodRule"}; (* Integration Rule *)
  6. n=100; (* Recursion Depth *)
  7. tE=300 Gyr; (* Eventhorizon Limit *)
  8.  
  9. c=299792458m/sek; (* Lightspeed *)
  10. ca=c; (* Perturbation Velocity *)
  11. G=667384*^-16m^3 kg^-1 sek^-2; (* Newton Constant *)
  12. Gyr=10^7*36525*24*3600*sek; (* Billion Year Scale *)
  13. Glyr=Gyr*c; (* Billion Lightyear Scale *)
  14. Mpc=30856775777948584200000m; (* Megaparsec *)
  15. kB=13806488*^-30kg m^2/sek^2/K; (* Boltzmann *)
  16. h=662606957*^-42kg m^2/sek; (* Planck *)
  17. ρc[H_]:=3 H^2/8/π/G; (* Critical Density *)
  18. ρR=8π^5 kB^4 T^4/15/c^5/h^3; (* Radiation Density *)
  19. ρΛ=ρc[H0]ΩΛ; (* Dark Energy Density *)
  20. T=2725/1000K; (* CMB Temperature *)
  21. H0=67150m/Mpc/sek; (* Hubble Constant *)
  22.  
  23. ΩR=ρR/ρc[H0]; ΩM=317/1000; ΩΛ=683/1000-ΩR; ΩT=ΩR+ΩM+ΩΛ; ΩK=1-ΩT; (* Density Parameters *)
  24.  
  25. w[a_, w0_]:=(1+w0)(Sqrt[1+(ΩΛ^-1-1)a^-3]-(ΩΛ^-1-1)a^-3 Tanh[1/Sqrt[1+(ΩΛ^-1-1)a^-3]]^-1)^2 (1/Sqrt[ΩΛ]-(ΩΛ^-1-1)Tanh[Sqrt[ΩΛ]]^-1)^-2-1; (* Dark Energy equation of State, Standard Cosmology: w0=-1 *)
  26.  
  27. F[a_, w0_]:=Sqrt[ΩR a^-4+ΩM a^-3+ΩK a^-2+ΩΛ a^(-3(w[a, w0]+1))]; (* Density Function by Scalefactor *)
  28. H[a_, w0_]:=H0 F[a, w0]; (* Hubble Parameter by Scalefactor *)
  29.  
  30. int[f_, {x_, xmin_, xmax_}]:=Quiet[NIntegrate[f, {x, xmin, xmax}, Method->set, MaxRecursion->n]];
  31.  
  32. ta[A_, w0_]:=int[1/a/ H[a, w0], {a, 0, A}]; (* Time by Scalefactor *)
  33. α[τ_, w0_]:=Quiet[A/.FindRoot[ta[A, w0]-τ, {A, 1}]] (* Scalefactor by Time *)
  34.  
  35. rH[τ_, w0_]:=c/H[α[τ, w0], w0]; (* Hubble Radius *)
  36. lC[τ_, w0_]:=int[-c α[τ, w0]/a^2/H[a, w0], {a, 1, α[τ, w0]}]; (* Light Cone of t0 *)
  37. Lc[τ_, t_, w0_]:=int[-c α[τ, w0]/a^2/H[a, w0], {a, α[t, w0], α[τ, w0]}]; (* Light Cone of t *)
  38. eH[τ_, w0_]:= α[τ, w0]int[c/(α[time, w0]), {time, τ, tE}]; (* Event Horizon *)
  39. pH[τ_, w0_]:=int[-α[τ, w0] c/a^2/H[a, w0], {a, α[τ, w0], 0}]; (* Particle Horizon *)
  40. g[τ_, w0_]:=tc/.Quiet[FindRoot[pH[tc, w0]/c-τ, {tc, τ}]]; (* Conformal Time *)
  41.  
  42. ωR[τ_, w0_]:=ΩR α[τ, w0]^-4/ρc[H[α[τ, w0]]]; (* Radiation Evolution *)
  43. ωM[τ_, w0_]:=ΩM α[τ, w0]^-3/ρc[H[α[τ, w0]]]; (* Matter Evolution *)
  44. ωK[τ_, w0_]:=ΩK α[τ, w0]^-2/ρc[H[α[τ, w0]]]; (* Curvature Evolution *)
  45. ωΛ[τ_, w0_]:=ΩΛ α[τ, w0]^(-3(w[α[τ, w0], w0]+1))/ρc[H[α[τ, w]]]; (* Dark Energy Evolution *)
  46.  
  47. t0[w0_]:=ta[1, w0]/Gyr; (* Age of the Universe, now *)
  48. "t0 in Gyr"->t0[-1]
  49.  
  50. (* Linear Plot *)
  51.  
  52. "Hubbleparameter by time"
  53. Plot[ H[α[τ Gyr, -1], -1], {τ, 0, 2t0[-1]}, ImageSize->320, Frame->True, ImagePadding->{{60, 12}, {20, 2}}, GridLines->{{t0[-1]}, {H0}}, PlotStyle->Blue]
  54. "Hubbleparameter by scalefactor"
  55. Plot[ H[a, -1], {a, 0, 2}, ImageSize->320, Frame->True, ImagePadding->{{60, 12}, {20, 2}}, GridLines->{{1}, {H0}}, PlotStyle->Blue]
  56. "Hubbleparameter by redshift"
  57. Plot[ H[1/(z+1), -1], {z, 0, 100}, ImageSize->320, Frame->True, ImagePadding->{{60, 12}, {20, 2}}, GridLines->{{0}, {H0}}, PlotStyle->Blue]
  58.  
  59. (* Log-Log Plot *)
  60.  
  61. "Hubbleparameter by time"
  62. LogLogPlot[ H[α[τ Gyr, -1], -1], {τ, 1/10000, 2t0[-1]}, ImageSize->320, Frame->True, ImagePadding->{{60, 12}, {20, 2}}, GridLines->{{t0[-1]}, {H0}}, PlotStyle->Red]
  63. "Hubbleparameter by scalefactor"
  64. LogLogPlot[ H[a, -1], {a, 1/10000, 2}, ImageSize->320, Frame->True, ImagePadding->{{60, 12}, {20, 2}}, GridLines->{{1}, {H0}}, PlotStyle->Red]
  65. "Hubbleparameter by redshift"
  66. LogLogPlot[ H[1/(z+1), -1], {z, 1/10000, 10000}, ImageSize->320, Frame->True, ImagePadding->{{60, 12}, {20, 2}}, GridLines->{{0}, {H0}}, PlotStyle->Red]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top