5
$\begingroup$

In direct gravitational $N$-body simulations, what are the preferred methods for handling close approaches between bodies in order to preserve the accuracy of the evolution of the system?

$\endgroup$
  • $\begingroup$ Do you mean aside from just having the bodies collide? $\endgroup$ – M. Enns Apr 9 '16 at 20:49
  • $\begingroup$ Yes. Such encounters aren't always close enough to result in collisions. $\endgroup$ – Dave Apr 9 '16 at 22:25
  • $\begingroup$ Almost certainly already answered on Computational Science, which is generally a better site for questions that mostly concern programming technique. $\endgroup$ – dmckee Apr 9 '16 at 23:52
5
$\begingroup$

I assume you're talking about the numerical instabilities that arise from having an infinite potential at $r=0$. Here are three common solutions:

  1. Use a soft-core potential that behaves like $1/r$ except very close to $r=0$ where it levels off to a finite value. For example, $1/\sqrt{\epsilon+r^2}$ instead of $1/r$ is common.

  2. Add hard sphere collision detection (ideally this would incorporate an event-driven integration step, so it can be quite tricky to implement if you want to do it properly).

  3. Use a dynamic integration time-step that is a function of the distance between the nearest pair of particles. When they're far away you can use a large time-step, when they're (very) close you use a (very) small time-step.

$\endgroup$
  • $\begingroup$ 1,2 is avoiding the problem rather than addressing it; changing the potential means the problem being solved is changed and the solution of the new problem will depend on $\epsilon$ or radius of the spheres. 3. working with variable time steps is in the right direction, but the choice of step cannot be done independently of the numerical method. Step is not usually function of distances only; velocities and previous states may play role in the choice as well. $\endgroup$ – Ján Lalinský Apr 10 '16 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.