
Smoothed particle hydrodynamics is a computational method for simulating fluid flows by representing them as particles.Smoothed particle hydrodynamics (SPH) is a computational technique for simulating fluids — liquids, gases, and even solids under extreme stress — by treating the fluid as a collection of discrete particles rather than a continuous grid. In traditional fluid dynamics, you divide space into a fixed mesh of cells and track how fluid properties (density, pressure, velocity) change in each cell. SPH instead represents the fluid as a swarm of moving particles, each carrying mass, momentum, and energy. The particles interact with each other through smooth mathematical functions, so the fluid's behavior emerges from the collective motion of these particles.
SPH was invented in 1977 by astrophysicists Leon Lucy and Robert Gingold (working independently) to simulate the collision of stars and the formation of galaxies, and it has since spread to many other fields.
Each SPH particle represents a small parcel of fluid with a given mass, position, velocity, and internal energy. The density at any point is computed by summing contributions from nearby particles using a smoothing kernel — a function that is largest at the particle's location and falls off smoothly to zero at a finite radius. From density, you can compute pressure via an equation of state, and then the pressure gradient and viscous forces are calculated by summing pairwise interactions between neighboring particles. The particles are then moved according to Newton's laws, and the process repeats. Because the method is Lagrangian (following the fluid), it conserves mass exactly and handles advection perfectly.
SPH is used in astrophysics to model star formation and galaxy evolution, in engineering to simulate fluid-structure interactions like ship hulls hitting waves, and in computer graphics for realistic fluid effects in movies and video games.
SPH is so versatile that it has been used to simulate the formation of the Moon from a giant impact, showing how a disk of debris could coalesce into our natural satellite.





















