SPH & Hierarchical tree method

I now have a fairly good understanding of the mathematics behind SPH.  It is fundamentally a fluid technique.  The fact that it uses “particles” to represent the fluid does not make it an N-body method. The “particles” are merely tracers–a way to store the data describing the fluid properties at various points in space.  There are two levels of smoothing involved when the method is used for gravitationally interacting fluids.  First there is the ordinary smoothing, characterized by the smoothing length h. This parameter determines the size of the smoothing kernel–essentially the spatial extent of each particle.  The second type of smoothing is called “softening”.  It is characterized by the softening length \varepsilon and its purpose it to avoid singularities or near-singularities in the gravitational potential.  Thus SPH-based galaxy simulations codes cannot resolve fine details such as individual stars in galaxies unless the smoothing and softening parameters are set to zero, in which case the technique is really no longer SPH.  The method also has great difficulty handling shocks properly with a finite number of particles.

The hierarchical tree method is a way of improving the efficiency of N-body simulations by effectively smoothing the distant particle distribution.  In the TreeSPH code, which was the precursor to GADGET, an oct-tree is created which allows the particles to be sorted spatially.  Multipole moments of blocks of space are calculated in the process of contructing the oct-tree.  for each particle, the gravitational force is calculated by descending down the oct-tree toward that particle and collecting data along the way.  The nearest-neighbor particles are treated as pure particles and gravitational forces are computed directly as in an N-body code.  The field of the next-nearest neighbors is calculated form the multipole moments of small “cells” of space.  As the distance from the particle increases, the cells grow larger.   This approximation greatly improves the efficiency of the force calculation.

Other than learning about SPH and TreeSPH, I’ve been tinkering with C++, just getting some practice and becoming more familiar with the compiler.  I’ll read a description of the GADGET-2 code.  I found out that it is written in C and it uses MPI, rather than OpenMP.

I’ve installed IFrIT, which looks like a good tool for visualizing output from the simple programs that I plan to write this summer. sites.google.com/site/ifrithome/Home

Leave a Reply