Research on star cluster dissolution using molecular dynamics developed at the University of Lisbon. The computational part is done in C++, and the data analysis is done in Python with Matplotlib. It is highly suggested that one read the research paper .PDF's if they wish to understand the context behind the code, as the following descriptions only give brief outlines. The .PDF and images are in Portuguese according to the university's language.
In this work, I simulate the dynamics of a star cluster as a function of the distribution of masses and velocities.
A cluster is a gravitationally bound star system. In the absence of external forces, its structure is defined by the balance between the gravitational interaction that tends to bring the stars together and the distribution of random velocities that tend to disperse them. For sufficiently long times, the distribution of the speed of the stars must follow a Maxwell-Boltzmann distribution, as explained by energy equipartition theorem. Thus, lower mass stars should, on average, have superior velocities. When these speeds exceed the escape velocity, the respective stars can cease to be part of the cluster. As they escape, the mass of the cluster decreases, which leads to a decrease in escape velocity, allowing stars with slightly larger masses to also be able to leave the cluster, gradually leading to total dissolution of the system.
Consider two stars, with masses m1 and m2, respectively. If we consider that stars are material particles, the interaction between them can be described as a simple gravitational attraction. Here I Implement Verlet's method to simulate the interaction between two stars of unit solar mass. Initially, it was considered that the two are at a distance of (2 pc), have an initial speed of equal intensity (2 × 10**-2 km/s), opposite directions and direction perpendicular to the axis that passes through the center of the two. I obtain graphs of kinetic energy, potential energy and mechanical energy as a function of time.
Attached you will find three files corresponding to initial conditions for a stellar cluster of N = {10,100,500} stars. Each file contains seven columns (x, y, z; vx, vy, vz; mass). For each case, I calculated the total number of stars at a distance less than r_t from the center of the cluster as a function of time for a time interval of ten million years.
When formed, stars in a stellar system follow a mass distribution known as Initial Mass Function (IMF), which can be approximated by the Kroupa distribution:
Where the value of alpha depends on the range of mass values of the star (in units of solar mass), with
For the spatial distribution of stars, consider King's profile,
Where
The velocity distribution follows the Maxwell-Boltzmann distribution,
Where