2.1. Overview of SPH

The Smoothed-Particle Hydrodynamics (SPH) is a method created to numerically simulate the mechanics of continuum media, such as fluid flows. In the SPH method, the fluid is defined by a finite set of irregularly spaced nodal points, named SPH elements, where physical properties (e.g., mass, density, velocity, position, pressure) are known. These SPH elements are interpolation points used in the integration of the Navier-Stokes equations that govern the fluid flow. From the physical point of view, these points can be interpreted as small pieces of fluid that interact with their neighbors through pressure and viscous forces.

Each SPH element at a position interacts to varying degrees with its neighbors at position based on the distance | between these points and the value of the kernel function . This kernel function depends on the smoothing length, , which is of the order of the initial separation distance of the SPH elements.

The Neighbors List checkbox (inside the SPH Advanced option) activates the feature that looks for neighbors between SPH elements. This feature stores only element-element type neighbors. This means that searching and neighbor-neighbor operations between SPH elements (like force and heat exchange calculations, API interaction loops, surface tension, and force processing, for example) are done much faster when this checkbox is enabled, as Rocky does not have to look for them every time, as it stores an explicit list of neighbors for each SPH element. This search is done only for every Time Step Factor (also available in the SPH Advanced option), and thus the explicit list of neighbors is updated.

However, the Neighbors List feature has the disadvantage of being more expensive in terms of memory, as the number of neighbors per SPH element can be large, depending on the parameters that interfere with the identification of this neighbor, such as the number and size of the SPH element.

A typical form of the kernel is as follows:

(2–1)

A property, , for an SPH element at ra is defined in a continuous domain using the following integral approximation:

(2–2)

where is the Dirac delta function. As , the kernel function approaches the Dirac delta function; for , the kernel function interpolates the value of a property for a SPH element among its neighboring particles. When the kernel is integrated over the computational domain, the result has to be the unity.

In numerical simulations, the integral interpolant of is represented by the sum over the neighboring SPH elements:

(2–3)

where:

  • is the mass of a neighboring SPH element b.

  • is the density of the neighboring SPH element b.

  • is the position of the SPH element .

  • is the value of A at the position .

In three-dimensional calculations, the ratio can be viewed as the volume associated with the SPH element. The local fluid properties are defined from a set of neighboring points situated in the computational domain.

The gradient of the property is computed in terms of the gradient of the kernel function by differentiation of Equation Equation 2–3:

(2–4)

where is the gradient of evaluated with respect to the position .