SPH
Basics of SPH

This page does not attempt to give a comprehensive review of SPH method, but rather point out how the fundamentals of SPH are implemented in the code. Here we assume the reader is already familiar with SPH; if that's not the case, have a look at some SPH review papers [13] [6] [10] [11].

SPH kernel. Kernel. For performance reasons, it is not used directly, but only to contruct LutKernel.

\[ \rho(\vec r_i) = \sum_j m_j W(\vec r_i - \vec r_j, h_i) \]

This can be generalized into

\[ A(\vec r_i) = \sum_j m_j\frac{A_j}{\rho_j} W(\vec r_i - \vec r_j, h_i) \]

and gradient

\[ \nabla A(\vec r_i) = \sum_j m_j\frac{A_j}{\rho_j} \nabla W(\vec r_i - \vec r_j, h_i) \]

The discretization of equations of motions could be done this way – simply replace every gradient, divergence and rotation with SPH sum above. We usually choose a different approach that ensures conservation of integrals of motion, but the basic idea is the same.

Algorithm:

  1. For every pair of particles \(\vec r_i\) and \(\vec r_j\), compute kernel gradient \(\nabla W(\vec r_i - \vec r_j)\).
  2. Using computed gradient, calculate acceleration, energy derivative, density derivative, ... of particle \(\vec r_i\) due to particle \(\vec r_j\), and vice vera
  3. Once all derivatives are computed, do a time step: \(f_{n+1} = f_n + \frac{{\rm d}f}{{\rm d} t} \cdot \delta t\)
  4. Go to 1.

These steps are done by GenericSolver object.