-
Notifications
You must be signed in to change notification settings - Fork 1
/
background.f90
83 lines (42 loc) · 1.38 KB
/
background.f90
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
Module background
use input
contains
function Hubble_parameter(a)
Real*8 :: a,Hubble_parameter
If (a .gt. 0.d0) then
continue
Else
write(UNIT_EXE_FILE,*) 'NEGATIVE OR SINGULAR SCALE FACTOR FOUND IN HUBBLE PARAMETER FUNCTION'
stop
End If
If (cosmological_model .eq. 'lcdm') then
Hubble_parameter = H0*sqrt(Omega_m0/a**3 + Omega_Lambda)
Else if (cosmological_model .eq. 'wcdm') then
write(UNIT_EXE_FILE,*) 'wcdm MODEL NOT YET IMPLEMENTED'
stop
Else if (cosmological_model .eq. 'scdm') then
write(UNIT_EXE_FILE,*) 'scdm MODEL NOT YET IMPLEMENTED'
stop
Else if (cosmological_model .eq. 'mgcdm') then
write(UNIT_EXE_FILE,*) 'mgcdm MODEL NOT YET IMPLEMENTED'
stop
Else
write(UNIT_EXE_FILE,*) 'WRONG INPUT VALUE FOR cosmological_model PARAMETER'
stop
End if
If (Hubble_parameter**2 .ge. 0.d0) then
continue
Else
write(UNIT_EXE_FILE,*) 'NaN FOUND IN HUBBLE PARAMETER FUNCTION'
stop
End If
end function Hubble_parameter
! FUNCTIONS SUCH AS:
! COSMOLOGICAL CONSTANT ENERGY DENSITY
! COSMOLOGICAL CONSTANT PARAMETER DENSITY
! HUBBLE PARAMETER
! LUMINOSITY DISTANCE
! ANGULAR DIAMETER DISTANCE
! CONFORMAL TIME
! REDSHIFT
End module background