3D SPH Fluid Explosion

A block of particle fluid collapses, splashes and sloshes under gravity. Colour by velocity, pressure, density or shock fronts.

Loading SPH fluid (WebGL 2.0)

Illustrative browser model using Smoothed Particle Hydrodynamics. One physics mode, no meta-calculus transform: it is a visual demo, not validated CFD.

SPH Method

Lagrangian fluid simulation using kernel interpolation

Rest Density

Computed from the kernel on the initial lattice, so a resting block starts at zero pressure

Measured, Not Promised

The metrics panel shows this tab's own FPS and physics time; large particle counts run slower than real time

Smoothed Particle Hydrodynamics

SPH represents fluid as particles that carry physical quantities (density, velocity, pressure). Fluid properties are interpolated using kernel functions (Poly6 for density, Spiky gradient for pressure forces, a Laplacian kernel for viscosity). Pressure follows p = k(rho - rho0), cut to zero below rest density so free surfaces do not clump. Gravity is a constant acceleration of 9.81 in code units. Viscosity and the inelastic floor and walls remove energy on purpose, so no energy-conservation figure is shown. The Shock colour mode is a display diagnostic (largest neighbour density ratio); it does not change the dynamics.

Try Different Scenarios

  • Dam Break: A column of fluid collapses under gravity (a standard SPH test case; not compared to experimental data here)
  • Explosion: A sphere of fluid given an outward velocity field
  • Water Drop: A falling sphere hits a shallow pool
  • Fountain: A column of particles launched upward once (not a continuous source)