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 nodal points, named SPH elements, where physical properties (e.g., mass, density, velocity, position, pressure) are calculated. These SPH elements can be considered interpolation points for 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) controls if the neighbor list is stored in memory or built on the fly every time is needed. 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, 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 functional is as follows:
(3–1) |
A property, , for an SPH element at ra is defined in a continuous domain
using the following integral approximation:
(3–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
in the neighborhood of
. When the kernel function is integrated over the computational domain, the
result has to be the unity.
The kernel functions have compact support, that is, they have non-zero values only around
a spherical region around , the radius of that support region is usually called the kernel radius and
it is an integer multiple of
In numerical simulations, the integral interpolant of is represented by the sum over the neighboring SPH elements located inside
the support region around
:
(3–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 usually computed in terms of the gradient of the kernel function by
differentiation of Equation Equation 3–3:
(3–4) |
where is the gradient of
evaluated with respect to the position
.