potential energy calc

From: Paul Taylor <ptaylor_at_astro.ox.ac.uk>
Date: Wed, 16 May 2007 18:03:13 +0100 (BST)

Hi,

   I have a question about calculating the individual potential of a
particle; where this is done in potential.c, the 'self-potential' is
removed as follows:

<<
  /* add correction to exclude self-potential */
   for(i = 0; i < NumPart; i++)
     {
       /* remove self-potential */
       P[i].Potential += P[i].Mass / All.SofteningTable[P[i].Type];
         ....
>>

I am using adaptive softening, and so I wondered if it might make more
sense to divide by the SphP[i].Hsml or by (2.8 * SphP[i].Hsml) instead of
the softening table value, since then the representative value would be
adaptive as well; ie, the line would look like:
<<
P[i].Potential += P[i].Mass / (SphP[i].Hsml)
>>

Does anyone have thoughts/objections to this? I guess the Hsml might be
too big for this purpose, so then it could just be a parameter times Hsml
in the denominator, but something to keep it adaptive with the softening.

Cheers,
PT
Received on 2007-05-16 19:03:14

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:30 CET