Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluid volume loss/gain, mass conservation #326

Closed
rlguy opened this issue Jun 2, 2018 · 7 comments
Closed

Fluid volume loss/gain, mass conservation #326

rlguy opened this issue Jun 2, 2018 · 7 comments

Comments

@rlguy
Copy link
Owner

rlguy commented Jun 2, 2018

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
Copy link
Owner Author

rlguy commented Dec 10, 2018

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.

@EntitySelf
Copy link

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.

@rlguy
Copy link
Owner Author

rlguy commented Dec 11, 2018

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.

@NHodgesVFX
Copy link

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.

@rlguy
Copy link
Owner Author

rlguy commented Mar 2, 2019

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 flip.fluids@gmail.com, this could help us test the issue.

- Ryan

@NHodgesVFX
Copy link

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

@rlguy
Copy link
Owner Author

rlguy commented Feb 22, 2023

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 rlguy closed this as completed Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants