Fluid Simulation with SPH

Hello,

I was wondering if anyone had created or knew about anyone who created fluid using SPH with Box2D. I was thinking of going with the Eulerian(grid-based) method. I have already checked out the other Fluid Simulation thread http://www.box2d.org/forum/viewtopic.php?f=3&t=574 and was wondering if anyone had done anything like this or knows who has. Thanks 😀
The closest I have done to liquid physics in Box2D is a recreation of this demo, using b2 for the ball physics.

http://www.patrickmatte.com/stuff/physicsLiquid/

The bitmap manipulations lend it a good bit of credibility, especially if you select the right filters for the job (the version in that link has no filters whatsoever), but bitmap manipulation is a heavy process for Flash so if you have a large screen or many manipulations that could be a bottleneck.

I implemented mine in a slightly different way than the proof of concept above, as I had different requirements and was making a different kind of liquid than an energy drink. 😉 In either case it worked just fine.

I did however, have to make some hacks to the b2 library. I added a flag that forbids an object from reporting collisions to the Collision Listener because all the little particles bouncing around were causing an unnaceptably large burden on the processor and really I didn't care at all about their collisions with anything.


I realize it's a little bit of a hack, and probably not "true" fluid physics. 😉

Original thread: https://box2d.org/forum/viewtopic.php?t=5899