Jump to content

Flip volume gain


gangland

Recommended Posts

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
Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...