2
$\begingroup$

If while distributing particles to their corresponding nodes, two particles comes closer to a level smaller than the machine precision (or $\Delta d \to 0$), how is the situation to be treated? Should the recursive distribution stop and both of them be added to a single node?

This happens because of treating particles as point objects rather than 2D objects. Imagine a machine having a precision level of 3 decimal points (mm in SI) and a situation in which the bodies come within $10^{-6}$ (micro level) of one another.

$\endgroup$
  • $\begingroup$ This doesn't look like a research level question in theoretical computer science?mass such! it is off-topic here, if you comment or flag then I can migrate it to CS.SE where it would be on topic. $\endgroup$ – Artem Kaznatcheev Mar 1 '14 at 19:52
  • $\begingroup$ @ArtemKaznatcheev This is at best marginal on Computer Science, as it's about numeric computation with direct relevance to physics. Computational Science would be a better place, I've flagged to migrate there instead. $\endgroup$ – Gilles 'SO- stop being evil' Mar 2 '14 at 19:04
0
$\begingroup$

Is the issue the division by zero (or close to zero) when computing the forces? I think what is often done (and what I did when implementing Barnes-Hut) was to include what is known as a softening factor. In other words when computing the radius between the centre of mass of the box and the specific particle you do something like:

r=sqrt((bx-px)^2+(by-py)^2+epsilon)

where (bx,by) is the location of the box centre of mass, and (px,py) is the location of the particle, epsilon is the softening factor.

Note: I have only done Barnes-Hut for particles rotating around a large mass (black-hole for example). This method my not be good for star clusters where collisions are common.

$\endgroup$
  • $\begingroup$ Softening factor so that separation can't be zero, right? Good suggestion. $\endgroup$ – Renae Lider Mar 9 '14 at 14:08
  • $\begingroup$ Right, so basically it sets a maximum on the force between two particles that way as they approach each other they dont get ridicules velocities. $\endgroup$ – James Mar 10 '14 at 16:05

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.