There is a huge library of work on the subject of sphere packing, some of which is very relevant to SPH, most of which is not (mainly because SPH particles are not hard spheres), and the state of the art for spherical particle arrangements in SPH at the moment is some combination of random seeding with an inverse gravity-like force to push the particles into an optimal arrangement. I’ve used this approach myself many times in the past, relying on the WVT algorithm developed at LANL, but it’s computationally expensive, and it isn’t the sort of thing you can fiddle with at run-time to add more resolution if you need to.
So, a little while back I developed a new algorithm that I call the RPRPS generator. RPR stands for recursive primitive refinement, and PS means parameterized spiraling. The algorithm is pretty clever:
For the center region of the sphere, the RPR portion of the algorithm takes the first four platonic solids
and performs a Catmull-Clark refinement on them to generate concentric spheres.
This takes care of the center region, but pushing these shapes to higher and higher refinements eventually gets into trouble as the projection of triangles onto a spherical surface isn’t ideal. For the rest of the sphere, the algorithm defaults over to a parameterized spiraling method that just uses 1 parameter, the total number of particles on the surface of each spherical shell, to build out concentric shells.
So far, I’ve used this algorithm for a half-dozen different problems, from the Moon forming impact, to asteroid deflection tests, to a supernova simulation I’ve been looking into. It’s a fairly easy algorithm to implement for any SPH code, and more importantly, it’s a run-time generation method that obviates the need to store libraries of particle arrangements for increasingly high resolutions. Just choose a particle count and off it goes, creating an entire arrangement in just a few seconds.
I’ve benchmarked its stability against a number of other popular generators and published the results in ApJ.