Expand description
SPH fluid simulation, height-field water, buoyancy, and fluid rendering integration.
§Components
SphParticle— position, velocity, density, pressure, mass, neighborsSphSimulation— Weakly Compressible SPH (WCSPH) with cubic spline kernel, pressure force, viscosity, surface tension, solid repulsion, CFL-adaptive timestepDensityGrid— spatial hash for O(1) average neighbor lookupFluidRenderer— iso-surface extraction as glyph positions/colors for GlyphPoolWaterSurface— height-field shallow-water equations with wave propagation, damping, and rain-drop ripplesBuoyancyForce— compute buoyant force on a RigidBody submerged in water
Structs§
- Buoyancy
Force - Compute the buoyant force on a rigid body submerged in a
WaterSurface. - Density
Grid - Spatial hash grid for O(1) average neighbor search.
- Fluid
Glyph - Glyph data for rendering a fluid.
- Fluid
Renderer - Extracts density iso-surface points and colors for integration with GlyphPool.
- SphParticle
- A single SPH fluid particle.
- SphSimulation
- Weakly Compressible SPH (WCSPH) fluid simulation.
- Water
Surface - Height-field water simulation using the shallow water equations.
Functions§
- cubic_
kernel - Cubic spline kernel W(r, h).
- cubic_
kernel_ grad - Gradient of cubic spline kernel dW/dr (scalar, radial).
- kernel_
gradient - Gradient vector: dW/dx = (dW/dr) * (r_vec / r)