Monday, April 9, 2012

What I've Been Doing For Two Days

I'm no good at blogging, so here's a quick breakdown:
  • Implemented a new graphical display. I started out by coloring cells in blue that contained liquid particles, but that display method got buggy fast (and was admittedly pretty ugly). I ended up switching out the cell method with just drawing all our particles as points (in semi-transparent blue). I experimented with rendering points as spheres, but it had the same relative effect and (for some reason) it was hard for me to get the spheres to show up in their proper positions (I left that code commented out in case we ever choose to switch back to a particle implementation). I find it easier to debug and figure out what's going wrong when there's some kind of visual involved, so that's been helpful so far.
  •  I rewrote advect velocities and projection so that they no longer compute velocities for any cells that don't contain particles. For a while this yielded decent (though flawed) results. Once I finished, we had our three sample particles drawing at the correct point in space before slowly drifting apart from each other in the x-direction - behavior that we actually expected since we haven't yet implemented velocity extrapolation (as we found in the Batty notes)
  • I implemented velocity extrapolation, but realized after it failed that I calculated per cell instead of per face, meaning the velocities of each point were off by about one position in each direction and, in some cases, were not even being calculated. Unfortunately I didn't have time to debug this before handing it back to Christine, since I have more work I need to get done soon...
  • I debugged a lot of our existing code. There was a lot of debugging to do.
Liquid cells rendered as Tetris blocks

Liquid particles rendered as particles.
My hopes are that we have a VERY basic liquid sim working in at LEAST two dimensions by alpha time. As we've done more reading and actually started programming, it's become clear to both of us (I think) that what we are aiming to do won't exactly be doable the way we meant to achieve it. There are certain things we'll likely be leaving out of our initial intended implementation (level sets come to mind), while adding more things for realistic liquid simulation (viscosity, surface tension, etc). There's obviously still a lot we can do - interaction with solids, continuous water sources, free bodies of water particles, etc. - but for now I think we're going to focus on getting this smoke sim simulating water proper.

No comments:

Post a Comment