Closed AtheMathmo closed 4 years ago
In our implementation we use the correct SPH formulation. However, Macklin used a simplified formulation in his paper and in our course notes where he assumed that all particles have an equal mass. One example where this assumption fails is when the method is combined with the boundary handling of Akinci et al. which we use in our code.
Ah okay, thank you!
Hi!
I think I have spotted a bug: https://github.com/InteractiveComputerGraphics/PositionBasedDynamics/blob/86483ffac0fc30fbdd57196ee4893157e6d72893/PositionBasedDynamics/PositionBasedFluids.cpp#L119
The density solver uses the mass to scale the kernel gradient in the correction. I do not think that this mass term should be present. E.g. Section 5.10 in your notes or Eqn (12) in Position Based Fluids.