Jump to content
  • Advertisement
Sign in to follow this  
BRabbit27

Particle fluid simulation - particle tightly packed

This topic is 1339 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

After some debugging and head scratching and thinking I manage to get a very basic fluid simulation, incompressibility working fine.

Now, there are a lot of parameters in a SPH simulation that I don't know how to tune them, for now I would like to know how can I make my particles be closer to each other.

 

I tried increasing the density but the simulation looks exactly the same, i.e. particles well separated, however it helped smoothing the interaction with particles which I'm glad I found this.

 

So, what parameters affect how close/tight the particles should be?

Share this post


Link to post
Share on other sites
Advertisement

It would be helpful to know what parameters are available for modification in order to offer some insight. Just for future reference, a lot of people that probably would have been inclined to help, would just move on to helping others because they are left to guess the 100s of possibility as to the cause of your issue. What I'm trying to get at is you have to offer more in the way of describing the issue in order to get useful help.

Share this post


Link to post
Share on other sites

Agree wit cgrant here. We need something to work with, at least the definition of your density, pressure, and damping kernels in order to help. Just dumping the entire source code, on the other hand, would often bee too much information for most people to go through. Ideally, if you pinpoint the bug and stated an accurate question, then you wouldn't even need to ask it here - you'd already know the answer :-)

Share this post


Link to post
Share on other sites

The parameters are the rest density, the mass of the particles, the number of particles and the support of the kernel. If I want to simulate water, how should I set up these? The kernels are the common ones, I guess, the poly6 kernel  4/(?*h^8)*(h^2-r^2)^3  for density estimation and gradient spiky kernel for pressure -30/(?*h^5)*(h-r)^2*r.normalized()

 

In my simulation I have an area = 4 m^2, where I want to simulate a fluid with density = 1000 kg/m^2. This parameters give me a total mass M = 4000 kg, which, having 50 particles gives a particle mass m = 80 kg.

 

I tried to put my particles in a square shape, to try to simulate the damn break, but at the beginning of the simulation the particles go apart, they do not keep falling together until hit the ground. I set the initial velocity to 0. Gravity is pulling down and the interaction forcer between particles, that's where I believe the problem is.

 

If I reduce the mass of the particles, particle clustering is observed which is not desirable, I want the particles to be tightly packed but with a good structure.

If I increase the support of the kernel, the particles explode even more. So far the less worse results are achieved with kernel support h = 0.2, m = 80. Where am I missing something?

Edited by BRabbit27

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!