210 likes | 244 Views
PKDGRAV : A Parallel k -D Tree Gravity Solver for N -Body Problems. Derek C. Richardson (U Maryland). FMM 2004. Overview. High-performance cosmology code. Written at U Washington N -body shop by Joachim Stadel (U Zurich) & Tom Quinn.
E N D
PKDGRAV: A Parallel k-D Tree Gravity Solver for N-Body Problems Derek C. Richardson (U Maryland) FMM 2004
Overview • High-performance cosmology code. • Written at U Washington N-body shop by Joachim Stadel (U Zurich) & Tom Quinn. • Now adapted for a variety of applications, including planet formation. • Lastest version has implementation of SPH (smoothed particle hydrodynamics).
Spatial Binary Tree • Ironically, PKDGRAV no longer uses a k-D tree for gravity… • The problem: elongated cells can give large multipole moments and other pathologies. • The solution: spatially bisect cells and squeeze the cell boundaries. • Also good for neighbour searching.
Spatial Binary Tree k-D Tree k-D with Squeeze
Tree Walking • Construct particle-particle and particle-cell interaction lists from top down. • Define opening ball (based on ) to test for ball-bucket intersection. • If bucket outside ball, apply multipole (c-list). • Otherwise open cell and test its children, etc., until leaves reached (which go on p-list). • Nearby cells have similar lists: amortize.
Tree Walking Note multipole Q acceptable to all particles in cell d.
Other Issues • Multipole expansion order. • Use hexadecapole (best bang for buck). • Force softening. • Use spline-softened gravity kernel. • Periodic boundary conditions. • Use Ewald summation technique. • Time steps. • Use hierarchical steps (adaptive leapfrog).
Parallel Implementation • Master layer (serial). • Controls overall flow of program. • Processor Set Tree (PST) layer (parallel). • Assigns tasks to processors. • Parallel k-D (PKD) layer (serial). • MIMD execution of tasks. • Machine-dependent Layer (MDL, separate). • Interface to parallel primitives.
Domain Decomposition PST Binary tree balanced by work factors. Nodes construct local trees.
Scaling at Fixed Accuracy Clustered cosmology simulation (N = 3·106) ( = 0.8)
Some Science: Planetesimals • One of the recent additions to PKDGRAV is the ability to treat particle collisions. • Applications: • Planet formation (planetesimal growth). • Asteroid disruption. • Planetary rings. • Technique: predict collision during leapfrog drift step using fast neighbour search.
Planetesimal Evolution • Evolutionary models based on laboratory experiments may be inadequate. • Outcomes determined by gravitational reaccumulation. Leinhardt et al. 2000
Incorporating Collision Models • Based on individual test cases, collision outcomes can be incorporated into large-scale sims of planet formation.
Near-Earth Asteroid Binaries • Reaccumulation following tidal disruption could form NEA binaries. • Need reaccumulated (or shattered/fragile) body to start with…
New Code: Rigid Aggregates • Recently the ability to treat collections of particles as rigid aggregates has been added. • Applications include realistic asteroid shape models and more complex granular shapes. • Technique: solve Euler rigid body equations of motion with torque and allow for non-central impacts.
Rigid Aggs: Movie 2 Bouncing Allowed No Bouncing
Future Work • PKDGRAV continues to be improved. • Algorithms currently being considered: • Local expansions. • Tree repair. • Improved collision detection. • Other possibilities include combining PKDGRAV with a Grape board!…