Research Article
Incompressible Fluids Simulation by Relaxing the Density-Invariant Condition in a Marine Simulator
Algorithm 2
Incompressible SPH algorithm based on relaxing the density-invariant condition.
| (1) while animating do | | (2)for all particles do | | (3)apply forces | | (4)predict position | | (5)for all particles do | | (6)find neighbor particles | | (7)while do | | (8)for all particles do | | (9)calculate | | (10)calculate | | (11)calculate | | (12)for all particles do | | (13)calculate | | (14)perform boundary handling | | (15)for all particles do | | (16)update position | | (17)for all particles do | | (18)update velocity | | (19)apply vorticity confinement and viscosity | | (20)update position |
|