So here's where we are now:
We discovered that dynamic cell resizing actually still works, and solved a small problem where we thought my updated code didn't work on Christine's computer (turns out it did). We realized that we weren't extrapolating velocities in the Z direction yet (as our early tests were in 2D and we just recently switched over to 3D) and we fixed that as well.
We have two main problems now.
The first is that, after a while, the particles stop behaving like water and simply explode (I've included a video below).
The strange thing about this is that oftentimes the PCG stops converging at the moment of impact with the ground, but the simulator will continue running like water for a good while afterwards before exploding. However, when we use a smaller number of particles (say 3) spaced out a good distance from each other, the PCGs always converge and the particles eventually come to a stop (as expected). The more particles we use, the faster the sim explodes (faucet gives us only a few moments of behaving properly). We think there's a few things that could be happening here:
- Overlapping particles are causing insane, impossible pressures, causing the velocities to explode (Karl notified us of this one - he said the same thing had happened in his sim when they initialized particles in the same place). It would explain why the more particles there are the faster the simulation explodes, as more particles means higher probability of a collision.
- There could be weird boundary conditions we're neglecting. There seems to be something strange going on with ground plane collisions, even when everything is converging properly and we're only using a few particles. Theoretically, the pressures should eventually cause all the velocities to go back to 0 (I'm assuming - I can't find confirmation of this), which is not happening even in the few particle case.
- Memory issues. We don't have specific cause to believe this past "more particles = faster explosion", but I think we're both always suspicious of memory issues.
Since we know we need to try to implement level sets now, we've decided to start dividing up our labor (up until now it's been "let's both try and figure out what's going wrong"). I'm going to try to debug our current code over this weekend, and hopefully figure things out by Monday (I'm not entirely optimistic). Meanwhile, Christine has agreed to start looking at level sets and maybe start an implementation by that time as well. We'll see how it goes!
-Jason
P.S. If anyone reading this has any idea what the nature of our problems might be, please let us know!
No comments:
Post a Comment