Blender-FLIP-Fluids icon indicating copy to clipboard operation
Blender-FLIP-Fluids copied to clipboard

Fluid volume loss/gain, mass conservation

Open rlguy opened this issue 7 years ago • 6 comments

Fluid volume increasing/decreasing over time is a common issue with the FLIP simulation method. This is because the FLIP simulation method has no concept of volume. The method uses volumeless particles to track where the fluid exists and they are moved around the domain using a velocity field. Due to this the simulation will tend to decrease fluid volume over time as approximation errors accumulate and cause fluid particle distribution to become more dense. The volume will tend to decrease, but volume can increase in situations where the fluid is quite chaotic with a lot of splashing.

Here is an example animation of volume increase (animation created by Reddit user lumpynose): https://streamable.com/7naui

A solution to improve mass conservation is to increase the accuracy of simulation calculations. This can be done in a few ways:

  • Increase domain resolution
  • Increase the minimum number of time steps
  • Decrease the CFL safety factor number

The above solutions will end up creating more accurate simulation calculations at the cost of increasing bake time. However, these solutions don't guarantee a fix to the mass conservation issue.

At the moment, I am not sure how to completely eliminate the issue of mass conservation using the FLIP method. This issue thread will be used for the discussion of this issue.

rlguy avatar Jun 02 '18 00:06 rlguy

An update from issue #398:

The fluid through a grate simulation is actually a worst case scenario for this type of simulator. When fluid passes through the grate, the motion becomes very chaotic and leads to large increases in volume. Fluid particles become split up and recombine immediately after passing through the holes which creates larger packets of fluid. When there is viscosity added to the fluid, the particle motion becomes more orderly and less chaotic leading to better volume conservation.

I have run tests in the new experimental version (v9.0.5.0) and unfortunately it seems that the problem of volume increase has become worse. Some stability improvements are in the experimental version which help with the problem of volume loss, but these changes have made the problem of volume increase worse. I'll need to experiment further and perhaps revert some changes to find a compromise between fixing volume increase and volume loss.

rlguy avatar Dec 10 '18 20:12 rlguy

I was wondering about this, I made a wave pool (https://www.youtube.com/watch?v=1p3KfHa4O9M) and ended up with more volume than I started with. I used v9.0.5.0 with the latest Blender 2.79 build.

I can't confirm (yet) if it has become worse but it for sure happens in the experimental build.

EntitySelf avatar Dec 11 '18 10:12 EntitySelf

Thanks for the report! That is quite a volume change and I don't believe I've seen a simulation like this increase in that much volume in the earlier version (1.0.4a).

We're planning to have a new experimental build available on Dec 14th (v9.0.5.1). I'll try to find a fix/improvement for this issue between now and the 14th.

rlguy avatar Dec 11 '18 19:12 rlguy

Any updates on this, This project that I was working on shows some massive volume loss. https://streamable.com/azqqh

Great work on the plugin so far, I'm excited to see what updates will happen in the future.

NHodgesVFX avatar Mar 02 '19 18:03 NHodgesVFX

Hi nate066,

This case of volume loss is related to a bug that affects particle collision handling in scenes with moving obstacles. I have not added a bug report to the issue tracker for this yet, but I will be able to add one after the weekend. We have made some improvements to this issue but will need some further testing to make sure the fix doesn't affect other parts of the simulation.

If you are able to attach the .blend file, or send it to us at [email protected], this could help us test the issue.

- Ryan

rlguy avatar Mar 02 '19 18:03 rlguy

Here is the file, Hope it helps. Flip_Fan.zip

NHodgesVFX avatar Mar 02 '19 19:03 NHodgesVFX

My apologies for the ping on this issue thread, just cleaning up the FLIP Fluids GitHub issue tracker.

This issue is a known limitation of the FLIP (FLuid Implicit Particle) simulation method. Documentation, information, and tips on this issue can be found in this topic: Limitations of the FLIP Fluids Addon - Volume and Mass Preservation.

rlguy avatar Feb 22 '23 19:02 rlguy