SlideShare uma empresa Scribd logo
1 de 90
Baixar para ler offline
Evaluation of mass loss in the simulation of
stellar clusters using a new multiphysics software
environment
Guillermo Kardolus
August 25, 2010
Keywords: AMUSE, stellar dynamics, stellar evolution, stellar clusters, mass
segregation
Supervisors:
Dr. I. Pelupessy
Prof. dr. S. F. Portegies Zwart
Mastercoordinator: Prof. dr. R.A.M.J Wijers
Astronomical Institute ”Anton Pannekoek”
Astronomy and Astrophysics
University of Amsterdam
Leiden Observatory
Computational Astrophysics
Leiden University
Preface
This thesis covers the work done during my master’s research project as part
of the fulfillment of the master’s degree in astronomy and astrophysics (O-
profile) at the University of Amsterdam. This research project is done under
the supervision of Prof. dr. S. F. Portegies Zwart and Dr. I. Pelupessy at
the Leiden Observatory, and Prof. dr. R. A. M. J. Wijers at the Astronomical
Institute ”Anton Pannekoek” (September 2009 - August 2010).
ii
Abstract
In this research project stellar evolution and stellar dynamics are combined in
the simulation of stellar clusters and binary systems. The numerical approx-
imations are done using a fairly new software framework written in Python.
This framework is called AMUSE, an abbreviation of Astrophysical MUltipur-
pose Software Environment. In contrary to the monolithic approach, where a
software package that first covers one astrophysical domain is extended to also
cover another domain, AMUSE uses a modular approach. This means that
existing packages, which are well-tested within their own domain, can be com-
bined. AMUSE handles the communication and unit conversion between these
different modules.
The phiGRAPE and Hermite0 direct n-body integrators were combined with a
fast, fitting formulae based, stellar evolution program called Single Star Evolu-
tion (SSE). The programs currently interact as followed: first a dynamical step
is taken, at which the n-body integrator synchronizes all the particles to the
same time. This step is then followed by an instant step of stellar evolution:
the stellar evolution program sends an updated list of masses, based on the new
global time, to the stellar dynamics program. If this method is accurate, de-
creasing time steps should at some point converge to the same result. It should
be noted that the mass, lost during the stellar evolution of the individual stars,
is assumed to leave the cluster instantly without interaction with the individual
stars. The cluster is further idealized: the gas from the molecular cloud from
which the cluster originated is also assumed to be gone at the zero age main
sequence.
However, before running these cluster simulations, the AMUSE framework has
to be tested first due to the fact that it is fairly new; a computer program is
built which computes various diagnostics in order to perform a qualitative com-
parison with well-known results from earlier papers. After these tests, stellar
dynamics and stellar evolution are first combined in binary systems, which have
analytical solutions. The binary simulations are done using the AMUSE Two-
body module, which uses the generalized Kepler formulas to solve the two-body
problem for any orbit.
Various expected results are observed using AMUSE and will be described
briefly hereafter. The core collapse for a Plummer sphere occurs around ten
half-mass relaxation times for one-component clusters, and is accelerated pro-
portional to the low-mass component over the high-mass component in two-
component simulations. Furthermore, there is indeed a sudden increase of bi-
naries around core collapse.
When mass loss is incorporated, the cluster expands and dissolves when 60 per-
cent of the mass is taken away; this is indeed expected for a Plummer sphere.
iv
Finally, the cluster can remain in virial equilibrium when the mass loss occurs
in a time that is slow compared to the crossing time. When the mass loss is fast,
this results in a steep increase of the number of escapers, and thus an increase
of the virial ratio of the cluster as a whole.
It was concluded that AMUSE is suitable to perform an investigation of the
time stepping. However, when reproducible results are desired, the phiGRAPE
module in GPU mode is not suitable: unexpected per run differences occur
when simulations are performed with the exact same initial conditions. For this
reason the direct Hermite0 integrator was used in future cluster simulations.
The binary simulations showed that, when incorporating adiabatic (Jeans mode)
mass loss, results are more accurate when the mass loss occurs in a more (orbital-
wise) symmetrical manner. This can be concluded from the fact that simula-
tions are closer to the (analytically obtained) adiabatic value when more steps
are done, and from test runs in which the time steps are scaled with the orbital
period.
In cluster simulations the results are closer to the adiabatic values as well —
at least to a lower value of the virial ratio — when the time steps are shorter.
However, this exact adiabatic value is unknown because there are no analytical
solutions. When the time steps are shorter they appear to converge to the same
result and it appears that smaller time steps are needed when the cluster has a
shorter crossing time.
Popular summary
i Summary in English
Stars, including our own sun, are born in stellar clusters. Such a cluster is
a multi-physical environment, in which various astrophysical domains interact.
Examples of these domains are: stellar dynamics, stellar evolution, radiation
transfer, and hydrodynamics. In this research project stellar dynamics and stel-
lar evolution evolution are combined in the simulation of stellar clusters and
binary systems. In dynamical simulations the velocities and positions of the
stars have to be approximated corresponding to a certain time, and in stellar
evolution the equations describing the stellar structure have to approximated
over time as well; both these domains are best studied with numerical approxi-
mations using a computer. When stellar evolution is incorporated into the dy-
namical simulation of a stellar cluster or binary system, this effectively means
that the stars lose mass over time.
Mass loss can be incorporated into the dynamical evolution of a stellar cluster
by extending an existing program, that first covers only one of the domains, in
such a way that it also covers the other astrophysical domain. Such a monolithic
approach has many disadvantages: the resulting packages are often large, suffer
from bugs, have sections of dead code, and are rarely documented. AMUSE,
short for Astrophysical MUltipurpose Software Environment, was created to ad-
dress these problems using a modular approach: existing, and thus well-tested,
packages are combined into a larger framework written in Python.
In AMUSE, the combination of the two astrophysical domains is done as fol-
lowed: first a dynamical simulation is done over a specific time step, followed by
an instant step of stellar evolution. The program responsible for stellar evolution
specifies new particle masses and passes them to the stellar dynamics program.
The stellar dynamics program is then ready to take a new time step. AMUSE
handles the communication and unit conversion between these programs.
The question is whether this method is accurate. When this method is accu-
rate, decreasing time steps should at some point converge to the same results.
This, and the general effect of different time step sizes, is first investigated in
binary systems, which have analytical solutions. Research is then carried on in
cluster simulations. But because AMUSE is fairly new software, it has to be
tested first: a computer program is built which computes various diagnostics in
order to perform a qualitative comparison with well-known results from earlier
research.
In cluster simulations where all masses are equal (one-component simulations),
as well as in two-component simulations, with and without mass loss, results are
vi I. SUMMARY IN ENGLISH
in line with what is expected. However, when reproducible results are desired,
the stellar dynamics program, which runs on the GPU, is not suitable: unex-
pected per run differences occur when simulations are performed with the exact
same initial conditions. For this reason another program, running on the CPU
instead, was used in future cluster simulations. This is unfortunate because the
GPU is specialized in running vector calculations, and is therefore very fast in
performing stellar dynamical computations. The CPU is many orders slower in
performing these computations.
The binary simulations showed that, for a mass loss that is supposed to be
evenly spread over the orbit of the mass-losing star, results are more accurate
when the mass loss occurs in a more (orbital-wise) symmetrical manner. This
can be concluded from the fact that simulations are closer to the analytical val-
ues when more steps are done, and from test runs in which the time steps are
scaled with the orbital period.
In cluster simulations the results are more accurate as well when the time steps
are shorter. However, this exact analytical value is unknown because such so-
lutions do not exist. When the time steps are shorter they appear to converge
to the same result and it seems that smaller time steps are needed when the
clusters are more compact.
II. SAMENVATTING IN HET NEDERLANDS (DUTCH) vii
ii Samenvatting in het Nederlands (Dutch)
Sterren, inclusief onze zon, worden geboren in sterrenhopen. Een dergelijke ster-
renhoop is een omgeving waarin verschillende astrofysische domeinen interactie
met elkaar hebben. Voorbeelden van deze domeinen zijn: dynamica, sterevolu-
tie, stralingsoverdracht, en hydrodynamica. In dit onderzoek worden dynamica
en sterevolutie gecombineerd in de simulatie van sterhopen en dubbelsterren.
In dynamische benaderingen worden de posities en snelheden van de sterren
benaderd op een bepaald tijdstip, en in sterevolutie worden de structuurvergeli-
jkingen die de ster beschrijven ontwikkeld over de tijd; beide domeinen zijn het
best te bestuderen doormiddel van numerieke benaderingen met een computer.
Wanneer sterevolutie wordt ge¨ıntegreerd in een simulatie die de dynamica van
een cluster beschrijft, betekent dit effectief dat de individuele sterren massa ver-
liezen na verloop van tijd.
Massa verlies kan worden ge¨ıntegreerd in de dynamische evolutie van een sterren-
hoop door een bestaand programma, dat voorheen maar ´e´en domein beschreef,
uit te breiden met het andere fysische domein. Een dergelijke monolithische
benadering kent veel nadelen: de resulterende programma’s zijn vaak groot, be-
vatten regelmatig fouten en stukken ongebruikte code, en zijn bovendien vaak
nauwelijks gedocumenteerd. AMUSE, een afkorting voor ”Astrophysical MUlti-
purpose Software Environment”, is ontwikkeld om deze problemen te adresseren
door middel van een modulaire aanpak: bestaande programma’s, die uitgebreid
getest zijn binnen het eigen domein, worden gecombineerd binnen een Python
framework.
In AMUSE worden de twee astrofysische domeinen als volgt gecombineerd: eerst
wordt er een dynamische tijdstap genomen over een specifieke tijdstap, gevolgd
door een sterevolutie stap die instantaan plaatsvindt. Het programma dat de
sterevolutie verzorgt berekent nieuwe massa’s en geeft deze door aan het pro-
gramma dat de dynamische simulaties verzorgt. Het dynamica programma is
dan klaar om de volgende tijdstap te simuleren. AMUSE regelt de communi-
catie en rekent eenheden om tussen de verschillende programma’s.
Het is de vraag of deze methode een juiste representatie van de werkelijkheid
geeft. Wanneer dit inderdaad het geval is, dan zouden kleinere tijdstappen vanaf
een bepaalde waarde met elkaar moeten convergeren tot hetzelfde resultaat. Het
voorgaande, samen met de invloed van de tijdstap in het algemeen op simulaties
met dynamica en sterevolutie, is eerst onderzocht in dubbelstersystemen. Het
voordeel is dat dubbelsterren analytische oplossingen hebben in tegenstelling
tot sterhopen. Vervolgens wordt het onderzoek verlegd naar de simulatie van
sterhopen. Echter, AMUSE is vrij nieuwe software en zal daarom eerst getest
moeten worden: er wordt een computerprogramma geprogrammeerd dat ver-
scheidene diagnostiek berekeningen uitvoert. Vervolgens kan deze diagnostiek
worden vergeleken met bekende resultaten uit eerder onderzoek.
In simulaties van sterhopen waarin alle sterren dezelfde massa hebben, maar ook
in simulaties waarin twee verschillende massa componenten voorkomen, worden
resultaten verkregen die inderdaad in de lijn der verwachting liggen. Dit geldt
zowel voor simulaties zonder, als simulaties met massa verlies. Echter, wan-
neer reproduceerbare resultaten gewenst zijn, is het ster dynamica programma
dat op de grafische kaart draait niet geschikt: niet verwachtte per-simulatie-
verschillen worden waargenomen wanneer de simulaties worden uitgevoerd met
exact dezelfde begincondities. Om deze rede is een ander programma, dat op de
viii II. SAMENVATTING IN HET NEDERLANDS (DUTCH)
CPU draait, gebruikt voor de rest van de cluster simulaties in dit onderzoek. Dit
is erg jammer, omdat de grafische kaart gespecialiseerd is in vector berekeningen
is deze significant sneller in het uitvoeren van ster dynamica berekeningen.
De dubbelster simulaties lieten zien dat, wanneer massa verlies in een gelijke
mate plaatsvindt over de baan van de ster, resultaten nauwkeuriger zijn als
de massa op een meer symmetrische manier (kijkend naar de baan) wordt ver-
wijderd. Dit kan worden opgemaakt uit het feit dat simulaties dichter bij de
analytische waarde lagen wanneer er meer stappen werden genomen. Het kan
ook worden opgemaakt door resultaten te bekijken van test simulaties waarin
de tijdstap wordt geschaald met de periode van de ster die massa verliest.
Ook in cluster simulaties zijn de resultaten nauwkeuriger wanneer de tijdstap
kleiner is. Hoewel de analytische waarde in dit geval niet kan worden berekend
doordat deze simpelweg niet bestaat. Op een gegeven moment blijkt het dat
korte tijdstappen inderdaad convergeren naar dezelfde resultaten. Het lijkt erop
dat kleinere tijdstappen nodig zijn wanneer het cluster compacter is.
Contents
Preface i
Abstract iii
Popular summary v
i Summary in English . . . . . . . . . . . . . . . . . . . . . . . . . v
ii Samenvatting in het Nederlands (Dutch) . . . . . . . . . . . . . . vii
1 Introduction 1
1.1 Computational astrophysics . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Cluster evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Brief overview of the relevant literature . . . . . . . . . . 6
1.3 Problem definition . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 Methods 11
2.1 Multi-physical software . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.1 AMUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Stellar dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.1 Hermite integration scheme . . . . . . . . . . . . . . . . . 14
2.2.2 Tree codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.3 Plummer model . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.4 Salpeter initial mass function . . . . . . . . . . . . . . . . 17
2.2.5 Special purpose hardware . . . . . . . . . . . . . . . . . . 18
2.2.6 Universal variable formulation . . . . . . . . . . . . . . . 20
2.3 Stellar evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3.1 Timescales of stellar evolution . . . . . . . . . . . . . . . . 21
2.3.2 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3.3 Mass loss (Single star evolution) . . . . . . . . . . . . . . 23
2.3.4 Mass loss II (Binary evolution) . . . . . . . . . . . . . . . 25
2.3.5 Fast models: Single Star Evolution (SSE) . . . . . . . . . 26
3 Tests and diagnostics 29
3.1 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2 Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2.1 One-component simulations . . . . . . . . . . . . . . . . . 33
3.2.2 Two-component simulations . . . . . . . . . . . . . . . . . 37
3.2.3 Simulations incorporating mass loss . . . . . . . . . . . . 40
x CONTENTS
4 New results: binary systems 47
4.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.1.1 WR runs . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.1.2 AGB runs . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.1.3 Test runs . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5 New results: cluster simulations 63
5.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6 Discussion, Conclusion, and Recommendations 67
A Code snippets 69
1.1 Cluster simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 69
1.2 Binary simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
B Parameters 73
Bibliography 75
Chapter 1
Introduction
Observations suggest that stars are formed in giant molecular clouds with a
mass of ∼ 105
M and a typical size of ∼ 10 pc (Pols, 2007). The molecu-
lar cloud is in pressure equilibrium with its surroundings; star formation starts
when this equilibrium is disturbed, for instance, by the perturbation caused by
a supernova or a collision with another cloud. The condition for the molecu-
lar cloud to be stable against such perturbations is given by the Jeans mass
(MJ 105
M · (T/100K)1.5
n−0.5
, where n is the number density in cm−3
).
When a part of the cloud violates this criterium it will undergo a free-fall col-
lapse. With the density going up, the Jeans mass within the collapsing cloud
goes down, leading to fragmentation. The fragmentation results in stars being
formed in clusters.
Such stellar clusters are fascinating objects. Our own sun was probably formed
in a cluster, so an understanding of cluster evolution can tell us something about
our own origin. More detailed information about cluster evolution and a brief
overview of some of the relevant literature is given in Chapter 1.2.
Over time the structure of the individual stars will change due to stellar evolu-
tion, while the cluster as a whole also evolves dynamically. Both these astrophys-
ical domains are best studied with numerical approximations using a computer.
Stellar dynamics requires numerical approximations when more than two parti-
cles are involved. Furthermore, the stellar structure equations are too complex
to be solved analytically, and there are not enough detailed observations to
study the impact of mass loss, by stellar evolution, on the dynamical cluster
evolution. Using a computer to investigate these problems means that this re-
search project belongs to the field of computational astrophysics. In Chapter
1.1 computational astrophysics is described in more detail and is also put into
a historic perspective.
This research project focusses on the most realistic method to combine stellar
evolution and stellar dynamics: life stellar evolution is combined with dynam-
ical n-body simulations. Existing, and thus well tested, packages of the two
astrophysical domains are connected in a modular software framework called
AMUSE1
(See Chapter 2.1).
The time step for stellar evolution to take place can have a significant impact
on the dynamical evolution of a stellar system. This can, for example, be seen
1AMUSE is an abbreviation of Astrophysical MUltipurpose Software Environment
2 CHAPTER 1. INTRODUCTION
in binary evolution, where the binary dissolves if half or more the mass is lost
instantly, while the system can never dissolve when mass is lost in a adiabatic
manner (see also Chapter 2.2.4). This research project investigates the influence
of the time step in the simulation of stellar clusters. In AMUSE, first a dynam-
ical step is taken over a certain step dt, followed by an instant step of stellar
evolution. Is this method accurate, which time steps converge to qualitatively
the same results, and how does this depend on the mass function and the initial
density of the stellar cluster? The investigation of the time step will start with
binaries, which have analytical solutions (Chapter 4), and will then be extended
to stellar clusters (Chapter 5).
However, because AMUSE is fairly new (developed since 2006), it has to be
tested first. This will be done by the reproduction of some of the results found
in earlier papers. A qualitative comparison, and the diagnostics used to analyze
the stellar cluster, are described in Chapter 3.
In Chapter 2 it is described how the stellar cluster was initiated and evolved over
time. In this project the initialization of the particles (setting masses, velocity,
and position) is done using a Plummer sphere (Chapter 2.2.3). In simulations
where a more realistic mass distribution is desired, a Salpeter mass function is
used (Chapter 2.2.4) to set the masses.
Stellar dynamical simulations are done with the hermite0 and phiGRAPE soft-
ware packages. The latter was initially designed to run on the special purpose
hardware called GRAPE, but was redisigned to work on a GPU (Chapter 2.2.5).
Both these integrators follow the Hermite integration scheme (Chapter 2.2.1).
The SSE package (Chapter 2.3.2) was used to perform the life stellar evolution.
It is concluded that not all the dynamical packages are suitable in case re-
producible results are desired, and that the time step size can have a significant
effect on the dynamical simulations, of binaries as well as stellar clusters, that
incorporate stellar evolution. The differences are most noticeable when the
clusters are compact, and in binary simulations with high mass-loss rates.
1.1 Computational astrophysics
In computational astrophysics computers are used to solve astrophysical prob-
lems numerically. It is an interdisciplinary science comprising observational
astronomy, theoretical physics, and computer science. Numerical astrophysics
is applied in the simulation of n-body systems, fluid dynamics, structure and
evolution of stars, and radiation transfer; among other things.
Although numerical solutions are only approximations, very complex problems
can be solved numerically and with a high degree of accuracy. Computational
astrophysics offers a way to test a theory. Observed phenomena such as collisions
between galaxies, the behavior of young stellar clusters, and binary evolution
can be reproduced using a computer; in many ways computational astrophysics
lies between observation and theory.
An interesting implementation of computational astrophysics is the numerical
solution to the n-body problem: the problem of predicting position and velocity
of a set of n gravitationally interacting particles. The differential equations de-
scribing the motion of the n particles can only be solved analytically for n = 2,
1.1. COMPUTATIONAL ASTROPHYSICS 3
and in certain special cases for n = 3 (e.g. the Lagrange points). Solving a
higher order system seemed impossible and in 1885 a price was announced for
a solution to the n-body problem. The problem could not be solved, it turned
out that general solutions of order n ≥ 3 can only be approximated numerically.
The current situation is that special purpose supercomputers can simulate in
the order of 106
particles within a reasonable accuracy (Harfst et al., 2007). See
also Chapter 2.2.
1.1.1 History
The first electromechanical computers were used by the military in World War
II to break codes. The first electronic general-purpose computer, ENIAC2
, was
designed to compute artillery firing tables, although it was first used for compu-
tations regarding the hydrogen bomb. The army funded this $500.000 computer,
which became operational in 1946. The ENIAC had a remarkable size of 60 m3
and most of the programming was done by six women using patch cables and
switches. The ENIAC had a record uptime of five days and was taken out of
production in 1955. One of its main shortcomings was the low amount of mem-
ory to store programs, IBM cards had to be used as input instead.
With the first computers came the first extensive use of numerical models, such
as the Monte Carlo method. The use of a computer to study numerical models
was quickly adopted in astrophysics. In the 1950s the first astrophysical codes
were constructed to describe stellar structure (Heger et al., 2000), for example,
in 1956 a computer was used for the direct integration of the stellar structure
equations while fitting the boundary conditions (Haselgrove and Hoyle, 1956).
Different factors contributed to the fast development of computer science. The
invention of high-level programming languages made it evident for scientists
to write numerical methods. Most important were compiled languages such as
Fortran (1953) and C (1972), object orientated languages such as C++ (1983)
and Java (1994) and interpreted languages, for instance, Perl (1987) and Python
(1989). Another important factor was the development of software aimed at col-
laboration, ie. Apache’s Subversion and comment generators such as Doxygen
and Sphinx. Results could also be viewed in higher quality with the develop-
ment of graphical plotting programs, for example, gnuplot and matplotlib, and
visualization software such as OpenGL.
Perhaps the most important factor was the exponential growth of hardware
performance over time: the CPU transistor count (see Figure 1.1), hard drive
capacity, graphical cards, monitors, and memory. With this fast development
of computers — desktop machines as well as special purpose supercomputers
— simulations became more complex and gave a more accurate representation
of reality. This ultimately lead to an increase in popularity of computational
astrophysics (see for instance Figure 1.2, where the exponential growth of sci-
entific papers about n-body simulations is plotted).
2Electronic Numerical Integrator and Computer
4 CHAPTER 1. INTRODUCTION
Figure 1.1: Intel’s co-founder Gordon E. Moore described a trend in the tran-
sistor count on CPUs in a 1965 paper. The count doubled every two years and
Moore predicted that this trend would continue for at least ten years (Figure
from Intel, inc.).
Figure 1.2: The occurrence of the quoted text ”n-body simulation” in abstracts
of arXiv e-prints. Data for this graph was obtained using the Harvard abstract
server. This graph illustrates the growing popularity of numerical methods in
astrophysics.
1.2. CLUSTER EVOLUTION 5
1.2 Cluster evolution
In this section the properties of stellar clusters in general are described, followed
by an overview of the relevant literature, the most important results, how they
were obtained, and finally their similarities and differences will be discussed.
Globular clusters are relatively clean realizations of the classical n-body prob-
lem; they contain little gas or dust, they are relatively isolated in space, and
the stars are approximately in the same stage of evolution (McMillan, 2003).
Furthermore, the stars are relatively old, which weakens the effect of stellar
evolution on the dynamical evolution of the globular clusters. Open clusters are
”dirty” in the way that they do include gas and dust, are influenced by stellar
evolution of massive stars, and are affected by the galactic tidal field (McMil-
lan, 2003). It could be argued that globular clusters are very rare and are only
”clean” because they survived the ”dirty” processes that destroyed most of their
siblings (McMillan, 2003).
In the Milky Way there are in the order of 102
known globular clusters (Harris,
1996). The majority of galaxy clusters is located within 10 kpc of the galactic
center, but they are also found in the outer parts of the halo. Globular clusters
are the oldest objects in the galaxy; they consist of mainly old stars with the
same, low, metallicity and contain almost no gas and dust. The stars in these
clusters are at the same stage in stellar evolution, which can be an indication
that the stars have been formed at the same time. It is however unknown how
globular clusters form. The masses of the Milky Way clusters range from 103
M
to 2.2·106
M , which leads (based on the luminosity function) to a typical mass
of 2 · 105
M (Portegies Zwart et al., 2010).
Open clusters are formed in giant molecular clouds, they are loosely bound and
become disrupted by close encounters, both internally and with other clusters or
clouds (Karttunen et al., 2003); the clusters typically survive for ∼ 108
yr. The
stars roughly have the same age and metallicity, and their radiation pressure
eventually removes the gas remaining from the molecular cloud from which the
cluster was formed.
In this research project stellar clusters, consisting of ∼ 103
stars, are simulated.
Alternations take place in the presence of an initial mass function and/or stellar
evolution. Assumptions are made to secure more cost efficient simulations; the
cluster is considered to be isolated, thus ignoring tidal interactions and gravi-
tational shocks, and, in case of stellar evolution, the gas is instantly removed
without interaction with the stars in the cluster. Furthermore, the particles all
have zero radius, thus preventing collisions and mergers, are all assumed to be
zero age main sequence stars at the start of the simulation, and there is no gas
left from the molecular cloud from which the cluster originated.
Although these specific simulations are not intended to mimic the evolution of a
real stellar cluster, globular clusters are expected to behave more like the simu-
lations in which stellar evolution is turned off, while open clusters are expected
to show a similar behavior to the situation in which stellar evolution does take
place. The distinction between these two type of clusters is based on their size
and age; globular clusters consist of 105
, primarily old, stars, and the more
loosely bound open clusters typically contain ∼ 103
, mostly young, stars.
6 CHAPTER 1. INTRODUCTION
1.2.1 Brief overview of the relevant literature
Various processes are of importance when studying the numerical outcome of
(isolated) cluster simulations: relaxation, equipartition, core collapse, mass seg-
regation, binary formation, and mass loss. This section describes these cluster
evolution processes briefly.
Remnants of the dynamical process called core collapse, the core size becoming
(formally) zero and the density going to infinity, are observed as black holes in
the center of globular clusters, for instance in the M15 cluster (G¨urkan et al.,
2004).
In single-component systems, containing only equal mass stars, core collapse
is initially driven by the system its tension towards thermal equilibrium. A
thermal velocity distribution is obtained by small changes of the particles ve-
locity due to two-body interactions; a phenomenon called relaxation (Khalisi
et al., 2007). The relaxation time is the time needed to deflect the direction of
a star’s movement by 90 percent relative to its orbit (Khalisi et al., 2007). Av-
erage relaxation times for clusters range from 107
to 1010
years (Spitzer, 1987);
the dynamical evolution of a cluster is comparable to the relaxation time. A
single-component system reaches dynamical equilibrium on a crossing timescale:
tcr = (GM/R3
vir)−1/2
, where M is the total mass, G the gravitational constant,
and Rvir the virial radius: the radius within which the cluster is in virial equi-
librium (McMillan, 2003). Thermal evolution takes place on the relaxation
timescale, half mass relaxation time is given by trh ∼ (N/8 log Λ) tcr, where N
is the number of particles, and Λ ∼ 0.1N (Spitzer, 1987).
The system, however, cannot reach thermal equilibrium because of the finite es-
cape velocity (Quinlan, 1996); when stars escape the core must compensate for
the lost energy by contracting. Because of its contraction the core heats up and
energy is transfered to the surrounding stars. This causes further contraction,
generating more heat inside the core. This instability is called the gravothermal
catastrophe (Quinlan, 1996). When the system is near core collapse, the physics
becomes more complex: massive stars in the core can evolve, stars can merge,
and binaries can form inside the core (Quinlan, 1996).
Various numerical methods exist for the dynamical simulation of a stellar clus-
ter: direct or tree code n-body integrators, direct or Monte Carlo solutions to
the Fokker-Planck equation, and gaseous models. The core collapse is often
assumed to take place between 12 to 19 half-mass relaxation times (Quinlan,
1996). More specific, for a Plummer sphere, the well-known value of 10trh is
often used (G¨urkan et al., 2004).
If point masses are used the mergers and collisions can be ignored. Several pro-
cesses are left to be discussed, including: binary formation, mass segregation,
and stellar evolution. When binaries harden — become more strongly bound —
because of interaction with a third body, they can kick this star out of the core;
the binding energy of the core becomes smaller, causing the core to re-expand
in order to reestablish dynamical equilibrium (Makino, 1996). In this way hard
binaries, with a higher binding energy than the average kinetic energy of the
particles in the cluster, can stop core collapse.
When different masses are initialized using a simple two-component mass func-
tion or a power law mass distribution, a process called mass segregation will
become important. On their way to energy equipartition, more massive stars
will give some of their kinetic energy to stars with lower masses. This causes
1.2. CLUSTER EVOLUTION 7
the latter to gain velocity, and causes their orbits to widen. The former will lose
some of their kinetic energy, and will sink towards the center of the cluster; en-
ergy is thus transported outwards. Larger differences between the masses allow
a more efficient way of energy transport to the outer regions, and thus speed up
the core collapse. As the mass segregation is in progress, the density of the core
increases, leading to a shorter relaxation time. This leads to an increase in the
energy transfer rate (G¨urkan et al., 2004). When the higher-mass stars sank to
the center, and the less-massive stars moved to the outer regions, the cluster is
said to be segregated (Vesperini et al., 2009). Observational evidence for mass
segregation is found in, for example, the Trapezium cluster of Orion and in the
young open cluster NGC 6231 (Khalisi et al., 2007).
Some clusters seem to have segregated faster, based on their age, than predicted
by their segregation timescale. This lead to a new theory of primordial mass
segregation: massive stars are more likely to form in the center of star forming
regions (Vesperini et al., 2009). Mass segregation has a strong effect on the
dynamical evolution of a cluster; the timescale for core collapse is drastically
shortened.
Empirical studies of the outcome of n-body simulations show that the timescale,
of a two- component system, of mass segregation scales with 1/µ, where µ is the
mass of the high mass component divided by the mass of the low mass compo-
nent (Fregeau et al., 2002). The timescale for core collapse is also proportional
to 1/µ: tcc,µ ∝ 1
µ tcc,1, which is in line with simple theoretical arguments (Khal-
isi et al., 2007).
When a more realistic initial mass function (IMF) is used, ie. the Salpeter IMF
(see also Chapter 2.1.4), core collapse occurs after 0.1 trh(0), where trh(0)
is the initial half mass relaxation time (G¨urkan et al., 2004). This means that
dynamical evolution can be accelerated roughly by a factor 100 due to mass seg-
regation. For a star of mass m and a mean cluster mass < m > the segregation
timescale is tseg ∼ tR < m > /m, where tR is the relaxation time (McMillan,
2003).
In a semi-analytical paper, Hills (1980) shows that a cluster expands when
mass is removed and dissociates if more than half the mass is removed within a
crossing time, hereafter referred to as fast mass loss. After a fast removal of gas,
the system has to find a new radius that satisfies the virial theorem for the new
energy. In case of slow mass loss, long compared to the crossing time, the system
remains in virial equilibrium and no amount of mass loss can dissociate the sys-
tem; this type of mass loss is called adiabatic mass loss. Using the virial theorem
for an ideal gas (T0/V0 = −0.5, where T0 = M0 < V 2
0 > /2 is the kinetic energy
and V0 = −GM2
0 /(2R0) the potential energy) to obtain the velocity dispersion
(< V 2
0 >= GM0/(2R0)) and by comparison with the energy after fast mass loss
(E = −GM2
/(4R)) Hills found that R/R0 = (M0 − ∆M)/(2[M0/2 − ∆M]).
The equation for adiabatic mass loss is obtained by replacing ∆M with −dm
and (R/R0) by [(R + dr)/R]. After separation and integration the result is:
R/R0 = [M0/(M0 − ∆M)]. These results are similar to those found in binary
systems: Jeans mode mass loss in case of the adiabatic variant, and supernova
mass loss in case of the fast removal of gas. See also Chapter 2.3.4.
The work of Hills was refined by Boily and Kroupa (2003b), hereafter BK, who
showed, both semi-analytical and with n-body simulations, that dissociation
also depends on the initial mass function; up to 50 percent of the stars may
8 CHAPTER 1. INTRODUCTION
remain bound when the fraction of mass remaining in the cluster ( ) is smaller
than 1/2. BK find that Hills argument holds for clusters in virial equilibrium
that undergo a sudden mass loss. But Hills’ paper fails to explain the obser-
vational evidence of bound stellar clusters from which 70 percent of the mass,
in the form of the molecular cloud, was removed from the system. They argue
that a stellar cluster will survive mass loss of more than 60 percent if the stellar
velocity distribution favors stars with low velocities. This is the case for a mass
distribution with a massive core and high-binding energy. They found that, in
case of a Plummer distribution, the fraction of bound stars drops very rapidly
around = 0.44 and after 0.4 no stars remain bound.
The papers by BK and Hills were intended for mass loss by the removal of the
gas from which the cluster originated, but might as well be applied to simula-
tions in which the molecular cloud is already removed at t = 0. In this case the
system would dissolve if roughly half or more of the mass is lost by the evolution
of massive stars. This means that mass loss, and the possible dissociation that
goes with it, is only important during the early stages of dynamical evolution
due to the short lifetime of massive stars. Mass loss can significantly slow down
core collapse, or prevent core collapse from taking place. In segregated clusters
mass loss by stellar evolution causes a stronger expansion than for unsegregated
clusters; strongly segregated clusters may therefore dissolve rapidly (Vesperini
et al., 2009).
What follows is a brief description of the methods and results in important
papers regarding the combination of stellar dynamics and stellar evolution. Ap-
plegate (1986) argued that, if the mass distribution allows enough massive
stars, the combination of mass segregation and stellar evolution will dissolve
the cluster before core collapse. A cluster without massive stars will undergo a
rapid core collapse instead. More specific, Applegate found that mass functions
with a steeper slope than N(m) ∝ m−2
collapse rapidly; note that the Salpeter
IMF has a slope of −2.35. Applegate used a relatively low upper mass cutoff:
15 mass groups were made ranging from 4M to 0.354M .
Chernoff and Weinberg (1990), hereafter referred to as CW, used a more so-
phisticated method to confirm and refine Applegate’s findings. CW used a
Fokker-Planck equation with a simplified description of stellar evolution, a ta-
ble of initial and final masses from which they linearly interpolated the initial
masses, to simulate initially unsegregated models initialized according to the
King model. They used initial stellar masses ranging from 0.4M to 15M dis-
tributed with the power law slopes 1.5, 2.5, and 3.5. They find that ”mass loss
during the first 5 · 109
yr is sufficiently strong to disrupt weakly bound clusters
with a Salpeter IMF”.
Fukushige and Heggie (1995), hereafter FH, used the same table for stellar
evolution to investigate the evolution of the same King models and power law
slopes for the IMF. The difference is that FH used a second-order n-body inte-
grator with predictor-corrector scheme and shared, constant, time step (see also
Chapter 2.2). The lost mass is assumed to leave the cluster without interaction.
Their results are qualitatively in agreement with CW, although FH do obtain
longer, sometimes in the order of a magnitude, lifetimes for disrupted systems.
Portegies Zwart et al. (1998) used a more sophisticated treatment of stellar
dynamics, with a fourth-order Hermite integrator with individual time steps
(see also Chapter 2.2) running on a GRAPE-4 cluster (see also Chapter 2.2.5),
1.3. PROBLEM DEFINITION 9
and stellar evolution, with fitting formula based on detailed models by Eggle-
ton. Qualitative agreement is made with the FH model, but the papers are
in disagreement about the lifetime of dissolving clusters: the FH model has a
shorter lifetime by roughly a factor 20.
Vesperini et al. (2009) use the starlab package, an all in on multi-physics
package, to investigate the influence of mass segregation on stellar dynamics
combined with stellar evolution. Mass is extracted with scaled Plummer mod-
els; the scale radius is set smaller than the radius of the original cluster. Sub-
tracting mass from a segregated cluster leads to earlier expansion than in the
non-segregated case; mass segregation thus has a destructive impact on the
dynamical evolution of a stellar cluster.
1.3 Problem definition
Simulations of stellar clusters that incorporate stellar evolution usually use all-
in-one software packages. In general the stellar dynamics code is extended to
include stellar evolution. In this research project a new, modular based, software
framework called AMUSE will be used to combine these different astrophysical
domains (see also Chapter 2.1.1). AMUSE is fairly new; the incorporation of
stellar evolution has not yet been fully tested. First, dynamical evolution takes
place over a certain time step ∆t, after which the particles are synchronized (by
the n-body integrator), followed by an instant step of stellar evolution. This
process repeats itself until t = tend. The question is whether stellar clusters
converge to, qualitatively, the same evolutionary outcome for different time
steps. This could be tested for segregated and unsegregated stellar clusters
because of the significant impact on the dynamical evolution imposed by such
segregation. Furthermore, another variable that needs to be tested is the density
of the cluster; a higher density speeds up the evolution, and a different time step
might be required for an accurate simulation.
Because the dynamical evolution of stellar clusters is very complex, a binary
system will be studied first. The development of the semi major axis, and
eccentricity, over time will be compared in models with different mass loss rates
and time steps, varying from adiabatic limit, to the limit in which the time step
is much larger than the binary period. Particularly interesting could be the case
in which the mass loss takes place with the same step as the binary its period.
Around core collapse, the number of binaries near the center of a stellar cluster
suddenly increases. The influence of the time step on binary evolution can
therefore also be important for cluster evolution. There also might be a certain,
useful, analogy between binary simulations and cluster simulations.
However, because AMUSE is fairly new, the software framework needs to be
tested first: a qualitative comparison with well known results from the past is
needed.
10 CHAPTER 1. INTRODUCTION
Chapter 2
Methods
The simulations in this research project include stellar dynamics combined with
stellar evolution. The main program used for stellar dynamics was the phi-
GRAPE program on the GPU. This direct n-body integrator follows the fourth
order Hermite predictor-corrector integration scheme with blocked time steps.
Furthermore, BHTree was used as a computationally cheap method to test the
calculations of various diagnostics. Both methods, as well as special purpose
hardware, are explained in Chapters 2.2.1 and 2.2.2 respectively. However, be-
fore the n-body simulations can take place, the cluster first has to be initialized.
This is done using the Plummer sphere (Chapter 2.2.3) and the Salpeter initial
mass function (2.2.4). Special purpose hardware, the GPU, is used to calculate
parts of the Hermite integration scheme. Because phiGRAPE was originally
designed to run on a GRAPE cluster, both types of hardware are discussed in
Chapter 2.2.5.
Mass loss is also investigated in binary systems. The binary simulations were
done using the twobody program. Twobody uses analytical formulae based on
the extension of Kepler’s equations in order to apply them to non-elliptic orbits.
The twobody program is further explained in Chapter 2.2.6.
The Single Star Evolution (SSE) program by Onno Pols is used to simulate
stellar evolution. SSE is based on fitting functions of detailed models. First a
quick overview of stellar evolution, and the assumptions that can be made to
speed up numerical methods, are given, and then the SSE program is explained
in more detail (Chapter 2.3.5).
Mass loss plays a big role in this research project, both in binary systems and in
stellar clusters. In Chapter 2.3.3 and 2.3.4 it is explained where (evolutionary
wise), and on which timescale, the mass loss occurs.
Finally, multi-physics software is needed to study the problem defined in Chap-
ter 1.3. The modular based AMUSE framework was chosen and will be further
explained in Chapter 2.1.1.
2.1 Multi-physical software
The Universe is a multi-physical environment in which astrophysical problems
occur on multiple scales. Stellar dynamics, radiation transfer, stellar evolution,
and hydrodynamics all have to be considered in a realistic simulation of, for
12 CHAPTER 2. METHODS
example, a stellar cluster. Scales may vary from 104
m and 10−3
s to 1020
m
and 1017
s (Portegies Zwart et al., 2009).
Different approaches can be considered when incorporating such a multi-scale,
and multi-physics, environment into a numerical model. First there is the mono-
lithic approach, a program that first simulates one part of astrophysics, for in-
stance stellar dynamics, is extended to cover another field, for example stellar
dynamics. This approach has proven to have several disadvantages: resulting
packages are often large, prone to errors, suffer from bugs, are rarely docu-
mented, have sections of dead code, and lack homogeneity (Portegies Zwart
et al., 2009).
The software package AMUSE1
was created to address these problems. It uses
a modular approach: existing, and therefore well documented and tested, pack-
ages are wrapped in an interface layer and combined into a larger framework
(Portegies Zwart et al., 2009). The AMUSE package will be described further
detail in the following section.
A modular approach has various advantages. Different packages from within the
same domain can be combined with packages from other astrophysical domains,
and also new modules can be incorporated, without having to understand the
framework in detail. The barrier to use the modular framework is therefore also
low, because less understanding of the framework is required compared to the
monolithic approach.
2.1.1 AMUSE
Figure 2.1: AMUSE is designed
to work in 3 layers. (Figure
from amusecode.org)
AMUSE was first developed during various
MODEST2
workshops and the first lines of
code were written in 2006. Current develop-
ment is done at the Leiden Observatory and
funding is provided by a NOVA grant.
The AMUSE architecture is based on a 3 layer
design (see Figure 2.10): a user script layer,
an AMUSE code layer, and a legacy code
layer. Each layer adds functionality to a lower
layer. The legacy code layer consists of the
existing astrophysical software packages and
has a built in functionality to communicate
amongst these packages. The AMUSE code
layer provides an object orientated interface
to the legacy layer and offers extra function-
ality in the form of modules, such as, unit
conversion, file handling, initialization of stel-
lar dynamical code through a Plummer sphere
and/or a Salpeter mass function. The extra
functionality also include various functions to, for instance to compute the ki-
netic energy and the potential. The communication between the AMUSE layer
and the legacy layer is based on the MPI3
framework, a widely used communi-
cation protocol for parallel computing. Finally, the user script layer consists of
1AMUSE is an abbreviation of Astrophysical MUltipurpose Software Environment
2MODEST is short for MOdeling DEnse STellar systems.
3MPI is an abbreviation of Message Passing Interface
2.2. STELLAR DYNAMICS 13
one or more Python scripts which evaluate certain astrophysical problems.
module reference lang. brief description
bhtree Barnes and Hut (1986) C++ Barnes-Hut tree code
hermite0 Hut et al. (1995) C++ Direct n-body integrator
with shared, but variable,
time step.
phiGRAPE Harfst et al. (2007) F77 Direct n-body integrator
with individual, blocked,
timestep. Specialized to run
on a GRAPE cluster.
twobody Bate et al. (1971) Python Semi analytical code based
on Kepler’s laws
smallN C++ Direct integrator for few
body systems.
sse Hurley et al. (2000) F77 Stellar evolution based on
analytical formulas fitted to
detailed models.
bse Hurley et al. (2002) F77 Binary evolution algorithm.
evtwin Eggleton (2006) F77 Detailed stellar evolution
model.
fi Pelupessy et al. (2004) F90 Parallel code for galaxy sim-
ulations.
capreole F90 Grid hydrodynamics code
by Garrelt Mellema.
Table 2.1: Modules currently implemented in AMUSE.
2.2 Stellar dynamics
To predict the position and velocity of a set of n particles at any given time
(the n-body problem), based on Newton’s law of universal gravity, the equation
of motion needs to be solved with a given initial position and velocity
ai = G
j=i
mj
rij
r3
ij
i = 1, 2, ..., n (2.1)
where ai is the acceleration of particle i, G the gravitational constant (which is
set to one in n-body units, together with the initial total mass), mj the mass
of particle j, and rij the distance between particles i and j.
There are two popular types of numerical methods to approximate this equation.
One involves direct summation and the computing speed scales with N2
, where
N is the number of particles; this method is used for dense clusters and can
simulate up to ∼ 106
particles on special purpose hardware (Portegies Zwart
et al., 2009). The other method uses a tree code and scales with N log N. This
method can be used for a larger number of particles, but is significantly less
accurate than the direct method (Spurzem, 1999).
14 CHAPTER 2. METHODS
2.2.1 Hermite integration scheme
In case of direct summation a popular integration method, due to the rela-
tively small number of scalar operations, is the fourth-order Hermite predictor-
corrector integrator with block time steps (Makino and Aarseth, 1992). Each
particle has its own position (ri), velocity (vi), acceleration (ai), jerk (˙ai), time
(ti), and timestep (∆ti). The integration proceeds along the following steps
(1) The initial time steps can be set using a simple formula
∆ti = ηs
|ai|
|˙ai|
(2.2)
Where ηs = 0.01 usually gives sufficient accuracy (Harfst et al., 2007).
(2) The global time t is set to the time corresponding to the particle with
the minimum time ti + ∆ti.
(3) The position and velocity of all the particles are predicted using a Taylor
expansion
rp,j = rj + (t − tj)vj +
(t − tj)2
2
aj +
(t − tj)3
6
˙aj (2.3)
vp,j = vj + (t − tj)aj +
(t − tj)2
2
˙aj (2.4)
(4) With the predicted velocity and position, the acceleration and jerk of particle
i at global time t is calculated using
ai = G
j=i
mj
rij
(r2
ij + 2)3/2
(2.5)
˙ai = G
j=i
mj
vij
(r2
ij + 2)3/2
+
3(vij · rij)rij
(r2
ij + 2)5/2
(2.6)
where is the softening parameter. This parameter is used to prevent the ac-
celeration and jerk from going to infinity. This parameter should have a small
value to keep the simulations realistic.
(5) The position and velocity are corrected with the higher order Taylor ex-
pansion
ri = rp,i +
∆t4
i
24
a
(2)
0,i +
∆t5
i
120
a
(3)
0,i (2.7)
vi = vp,i +
∆t4
i
6
a
(2)
0,i +
∆t5
i
24
a
(3)
0,i (2.8)
a
(2)
0,i =
−6(a0,i − a1,i) − ∆ti(4˙a0,i + 2˙a1,i)
∆t2
i
(2.9)
a
(3)
0,i =
12(a0,i − a1,i) + 6∆ti(˙a0,i + ˙a1,i)
∆t3
i
(2.10)
where a
(2)
0,i and a
(3)
0,i are the second and third time derivative of the acceleration at
ti, respectively. These are obtained by inversion of the Taylor expansion of a0,i.
2.2. STELLAR DYNAMICS 15
The quantities a
(2)
1,i and a
(3)
1,i are the time derivatives at ti +∆ti, and ∆ti = t−ti.
(6) Recalculate the timestep using the standard formula (Aarseth, 1985).
∆ti = η
|a1,i||a
(2)
1,i | + |˙a1,i|2
|˙a1,i||a
(3)
1,i | + |a
(2)
1,i |2
(2.11)
In case the simulation runs on a GRAPE cluster, the particles should be grouped
using a block time step in favor of a better performance (Harfst et al., 2007).
The timestep is then replaced by ∆ti,b = (1/2)n
, where n is chosen with the
following condition
1
2
n
≤ ∆ti ≤
1
2
n−1
(2.12)
(7) Start over from step (2)
When diagnostics of the cluster are calculated the particles have to be syn-
chronized to global time t. To do this the position and velocity of all particles
have to be predicted in order a(3)
. Since this was already calculated during the
time step calculation, all that needs to be done is storing these values.
2.2.2 Tree codes
Figure 2.2: Tree code: splitting the cells
(two dimensions).
In the tree code method a cell is fit
around all the particles. This root
node contains more than one particle
and is further split into 8 child nodes.
This operation is recursive and is re-
peated until all particles have their
own cell (the leaf nodes), as is illus-
trated in Figure 1.3.
The force calculation proceeds as fol-
lows: if the size of a cell is given by l
and the distance to the center of mass
of the cell is given by d, then the parti-
cles are grouped when l/d < θ. Here
θ is the opening angle, and is often
set to a value around unity (Aarseth,
2003). When l/d > θ the cell is split
into eight cells, recursively repeated
until all particles are included.
A tree code reduces the complexity
from the direct summation method
O(N2
) to O(N log N). This comes at a price, the tree code method is sig-
nificantly less accurate then the direct integration method (Spurzem, 1999).
The accuracy can be improved by reducing the value of θ, but when limθ→0 the
complexity increased to O(N2
), with additional costs for memory storage.
16 CHAPTER 2. METHODS
2.2.3 Plummer model
H.C. Plummer found a density distribution to fit the arrangement of observed
globular clusters (Plummer, 1911). This density distribution was later called
the Plummer model and is often used in computer models to obtain an initial
density distribution of a stellar cluster. Although the model is not representing
any actual class of stellar clusters accurately, it is a frequently used test case
(Harfst et al., 2007).
Figure 2.3: A 10,000 particle Plummer sphere: random positioned particles, of
equal mass, in compliance with Plummer’s density profile. Left panel: density
profile. With increasing distance from the core, the density eventually drops as
r−5
. Right panel: particle position.
The Plummer density distribution is found by solving the analytical n = 5 case
of the Lane-Emden equation (2.14). This equation is used when the equation of
hydrostatic equilibrium (2.13) is solved for a polytrope, a star with an equation
of state of P = Kρ(n+1)/n
, where P is the pressure, ρ the density, and n the
polytropic index:
dP
dr
= −
GMρ
r2
(2.13)
d
dr
Kr2
(n + 1)
nρ(n−1)/n
dρ
dr
= −4r2
Gρ (2.14)
With the boundary conditions ρ(0) = ρc and ρ(R) = 0 and by rewriting the
Lane-Emden equation in dimensionless form, the equation of hydrostatic equilib-
rium can be solved — either numerical or analytical. Rewriting in dimensionless
form is done with ρ = λθn
and r = αζ, where
α =
(n + 1)Kλ1/n−1
4πG
1/2
Substituting into the Lane-Emden equation gives
1
ζ2
d
dζ
ζ2 dθ
d
+ θn
= 0 (2.15)
2.2. STELLAR DYNAMICS 17
The n = 5 solution is given by
θ =
1
1 + 1
3 ζ2
(2.16)
It can be shown that the total mass has a finite value (Aarseth, 2008), which
gives the following density distribution (the Plummer model) and corresponding
potential:
ρ(r) =
3M
4πa3
1 +
r2
a2
−5/2
(2.17)
Φ(r) = −
GM
√
r2 + a2
(2.18)
Where a is the Plummer radius: a parameter which determines the size of the
core.
2.2.4 Salpeter initial mass function
An initial mass function can be used to assign masses to the particles involved
in a n-body simulation. Based on observations it turned out to be convenient
to express the mass distribution of a stellar cluster in the form of a power law:
M−α
∝ N(M)dM (2.19)
Using the observed luminosity function of solar neighborhood main sequence
stars, the parameter α was determined to be 2.35 (Salpeter, 1955). The masses
are restricted to a range between 0.1M and 100M , a lower mass star will
become degenerate before it can ignite hydrogen, while a higher mass star would
exceed the Eddington luminosity.
Figure 2.4: Left panel: Number of particles vs. mass using 10,000 particles
with random masses fitting the Salpeter mass function. Right panel: the result-
ing mass distribution obtained by applying the Salpeter mass function to the
Plummer sphere in the previous section.
18 CHAPTER 2. METHODS
2.2.5 Special purpose hardware
Figure 2.5: Basic concept of the
GRAPE-1 and GRAPE-3 special pur-
pose computers (Makino et al., 1997).
(Figure from J. Makino)
The GRAPE4
system was designed to
accelerate the expensive O(N2
) direct
summation force calculations. The
first GRAPE was built at the Tokyo
University in 1989, and had a perfor-
mance of 240 MFLOPS5
at single pre-
cision, while being more cost efficient
than general purpose computers with
the same performance (Makino et al.,
1997). Its successor, GRAPE-2, ran
at 40 MFLOPS, but at double pre-
cision. Subsequently, the odd num-
ber GRAPEs have single precision,
while the even numbered GRAPEs
have double precision. The GRAPE-3 was the first with a custom designed
gravity chip and ran at a speed of 15 GFLOPS (Makino et al., 1997).
The basic concept is that a general purpose computer sends the mass and posi-
tion to the GRAPE, where the acceleration (1.5), jerk (1.6), and potential are
calculated on a force computation pipeline6
. The results are then send back to
the host computer.
The GRAPE-4 was completed in 1995, it included a predictor pipeline in order
to do Hermite individual time step calculations. It was the first computer to
break 1 TFLOPS. In 2001 the GRAPE-6, with more pipelines and processor
chips then its predecessor, was completed and its performance peaked at 64
TFLOPS (Makino et al., 2003).
Figure 2.6: The four-cabinet GRAPE-4 system. (Image from J. Makino)
4GRAPE is an acronym for GRAvity PipE
5FLOPS is an acronym for FLoating point Operations Per Second.
6A pipeline is a series of data processing elements in which the output of one element is
the input for the next.
2.2. STELLAR DYNAMICS 19
A GPU7
is designed to do vector calculations and is therefore, in theory, very
suitable for force calculations. In 2007 NVIDIA released CUDA8
: a parallel
computing architecture that can be used to write software for the GPU with a
range of standard high-level programming languages. CUDA was used to write
the Sapporo library in order to run gravitational n-body simulations on a GPU.
This library is very similar to the GRAPE-6 library and therefore programs that
were previously running on a GRAPE-6 system could run on the GPU without
changing the source code (Gaburov et al., 2009).
With a GRAPE-6 or GPU the (individual, blocked time step) integration pro-
ceeds as followed:
(1) The system is initialized on the CPU9
: each particle gets its own mass,
position, velocity, acceleration, jerk, time, and time step.
(2) The CPU produces a list of particles to be integrated at the current time step.
(3) The CPU predicts the position and velocity of one of these particles and
sends the result to the GPU/GRAPE-6, where the new time is stored in a reg-
ister.
(4) The GPU/GRAPE-6 predicts the position and velocity of all other par-
ticles at that specific time.
(5) The GPU/GRAPE-6 computes the force from all the other particles and
sends the result to the CPU. Steps (3)-(5) are repeated until all particles in the
list are done.
(6) The global time is updated and the procedure is repeated from step (2)
Figure 2.7: The GeForce GT340 PCI express card by NVIDIA. Force and pre-
dictor calculations are done on the GPU, located under the cooler. (Image from
NVIDIA, inc)
7GPU is short for Graphics Processing Unit.
8CUDA is an acronym for Compute Unified Device Architecture.
9CPU stands for Central Processing Unit.
20 CHAPTER 2. METHODS
2.2.6 Universal variable formulation
The universal variable formulation is a method to solve Kepler’s two-body prob-
lem for elliptic, hyperbolic, and parabolic orbits. The twobody program, used
for the binary simulations, incorporates the analytical formulae based on this
method. At any time t, velocity (v(t)) and position (r(t)) need to be calculated
given the specific initial conditions v(t0) and r(t0). This is done by solving the
equation of motion:
∂2
r
∂t2
+
µ
r3
r = 0, (2.20)
where µ ≡ G(m1 +m2). It is then convenient to introduce the universal variable
s, which fulfills the following equation (Danby, 1992):
∂s
∂t
=
1
r
(2.21)
Substituting the universal variable into the equation of motion gives the follow-
ing equation.
∂2
r
∂s2
+
µ
a
r = −P, (2.22)
where P is a constant and a is the semi major axis. Deriving both sides to d/ds
gives a differential equation with the following set of solutions (Danby, 1992).
t − t0 = r0 s c1(αs2
) + r0
∂r0
∂t
s2
c2(αs2
) + µs3
c3(αs2
), (2.23)
where α = µ/a and the function cn is called the Stumpff function (Danby,
1992): cn(x) = i(−1)i
xi
/(n+2i)!. The value of s at time t can now be solved
numerically. Position and velocity at time t can then also be found:
r = r0f(s) + v0g(s) (2.24)
v = r0
˙f(s) + v0 ˙g(s) (2.25)
where the functions f(s) and g(s) are given by (Danby, 1992)
f(s) = 1 −
µ
r0
s2
c2(αs2
) (2.26)
g(s) = t − t0 − µs3
c3(αs2
) (2.27)
˙f = −
µ
rr0
s c1(αs2
) (2.28)
˙g = 1 −
µ
r
s2
c2(αs2
) (2.29)
2.3. STELLAR EVOLUTION 21
2.3 Stellar evolution
To determine the evolution of a single star, the following set of 4+N differential
equations (Pols, 2007) need to be solved simultaneously for a certain given
equation of state (P = P(ρ, T, Xi)).
Mass conservation:
∂r
∂m
=
1
4πr2ρ
(2.30)
Hydrodynamic changes:
∂P
∂m
= −
Gm
4πr2
−
1
4πr2
∂2
r
∂t
(2.31)
Thermal changes:
∂l
∂m
= nuc − ν − T
∂s
∂t
(2.32)
Energy transport:
∂T
∂m
= −
Gm
4πr4
T
P
(2.33)
with =
rad = 3κ
16πacG
lP
mT 4 , if rad ≤ ad
ad + ∆ , if rad > ad
Composition changes:
∂Xi
∂t
=
mi
ρ
∂ni
∂t nuc
[+ mixing terms] (2.34)
with i = 1, 2, 3, ... N
Where r is the radius, m the mass, ρ the density, P the pressure, G the grav-
itational constant, t the time, l the luminosity, nuc the energy generated by
nuclear reactions, ν the energy losses caused by neutrinos, T the temperature,
s the entropy, the temperature gradient in either the energy transport by
radiation or by convection, κ the opacity, a the radiation constant, c the speed
of light, ∆ the superadiabaticity of the temperature gradient, Xi the fraction
of element i, mi the mass of element i, ni the number density of element i, and
the ’mixing terms’ represent the redistribution of the composition in convective
regions (Pols, 2007).
P, s, κ, rad, ∆ , nuc, ν, and the reaction rate ∂ni
∂t can all be expressed as func-
tions of ρ, T, and Xi (Pols, 2007). This means there are 4+N unknown variables
left: r, l, ρ, T, and Xi, which can all be written as function of the independent
variables m and t. Therefore each of these variables has to be set at the bound-
aries m = 0 and m = M. Initialization of the variables is needed at t = t0.
2.3.1 Timescales of stellar evolution
Hydrodynamical changes, disruption of the balance between gravity and pres-
sure (gas and radiation), of star’s structure occur on the dynamical timescale
(τdyn). This timescale is the same as the time it would take for a mass shell, on
distance R, to reach the center when radiation and gas pressure are suddenly
removed. The speed at which the shell moves inwards is approximately the
same as the free-fall velocity. This results in the following expression for the
dynamical timescale
τdyn ≈
R3
GM
(2.35)
22 CHAPTER 2. METHODS
The dynamical timescale of the Sun is around 5000 seconds.
Changes in the thermal structure of a star occur on the so called Kelvin-
Helmholtz timescale (τKH). This time is the same as a star its lifetime in case all
energy is being produced by contraction. With the virial theorem, the relation
between internal and gravitational energy, for an ideal gas (Eint/Egr = −1/2),
the thermal timescale can be expressed as
τKH =
Eint
L
=
Egr
2L
≈
GM2
2RL
(2.36)
The thermal timescale of the Sun is approximately 15 million years.
Changes to a star its composition occur on the nuclear timescale (τnuc), which
is the same as the lifetime of a star if all energy produced would come from
nuclear reactions.
τnuc =
Enuc
L
= A
Mc2
L
, (2.37)
where A is determined by the fraction of available fuel that is converted into
energy. The thermal timescale of the Sun is in the order of 1010
years (Pols,
2007). In conclusion, it can be stated that: τnuc τKH τdyn.
Significant mass loss usually occurs on the thermal and dynamical timescale,
and is therefore rather abrupt compared to the nuclear, main sequence (MS),
timescale. See also Chapter 2.3.3 and 2.3.5.
2.3.2 Assumptions
Detailed stellar structure programs try to solve the above set of stellar evolu-
tion equations (2.20 to 2.24) with as few assumptions as possible. However, such
calculations are computational expensive, certainly when a lot of stars have to
be evolved at the same time, as in the evolution of the individual stars in a
stellar cluster. Various assumptions, to accelerate these expensive equations,
are described below.
MS stars are close to thermal equilibrium (TE), because the energy loss on the
surface, the luminosity, is compensated by the energy generated by the nuclear
fusion in the core. MS stars are also in hydrostatic equilibrium (HE), if they
were not this would result in a dramatic evolution: an implosion or explosion on
the dynamical timescale. In case of HE and TE the time derivatives in equation
(1.21) and (1.22) vanish. Therefore the only time derivative left is the one that
describing the composition changes, which occur on the nuclear timescale.
The mechanical equations (1.20 and 1.21) can be decoupled in case of a poly-
tropic equation of state: P = Kργ
, where K and γ = 1+1/n are constants. For
these polytropes the equation of hydrostatic equilibrium can be approximated
by the numerical solutions to the Lane-Emden equation (1.14). Degenerate
stars — neutron stars (n = 3) and white dwarfs (n = 3/2) — comply to such a
temperature independent equation of state. In this case K is a fixed parameter
(Kippenhahn and Weigert, 1994). If a MS star is approximated by an Ideal gas
equation of state, then modeling can be done using a n = 3 polytrope, where K,
in this particular situation, is a free parameter (Kippenhahn and Weigert, 1994).
2.3. STELLAR EVOLUTION 23
Another considerable simplification of the stellar evolution equations is the con-
cept of homology. When two stars, scaled to the same radius, have the same
mass profile, they are said to be homologous:
r1(x)
R1
=
r2(x)
R2
, where x =
m1
M1
=
m2
M2
(2.38)
This offers the opportunity to describe one star using detailed stellar models,
while all the homologous stars can be described using analytical scaling rela-
tions. However, the conditions for homology are limited, see also Chapter 2.3.5.
Further simplifications can be made, for instance, the computational expen-
sive mixing terms can be ignored. The same can be done with the neutrino
losses during MS, because these losses only become important in the late stages
of evolution (Pols, 2007). The superadiabaticity, the difference between the ac-
tual temperature gradient and the adiabatic temperature gradient in convective
regions, can also be ignored; it can be shown that only a tiny superadiabatic-
ity is needed to transport heat in convective regions (Pols, 2007). Finally, the
opacity, in the energy transport equation, can be approximated with a power
law: κ = κ0ρa
Tb
, where a = 1 and b = −3.5 in case of Kramer’s opacity law
(Pols, 2007).
2.3.3 Mass loss (Single star evolution)
Mass loss can have a substantial impact on stellar evolution, especially for mas-
sive stars (M 15M ), where mass loss by stellar wind is important during
all stages of evolution. The mechanisms responsible for mass loss are not well
understood, and can therefore impose a considerable uncertainty on the stellar
evolution models.
Various occurrences of mass loss will be described in the following section at the
hand of evolutionary tracks of a low, and an intermediate-mass star.
Evolutionary tracks can be constructed using either detailed models or models
using fitting formulae (Chapter 2.2.5). The evolutionary tracks of low mass stars
(< 2M ) are significantly different from that of high (> 8M ) and intermediate-
mass stars. See also Figure 2.9.
During the MS (Figure 2.9, points A to B) all stars evolve towards a higher lumi-
nosity. Low mass stars also evolve towards a higher temperature, while high, and
intermediate, mass stars evolve towards a lower temperature. Once the hydrogen
in the core is exhausted, at point B, the core starts contracting. High and inter-
mediate mass stars with a convective, well mixed, core suddenly find themselves
without fuel for hydrogen fusion and start contracting on a thermal timescale.
These stars therefore show a hook feature. When the temperature in the shell is
high enough to ignite hydrogen, the hydrogen shell burning starts. This transi-
tion is smooth for low mass stars. During hydrogen shell burning stars move, at
almost constant luminosity, towards a lower temperature on a thermal timescale.
During this phase the shell keeps on adding mass to the core, which is still con-
tracting. While the core contracts, the outer layers expand, thus making the
shell act like a mirror. The outer layers cool, and the convective region grows.
When stars have a deep convective envelope they move in a direction of higher
24 CHAPTER 2. METHODS
Figure 2.8: Evolutionary tracks of a 5M (left panel) and a 1M star (right
panel) using a solar-like metallicity (Z = 0.02). See text for more information.
(Figure from Onno Pols)
luminosity along the Hayashi line: an almost vertical (and thus temperature in-
dependent) line, representing the location of fully convective stars in the HRD.
Figure 2.9: Various regions
in the Hertzsprung-Russell Di-
agram (HRD).
It is during this particular phase, where the
stars are close to the Red Giant Branch
(RGB), that significant mass loss occurs in
low mass stars. See also Table 2.1.
Along the RGB the radius of the envelope
increases further, making it loosely bound.
It therefore becomes easier to remove mass
by radiation (Pols, 2007). The rate of mass
loss during the RGB is often calculated with
the empirical law by Reimers (Kudritzki and
Reimers, 1978):
˙M = −4 · 10−13
η
L
L
R
R
M
M
M /yr(2.39)
where η is often set to a value of order unity.
Helium core burning starts when the tempera-
ture of the core reaches the appropriate value.
Low mass stars ignite helium, in a degenerate
core, in a runaway process called the helium
flash (point F). Intermediate and high mass
stars ignite helium in a non degenerate core,
resulting in a loop on the Horizontal Branch (HB). When the hydrogen in the
core is exhausted, the process of contraction occurs again, but this time helium
is ignited in a shell. The stars cool along the Asymptotic Giant Branch (AGB),
where both helium and hydrogen shell burning occur at the same time. The
stars in Figure 2.7 are on the AGB from point H to J. This is another phase of
significant mass loss. See also Table 2.1.
2.3. STELLAR EVOLUTION 25
During the AGB phase thermal pulses in radius and luminosity occur due to
the instability between the helium and hydrogen shell burning. It is believed
that these pulses, together with the radiation pressure on dust particles in the
atmosphere, are the source of the mass loss (Pols, 2007). The observational-
determined mass loss rates vary from ∼ 10−7
M /yr to ∼ 10−4
M /yr.
For massive stars (M 15M ) mass loss caused by stellar wind becomes im-
portant in all evolutionary phases (Pols, 2007). Stars with M 30M have a
mass loss timescale that is shorter than the nuclear timescale, therefore mass
loss has a substantial impact on their evolution (Pols, 2007). These stars have
an evolution in which mass loss will remove the envelope before the Hayashi line
is reached (in which case they would be classified as a Red Super Giant). For
massive stars, mass loss caused by the stellar-wind mechanism, can be approx-
imated with the following empirical relation by De Jager (Nieuwenhuijzen and
de Jager, 1990):
log(− ˙M) ≈ −8.16 + 1.77 log
L
L
− 1.68 log
Teff
K
M /yr (2.40)
The two empirical relations above indicate that, in general, mass loss (during
all evolutionary phases) becomes more important at increasing stellar mass.
2.3.4 Mass loss II (Binary evolution)
Mass transfer in a binary system can take place in a conservative (conserved
mass and momentum) or non-conservative (mass and momentum loss) manner.
Observations show evidence for both cases of mass transfer. Three cases of mass
loss will be described in further detail: mass loss through a fast stellar wind from
the donor star, mass loss by the ejection of matter from the accreting star in
the form of a jet, and supernova mass loss.
In case of a circular orbit, the orbital angular momentum of a binary system is
given by the following equation (Verbunt, 2007)
J2
= G
M2
1 M2
2
M1 + M2
a (2.41)
Where a is the semi major axis. A generalized equation for the case of mass
transfer can be obtained by differentiating the above equation.
2
˙J
J
=
˙a
a
+ 2
˙Md
Md
+ 2
˙Ma
Ma
−
˙Md + ˙Ma
Md + Ma
(2.42)
Where Ma is the mass of the accretor, and Md the mass of the donor. In case
of conservative mass transfer ˙J = 0 and ˙Ma = − ˙Md and hence
˙a
a
= 2
Md
Ma
− 1
˙Md
Md
(2.43)
This means that the orbit will shrink as long the donor has a higher mass than
the accretor and will expand otherwise. In case of non-conservative mass trans-
fer only a fraction of the matter is absorbed by the accretor: ˙Ma = −β ˙Md. If γ
26 CHAPTER 2. METHODS
times the specific angular momentum of the binary is the specific angular mo-
mentum loss due to mass loss (hloss = γh), then it can be shown that (Verbunt,
2007)
˙a
a
= −2
˙Md
Md
1 − β
Md
Ma
− (1 − β)(γ +
1
2
)
Md
Md + Ma
(2.44)
In case of Jeans mode mass loss, driven by a fast stellar wind, the mass from
the donor leaves the binary system without interaction with the accretor. This
means that hloss = a2
dω, where ad = aMa/(Md + Ma). It can be shown that in
this case γ = Ma/Md and finally
˙a
a
= −
˙Md
Ma + Md
(2.45)
Where ˙Md < 0 implies that ˙a > 0, and hence the orbit expands during Jeans
mode mass loss.
When the accretor cannot accept the mass from the donor, because of a spin-up
or a large Lacc, the excess mass will be ejected. This happens usually in the
form of a jet. In this case the mass leaves the system with the specific angular
momentum of the accretor (hloss = a2
aω) and it turns out that
˙a
a
=
˙M
M
2M(Md − Ma) − MdMa
MdMa
(2.46)
It can then be shown that the orbit shrinks as long as Md/Ma 1.28.
In a binary system a supernova can take place if a white dwarf is pushed over
the Chandrasekhar limit by mass transfer. When it is assumed that the mass
loss from the supernova is instantaneous, occurs in a circular orbit, and position
and velocity are the same after the explosion as they were before the explosion,
then the orbital position where the supernova takes place is the new periastron
of the post-supernova orbit. The post-supernova eccentricity is then given by
e =
∆M
M1 + M2 − ∆M
(2.47)
Which means that the system will become unbound (e > 1) when more than
half the mass is lost during the explosion.
2.3.5 Fast models: Single Star Evolution (SSE)
In order to combine stellar evolution with the n-body simulation of a stellar
cluster, a fast program is desired. SSE is such a program, it offers a fast ap-
proximation of the evolution of stars and an accuracy within 5 % of that of
detailed models (Hurley et al., 2000). The SSE program will be described in
further detail below.
SSE uses formulas, as function of time, metallicity, and mass, to approximate the
evolution of core mass, radius, and luminosity from the zero age main sequence
to the remnant stages (Hurley et al., 2000). The formulas are fitted based on a
grid of evolutionary tracks, which were constructed using detailed — incorpo-
rating convective overshooting — stellar models. The tracks are determined for
2.3. STELLAR EVOLUTION 27
a stellar mass range from 0.5M to 50M and metallicities ranging from 0.0001
to 0.03. First the mass function, with a specific metallicity, is fitted to get an
idea of the functional form (Hurley et al., 2000), and then the fitted function is
extended to a function of both mass and metallicity. Fitting functions are made
for different masses and different stages of stellar evolution. Mass division is
based on the maximum initial mass for which the helium flash takes place, and
the maximum initial mass for which helium ignites on the first giant branch.
Formulas are constructed for the main sequence, Hertzsprung gap, first giant
branch, core helium burning, and asymptotic giant branch (Hurley et al., 2000).
Various empirical relations are used to incorporate mass loss in the SSE pro-
gram: Reimers’ formula for mass loss on the GB and beyond, de Jager’s formula
for the mass loss of massive stars throughout their entire evolution, and other
empirical relations for Wolf-Rayet stars and luminous blue variables.
Figure 2.10: Mass loss fraction over time (in Myr) of stars with various initial
masses and a solar-like metallicity (0.02). The numbers represent the initial
mass in M . Stars with a higher mass lose a larger fraction of mass on a
shorter timescale. An exception is the case where there is a lot of mass loss due
to stellar wind, which happens during the evolution of the 50M and 90M star.
These results were generated using the Single Star Evolution (SSE) program by
Onno Pols.
28 CHAPTER 2. METHODS
Stellartype
O-50MO-20MB-10MA-2MF-1.2MG-1.0MK-0.6MM-0.2M
EvolutionphaseTimeMassTimeMassTimeMassTimeMassTimeMassTimeMassTimeMassTimeMass
MainsequenceStar0.050.00.020.00.010.00.02.000.01.200.01.000.00.600.00.20
HertzsprungGap4.341.58.819.224.59.901.16·103
2.005.62·103
1.2011.0·103
1.0075.7·103
0.60914·103
0.20
GiantBranch----24.59.891.17·103
2.005.91·103
1.2011.6·103
1.0079.7·103
0.60962·103
0.20
CoreHeliumBurning4.341.48.819.224.59.891.20·103
2.006.38·103
1.0512.3·103
0.76----
FirstAGB--9.810.127.49.421.49·103
1.986.51·103
1.0112.46·103
0.72----
SecondAGB------1.49·103
1.956.51·103
0.9612.5·103
0.59----
NakedHeliumMS4.915.7--------------
NakedHeliumHG4.911.9--------------
HeliumWD------------82.0·103
0.411.08·106
0.18
Carbon/OxygenWD------1.50·103
0.646.51·103
0.5412.5·103
0.52----
NeutronStar--9.82.3327.51.37----------
BlackHole4.911.7--------------
Table2.2:Themass(inM)ofvarioustypestars,withdifferentinitialmasses,evolvesdifferentovertime(inMyr).Resultswere
generatedwithSSEusingthesamemetallicityasinFigure1.9
Chapter 3
Tests and diagnostics
3.1 Diagnostics
To analyze the dynamical evolution of a stellar cluster there are a range of
diagnostics that can be calculated. But first the cluster has to be initialized;
velocities, masses, and positions are set using a Plummer sphere, then the stellar
dynamics package is defined. In these simulations PhiGRAPE for the GPU was
chosen, because it is a fast, direct, n-body integrator. After the softening and
time step parameters are set, the stellar evolution package is defined. In these
simulations SSE was chosen because it is fast and accurate within 5 percent of
detailed models. Then the radius of the particles is set to zero to prevent the
computational expensive collisions. The initial masses are set using the Salpeter
mass function. After the particles are shifted to the center of mass the diagnos-
tics at t = 0 are calculated. Code snippets can be found in Appendix A.
Diagnostics can be compared and separated if computations are done before
and after the stellar evolution step. For instance, the energy difference caused
by evolution can be separated from the energy difference caused by the n-body
integrator.
The AMUSE framework has built in functions to pass data from the AMUSE
layer to the legacy layer, ie:
from_model_to_gravity.copy_attributes(["mass"])
and the other way around, ie:
from_gravity_to_model.copy()
The PhiGRAPE program uses individual, blocked, time steps; the time step of
0.25 Myr is therefore a maximum time step, where the particles are synced to
the same time. Synchronization makes it possible to compute diagnostics and
to set new masses based on the outcome of stellar evolution.
PhiGRAPE and SSE are well tested within their own domain, the values of
the phiGRAPE time step and the SSE parameters are the same as the values
suggested by the programmers. A suitable value of the softening parameter was
determined by variation of the value over multiple n-body simulations. With
high values ( ≥ 0.01 pc) the core of the stellar cluster did not collapse, and with
30 CHAPTER 3. TESTS AND DIAGNOSTICS
low values (ie. = 0) the program became slow because of the computational
expensive close encounters.
What follows is a list of diagnostics with a brief explanation of how they were
computed.
Time: The time is calculated in both SI and n-body units. Conversion to
n-body units is done using the built in function:
convert_nbody.to_nbody( )
Energy: The energy error is a used as an indication for the accuracy of the n-
body integrator. Conserved energy does not necessarily mean that the program
is accurately representing reality, but a high energy error, on the other hand,
does indicate that something is wrong.
Before and after the evolution step the total energy is calculated and stored
in different variables. By adding up values, energy differences are obtained for
both the evolution and the dynamical steps. A total energy error is computed
by comparison with the initial energy, while the total error caused by the n-body
integrator is obtained by summing the per step values. The energy is obtained
using the built in functions:
gravity.kinetic_energy + gravity.potential_energy
Mass: Total and per step information about the total mass of the cluster, and
the mass lost by evolution, is obtained by a simple loop through all the particles
in python:
totalMass = 0.0
for x in particles:
totalMass += x.mass.value_in(units.MSun)
T/V: A stable cluster obeys the virial theorem of an ideal gas in hydrostatic
equilibrium: T/V = −0.5, where T is the kinetic energy, and V the potential
energy. The fraction T/V therefore says something about the stability of the
cluster. The built in functions are used to obtain kinetic and potential energy.
Half-mass radius: The half-mass radius gives an idea of the size of the cluster,
and is later used to determine the number of stars that escaped from the cluster.
The calculation is done using built in python functions. First all particles are
sorted by their distance from the center of mass, then the masses are summed
until half-mass:
stack = []
for x in particles:
stackSize = len(stack)
stack.append([stackSize])
3.1. DIAGNOSTICS 31
stack[stackSize].append(x.distance)
stack[stackSize].append(x.mass)
stack.sort(key=lambda x: x[1])
tmpMass = 0.0
for x in range (0, stackSize):
tmpMass += stack[x][2]
if tmpMass / totalMass >= 0.5:
RHalf = stack[x][1]
Escapers: The number of escapers can be calculated when also the total en-
ergy of an individual particle is appended to the above stack. If a particle has
a positive energy and has a distance of more than 5 · R1/2, it will be considered
to be unbound from the stellar cluster. A built in function for the potential of
a particle — potential() — was used in the computation of the energy.
Center of mass: In order to get accurate Lagrangian radii and core den-
sity (see below), the escapers were not included in the calculation of the center
of mass. After a recalculation of the total mass, the center of mass is obtained
by the summation, weighted by particle mass, of the particle positions.
Lagrangian radii: These are the radii of various percentages of the total
mass, also of the escaped stars, as they develop over time; Lagrangian radii are
an important tool to study the dynamical evolution of a stellar cluster. The
mass fractions that were chosen are 0.5, 1, 5, 10, 25, 50, 75, and 90 percent.
First the particles are shifted to the center of mass, and then sorted by the
distance from the center. Then it is just a manner of walking outside in a loop
over all the particles.
Binaries: Binaries are formed mostly in the center of a stellar cluster and
can stop the core collapse. See also Chapter X. Binaries are found by computa-
tion of the eccentricity; two stars are a binary when 0 ≤ e ≤ 1. The eccentricity
is calculated with the following equations
e2
= 1 −
l2
G(M1 + M2)a
, where l ≡
L
µ
(3.1)
a = −
G(M1 + M2)
2
, where ≡
Ebin
µ
(3.2)
Where l is the specific angular momentum, L the angular momentum, a the
semi major axis, µ the reduced mass, the specific orbital energy, G the gravi-
tational constant, and M1 and M2 the masses.
It is computational expensive to compute the eccentricity for each pair of stars
of the stellar cluster. To speed up this calculation the stars were first sorted by
their distance from the center of mass. Then the eccentricity of each star with
its two closest ”neighbors” was calculated. These stars do not necessarily have
to be neighbors, because they might as well be at opposite sides of the cluster.
By the comparison with two stars, however, the chances are large that all the
binaries will be, in fact, found. First the semi major axis is calculated. If it is
32 CHAPTER 3. TESTS AND DIAGNOSTICS
smaller than 0.1 pc the eccentricity is calculated.
Three types of binaries are distinguished: hard, soft, and close binaries. If the
(absolute) potential energy of the binary is larger than the average kinetic en-
ergy of the particles in the cluster, the stars are considered to be hard binaries.
The others are labeled soft binaries: binaries that are relatively easy to be dis-
rupted by the other stars in the cluster. When the semi major axis is within 10
percent of the softening parameter the binary, hard or soft, was considered to
be a close binary.
The velocities, positions, and stellar masses were appended to a stack in order
to perform these calculations.
Core density: The core density is often defined as the density of the 5 stars
closest to the center of mass. When plotted against time it can be used to
determine the core collapse.
The core density is determined in a similar fashion as the Lagrangian radii; the
stars are sorted by their distance from the center of mass, then a loop is done
from the innermost particle to the fifth particle. The distance from the latter is
used to compute the core density.
Mass distribution: Each step the mass is plotted against the radius. Com-
putation is done in a similar fashion as the Lagrangian radii.
Density distribution: Also plotted per step. Computation is similar to the
computation of the core density.
Positions: Plotting the per step positions of the particles, the binaries, and
the center of mass can be very handy, especially if an obvious problem is en-
countered in the numerical output. The phiGRAPE program has a OpenGL
interface which can be used to view the positions in 3D during runtime. But it
cannot hurt to output plots as well, they can be put in a video, enabling the
researcher to fast forward and rewind through the simulation of a stellar cluster.
Core collapse: The moment of core collapse is numerically determined by
taking the maximum core density at which there are at least two hard binaries.
The approximate time at which core collapse takes place is also determined prior
to the first time step. First the virial radius (rv) — within the virial radius the
system is in virial equilibrium — is calculated using rv = GM2
/(−2V ), where
G is the gravitational constant, M is the total mass, and V is the potential en-
ergy. Using the virial radius and the formulas from Chapter 1.2.1, the crossing
time, half mass relaxation time, and moment of core collapse are approximated
respectively.
3.2 Tests
In the following section an isolated, n = 1024, system is tested against well
known results. Isolation means ignoring gravity shocks and tidal interaction
from the parent galaxy. All the gas from the molecular cloud is assumed to be
gone, and mass lost by stellar evolution does not interact with any of the stars,
the mass is instantly removed instead. The particles all have zero radius, thus
3.2. TESTS 33
preventing collisions and mergers. Simulations were initialized with the same
Plummer sphere. Variations occur in initial mass function (IMF) and in the oc-
curance/incorporation of stellar evolution. Parameters of the relevant AMUSE
modules are listed in Appendix B.
The energy error is an indication for whether the simulations are accurate.
A low energy error does not necessarily mean that the model is accurate, but a
high error does indicate that something is wrong. The accuracy can also be de-
termined by comparison with other models from well known papers, preferably
using a completely different method.
3.2.1 One-component simulations
First simulations were done to determine if the maximum time step for phi-
GRAPE converges to a similar evolution. Checking whether the time step con-
verges is necessary because in a later stage the time step will be varied in the
case where stellar dynamics and evolution are combined. This time step is also
the time over which the particles are synchronized in order to compute diag-
nostics. Prior to the first time step the core collapse was approximated to take
place at 218 Myr for this specific set of 1024 particles, initialized using a
Plummer sphere, with stellar masses of 0.345M each.
Although runs with identical initial conditions showed qualitatively very sim-
ilar dynamical evolutions, they did show unexpected differences in the exact
moment of core collapse. Therefore multiple runs were done over which an av-
erage was calculated. Per time step an average over 20 runs was calculated.
The difference are probably due to the phiGRAPE GPU mode.
The different time step runs show a qualitative similar evolution of the core
radius (Figure 3.1), although they seem to disagree on the moment of core col-
lapse. In case ∆t = 0.25 Myr and ∆t = 0.125 Myr the core collapses at around
190 Myr, similar to the expected value based on the well-known semi-analytical
formulae. Other diagnostics also appear very similar, ie. the number of escapers
(Figure 3.3) and the central density (Figure 3.2). However, in case of a 0.5 Myr
the time step appears to take place quicker. Therefore 0.25 Myr was chosen as
a usable time step for future simulations.
Qualitatively the simulations are in line with the well known theory, stars es-
cape from the clusters (Figure 3.3), leading to contraction of the core while the
outer layers expand (Figure 3.4). The gravothermal catastrophe, core collapse,
takes place around the expected value of 200 Myr. Core collapse is eventually
stopped by the increase in hard binaries (Figure 3.5), which were verified to
be located very close to the center of mass. The system remains close to virial
equilibrium (Figure 3.6), and the error eventually increases (Figure 3.7) due to
close encounters, especially close binaries with a semi major axis comparable to
the softening parameter, around the center of mass.
34 CHAPTER 3. TESTS AND DIAGNOSTICS
Figure 3.1: The core radius vs. time for different time steps, being 0.5, 0.25, and
0.125 Myr from top to bottom. The core collapse is highlighted with a vertical
line in the bottom two panels.
Figure 3.2: The central density vs. time for the same runs as in Figure 3.1.
3.2. TESTS 35
Figure 3.3: The number of escapers over time for the three time steps.
Figure 3.4: Lagrangian radii over time with ∆t = 0.25 Myr. The outer layers
expand while the core contracts.
36 CHAPTER 3. TESTS AND DIAGNOSTICS
Figure 3.5: Absolute number of binaries (hard, soft, and close) over time with
∆t = 0.25 Myr.
Figure 3.6: Kinetic/Potential energy over time with ∆t = 0.25 Myr.
3.2. TESTS 37
Figure 3.7: Energy error over time with ∆t = 0.25 Myr. The error goes up with
the increase of close binaries.
3.2.2 Two-component simulations
This section describes the dynamical evolution of two component clusters; clus-
ters containing two different masses. The following definitions are used in this
section: µ = mh/ml, where mh is the mass of the high mass stars, and ml the
mass of the low mass stars. Furthermore, q = Nh/Ncl, where Nh is the total
number of the high mass stars, and Ncl the total number of stars in the cluster.
Every simulation started with the same, n = 1024, particle positions and veloc-
ities as in the previous section. In each run a different, random, set of particles
was chosen to have a higher mass. Simulations were averaged over 20 runs and
the time step was set to 0.25 Myr.
Two-component systems have been extensively studied by Khalisi et al. (2007).
The core radius (Figure 3.8) shows similar behavior to the radii found in that
paper: the core collapse is accelerated by roughly a factor of 1/µ, and becomes
less deep at higher µ. The latter is especially clear in the case where µ = 3.
The acceleration of the dynamical evolution can also be seen by the number of
escapers (Figure 3.9), and hard binaries (Figure 3.10); these increase suddenly
around core collapse, just as with the one-component runs. Also similar to the
one-component simulations is the energy error (Figure 3.11), for which it was
verified that the increase was due to close binaries.
Finally the fraction q was altered, and the result shows what is expected: a
higher number of high mass particles means that heat is more efficiently trans-
ported outwards (Chapter 1.2.1), meaning that the core has to contract faster
to stay in thermal equilibrium.
38 CHAPTER 3. TESTS AND DIAGNOSTICS
Figure 3.8: Development of the core radius over time with q = 0.1 and three
different values for µ: 1, 2, and 3.
Figure 3.9: The number of escapers over time for the same runs that were used
for the previous graph.
3.2. TESTS 39
Figure 3.10: The number of hard binaries over time for the same runs that were
used for the previous graph.
Figure 3.11: The energy errors over time for the same runs that were used for
the previous graph.
40 CHAPTER 3. TESTS AND DIAGNOSTICS
Figure 3.12: Development of core radius over time for three different fractions
q: 0, 0.1, and 0.25. The value of µ is kept at 2.
3.2.3 Simulations incorporating mass loss
In the first runs a fraction of the mass, of the same one-component n = 1024
cluster, was taken away instantly to verify whether the cluster dissolves; for a
Plummer sphere this should happen around Γ 0.4, where Γ is the fraction of
the mass left after mass loss (Boily and Kroupa, 2003a). The core radius indeed
expands strongly at Γ 0.4 (Figure 3.13) and the cluster is unbound at this
specific value of Γ according to the virial ratio (Figure 3.14).
As predicted by Hills (1980) the cluster can remain in virial equilibrium when
the mass loss is slow (Figure 3.16), divided over equal steps from 0 to 50 Myr,
compared to the crossing time, which is ∼ 0.8 Myr for this particular cluster.
When the mass loss is fast, the cluster has to find a new radius that fits the
virial theorem; in this case mass loss has a stronger disruptive effect on the
dynamical evolution (Figure 3.15). The outcome is that the cluster has become
more loosely bound, the virial ratio is closer to unity and the system suffers
from more escapers (Figure 3.17).
In the last set of runs the same Plummer sphere is used, but this time one
random star has been given a 100 times higher mass. Runs with and without
stellar evolution are compared. Figure 3.19 shows that the heavy star sank
to either the core or at least close to the core when significant mass loss, due
to stellar evolution, becomes important. A fraction of 0.06 is lost, which, as
expected, slows down core collapse significantly (Figure 3.18), although the
same system does seem to recover to approximately the same virial ratio (Figure
3.20). During the time where the system was more loosely bound, due to stellar
evolution, more stars were able to escape compared to the runs without stellar
3.2. TESTS 41
evolution (Figure 3.21).
Figure 3.13: Core radius over time. At t = 50 Myr a fraction of the mass of all
the stars was taken away. Γ is the fraction that is left.
Figure 3.14: Virial ratios over time corresponding to the previous runs. When
the ratio > 1 the cluster is considered to be unbound.
42 CHAPTER 3. TESTS AND DIAGNOSTICS
Figure 3.15: Core radius over time. All stars lose half their mass, but in one
case this is done in equal steps from 0 to 50 Myr, and in the other case it is
removed suddenly at t = 50 Myr.
Figure 3.16: Virial ratios over time corresponding to the previous runs; the
cluster can remain in virial equilibrium when the mass loss is slow compared to
the crossing time.
3.2. TESTS 43
Figure 3.17: The number of escapers over time corresponding to the previous
runs.
Figure 3.18: Core radius over time obtained using the same Plummer sphere as
in the previous section, but with one random star given a 100 times higher mass.
In one of the simulations stellar evolution with SSE was turned on; resulting
evolutionary stages of the high mass star are displayed.
44 CHAPTER 3. TESTS AND DIAGNOSTICS
Figure 3.19: Core density over time for the same runs as the previous graph.
Figure 3.20: Virial ratios over time for the same runs as the previous graph.
3.2. TESTS 45
Figure 3.21: Escapers over time for the same runs as the previous graph.
46 CHAPTER 3. TESTS AND DIAGNOSTICS
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus
Thesis Guillermo Kardolus

Mais conteúdo relacionado

Mais procurados

Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...
Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...
Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...Christopher Iliffe Sprague
 
A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...
A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...
A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...Wissem Dhaouadi
 
A new universal formula for atoms, planets, and galaxies
A new universal formula for atoms, planets, and galaxiesA new universal formula for atoms, planets, and galaxies
A new universal formula for atoms, planets, and galaxiesIOSR Journals
 
Open letter
Open letterOpen letter
Open letterVC55
 
The event horizon_of_m87
The event horizon_of_m87The event horizon_of_m87
The event horizon_of_m87Sérgio Sacani
 
Poster1 (dragged)
Poster1 (dragged)Poster1 (dragged)
Poster1 (dragged)Vivian Tang
 
earth_like_planet_presentation
earth_like_planet_presentationearth_like_planet_presentation
earth_like_planet_presentationtunde akinsanmi
 
Kepler monitoring l_dwarfs_spot
Kepler monitoring l_dwarfs_spotKepler monitoring l_dwarfs_spot
Kepler monitoring l_dwarfs_spotSérgio Sacani
 
Results from telescope_array_experiment
Results from telescope_array_experimentResults from telescope_array_experiment
Results from telescope_array_experimentSérgio Sacani
 
Integration of flux tower data and remotely sensed data into the SCOPE simula...
Integration of flux tower data and remotely sensed data into the SCOPE simula...Integration of flux tower data and remotely sensed data into the SCOPE simula...
Integration of flux tower data and remotely sensed data into the SCOPE simula...Integrated Carbon Observation System (ICOS)
 
The benefit of hindsight in observational science - Retrospective seismologica...
The benefit of hindsight in observational science - Retrospective seismologica...The benefit of hindsight in observational science - Retrospective seismologica...
The benefit of hindsight in observational science - Retrospective seismologica...Elizabeth Entwistle
 
Computational Training and Data Literacy for Domain Scientists
Computational Training and Data Literacy for Domain ScientistsComputational Training and Data Literacy for Domain Scientists
Computational Training and Data Literacy for Domain ScientistsJoshua Bloom
 
End point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjecture
End point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjectureEnd point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjecture
End point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjectureSérgio Sacani
 
Mapping spiral structure on the far side of the Milky Way
Mapping spiral structure on the far side of the Milky WayMapping spiral structure on the far side of the Milky Way
Mapping spiral structure on the far side of the Milky WaySérgio Sacani
 
Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...
Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...
Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...Sérgio Sacani
 

Mais procurados (20)

Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...
Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...
Simulation of Interplanetary Trajectories Using Forward Euler Numerical Integ...
 
A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...
A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...
A+relativistic+quantum+kinematics+description+for+d-Dimensional+path+planning...
 
A new universal formula for atoms, planets, and galaxies
A new universal formula for atoms, planets, and galaxiesA new universal formula for atoms, planets, and galaxies
A new universal formula for atoms, planets, and galaxies
 
Open letter
Open letterOpen letter
Open letter
 
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
 
PART II.2 - Modern Physics
PART II.2 - Modern PhysicsPART II.2 - Modern Physics
PART II.2 - Modern Physics
 
The event horizon_of_m87
The event horizon_of_m87The event horizon_of_m87
The event horizon_of_m87
 
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
 
Poster1 (dragged)
Poster1 (dragged)Poster1 (dragged)
Poster1 (dragged)
 
earth_like_planet_presentation
earth_like_planet_presentationearth_like_planet_presentation
earth_like_planet_presentation
 
Kepler monitoring l_dwarfs_spot
Kepler monitoring l_dwarfs_spotKepler monitoring l_dwarfs_spot
Kepler monitoring l_dwarfs_spot
 
Results from telescope_array_experiment
Results from telescope_array_experimentResults from telescope_array_experiment
Results from telescope_array_experiment
 
Integration of flux tower data and remotely sensed data into the SCOPE simula...
Integration of flux tower data and remotely sensed data into the SCOPE simula...Integration of flux tower data and remotely sensed data into the SCOPE simula...
Integration of flux tower data and remotely sensed data into the SCOPE simula...
 
Final_Windows
Final_WindowsFinal_Windows
Final_Windows
 
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
Program on Mathematical and Statistical Methods for Climate and the Earth Sys...
 
The benefit of hindsight in observational science - Retrospective seismologica...
The benefit of hindsight in observational science - Retrospective seismologica...The benefit of hindsight in observational science - Retrospective seismologica...
The benefit of hindsight in observational science - Retrospective seismologica...
 
Computational Training and Data Literacy for Domain Scientists
Computational Training and Data Literacy for Domain ScientistsComputational Training and Data Literacy for Domain Scientists
Computational Training and Data Literacy for Domain Scientists
 
End point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjecture
End point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjectureEnd point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjecture
End point of_black_ring_instabilities_and_the_weak_cosmic_censorship_conjecture
 
Mapping spiral structure on the far side of the Milky Way
Mapping spiral structure on the far side of the Milky WayMapping spiral structure on the far side of the Milky Way
Mapping spiral structure on the far side of the Milky Way
 
Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...
Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...
Spectroscopic confirmation of_the_existence_of_large_diffuse_galaxies_in_the_...
 

Semelhante a Thesis Guillermo Kardolus

Oscar Nieves (11710858) Computational Physics Project - Inverted Pendulum
Oscar Nieves (11710858) Computational Physics Project - Inverted PendulumOscar Nieves (11710858) Computational Physics Project - Inverted Pendulum
Oscar Nieves (11710858) Computational Physics Project - Inverted PendulumOscar Nieves
 
A Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-Spaces
A Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-SpacesA Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-Spaces
A Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-SpacesZubin Bhuyan
 
Optimal Estimations of Photometric Redshifts and SED Fitting Parameters
Optimal Estimations of Photometric Redshifts and SED Fitting ParametersOptimal Estimations of Photometric Redshifts and SED Fitting Parameters
Optimal Estimations of Photometric Redshifts and SED Fitting Parametersjulia avez
 
PH600 Project report
PH600 Project reportPH600 Project report
PH600 Project reportLuke Moore
 
New constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observations
New constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observationsNew constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observations
New constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observationsSérgio Sacani
 
Estimation of global solar radiation by using machine learning methods
Estimation of global solar radiation by using machine learning methodsEstimation of global solar radiation by using machine learning methods
Estimation of global solar radiation by using machine learning methodsmehmet şahin
 
Group Cohomology of the Poincare Group and Invariant States
Group Cohomology of the Poincare Group and Invariant States Group Cohomology of the Poincare Group and Invariant States
Group Cohomology of the Poincare Group and Invariant States James Moffat
 
Verification of the Validity of Relativity Principle
Verification of the Validity of Relativity PrincipleVerification of the Validity of Relativity Principle
Verification of the Validity of Relativity PrincipleIOSR Journals
 
Ensemble Data Assimilation on a Non-Conservative Adaptive Mesh
Ensemble Data Assimilation on a Non-Conservative Adaptive MeshEnsemble Data Assimilation on a Non-Conservative Adaptive Mesh
Ensemble Data Assimilation on a Non-Conservative Adaptive MeshColinGuider
 
ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...
ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...
ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...csandit
 
Condensed Geometry II(2)
Condensed Geometry II(2)Condensed Geometry II(2)
Condensed Geometry II(2)Koustubh Kabe
 
studying-desorption-krypton
studying-desorption-kryptonstudying-desorption-krypton
studying-desorption-kryptonAaron Stromberg
 
Dhrimaj_Helion_FinalPaper_ECE523
Dhrimaj_Helion_FinalPaper_ECE523Dhrimaj_Helion_FinalPaper_ECE523
Dhrimaj_Helion_FinalPaper_ECE523Helion Dhrimaj
 
The build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyr
The build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyrThe build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyr
The build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyrSérgio Sacani
 
Optics, Optical systems, further theoretical implementations of the Optical E...
Optics, Optical systems, further theoretical implementations of the Optical E...Optics, Optical systems, further theoretical implementations of the Optical E...
Optics, Optical systems, further theoretical implementations of the Optical E...Orchidea Maria Lecian
 

Semelhante a Thesis Guillermo Kardolus (20)

FINAL POSTER
FINAL POSTERFINAL POSTER
FINAL POSTER
 
Oscar Nieves (11710858) Computational Physics Project - Inverted Pendulum
Oscar Nieves (11710858) Computational Physics Project - Inverted PendulumOscar Nieves (11710858) Computational Physics Project - Inverted Pendulum
Oscar Nieves (11710858) Computational Physics Project - Inverted Pendulum
 
A Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-Spaces
A Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-SpacesA Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-Spaces
A Fast and Inexpensive Particle Swarm Optimization for Drifting Problem-Spaces
 
223
223223
223
 
Optimal Estimations of Photometric Redshifts and SED Fitting Parameters
Optimal Estimations of Photometric Redshifts and SED Fitting ParametersOptimal Estimations of Photometric Redshifts and SED Fitting Parameters
Optimal Estimations of Photometric Redshifts and SED Fitting Parameters
 
PH600 Project report
PH600 Project reportPH600 Project report
PH600 Project report
 
New constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observations
New constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observationsNew constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observations
New constraints on_quantum_gravity_from_x_ray_and_gamma_ray_observations
 
Estimation of global solar radiation by using machine learning methods
Estimation of global solar radiation by using machine learning methodsEstimation of global solar radiation by using machine learning methods
Estimation of global solar radiation by using machine learning methods
 
Group Cohomology of the Poincare Group and Invariant States
Group Cohomology of the Poincare Group and Invariant States Group Cohomology of the Poincare Group and Invariant States
Group Cohomology of the Poincare Group and Invariant States
 
Verification of the Validity of Relativity Principle
Verification of the Validity of Relativity PrincipleVerification of the Validity of Relativity Principle
Verification of the Validity of Relativity Principle
 
Ensemble Data Assimilation on a Non-Conservative Adaptive Mesh
Ensemble Data Assimilation on a Non-Conservative Adaptive MeshEnsemble Data Assimilation on a Non-Conservative Adaptive Mesh
Ensemble Data Assimilation on a Non-Conservative Adaptive Mesh
 
012
012012
012
 
ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...
ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...
ASTRONOMICAL OBJECTS DETECTION IN CELESTIAL BODIES USING COMPUTER VISION ALGO...
 
Condensed Geometry II(2)
Condensed Geometry II(2)Condensed Geometry II(2)
Condensed Geometry II(2)
 
studying-desorption-krypton
studying-desorption-kryptonstudying-desorption-krypton
studying-desorption-krypton
 
Dhrimaj_Helion_FinalPaper_ECE523
Dhrimaj_Helion_FinalPaper_ECE523Dhrimaj_Helion_FinalPaper_ECE523
Dhrimaj_Helion_FinalPaper_ECE523
 
The build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyr
The build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyrThe build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyr
The build up_of_the_c_d_halo_of_m87_evidence_for_accretion_in_the_last_gyr
 
Optics, Optical systems, further theoretical implementations of the Optical E...
Optics, Optical systems, further theoretical implementations of the Optical E...Optics, Optical systems, further theoretical implementations of the Optical E...
Optics, Optical systems, further theoretical implementations of the Optical E...
 
437FINALREPORTmnras
437FINALREPORTmnras437FINALREPORTmnras
437FINALREPORTmnras
 
MZ2
MZ2MZ2
MZ2
 

Último

TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxBroad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxjana861314
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisDiwakar Mishra
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)Areesha Ahmad
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSSLeenakshiTyagi
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 

Último (20)

TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxBroad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral AnalysisRaman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
Raman spectroscopy.pptx M Pharm, M Sc, Advanced Spectral Analysis
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
DIFFERENCE IN BACK CROSS AND TEST CROSS
DIFFERENCE IN  BACK CROSS AND TEST CROSSDIFFERENCE IN  BACK CROSS AND TEST CROSS
DIFFERENCE IN BACK CROSS AND TEST CROSS
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 

Thesis Guillermo Kardolus

  • 1. Evaluation of mass loss in the simulation of stellar clusters using a new multiphysics software environment Guillermo Kardolus August 25, 2010 Keywords: AMUSE, stellar dynamics, stellar evolution, stellar clusters, mass segregation Supervisors: Dr. I. Pelupessy Prof. dr. S. F. Portegies Zwart Mastercoordinator: Prof. dr. R.A.M.J Wijers Astronomical Institute ”Anton Pannekoek” Astronomy and Astrophysics University of Amsterdam Leiden Observatory Computational Astrophysics Leiden University
  • 2.
  • 3. Preface This thesis covers the work done during my master’s research project as part of the fulfillment of the master’s degree in astronomy and astrophysics (O- profile) at the University of Amsterdam. This research project is done under the supervision of Prof. dr. S. F. Portegies Zwart and Dr. I. Pelupessy at the Leiden Observatory, and Prof. dr. R. A. M. J. Wijers at the Astronomical Institute ”Anton Pannekoek” (September 2009 - August 2010).
  • 4. ii
  • 5. Abstract In this research project stellar evolution and stellar dynamics are combined in the simulation of stellar clusters and binary systems. The numerical approx- imations are done using a fairly new software framework written in Python. This framework is called AMUSE, an abbreviation of Astrophysical MUltipur- pose Software Environment. In contrary to the monolithic approach, where a software package that first covers one astrophysical domain is extended to also cover another domain, AMUSE uses a modular approach. This means that existing packages, which are well-tested within their own domain, can be com- bined. AMUSE handles the communication and unit conversion between these different modules. The phiGRAPE and Hermite0 direct n-body integrators were combined with a fast, fitting formulae based, stellar evolution program called Single Star Evolu- tion (SSE). The programs currently interact as followed: first a dynamical step is taken, at which the n-body integrator synchronizes all the particles to the same time. This step is then followed by an instant step of stellar evolution: the stellar evolution program sends an updated list of masses, based on the new global time, to the stellar dynamics program. If this method is accurate, de- creasing time steps should at some point converge to the same result. It should be noted that the mass, lost during the stellar evolution of the individual stars, is assumed to leave the cluster instantly without interaction with the individual stars. The cluster is further idealized: the gas from the molecular cloud from which the cluster originated is also assumed to be gone at the zero age main sequence. However, before running these cluster simulations, the AMUSE framework has to be tested first due to the fact that it is fairly new; a computer program is built which computes various diagnostics in order to perform a qualitative com- parison with well-known results from earlier papers. After these tests, stellar dynamics and stellar evolution are first combined in binary systems, which have analytical solutions. The binary simulations are done using the AMUSE Two- body module, which uses the generalized Kepler formulas to solve the two-body problem for any orbit. Various expected results are observed using AMUSE and will be described briefly hereafter. The core collapse for a Plummer sphere occurs around ten half-mass relaxation times for one-component clusters, and is accelerated pro- portional to the low-mass component over the high-mass component in two- component simulations. Furthermore, there is indeed a sudden increase of bi- naries around core collapse. When mass loss is incorporated, the cluster expands and dissolves when 60 per- cent of the mass is taken away; this is indeed expected for a Plummer sphere.
  • 6. iv Finally, the cluster can remain in virial equilibrium when the mass loss occurs in a time that is slow compared to the crossing time. When the mass loss is fast, this results in a steep increase of the number of escapers, and thus an increase of the virial ratio of the cluster as a whole. It was concluded that AMUSE is suitable to perform an investigation of the time stepping. However, when reproducible results are desired, the phiGRAPE module in GPU mode is not suitable: unexpected per run differences occur when simulations are performed with the exact same initial conditions. For this reason the direct Hermite0 integrator was used in future cluster simulations. The binary simulations showed that, when incorporating adiabatic (Jeans mode) mass loss, results are more accurate when the mass loss occurs in a more (orbital- wise) symmetrical manner. This can be concluded from the fact that simula- tions are closer to the (analytically obtained) adiabatic value when more steps are done, and from test runs in which the time steps are scaled with the orbital period. In cluster simulations the results are closer to the adiabatic values as well — at least to a lower value of the virial ratio — when the time steps are shorter. However, this exact adiabatic value is unknown because there are no analytical solutions. When the time steps are shorter they appear to converge to the same result and it appears that smaller time steps are needed when the cluster has a shorter crossing time.
  • 7. Popular summary i Summary in English Stars, including our own sun, are born in stellar clusters. Such a cluster is a multi-physical environment, in which various astrophysical domains interact. Examples of these domains are: stellar dynamics, stellar evolution, radiation transfer, and hydrodynamics. In this research project stellar dynamics and stel- lar evolution evolution are combined in the simulation of stellar clusters and binary systems. In dynamical simulations the velocities and positions of the stars have to be approximated corresponding to a certain time, and in stellar evolution the equations describing the stellar structure have to approximated over time as well; both these domains are best studied with numerical approxi- mations using a computer. When stellar evolution is incorporated into the dy- namical simulation of a stellar cluster or binary system, this effectively means that the stars lose mass over time. Mass loss can be incorporated into the dynamical evolution of a stellar cluster by extending an existing program, that first covers only one of the domains, in such a way that it also covers the other astrophysical domain. Such a monolithic approach has many disadvantages: the resulting packages are often large, suffer from bugs, have sections of dead code, and are rarely documented. AMUSE, short for Astrophysical MUltipurpose Software Environment, was created to ad- dress these problems using a modular approach: existing, and thus well-tested, packages are combined into a larger framework written in Python. In AMUSE, the combination of the two astrophysical domains is done as fol- lowed: first a dynamical simulation is done over a specific time step, followed by an instant step of stellar evolution. The program responsible for stellar evolution specifies new particle masses and passes them to the stellar dynamics program. The stellar dynamics program is then ready to take a new time step. AMUSE handles the communication and unit conversion between these programs. The question is whether this method is accurate. When this method is accu- rate, decreasing time steps should at some point converge to the same results. This, and the general effect of different time step sizes, is first investigated in binary systems, which have analytical solutions. Research is then carried on in cluster simulations. But because AMUSE is fairly new software, it has to be tested first: a computer program is built which computes various diagnostics in order to perform a qualitative comparison with well-known results from earlier research. In cluster simulations where all masses are equal (one-component simulations), as well as in two-component simulations, with and without mass loss, results are
  • 8. vi I. SUMMARY IN ENGLISH in line with what is expected. However, when reproducible results are desired, the stellar dynamics program, which runs on the GPU, is not suitable: unex- pected per run differences occur when simulations are performed with the exact same initial conditions. For this reason another program, running on the CPU instead, was used in future cluster simulations. This is unfortunate because the GPU is specialized in running vector calculations, and is therefore very fast in performing stellar dynamical computations. The CPU is many orders slower in performing these computations. The binary simulations showed that, for a mass loss that is supposed to be evenly spread over the orbit of the mass-losing star, results are more accurate when the mass loss occurs in a more (orbital-wise) symmetrical manner. This can be concluded from the fact that simulations are closer to the analytical val- ues when more steps are done, and from test runs in which the time steps are scaled with the orbital period. In cluster simulations the results are more accurate as well when the time steps are shorter. However, this exact analytical value is unknown because such so- lutions do not exist. When the time steps are shorter they appear to converge to the same result and it seems that smaller time steps are needed when the clusters are more compact.
  • 9. II. SAMENVATTING IN HET NEDERLANDS (DUTCH) vii ii Samenvatting in het Nederlands (Dutch) Sterren, inclusief onze zon, worden geboren in sterrenhopen. Een dergelijke ster- renhoop is een omgeving waarin verschillende astrofysische domeinen interactie met elkaar hebben. Voorbeelden van deze domeinen zijn: dynamica, sterevolu- tie, stralingsoverdracht, en hydrodynamica. In dit onderzoek worden dynamica en sterevolutie gecombineerd in de simulatie van sterhopen en dubbelsterren. In dynamische benaderingen worden de posities en snelheden van de sterren benaderd op een bepaald tijdstip, en in sterevolutie worden de structuurvergeli- jkingen die de ster beschrijven ontwikkeld over de tijd; beide domeinen zijn het best te bestuderen doormiddel van numerieke benaderingen met een computer. Wanneer sterevolutie wordt ge¨ıntegreerd in een simulatie die de dynamica van een cluster beschrijft, betekent dit effectief dat de individuele sterren massa ver- liezen na verloop van tijd. Massa verlies kan worden ge¨ıntegreerd in de dynamische evolutie van een sterren- hoop door een bestaand programma, dat voorheen maar ´e´en domein beschreef, uit te breiden met het andere fysische domein. Een dergelijke monolithische benadering kent veel nadelen: de resulterende programma’s zijn vaak groot, be- vatten regelmatig fouten en stukken ongebruikte code, en zijn bovendien vaak nauwelijks gedocumenteerd. AMUSE, een afkorting voor ”Astrophysical MUlti- purpose Software Environment”, is ontwikkeld om deze problemen te adresseren door middel van een modulaire aanpak: bestaande programma’s, die uitgebreid getest zijn binnen het eigen domein, worden gecombineerd binnen een Python framework. In AMUSE worden de twee astrofysische domeinen als volgt gecombineerd: eerst wordt er een dynamische tijdstap genomen over een specifieke tijdstap, gevolgd door een sterevolutie stap die instantaan plaatsvindt. Het programma dat de sterevolutie verzorgt berekent nieuwe massa’s en geeft deze door aan het pro- gramma dat de dynamische simulaties verzorgt. Het dynamica programma is dan klaar om de volgende tijdstap te simuleren. AMUSE regelt de communi- catie en rekent eenheden om tussen de verschillende programma’s. Het is de vraag of deze methode een juiste representatie van de werkelijkheid geeft. Wanneer dit inderdaad het geval is, dan zouden kleinere tijdstappen vanaf een bepaalde waarde met elkaar moeten convergeren tot hetzelfde resultaat. Het voorgaande, samen met de invloed van de tijdstap in het algemeen op simulaties met dynamica en sterevolutie, is eerst onderzocht in dubbelstersystemen. Het voordeel is dat dubbelsterren analytische oplossingen hebben in tegenstelling tot sterhopen. Vervolgens wordt het onderzoek verlegd naar de simulatie van sterhopen. Echter, AMUSE is vrij nieuwe software en zal daarom eerst getest moeten worden: er wordt een computerprogramma geprogrammeerd dat ver- scheidene diagnostiek berekeningen uitvoert. Vervolgens kan deze diagnostiek worden vergeleken met bekende resultaten uit eerder onderzoek. In simulaties van sterhopen waarin alle sterren dezelfde massa hebben, maar ook in simulaties waarin twee verschillende massa componenten voorkomen, worden resultaten verkregen die inderdaad in de lijn der verwachting liggen. Dit geldt zowel voor simulaties zonder, als simulaties met massa verlies. Echter, wan- neer reproduceerbare resultaten gewenst zijn, is het ster dynamica programma dat op de grafische kaart draait niet geschikt: niet verwachtte per-simulatie- verschillen worden waargenomen wanneer de simulaties worden uitgevoerd met exact dezelfde begincondities. Om deze rede is een ander programma, dat op de
  • 10. viii II. SAMENVATTING IN HET NEDERLANDS (DUTCH) CPU draait, gebruikt voor de rest van de cluster simulaties in dit onderzoek. Dit is erg jammer, omdat de grafische kaart gespecialiseerd is in vector berekeningen is deze significant sneller in het uitvoeren van ster dynamica berekeningen. De dubbelster simulaties lieten zien dat, wanneer massa verlies in een gelijke mate plaatsvindt over de baan van de ster, resultaten nauwkeuriger zijn als de massa op een meer symmetrische manier (kijkend naar de baan) wordt ver- wijderd. Dit kan worden opgemaakt uit het feit dat simulaties dichter bij de analytische waarde lagen wanneer er meer stappen werden genomen. Het kan ook worden opgemaakt door resultaten te bekijken van test simulaties waarin de tijdstap wordt geschaald met de periode van de ster die massa verliest. Ook in cluster simulaties zijn de resultaten nauwkeuriger wanneer de tijdstap kleiner is. Hoewel de analytische waarde in dit geval niet kan worden berekend doordat deze simpelweg niet bestaat. Op een gegeven moment blijkt het dat korte tijdstappen inderdaad convergeren naar dezelfde resultaten. Het lijkt erop dat kleinere tijdstappen nodig zijn wanneer het cluster compacter is.
  • 11. Contents Preface i Abstract iii Popular summary v i Summary in English . . . . . . . . . . . . . . . . . . . . . . . . . v ii Samenvatting in het Nederlands (Dutch) . . . . . . . . . . . . . . vii 1 Introduction 1 1.1 Computational astrophysics . . . . . . . . . . . . . . . . . . . . . 2 1.1.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2 Cluster evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.1 Brief overview of the relevant literature . . . . . . . . . . 6 1.3 Problem definition . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 Methods 11 2.1 Multi-physical software . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.1 AMUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2 Stellar dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2.1 Hermite integration scheme . . . . . . . . . . . . . . . . . 14 2.2.2 Tree codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2.3 Plummer model . . . . . . . . . . . . . . . . . . . . . . . . 16 2.2.4 Salpeter initial mass function . . . . . . . . . . . . . . . . 17 2.2.5 Special purpose hardware . . . . . . . . . . . . . . . . . . 18 2.2.6 Universal variable formulation . . . . . . . . . . . . . . . 20 2.3 Stellar evolution . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3.1 Timescales of stellar evolution . . . . . . . . . . . . . . . . 21 2.3.2 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.3.3 Mass loss (Single star evolution) . . . . . . . . . . . . . . 23 2.3.4 Mass loss II (Binary evolution) . . . . . . . . . . . . . . . 25 2.3.5 Fast models: Single Star Evolution (SSE) . . . . . . . . . 26 3 Tests and diagnostics 29 3.1 Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2 Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.1 One-component simulations . . . . . . . . . . . . . . . . . 33 3.2.2 Two-component simulations . . . . . . . . . . . . . . . . . 37 3.2.3 Simulations incorporating mass loss . . . . . . . . . . . . 40
  • 12. x CONTENTS 4 New results: binary systems 47 4.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.1.1 WR runs . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.1.2 AGB runs . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.1.3 Test runs . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5 New results: cluster simulations 63 5.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6 Discussion, Conclusion, and Recommendations 67 A Code snippets 69 1.1 Cluster simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 69 1.2 Binary simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 B Parameters 73 Bibliography 75
  • 13. Chapter 1 Introduction Observations suggest that stars are formed in giant molecular clouds with a mass of ∼ 105 M and a typical size of ∼ 10 pc (Pols, 2007). The molecu- lar cloud is in pressure equilibrium with its surroundings; star formation starts when this equilibrium is disturbed, for instance, by the perturbation caused by a supernova or a collision with another cloud. The condition for the molecu- lar cloud to be stable against such perturbations is given by the Jeans mass (MJ 105 M · (T/100K)1.5 n−0.5 , where n is the number density in cm−3 ). When a part of the cloud violates this criterium it will undergo a free-fall col- lapse. With the density going up, the Jeans mass within the collapsing cloud goes down, leading to fragmentation. The fragmentation results in stars being formed in clusters. Such stellar clusters are fascinating objects. Our own sun was probably formed in a cluster, so an understanding of cluster evolution can tell us something about our own origin. More detailed information about cluster evolution and a brief overview of some of the relevant literature is given in Chapter 1.2. Over time the structure of the individual stars will change due to stellar evolu- tion, while the cluster as a whole also evolves dynamically. Both these astrophys- ical domains are best studied with numerical approximations using a computer. Stellar dynamics requires numerical approximations when more than two parti- cles are involved. Furthermore, the stellar structure equations are too complex to be solved analytically, and there are not enough detailed observations to study the impact of mass loss, by stellar evolution, on the dynamical cluster evolution. Using a computer to investigate these problems means that this re- search project belongs to the field of computational astrophysics. In Chapter 1.1 computational astrophysics is described in more detail and is also put into a historic perspective. This research project focusses on the most realistic method to combine stellar evolution and stellar dynamics: life stellar evolution is combined with dynam- ical n-body simulations. Existing, and thus well tested, packages of the two astrophysical domains are connected in a modular software framework called AMUSE1 (See Chapter 2.1). The time step for stellar evolution to take place can have a significant impact on the dynamical evolution of a stellar system. This can, for example, be seen 1AMUSE is an abbreviation of Astrophysical MUltipurpose Software Environment
  • 14. 2 CHAPTER 1. INTRODUCTION in binary evolution, where the binary dissolves if half or more the mass is lost instantly, while the system can never dissolve when mass is lost in a adiabatic manner (see also Chapter 2.2.4). This research project investigates the influence of the time step in the simulation of stellar clusters. In AMUSE, first a dynam- ical step is taken over a certain step dt, followed by an instant step of stellar evolution. Is this method accurate, which time steps converge to qualitatively the same results, and how does this depend on the mass function and the initial density of the stellar cluster? The investigation of the time step will start with binaries, which have analytical solutions (Chapter 4), and will then be extended to stellar clusters (Chapter 5). However, because AMUSE is fairly new (developed since 2006), it has to be tested first. This will be done by the reproduction of some of the results found in earlier papers. A qualitative comparison, and the diagnostics used to analyze the stellar cluster, are described in Chapter 3. In Chapter 2 it is described how the stellar cluster was initiated and evolved over time. In this project the initialization of the particles (setting masses, velocity, and position) is done using a Plummer sphere (Chapter 2.2.3). In simulations where a more realistic mass distribution is desired, a Salpeter mass function is used (Chapter 2.2.4) to set the masses. Stellar dynamical simulations are done with the hermite0 and phiGRAPE soft- ware packages. The latter was initially designed to run on the special purpose hardware called GRAPE, but was redisigned to work on a GPU (Chapter 2.2.5). Both these integrators follow the Hermite integration scheme (Chapter 2.2.1). The SSE package (Chapter 2.3.2) was used to perform the life stellar evolution. It is concluded that not all the dynamical packages are suitable in case re- producible results are desired, and that the time step size can have a significant effect on the dynamical simulations, of binaries as well as stellar clusters, that incorporate stellar evolution. The differences are most noticeable when the clusters are compact, and in binary simulations with high mass-loss rates. 1.1 Computational astrophysics In computational astrophysics computers are used to solve astrophysical prob- lems numerically. It is an interdisciplinary science comprising observational astronomy, theoretical physics, and computer science. Numerical astrophysics is applied in the simulation of n-body systems, fluid dynamics, structure and evolution of stars, and radiation transfer; among other things. Although numerical solutions are only approximations, very complex problems can be solved numerically and with a high degree of accuracy. Computational astrophysics offers a way to test a theory. Observed phenomena such as collisions between galaxies, the behavior of young stellar clusters, and binary evolution can be reproduced using a computer; in many ways computational astrophysics lies between observation and theory. An interesting implementation of computational astrophysics is the numerical solution to the n-body problem: the problem of predicting position and velocity of a set of n gravitationally interacting particles. The differential equations de- scribing the motion of the n particles can only be solved analytically for n = 2,
  • 15. 1.1. COMPUTATIONAL ASTROPHYSICS 3 and in certain special cases for n = 3 (e.g. the Lagrange points). Solving a higher order system seemed impossible and in 1885 a price was announced for a solution to the n-body problem. The problem could not be solved, it turned out that general solutions of order n ≥ 3 can only be approximated numerically. The current situation is that special purpose supercomputers can simulate in the order of 106 particles within a reasonable accuracy (Harfst et al., 2007). See also Chapter 2.2. 1.1.1 History The first electromechanical computers were used by the military in World War II to break codes. The first electronic general-purpose computer, ENIAC2 , was designed to compute artillery firing tables, although it was first used for compu- tations regarding the hydrogen bomb. The army funded this $500.000 computer, which became operational in 1946. The ENIAC had a remarkable size of 60 m3 and most of the programming was done by six women using patch cables and switches. The ENIAC had a record uptime of five days and was taken out of production in 1955. One of its main shortcomings was the low amount of mem- ory to store programs, IBM cards had to be used as input instead. With the first computers came the first extensive use of numerical models, such as the Monte Carlo method. The use of a computer to study numerical models was quickly adopted in astrophysics. In the 1950s the first astrophysical codes were constructed to describe stellar structure (Heger et al., 2000), for example, in 1956 a computer was used for the direct integration of the stellar structure equations while fitting the boundary conditions (Haselgrove and Hoyle, 1956). Different factors contributed to the fast development of computer science. The invention of high-level programming languages made it evident for scientists to write numerical methods. Most important were compiled languages such as Fortran (1953) and C (1972), object orientated languages such as C++ (1983) and Java (1994) and interpreted languages, for instance, Perl (1987) and Python (1989). Another important factor was the development of software aimed at col- laboration, ie. Apache’s Subversion and comment generators such as Doxygen and Sphinx. Results could also be viewed in higher quality with the develop- ment of graphical plotting programs, for example, gnuplot and matplotlib, and visualization software such as OpenGL. Perhaps the most important factor was the exponential growth of hardware performance over time: the CPU transistor count (see Figure 1.1), hard drive capacity, graphical cards, monitors, and memory. With this fast development of computers — desktop machines as well as special purpose supercomputers — simulations became more complex and gave a more accurate representation of reality. This ultimately lead to an increase in popularity of computational astrophysics (see for instance Figure 1.2, where the exponential growth of sci- entific papers about n-body simulations is plotted). 2Electronic Numerical Integrator and Computer
  • 16. 4 CHAPTER 1. INTRODUCTION Figure 1.1: Intel’s co-founder Gordon E. Moore described a trend in the tran- sistor count on CPUs in a 1965 paper. The count doubled every two years and Moore predicted that this trend would continue for at least ten years (Figure from Intel, inc.). Figure 1.2: The occurrence of the quoted text ”n-body simulation” in abstracts of arXiv e-prints. Data for this graph was obtained using the Harvard abstract server. This graph illustrates the growing popularity of numerical methods in astrophysics.
  • 17. 1.2. CLUSTER EVOLUTION 5 1.2 Cluster evolution In this section the properties of stellar clusters in general are described, followed by an overview of the relevant literature, the most important results, how they were obtained, and finally their similarities and differences will be discussed. Globular clusters are relatively clean realizations of the classical n-body prob- lem; they contain little gas or dust, they are relatively isolated in space, and the stars are approximately in the same stage of evolution (McMillan, 2003). Furthermore, the stars are relatively old, which weakens the effect of stellar evolution on the dynamical evolution of the globular clusters. Open clusters are ”dirty” in the way that they do include gas and dust, are influenced by stellar evolution of massive stars, and are affected by the galactic tidal field (McMil- lan, 2003). It could be argued that globular clusters are very rare and are only ”clean” because they survived the ”dirty” processes that destroyed most of their siblings (McMillan, 2003). In the Milky Way there are in the order of 102 known globular clusters (Harris, 1996). The majority of galaxy clusters is located within 10 kpc of the galactic center, but they are also found in the outer parts of the halo. Globular clusters are the oldest objects in the galaxy; they consist of mainly old stars with the same, low, metallicity and contain almost no gas and dust. The stars in these clusters are at the same stage in stellar evolution, which can be an indication that the stars have been formed at the same time. It is however unknown how globular clusters form. The masses of the Milky Way clusters range from 103 M to 2.2·106 M , which leads (based on the luminosity function) to a typical mass of 2 · 105 M (Portegies Zwart et al., 2010). Open clusters are formed in giant molecular clouds, they are loosely bound and become disrupted by close encounters, both internally and with other clusters or clouds (Karttunen et al., 2003); the clusters typically survive for ∼ 108 yr. The stars roughly have the same age and metallicity, and their radiation pressure eventually removes the gas remaining from the molecular cloud from which the cluster was formed. In this research project stellar clusters, consisting of ∼ 103 stars, are simulated. Alternations take place in the presence of an initial mass function and/or stellar evolution. Assumptions are made to secure more cost efficient simulations; the cluster is considered to be isolated, thus ignoring tidal interactions and gravi- tational shocks, and, in case of stellar evolution, the gas is instantly removed without interaction with the stars in the cluster. Furthermore, the particles all have zero radius, thus preventing collisions and mergers, are all assumed to be zero age main sequence stars at the start of the simulation, and there is no gas left from the molecular cloud from which the cluster originated. Although these specific simulations are not intended to mimic the evolution of a real stellar cluster, globular clusters are expected to behave more like the simu- lations in which stellar evolution is turned off, while open clusters are expected to show a similar behavior to the situation in which stellar evolution does take place. The distinction between these two type of clusters is based on their size and age; globular clusters consist of 105 , primarily old, stars, and the more loosely bound open clusters typically contain ∼ 103 , mostly young, stars.
  • 18. 6 CHAPTER 1. INTRODUCTION 1.2.1 Brief overview of the relevant literature Various processes are of importance when studying the numerical outcome of (isolated) cluster simulations: relaxation, equipartition, core collapse, mass seg- regation, binary formation, and mass loss. This section describes these cluster evolution processes briefly. Remnants of the dynamical process called core collapse, the core size becoming (formally) zero and the density going to infinity, are observed as black holes in the center of globular clusters, for instance in the M15 cluster (G¨urkan et al., 2004). In single-component systems, containing only equal mass stars, core collapse is initially driven by the system its tension towards thermal equilibrium. A thermal velocity distribution is obtained by small changes of the particles ve- locity due to two-body interactions; a phenomenon called relaxation (Khalisi et al., 2007). The relaxation time is the time needed to deflect the direction of a star’s movement by 90 percent relative to its orbit (Khalisi et al., 2007). Av- erage relaxation times for clusters range from 107 to 1010 years (Spitzer, 1987); the dynamical evolution of a cluster is comparable to the relaxation time. A single-component system reaches dynamical equilibrium on a crossing timescale: tcr = (GM/R3 vir)−1/2 , where M is the total mass, G the gravitational constant, and Rvir the virial radius: the radius within which the cluster is in virial equi- librium (McMillan, 2003). Thermal evolution takes place on the relaxation timescale, half mass relaxation time is given by trh ∼ (N/8 log Λ) tcr, where N is the number of particles, and Λ ∼ 0.1N (Spitzer, 1987). The system, however, cannot reach thermal equilibrium because of the finite es- cape velocity (Quinlan, 1996); when stars escape the core must compensate for the lost energy by contracting. Because of its contraction the core heats up and energy is transfered to the surrounding stars. This causes further contraction, generating more heat inside the core. This instability is called the gravothermal catastrophe (Quinlan, 1996). When the system is near core collapse, the physics becomes more complex: massive stars in the core can evolve, stars can merge, and binaries can form inside the core (Quinlan, 1996). Various numerical methods exist for the dynamical simulation of a stellar clus- ter: direct or tree code n-body integrators, direct or Monte Carlo solutions to the Fokker-Planck equation, and gaseous models. The core collapse is often assumed to take place between 12 to 19 half-mass relaxation times (Quinlan, 1996). More specific, for a Plummer sphere, the well-known value of 10trh is often used (G¨urkan et al., 2004). If point masses are used the mergers and collisions can be ignored. Several pro- cesses are left to be discussed, including: binary formation, mass segregation, and stellar evolution. When binaries harden — become more strongly bound — because of interaction with a third body, they can kick this star out of the core; the binding energy of the core becomes smaller, causing the core to re-expand in order to reestablish dynamical equilibrium (Makino, 1996). In this way hard binaries, with a higher binding energy than the average kinetic energy of the particles in the cluster, can stop core collapse. When different masses are initialized using a simple two-component mass func- tion or a power law mass distribution, a process called mass segregation will become important. On their way to energy equipartition, more massive stars will give some of their kinetic energy to stars with lower masses. This causes
  • 19. 1.2. CLUSTER EVOLUTION 7 the latter to gain velocity, and causes their orbits to widen. The former will lose some of their kinetic energy, and will sink towards the center of the cluster; en- ergy is thus transported outwards. Larger differences between the masses allow a more efficient way of energy transport to the outer regions, and thus speed up the core collapse. As the mass segregation is in progress, the density of the core increases, leading to a shorter relaxation time. This leads to an increase in the energy transfer rate (G¨urkan et al., 2004). When the higher-mass stars sank to the center, and the less-massive stars moved to the outer regions, the cluster is said to be segregated (Vesperini et al., 2009). Observational evidence for mass segregation is found in, for example, the Trapezium cluster of Orion and in the young open cluster NGC 6231 (Khalisi et al., 2007). Some clusters seem to have segregated faster, based on their age, than predicted by their segregation timescale. This lead to a new theory of primordial mass segregation: massive stars are more likely to form in the center of star forming regions (Vesperini et al., 2009). Mass segregation has a strong effect on the dynamical evolution of a cluster; the timescale for core collapse is drastically shortened. Empirical studies of the outcome of n-body simulations show that the timescale, of a two- component system, of mass segregation scales with 1/µ, where µ is the mass of the high mass component divided by the mass of the low mass compo- nent (Fregeau et al., 2002). The timescale for core collapse is also proportional to 1/µ: tcc,µ ∝ 1 µ tcc,1, which is in line with simple theoretical arguments (Khal- isi et al., 2007). When a more realistic initial mass function (IMF) is used, ie. the Salpeter IMF (see also Chapter 2.1.4), core collapse occurs after 0.1 trh(0), where trh(0) is the initial half mass relaxation time (G¨urkan et al., 2004). This means that dynamical evolution can be accelerated roughly by a factor 100 due to mass seg- regation. For a star of mass m and a mean cluster mass < m > the segregation timescale is tseg ∼ tR < m > /m, where tR is the relaxation time (McMillan, 2003). In a semi-analytical paper, Hills (1980) shows that a cluster expands when mass is removed and dissociates if more than half the mass is removed within a crossing time, hereafter referred to as fast mass loss. After a fast removal of gas, the system has to find a new radius that satisfies the virial theorem for the new energy. In case of slow mass loss, long compared to the crossing time, the system remains in virial equilibrium and no amount of mass loss can dissociate the sys- tem; this type of mass loss is called adiabatic mass loss. Using the virial theorem for an ideal gas (T0/V0 = −0.5, where T0 = M0 < V 2 0 > /2 is the kinetic energy and V0 = −GM2 0 /(2R0) the potential energy) to obtain the velocity dispersion (< V 2 0 >= GM0/(2R0)) and by comparison with the energy after fast mass loss (E = −GM2 /(4R)) Hills found that R/R0 = (M0 − ∆M)/(2[M0/2 − ∆M]). The equation for adiabatic mass loss is obtained by replacing ∆M with −dm and (R/R0) by [(R + dr)/R]. After separation and integration the result is: R/R0 = [M0/(M0 − ∆M)]. These results are similar to those found in binary systems: Jeans mode mass loss in case of the adiabatic variant, and supernova mass loss in case of the fast removal of gas. See also Chapter 2.3.4. The work of Hills was refined by Boily and Kroupa (2003b), hereafter BK, who showed, both semi-analytical and with n-body simulations, that dissociation also depends on the initial mass function; up to 50 percent of the stars may
  • 20. 8 CHAPTER 1. INTRODUCTION remain bound when the fraction of mass remaining in the cluster ( ) is smaller than 1/2. BK find that Hills argument holds for clusters in virial equilibrium that undergo a sudden mass loss. But Hills’ paper fails to explain the obser- vational evidence of bound stellar clusters from which 70 percent of the mass, in the form of the molecular cloud, was removed from the system. They argue that a stellar cluster will survive mass loss of more than 60 percent if the stellar velocity distribution favors stars with low velocities. This is the case for a mass distribution with a massive core and high-binding energy. They found that, in case of a Plummer distribution, the fraction of bound stars drops very rapidly around = 0.44 and after 0.4 no stars remain bound. The papers by BK and Hills were intended for mass loss by the removal of the gas from which the cluster originated, but might as well be applied to simula- tions in which the molecular cloud is already removed at t = 0. In this case the system would dissolve if roughly half or more of the mass is lost by the evolution of massive stars. This means that mass loss, and the possible dissociation that goes with it, is only important during the early stages of dynamical evolution due to the short lifetime of massive stars. Mass loss can significantly slow down core collapse, or prevent core collapse from taking place. In segregated clusters mass loss by stellar evolution causes a stronger expansion than for unsegregated clusters; strongly segregated clusters may therefore dissolve rapidly (Vesperini et al., 2009). What follows is a brief description of the methods and results in important papers regarding the combination of stellar dynamics and stellar evolution. Ap- plegate (1986) argued that, if the mass distribution allows enough massive stars, the combination of mass segregation and stellar evolution will dissolve the cluster before core collapse. A cluster without massive stars will undergo a rapid core collapse instead. More specific, Applegate found that mass functions with a steeper slope than N(m) ∝ m−2 collapse rapidly; note that the Salpeter IMF has a slope of −2.35. Applegate used a relatively low upper mass cutoff: 15 mass groups were made ranging from 4M to 0.354M . Chernoff and Weinberg (1990), hereafter referred to as CW, used a more so- phisticated method to confirm and refine Applegate’s findings. CW used a Fokker-Planck equation with a simplified description of stellar evolution, a ta- ble of initial and final masses from which they linearly interpolated the initial masses, to simulate initially unsegregated models initialized according to the King model. They used initial stellar masses ranging from 0.4M to 15M dis- tributed with the power law slopes 1.5, 2.5, and 3.5. They find that ”mass loss during the first 5 · 109 yr is sufficiently strong to disrupt weakly bound clusters with a Salpeter IMF”. Fukushige and Heggie (1995), hereafter FH, used the same table for stellar evolution to investigate the evolution of the same King models and power law slopes for the IMF. The difference is that FH used a second-order n-body inte- grator with predictor-corrector scheme and shared, constant, time step (see also Chapter 2.2). The lost mass is assumed to leave the cluster without interaction. Their results are qualitatively in agreement with CW, although FH do obtain longer, sometimes in the order of a magnitude, lifetimes for disrupted systems. Portegies Zwart et al. (1998) used a more sophisticated treatment of stellar dynamics, with a fourth-order Hermite integrator with individual time steps (see also Chapter 2.2) running on a GRAPE-4 cluster (see also Chapter 2.2.5),
  • 21. 1.3. PROBLEM DEFINITION 9 and stellar evolution, with fitting formula based on detailed models by Eggle- ton. Qualitative agreement is made with the FH model, but the papers are in disagreement about the lifetime of dissolving clusters: the FH model has a shorter lifetime by roughly a factor 20. Vesperini et al. (2009) use the starlab package, an all in on multi-physics package, to investigate the influence of mass segregation on stellar dynamics combined with stellar evolution. Mass is extracted with scaled Plummer mod- els; the scale radius is set smaller than the radius of the original cluster. Sub- tracting mass from a segregated cluster leads to earlier expansion than in the non-segregated case; mass segregation thus has a destructive impact on the dynamical evolution of a stellar cluster. 1.3 Problem definition Simulations of stellar clusters that incorporate stellar evolution usually use all- in-one software packages. In general the stellar dynamics code is extended to include stellar evolution. In this research project a new, modular based, software framework called AMUSE will be used to combine these different astrophysical domains (see also Chapter 2.1.1). AMUSE is fairly new; the incorporation of stellar evolution has not yet been fully tested. First, dynamical evolution takes place over a certain time step ∆t, after which the particles are synchronized (by the n-body integrator), followed by an instant step of stellar evolution. This process repeats itself until t = tend. The question is whether stellar clusters converge to, qualitatively, the same evolutionary outcome for different time steps. This could be tested for segregated and unsegregated stellar clusters because of the significant impact on the dynamical evolution imposed by such segregation. Furthermore, another variable that needs to be tested is the density of the cluster; a higher density speeds up the evolution, and a different time step might be required for an accurate simulation. Because the dynamical evolution of stellar clusters is very complex, a binary system will be studied first. The development of the semi major axis, and eccentricity, over time will be compared in models with different mass loss rates and time steps, varying from adiabatic limit, to the limit in which the time step is much larger than the binary period. Particularly interesting could be the case in which the mass loss takes place with the same step as the binary its period. Around core collapse, the number of binaries near the center of a stellar cluster suddenly increases. The influence of the time step on binary evolution can therefore also be important for cluster evolution. There also might be a certain, useful, analogy between binary simulations and cluster simulations. However, because AMUSE is fairly new, the software framework needs to be tested first: a qualitative comparison with well known results from the past is needed.
  • 22. 10 CHAPTER 1. INTRODUCTION
  • 23. Chapter 2 Methods The simulations in this research project include stellar dynamics combined with stellar evolution. The main program used for stellar dynamics was the phi- GRAPE program on the GPU. This direct n-body integrator follows the fourth order Hermite predictor-corrector integration scheme with blocked time steps. Furthermore, BHTree was used as a computationally cheap method to test the calculations of various diagnostics. Both methods, as well as special purpose hardware, are explained in Chapters 2.2.1 and 2.2.2 respectively. However, be- fore the n-body simulations can take place, the cluster first has to be initialized. This is done using the Plummer sphere (Chapter 2.2.3) and the Salpeter initial mass function (2.2.4). Special purpose hardware, the GPU, is used to calculate parts of the Hermite integration scheme. Because phiGRAPE was originally designed to run on a GRAPE cluster, both types of hardware are discussed in Chapter 2.2.5. Mass loss is also investigated in binary systems. The binary simulations were done using the twobody program. Twobody uses analytical formulae based on the extension of Kepler’s equations in order to apply them to non-elliptic orbits. The twobody program is further explained in Chapter 2.2.6. The Single Star Evolution (SSE) program by Onno Pols is used to simulate stellar evolution. SSE is based on fitting functions of detailed models. First a quick overview of stellar evolution, and the assumptions that can be made to speed up numerical methods, are given, and then the SSE program is explained in more detail (Chapter 2.3.5). Mass loss plays a big role in this research project, both in binary systems and in stellar clusters. In Chapter 2.3.3 and 2.3.4 it is explained where (evolutionary wise), and on which timescale, the mass loss occurs. Finally, multi-physics software is needed to study the problem defined in Chap- ter 1.3. The modular based AMUSE framework was chosen and will be further explained in Chapter 2.1.1. 2.1 Multi-physical software The Universe is a multi-physical environment in which astrophysical problems occur on multiple scales. Stellar dynamics, radiation transfer, stellar evolution, and hydrodynamics all have to be considered in a realistic simulation of, for
  • 24. 12 CHAPTER 2. METHODS example, a stellar cluster. Scales may vary from 104 m and 10−3 s to 1020 m and 1017 s (Portegies Zwart et al., 2009). Different approaches can be considered when incorporating such a multi-scale, and multi-physics, environment into a numerical model. First there is the mono- lithic approach, a program that first simulates one part of astrophysics, for in- stance stellar dynamics, is extended to cover another field, for example stellar dynamics. This approach has proven to have several disadvantages: resulting packages are often large, prone to errors, suffer from bugs, are rarely docu- mented, have sections of dead code, and lack homogeneity (Portegies Zwart et al., 2009). The software package AMUSE1 was created to address these problems. It uses a modular approach: existing, and therefore well documented and tested, pack- ages are wrapped in an interface layer and combined into a larger framework (Portegies Zwart et al., 2009). The AMUSE package will be described further detail in the following section. A modular approach has various advantages. Different packages from within the same domain can be combined with packages from other astrophysical domains, and also new modules can be incorporated, without having to understand the framework in detail. The barrier to use the modular framework is therefore also low, because less understanding of the framework is required compared to the monolithic approach. 2.1.1 AMUSE Figure 2.1: AMUSE is designed to work in 3 layers. (Figure from amusecode.org) AMUSE was first developed during various MODEST2 workshops and the first lines of code were written in 2006. Current develop- ment is done at the Leiden Observatory and funding is provided by a NOVA grant. The AMUSE architecture is based on a 3 layer design (see Figure 2.10): a user script layer, an AMUSE code layer, and a legacy code layer. Each layer adds functionality to a lower layer. The legacy code layer consists of the existing astrophysical software packages and has a built in functionality to communicate amongst these packages. The AMUSE code layer provides an object orientated interface to the legacy layer and offers extra function- ality in the form of modules, such as, unit conversion, file handling, initialization of stel- lar dynamical code through a Plummer sphere and/or a Salpeter mass function. The extra functionality also include various functions to, for instance to compute the ki- netic energy and the potential. The communication between the AMUSE layer and the legacy layer is based on the MPI3 framework, a widely used communi- cation protocol for parallel computing. Finally, the user script layer consists of 1AMUSE is an abbreviation of Astrophysical MUltipurpose Software Environment 2MODEST is short for MOdeling DEnse STellar systems. 3MPI is an abbreviation of Message Passing Interface
  • 25. 2.2. STELLAR DYNAMICS 13 one or more Python scripts which evaluate certain astrophysical problems. module reference lang. brief description bhtree Barnes and Hut (1986) C++ Barnes-Hut tree code hermite0 Hut et al. (1995) C++ Direct n-body integrator with shared, but variable, time step. phiGRAPE Harfst et al. (2007) F77 Direct n-body integrator with individual, blocked, timestep. Specialized to run on a GRAPE cluster. twobody Bate et al. (1971) Python Semi analytical code based on Kepler’s laws smallN C++ Direct integrator for few body systems. sse Hurley et al. (2000) F77 Stellar evolution based on analytical formulas fitted to detailed models. bse Hurley et al. (2002) F77 Binary evolution algorithm. evtwin Eggleton (2006) F77 Detailed stellar evolution model. fi Pelupessy et al. (2004) F90 Parallel code for galaxy sim- ulations. capreole F90 Grid hydrodynamics code by Garrelt Mellema. Table 2.1: Modules currently implemented in AMUSE. 2.2 Stellar dynamics To predict the position and velocity of a set of n particles at any given time (the n-body problem), based on Newton’s law of universal gravity, the equation of motion needs to be solved with a given initial position and velocity ai = G j=i mj rij r3 ij i = 1, 2, ..., n (2.1) where ai is the acceleration of particle i, G the gravitational constant (which is set to one in n-body units, together with the initial total mass), mj the mass of particle j, and rij the distance between particles i and j. There are two popular types of numerical methods to approximate this equation. One involves direct summation and the computing speed scales with N2 , where N is the number of particles; this method is used for dense clusters and can simulate up to ∼ 106 particles on special purpose hardware (Portegies Zwart et al., 2009). The other method uses a tree code and scales with N log N. This method can be used for a larger number of particles, but is significantly less accurate than the direct method (Spurzem, 1999).
  • 26. 14 CHAPTER 2. METHODS 2.2.1 Hermite integration scheme In case of direct summation a popular integration method, due to the rela- tively small number of scalar operations, is the fourth-order Hermite predictor- corrector integrator with block time steps (Makino and Aarseth, 1992). Each particle has its own position (ri), velocity (vi), acceleration (ai), jerk (˙ai), time (ti), and timestep (∆ti). The integration proceeds along the following steps (1) The initial time steps can be set using a simple formula ∆ti = ηs |ai| |˙ai| (2.2) Where ηs = 0.01 usually gives sufficient accuracy (Harfst et al., 2007). (2) The global time t is set to the time corresponding to the particle with the minimum time ti + ∆ti. (3) The position and velocity of all the particles are predicted using a Taylor expansion rp,j = rj + (t − tj)vj + (t − tj)2 2 aj + (t − tj)3 6 ˙aj (2.3) vp,j = vj + (t − tj)aj + (t − tj)2 2 ˙aj (2.4) (4) With the predicted velocity and position, the acceleration and jerk of particle i at global time t is calculated using ai = G j=i mj rij (r2 ij + 2)3/2 (2.5) ˙ai = G j=i mj vij (r2 ij + 2)3/2 + 3(vij · rij)rij (r2 ij + 2)5/2 (2.6) where is the softening parameter. This parameter is used to prevent the ac- celeration and jerk from going to infinity. This parameter should have a small value to keep the simulations realistic. (5) The position and velocity are corrected with the higher order Taylor ex- pansion ri = rp,i + ∆t4 i 24 a (2) 0,i + ∆t5 i 120 a (3) 0,i (2.7) vi = vp,i + ∆t4 i 6 a (2) 0,i + ∆t5 i 24 a (3) 0,i (2.8) a (2) 0,i = −6(a0,i − a1,i) − ∆ti(4˙a0,i + 2˙a1,i) ∆t2 i (2.9) a (3) 0,i = 12(a0,i − a1,i) + 6∆ti(˙a0,i + ˙a1,i) ∆t3 i (2.10) where a (2) 0,i and a (3) 0,i are the second and third time derivative of the acceleration at ti, respectively. These are obtained by inversion of the Taylor expansion of a0,i.
  • 27. 2.2. STELLAR DYNAMICS 15 The quantities a (2) 1,i and a (3) 1,i are the time derivatives at ti +∆ti, and ∆ti = t−ti. (6) Recalculate the timestep using the standard formula (Aarseth, 1985). ∆ti = η |a1,i||a (2) 1,i | + |˙a1,i|2 |˙a1,i||a (3) 1,i | + |a (2) 1,i |2 (2.11) In case the simulation runs on a GRAPE cluster, the particles should be grouped using a block time step in favor of a better performance (Harfst et al., 2007). The timestep is then replaced by ∆ti,b = (1/2)n , where n is chosen with the following condition 1 2 n ≤ ∆ti ≤ 1 2 n−1 (2.12) (7) Start over from step (2) When diagnostics of the cluster are calculated the particles have to be syn- chronized to global time t. To do this the position and velocity of all particles have to be predicted in order a(3) . Since this was already calculated during the time step calculation, all that needs to be done is storing these values. 2.2.2 Tree codes Figure 2.2: Tree code: splitting the cells (two dimensions). In the tree code method a cell is fit around all the particles. This root node contains more than one particle and is further split into 8 child nodes. This operation is recursive and is re- peated until all particles have their own cell (the leaf nodes), as is illus- trated in Figure 1.3. The force calculation proceeds as fol- lows: if the size of a cell is given by l and the distance to the center of mass of the cell is given by d, then the parti- cles are grouped when l/d < θ. Here θ is the opening angle, and is often set to a value around unity (Aarseth, 2003). When l/d > θ the cell is split into eight cells, recursively repeated until all particles are included. A tree code reduces the complexity from the direct summation method O(N2 ) to O(N log N). This comes at a price, the tree code method is sig- nificantly less accurate then the direct integration method (Spurzem, 1999). The accuracy can be improved by reducing the value of θ, but when limθ→0 the complexity increased to O(N2 ), with additional costs for memory storage.
  • 28. 16 CHAPTER 2. METHODS 2.2.3 Plummer model H.C. Plummer found a density distribution to fit the arrangement of observed globular clusters (Plummer, 1911). This density distribution was later called the Plummer model and is often used in computer models to obtain an initial density distribution of a stellar cluster. Although the model is not representing any actual class of stellar clusters accurately, it is a frequently used test case (Harfst et al., 2007). Figure 2.3: A 10,000 particle Plummer sphere: random positioned particles, of equal mass, in compliance with Plummer’s density profile. Left panel: density profile. With increasing distance from the core, the density eventually drops as r−5 . Right panel: particle position. The Plummer density distribution is found by solving the analytical n = 5 case of the Lane-Emden equation (2.14). This equation is used when the equation of hydrostatic equilibrium (2.13) is solved for a polytrope, a star with an equation of state of P = Kρ(n+1)/n , where P is the pressure, ρ the density, and n the polytropic index: dP dr = − GMρ r2 (2.13) d dr Kr2 (n + 1) nρ(n−1)/n dρ dr = −4r2 Gρ (2.14) With the boundary conditions ρ(0) = ρc and ρ(R) = 0 and by rewriting the Lane-Emden equation in dimensionless form, the equation of hydrostatic equilib- rium can be solved — either numerical or analytical. Rewriting in dimensionless form is done with ρ = λθn and r = αζ, where α = (n + 1)Kλ1/n−1 4πG 1/2 Substituting into the Lane-Emden equation gives 1 ζ2 d dζ ζ2 dθ d + θn = 0 (2.15)
  • 29. 2.2. STELLAR DYNAMICS 17 The n = 5 solution is given by θ = 1 1 + 1 3 ζ2 (2.16) It can be shown that the total mass has a finite value (Aarseth, 2008), which gives the following density distribution (the Plummer model) and corresponding potential: ρ(r) = 3M 4πa3 1 + r2 a2 −5/2 (2.17) Φ(r) = − GM √ r2 + a2 (2.18) Where a is the Plummer radius: a parameter which determines the size of the core. 2.2.4 Salpeter initial mass function An initial mass function can be used to assign masses to the particles involved in a n-body simulation. Based on observations it turned out to be convenient to express the mass distribution of a stellar cluster in the form of a power law: M−α ∝ N(M)dM (2.19) Using the observed luminosity function of solar neighborhood main sequence stars, the parameter α was determined to be 2.35 (Salpeter, 1955). The masses are restricted to a range between 0.1M and 100M , a lower mass star will become degenerate before it can ignite hydrogen, while a higher mass star would exceed the Eddington luminosity. Figure 2.4: Left panel: Number of particles vs. mass using 10,000 particles with random masses fitting the Salpeter mass function. Right panel: the result- ing mass distribution obtained by applying the Salpeter mass function to the Plummer sphere in the previous section.
  • 30. 18 CHAPTER 2. METHODS 2.2.5 Special purpose hardware Figure 2.5: Basic concept of the GRAPE-1 and GRAPE-3 special pur- pose computers (Makino et al., 1997). (Figure from J. Makino) The GRAPE4 system was designed to accelerate the expensive O(N2 ) direct summation force calculations. The first GRAPE was built at the Tokyo University in 1989, and had a perfor- mance of 240 MFLOPS5 at single pre- cision, while being more cost efficient than general purpose computers with the same performance (Makino et al., 1997). Its successor, GRAPE-2, ran at 40 MFLOPS, but at double pre- cision. Subsequently, the odd num- ber GRAPEs have single precision, while the even numbered GRAPEs have double precision. The GRAPE-3 was the first with a custom designed gravity chip and ran at a speed of 15 GFLOPS (Makino et al., 1997). The basic concept is that a general purpose computer sends the mass and posi- tion to the GRAPE, where the acceleration (1.5), jerk (1.6), and potential are calculated on a force computation pipeline6 . The results are then send back to the host computer. The GRAPE-4 was completed in 1995, it included a predictor pipeline in order to do Hermite individual time step calculations. It was the first computer to break 1 TFLOPS. In 2001 the GRAPE-6, with more pipelines and processor chips then its predecessor, was completed and its performance peaked at 64 TFLOPS (Makino et al., 2003). Figure 2.6: The four-cabinet GRAPE-4 system. (Image from J. Makino) 4GRAPE is an acronym for GRAvity PipE 5FLOPS is an acronym for FLoating point Operations Per Second. 6A pipeline is a series of data processing elements in which the output of one element is the input for the next.
  • 31. 2.2. STELLAR DYNAMICS 19 A GPU7 is designed to do vector calculations and is therefore, in theory, very suitable for force calculations. In 2007 NVIDIA released CUDA8 : a parallel computing architecture that can be used to write software for the GPU with a range of standard high-level programming languages. CUDA was used to write the Sapporo library in order to run gravitational n-body simulations on a GPU. This library is very similar to the GRAPE-6 library and therefore programs that were previously running on a GRAPE-6 system could run on the GPU without changing the source code (Gaburov et al., 2009). With a GRAPE-6 or GPU the (individual, blocked time step) integration pro- ceeds as followed: (1) The system is initialized on the CPU9 : each particle gets its own mass, position, velocity, acceleration, jerk, time, and time step. (2) The CPU produces a list of particles to be integrated at the current time step. (3) The CPU predicts the position and velocity of one of these particles and sends the result to the GPU/GRAPE-6, where the new time is stored in a reg- ister. (4) The GPU/GRAPE-6 predicts the position and velocity of all other par- ticles at that specific time. (5) The GPU/GRAPE-6 computes the force from all the other particles and sends the result to the CPU. Steps (3)-(5) are repeated until all particles in the list are done. (6) The global time is updated and the procedure is repeated from step (2) Figure 2.7: The GeForce GT340 PCI express card by NVIDIA. Force and pre- dictor calculations are done on the GPU, located under the cooler. (Image from NVIDIA, inc) 7GPU is short for Graphics Processing Unit. 8CUDA is an acronym for Compute Unified Device Architecture. 9CPU stands for Central Processing Unit.
  • 32. 20 CHAPTER 2. METHODS 2.2.6 Universal variable formulation The universal variable formulation is a method to solve Kepler’s two-body prob- lem for elliptic, hyperbolic, and parabolic orbits. The twobody program, used for the binary simulations, incorporates the analytical formulae based on this method. At any time t, velocity (v(t)) and position (r(t)) need to be calculated given the specific initial conditions v(t0) and r(t0). This is done by solving the equation of motion: ∂2 r ∂t2 + µ r3 r = 0, (2.20) where µ ≡ G(m1 +m2). It is then convenient to introduce the universal variable s, which fulfills the following equation (Danby, 1992): ∂s ∂t = 1 r (2.21) Substituting the universal variable into the equation of motion gives the follow- ing equation. ∂2 r ∂s2 + µ a r = −P, (2.22) where P is a constant and a is the semi major axis. Deriving both sides to d/ds gives a differential equation with the following set of solutions (Danby, 1992). t − t0 = r0 s c1(αs2 ) + r0 ∂r0 ∂t s2 c2(αs2 ) + µs3 c3(αs2 ), (2.23) where α = µ/a and the function cn is called the Stumpff function (Danby, 1992): cn(x) = i(−1)i xi /(n+2i)!. The value of s at time t can now be solved numerically. Position and velocity at time t can then also be found: r = r0f(s) + v0g(s) (2.24) v = r0 ˙f(s) + v0 ˙g(s) (2.25) where the functions f(s) and g(s) are given by (Danby, 1992) f(s) = 1 − µ r0 s2 c2(αs2 ) (2.26) g(s) = t − t0 − µs3 c3(αs2 ) (2.27) ˙f = − µ rr0 s c1(αs2 ) (2.28) ˙g = 1 − µ r s2 c2(αs2 ) (2.29)
  • 33. 2.3. STELLAR EVOLUTION 21 2.3 Stellar evolution To determine the evolution of a single star, the following set of 4+N differential equations (Pols, 2007) need to be solved simultaneously for a certain given equation of state (P = P(ρ, T, Xi)). Mass conservation: ∂r ∂m = 1 4πr2ρ (2.30) Hydrodynamic changes: ∂P ∂m = − Gm 4πr2 − 1 4πr2 ∂2 r ∂t (2.31) Thermal changes: ∂l ∂m = nuc − ν − T ∂s ∂t (2.32) Energy transport: ∂T ∂m = − Gm 4πr4 T P (2.33) with = rad = 3κ 16πacG lP mT 4 , if rad ≤ ad ad + ∆ , if rad > ad Composition changes: ∂Xi ∂t = mi ρ ∂ni ∂t nuc [+ mixing terms] (2.34) with i = 1, 2, 3, ... N Where r is the radius, m the mass, ρ the density, P the pressure, G the grav- itational constant, t the time, l the luminosity, nuc the energy generated by nuclear reactions, ν the energy losses caused by neutrinos, T the temperature, s the entropy, the temperature gradient in either the energy transport by radiation or by convection, κ the opacity, a the radiation constant, c the speed of light, ∆ the superadiabaticity of the temperature gradient, Xi the fraction of element i, mi the mass of element i, ni the number density of element i, and the ’mixing terms’ represent the redistribution of the composition in convective regions (Pols, 2007). P, s, κ, rad, ∆ , nuc, ν, and the reaction rate ∂ni ∂t can all be expressed as func- tions of ρ, T, and Xi (Pols, 2007). This means there are 4+N unknown variables left: r, l, ρ, T, and Xi, which can all be written as function of the independent variables m and t. Therefore each of these variables has to be set at the bound- aries m = 0 and m = M. Initialization of the variables is needed at t = t0. 2.3.1 Timescales of stellar evolution Hydrodynamical changes, disruption of the balance between gravity and pres- sure (gas and radiation), of star’s structure occur on the dynamical timescale (τdyn). This timescale is the same as the time it would take for a mass shell, on distance R, to reach the center when radiation and gas pressure are suddenly removed. The speed at which the shell moves inwards is approximately the same as the free-fall velocity. This results in the following expression for the dynamical timescale τdyn ≈ R3 GM (2.35)
  • 34. 22 CHAPTER 2. METHODS The dynamical timescale of the Sun is around 5000 seconds. Changes in the thermal structure of a star occur on the so called Kelvin- Helmholtz timescale (τKH). This time is the same as a star its lifetime in case all energy is being produced by contraction. With the virial theorem, the relation between internal and gravitational energy, for an ideal gas (Eint/Egr = −1/2), the thermal timescale can be expressed as τKH = Eint L = Egr 2L ≈ GM2 2RL (2.36) The thermal timescale of the Sun is approximately 15 million years. Changes to a star its composition occur on the nuclear timescale (τnuc), which is the same as the lifetime of a star if all energy produced would come from nuclear reactions. τnuc = Enuc L = A Mc2 L , (2.37) where A is determined by the fraction of available fuel that is converted into energy. The thermal timescale of the Sun is in the order of 1010 years (Pols, 2007). In conclusion, it can be stated that: τnuc τKH τdyn. Significant mass loss usually occurs on the thermal and dynamical timescale, and is therefore rather abrupt compared to the nuclear, main sequence (MS), timescale. See also Chapter 2.3.3 and 2.3.5. 2.3.2 Assumptions Detailed stellar structure programs try to solve the above set of stellar evolu- tion equations (2.20 to 2.24) with as few assumptions as possible. However, such calculations are computational expensive, certainly when a lot of stars have to be evolved at the same time, as in the evolution of the individual stars in a stellar cluster. Various assumptions, to accelerate these expensive equations, are described below. MS stars are close to thermal equilibrium (TE), because the energy loss on the surface, the luminosity, is compensated by the energy generated by the nuclear fusion in the core. MS stars are also in hydrostatic equilibrium (HE), if they were not this would result in a dramatic evolution: an implosion or explosion on the dynamical timescale. In case of HE and TE the time derivatives in equation (1.21) and (1.22) vanish. Therefore the only time derivative left is the one that describing the composition changes, which occur on the nuclear timescale. The mechanical equations (1.20 and 1.21) can be decoupled in case of a poly- tropic equation of state: P = Kργ , where K and γ = 1+1/n are constants. For these polytropes the equation of hydrostatic equilibrium can be approximated by the numerical solutions to the Lane-Emden equation (1.14). Degenerate stars — neutron stars (n = 3) and white dwarfs (n = 3/2) — comply to such a temperature independent equation of state. In this case K is a fixed parameter (Kippenhahn and Weigert, 1994). If a MS star is approximated by an Ideal gas equation of state, then modeling can be done using a n = 3 polytrope, where K, in this particular situation, is a free parameter (Kippenhahn and Weigert, 1994).
  • 35. 2.3. STELLAR EVOLUTION 23 Another considerable simplification of the stellar evolution equations is the con- cept of homology. When two stars, scaled to the same radius, have the same mass profile, they are said to be homologous: r1(x) R1 = r2(x) R2 , where x = m1 M1 = m2 M2 (2.38) This offers the opportunity to describe one star using detailed stellar models, while all the homologous stars can be described using analytical scaling rela- tions. However, the conditions for homology are limited, see also Chapter 2.3.5. Further simplifications can be made, for instance, the computational expen- sive mixing terms can be ignored. The same can be done with the neutrino losses during MS, because these losses only become important in the late stages of evolution (Pols, 2007). The superadiabaticity, the difference between the ac- tual temperature gradient and the adiabatic temperature gradient in convective regions, can also be ignored; it can be shown that only a tiny superadiabatic- ity is needed to transport heat in convective regions (Pols, 2007). Finally, the opacity, in the energy transport equation, can be approximated with a power law: κ = κ0ρa Tb , where a = 1 and b = −3.5 in case of Kramer’s opacity law (Pols, 2007). 2.3.3 Mass loss (Single star evolution) Mass loss can have a substantial impact on stellar evolution, especially for mas- sive stars (M 15M ), where mass loss by stellar wind is important during all stages of evolution. The mechanisms responsible for mass loss are not well understood, and can therefore impose a considerable uncertainty on the stellar evolution models. Various occurrences of mass loss will be described in the following section at the hand of evolutionary tracks of a low, and an intermediate-mass star. Evolutionary tracks can be constructed using either detailed models or models using fitting formulae (Chapter 2.2.5). The evolutionary tracks of low mass stars (< 2M ) are significantly different from that of high (> 8M ) and intermediate- mass stars. See also Figure 2.9. During the MS (Figure 2.9, points A to B) all stars evolve towards a higher lumi- nosity. Low mass stars also evolve towards a higher temperature, while high, and intermediate, mass stars evolve towards a lower temperature. Once the hydrogen in the core is exhausted, at point B, the core starts contracting. High and inter- mediate mass stars with a convective, well mixed, core suddenly find themselves without fuel for hydrogen fusion and start contracting on a thermal timescale. These stars therefore show a hook feature. When the temperature in the shell is high enough to ignite hydrogen, the hydrogen shell burning starts. This transi- tion is smooth for low mass stars. During hydrogen shell burning stars move, at almost constant luminosity, towards a lower temperature on a thermal timescale. During this phase the shell keeps on adding mass to the core, which is still con- tracting. While the core contracts, the outer layers expand, thus making the shell act like a mirror. The outer layers cool, and the convective region grows. When stars have a deep convective envelope they move in a direction of higher
  • 36. 24 CHAPTER 2. METHODS Figure 2.8: Evolutionary tracks of a 5M (left panel) and a 1M star (right panel) using a solar-like metallicity (Z = 0.02). See text for more information. (Figure from Onno Pols) luminosity along the Hayashi line: an almost vertical (and thus temperature in- dependent) line, representing the location of fully convective stars in the HRD. Figure 2.9: Various regions in the Hertzsprung-Russell Di- agram (HRD). It is during this particular phase, where the stars are close to the Red Giant Branch (RGB), that significant mass loss occurs in low mass stars. See also Table 2.1. Along the RGB the radius of the envelope increases further, making it loosely bound. It therefore becomes easier to remove mass by radiation (Pols, 2007). The rate of mass loss during the RGB is often calculated with the empirical law by Reimers (Kudritzki and Reimers, 1978): ˙M = −4 · 10−13 η L L R R M M M /yr(2.39) where η is often set to a value of order unity. Helium core burning starts when the tempera- ture of the core reaches the appropriate value. Low mass stars ignite helium, in a degenerate core, in a runaway process called the helium flash (point F). Intermediate and high mass stars ignite helium in a non degenerate core, resulting in a loop on the Horizontal Branch (HB). When the hydrogen in the core is exhausted, the process of contraction occurs again, but this time helium is ignited in a shell. The stars cool along the Asymptotic Giant Branch (AGB), where both helium and hydrogen shell burning occur at the same time. The stars in Figure 2.7 are on the AGB from point H to J. This is another phase of significant mass loss. See also Table 2.1.
  • 37. 2.3. STELLAR EVOLUTION 25 During the AGB phase thermal pulses in radius and luminosity occur due to the instability between the helium and hydrogen shell burning. It is believed that these pulses, together with the radiation pressure on dust particles in the atmosphere, are the source of the mass loss (Pols, 2007). The observational- determined mass loss rates vary from ∼ 10−7 M /yr to ∼ 10−4 M /yr. For massive stars (M 15M ) mass loss caused by stellar wind becomes im- portant in all evolutionary phases (Pols, 2007). Stars with M 30M have a mass loss timescale that is shorter than the nuclear timescale, therefore mass loss has a substantial impact on their evolution (Pols, 2007). These stars have an evolution in which mass loss will remove the envelope before the Hayashi line is reached (in which case they would be classified as a Red Super Giant). For massive stars, mass loss caused by the stellar-wind mechanism, can be approx- imated with the following empirical relation by De Jager (Nieuwenhuijzen and de Jager, 1990): log(− ˙M) ≈ −8.16 + 1.77 log L L − 1.68 log Teff K M /yr (2.40) The two empirical relations above indicate that, in general, mass loss (during all evolutionary phases) becomes more important at increasing stellar mass. 2.3.4 Mass loss II (Binary evolution) Mass transfer in a binary system can take place in a conservative (conserved mass and momentum) or non-conservative (mass and momentum loss) manner. Observations show evidence for both cases of mass transfer. Three cases of mass loss will be described in further detail: mass loss through a fast stellar wind from the donor star, mass loss by the ejection of matter from the accreting star in the form of a jet, and supernova mass loss. In case of a circular orbit, the orbital angular momentum of a binary system is given by the following equation (Verbunt, 2007) J2 = G M2 1 M2 2 M1 + M2 a (2.41) Where a is the semi major axis. A generalized equation for the case of mass transfer can be obtained by differentiating the above equation. 2 ˙J J = ˙a a + 2 ˙Md Md + 2 ˙Ma Ma − ˙Md + ˙Ma Md + Ma (2.42) Where Ma is the mass of the accretor, and Md the mass of the donor. In case of conservative mass transfer ˙J = 0 and ˙Ma = − ˙Md and hence ˙a a = 2 Md Ma − 1 ˙Md Md (2.43) This means that the orbit will shrink as long the donor has a higher mass than the accretor and will expand otherwise. In case of non-conservative mass trans- fer only a fraction of the matter is absorbed by the accretor: ˙Ma = −β ˙Md. If γ
  • 38. 26 CHAPTER 2. METHODS times the specific angular momentum of the binary is the specific angular mo- mentum loss due to mass loss (hloss = γh), then it can be shown that (Verbunt, 2007) ˙a a = −2 ˙Md Md 1 − β Md Ma − (1 − β)(γ + 1 2 ) Md Md + Ma (2.44) In case of Jeans mode mass loss, driven by a fast stellar wind, the mass from the donor leaves the binary system without interaction with the accretor. This means that hloss = a2 dω, where ad = aMa/(Md + Ma). It can be shown that in this case γ = Ma/Md and finally ˙a a = − ˙Md Ma + Md (2.45) Where ˙Md < 0 implies that ˙a > 0, and hence the orbit expands during Jeans mode mass loss. When the accretor cannot accept the mass from the donor, because of a spin-up or a large Lacc, the excess mass will be ejected. This happens usually in the form of a jet. In this case the mass leaves the system with the specific angular momentum of the accretor (hloss = a2 aω) and it turns out that ˙a a = ˙M M 2M(Md − Ma) − MdMa MdMa (2.46) It can then be shown that the orbit shrinks as long as Md/Ma 1.28. In a binary system a supernova can take place if a white dwarf is pushed over the Chandrasekhar limit by mass transfer. When it is assumed that the mass loss from the supernova is instantaneous, occurs in a circular orbit, and position and velocity are the same after the explosion as they were before the explosion, then the orbital position where the supernova takes place is the new periastron of the post-supernova orbit. The post-supernova eccentricity is then given by e = ∆M M1 + M2 − ∆M (2.47) Which means that the system will become unbound (e > 1) when more than half the mass is lost during the explosion. 2.3.5 Fast models: Single Star Evolution (SSE) In order to combine stellar evolution with the n-body simulation of a stellar cluster, a fast program is desired. SSE is such a program, it offers a fast ap- proximation of the evolution of stars and an accuracy within 5 % of that of detailed models (Hurley et al., 2000). The SSE program will be described in further detail below. SSE uses formulas, as function of time, metallicity, and mass, to approximate the evolution of core mass, radius, and luminosity from the zero age main sequence to the remnant stages (Hurley et al., 2000). The formulas are fitted based on a grid of evolutionary tracks, which were constructed using detailed — incorpo- rating convective overshooting — stellar models. The tracks are determined for
  • 39. 2.3. STELLAR EVOLUTION 27 a stellar mass range from 0.5M to 50M and metallicities ranging from 0.0001 to 0.03. First the mass function, with a specific metallicity, is fitted to get an idea of the functional form (Hurley et al., 2000), and then the fitted function is extended to a function of both mass and metallicity. Fitting functions are made for different masses and different stages of stellar evolution. Mass division is based on the maximum initial mass for which the helium flash takes place, and the maximum initial mass for which helium ignites on the first giant branch. Formulas are constructed for the main sequence, Hertzsprung gap, first giant branch, core helium burning, and asymptotic giant branch (Hurley et al., 2000). Various empirical relations are used to incorporate mass loss in the SSE pro- gram: Reimers’ formula for mass loss on the GB and beyond, de Jager’s formula for the mass loss of massive stars throughout their entire evolution, and other empirical relations for Wolf-Rayet stars and luminous blue variables. Figure 2.10: Mass loss fraction over time (in Myr) of stars with various initial masses and a solar-like metallicity (0.02). The numbers represent the initial mass in M . Stars with a higher mass lose a larger fraction of mass on a shorter timescale. An exception is the case where there is a lot of mass loss due to stellar wind, which happens during the evolution of the 50M and 90M star. These results were generated using the Single Star Evolution (SSE) program by Onno Pols.
  • 40. 28 CHAPTER 2. METHODS Stellartype O-50MO-20MB-10MA-2MF-1.2MG-1.0MK-0.6MM-0.2M EvolutionphaseTimeMassTimeMassTimeMassTimeMassTimeMassTimeMassTimeMassTimeMass MainsequenceStar0.050.00.020.00.010.00.02.000.01.200.01.000.00.600.00.20 HertzsprungGap4.341.58.819.224.59.901.16·103 2.005.62·103 1.2011.0·103 1.0075.7·103 0.60914·103 0.20 GiantBranch----24.59.891.17·103 2.005.91·103 1.2011.6·103 1.0079.7·103 0.60962·103 0.20 CoreHeliumBurning4.341.48.819.224.59.891.20·103 2.006.38·103 1.0512.3·103 0.76---- FirstAGB--9.810.127.49.421.49·103 1.986.51·103 1.0112.46·103 0.72---- SecondAGB------1.49·103 1.956.51·103 0.9612.5·103 0.59---- NakedHeliumMS4.915.7-------------- NakedHeliumHG4.911.9-------------- HeliumWD------------82.0·103 0.411.08·106 0.18 Carbon/OxygenWD------1.50·103 0.646.51·103 0.5412.5·103 0.52---- NeutronStar--9.82.3327.51.37---------- BlackHole4.911.7-------------- Table2.2:Themass(inM)ofvarioustypestars,withdifferentinitialmasses,evolvesdifferentovertime(inMyr).Resultswere generatedwithSSEusingthesamemetallicityasinFigure1.9
  • 41. Chapter 3 Tests and diagnostics 3.1 Diagnostics To analyze the dynamical evolution of a stellar cluster there are a range of diagnostics that can be calculated. But first the cluster has to be initialized; velocities, masses, and positions are set using a Plummer sphere, then the stellar dynamics package is defined. In these simulations PhiGRAPE for the GPU was chosen, because it is a fast, direct, n-body integrator. After the softening and time step parameters are set, the stellar evolution package is defined. In these simulations SSE was chosen because it is fast and accurate within 5 percent of detailed models. Then the radius of the particles is set to zero to prevent the computational expensive collisions. The initial masses are set using the Salpeter mass function. After the particles are shifted to the center of mass the diagnos- tics at t = 0 are calculated. Code snippets can be found in Appendix A. Diagnostics can be compared and separated if computations are done before and after the stellar evolution step. For instance, the energy difference caused by evolution can be separated from the energy difference caused by the n-body integrator. The AMUSE framework has built in functions to pass data from the AMUSE layer to the legacy layer, ie: from_model_to_gravity.copy_attributes(["mass"]) and the other way around, ie: from_gravity_to_model.copy() The PhiGRAPE program uses individual, blocked, time steps; the time step of 0.25 Myr is therefore a maximum time step, where the particles are synced to the same time. Synchronization makes it possible to compute diagnostics and to set new masses based on the outcome of stellar evolution. PhiGRAPE and SSE are well tested within their own domain, the values of the phiGRAPE time step and the SSE parameters are the same as the values suggested by the programmers. A suitable value of the softening parameter was determined by variation of the value over multiple n-body simulations. With high values ( ≥ 0.01 pc) the core of the stellar cluster did not collapse, and with
  • 42. 30 CHAPTER 3. TESTS AND DIAGNOSTICS low values (ie. = 0) the program became slow because of the computational expensive close encounters. What follows is a list of diagnostics with a brief explanation of how they were computed. Time: The time is calculated in both SI and n-body units. Conversion to n-body units is done using the built in function: convert_nbody.to_nbody( ) Energy: The energy error is a used as an indication for the accuracy of the n- body integrator. Conserved energy does not necessarily mean that the program is accurately representing reality, but a high energy error, on the other hand, does indicate that something is wrong. Before and after the evolution step the total energy is calculated and stored in different variables. By adding up values, energy differences are obtained for both the evolution and the dynamical steps. A total energy error is computed by comparison with the initial energy, while the total error caused by the n-body integrator is obtained by summing the per step values. The energy is obtained using the built in functions: gravity.kinetic_energy + gravity.potential_energy Mass: Total and per step information about the total mass of the cluster, and the mass lost by evolution, is obtained by a simple loop through all the particles in python: totalMass = 0.0 for x in particles: totalMass += x.mass.value_in(units.MSun) T/V: A stable cluster obeys the virial theorem of an ideal gas in hydrostatic equilibrium: T/V = −0.5, where T is the kinetic energy, and V the potential energy. The fraction T/V therefore says something about the stability of the cluster. The built in functions are used to obtain kinetic and potential energy. Half-mass radius: The half-mass radius gives an idea of the size of the cluster, and is later used to determine the number of stars that escaped from the cluster. The calculation is done using built in python functions. First all particles are sorted by their distance from the center of mass, then the masses are summed until half-mass: stack = [] for x in particles: stackSize = len(stack) stack.append([stackSize])
  • 43. 3.1. DIAGNOSTICS 31 stack[stackSize].append(x.distance) stack[stackSize].append(x.mass) stack.sort(key=lambda x: x[1]) tmpMass = 0.0 for x in range (0, stackSize): tmpMass += stack[x][2] if tmpMass / totalMass >= 0.5: RHalf = stack[x][1] Escapers: The number of escapers can be calculated when also the total en- ergy of an individual particle is appended to the above stack. If a particle has a positive energy and has a distance of more than 5 · R1/2, it will be considered to be unbound from the stellar cluster. A built in function for the potential of a particle — potential() — was used in the computation of the energy. Center of mass: In order to get accurate Lagrangian radii and core den- sity (see below), the escapers were not included in the calculation of the center of mass. After a recalculation of the total mass, the center of mass is obtained by the summation, weighted by particle mass, of the particle positions. Lagrangian radii: These are the radii of various percentages of the total mass, also of the escaped stars, as they develop over time; Lagrangian radii are an important tool to study the dynamical evolution of a stellar cluster. The mass fractions that were chosen are 0.5, 1, 5, 10, 25, 50, 75, and 90 percent. First the particles are shifted to the center of mass, and then sorted by the distance from the center. Then it is just a manner of walking outside in a loop over all the particles. Binaries: Binaries are formed mostly in the center of a stellar cluster and can stop the core collapse. See also Chapter X. Binaries are found by computa- tion of the eccentricity; two stars are a binary when 0 ≤ e ≤ 1. The eccentricity is calculated with the following equations e2 = 1 − l2 G(M1 + M2)a , where l ≡ L µ (3.1) a = − G(M1 + M2) 2 , where ≡ Ebin µ (3.2) Where l is the specific angular momentum, L the angular momentum, a the semi major axis, µ the reduced mass, the specific orbital energy, G the gravi- tational constant, and M1 and M2 the masses. It is computational expensive to compute the eccentricity for each pair of stars of the stellar cluster. To speed up this calculation the stars were first sorted by their distance from the center of mass. Then the eccentricity of each star with its two closest ”neighbors” was calculated. These stars do not necessarily have to be neighbors, because they might as well be at opposite sides of the cluster. By the comparison with two stars, however, the chances are large that all the binaries will be, in fact, found. First the semi major axis is calculated. If it is
  • 44. 32 CHAPTER 3. TESTS AND DIAGNOSTICS smaller than 0.1 pc the eccentricity is calculated. Three types of binaries are distinguished: hard, soft, and close binaries. If the (absolute) potential energy of the binary is larger than the average kinetic en- ergy of the particles in the cluster, the stars are considered to be hard binaries. The others are labeled soft binaries: binaries that are relatively easy to be dis- rupted by the other stars in the cluster. When the semi major axis is within 10 percent of the softening parameter the binary, hard or soft, was considered to be a close binary. The velocities, positions, and stellar masses were appended to a stack in order to perform these calculations. Core density: The core density is often defined as the density of the 5 stars closest to the center of mass. When plotted against time it can be used to determine the core collapse. The core density is determined in a similar fashion as the Lagrangian radii; the stars are sorted by their distance from the center of mass, then a loop is done from the innermost particle to the fifth particle. The distance from the latter is used to compute the core density. Mass distribution: Each step the mass is plotted against the radius. Com- putation is done in a similar fashion as the Lagrangian radii. Density distribution: Also plotted per step. Computation is similar to the computation of the core density. Positions: Plotting the per step positions of the particles, the binaries, and the center of mass can be very handy, especially if an obvious problem is en- countered in the numerical output. The phiGRAPE program has a OpenGL interface which can be used to view the positions in 3D during runtime. But it cannot hurt to output plots as well, they can be put in a video, enabling the researcher to fast forward and rewind through the simulation of a stellar cluster. Core collapse: The moment of core collapse is numerically determined by taking the maximum core density at which there are at least two hard binaries. The approximate time at which core collapse takes place is also determined prior to the first time step. First the virial radius (rv) — within the virial radius the system is in virial equilibrium — is calculated using rv = GM2 /(−2V ), where G is the gravitational constant, M is the total mass, and V is the potential en- ergy. Using the virial radius and the formulas from Chapter 1.2.1, the crossing time, half mass relaxation time, and moment of core collapse are approximated respectively. 3.2 Tests In the following section an isolated, n = 1024, system is tested against well known results. Isolation means ignoring gravity shocks and tidal interaction from the parent galaxy. All the gas from the molecular cloud is assumed to be gone, and mass lost by stellar evolution does not interact with any of the stars, the mass is instantly removed instead. The particles all have zero radius, thus
  • 45. 3.2. TESTS 33 preventing collisions and mergers. Simulations were initialized with the same Plummer sphere. Variations occur in initial mass function (IMF) and in the oc- curance/incorporation of stellar evolution. Parameters of the relevant AMUSE modules are listed in Appendix B. The energy error is an indication for whether the simulations are accurate. A low energy error does not necessarily mean that the model is accurate, but a high error does indicate that something is wrong. The accuracy can also be de- termined by comparison with other models from well known papers, preferably using a completely different method. 3.2.1 One-component simulations First simulations were done to determine if the maximum time step for phi- GRAPE converges to a similar evolution. Checking whether the time step con- verges is necessary because in a later stage the time step will be varied in the case where stellar dynamics and evolution are combined. This time step is also the time over which the particles are synchronized in order to compute diag- nostics. Prior to the first time step the core collapse was approximated to take place at 218 Myr for this specific set of 1024 particles, initialized using a Plummer sphere, with stellar masses of 0.345M each. Although runs with identical initial conditions showed qualitatively very sim- ilar dynamical evolutions, they did show unexpected differences in the exact moment of core collapse. Therefore multiple runs were done over which an av- erage was calculated. Per time step an average over 20 runs was calculated. The difference are probably due to the phiGRAPE GPU mode. The different time step runs show a qualitative similar evolution of the core radius (Figure 3.1), although they seem to disagree on the moment of core col- lapse. In case ∆t = 0.25 Myr and ∆t = 0.125 Myr the core collapses at around 190 Myr, similar to the expected value based on the well-known semi-analytical formulae. Other diagnostics also appear very similar, ie. the number of escapers (Figure 3.3) and the central density (Figure 3.2). However, in case of a 0.5 Myr the time step appears to take place quicker. Therefore 0.25 Myr was chosen as a usable time step for future simulations. Qualitatively the simulations are in line with the well known theory, stars es- cape from the clusters (Figure 3.3), leading to contraction of the core while the outer layers expand (Figure 3.4). The gravothermal catastrophe, core collapse, takes place around the expected value of 200 Myr. Core collapse is eventually stopped by the increase in hard binaries (Figure 3.5), which were verified to be located very close to the center of mass. The system remains close to virial equilibrium (Figure 3.6), and the error eventually increases (Figure 3.7) due to close encounters, especially close binaries with a semi major axis comparable to the softening parameter, around the center of mass.
  • 46. 34 CHAPTER 3. TESTS AND DIAGNOSTICS Figure 3.1: The core radius vs. time for different time steps, being 0.5, 0.25, and 0.125 Myr from top to bottom. The core collapse is highlighted with a vertical line in the bottom two panels. Figure 3.2: The central density vs. time for the same runs as in Figure 3.1.
  • 47. 3.2. TESTS 35 Figure 3.3: The number of escapers over time for the three time steps. Figure 3.4: Lagrangian radii over time with ∆t = 0.25 Myr. The outer layers expand while the core contracts.
  • 48. 36 CHAPTER 3. TESTS AND DIAGNOSTICS Figure 3.5: Absolute number of binaries (hard, soft, and close) over time with ∆t = 0.25 Myr. Figure 3.6: Kinetic/Potential energy over time with ∆t = 0.25 Myr.
  • 49. 3.2. TESTS 37 Figure 3.7: Energy error over time with ∆t = 0.25 Myr. The error goes up with the increase of close binaries. 3.2.2 Two-component simulations This section describes the dynamical evolution of two component clusters; clus- ters containing two different masses. The following definitions are used in this section: µ = mh/ml, where mh is the mass of the high mass stars, and ml the mass of the low mass stars. Furthermore, q = Nh/Ncl, where Nh is the total number of the high mass stars, and Ncl the total number of stars in the cluster. Every simulation started with the same, n = 1024, particle positions and veloc- ities as in the previous section. In each run a different, random, set of particles was chosen to have a higher mass. Simulations were averaged over 20 runs and the time step was set to 0.25 Myr. Two-component systems have been extensively studied by Khalisi et al. (2007). The core radius (Figure 3.8) shows similar behavior to the radii found in that paper: the core collapse is accelerated by roughly a factor of 1/µ, and becomes less deep at higher µ. The latter is especially clear in the case where µ = 3. The acceleration of the dynamical evolution can also be seen by the number of escapers (Figure 3.9), and hard binaries (Figure 3.10); these increase suddenly around core collapse, just as with the one-component runs. Also similar to the one-component simulations is the energy error (Figure 3.11), for which it was verified that the increase was due to close binaries. Finally the fraction q was altered, and the result shows what is expected: a higher number of high mass particles means that heat is more efficiently trans- ported outwards (Chapter 1.2.1), meaning that the core has to contract faster to stay in thermal equilibrium.
  • 50. 38 CHAPTER 3. TESTS AND DIAGNOSTICS Figure 3.8: Development of the core radius over time with q = 0.1 and three different values for µ: 1, 2, and 3. Figure 3.9: The number of escapers over time for the same runs that were used for the previous graph.
  • 51. 3.2. TESTS 39 Figure 3.10: The number of hard binaries over time for the same runs that were used for the previous graph. Figure 3.11: The energy errors over time for the same runs that were used for the previous graph.
  • 52. 40 CHAPTER 3. TESTS AND DIAGNOSTICS Figure 3.12: Development of core radius over time for three different fractions q: 0, 0.1, and 0.25. The value of µ is kept at 2. 3.2.3 Simulations incorporating mass loss In the first runs a fraction of the mass, of the same one-component n = 1024 cluster, was taken away instantly to verify whether the cluster dissolves; for a Plummer sphere this should happen around Γ 0.4, where Γ is the fraction of the mass left after mass loss (Boily and Kroupa, 2003a). The core radius indeed expands strongly at Γ 0.4 (Figure 3.13) and the cluster is unbound at this specific value of Γ according to the virial ratio (Figure 3.14). As predicted by Hills (1980) the cluster can remain in virial equilibrium when the mass loss is slow (Figure 3.16), divided over equal steps from 0 to 50 Myr, compared to the crossing time, which is ∼ 0.8 Myr for this particular cluster. When the mass loss is fast, the cluster has to find a new radius that fits the virial theorem; in this case mass loss has a stronger disruptive effect on the dynamical evolution (Figure 3.15). The outcome is that the cluster has become more loosely bound, the virial ratio is closer to unity and the system suffers from more escapers (Figure 3.17). In the last set of runs the same Plummer sphere is used, but this time one random star has been given a 100 times higher mass. Runs with and without stellar evolution are compared. Figure 3.19 shows that the heavy star sank to either the core or at least close to the core when significant mass loss, due to stellar evolution, becomes important. A fraction of 0.06 is lost, which, as expected, slows down core collapse significantly (Figure 3.18), although the same system does seem to recover to approximately the same virial ratio (Figure 3.20). During the time where the system was more loosely bound, due to stellar evolution, more stars were able to escape compared to the runs without stellar
  • 53. 3.2. TESTS 41 evolution (Figure 3.21). Figure 3.13: Core radius over time. At t = 50 Myr a fraction of the mass of all the stars was taken away. Γ is the fraction that is left. Figure 3.14: Virial ratios over time corresponding to the previous runs. When the ratio > 1 the cluster is considered to be unbound.
  • 54. 42 CHAPTER 3. TESTS AND DIAGNOSTICS Figure 3.15: Core radius over time. All stars lose half their mass, but in one case this is done in equal steps from 0 to 50 Myr, and in the other case it is removed suddenly at t = 50 Myr. Figure 3.16: Virial ratios over time corresponding to the previous runs; the cluster can remain in virial equilibrium when the mass loss is slow compared to the crossing time.
  • 55. 3.2. TESTS 43 Figure 3.17: The number of escapers over time corresponding to the previous runs. Figure 3.18: Core radius over time obtained using the same Plummer sphere as in the previous section, but with one random star given a 100 times higher mass. In one of the simulations stellar evolution with SSE was turned on; resulting evolutionary stages of the high mass star are displayed.
  • 56. 44 CHAPTER 3. TESTS AND DIAGNOSTICS Figure 3.19: Core density over time for the same runs as the previous graph. Figure 3.20: Virial ratios over time for the same runs as the previous graph.
  • 57. 3.2. TESTS 45 Figure 3.21: Escapers over time for the same runs as the previous graph.
  • 58. 46 CHAPTER 3. TESTS AND DIAGNOSTICS