Smoothed Particle Hydrodynamics (SPH) has experienced a renaissance in computational mechanics in recent years. Due to the increased computing power, the additional effort due to the search algorithm, among other things, is no longer so significant. Nevertheless, some shortcomings are still present as will be shown in this chapter.

Smoothed Particle Hydrodynamics (SPH) is a spatial discretization scheme developed in the seventies by Gingold and Monaghan (1977) and in parallel by Lucy (1977). The first applications were limited to the field of astrophysics. In the meantime, this method has also become established in computational mechanics and is used especially for the simulation of fluid flows with free surfaces. Although the formulation is equally suitable for fluids and solids, different variants have been established for the two scenarios.

The SPH subdivides the domain into individual particles at which all quantities are evaluated. In the SPH, own technical terms have been established over the years. In the individual sections, the corresponding definitions are discussed and related to the usual expressions from Chap. 4.

6.1 Discretization Concept

The starting point is the description of the approximate solution in terms of an integral function similar to Sect. 4.6.4. To be able to express \( \mathbf { u } \) at any point, the kernel function must possess a reproducing property. This is given for the \(\delta \)-Dirac function

$$\begin{aligned} \begin{aligned} \mathbf { u } \left( \mathbf { x } \right) = \int _{H_ \mathbf { x } }\delta \left( \mathbf { x } - \mathbf { x } ^\prime \right) \mathbf { u } \left( \mathbf { x } ^\prime \right) \text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.1)

On the other hand, the \(\delta \)-Dirac function is neither continuous nor differentiable. Due to these pathological properties, this approach is not suitable in the context of a discretization (Li and Liu 2007). In SPH, an attempt is made to get as close as possible to the reproducing properties by means of a smooth differentiable function, the so-called weighting or kernel function W. The values of W in the domain can be controlled by the so-called smoothing length h

$$\begin{aligned} \begin{aligned} \langle \mathbf { u } \left( \mathbf { x } \right) \rangle = \int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime ,h\right) \mathbf { u } \left( \mathbf { x } ^\prime \right) \text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.2)

Since W is mostly chosen such that it violates the reproducing property, the result does not match the function at the corresponding position. In the equation above this is indicated by the angle bracket. Rather, (6.2) can be understood as an averaging. Alternatively, the value on the right-hand side can be changed. Thus, the function \( \mathbf { u } \) can be approximated by the unknown values \( \mathbf { a } \) in the neighborhood

$$\begin{aligned} \begin{aligned} \mathbf { u } \left( \mathbf { x } \right) = \int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime ,h\right) \mathbf { a } \left( \mathbf { x } ^\prime \right) \text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.3)

There are two requirements on the weighting function in SPH. In the limit as the smoothing length approaches zero W must equal the \(\delta \)-Dirac function. In addition, to ensure that for a constant displacement field the left-hand side in (6.2) reflects the correct value of \( \mathbf { u } \), a normalization property is required

$$\begin{aligned} \begin{aligned} \lim _{h\rightarrow 0}W\left( \mathbf { x } - \mathbf { x } ^\prime ,h\right) = \delta \left( \mathbf { x } - \mathbf { x } ^\prime \right) ,\quad \int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime ,h\right) \text {d}\nu _{ \mathbf { x } ^\prime } = 1. \end{aligned} \end{aligned}$$
(6.4)

In the discrete form, the sum over all particles \(N_{ \mathbf { x } }\) in the neighborhood of \( \mathbf { x } \) replaces the integral in (6.3)

$$\begin{aligned} \begin{aligned} \mathbf { u } \left( \mathbf { x } \right) = \sum _{J=1}^{N_ \mathbf { x } } W\left( \mathbf { x } - \mathbf { x } _J,h\right) \mathbf { a } _J v_J. \end{aligned} \end{aligned}$$
(6.5)

The unit of W is 1/m\(^3\). The multiplication of the weighting function by the volume can be interpreted as a shape function

$$\begin{aligned} \begin{aligned} \mathbf { u } \left( \mathbf { x } \right) = \sum _{J=1}^{N_ \mathbf { x } }N_J( \mathbf { x } ) \mathbf { a } _J,\qquad N_J( \mathbf { x } ) = W( \mathbf { x } - \mathbf { x } _J,h)v_J. \end{aligned} \end{aligned}$$
(6.6)

The weighting function is usually based on the distance \(r = \Vert \mathbf { x } - \mathbf { x } _J\Vert \). The value has its maximum at \( \mathbf { x } \) and decreases towards the boundary of the neighborhood. The size of the smoothing length h usually correlates with the radius of the search algorithm (Li and Liu 2007). To simplify the notation, instead of explicitly specifying the coordinates, only the index of the particle is given, i.e.

$$\begin{aligned} \begin{aligned} v_I := v\left( \mathbf { x } _I\right) ,\quad \mathbf { f } ^s_I := \mathbf { f } ^s\left( \mathbf { x } _I\right) ,\quad \boldsymbol{\sigma } _I := \boldsymbol{\sigma } \left( \mathbf { x } _I\right) . \end{aligned} \end{aligned}$$
(6.7)

In addition, different abbreviations exist for the weighting function

$$\begin{aligned} \begin{aligned} W( \mathbf { x } _J- \mathbf { x } _I,h) := W( \mathbf { x } _J- \mathbf { x } _I) = W_{I}\left( \mathbf { x } _J\right) = W_{IJ}. \end{aligned} \end{aligned}$$
(6.8)

For the calculation of derivatives, such as the divergence of stress, the integral from (6.2) has to be differentiated

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \frac{\partial }{\partial \mathbf { x } }\int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \text {d}\nu _{ \mathbf { x } ^\prime }: {\mathbf {1} } = \int _{H_ \mathbf { x } } \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } }\text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.9)

The operator  :  denotes the double contraction between two tensors. The use of radial weighting functions leads to properties which can be advantageous in the context of a discretization. Since W is based on the distance between two points, the arguments of the function can be interchanged

$$\begin{aligned} \begin{aligned} W\left( \mathbf { x } - \mathbf { x } ^\prime \right) = W\left( \mathbf { x } ^\prime - \mathbf { x } \right) . \end{aligned} \end{aligned}$$
(6.10)

For the derivative of the weighting function this property results in quite useful relations

$$\begin{aligned} \begin{aligned} \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } } = -\frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } ^\prime } = - \frac{\partial W\left( \mathbf { x } ^\prime - \mathbf { x } \right) }{\partial \mathbf { x } ^\prime } = \frac{\partial W\left( \mathbf { x } ^\prime - \mathbf { x } \right) }{\partial \mathbf { x } }. \end{aligned} \end{aligned}$$
(6.11)

The same applies for the discrete case

$$\begin{aligned} \begin{aligned} \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I} = -\frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _J} = -\frac{\partial W\left( \mathbf { x } _J- \mathbf { x } _I\right) }{\partial \mathbf { x } _J} = \frac{\partial W\left( \mathbf { x } _J- \mathbf { x } _I\right) }{\partial \mathbf { x } _I}. \end{aligned} \end{aligned}$$
(6.12)

A more detailed introduction to the discretization concept of SPH can be found, for example, in Li and Liu (2007) or Liu and Liu (2003).

Remark 6.1

Due to the dimension, the weighting function can also be assumed to be an operator that determines the density at a point from the mass in the neighborhood (Price 2012)

$$\begin{aligned} \begin{aligned} \rho \left( \mathbf { x } \right) = \sum _{J=1}^{N_ \mathbf { x } } W( \mathbf { x } - \mathbf { x } _J,h) m_J. \end{aligned} \end{aligned}$$
(6.13)

If the mass \(m_J\) at each particle is constant during the calculation, the conservation of mass is always satisfied.

Remark 6.2

In Monaghan (1992), so-called golden rules for a better approximation are defined, without giving an exact justification. Therein, it is recommended to use a Gaussian weighting function. However, mostly Wendland functions (Wendland 1995) are chosen for W, e.g.

$$\begin{aligned} \begin{aligned} W( \mathbf { x } - \mathbf { x } _J,h) = \frac{1}{\pi \,h^3}\left\{ \begin{array}{cl} \left( 1 - \frac{r}{2\,h}\right) ^4\left( 1 + 4\frac{r}{2\,h}\right) &{} \text{ for } r \le 2\,h \\ 0 &{} \text{ for } r > 2\,h \end{array}\right. . \end{aligned} \end{aligned}$$
(6.14)

To ensure the correct unit, the function is divided by the volume. The distances are normalized by the smoothing length h.

6.2 Equivalence Weak Form and Reduced Order Strong Form

The discretization concept of SPH can be applied to all variants from Sect. 4.2. Normally, the domain is only subdivided into particles. An exception is the Normalized SPH (Randles and Libersky 2000), which is based on a two-point approach. Calculations of fluid flow are usually based on the strong form whereas simulations of solid deformations rely on the strong form with reduced order.

Substituting the relation between weighting and shape functions (6.6), the internal force of the weak form (4.14) can also be formulated as a function of W

$$\begin{aligned} \begin{aligned} \mathbf { f } ^{s\,wf}_I= \sum _{J=1}^{N_I} \boldsymbol{\sigma } _J\frac{\partial N_I\left( \mathbf { x } _J\right) }{\partial \mathbf { x } _J}v_J = \sum _{J=1}^{N_I} \boldsymbol{\sigma } _J\frac{\partial W\left( \mathbf { x } _J- \mathbf { x } _I\right) }{\partial \mathbf { x } _J}v_Iv_J. \end{aligned} \end{aligned}$$
(6.15)

Also, in the case of the reduced order strong form (4.23), this contribution can be specified in more detail

$$\begin{aligned} \begin{aligned} \mathbf { f } ^{s\,ro}_I = -v_I\sum _{J=1}^{N_I} \boldsymbol{\sigma } _{J}\,\frac{\partial N_{J}( \mathbf { x } _I)}{\partial \mathbf { x } _I} = -\sum _{J=1}^{N_I} \boldsymbol{\sigma } _{J}\,\frac{\partial W( \mathbf { x } _I- \mathbf { x } _J)}{\partial \mathbf { x } _I}v_Iv_J. \end{aligned} \end{aligned}$$
(6.16)

Exploiting the properties of radial functions (6.12), it can be shown that both approaches are equivalent

$$\begin{aligned} \begin{aligned} \mathbf { f } ^{s\,ro}_I = -\sum _{J=1}^{N_I} \boldsymbol{\sigma } _{J}\,\frac{\partial W( \mathbf { x } _I- \mathbf { x } _J)}{\partial \mathbf { x } _I}v_Iv_J = \sum _{J=1}^{N_I} \boldsymbol{\sigma } _J\frac{\partial W\left( \mathbf { x } _J- \mathbf { x } _I\right) }{\partial \mathbf { x } _J}v_Iv_J = \mathbf { f } ^{s\,wf}_I. \end{aligned} \end{aligned}$$
(6.17)

The contributions from the inertia term and the dead load are identical. This shows the equivalence between the weak form and the reduced order strong form in the framework of the SPH. Thus, even for the strong form, the forces due to the Neumann boundary conditions can be determined directly from (4.17).

Remark

In Randles and Libersky (1996), Belytschko et al. (1998) or Rabczuk et al. (2004) an alternative approach is used to calculate the derivative. This variant results directly from (6.9) taking into account (6.11)

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \int _{H_ \mathbf { x } } \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } }\text {d}\nu _{ \mathbf { x } ^\prime } = - \int _{H_ \mathbf { x } } \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } ^\prime }\text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.18)

From the equivalence theorem, the first relation corresponds to the derivative rule in the framework of the strong form and the second to the rule of the weak form.

6.3 Integration Constraint

In Bonet and Kulasegaram (2000), it is shown that even in the SPH an additional requirement must be fulfilled beside the reproducing conditions to satisfy the patch test. This requirement corresponds exactly to the integration constraint. One reason provides directly Sect. 6.2. Another justification results from the discretization concept of the SPH, which follows from an integral. Thus, the divergence of stress can alternatively be determined from the individual contributions in the neighborhood

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \text{ div }\, \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.19)

Using Gauss’ integral theorem, the right-hand side can be related to the derivative of the weighting function

$$\begin{aligned} \begin{aligned} \int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \text{ div }\, \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \text {d}\nu _{ \mathbf { x } ^\prime }&= \int _{\partial H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \mathbf { n } \left( \mathbf { x } ^\prime \right) \text {d a} _{ \mathbf { x } ^\prime } \\&- \int _{H_ \mathbf { x } } \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } ^\prime }\text {d}\nu _{ \mathbf { x } ^\prime } \end{aligned} \end{aligned}$$
(6.20)

Exploiting (6.10) and (6.11) as well as the transition \( \mathbf { x } ^\prime \rightarrow \mathbf { x } \), \( \mathbf { x } \rightarrow \mathbf { x } _I\) an alternative expression can be obtained

$$\begin{aligned} \begin{aligned} \int _{H_I}W\left( \mathbf { x } - \mathbf { x } _I\right) \text{ div }\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \text {d}\nu _{ \mathbf { x } }&= \int _{\partial H_I}W\left( \mathbf { x } - \mathbf { x } _I\right) \boldsymbol{\sigma } \left( \mathbf { x } \right) \mathbf { n } \left( \mathbf { x } \right) \text {d a} _{ \mathbf { x } } \\&- \int _{H_I} \boldsymbol{\sigma } \left( \mathbf { x } \right) \frac{\partial W\left( \mathbf { x } - \mathbf { x } _I\right) }{\partial \mathbf { x } }\text {d}\nu _{ \mathbf { x } }. \end{aligned} \end{aligned}$$
(6.21)

Since \(W\left( \mathbf { x } - \mathbf { x } _I\right) v_I = N_I\left( \mathbf { x } \right) \), this relation corresponds exactly to the integration constraint given in (4.74). The standard patch test is satisfied if Eq. (6.20) is fulfilled for a constant stress

$$\begin{aligned} \begin{aligned} \int _{H_ \mathbf { x } }\frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } ^\prime }\text {d}\nu _{ \mathbf { x } ^\prime } = \int _{\partial H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \mathbf { n } \left( \mathbf { x } ^\prime \right) \text {d a} _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.22)

In discrete form, this requirement results in a constraint that each particle must satisfy separately

$$\begin{aligned} \begin{aligned} v_I\sum _{J=1}^{N_I}\frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _J}v_J = \left\{ \begin{array}{ll} 0 &{} \text{ inner } \text{ particles } \\ \bar{ \mathbf { n } }_I &{} \text{ boundary } \text{ particles }\end{array}\right. . \end{aligned} \end{aligned}$$
(6.23)

The resulting normal vector at the boundary particle follows directly from the discretization of the right-hand side in (6.22)

$$\begin{aligned} \begin{aligned} \bar{ \mathbf { n } }_I = \sum _{J=1}^{N_I}W\left( \mathbf { x } _I- \mathbf { x } _J\right) \mathbf { n } _Ja_J. \end{aligned} \end{aligned}$$
(6.24)

If the condition from the integration constraint is violated, a correction is needed. An approach can be found in Bonet and Kulasegaram (2000) which is specified in more detail in Sect. 5.1.3.

Remark

In Belytschko et al. (1998) there is a hint that (6.20) can be a reason for an error in the approximation. However, the reference to the integration constraint is missing. Instead, the analysis bears upon the derivative rule according to (6.18).

6.4 Alternative Derivative Rules

Besides to the variants (6.9) and (6.18) there are two additional concepts in SPH to calculate the derivative of a quantity.

6.4.1 Product Rule

With the help of another quantity, such as the density, the divergence of stress can be reformulated

$$\begin{aligned} \begin{aligned} \text{ div }\,\left( \rho \boldsymbol{\sigma } \right) = \rho \text{ div }\, \boldsymbol{\sigma } + \boldsymbol{\sigma } \,\text{ grad }\,\rho \quad \text{ leading } \text{ to }\quad \text{ div }\, \boldsymbol{\sigma } = \frac{1}{\rho }\left[ \text{ div }\,\left( \rho \boldsymbol{\sigma } \right) - \boldsymbol{\sigma } \,\text{ grad }\,\rho \right] . \end{aligned} \end{aligned}$$
(6.25)

Using the derivative rule (6.9), the divergence in SPH can also be calculated by means of a difference

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \frac{1}{\rho \left( \mathbf { x } \right) }\int _{H_ \mathbf { x } }\left[ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) - \boldsymbol{\sigma } \left( \mathbf { x } \right) \right] \rho \left( \mathbf { x } ^\prime \right) \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } }\text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.26)

If the ratio of the densities is assumed to be one, the alternative formulation from Randles and Libersky (1996) is obtained, which is based on the rule given by Monaghan (1988)

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \int _{H_ \mathbf { x } }\left[ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) - \boldsymbol{\sigma } \left( \mathbf { x } \right) \right] \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } }\text {d}\nu _{ \mathbf { x } ^\prime } . \end{aligned} \end{aligned}$$
(6.27)

With the representation of the derivative after (6.19)

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \frac{1}{\rho \left( \mathbf { x } \right) }\int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \left[ \text{ div }\,\left( \rho \left( \mathbf { x } ^\prime \right) \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \right) - \boldsymbol{\sigma } \left( \mathbf { x } \right) \,\text{ grad }\,\rho \left( \mathbf { x } ^\prime \right) \right] \text {d}\nu _{ \mathbf { x } ^\prime } \end{aligned} \end{aligned}$$
(6.28)

the condition from the integration constraint results to

$$\begin{aligned} \begin{aligned}&\int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \Big [\text{ div }\,\left( \rho \left( \mathbf { x } ^\prime \right) \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) \right) - \boldsymbol{\sigma } \left( \mathbf { x } \right) \,\text{ grad }\,\rho \left( \mathbf { x } ^\prime \right) \Big ]\text {d}\nu _{ \mathbf { x } ^\prime } \\&= \int _{\partial H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \rho \left( \mathbf { x } ^\prime \right) \Big [ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) - \boldsymbol{\sigma } \left( \mathbf { x } \right) \Big ] \mathbf { n } \left( \mathbf { x } ^\prime \right) \text {d a} _{ \mathbf { x } ^\prime } \\&- \int _{H_ \mathbf { x } }\rho \left( \mathbf { x } ^\prime \right) \Big [ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) - \boldsymbol{\sigma } \left( \mathbf { x } \right) \Big ]\frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } ^\prime }\text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.29)

To meet the standard patch test, the above relation must be fulfilled for constant stresses. In this case, both sides are identical zero. This also applies to particles near or at the boundary and no resulting normal vector can be obtained.

6.4.2 Quotient Rule

Another way to rewrite the divergence of stress is based on the exploitation of the quotient rule. This approach goes back to Gingold and Monaghan (1982)

$$\begin{aligned} \begin{aligned} \text{ div }\,\left( \frac{1}{\rho } \boldsymbol{\sigma } \right) = \frac{1}{\rho }\text{ div }\, \boldsymbol{\sigma } - \frac{1}{\rho ^2} \boldsymbol{\sigma } \,\text{ grad }\,\rho \quad \text{ leading } \text{ to }\quad \text{ div }\, \boldsymbol{\sigma } = \rho \text{ div }\,\left( \frac{1}{\rho } \boldsymbol{\sigma } \right) + \frac{1}{\rho } \boldsymbol{\sigma } \,\text{ grad }\,\rho . \end{aligned} \end{aligned}$$
(6.30)

In this case, the divergence is determined by the sum of stresses scaled by the density

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \rho \left( \mathbf { x } \right) \int _{H_ \mathbf { x } }\left[ \frac{ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) }{\rho \left( \mathbf { x } ^\prime \right) ^2} + \frac{ \boldsymbol{\sigma } \left( \mathbf { x } \right) }{ \rho \left( \mathbf { x } \right) ^2}\right] \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } } \rho \left( \mathbf { x } ^\prime \right) \text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.31)

A simplified form is obtained when the ratio of densities is again neglected, like in Bonet and Lok (1999)

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle = \int _{H_ \mathbf { x } }\left[ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) + \boldsymbol{\sigma } \left( \mathbf { x } \right) \right] \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } }\text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.32)

Again, the relationship for the integration constraint must be adjusted. Based on (6.19) the divergence can be reformulated

$$\begin{aligned} \begin{aligned} \langle \text{div}\, \boldsymbol{\sigma } \left( \mathbf { x } \right) \rangle =\rho \left( \mathbf { x } \right) \int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \left[ \text{ div }\,\left( \frac{ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) }{\rho \left( \mathbf { x } ^\prime \right) }\right) + \frac{ \boldsymbol{\sigma } \left( \mathbf { x } \right) }{\rho \left( \mathbf { x } \right) ^2}\,\text{ grad }\,\rho \left( \mathbf { x } ^\prime \right) \right] \text {d}\nu _{ \mathbf { x } ^\prime } \end{aligned} \end{aligned}$$
(6.33)

leading to the requirement

$$\begin{aligned} \begin{aligned}&\int _{H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \left[ \text{ div }\,\left( \frac{ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) }{\rho \left( \mathbf { x } ^\prime \right) }\right) + \frac{ \boldsymbol{\sigma } \left( \mathbf { x } \right) }{\rho \left( \mathbf { x } \right) ^2}\,\text{ grad }\,\rho \left( \mathbf { x } ^\prime \right) \right] \text {d}\nu _{ \mathbf { x } ^\prime } \\&= \int _{\partial H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \left[ \frac{ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) }{\rho \left( \mathbf { x } ^\prime \right) } + \frac{ \boldsymbol{\sigma } \left( \mathbf { x } \right) }{\rho \left( \mathbf { x } \right) ^2}\rho \left( \mathbf { x } ^\prime \right) \right] \mathbf { n } \left( \mathbf { x } ^\prime \right) \text {d a} _{ \mathbf { x } ^\prime } \\&- \int _{H_ \mathbf { x } } \left[ \frac{ \boldsymbol{\sigma } \left( \mathbf { x } ^\prime \right) }{\rho \left( \mathbf { x } ^\prime \right) } + \frac{ \boldsymbol{\sigma } \left( \mathbf { x } \right) }{\rho \left( \mathbf { x } \right) ^2}\rho \left( \mathbf { x } ^\prime \right) \right] \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } ^\prime }\text {d}\nu _{ \mathbf { x } ^\prime }. \end{aligned} \end{aligned}$$
(6.34)

For the case of a constant stress and a constant density, the requirement reduces to the original variant given in (6.22)

$$\begin{aligned} \begin{aligned} \int _{H_ \mathbf { x } } \frac{\partial W\left( \mathbf { x } - \mathbf { x } ^\prime \right) }{\partial \mathbf { x } ^\prime }\text {d}\nu _{ \mathbf { x } ^\prime } = \int _{\partial H_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } ^\prime \right) \mathbf { n } \left( \mathbf { x } ^\prime \right) \text {d a} _{ \mathbf { x } ^\prime } . \end{aligned} \end{aligned}$$
(6.35)

Remark 6.1

The second golden rule in SPH (Monaghan 1992) states that the formulation (6.27) should be used to calculate the derivative. This form guarantees that the derivative is zero if the corresponding quantities are constant in the neighborhood.

Remark 6.2

In Price (2012) a derivation of the mechanical balance equation for barotropic fluids from the discrete Euler-Lagrange equation is given. In Bonet and Lok (1999) the starting point is the discrete potential energy. The resulting discrete balance equations are equivalent to the formulation given in (6.31).

6.5 Reproducing Conditions

In SPH, W is usually a radial function. The reproducing conditions are not necessarily fulfilled in the discrete case, like e.g. for the 0th and the 1st order

$$\begin{aligned} \begin{aligned} \sum _{J=1}^{N_ \mathbf { x } } W\left( \mathbf { x } - \mathbf { x } _J\right) v_J \ne 1,\qquad \sum _{J=1}^{N_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } _J\right) \mathbf { x } _J\,v_J \ne \mathbf { x } . \end{aligned} \end{aligned}$$
(6.36)

Due to the second property in (6.4), the weighting function satisfies the 0th order reproducing condition in the continuous case. However, in the discrete case this is mostly not given. The same follows for the derivatives

$$\begin{aligned} \begin{aligned} \sum _{J=1}^{N_ \mathbf { x } } \frac{\partial W\left( \mathbf { x } - \mathbf { x } _J\right) }{\partial \mathbf { x } }v_J&= - \sum _{J=1}^{N_ \mathbf { x } } \frac{\partial W\left( \mathbf { x } _J- \mathbf { x } \right) }{\partial \mathbf { x } _J}v_J \ne 0\\ \sum _{J=1}^{N_ \mathbf { x } } \mathbf { x } _J\otimes \frac{\partial W\left( \mathbf { x } - \mathbf { x } _J\right) }{\partial \mathbf { x } }v_J&= - \sum _{J=1}^{N_ \mathbf { x } } \mathbf { x } _J\otimes \frac{\partial W\left( \mathbf { x } _J- \mathbf { x } \right) }{\partial \mathbf { x } _J}v_J \ne {\mathbf {1} } . \end{aligned} \end{aligned}$$
(6.37)

Different approaches are available to restore the requirements. In the following, four different variants are presented. The first two allow a complete fulfillment of the reproducing conditions. The last two forms show frequently used corrections for certain requirements. In addition, other approaches exist. An older overview can be found in Belytschko et al. (1998).

Variant 1

Since the shape functions are based on an integral operator, the approaches from Sect. 4.6.4 can be directly applied to satisfy the reproducing conditions up to the necessary order. The component \(\omega \) assuming \(\rho =1\) in (4.140) can be identified as the weighting function W. The remaining factor corresponds to the correction factor

$$\begin{aligned} \begin{aligned} \tilde{W}\left( \mathbf { x } - \mathbf { x } _J\right) = C\left( \mathbf { x } , \mathbf { x } _J\right) W\left( \mathbf { x } - \mathbf { x } _J\right) ,\quad C\left( \mathbf { x } , \mathbf { x } _J\right) = \mathbf { p } \left( 0\right) \cdot {\mathbf {M} } \left( \mathbf { x } \right) \widetilde{ \mathbf { p } } \left( \mathbf { x } - \mathbf { x } _J\right) . \end{aligned} \end{aligned}$$
(6.38)

The weighting function that fulfills the reproducing conditions is marked with a tilde over W.

Variant 2

An alternative approach is provided by Bonet and Lok (1999). The whole algorithm is indicated as Corrected Smoothed Particle Hydrodynamics (CSPH). It is based on the previous variant, considering only reproducibility up to 1st order. This allows the correction scheme to be simplified

$$\begin{aligned} \begin{aligned} \tilde{W}\left( \mathbf { x } - \mathbf { x } _J\right) = W\left( \mathbf { x } - \mathbf { x } _J\right) \alpha ( \mathbf { x } )\left[ 1 + \boldsymbol{ \beta } ( \mathbf { x } )\cdot \left( \mathbf { x } - \mathbf { x } _J\right) \right] . \end{aligned} \end{aligned}$$
(6.39)

The values of the vector \( \boldsymbol{ \beta } \) are determined by the restoration of the 1st order reproducing condition

$$\begin{aligned} \begin{aligned} \boldsymbol{ \beta } ( \mathbf { x } ) = \left[ \sum _{J=1}^{N_ \mathbf { x } }\left[ \mathbf { x } - \mathbf { x } _J\right] \otimes \left[ \mathbf { x } - \mathbf { x } _J\right] W\left( \mathbf { x } - \mathbf { x } _J\right) \, v_J\right] {}^{-1} \sum _{J=1}^{N_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } _J\right) \left[ \mathbf { x } _J- \mathbf { x } \right] \,v_J. \end{aligned} \end{aligned}$$
(6.40)

After the calculation of \( \boldsymbol{ \beta } \), the parameter \(\alpha \) is determined from the fulfillment of the 0th order reproducing condition

$$\begin{aligned} \begin{aligned} \alpha \left( \mathbf { x } \right) = \frac{1}{\sum _{J=1}^{N_ \mathbf { x } }\left[ 1 + \boldsymbol{ \beta } ( \mathbf { x } )\cdot \left( \mathbf { x } - \mathbf { x } _J\right) \right] W\left( \mathbf { x } - \mathbf { x } _J\right) v_J}. \end{aligned} \end{aligned}$$
(6.41)

Variant 3

If only the 1st order reproducing condition in the derivatives has to be satisfied, the alternative correction from Randles and Libersky (1996) can be used, see also Bonet and Lok (1999). A normalization guarantees that the reproducing condition of 0th order is satisfied

$$\begin{aligned} \begin{aligned} \tilde{W}\left( \mathbf { x } - \mathbf { x } _J\right) = \frac{W\left( \mathbf { x } - \mathbf { x } _J\right) }{\sum _{I=1}^{N_ \mathbf { x } }W\left( \mathbf { x } - \mathbf { x } _I\right) \,v_I}. \end{aligned} \end{aligned}$$
(6.42)

The requirement on the 1st order in the derivative can be recovered using the tensor \( {\mathbf {L} } \) analogous to Sect. 4.6.2

$$\begin{aligned} \begin{aligned} \frac{\partial \tilde{W}^c\left( \mathbf { x } - \mathbf { x } _J\right) }{\partial \mathbf { x } } = \frac{\partial \tilde{W}\left( \mathbf { x } - \mathbf { x } _J\right) }{\partial \mathbf { x } } {\mathbf {L} } {}^{-1} \left( \mathbf { x } \right) . \end{aligned} \end{aligned}$$
(6.43)

Since the weighting function \(\tilde{W}\) satisfies the reproducing condition of 0th order in the derivatives, the tensor \( {\mathbf {L} } \) can be alternatively formulated based on differences

$$\begin{aligned} \begin{aligned} {\mathbf {L} } \left( \mathbf { x } \right) = \sum _{J=1}^{N_ \mathbf { x } } \mathbf { x } _J\otimes \frac{\partial \tilde{W}\left( \mathbf { x } - \mathbf { x } _J\right) }{\partial \mathbf { x } }v_J = \sum _{J=1}^{N_ \mathbf { x } }\left( \mathbf { x } _J- \mathbf { x } \right) \otimes \frac{\partial \tilde{W}\left( \mathbf { x } - \mathbf { x } _J\right) }{\partial \mathbf { x } }v_J. \end{aligned} \end{aligned}$$
(6.44)

Variant 4

In Monaghan (1988), the 0th order reproducing condition in the derivatives is restored by a symmetrization. If a constant displacement field is present, by definition, the gradient is always equal to zero

$$\begin{aligned} \begin{aligned} \,\text{ grad }\, \mathbf { u } \left( \mathbf { x } \right) = \sum _{J=1}^{N_ \mathbf { x } }\Big [ \mathbf { u } _J - \mathbf { u } \left( \mathbf { x } \right) \Big ]\frac{\partial W\left( \mathbf { x } - \mathbf { x } _J\right) }{\partial \mathbf { x } }v_J. \end{aligned} \end{aligned}$$
(6.45)

This relationship corresponds to the product rule given in (6.27).

6.6 Discrete Conservation Properties

In the SPH, the discretization of the divergence operator is often based on either the product or the quotient rule. In these cases, the conditions differ from the requirements in Sect. 4.5.5. Therefore, a separate investigation on the conservation of global balance equations is needed. For the mechanical case, the study is based on the internal force due to the state of stress inside the material. The derivation focuses on the strong form with reduced order but can be applied to the other descriptions in the same manner.

6.6.1 Product Rule

Based on (6.26), the internal force at the particle is determined from a difference

$$\begin{aligned} \begin{aligned} \mathbf { f } ^{s}_I = -v_I\sum _{J=1}^{N_I}\frac{\rho _J}{\rho _I}\left[ \boldsymbol{\sigma } _J- \boldsymbol{\sigma } _I\right] \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_J. \end{aligned} \end{aligned}$$
(6.46)

Exploiting (6.12), this contribution can also be understood as the sum of forces between individual particles

$$\begin{aligned} \begin{aligned} \mathbf { f } ^{s}_I = -\sum _{J=1}^{N_I}\frac{\rho _J}{\rho _I}\left[ \mathbf { f } ^p_{IJ}+ \mathbf { f } ^p_{JI}\right] ,\quad \mathbf { f } ^p_{IJ} = \boldsymbol{\sigma } _J\frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_Iv_J. \end{aligned} \end{aligned}$$
(6.47)

The alternative formulation given in Randles and Libersky (1996) results if the ratio between the densities is assumed to be one.

Global balance of momentum. This requirement is satisfied if the internal forces over all particles n sum to zero, see also Sect. 4.5.5. By substituting (6.47) into (4.86), since \(W\left( \mathbf { x } - \mathbf { x } _J\right) \equiv 0\), if \( \mathbf { x } \notin H_{ \mathbf { x } }\), and by exploiting the interchange of indices, the condition can be specified in more detail

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{n} \mathbf { f } ^s_I&= -\sum _{I=1}^{n}\sum _{J=1}^{n}\left[ \frac{\rho _J}{\rho _I} + \frac{\rho _I}{\rho _J}\right] \mathbf { f } ^p_{IJ} = \sum _{J=1}^{n}v_J \boldsymbol{\sigma } _J\sum _{I=1}^{N_J}\left[ \frac{\rho _J}{\rho _I} + \frac{\rho _I}{\rho _J}\right] \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_I = 0. \end{aligned} \end{aligned}$$
(6.48)

To satisfy conservation of momentum for arbitrary stresses, the inner loop must be equal to zero

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{N_J}\left[ \frac{\rho _J}{\rho _I} + \frac{\rho _I}{\rho _J}\right] \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_I = 0. \end{aligned} \end{aligned}$$
(6.49)

In the version of Randles and Libersky (1996), the condition reduces to satisfying the 0th order reproducing condition in the derivatives.

Global balance of angular momentum. This conservation results in the requirement that the sum over all moments due to the internal forces must be equal to zero

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{n} \mathbf { f } ^s_I\times \mathbf { x } _I = \sum _{I=1}^{n}\mathcal {E}: \mathbf { x } _I\otimes \mathbf { f } ^s_I = 0. \end{aligned} \end{aligned}$$
(6.50)

Using (6.47) and taking advantage of the interchangeability of indices, the condition can be formulated in dependence on the addition of position vectors

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{n}\sum _{J=1}^{n}&\mathcal {E}: \mathbf { x } _I\otimes \frac{\rho _J}{\rho _I}\left[ \mathbf { f } ^p_{IJ}+ \mathbf { f } ^p_{JI}\right] \\&= \sum _{I=1}^{n}\sum _{J=1}^{n}\mathcal {E}: \left[ \frac{\rho _J}{\rho _I} \mathbf { x } _I + \frac{\rho _I}{\rho _J} \mathbf { x } _J\right] \otimes \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I} \boldsymbol{\sigma } _Jv_Iv_J = 0. \end{aligned} \end{aligned}$$
(6.51)

It has to be noted that the symmetry of the stress tensor is assumed in the derivation, i.e. \(\mathcal {E}: \boldsymbol{\sigma } \equiv 0\). In order to preserve angular momentum, the following condition must be fulfilled

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{N_J}\left[ \frac{\rho _J}{\rho _I} \mathbf { x } _I + \frac{\rho _I}{\rho _J} \mathbf { x } _J\right] \otimes \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_I = {\mathbf {1} } . \end{aligned} \end{aligned}$$
(6.52)

If the ratio of the densities is again set to one, the requirement reduces to satisfying the 0th and 1st order reproducing conditions in the derivatives.

6.6.2 Quotient Rule

Using the derivative rule (6.31) another variant for calculating the internal force at a particle is obtained

$$\begin{aligned} \begin{aligned} \mathbf { f } ^s_I = -v_I\rho _I\sum _{J=1}^{N_I}\left[ \frac{ \boldsymbol{\sigma } _J}{\rho _J^2}+\frac{ \boldsymbol{\sigma } _I}{\rho _I^2}\right] \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}\rho _Jv_J. \end{aligned} \end{aligned}$$
(6.53)

Taking advantage of (6.12), the force at a particle can also be interpreted as a result of the difference of forces between particles

$$\begin{aligned} \begin{aligned} \mathbf { f } ^s_I = -\sum _{J=1}^{N_I} \left[ \mathbf { f } _{IJ} - \mathbf { f } _{JI}\right] ,\quad \mathbf { f } _{IJ} = \rho _I\rho _J\frac{ \boldsymbol{\sigma } _I}{\rho _I^2}\frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_Iv_J. \end{aligned} \end{aligned}$$
(6.54)

The contribution \( \mathbf { f } _{IJ}\) corresponds to the force acting from particle J on particle I, whereas \( \mathbf { f } _{JI}\) describes the inverse relation. Another variation results when the ratio of the densities is again set to one

$$\begin{aligned} \begin{aligned} \mathbf { f } ^s_I = -\sum _{J=1}^{N_I}\left[ \boldsymbol{\sigma } _I\frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_Jv_I - \boldsymbol{\sigma } _J\frac{\partial W\left( \mathbf { x } _J- \mathbf { x } _I\right) }{\partial \mathbf { x } _J}v_Iv_J\right] = -\sum _{J=1}^{N_I} \left[ \mathbf { f } _{IJ} - \mathbf { f } _{JI}\right] . \end{aligned} \end{aligned}$$
(6.55)

The only difference between both variants is the calculation of \( \mathbf { f } _{IJ}\). Here it has to be noted that (6.55) using (6.6) corresponds exactly to (4.34), which is derived from the weak form based on differences.

Global balance of momentum. If particle J is in the neighborhood of the particle I and vice versa I is in the neighborhood of J, the global conservation of momentum is always satisfied. Since \(W\left( \mathbf { x } - \mathbf { x } _J\right) \equiv 0\), if \( \mathbf { x } \notin H_{ \mathbf { x } }\), the sums can be formed over all particles and the indices can be interchanged

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{n} \mathbf { f } ^s_I = -\sum _{I=1}^{n}\sum _{J=1}^{n} \left[ \mathbf { f } _{IJ} - \mathbf { f } _{JI}\right] = -\sum _{I=1}^{n}\sum _{J=1}^{n} \left[ \mathbf { f } _{IJ} - \mathbf { f } _{IJ}\right] \equiv 0. \end{aligned} \end{aligned}$$
(6.56)

Global balance of angular momentum. Since the indices can be arbitrarily exchanged, this proof can also be formulated in terms of a difference of position vectors. Substituting (6.54) into the general condition (4.89) leads to the alternative requirement

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{n}\mathcal {E}: \mathbf { x } _I\otimes \mathbf { f } ^s_I = -\sum _{I=1}^{n}\sum _{J=1}^{n}\mathcal {E}: \mathbf { x } _I\otimes \left( \mathbf { f } _{IJ} - \mathbf { f } _{JI}\right) = -\sum _{I=1}^{n}\sum _{J=1}^{n}\mathcal {E}:\left( \mathbf { x } _I- \mathbf { x } _J\right) \otimes \mathbf { f } _{IJ} = 0. \end{aligned} \end{aligned}$$
(6.57)

Unlike the conservation of momentum, this condition is not satisfied per se. By substituting \( \mathbf { f } _{IJ}\) from (6.54) into (6.57) and after some algebra, a requirement can be stated

$$\begin{aligned} \begin{aligned} -\sum _{I=1}^{n}\mathcal {E}:\left( \sum _{J=1}^{N_I}\left( \mathbf { x } _{I}- \mathbf { x } _J\right) \otimes \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}\rho _Jv_J\right) \frac{v_I}{\rho _I} \boldsymbol{\sigma } _I = 0. \end{aligned} \end{aligned}$$
(6.58)

Again, the symmetry of the stress tensor \( \boldsymbol{\sigma } \) is exploited. The global angular momentum is conserved only if the contribution in the parenthesis leads to the unit tensor

$$\begin{aligned} \begin{aligned} \sum _{J=1}^{N_I}\left( \mathbf { x } _{I}- \mathbf { x } _J\right) \otimes \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}\rho _Jv_J = {\mathbf {1} } . \end{aligned} \end{aligned}$$
(6.59)

If the ratio of densities is set to one, the requirement results in the fulfillment of the 0th and 1st order reproducing conditions in the derivatives.

Remark

If the stress tensor is isotropic, i.e., no shear stresses occur, then, in addition to the global conservation of momentum, the condition on angular momentum is always satisfied. In this case, (6.57) changes to

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{n}\sum _{J=1}^{n}\mathcal {E}:\left( \mathbf { x } _I- \mathbf { x } _J\right) \otimes \mathbf { f } _{IJ} = \sum _{I=1}^{n}\sum _{J=1}^{n}v_Iv_J\rho _J\frac{p_I}{\rho _I}\frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}\times \left( \mathbf { x } _{I}- \mathbf { x } _J\right) = 0. \end{aligned} \end{aligned}$$
(6.60)

Since W is based on a radial function

$$\begin{aligned} \begin{aligned} \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I} = \frac{\partial W}{\partial \Vert \mathbf { x } _I- \mathbf { x } _J\Vert }\frac{ \mathbf { x } _{I}- \mathbf { x } _J}{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert }, \end{aligned} \end{aligned}$$
(6.61)

the force is always parallel to the distance between the particles. The cross product between two vectors pointing in the same direction is by definition equal to zero and angular momentum is always conserved

$$\begin{aligned} \begin{aligned} \sum _{I=1}^{n}\sum _{J=1}^{n}v_Iv_J\rho _J\frac{p_I}{\rho _I}\frac{\partial W}{\partial \Vert \mathbf { x } _I- \mathbf { x } _J\Vert }\left( \frac{ \mathbf { x } _{I}- \mathbf { x } _J}{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert }\times \left( \mathbf { x } _{I}- \mathbf { x } _J\right) \right) \equiv 0. \end{aligned} \end{aligned}$$
(6.62)

6.7 Search Algorithm

The first step in the SPH is the determination of the neighborhoods. Usually, an algorithm seeks the nearest particles. If the distance of particle J to particle I is smaller than a given value, then J is in the neighborhood of I. Normally, the radius correlates with the smoothing length (Li and Liu 2007). Mostly, r is in the range of 1.3–2.0 times the initial particle distance (Fig. 6.1). Since the body is usually divided into grid-like individual particles, the radius is constant for all particles.

Fig. 6.1
figure 1

Initial subdivision of the domain into a grid like distribution of particles and determination of the neighborhood by means of a search radius

A redefinition of the neighborhood during the simulation can lead to a change in the quantities, although there is no external load. In order to avoid this unphysical behavior, the smoothing length can be adjusted. Monaghan (2002) suggests that the density must be the same before and after the redetermination

$$\begin{aligned} \begin{aligned} \rho _I = \sum _{J=1}^{N_I}m_J\,W\left( \mathbf { x } _I- \mathbf { x } _J,h_I\right) ,\quad \text{ with }\quad h_I:= \left( \frac{m_I}{\rho _I}\right) ^{\frac{1}{3}} = \left( v_I\right) ^{\frac{1}{3}}. \end{aligned} \end{aligned}$$
(6.63)

Since the density is a function of the smoothing length, a nonlinear system of equations results. For its solution the Newton-Raphson iteration can be applied. The dependence of the weighting function on h must also be considered in the calculation of the force in order not to violate the balance of momentum (Nelson and Papaloizou 1994). For a varying smoothing length an additional term \(\Omega \) appears in the calculation of the forces, like for the approach from (6.55)

$$\begin{aligned} \begin{aligned} \mathbf { f } ^s_I =- \sum _{J=1}^{N_I}\left[ \frac{ \boldsymbol{\sigma } _I}{\Omega _I}\frac{\partial W( \mathbf { x } _I- \mathbf { x } _J,h_I)}{\partial \mathbf { x } _I} - \frac{ \boldsymbol{\sigma } _J}{\Omega _J}\frac{\partial W( \mathbf { x } _J- \mathbf { x } _I,h_J)}{\partial \mathbf { x } _J}\right] v_Iv_J. \end{aligned} \end{aligned}$$
(6.64)

The additional quantity \(\Omega \) contains the derivative of the weighting function with respect to the smoothing length

$$\begin{aligned} \begin{aligned} \Omega _I = 1 + \frac{h_I}{3\,\rho _I}\sum _{J=1}^{N_I}m_J\frac{\partial W( \mathbf { x } _I- \mathbf { x } _J,h_I)}{\partial h_I}. \end{aligned} \end{aligned}$$
(6.65)

A detailed derivation of this equation can be found in Price and Monaghan (2004) or Price (2012).

Another condition on the search algorithm follows from (6.56). If particle J lies in the neighborhood of particle I and particle I is also part of the neighborhood of J, global momentum is conserved. If the search radii are the same for each particle, this requirement is always met, see also Sect. 7.5.

In addition, the particle distribution in the neighborhood should be statistically homogeneous. When simulating fluids, the neighborhood of the particles is redetermined at every time step. Disturbed particle distributions can occur, resulting in penetration and a mixture of particles. To prevent this, an alternative approach is used in Monaghan (1989). The position vector of the particle \( \mathbf { x } _I\) is not updated by the solution function \( \mathbf { v } _I\) of the differential equation, but via a smoothing velocity

$$\begin{aligned} \begin{aligned} \dot{ \mathbf { x } }_I = \mathbf { v } _I + \xi \sum _{J=1}^{N_I}\frac{m_J}{\rho _{IJ}}\left( \mathbf { v } _J - \mathbf { v } _I\right) W( \mathbf { x } _I- \mathbf { x } _J),\quad \rho _{IJ} = \frac{1}{2}\left( \rho _I + \rho _J\right) . \end{aligned} \end{aligned}$$
(6.66)

The current coordinate is calculated from the integration of \(\dot{ \mathbf { x } }_I\). The parameter \(\xi \) is usually selected between 0 and 0.5. This approach does not affect the balance of momentum. If this correction is applied the algorithm is also called XSPH.

Alternatively, there are other correction schemes that allow an improved particle distribution. These are based either on remeshing techniques (Xu et al. 2009), the introduction of an advection velocity (Adami et al. 2013), or on an Arbitrary Lagrangian Eulerian (ALE) approach (Oger et al. 2016).

Remark

The reasons for the disturbed particle distribution are not investigated in the presented algorithms. Instead, only attempts are made to correct the symptom. As shown in Sect. 6.13, rank instability is a central topic in SPH. In addition, configurational consistency plays a role, which has not yet been investigated in the SPH. Only if all negative effects due to a violation of the requirements listed in Sect. 4.5 can be excluded, investigations on the causes of disturbed particle distributions are possible.

6.8 Tensile Instability

The SPH in its original form is based on the deformed configuration. As shown in Swegle et al. (1995), to avoid a tensile instability it must be ensured that the product of the second derivative of the weighting function with the stress at any particle J is always less than zero. In Monaghan (2000), an approach based on artificial stresses is introduced to avoid negative effects due to tensile instability.

6.9 SPH for Solids

In many applications, the modeling of solids by means of SPH is based on the rule (6.55), see e.g. Ganzenmüller (2015) or Rabczuk et al. (2004). In order to avoid tensile instabilities, the equations are discretized with respect to the initial configuration. Mostly, the 1st Piola Kirchhoff stress tensor \( {\mathbf {P} } \) is used instead of \( \boldsymbol{\sigma } \). Hence, the current volume v must be replaced by the initial volume V and the weighting function must be evaluated with respect to \( \mathbf { X } \)

$$\begin{aligned} \begin{aligned} \mathbf { f } ^s_I = -\sum _{J=1}^{N_I}\left[ {\mathbf {P} } _I\frac{\partial W\left( \mathbf { X } _I- \mathbf { X } _J\right) }{\partial \mathbf { X } _I} - {\mathbf {P} } _J\frac{\partial W\left( \mathbf { X } _J- \mathbf { X } _I\right) }{\partial \mathbf { X } _J}\right] V_IV_J. \end{aligned} \end{aligned}$$
(6.67)

For hyperelastic materials, \( {\mathbf {P} } \) is calculated from the derivative of the specific strain energy function with respect to the deformation gradient

$$\begin{aligned} \begin{aligned} {\mathbf {P} } _I = \rho _0\frac{\partial \psi ( {\mathbf {F} } _I)}{\partial {\mathbf {F} } _I}. \end{aligned} \end{aligned}$$
(6.68)

To ensure that a constant displacement does not lead to strains in the body, the rule (6.45) is mostly used to compute \( {\mathbf {F} } \). In addition, the derivative of the weighting function is corrected based on (6.44)

$$\begin{aligned} \begin{aligned} {\mathbf {F} } _I&= {\mathbf {1} } + \sum _{J=1}^{N_I} \left( \mathbf { u } _J - \mathbf { u } _I\right) \otimes \frac{\partial W( \mathbf { X } _I- \mathbf { X } _J)}{\partial \mathbf { X } _I} {\mathbf {L} } _I{}^{-1} V_J,\\ {\mathbf {L} } _I&= \sum _{J=1}^{N_I}\left( \mathbf { X } _J- \mathbf { X } _I\right) \otimes \frac{\partial \tilde{W}\left( \mathbf { X } _I- \mathbf { X } _J\right) }{\partial \mathbf { X } _I}V_J. \end{aligned} \end{aligned}$$
(6.69)

Hence, the reproducing condition of 1st order in the derivatives is satisfied. The corrected derivative is also mostly applied to calculate the internal forces

$$\begin{aligned} \begin{aligned} \mathbf { f } ^s_I = -\sum _{J=1}^{N_I}\left[ {\mathbf {P} } _I\frac{\partial W\left( \mathbf { X } _I- \mathbf { X } _J\right) }{\partial \mathbf { X } _I} {\mathbf {L} } _I{}^{-1} - {\mathbf {P} } _J\frac{\partial W\left( \mathbf { X } _J- \mathbf { X } _I\right) }{\partial \mathbf { X } _J} {\mathbf {L} } _J{}^{-1} \right] V_IV_J. \end{aligned} \end{aligned}$$
(6.70)

Due to the corrected weighting function, and due to the formulation based on the quotient rule, momentum but not angular momentum is conserved.

6.10 SPH for Fluids

In the calculation of fluid flows, the neighborhood is always redefined in order to simulate very large deformations. The equations are formulated with respect to the deformed configuration. Since the molten metal can be regarded as incompressible, only volume preserving fluids are considered. The discretization is based on the differential equation (3.14). For the pressure gradient the rule (6.55) is often used (Colagrossi and Landrini 2003; Fürstenau et al. 2019)

$$\begin{aligned} \begin{aligned} \mathbf { f } _I^s = \mathbf { f } _I^p + \mathbf { f } _I^v,\qquad \mathbf { f } _I^p = \sum _{J=1}^{N_I}\left[ p_J + p_I\right] \frac{\partial W( \mathbf { x } _I - \mathbf { x } _J)}{\partial \mathbf { x } _I}v_Iv_J. \end{aligned} \end{aligned}$$
(6.71)

Since no shear stresses occur, the global balance of momentum and angular momentum are always fulfilled. The pressure can be calculated in two different ways. The first approach is based on the direct fulfillment of the incompressibility condition. The direct solution of this constraint leads to a clustering of particles. Alternatively, in the SPH p can be solved by the Pressure Poisson equation (Cummins and Rudman 1999; Shao and Lo 2003 or Hu and Adams 2007). The particle velocities and position vectors are calculated subsequently. This scheme is called Incompressible Smoothed Particle Hydrodynamics (ISPH) and describes an own area within the SPH that is not considered here. The second option describes the material as a barotropic fluid. The pressure calculates from the density like presented in MacDonald (1966)

$$\begin{aligned} \begin{aligned} p_I = \frac{\rho _I\,c_0^2}{7}\left[ \left( \frac{\rho _I}{\rho _0}\right) ^7-1\right] . \end{aligned} \end{aligned}$$
(6.72)

The velocity of sound \(c_0\) in the liquid can be interpreted as a penalty parameter that forces the density to be equal to its initial value. For this reason, the alternative approach \(p_I = c_0^2(\rho _I-\rho _0)\) can also be used. The penalty parameter should be 10 times larger than the maximum velocity component (\(c_0 \ge \) 10 max \(v_i\)) to keep the density changes in the area below one percent (Monaghan 2005). Since the incompressibility constraint is not enforced exactly, this approach is called weakly compressible. The density of a particle is calculated from the discretized continuity equation. Often the rule (6.45) is used, which ensures a constant density, if the velocity is constant

$$\begin{aligned} \begin{aligned} \dot{\rho }_I = - \rho _I\sum _{J=1}^{N_I} \left( \mathbf { v } _J - \mathbf { v } _I\right) \cdot \frac{\partial W( \mathbf { x } _I- \mathbf { x } _J)}{\partial \mathbf { x } _I}v_J. \end{aligned} \end{aligned}$$
(6.73)

In the SPH for fluids, the strong form is discretized directly. The required second derivative of the weighting function in the viscous term can lead to unstable solutions. Therefore, an approach based on two first derivatives is mostly applied

$$\begin{aligned} \begin{aligned} \mathbf { f } ^v_I = -\eta \, v_I \sum _{J=1}^{N_I} \frac{\rho _I + \rho _J}{\rho _I}\frac{( \mathbf { v } _I- \mathbf { v } _J)\cdot \left( \mathbf { x } _{I}- \mathbf { x } _J\right) }{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert ^2 + \epsilon ^2}\frac{\partial W\left( \mathbf { x } _I - \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_J. \end{aligned} \end{aligned}$$
(6.74)

This form goes back to Brookshaw (1985), and was extended in Espanol and Revenga (2003) to general tensors. By a small modification it can be achieved that this approach conserves global momentum as well as angular momentum. If the density in the denominator is assumed to be constant, the equation can be formulated as a function of the kinematic viscosity \(\nu \), i.e. \(\eta = \nu \,\rho \). Taking advantage of (6.12), \( \mathbf { f } ^v_I\) can again be expressed as the difference of forces between individual particles

$$\begin{aligned} \begin{aligned} \mathbf { f } ^v_I = -\sum _{J=1}^{N_I} \left[ \mathbf { f } ^v_{IJ} - \mathbf { f } ^v_{JI}\right] ,\quad \mathbf { f } ^v_{IJ} = \nu v_I\rho _I\frac{( \mathbf { v } _I- \mathbf { v } _J)\cdot \left( \mathbf { x } _{I}- \mathbf { x } _J\right) }{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert ^2 + \epsilon ^2}\frac{\partial W\left( \mathbf { x } _I - \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_J. \end{aligned} \end{aligned}$$
(6.75)

Analogous to (6.56), this ensures that global momentum is conserved. Since the quantities are scalars, statement (6.62) is valid and the condition on the global conservation of angular momentum is also fulfilled.

6.11 Boundary Conditions

The neighborhood of particles at the boundary is not completely filled. Most shape functions in SPH neither fulfill the reproducing conditions nor possess the Kronecker-\(\delta \) property. If a constant quantity is approximated using the standard approach, differences can be observed between the values at inner and outer particles (Takeda et al. 1994). In the SPH, a lot of methods for imposing boundary conditions have been established, which differ strongly from standard Galerkin schemes.

Fig. 6.2
figure 2

Introduction of ghost particles to impose boundary conditions

For the imposition of Dirichlet boundary conditions, four different approaches are available. Two of them are based on the introduction of so-called ghost particles, which lie outside the area (Libersky et al. 1993) and represent a fixed border (Fig. 6.2). The particles are not taken into account in the calculation but lead to a completely filled neighborhood for particles at or near the boundary. This form is often used in the simulation of solids (Ganzenmüller 2015). Randles and Libersky (1996) presented a variant in which the ghost particles are canceled out. For solids, the Dirichlet boundary condition is assigned to all ghost particles. The number and distribution of these particles result from the condition of a filled neighborhood. In fluid-structure interactions with rigid walls, similar approaches for the imposition of boundary conditions are available (Morris et al. 1997; Adami et al. 2012). To fulfill the normal and tangential boundary conditions for fluids from (3.16) and (3.17) suitable values must be defined at the ghost particles.

A second, similar option is the mirroring of particles along the boundary, as suggested in Colagrossi and Landrini (2003) or Macia et al. (2011). This also leads to ghost particles outside the area. Suitable values must be defined at these particles, to impose the boundary conditions accurately.

Alternatively, the Dirichlet boundary conditions can be replaced by forces. Estimates can be based on the Lennard Jones potential (Monaghan 1994) or on radial functions (Monaghan and Kajtar 2009). In Bonet and Kulasegaram (2000) the penalty method is applied to impose Dirichlet boundary conditions. The prerequisite for this approach is the fulfillment of the reproducing conditions at the boundary.

A fourth possibility is the direct integration of the boundary conditions into the differential equations. Corresponding approaches can be found in Kulasegaram et al. (2004), Macia et al. (2012) or Ferrand et al. (2013).

Neumann boundary conditions are usually imposed as particle forces. Since no direct information about the surface is available in SPH, individual surface portions must be assigned to each particle. This area can be estimated e.g. from (6.63) as suggested in Soleimani (2017)

$$\begin{aligned} \begin{aligned} a_I = h_I^2 = \left( v_I\right) ^{\frac{2}{3}}. \end{aligned} \end{aligned}$$
(6.76)

Alternatively, the area belonging to a particle can be determined using the weighting function (Antoci et al. 2007). The force is introduced into the body via a layer of particles at the boundary. Another approach for imposing Dirichlet and Neumann boundary conditions based on fixed ghost particles can be found in Marrone et al. (2011).

A study that compares different approaches for fluid-structure interactions can be found in Valizadeh and Monaghan (2015). This investigation concludes that the modeling based on fixed ghost particles leads to the most physically meaningful results.

6.12 Oscillations

The simulation of shock waves or convection-dominated flows can show artificial oscillations in the velocity and pressure field. Therefore an artificial viscosity is introduced in Monaghan and Gingold (1983) to dampen this oscillation

$$\begin{aligned} \begin{aligned} \mathbf { f } _I^{art\,vis} = -v_I\alpha \,h\,c_0\sum _{J=1}^{N_I}\frac{\rho _I\rho _J}{2(\rho _I+\rho _J)}\frac{\left( \mathbf { v } _{I}- \mathbf { v } _J\right) \cdot \left( \mathbf { x } _{I}- \mathbf { x } _J\right) }{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert ^2 + \epsilon ^2}\frac{\partial W( \mathbf { x } _I- \mathbf { x } _J)}{\partial \mathbf { x } _I}v_J. \end{aligned} \end{aligned}$$
(6.77)

In Molteni and Colagrossi (2009) it was observed that despite the artificial viscosity high-frequency disturbances still occur in the pressure field. By the introduction of an additional diffusion term in the continuity equation, these oscillations could be damped out (Molteni and Colagrossi 2009; Marrone et al. 2011)

$$\begin{aligned} \begin{aligned} \rho _I^{art\,dens} = \delta \,h\,\bar{c}_{0}\sum _{J=1}^{N_I}\left[ 2\,\left( \rho _J - \rho _I\right) \frac{ \mathbf { x } _{J}- \mathbf { x } _I}{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert ^2} - \,\text{ grad }\,\rho _I - \,\text{ grad }\,\rho _J\right] \cdot \frac{\partial W\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I}v_J. \end{aligned} \end{aligned}$$
(6.78)

In the discretization of the gradient, the corrected derivative using the tensor \( {\mathbf {L} } \) (6.43) is used

$$\begin{aligned} \begin{aligned} \,\text{ grad }\,\rho _I = \sum _{J=1}^{N_I}\left( \rho _J - \rho _I\right) \frac{\partial W_I\left( \mathbf { x } _I- \mathbf { x } _J\right) }{\partial \mathbf { x } _I} {\mathbf {L} } _I{}^{-1} . \end{aligned} \end{aligned}$$
(6.79)

The application of this stabilization is known as \(\delta \)-SPH. The numerical parameters \(\alpha \) and \(\delta \) control the strength of the damping and are selected much smaller than 1.

An alternative approach is based on a formulation of the equations in a moving frame of reference. This scheme corresponds to a coupling of the SPH with the Arbitrary Lagrangian-Eulerian formulation (Vila 1999). An application can be found in Marongiu et al. (2010). Since this method requires the solution of the non-linear Riemann problem, this variant is also called Riemann SPH (Oger et al. 2016). A comparison of different approaches can be found in Antuono et al. (2012).

6.13 Rank Instability

Belytschko et al. (2000) shows that artificial zero-energy modes also occur in the SPH. The reasons lie in the reduced number of evaluation points, which is limited to the number of particles. By introducing additional integration points, which are called stress points in SPH, the negative effects due to under-integration can be diminished (Vignjevic et al. 2000; Belytschko et al. 2000).

The approach of using stress points in SPH goes back to Dyka and Ingel (1995) and Dyka et al. (1997) and was initially developed to correct the tensile instability.

To avoid these additional evaluation points, an alternative approach is proposed in Bonet and Kulasegaram (2000). This correction is based on a gradient type stabilization similar to the concept introduced in Sect. 5.1.2.

A third option is suggested in Ganzenmüller (2015) which is already discussed in Sect. 5.2.4. Thereby, an additional force is introduced into the system, which actually corrects the violation of the configurational consistency from (4.84) by employing the penalty method

$$\begin{aligned} \begin{aligned} \mathbf { f } _I^{cor} = -V_I\sum _{J=1}^{N_I}\alpha \frac{E}{\Vert \mathbf { X } _{I}- \mathbf { X } _J\Vert ^2}\epsilon _{IJ} \frac{ \mathbf { x } _{I}- \mathbf { x } _J}{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert } W\left( \mathbf { X } _I- \mathbf { X } _J\right) V_J. \end{aligned} \end{aligned}$$
(6.80)

The error from the configurational consistency \(\epsilon _{IJ}\) is determined separately for each particle pair

$$\begin{aligned} \begin{aligned} \epsilon _{IJ} = \left[ \left( \mathbf { x } _{I}- \mathbf { x } _J\right) - \frac{1}{2}\left( {\mathbf {F} } _I + {\mathbf {F} } _J \right) \left( \mathbf { X } _{I}- \mathbf { X } _J\right) \right] \cdot \frac{ \mathbf { x } _{I}- \mathbf { x } _J}{\Vert \mathbf { x } _{I}- \mathbf { x } _J\Vert }. \end{aligned} \end{aligned}$$
(6.81)

This approach is developed for simulating solid deformations and is formulated with respect to the initial configuration. The size \(\alpha \) corresponds to the penalty parameter and is set in relation to Young’s modulus E (Ganzenmüller 2015).