1

I am coding a simulation of a globular cluster in python, starting with particles of the same mass and 0 initial velocity in a random spherical distribution. I am trying to investigate the root-mean-square radius of the system over time and trying to see how long it takes for this R_rms to stop contracting and reach an equilibrium state. However, I have the issue of stars being flung out of the system at very high velocities due to close encounters, which totally dominate my R_rms calculations. What is the best way to ignore these particles in my calculation?

I have thought about ignoring them if:

  • the distance from the origin is outside of the original sphere of generation, however have the issue of the cluster as a whole moving until it is outside of the sphere of generation.
  • Ignoring the particles if they have a velocity > the escape velocity of the system. This seems like the most reasonable way, however, I am worried about ignoring a particle which has a velocity > the escape velocity but has a later encounter that keeps it in the system.

Here is a plot of the positions of the particles over time where you can see several particles have been flung out.

plots of orbits

Oliver Moore
  • 317
  • 1
  • 12
  • 1
    I don't know the details of your simulation, but are you sure that ignoring them is the best course of action? In other words, should those particles really be there or they are being flung out because you have a too large time step or because of some other numerical issue? – lr1985 Feb 05 '21 at 17:02
  • Yeah, this is a good point to raise, and something I have put thought into. It is in the nature of globular clusters to lose stars over time so this is to be expected. However for my small simulation of only 100 bodies, I think these stars are only being flung out due to approaching too close to each other, but am unsure on how to account for this in my code. I have tried to include collisions and asked another question here on exactly your point: https://stackoverflow.com/questions/66026268/n-body-simulation-of-globular-cluster – Oliver Moore Feb 06 '21 at 15:26
  • 1
    OK, I think the issue may be solved (or at least mitigated) by using reduced units, so that you don't end up using too large (or too small) numbers in your simulations. I'll try to write up a complete answer if I find the time. – lr1985 Feb 06 '21 at 17:29
  • That would be grand, thank you! – Oliver Moore Feb 06 '21 at 19:31

1 Answers1

2

Once a star has the escape velocity of the system, it should be safe to consider it no longer part of the system. The odds that a star on escape velocity will have another encounter that puts it back into the cluster is very low.

How many stars are in your cluster, and how many are being ejected? If it's a large fraction, it may be due to numerical instability, and you could implement something called "gravitational smoothing", which prevents stars being ejected at unrealistic speeds. See the "softening" section here, or eqn (4) of this paper. Basically, what you do is change the distance "r" between stars in your simulation (when calculating force/accel) in this manner: r -> sqrt(r^2 + epsilon^2) where epsilon is some small value, like a few times the radius of a star.

Though, those ejected stars could be a real result; stars do get ejected from cluster occasionally!

atrapp
  • 21
  • 3