particle delta calculations are constraints/(w1+w2) but should be constraints*w1/(w1+w2)?
yingDaWang-UNSW opened this issue · comments
Hi warp team, I noticed while testing xpbd in a simple system of particles with contrasting radius and masses, that unexpected results relating to delta calculations were occurring.
I note that in the xpbd integrator, for particle-ground, particle-shape, and particle-particle kernels, the deltas are delta += (delta_f - delta_n) / denom or of a similar nature.
If I make the following change to the kernels: delta += (delta_f - delta_n) / denom * w1.
Then both gravity segregation and the brazil nut effect emerge. Without this, the high w particles have deltas that are too low and vice versa.
EDIT: I forgot to also mention that without this modification, when w<1.0 for any given system, there is a tendency for particles to explode outwards. This also appears fixed with this change.