# Smoothed-particle hydrodynamics

(Redirected from Smoothed particle hydrodynamics)
Schematic view of a SPH convolution

Smoothed-particle hydrodynamics (SPH) is a computational method used for simulating the mechanics of continuum media, such as solid mechanics and fluid flows. It was developed by Gingold and Monaghan[1] and Lucy[2] in 1977, initially for astrophysical problems. It has been used in many fields of research, including astrophysics, ballistics, volcanology, and oceanography. It is a meshfree Lagrangian method (where the co-ordinates move with the fluid), and the resolution of the method can easily be adjusted with respect to variables such as density.

## Method

### History

• By construction, SPH is a meshfree method, which makes it ideally suited to simulate problems dominated by complex boundary dynamics, like free surface flows, or large boundary displacement.
• On top of that, the lack of a mesh significantly simplifies the model implementation and its parallelization, even for many-core architectures.[3][4]
• SPH can be easily extended to a wide variety of fields, and hybridized with some other models, as discussed in Advanced techniques and applications.
• As discussed in section on weakly compressible SPH, the method has great conservation features.
• The computational cost of SPH simulations per number of particles is significantly less than the cost of grid-based simulations per number of cells when the metric of interest is related to fluid density (e.g., the probability density function of density fluctuations).[5] This is the case because in SPH the resolution is put where the matter is.

### Limitations

• Setting boundary conditions in SPH such as inlets and outlets [6] and walls [7] is more difficult than with grid-based methods. In fact, it has been stated that "the treatment of boundary conditions is certainly one of the most difficult technical points of the SPH method".[8] This challenge is partly because in SPH the particles near the boundary change with time.[9] Nonetheless, for instance, wall boundary conditions for SPH are available.[7][9]
• The computational cost of SPH simulations per number of particles is significantly larger than the cost of grid-based simulations per number of cells when the metric of interest is not (directly) related to density (e.g., the kinetic-energy spectrum).[5] Therefore, overlooking issues of parallel speedup, the simulation of constant-density flows (e.g., external aerodynamics) is more efficient with grid-based methods than with SPH.

## Examples

### Fluid dynamics

Fig. SPH simulation of ocean waves using FLUIDS v.1 (Hoetzlein)

Smoothed-particle hydrodynamics is being increasingly used to model fluid motion as well. This is due to several benefits over traditional grid-based techniques. First, SPH guarantees conservation of mass without extra computation since the particles themselves represent mass. Second, SPH computes pressure from weighted contributions of neighboring particles rather than by solving linear systems of equations. Finally, unlike grid-based techniques, which must track fluid boundaries, SPH creates a free surface for two-phase interacting fluids directly since the particles represent the denser fluid (usually water) and empty space represents the lighter fluid (usually air). For these reasons, it is possible to simulate fluid motion using SPH in real time. However, both grid-based and SPH techniques still require the generation of renderable free surface geometry using a polygonization technique such as metaballs and marching cubes, point splatting, or 'carpet' visualization. For gas dynamics it is more appropriate to use the kernel function itself to produce a rendering of gas column density (e.g., as done in the SPLASH visualisation package).

One drawback over grid-based techniques is the need for large numbers of particles to produce simulations of equivalent resolution. In the typical implementation of both uniform grids and SPH particle techniques, many voxels or particles will be used to fill water volumes that are never rendered. However, accuracy can be significantly higher with sophisticated grid-based techniques, especially those coupled with particle methods (such as particle level sets), since it is easier to enforce the incompressibility condition in these systems. SPH for fluid simulation is being used increasingly in real-time animation and games where accuracy is not as critical as interactivity.

Recent work in SPH for fluid simulation has increased performance, accuracy, and areas of application:

• B. Solenthaler, 2009, develops Predictive-Corrective SPH (PCISPH) to allow for better incompressibility constraints[10]
• M. Ihmsen et al., 2010, introduce boundary handling and adaptive time-stepping for PCISPH for accurate rigid body interactions[11]
• K. Bodin et al., 2011, replace the standard equation of state pressure with a density constraint and apply a variational time integrator[12]
• R. Hoetzlein, 2012, develops efficient GPU-based SPH for large scenes in Fluids v.3[13]
• N. Akinci et al., 2012, introduce a versatile boundary handling and two-way SPH-rigid coupling technique that is completely based on hydrodynamic forces; the approach is applicable to different types of SPH solvers [14]
• M. Macklin et al., 2013 simulates incompressible flows inside the Position Based Dynamics framework, for bigger timesteps [15]
• N. Akinci et al., 2013, introduce a versatile surface tension and two-way fluid-solid adhesion technique that allows simulating a variety of interesting physical effects that are observed in reality[16]
• J. Kyle and E. Terrell, 2013, apply SPH to Full-Film Lubrication[17]
• A. Mahdavi and N. Talebbeydokhti, 2015, propose a hybrid algorithm for implementation of solid boundary condition and simulate flow over a sharp crested weir[18]
• S. Tavakkol et al., 2016, develop curvSPH, which makes the horizontal and vertical size of particles independent and generates uniform mass distribution along curved boundaries[19]

### Astrophysics

Smoothed-particle hydrodynamics's adaptive resolution, numerical conservation of physically conserved quantities, and ability to simulate phenomena covering many orders of magnitude make it ideal for computations in theoretical astrophysics.[20]

Simulations of galaxy formation, star formation, stellar collisions,[21] supernovae[22] and meteor impacts are some of the wide variety of astrophysical and cosmological uses of this method.

SPH is used to model hydrodynamic flows, including possible effects of gravity. Incorporating other astrophysical processes which may be important, such as radiative transfer and magnetic fields is an active area of research in the astronomical community, and has had some limited success.[23][24]

### Solid mechanics

Libersky and Petschek[25][26] extended SPH to Solid Mechanics. The main advantage of SPH in this application is the possibility of dealing with larger local distortion than grid-based methods. This feature has been exploited in many applications in Solid Mechanics: metal forming, impact, crack growth, fracture, fragmentation, etc.

Another important advantage of meshfree methods in general, and of SPH in particular, is that mesh dependence problems are naturally avoided given the meshfree nature of the method. In particular, mesh alignment is related to problems involving cracks and it is avoided in SPH due to the isotropic support of the kernel functions. However, classical SPH formulations suffer from tensile instabilities[27] and lack of consistency.[28] Over the past years, different corrections have been introduced to improve the accuracy of the SPH solution, leading to the RKPM by Liu et al.[29] Randles and Libersky[30] and Johnson and Beissel[31] tried to solve the consistency problem in their study of impact phenomena.

Dyka et al.[32][33] and Randles and Libersky[34] introduced the stress-point integration into SPH and Ted Belytschko et al.[35] showed that the stress-point technique removes the instability due to spurious singular modes, while tensile instabilities can be avoided by using a Lagrangian kernel. Many other recent studies can be found in the literature devoted to improve the convergence of the SPH method.

Recent improvements in understanding the convergence and stability of SPH have allowed for more widespread applications in Solid Mechanics. Other examples of applications and developments of the method include:

• Metal forming simulations.[36]
• SPH-based method SPAM (Smoothed Particle Applied Mechanics) for impact fracture in solids by William G. Hoover.[37]
• Modified SPH (SPH/MLSPH) for fracture and fragmentation.[38]
• Taylor-SPH (TSPH) for shock wave propagation in solids.[39]

## Numerical tools

### Interpolations

The smoothed-particle hydrodynamics (SPH) method works by dividing the fluid into a set of discrete moving elements ${\displaystyle i,j}$, referred to as particles. Their Lagrangian nature allows setting their position ${\displaystyle \mathbf {r} _{i}}$ by integration of their velocity ${\displaystyle \mathbf {v} _{i}}$ as:

${\displaystyle {\frac {\mathrm {d} {\boldsymbol {r}}_{i}}{\mathrm {d} t}}={\boldsymbol {v}}_{i}.}$

These particles interact through a kernel function with characteristic radius known as the "smoothing length", typically represented in equations by ${\displaystyle h}$. This means that the physical quantity of any particle can be obtained by summing the relevant properties of all the particles that lie within the range of the kernel, the latter being used as a weighting function ${\displaystyle W}$. This can be understood in two steps. First an arbitrary field ${\displaystyle A}$ is written as a convolution with ${\displaystyle W}$:

${\displaystyle A({\boldsymbol {r}})=\int A\left({\boldsymbol {r^{\prime }}}\right)W(|{\boldsymbol {r}}-{\boldsymbol {r^{\prime }}}|,h)\mathrm {d} V\left({\boldsymbol {r^{\prime }}}\right).}$

The error in making the above approximation is order ${\displaystyle h^{2}}$. Secondly, the integral is approximated using a Riemann summation over the particles:

${\displaystyle A({\boldsymbol {r}})=\sum _{j}V_{j}A_{j}W(|{\boldsymbol {r}}-{\boldsymbol {r}}_{j}|,h),}$

where the summation over ${\displaystyle j}$ includes all particles in the simulation. ${\displaystyle V_{j}}$ is the volume of particle ${\displaystyle j}$, ${\displaystyle A_{j}}$ is the value of the quantity ${\displaystyle A}$ for particle ${\displaystyle j}$ and ${\displaystyle {\boldsymbol {r}}}$ denotes position. For example, the density ${\displaystyle \rho _{i}}$ of particle ${\displaystyle i}$ can be expressed as:

${\displaystyle \rho _{i}=\rho ({\boldsymbol {r}}_{i})=\sum _{j}m_{j}W_{ij},}$

where ${\displaystyle m_{j}=\rho _{j}V_{j}}$ denotes the particle mass and ${\displaystyle \rho _{j}}$ the particle density, while ${\displaystyle W_{ij}=W_{ji}}$ is a short notation for ${\displaystyle W(|{\boldsymbol {r}}_{i}-{\boldsymbol {r}}_{j}|,h)}$. The error done in approximating the integral by a discrete sum depends on ${\displaystyle h}$, on the particle size (i.e. ${\displaystyle V_{j}^{1/d}}$, ${\displaystyle d}$ being the space dimension), and on the particle arrangement in space. The latter effect is still poorly known.[40]

Kernel functions commonly used include the Gaussian function, the quintic spline and the Wendland ${\displaystyle C^{2}}$ kernel.[41] The latter two kernels are compactly supported (unlike the Gaussian, where there is a small contribution at any finite distance away), with support proportional to ${\displaystyle h}$. This has the advantage of saving computational effort by not including the relatively minor contributions from distant particles.

Although the size of the smoothing length can be fixed in both space and time, this does not take advantage of the full power of SPH. By assigning each particle its own smoothing length and allowing it to vary with time, the resolution of a simulation can be made to automatically adapt itself depending on local conditions. For example, in a very dense region where many particles are close together, the smoothing length can be made relatively short, yielding high spatial resolution. Conversely, in low-density regions where individual particles are far apart and the resolution is low, the smoothing length can be increased, optimising the computation for the regions of interest.

### Operators

For particles of constant mass, differentiating the interpolated density ${\displaystyle \rho _{i}}$ with respect to time yields

${\displaystyle {\frac {d\rho _{i}}{dt}}=\sum _{j}m_{j}\left({\boldsymbol {v}}_{i}-{\boldsymbol {v}}_{j}\right)\cdot \nabla W_{ij},}$

where ${\displaystyle \nabla W_{ij}=-\nabla W_{ji}}$ is the gradient of ${\displaystyle W_{ij}}$ with respect to ${\displaystyle {\boldsymbol {r}}_{i}}$. Comparing the above equation with the continuity equation in continuum mechanics shows that the right-hand side is an approximation of ${\displaystyle -\rho \nabla \cdot \mathbf {v} }$; hence one defines a discrete divergence operator as follows:

${\displaystyle \operatorname {D} _{i}\left\{{\boldsymbol {v}}_{j}\right\}=-{\frac {1}{\rho _{i}}}\sum _{j}m_{j}\left({\boldsymbol {v}}_{i}-{\boldsymbol {v}}_{j}\right)\cdot \nabla W_{ij}.}$

This operator gives an SPH approximation of ${\displaystyle \nabla \cdot \mathbf {v} }$ at the particle ${\displaystyle i}$ for a given set of particles with given masses ${\displaystyle m_{j}}$, positions ${\displaystyle \left\{\mathbf {r} _{j}\right\}}$ and velocities ${\displaystyle \left\{\mathbf {v} _{j}\right\}}$.

Similarly, one can define a discrete gradient operator to approximate the pressure gradient at the position of particle ${\displaystyle i}$:

${\displaystyle \operatorname {\mathbf {G} } _{i}\left\{p_{j}\right\}={\frac {1}{\rho _{i}}}\sum _{j}m_{j}\left({\frac {p_{i}}{\rho _{i}^{2}}}+{\frac {p_{j}}{\rho _{j}^{2}}}\right)\nabla W_{ij},}$

where ${\displaystyle \left\{p_{j}\right\}}$ denote the set of particle pressures. There are several ways to define discrete operators in SPH; the above divergence and gradient formulae have the property to be skew-adjoint, leading to nice conservation properties.[42] On the other hand, while the divergence operator ${\displaystyle \operatorname {D} }$ is zero-order consistent, it can be seen that the approximate gradient ${\displaystyle \operatorname {\mathbf {G} } }$ is not so. Several techniques have been proposed to circumvent this issue, leading to renormalised operators (see e.g.[43]).

### Governing equations

The SPH operators can be used to discretize numbers of partial differential equations. For a compressible inviscid fluid, the Euler equations of mass conservation and momentum balance read:

${\displaystyle {\frac {d\rho }{dt}}=-\rho \nabla \cdot {\boldsymbol {v}}}$
${\displaystyle {\frac {d{\boldsymbol {v}}}{dt}}=-{\frac {1}{\rho }}\nabla p+{\boldsymbol {g}}}$

All kinds of SPH divergence and gradient operators can practically be used for discretization purposes. Nevertheless, some perform better regarding physical and numerical effects. A frequently used form of the balance equations is based on the symmetric divergence operator and antisymmetric gradient:

${\displaystyle {\frac {d\rho _{i}}{dt}}=-\rho \operatorname {D} _{i}\left\{{\boldsymbol {v}}_{j}\right\}}$
${\displaystyle {\frac {d{\boldsymbol {v}}_{i}}{dt}}=-{\frac {1}{\rho }}\operatorname {\mathbf {G} } _{i}\left\{p_{j}\right\}+{\boldsymbol {g}}}$

Although there are several ways of discretizing the pressure gradient in the Euler equations, the above antisymmetric form is the most acknowledged one. It supports strict conservation of linear and angular momentum. This means that a force that is exerted on particle ${\displaystyle i}$ by particle ${\displaystyle j}$ equals the one that is exerted on particle ${\displaystyle j}$ by particle ${\displaystyle i}$ including the sign change of the effective direction, thanks to the antisymmetry property ${\displaystyle \nabla W_{ij}=-\nabla W_{ji}}$.

### Variational principle

The above SPH governing equations can be derived from a Least action principle, starting from the Lagrangian of a particle system:

${\displaystyle {\mathcal {L}}=\sum _{j}m_{j}\left({\tfrac {1}{2}}{\boldsymbol {v}}_{j}^{2}-e_{j}+{\boldsymbol {g}}\cdot {\boldsymbol {r}}_{j}\right)}$,

where ${\displaystyle e_{j}}$ is the particle specific internal energy. The Euler-Lagrange equation of variational mechanics reads, for each particle:

${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} t}}{\frac {\partial {\mathcal {L}}}{\partial {\boldsymbol {v}}_{i}}}={\frac {\partial {\mathcal {L}}}{\partial {\boldsymbol {r}}_{i}}}.}$

When applied to the above Lagrangian, it gives the following momentum equation:

${\displaystyle {\frac {\mathrm {d} {\boldsymbol {v}}_{i}}{\mathrm {d} t}}=-\sum _{j}m_{j}{\frac {p_{j}}{\rho _{j}^{2}}}{\frac {\partial \rho _{j}}{\partial \rho _{i}}}+{\boldsymbol {g}}}$,

where we used the thermodynamical property ${\displaystyle \mathrm {d} e=\left(p/\rho ^{2}\right)\mathrm {d} \rho }$. Pluging the SPH density interpolation and differentiating explicitly ${\displaystyle {\tfrac {\partial \rho _{j}}{\partial \rho _{i}}}}$ leads to

${\displaystyle {\frac {\mathrm {d} {\boldsymbol {v}}_{i}}{\mathrm {d} t}}=-\sum _{j}m_{j}\left({\frac {p_{i}}{\rho _{i}^{2}}}+{\frac {p_{j}}{\rho _{j}^{2}}}\right)\nabla W_{ij},}$

which is the SPH momentum equation already mentioned, where we recognize the ${\displaystyle \operatorname {\mathbf {G} } }$ operator. This explains why linear momentum is conserved, and allows conservation of angular momentum and energy to be conserved as well.[44]

### Time integration

From the work done in the 80's and 90's on numerical integration of point-like particles in large accelators, appropriate time integrators have been developed with accurate conservation properties on the long term; they are called symplectic integrators. The most popular in the SPH literature is the leapfrog scheme, which reads for each particle ${\displaystyle i}$:

{\displaystyle {\begin{aligned}{\boldsymbol {v}}_{i}^{n+1/2}&={\boldsymbol {v}}_{i}^{n}+{\boldsymbol {a}}_{i}^{n}{\frac {\Delta t}{2}},\\{\boldsymbol {r}}_{i}^{n+1}&={\boldsymbol {r}}_{i}^{n}+{\boldsymbol {v}}_{i}^{i+1/2}\Delta t,\\{\boldsymbol {v}}_{i}^{n+1}&={\boldsymbol {v}}_{i}^{n+1/2}+{\boldsymbol {a}}_{i}^{i+1}{\frac {\Delta t}{2}},\end{aligned}}}

where ${\displaystyle \Delta t}$ is the time step, superscripts stand for time iterations while ${\displaystyle {\boldsymbol {a}}_{i}}$ is the particle acceleration, given by the right-hand side of the momentum equation.

Other symplectic integrators exist (see the reference textbook [45]). It is recommended to use a symplectic (even low-order) scheme instead of a high order non-symplectic scheme, to avoid error accumulation after many iterations.

Integration of density has not been studied extensively (see below for more details).

Symplectic schemes are conservative but explicit, thus their numerical stability requires stability conditions, analogous to the Courant-Friedrichs-Lewy condition (see below).

### Boundary techniques

SPH Convolution support split close to a boundary

In case the SPH convolution shall be practised close to a boundary, i.e. closer than s · h, then the integral support is truncated. Indeed, when the convolution is affected by a boundary, the convolution shall be split in 2 integrals,

${\displaystyle A({\boldsymbol {r}})=\int _{\Omega ({\boldsymbol {r}})}A\left({\boldsymbol {r^{\prime }}}\right)W(|{\boldsymbol {r}}-{\boldsymbol {r^{\prime }}}|,h)d{\boldsymbol {r^{\prime }}}+\int _{B({\boldsymbol {r}})-\Omega ({\boldsymbol {r}})}A\left({\boldsymbol {r^{\prime }}}\right)W(|{\boldsymbol {r}}-{\boldsymbol {r^{\prime }}}|,h)d{\boldsymbol {r^{\prime }}},}$

where B(r) is the compact support ball centered at r, with radius s · h, and Ω(r) denotes the part of the compact support inside the computational domain, Ω ∩ B(r). Hence, imposing boundary conditions in SPH is completely based on approximating the second integral on the right hand side. The same can be of course applied to the differential operators computation,

${\displaystyle \nabla A({\boldsymbol {r}})=\int _{\Omega ({\boldsymbol {r}})}A\left({\boldsymbol {r^{\prime }}}\right)\nabla W({\boldsymbol {r}}-{\boldsymbol {r^{\prime }}},h)d{\boldsymbol {r^{\prime }}}+\int _{B({\boldsymbol {r}})-\Omega ({\boldsymbol {r}})}A\left({\boldsymbol {r^{\prime }}}\right)\nabla W({\boldsymbol {r}}-{\boldsymbol {r^{\prime }}},h)d{\boldsymbol {r^{\prime }}}.}$

Several techniques has been introduced in the past to model boundaries in SPH.

#### Integral neglect

SPH free-surface model by means of integral neglect

The most stright-forward boundary model is neglecting the integral,

${\displaystyle \int _{B({\boldsymbol {r}})-\Omega ({\boldsymbol {r}})}A\left({\boldsymbol {r^{\prime }}}\right)\nabla W({\boldsymbol {r}}-{\boldsymbol {r^{\prime }}},h)d{\boldsymbol {r^{\prime }}}\simeq {\boldsymbol {0}},}$

such that just the bulk interactions are taken into account,

${\displaystyle \nabla A_{i}=\sum _{j\in \Omega _{i}}V_{j}A_{j}\nabla W_{ij}.}$

This is a popular approach when free-surface is considered in monophase simulations.[46]

The main benefit of this boundary condition is its obvious simplicity. However, several consistency issues shall be considered when this boundary technique is applied.[46] That's in fact a heavy limitation on its potential applications.

#### Fluid Extension

SPH Fluid Extension Boundary technique

Probably the most popular methodology, or at least the most traditional one, to impose boundary conditions in SPH, is Fluid Extension technique. Such technique is based on populating the compact support across the boundary with so-called ghost particles, conveniently imposing their field values.[47]

Along this line, the integral neglect methodology can be considered as a particular case of fluid extensions, where the field, A, vanish outside the computational domain.

The main benefit of this methodology is the simplicity, provided that the boundary contribution is computed as part of the bulk interactions. Also, this methodology has been deeply analysed in the literature.[48][47][49]

On the other hand, deploying ghost particles in the truncated domain is not a trivial task, such that modelling complex boundary shapes becomes cumbersome. The 2 most popular approaches to populate the empty domain with ghost particles are Mirrored-Particles [50] and Fixed-Particles.[47]

#### Boundary Integral

SPH Boundary Integral model

The newest Boundary technique is the Boundary Integral methodology.[51] In this methodology, the empty volume integral is replaced by a surface integral, and a renormalization:

${\displaystyle \nabla A_{i}={\frac {1}{\gamma _{i}}}\left(\sum _{j\in \Omega _{i}}V_{j}A_{j}\nabla W_{ij}+\sum _{j\in \partial \Omega _{i}}S_{j}A_{j}{\boldsymbol {n}}_{j}W_{ij}\right),}$
${\displaystyle \gamma _{i}=\sum _{j\in \Omega _{i}}V_{j}W_{ij},}$

with nj the normal of the generic jth boundary element. The surface term can be also solved considering a semi-analytic expression.[51]

## Modelling Physics

### Hydrodynamics

#### Weakly compressible approach

The weakly compressible SPH in fluid dynamics is based on the discretization of the Navier-Stokes equations. More precisely, the equations of compressible mass conservation and incompressible momentum balance. The governing equations are shown above. To close the system of differential equations, an appropriate equation of state is utilized.

Another way to determine the density is based on the SPH identity operator itself. Therefore, the density is defined as a state that can be determined from the present particle distribution utilizing the inherent description of the SPH which is introduced with the interpolation. To overcome undesired errors at the free surface through kernel truncation, the density formulation can again be integrated in time. [51]

Now that the system is described by a weakly compressible scheme, a coupling between pressure ${\displaystyle p}$ and mass density ${\displaystyle \rho }$ is needed to close the system of differential equations. Therefore, the so-called Cole equation [52] (sometimes mistakenly referred to as the "Tait equation") is introduced in SPH. It reads

${\displaystyle p={\frac {\rho _{0}c^{2}}{\gamma }}\left(\left({\frac {\rho }{\rho _{0}}}\right)^{\gamma }-1\right)+p_{0},}$

where ${\displaystyle \rho _{0}}$ is the reference mass density and ${\displaystyle c}$ the artificial speed of sound. For water, ${\displaystyle \gamma =7}$ is considered to give satisfactory values. The background pressure ${\displaystyle p_{0}}$ is added to avoid negative pressure values.

Real nearly incompressible fluids such as water are defined by very high speed of sounds of the order ${\displaystyle 10^{3}m/s}$. Hence, pressure information travels fast compared to the actual bulk flow, which leads to very small Mach numbers ${\displaystyle M}$. The momentum equation leads to the following relation:

${\displaystyle {\frac {\delta \rho }{\rho _{0}}}\approx {\frac {|{\boldsymbol {v}}|}{c^{2}}}=M^{2}}$

where ${\displaystyle \rho }$ is the density change and ${\displaystyle u}$ the velocity vector. The relation shows that the relative change of density is negligible for very high Mach numbers. In theory, these fluids are assumed to be incompressible. If now a density variation of 1% is accepted, a Mach number of 0.1 has to be assumed. This gives a 10 times lower maximum time increment compared to other methods whose CFL condition relates to the maximum bulk velocity instead of the speed of sound. However, other methods often require multiple iterations per time step to assure the divergence free velocity field. Based on the latter discussion the SPH assumes the following values for the speed of sound:

${\displaystyle c=10v_{max}}$

where the maximum velocity vmax needs to be estimated, for e.g. by Torricelli’s law or an educated guess. Since only small density variations occur, a linear equation of state is sometimes sufficient:

${\displaystyle p=c^{2}\left(\rho -\rho _{0}\right)}$

Usually the weakly-compressible schemes are affected by a high-frequency spurious noise on the pressure and density fields. [53] This phenomenon is caused by the nonlinear interaction of acoustic waves and by fact that the scheme is explicit in time and centred in space[citation needed]. Through the years, several techniques have been proposed to get rid of this problem. They can be classified in three different groups: the schemes that adopt density filters, the models that add a diffusive term in the continuity equation, the schemes that employ Riemann Solvers to model the particles' interaction.

These schemes apply a filter directly on the density field to remove the spurious numerical noise. The most used filters are the MLS (Mean Least Squares) and the Shepard filter [53] which can be applied at each time step or every n time steps (cit). The more frequent is the use of the filtering procedure, the more regular density and pressure fields are obtained. On the other hand, this leads to an increase of the computational costs. In long time simulations, the use of the filtering procedure may lead to an inconsistency between the global volume of fluid and the density field. Further, it does not ensure the enforcement of the dynamic free-surface boundary condition.

A different way to smooth out the density and pressure field is to add a diffusive term inside the continuity equation:

${\displaystyle {\displaystyle {\frac {d\rho _{i}}{dt}}=\sum _{j}m_{j}\left({\boldsymbol {v}}_{i}-{\boldsymbol {v}}_{j}\right)\cdot \nabla W_{ij}+{\mathcal {D}}_{i}(\rho ),}}$

The first schemes that adopted such an approach were described in Ferrari et al. (2009) and in Molteni \& Colagrossi (2009?-2010?) where the diffusive term was modelled as a Laplacian of the density field. A similar approach was also used in Fatehi \& Manzari (2010). In Antuono at al.(2010) a correction to the diffusive term of Molteni and Colagrossi (2009) was proposed to remove some inconsistencies close to the free-surface. In this case the adopted diffusive term was equivalent to a high-order differential operator on the density field (Antuono 2012). The scheme was called δ-SPH and preserved all the conservations properties of the classical SPH (link) (e.g., linear and angular momenta, total energy, see Antuono 2015) along with a smooth and regular representation of the density and pressure fields.

#### Viscosity modelling

In general, the description of hydrodynamic flows require a convenient treatment of diffusive processes to model the viscosity in the Navier-Stokes equations. It needs special consideration because it involves the laplacian differential operator. Since the direct computation does not provide satisfactory results, several approaches to model the diffusion have been proposed.

• Artificial viscosity

Introduced by Monaghan and Gingold [54] the artificial viscosity was used to deal with high Mach number fluid flows. It reads

${\displaystyle \Pi _{ij}={\begin{cases}\displaystyle {\frac {-\alpha {\bar {c}}_{ij}\phi _{ij}+\beta \phi _{ij}^{2}}{{\bar {\rho }}_{ij}}}&\quad {\boldsymbol {v}}_{ij}\cdot {\boldsymbol {r}}_{ij}<0\\0&\quad {\boldsymbol {v}}_{ij}\cdot {\boldsymbol {r}}_{ij}\geq 0\end{cases}}}$

Here, ${\displaystyle \alpha }$ is controlling a volume viscosity while ${\displaystyle \beta }$ acts similar to the Neumann Richtmeyr artifical viscosity. The ${\displaystyle \phi _{ij}}$ is defined by

${\displaystyle \phi _{ij}={\frac {h{\boldsymbol {v}}_{ij}\cdot {\boldsymbol {r}}_{ij}}{\Vert {\boldsymbol {r}}_{ij}\Vert ^{2}+\eta _{h}^{2}}}.}$

The artificial viscosity also has shown to improve the overall stability of general flow simulations. Therefore, it is applied to inviscid problems in the following form

${\displaystyle \Pi _{ij}=\alpha hc{\frac {{\boldsymbol {v}}_{ij}\cdot {\boldsymbol {r}}_{ij}}{\Vert {\boldsymbol {r}}_{ij}\Vert ^{2}+\eta _{h}^{2}}}.}$

It is possible to not only stabilize inviscid simulations but also to model the physical viscosity by this approach. To do so

${\displaystyle \alpha hc=2(n+2){\frac {\mu }{\rho }}}$

is substituted in the equation above , where ${\displaystyle n}$ is the number of spartial dimensions of the model. This approach introduces the bulk viscosity ${\displaystyle \zeta ={\frac {5}{3}}\mu }$.

• Morris

For low Reynolds numbers the viscosity model by Morris [55] was proposed.

${\displaystyle [\nu \Delta {\boldsymbol {v}}]_{ij}={\frac {2\nu }{\rho _{j}}}\,{\frac {{\boldsymbol {r}}_{ij}\cdot \nabla w_{h,ij}}{\Vert {\boldsymbol {r}}_{ij}\Vert ^{2}+\eta _{h}^{2}}}\,{\boldsymbol {v}}_{ij}.}$
• LoShao

• Surface Tension
• Heat transfer
• Turbulence

### Astrophysics

Often in astrophysics, one wishes to model self-gravity in addition to pure hydrodynamics. The particle-based nature of SPH makes it ideal to combine with a particle-based gravity solver, for instance tree gravity code,[56] particle mesh, or particle-particle particle-mesh.

## References

1. ^ R.A. Gingold; J.J. Monaghan (1977). "Smoothed particle hydrodynamics: theory and application to non-spherical stars". Mon. Not. R. Astron. Soc. 181: 375–89.
2. ^ L.B. Lucy (1977). "A numerical approach to the testing of the fission hypothesis". Astron. J. 82: 1013–1024.
3. ^ Takahiro Harada; Seiichi Koshizuka; Yoichiro Kawaguchi (2007). Smoothed particle hydrodynamics on GPUs. Computer Graphics International. pp. 63–70.
4. ^ Alejandro Crespo; Jose M. Dominguez; Anxo Barreiro; Moncho Gomez-Gesteira; Benedict D. Rogers (2011). "GPUs, a new tool of acceleration in CFD: efficiency and reliability on smoothed particle hydrodynamics methods". PLOS One.
5. ^ a b Price, D. J. (2011). "Smoothed Particle Hydrodynamics: Things I wish my mother taught me". arXiv: [astro-ph.IM].
6. ^ "The Smoothed Particle Hydrodynamics Method vs. Finite Volume Numerical Methods". Retrieved 2018-08-30.
7. ^ a b Adami, S. and Hu, X. Y. and Adams, N. A.. (2012). "A generalized wall boundary condition for smoothed particle hydrodynamics". Journal of Computational Physics. 231.
8. ^ Shadloo, M. S. and Oger, G. and Touze, D. L.. (2016). "Smoothed particle hydrodynamics method for fluid flows, towards industrial applications: Motivations, current state, and challenges". Computers and Fluids. 136.
9. ^ a b Fraser, K.and Kiss, L. I. and St-George, L. (2016). "A generalized wall boundary condition for smoothed particle hydrodynamics". 14th International LS-DYNA Conference.
10. ^ Solenthaler (2009). "Predictive-Corrective Incompressible SPH".
11. ^ Imhsen (2010). "Boundary handling and adaptive time-stepping for PCISPH". Workshop on Virtual Reality Interaction and Physical Simulation VRIPHYS.
12. ^ Bodin (2011). "Constraint Fluids". IEEE Transactions on Visualization and Computer Graphics.
13. ^ Hoetzlein (2012). "Fluids v.3, A Large scale, Open Source Fluid Simulator. http://fluids3.com". External link in |title= (help)
14. ^ Akinci (2012). "Versatile Rigid-Fluid Coupling for Incompressible SPH http://www.nadir.tk/research". ACM TOG, SIGGRAPH Proceedings. External link in |title= (help)
15. ^ Macklin (2013). "Position Based Fluids http://blog.mmacklin.com/publications". ACM TOG, SIGGRAPH Proceedings. External link in |title= (help)
16. ^ Akinci (2013). "Versatile Surface Tension and Adhesion for SPH Fluids SPH http://www.nadir.tk/research". ACM TOG, SIGGRAPH Proceedings. External link in |title= (help)
17. ^ Journal of Tribology (2013). "Application of Smoothed Particle Hydrodynamics to Full-Film Lubrication".
18. ^ Mahdavi and Talebbeydokhti (2015). "A hybrid solid boundary treatment algorithm for smoothed particle hydrodynamics https://www.researchgate.net/publication/282870566_A_hybrid_solid_boundary_treatment_algorithm_for_smoothed_particle_hydrodynamics". Scientia Iranica, Transaction A, Civil Engineering. 22 (4): 1457–1469. External link in |title= (help)
19. ^ International Journal for Numerical Methods in Fluids (2016). "Curvilinear smoothed particle hydrodynamics".
20. ^ Price, Daniel J (2009). "Astrophysical Smooth Particle Hydrodynamics". New Astron.rev. 53 (4–6): 78–104. arXiv:. doi:10.1016/j.newar.2009.08.007.
21. ^ Rosswog, Stephan (2015). "SPH Methods in the Modelling of Compact Objects". Living Rev Comput Astrophys. 1 (1): 1. arXiv:. Bibcode:2015LRCA....1....1R. doi:10.1007/lrca-2015-1.
22. ^ Price, Daniel J; Rockefeller, Gabriel; Warren, Michael S (2006). "SNSPH: A Parallel 3-D Smoothed Particle Radiation Hydrodynamics Code". Astrophys. J. 643: 292–305. arXiv:. doi:10.1086/501493.
23. ^ http://www.astro.ex.ac.uk/people/mbate/Cluster/clusterRT.html
24. ^ http://users.monash.edu.au/~dprice/pubs/spmhd/price-spmhd.pdf
25. ^ Libersky, L.D.; Petschek, A.G. (1990). Smooth Particle Hydrodynamics with Strength of Materials, Advances in the Free Lagrange Method. Lecture Notes in Physics. 395. pp. 248–257. doi:10.1007/3-540-54960-9_58. ISBN 978-3-540-54960-4.
26. ^ L.D. Libersky; A.G. Petschek; A.G. Carney; T.C. Hipp; J.R. Allahdadi; F.A. High (1993). "Strain Lagrangian hydrodynamics: a three-dimensional SPH code for dynamic material response". J. Comput. Phys. 109 (1): 67–75. Bibcode:1993JCoPh.109...67L. doi:10.1006/jcph.1993.1199.
27. ^ J.W. Swegle; D.A. Hicks; S.W. Attaway (1995). "Smooth particle hydrodynamics stability analysis". J. Comput. Phys. 116 (1): 123–134. Bibcode:1995JCoPh.116..123S. doi:10.1006/jcph.1995.1010.
28. ^ T. Belytschko; Y. Krongauz; J. Dolbow; C. Gerlach (1998). "On the completeness of meshfree particle methods". Int. J. Numer. Methods Eng. 43 (5): 785–819. Bibcode:1998IJNME..43..785B. CiteSeerX . doi:10.1002/(sici)1097-0207(19981115)43:5<785::aid-nme420>3.0.co;2-9.
29. ^ W.K. Liu; S. Jun; Y.F. Zhang (1995). "Reproducing kernel particle methods". Int. J. Numer. Methods Eng. 20 (8–9): 1081–1106. Bibcode:1995IJNMF..20.1081L. doi:10.1002/fld.1650200824.
30. ^ P.W. Randles; L.D. Libersky (1997). "Recent improvements in SPH modelling of hypervelocity impact". Int. J. Impact Eng. 20 (6–10): 525–532. doi:10.1016/s0734-743x(97)87441-6.
31. ^ G.R. Johnson; S.R. Beissel (1996). "Normalized smoothing functions for SPH impact computations". Int. J. Numer. Methods Eng. 39 (16): 2725–2741. Bibcode:1996IJNME..39.2725J. doi:10.1002/(sici)1097-0207(19960830)39:16<2725::aid-nme973>3.0.co;2-9.
32. ^ C.T. Dyka; R.P. Ingel (1995). "An approach for tension instability in Smoothed Particle Hydrodynamics". Comput. Struct. 57 (4): 573–580. doi:10.1016/0045-7949(95)00059-p.
33. ^ C.T. Dyka; P.W. Randles; R.P. Ingel (1997). "Stress points for tension instability in SPH". Int. J. Numer. Methods Eng. 40 (13): 2325–2341. Bibcode:1997IJNME..40.2325D. doi:10.1002/(sici)1097-0207(19970715)40:13<2325::aid-nme161>3.0.co;2-8.
34. ^ P.W. Randles; L.D. Libersky (2000). "Normalized SPH with stress points". Int. J. Numer. Methods Eng. 48 (10): 1445–1462. Bibcode:2000IJNME..48.1445R. doi:10.1002/1097-0207(20000810)48:10<1445::aid-nme831>3.0.co;2-9.
35. ^ T. Belytschko; Y. Guo; W.K. Liu; S.P. Xiao (2000). "A unified stability analysis of meshless particle methods". Int. J. Numer. Methods Eng. 48 (9): 1359–1400. Bibcode:2000IJNME..48.1359B. doi:10.1002/1097-0207(20000730)48:9<1359::aid-nme829>3.0.co;2-u.
36. ^ J. Bonet; S. Kulasegaram (2000). "Correction and stabilization of smooth particle hydrodynamics methods with applications in metal forming simulations". Int. J. Numer. Methods Eng. 47 (6): 1189–1214. Bibcode:2000IJNME..47.1189B. doi:10.1002/(sici)1097-0207(20000228)47:6<1189::aid-nme830>3.0.co;2-i.
37. ^ W. G. Hoover; C. G. Hoover (2001). "SPAM-based recipes for continuum simulations". Computing in Science and Engineering. 3 (2): 78–85.
38. ^ T. Rabczuk; J. Eibl; L. Stempniewski (2003). "Simulation of high velocity concrete fragmentation using SPH/MLSPH". Int. J. Numer. Methods Eng. 56 (10): 1421–1444. Bibcode:2003IJNME..56.1421R. doi:10.1002/nme.617.
39. ^ M.I. Herreros; M. Mabssout (2011). "A two-steps time discretization scheme using the SPH method for shock wave propagation". Comput. Methods Appl. Mech. Engrg. 200 (21–22): 1833–1845. Bibcode:2011CMAME.200.1833H. doi:10.1016/j.cma.2011.02.006.
40. ^ N.J. Quinlan; M. Basa; M. Lastiwka (2006). "Truncation error in mesh-free particle methods". International Journal for Numerical Methods in Engineering. 66 (66): 2064–2085. doi:10.1002/nme.1617. hdl:10379/1170.
41. ^ H. Wendland (1995). "Piecewise polynomial, positive definite and compactly supported radial functions of minimal degree". Advances in Computational Mathematics. 4 (4): 389–396. doi:10.1007/BF02123482.
42. ^ A. Mayrhofer; B.D. Rogers; D. Violeau; M. Ferrand (2013). "Investigation of wall bounded flows using SPH and the unified semi-analytical wall boundary conditions". Computer Physics Communications (184).
43. ^ J. Bonet; T.S. Lok (1999). "Variational and momentum preservation aspects of Smoothed Particle Hydrodynamics formulations". Computers Methods in Applied Mechanical Engineering (180).
44. ^ J.J. Monaghan (2005). "Smoothed particle hydrodynamics". Reports on Progress in Physics. 68 (68): 1703–1759. doi:10.1088/0034-4885/68/8/R01.
45. ^ E. Hairer; C. Lubich; G. Wanner (2006). Geometric Numerical Integration. Springer. ISBN 978-3-540-30666-5.
46. ^ a b Andrea Colagrossi; Matteo Antuono; David Le Touzè (2009). "Theoretical considerations on the free-surface role in the smoothed-particle-hydrodynamics model". Physical Review E. 79.
47. ^ a b c Bejamin Bouscasse; Andrea Colagrossi; Salvatore Marrone; Matteo Antuono (2013). "Nonlinear water wave interaction with floating bodies in SPH". Journal of Fluids and Structures. 42: 112–129.
48. ^ Fabricio Macià; Matteo Antuono; Leo M González; Andrea Colagrossi (2011). "Theoretical analysis of the no-slip boundary condition enforcement in SPH methods". Progress of Theoretical Physics. 125: 1091–1121.
49. ^ Jose Luis Cercos-Pita; Matteo Antuono; Andrea Colagrossi; Antonio Souto (2017). "SPH energy conservation for fluid--solid interactions". Computer Methods in Applied Mechanics and Engineering. 317: 771–791.
50. ^ J. Campbell; R. Vignjevic; L. Libersky (2000). "A contact algorithm for smoothed particle hydrodynamics". Computer Methods in Applied Mechanics and Engineering. 184: 49–65.
51. ^ a b c M. Ferrand, D.R. Laurence, B.D. Rogers, D. Violeau, C. Kassiotis (2013). "Unified semi-analytical wall boundary conditions for inviscid, laminar or turbulent flows in the meshless SPH method". 71. Int. J. Numer. Meth. Fluids.
52. ^ H. R. Cole (1948). Underwater Explosions. Princeton, New Jersey: Princeton University Press.
53. ^ a b Colagrossi, Andrea; Landrini, Maurizio (2003). "Numerical simulation of interfacial flows by smoothed particle hydrodynamics". Journal of Computational Physics. 191 (2): 448–475. Bibcode:2003JCoPh.191..448C. doi:10.1016/S0021-9991(03)00324-3.
54. ^ J.J. Monaghan; R.A. Gingold (1983). "Shock Simulation by the Particle Method". 52. Journal of Computational Physics: 347–389.
55. ^ J.P. Morris; P.J. Fox; Y. Zhu (1997). "Modeling Low Reynolds Number Incompressible Flows Using SPH". 136. Journal of Computational Physics: 214–226.
56. ^ Marios D. Dikaiakos; Joachim Stadel, PKDGRAV The Parallel k-D Tree Gravity Code, retrieved February 1, 2017