Sunday, May 6, 2012

Another bug bites the dust...

I meant to do a post about this yesterday (and another one on it a while back), but with all the finals stuff it kept slipping my mind (and also it seemed hardly too exciting).

After fixing the "particles explode" bug, Christine and I noticed that there was something still wrong with our water particle behavior - namely, that given enough time the particles would always compress down to the floor of the MACGrid. I've been trying to solve this final bug with the particle motion while Christine's been tackling level sets, and yesterday I finally figured it out. We have a function we named "constrain velocities" that sets velocities to zero on the boundaries of the MACGrid. We have it in our simulation in a place based on where we'd seen it in our notes, particularly in "Fluid Flow for the Rest of Us". As it turns out, though, we needed to run that step each time we modified our velocities (meaning after the advection AND projection steps), which in hindsight makes a lot of sense.

Not as exciting as Christine's update about working level sets (hooray!), but progress nonetheless. I've begun doing our final writeup as Christine finishes going over our level sets. This project is due tomorrow, but it seems as though we might finish...!

No comments:

Post a Comment