Jump to content
  • Advertisement
Sign in to follow this  
xtraxtra

Particle-Based Viscoelastic Fluid Simulation - boundaries

This topic is 2858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm implementing Clavet's Particle-Based Viscoelastic Fluid Simulation and I really need help with treating the boundaries.
At first, I'd like to say I'm using implementation without strings. LemonScented (at former thread http://www.gamedev.net/community/forums/topic.asp?topic_id=546205 ) seems to be avoiding strings too thus I don't think this should be a problem but if I am wrong please correct me.
Now for the boundaries. I've implemented reaction to the boundary collision as described in the paper by canceling the normal velocity (or at least I think so). I use these steps in the last phase of simulation resolving collisions:
- Having 6 bounding planes making the liquid enclosed in the box
--- For every particle
--- Compute actual particle velocity
--- Get the plane particle has collided with as the first
--- Move particle along the normal by penetration depth to get it to the position before collision
--- Remove the normal part of the velocity vector from the particle

I experience two major difficulties with this implementation (assuming it correct).
1) While canceling normal velocity the liquid tends to stay flat, only a few particles float above the bottom layer, and after moving boundaries farther and togehter again none of them is pushed up back. (see the attached image depicturing state after inserting particles in the scene and moving boundary planes away and back)
2) Next problem inheres in density variance at the borders. It's the common problem of particles cumulation at the borders due to the difference in their distribution.
I've found several solutions for the second problem but wasn't able to make any of them working correctly:
- Mirroring ghost particles
--- Mirroring particles near to the borders for dnesity computation.
--- This solution when made straightforward gave me unstable and unreliable results (probably due to my wrong implementation)
- Repulsive forces
--- Repulsive forces to the particles near the borders
--- This is the solution I'd prefer the most regarding it's low computation cost
--- I have absolutely no idea how and in which phase to compute these forces
- Ghost boundary particles
--- Inserting static ghost particles with uniform distribution behind the borders to compute densities of the particles.
--- This is the only solution I've managed to work satisfactorily but it is very computationally intensive and I don't know how to compute correct grid cells distance (I organize the ghost particles in a regular grid).

Attached image:
http://stahujeme.kvalitne.cz/simulation_screens.png
Clavet's paper site:
http://www.iro.umontreal.ca/labs/infographie/papers/Clavet-2005-PVFS/

Could you please help me how to correctly treat the boundaries? Pretty please, I'm really stuck at an impasse.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!