Multiple SPH Fluids
Add a new feature to allow multiple SPH objects to interact with each other. Each SPH object can have totally different physical properties, such as different density, different viscosity, different boundary condition etc. Note that the surface tension between fluids is not perfect yet, but almost done.
Dependency: !349 (merged)
Summary:
-
Rewrite neighbor search, separating the neighbor search pipeline into two distinct steps (update internal data, and search neighbor) which is necessary for synchronizing between multiple fluid objects -
Rewrite SPHSolver, allowing to add multiple SPH objects into the same solver (all SPH objects added to the same SPH solver will interact with each other) -
Rewrite SPHModel, adding a static registry to keep track of all generated SPH models -
All SPH objects added to the same SPH solver will have their SPH models grouped into a unified group -
Rewrite SPH model, performing time integration using particles of all SPH models in the same group -
Clean-up and squash commits to merge
These tasks should be subjected to future plan, as I don't have enough time to do:
-
Further optimize the computation, as now performing time integration using multiple fluid models is not cache-friendly -
Write unit test -
Generate more examples
Edited by Nghia Truong