A 3D Smoothed Particle Hydrodynamics (SPH) water simulation engine.
This is the three dimensional counterpart of the 2D FluidEngine. The simulation pipeline is identical to the 2D version:
- apply the external forces(gravity + shake disturbance) and predict positions
- rebuild the spatial hash(Grid3D) for the neighbour search
- calculate the density and near density of each particle
- calculate the pressure force
- calculate the viscosity force
- integrate the positions and resolve the box boundary collisions
The fluid is contained inside an axis aligned box volume [0,BoxSize.x] x [0,BoxSize.y] x [0,BoxSize.z] and gravity pulls the water toward the +Y face(the bottom of the container).