File: effective_sigma8.c

package info (click to toggle)
inhomog 0.1.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 2,476 kB
  • sloc: ansic: 10,454; sh: 4,380; makefile: 173
file content (126 lines) | stat: -rw-r--r-- 4,098 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*
   effective sigma8 calculation

   Copyright (C) 2016, 2017 Boud Roukema, Jan Ostrowski

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

   See also http://www.gnu.org/licenses/gpl.html

*/

#include <stdio.h>
#include <sys/types.h>
#include "config.h"
#include <math.h>

#include "lib/inhomog.h"

/** effective sigma8 calculation

    Given sigma_8 inferred from observations under
    FLRW and assuming LCDM, calculate sigma_8
    for an EdS model with the LCDM proxy H_1^bg value
    (see arXiv:1608.06004).
*/

int main(void){
  /* https://arxiv.org/abs/1502.01589 Table 4 column 6 */
  const double sigma_8_LCDM = 0.8159; /* pm 0.0086 */
  double sigma_8_init;
  double sigma_8_EdS_bg; /* EdS background model that matches at high redshifts */
  double sigma_8_EdS_bg_t0eff;

  /* initial redshift, time */
  const double z_init = 1000.0;
  double t_init;
  const double t_0_LCDM = 13.80; /* Gyr */
  double t_0_EdS_bg;

  int want_verbose = 1;

  struct background_cosm_params_s bg_cosm_params_LCDM,
    bg_cosm_params_EdS_bg;

  bg_cosm_params_LCDM.EdS = 0;
  bg_cosm_params_LCDM.flatFLRW = 1;
  bg_cosm_params_LCDM.H_0 = 67.74; /* pm 0.46 */
  bg_cosm_params_LCDM.OmLam_0 = 0.6911; /* pm 0.0062 */
  bg_cosm_params_LCDM.Omm_0 = 1.0 - bg_cosm_params_LCDM.OmLam_0;
  bg_cosm_params_LCDM.recalculate_t_0 = 1;

  bg_cosm_params_LCDM.inhomog_a_scale_factor_initial = 1.0/201.0;
  bg_cosm_params_LCDM.inhomog_a_d_scale_factor_initial = 1.0/201.0;
  bg_cosm_params_LCDM.inhomog_a_scale_factor_now = 1.0;

  bg_cosm_params_EdS_bg.EdS = 1;
  bg_cosm_params_EdS_bg.flatFLRW = 1; /* superfluous */
  bg_cosm_params_EdS_bg.H_0 = 37.7;
  bg_cosm_params_EdS_bg.Omm_0 = 1.0;
  bg_cosm_params_EdS_bg.OmLam_0 = 0.0;
  bg_cosm_params_EdS_bg.recalculate_t_0 = 1;

  bg_cosm_params_EdS_bg.inhomog_a_scale_factor_initial = 1.0/201.0;
  bg_cosm_params_EdS_bg.inhomog_a_d_scale_factor_initial = 1.0/201.0;
  bg_cosm_params_EdS_bg.inhomog_a_scale_factor_now = 1.0;


  t_init = t_flatFLRW(&bg_cosm_params_LCDM,
                      1.0/(z_init+1.0),
                      want_verbose);

  /* Within the LCDM proxy, calculate the initial epoch sigma_8. */
  sigma_8_init = sigma_8_LCDM *
    growth_FLRW(&bg_cosm_params_LCDM,
                t_init,
                want_verbose) /
    growth_FLRW(&bg_cosm_params_LCDM,
                t_0_LCDM,
                want_verbose);

  /* Evolve the initial epoch sigma_8 forward with the EdS background
     model to the *EdS background* unity scale factor epoch t_0_EdS_bg. */
  t_0_EdS_bg = t_EdS(&bg_cosm_params_EdS_bg,
                     1.0,
                     want_verbose);

  sigma_8_EdS_bg = sigma_8_init *
    growth_FLRW(&bg_cosm_params_EdS_bg,
                t_0_EdS_bg,
                want_verbose) /
    growth_FLRW(&bg_cosm_params_EdS_bg,
                t_init,
                want_verbose);

  sigma_8_EdS_bg_t0eff = sigma_8_init *
    growth_FLRW(&bg_cosm_params_EdS_bg,
                t_0_LCDM,
                want_verbose) /
    growth_FLRW(&bg_cosm_params_EdS_bg,
                t_init,
                want_verbose);

  printf("\n");
  printf("z_init = %g\n", z_init);
  printf("t_init,t_0_LCDM,t_0_EdS_bg = %g %g %g\n",
         t_init, t_0_LCDM, t_0_EdS_bg);
  printf("sigma_8_init, sigma_8_LCDM, sigma_8_EdS_bg_t0eff, ");
  printf("sigma_8_EdS_bg = %g %g %g %g\n",
         sigma_8_init, sigma_8_LCDM,
         sigma_8_EdS_bg_t0eff, sigma_8_EdS_bg);
  printf("\n");

  return 0;
}