- Introduced by
- Monaghan John & Lucy Leon
- Year
- 1977
- Type
- Meshfree particle method
- Family
- Fluid Dynamics
What does it do?
Smoothed Particle Hydrodynamics (SPH) is a meshfree particle method for simulating fluid dynamics.
Lucy (1977) introduced a finite-size particle scheme for gas-dynamic problems of astronomical interest, and Gingold and Monaghan (1977) developed the method for non-spherical stars. Instead of a fixed grid, SPH represents the fluid as particles that carry mass and other properties, and field quantities are estimated as kernel-weighted sums over neighbouring particles within a support radius. This particle description makes free surfaces and large deformations comparatively direct to treat, although accuracy and cost depend strongly on the choice of kernel and smoothing length.
The intuition behind the method
Instead of computing flow on a fixed grid, imagine the fluid as a set of material points, each carrying its own properties such as density, velocity and pressure. To estimate the field at any location, look at nearby particles, weight their values by distance using a kernel, and sum. This weighted sum over neighbours is the core of SPH. Because particles move with the material, a free surface is simply the outer edge of the particle set and needs no separate tracking. Splashing and fragmentation follow from the particle motion itself. The cost is that every particle position and velocity must be updated at each time step, and finding neighbours at every step is a significant share of the work, which is why spatial search structures are used.
History
Lucy (1977) introduced the particle scheme for two- and three-dimensional gas-dynamic problems of astronomical interest and applied it to the fission hypothesis for protostars. In the same year, Gingold and Monaghan presented the method for non-spherical stars, using statistical techniques to recover field values from a distribution of particles. Monaghan's 2005 review traces the development of SPH since 1977 and discusses its strengths and weaknesses. Its use has since extended from astrophysics into fluid dynamics and impact problems.
When to use it
Choose SPH when the problem involves free surfaces, large deformations, fragmentation, impacts or interfaces that move substantially, because particles follow the material without remeshing. It is also suited to systems that are naturally described as discrete bodies or fragments. Avoid SPH for smooth, steady or weakly deforming flows, where grid-based methods will usually give more accurate solutions at comparable cost, and for problems that require high accuracy in smooth regions. Thin boundary layers near walls are also a weak point. Monaghan's review (2005) discusses the strengths and weaknesses of the method and is a useful check on this choice.
Limitations and considerations
- Accuracy in smooth flow regions is generally lower than that of finite-difference or finite-element methods at comparable resolution
- Boundary conditions need special treatment, since wall effects are not captured by the kernel sums without dedicated boundary particles or ghost particles
- Kernel choice and smoothing length h strongly affect the results, and no universal rule is given for choosing them; they are normally set by convergence testing
- Finding neighbours at every step makes the cost grow with particle count, so large simulations can be expensive
- In regions of negative pressure (tension), tensile instability can cluster particles and create unphysical gaps
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Free surfaces are the outer edge of the particle set, so no separate interface tracking is needed
- Particles follow the material, so large deformation, splashing and fragmentation do not require remeshing
- Particles can be added or removed without rebuilding a mesh
- Each particle's force depends only on its neighbours, which keeps the computation local and easy to divide among processors
- Multiphase flow and fluid-structure coupling can be built by assigning different properties to groups of particles
Applications
- Astrophysics: the original field of application, including stellar gas dynamics and the fission of rotating protostars
- Impact and hydrocode problems involving explosions, impacts and large material deformation
- Free-surface flows such as wave propagation, tsunamis and coastal flooding
- Computer animation of splashing water and deformable objects
- Biomedical flows and cell deformation, such as blood flow
How it works
How it works
Set up particle positions, velocities and masses from the domain geometry and initial conditions, and specify the fluid properties and any external forces such as gravity.
Choose the smoothing length h, which sets the kernel support radius and hence each particle's neighbourhood, and build neighbour lists with a search structure such as spatial hashing or a tree. The kernel interpolant f(r) = sum_j m_j (f_j / rho_j) W(r - r_j, h) estimates any field from neighbouring particle values; setting f equal to density gives the initial particle densities.
Formula
f(\mathbf{r}) = \sum_j m_j \frac{f_j}{\rho_j} W(\mathbf{r} - \mathbf{r}_j, h)Advance particle positions and velocities in time with a time-integration scheme. At each step, recompute each particle's density from its neighbours and obtain pressure from density through an equation of state. The equation of state is chosen for the fluid being modelled. The time step must be small enough for the integration to remain stable; in practice it is restricted by the local sound speed and the smoothing length.
Evaluate the acceleration terms, including pressure, viscous and any surface-tension forces, as kernel-weighted sums over neighbours using kernel gradients, then update particle velocities and positions. The kernel is a smooth weighting function that falls to zero beyond its support radius, so only neighbouring particles contribute. Monaghan (2005) reviews the theory behind these forms. Artificial viscosity is added where shocks must be handled.
Recover macroscopic quantities by kernel-weighted averaging over particles, and inspect the particle distribution along with conservation diagnostics such as total energy and momentum.
Common pitfalls
- Choosing h by intuition rather than by convergence tests: a large h smears flow features, while a small h leaves too few neighbours to sample the field
- Using standard kernels near walls without boundary particle layers, which leads to unphysical density variations
- Adding too little artificial viscosity leaves pressure oscillations at shocks, while adding too much dissipates real flow features
- Updating neighbour lists too infrequently, so that stale lists miss interactions and create unphysical gaps
- Expecting fine-scale turbulent structures to be resolved without very high particle resolution or a turbulence model
Frequently asked questions
What is the smoothing length h and how do I choose it?
The smoothing length h sets the radius of the kernel support, which is the neighbourhood within which particles interact. A smaller h resolves sharper features but leaves fewer neighbours per particle, which can make the field estimate noisy. A larger h smooths features and stabilises the calculation at the cost of accuracy. h is usually chosen relative to the particle spacing, but the appropriate ratio depends on the kernel and the problem. Run the same problem with progressively finer particle spacing and smoothing length, and check where the quantities of interest stop changing.
What is artificial viscosity and why do I need it?
Across shocks, which are sharp changes in density and velocity, SPH can produce pressure oscillations. Artificial viscosity adds dissipation that damps these oscillations. With too little, the oscillations remain; with too much, real flow features are blurred. Its parameters depend on the problem, so calibrate them against a test problem with a known solution. Several modified formulations have been proposed to control particle noise; their effect on dissipation should be checked on the same test problem.
How do I handle boundary conditions in SPH?
Boundaries are typically represented by fixed or moving boundary particles that exert repulsive forces on fluid particles. Alternatively, ghost particles mirror fluid particles across a boundary to enforce no-slip or symmetry conditions. Where wall properties matter, they are assigned to the boundary particles. This treatment needs care to avoid unphysical density accumulation at walls.
What is tensile instability and how do I avoid it?
Tensile instability arises where the local pressure is negative (tension). In such regions particles may cluster and leave voids. It can occur in free-surface and multiphase flows where tension develops. Options to test include corrected kernels such as CSPM and particle shifting algorithms. Neither is a guaranteed fix, so check the effect on the problem at hand.
How do SPH results compare to grid-based methods like RANS or LES?
SPH is generally better suited to problems dominated by free surfaces, splashing and fragmentation. Grid-based approaches such as RANS or LES are generally better suited to bulk flows where the smooth field structure or turbulence statistics matter; RANS models turbulence statistically, while LES resolves the large eddies. Which is preferable depends on whether free-surface dynamics or accurate smooth bulk flow dominates the problem. Hybrid particle–grid couplings also exist and are a separate subject.
Related methods
Sources
Lucy, L. B. (1977). A numerical approach to the testing of the fission hypothesis. The Astronomical Journal, 82(12), 1013-1024.
Open DOI referenceGingold, R. A., & Monaghan, J. J. (1977). Smoothed particle hydrodynamics: theory and applications to non-spherical stars. Monthly Notices of the Royal Astronomical Society, 181(3), 375-389.
Open DOI referenceMonaghan, J. J. (2005). Smoothed particle hydrodynamics. Reports on Progress in Physics, 68(8), 1703-1759.
Open DOI reference