Jump to content
Sign in to follow this  
gangland

Flip volume gain

Recommended Posts

Posted (edited)

hello guys,

i cannot find an way set an volume gain, in a beer filling a cup simulation.

currently there is an source emmtiting points from above and the fluid just stay at the bottom, I've already messed with divergence attribute but itsn't work anyhow.

please help me
Capture_nogain.thumb.JPG.4645f1d1ec46977fef57f309df41a624.JPG

ps: file attached

 

 

beer_pour_v01.hip

Edited by gangland

Share this post


Link to post
Share on other sites

Hello Gangland,

I have done a similar simulation with champagne being poured into a glass. To simulate volume, I would first suggest activating the Particle Separation in the FLIP Solver node even before experimenting with divergence.

Psep.PNG.69e33f50c72a602731e2a03792f91212.PNG

A common problem that we encounter with FLIP fluids is that fluids with higher velocities tend to compress the particles. The same is also true for fluids that build up in a certain section. This effect is not so much evident when the fluid is flowing from one section to another, simply because it's difficult for our brains to keep track of minor volume losses in liquid when they are in relatively fast motion. So for the vast majority of fluid simulations, particle separation is turned off by default to speed up calculations. But when the fluid starts to build up, initially the solver will try to retain the volume but as the simulation goes on and more particles are introduced, the solver has a hard time trying to keep the separation between the particles. Especially with low velocities, the effect becomes more apparent.

When particle separation is turned on the FLIP solver will do additional passes to ensure that the particles keep their spacing. However, like all solver algorithms, this method is not 100% accurate. As we keep increasing the Separation Iterations, the simulation gets more and more accurate and we will be able to observe less volume loss. As a starting point, I would suggest a Separation Iteration of 4. As for the Separation Rate and Separation Scale, the default values should be fine and rarely any needs a change.

If particle separation does not produce the desired results, then we can think of introducing divergence into the sim. The combined use of divergence and particle separation can sometimes yield better output.

The error that you made in your sim is that you turned on the divergence calculation in your simulation, but didn't initialize the particles with a divergence attribute. To fix this problem put down a pop wrangle in your DOPNET, connect it to the second input (particle velocity) of the FLIP Solver. Then type in the following code:

f@divergence = 1.0;

Then change the float value in the pop wrangle to adjust the divergence attribute to get the desired fluid expansion.

I highly suggest experimenting with the particle separation method first before you add any divergence to the simulation.

I hope this helps you out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×