Research Article
Rigid Body Sampling and Individual Time Stepping for Rigid-Fluid Coupling of Fluid Simulation
Algorithm 3
Individual time stepping for rigid-fluid coupling.
(1) while animating do | (2) select active | (3) for each active fluid particle do | (4) find fluid and boundary neighbors | (5) for each fluid particle do | (6) if active then | (7) compute , | (8) else | (9) interpolate , using | (10) for each active fluid particle do | (11) compute | (12) compute | (13) compute time step condition (Eq. (15)) | (14) | (15) for each boundary particle do | (16) compute forces (Eq. (10)) | (17) for each fluid particle do | (18) compute time step | (19) | (20) for each rigid body do | (21) compute total forces, torques (Eq. (11)) | (22) pass forces and torques to physics engine | (23) update rigid body | (24) update boundary particles of rigid body | (25) for each fluid particle do | (26) | (27) | (28) | (29) |
|