3.7. Density correction

In the Weakly Compressible SPH (WCSPH) approach, the density field calculation is critical since the pressure is directly coupled to the density using the artificial equation of state. A density correction algorithm is used to circumvent the excessive pressure oscillations in the standard SPH formulations, which can make the solution instable. The inclusion of the density correction algorithm notably improves pressure distributions, especially when SPH elements are close to solid boundaries. [9]

The density correction follows the well-known Shepard interpolation in the SPH literature[12], normally expressed as:

(3–44)

where is the weighting function .

The corrected density provided by the Shepard filter is a quick and simple correction to the density field applied every time steps, defined by the method's Number of Density Correction Steps option with a default value of . This density correction should not be used together with Monaghan's tensile instability term, as this combination leads to unstable simulations.

An additional check is performed to limit the density values to an expected range. Two additional parameters, defined by the method's Negative Density Deviation parameter, and defined by the method's Positive Density Deviation parameter, provide the maximum negative and positive deviations from the initial density values allowed after the density correction. Therefore, these two parameters define the limiting values for the density of the SPH elements, according to:

(3–45)

(3–46)

where is initial fluid density, defined by fluid material property Density.

The density is not expected to reach these limits if the SPH method is used to model fluid problems within the accepted Mach number range. Increasing the default limits, which are 0.01 and 0.03 for the negative and positive deviation respectively, can lead to unrealistic results.