Escolar Documentos
Profissional Documentos
Cultura Documentos
Abstract
This paper describes the Fortran 77 code SIMU, version 1.1, designed for numerical
simulations of observational relations along the past null geodesic in the Lemaı̂tre-
Tolman-Bondi (LTB) spacetime. SIMU aims at finding scale invariant solutions of
the average density, but due to its full modularity it can be easily adapted to any
application which requires LTB’s null geodesic solutions. In version 1.1 the numerical
output can be read by the GNUPLOT plotting package to produce a fully graphical
output, although other plotting routines can be easily adapted. Details of the code’s
subroutines are discussed, and an example of its output is shown.
1 Introduction
It is a basic result of relativity theory that light rays follow null geodesics in
curved 4-dimensional spacetimes, and this means that if one is pursuing cos-
mological applications of solutions of Einstein’s field equations with the aim
of comparing the model’s theoretical predictions with the actual data pro-
duced by astronomical observations, one requires null geodesic solutions for
the chosen metric. In fact, for cosmological applications one only needs the
past null geodesics, as what we observe today are events which occurred in
the past. Nevertheless, a very basic problem arising in cosmology, and which
hinders comparison between theory and observations in other models than
1 On leave from Physics Institute, University of Brazil – UFRJ, Rio de Janeiro.
2 Supported by Brazil’s CAPES Foundation.
the standard Friedmann-Lemaı̂tre-Robertson-Walker (FLRW), stems from the
fact that as soon as we depart from the simple FLRW models largely used by
observational cosmologists, the task of finding null geodesic solutions quickly
becomes an intractable analytical problem. In fact, this situation is not fully
appreciated by many of those dealing with cosmological modelling of astro-
nomical data, inasmuch as the simple FLRW models largely applied in ob-
servational cosmology is the exception, since it has a very simple analytical
solution for the null geodesic equation.
In this paper I will describe such a code. It deals with LTB geometry in its
full generality, being applicable to each of its special sub-cases, parabolic,
hyperbolic and elliptic [5], either separately or together in a single problem
encompassing all sub-cases, if desired. It was originally designed to find scale
invariant solutions of the average density by means of numerical simulations
[6,7], but as we shall see below, without changing its core null geodesic calcu-
lations the code can be easily adapted to do much more than this, due to its
modularity. The original results obtained by this code were recently analyti-
cally confirmed, and extended, by other authors [8] by means of the observa-
tional coordinates approach mentioned above. The confirmation of the results
of [7] by [8] adds then further reliability to the numerical results obtained with
the code that will be described below. Besides, those two approaches, numer-
ical and analytical, when applied to a difficult problem such as null geodesic
solutions in LTB spacetime, will in fact complement each other, rather than
exclude one another. In §2 I will describe version 1.1 of the code, and in §3 the
input and output will be discussed. The results are summarized in §4, where
I also indicate where the code can be obtained.
2
2 Description of SIMU 1.1
As mentioned above, the code uses some subroutines from [9], namely the
fourth order Runge-Kutta integration with adaptive stepsize control, the root
finding algorithm for the transcendental equations appearing in LTB’s ellip-
tical and hyperbolic sub-cases [6], the extended trapezoidal rule quadrature
algorithm, as well as Simpson’s rule to the desired accuracy. However, apart
from those, the remaining subroutines are new, as well as the actual way in
which the whole set of subroutines were linked to each other and organized.
3
In addition, the code is extensively commented and widely documented, also
having a structure chart showing the dependence among the subroutines and
functions. This detailed documentation is added in order to help readers who
might be interested in implementing SIMU in their own computer environ-
ments, or changing it to suit their specific applications.
It must be mentioned that there are more “state of the art” ways for finding
numerical solutions of ODE’s than using the adaptive 4th order Runge-Kutta
method. The ODEPACK subroutine package is an example [10–12]. Never-
theless, although the chosen ODE integrator for SIMU may have already been
superseded by better methods, it does solve the proposed problem, and at the
desired accuracy. Inasmuch as SIMU is a tested code, with its results having
already been analytically confirmed by other authors [8], there is no need to
change to another ODE integrator at SIMU’s current version. The reader must,
however, be aware that such a change might be required for other applications
of SIMU to LTB spacetime.
The code uses only standard Fortran 77 commands to avoid possible com-
pilation problems with machine dependent commands that are not available
universally. If a potential user is only interested in the core of the program, that
is, the part which integrates the null geodesic and calculates the observational
relations, he or she can simply remove its “tail”, where the observational rela-
tions are manipulated according to the aims of the theory studied in [6,7], and
replace it with something else. This “tail” consists of the two last branches
of the structure chart headed by the subroutines FIT and OUTPUT, and are
easily spotted in the MAIN. Finally, the functions f (r), F (r), β(r) and their
derivatives appear in six subroutines at the end of the list so that they can be
compiled separately.
The previous version 1.0 (formerly SIMU 5d; see [13]) had the PGPLOT plotting
routines merged into the second half of the OUTPUT subroutine, while version
1.1 removed them and piped the numerical results into eleven independent
files, v1 to v11, that are then externally read by the GNUPLOT plotting package
in order to produce a graphical output of the results. This is the only differ-
ence between versions 1.0 and 1.1, meaning that in version 1.1 the graphical
output is completely independent from the code itself. Making this change
was justified on two grounds: (i) the GNUPLOT package has greater plotting
capabilities, even allowing LATEX output formats that can be included directly
in the figure environment of any LATEX macro. So, producing plots with the
results is done by feeding the numerical tables into GNUPLOT itself by means
of a script file written for, say, a linux environment; (ii) this feature of hav-
ing the results outputted into numerical files brings flexibility to the code,
as its results can be independently used by another program, if so desired or
demanded by another application of the LTB spacetime.
4
3 Input and Output
The actual implementation for the original problem advanced in [6] was de-
scribed at length in [7], where one can find detailed plots with the results and
analysis of the various simulations, 4 as well as detailed explanations of initial
conditions and functions used in each simulation. So, in here I shall limit the
discussion to the code itself, without dealing with any specific application.
g77 simu1.1.for
a.out < in.simu
gnuplot < in.gnu
latex plots.tex
xdvi plots.dvi
Here the file in.simu contains the maximum value for the radius coordinate r
for the integration, while in.gnu is a short GNUPLOT script file for inputting the
v1 to v11 files and producing LATEX files (see appendix A). Finally plots.tex
is a file for running the .tex LATEX files produced by GNUPLOT in order for the
results be available for analysis directly on the screen.
4 Conclusion
In this paper I have described the Fortran 77 code SIMU version 1.1 for calcu-
lating solutions of the null geodesics equations in the Lemaı̂tre-Tolman-Bondi
spacetime geometry. I have discussed the details of the code, input and output,
as well as the ways in which it can be possibly modified for other cosmological
applications of this geometry. The code is available for download at [14].
5
Acknowledgements
References
[2] M. B. Ribeiro, in: D. Hobill, A. Burd and A. Coley, eds., Deterministic Chaos
in General Relativity (New York, Plenum, 1994) 269-296
6
A in.gnu Script
7
set xlabel "$r$"
set ylabel "$I$"
plot ’v9’ with points 1 8
set output ’v10.tex’
set title "$Border \rightarrow Center$"
set xlabel "$r$"
set ylabel "$I$"
plot ’v10’ with points 1 8
quit
8
B Plots of a Single Simulation
-2.5
-3 c c c
c
-3.5 c
-4 c
log ρ c
-4.5 c
-5 c
-5.5 cc
-6
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
log dl (Gpc)
0.0008 c
c
0.0007
0.0006 c
0.0005
ρ 0.0004 c
0.0003
0.0002 c
0.0001 c
c
c
0 c c c c
0 10 20 30 40 50 60
dl (Gpc)
9
60
50 c
c
40
dl
(Gpc) 30 c
20
c
10 c
c
c
0 ccc
c
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
z
3e+11
c
2.5e+11 c
2e+11
N1.5e+11
c
c
1e+11
c
5e+10
c
c
0 ccc c
c
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
z
10
1e-05
5e-06
F ield 0 cc c c c c c c c c c
EE
-5e-06
-1e-05
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
r
1e-05
5e-06
Deriv.
F ield 0 cc c c c c c c c c c
EEDSH
-5e-06
-1e-05
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
r
11
Center → Border
0 cc
c
-0.5
c
-1
c
-1.5
t c
-2
c
-2.5 c
c
-3 c c
-3.5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
r
Border → Center
0 cccc
-0.5
c
-1
-1.5 c
t
-2 c
-2.5 c
c
-3 c cc
-3.5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
r
12
Center → Border
0.9
c c
0.8 c
0.7 c
0.6 c
0.5 c
I
0.4 c
0.3
0.2 c
0.1 c
c
0 c
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
r
Border → Center
0.9
0.8 c cc
c
0.7
c
0.6
c
0.5
I
0.4 c
0.3
0.2 c
0.1
ccc
0 c
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
r
13