Smoothed-particle hydrodynamics


Smoothed-particle hydrodynamics 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 and Lucy 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, and the resolution of the method can easily be adjusted with respect to variables such as density.

Method

Advantages

Fluid dynamics

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 and empty space represents the lighter fluid. 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.
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, 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:
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.
Simulations of galaxy formation, star formation, stellar collisions, supernovae 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.

Solid mechanics

Libersky and Petschek
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
and lack of consistency.
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.
Randles and Libersky
and Johnson and Beissel
tried to solve the consistency problem in their study of impact phenomena.
Dyka et al.
and Randles and Libersky
introduced the stress-point integration into SPH and Ted Belytschko et al.
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:

Interpolations

The smoothed-particle hydrodynamics method works by dividing the fluid into a set of discrete moving elements, referred to as particles. Their Lagrangian nature allows setting their position by integration of their velocity as:
These particles interact through a kernel function with characteristic radius known as the "smoothing length", typically represented in equations by. 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. This can be understood in two steps. First an arbitrary field is written as a convolution with :
The error in making the above approximation is order. Secondly, the integral is approximated using a Riemann summation over the particles:
where the summation over includes all particles in the simulation. is the volume of particle, is the value of the quantity for particle and denotes position. For example, the density of particle can be expressed as:
where denotes the particle mass and the particle density, while is a short notation for. The error done in approximating the integral by a discrete sum depends on, on the particle size, and on the particle arrangement in space. The latter effect is still poorly known.
Kernel functions commonly used include the Gaussian function, the quintic spline and the Wendland kernel. The latter two kernels are compactly supported, with support proportional to. 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 with respect to time yields
where is the gradient of with respect to. Comparing the above equation with the continuity equation in continuum mechanics shows that the right-hand side is an approximation of ; hence one defines a discrete divergence operator as follows:
This operator gives an SPH approximation of at the particle for a given set of particles with given masses, positions and velocities.
Similarly, one can define a discrete gradient operator to approximate the pressure gradient at the position of particle :
where 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. On the other hand, while the divergence operator is zero-order consistent, it can be seen that the approximate gradient is not so. Several techniques have been proposed to circumvent this issue, leading to renormalised operators.

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:
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:
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 by particle equals the one that is exerted on particle by particle including the sign change of the effective direction, thanks to the antisymmetry property.

Variational principle

The above SPH governing equations can be derived from a Least action principle, starting from the Lagrangian of a particle system:
where is the particle specific internal energy. The Euler–Lagrange equation of variational mechanics reads, for each particle:
When applied to the above Lagrangian, it gives the following momentum equation:
where we used the thermodynamical property. Pluging the SPH density [|interpolation] and differentiating explicitly leads to
which is the SPH momentum equation already mentioned, where we recognize the operator. This explains why linear momentum is conserved, and allows conservation of angular momentum and energy to be conserved as well.

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 :
where is the time step, superscripts stand for time iterations while is the particle acceleration, given by the right-hand side of the momentum equation.
Other symplectic integrators exist. It is recommended to use a symplectic scheme instead of a high order non-symplectic scheme, to avoid error accumulation after many iterations.
Integration of density has not been studied extensively.
Symplectic schemes are conservative but explicit, thus their numerical stability requires stability conditions, analogous to the Courant-Friedrichs-Lewy condition.

Boundary techniques

In case the SPH convolution shall be practised close to a boundary, i.e. closer than, then the integral support is truncated. Indeed, when the convolution is affected by a boundary, the convolution shall be split in 2 integrals,
where is the compact support ball centered at, with radius, and denotes the part of the compact support inside the computational domain,. 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,
Several techniques has been introduced in the past to model boundaries in SPH.

Integral neglect

The most straightforward boundary model is neglecting the integral,
such that just the bulk interactions are taken into account,
This is a popular approach when free-surface is considered in monophase simulations.
The main benefit of this boundary condition is its obvious simplicity. However, several consistency issues shall be considered when this boundary technique is applied. That's in fact a heavy limitation on its potential applications.

Fluid Extension

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.
Along this line, the [|integral neglect methodology] can be considered as a particular case of fluid extensions, where the field,, 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.
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 and Fixed-Particles.

Boundary Integral

The newest Boundary technique is the Boundary Integral methodology. In this methodology, the empty volume integral is replaced by a surface integral, and a renormalization:
with the normal of the generic jth boundary element. The surface term can be also solved considering a semi-analytic expression.

Modelling Physics

Hydrodynamics

Weakly compressible approach

Another way to determine the density is based on the SPH smoothing operator itself. Therefore, the density is estimated from the particle distribution utilizing the SPH interpolation. To overcome undesired errors at the free surface through kernel truncation, the density formulation can again be integrated in time.
The weakly compressible SPH in fluid dynamics is based on the discretization of the Navier–Stokes equations or Euler equations for compressible fluids. To close the system, an appropriate equation of state is utilized to link pressure and density. Generally, the so-called Cole equation
is used in SPH. It reads
where is the reference density and the speed of sound. For water, is commonly used.
The background pressure is added to avoid negative pressure values.
Real nearly incompressible fluids such as water are characterised by very high speed of sounds of the order. Hence, pressure information travels fast compared to the actual bulk flow, which leads to very small Mach numbers. The momentum equation leads to the following relation:
where is the density change and the velocity vector.
In practice a value of c smaller than the real one is adopted to avoid time steps too small in the time integration scheme.
Generally a numerical speed of sound is adopted such that density variation smaller than 1% are allowed. This is the so-called weak-compressibility assumption.
This corresponds to a Mach number smaller than 0.1, which implies:
where the maximum velocity 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 can be adopted:
Usually the weakly-compressible schemes are affected by a high-frequency spurious noise on the pressure and density fields.
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
Through the years, several techniques have been proposed to get rid of this problem.
They can be classified in three different groups:
  1. the schemes that adopt density filters,
  2. the models that add a diffusive term in the continuity equation,
  3. the schemes that employ Riemann Solvers to model the particle interaction.
The schemes of the first group apply a filter directly on the density field to remove the spurious numerical noise.
The most used filters are the MLS and the Shepard filter
which can be applied at each time step or every n time steps.
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 the disruption of the hydrostatic pressure component and
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 :
The first schemes that adopted such an approach were described in Ferrari
and in Molteni
where the diffusive term was modelled as a Laplacian of the density field. A similar approach was also used in
In
a correction to the diffusive term of Molteni was proposed to remove some inconsistencies close to the free-surface.
In this case the adopted diffusive term is equivalent to a high-order differential operator on the density field
The scheme is called δ-SPH and preserves all the conservations properties of the SPH without diffusion along with a smooth and regular representation of the density and pressure fields.
In the third group there are those SPH schemes which employ numerical fluxes obtained through Riemann solvers to model the particle interactions

Incompressible approach

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.
Introduced by Monaghan and Gingold
the artificial viscosity was used to deal with high Mach number fluid flows. It reads
Here, is controlling a volume viscosity while acts similar to the Neumann Richtmeyr artificial viscosity. The is defined by
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
It is possible to not only stabilize inviscid simulations but also to model the physical viscosity by this approach. To do so
is substituted in the equation above, where is the number of spartial dimensions of the model. This approach introduces the bulk viscosity.
For low Reynolds numbers the viscosity model by Morris
was proposed.

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, particle mesh, or particle-particle particle-mesh.

Solid mechanics

Others

The discrete element method, used for simulating granular materials, is related to SPH.

Variants of the method

Software