Astrophysics Source Code Library

Making codes discoverable since 1999

ASCL Code Record

[ascl:1010.071] WSHAPE: Gravitational Softening and Adaptive Mass Resolution

Pairwise forces between particles in cosmological N-body simulations are generally softened to avoid hard collisions. Physically, this softening corresponds to treating the particles as diffuse clouds rather than point masses. For particles of unequal mass (and hence unequal softening length), computing the softened force involves a nontrivial double integral over the volumes of the two particles. We show that Plummer force softening is consistent with this interpretation of softening while spline softening is not. We provide closed-form expressions and numerical implementation for pairwise gravitational force laws for pairs of particles of general softening scales $epsilon_1$ and $epsilon_2$ assuming the commonly used cloud profiles: NGP, CIC, TSC, and PQS. Similarly, we generalize Plummer force law into pairs of particles of general softenings. We relate our expressions to the gaussian, Plummer and spline force softenings known from literature. Our expressions allow possible inclusions of pointlike particles such as stars or supermassive black holes.

Code site:
Described in:

Views: 1560

Add this shield to your page
Copy the above HTML to add this shield to your code's website.