Newer
Older
double (*t2a)(double);
double (*a2t)(double);
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
void set_cosmology(int cosmology)
{
switch (cosmology){ // Parameters
case 0:
Cosmo = null;
a2t = &a2t_null;
t2a = &t2a_null;
break;
case 1:
Cosmo = WMAP3;
a2t = &a2t_LCDM;
t2a = &t2a_LCDM;
break;
case 2:
Cosmo = deSitter;
a2t = &a2t_deSitter;
t2a = &t2a_deSitter;
break;
default:
Assert(0, "Cosmology not found");
break;
}
if ( ! ThisTask.Rank )
printf("\nSetting Cosmology : %s \n\n",Cosmo.name);
return;
}
/* Einstein - deSitter Universe */
struct cosmology deSitter = {"deSitter", 0.7, 0.17, 1, 0,
0, 0, 1, 0, 4.35e17};
double a2t_deSitter(double a)
{
return pow(a ,3./2.) * deSitter.t0;
}
double t2a_deSitter(double t)
{
return pow(t/deSitter.t0 , 2./3.);
}
/* NULL Cosmology = nocomoving */
struct cosmology null = {"NULL ", 1, 0, 0, 0, 0, 0, 1, 0, 0};
double a2t_null(double a)
{
return a * Unit.Time;
}
double t2a_null(double t)
{
return t / Unit.Time;
}
/* Lambda CDM Universe using WMAP3 cosmology*/
struct cosmology WMAP3 = { "WMAP3 ", 0.732, 0.0444, 0.266,
0.732,-1.0, 0.079, 0.94E-26, 0.772, 13.73E9*yr2sec};
double a2t_LCDM(double a)
{
return -1;
}
double t2a_LCDM(double t)
{
return -1;
}