*** Linear Growth Factor *** August 23, 2008: E.Komatsu A linear density fluctuation, delta(z), grows as delta(z) = D(z)/D(z*) delta(z*) where z* is some reference redshift. During the matter dominated era, D(z) is exactly proportional to 1/(1+z); thus, it is often convenient to define the growth factor as g(z) = D(z)(1+z) which is constant over redshifts in the matter era. It is also convenient to choose the boundary condition such that g(z)=1 during the matter era. So, g(z=0) is not unity because of dark energy! The derivative is related to D as dlng/dlna = dlnD/dlna - 1 therefore, dlnD/dlna = 1 + dlng/dlna = 1 + (1/g)dg/dlna Here we provide a simple subroutine, growth.f90, for computing the linear growth factor, g(z), as well as its derivative with respect to ln(a), where a=1/(1+z). (1) Put "USE cosmo" at the beginning of the program (2) Put "USE growth" at the beginning of the program (3) Specify three cosmological parameters: - matter density parameter, om0 - dark energy density parameter, ode0 - dark energy equation of state parameter, w (4) CALL setup_growth (5) You are now ready to use a double-precision function "g(z)" where z is also in double precision. (6) You can use a double-precision function "dgdlna(z)" for computing dg/dlna(z). z is also in double precision. - To compile and use the sample programs (given below), edit Makefile and simply "./make" - It will generate executables called "sample" and "compute_growth" ========================================================================= A simple program to use "growth.f90" (also included as "sample.f90" in this directory): USE cosmo USE growth double precision :: g,dgdlna,redshift external g,dgdlna ! Specify three cosmological parameters in double precision. ! The data type has been defined in MODULE cosmo. ode0=0.723d0 om0=0.277d0 w = -1d0 CALL setup_growth redshift=10d0 print*,'omega matter=',om0 print*,'omega de=',ode0 print*,'w=',w print*,'g(z) at z=',redshift,'is',g(redshift) print*,'dg/dlna(z) at z=',redshift,'is',dgdlna(redshift) end Another program, "compute_growth.f90," for generating g(z) and dgdlna(z) over many redshifts is PROGRAM Compute_Growth USE cosmo USE growth ! A sample program for computing the linear growth factor and its derivative ! August 23, 2008: E.Komatsu IMPLICIT none integer :: j double precision :: g,dgdlna,z external g,dgdlna ! specify three cosmological parameters ode0=0.723d0 om0=0.277d0 w=-1d0 ! tabulate g(z) by calling "setup_growth" call setup_growth ! now output g(z) and dg/dlna(z) as a function of z... open(1,file='redshift_g.txt') open(2,file='redshift_dgdlna.txt') z=0d0 do j=1,10000 write(1,'(2F18.8)')z,g(z) write(2,'(2F18.8)')z,dgdlna(z) z = z+0.01d0 enddo close(1) close(2) stop END PROGRAM Compute_Growth