Jump to content
WhyGee

Flip pouring into closed container?

Recommended Posts

WhyGee    0

Could you please explain what you've changed inside the flip solver? It seems to be from pre-H16 and I'd like to re-implement it in the new version's solver. 

Thanks!

Share this post


Link to post
Share on other sites
WhyGee    0

I think I've found where you've integrated cWeight. I'll try to add this to the new solver hopefully I didn't miss any other changes.

Thanks again.

collision_weight.JPG

Share this post


Link to post
Share on other sites
galagast    84

After studying Alejandro's file, I adjusted it a bit so that you won't have to edit the flipsolver HDA.

Here are my adjustments:

  • Pulled out three nodes related to computing the collisionweights.
  • Set the Volume Motion -> Collisions -> Volume Fraction Method to None (to disable internal collision weight computation).

So far, everything seems to still work as before :D

H16.0.557 - collisionWeights_v001_jlim.zip

Share this post


Link to post
Share on other sites
Atom    516

Thanks for the updated file Jeff.

I am trying to get the sphere to fill up with fluid. So I added a Divergence field, but I think your Gas Solvers are blocking the divergence field from operating correctly. Do you know of a way to make the sphere fill up with fluid?

 

ap_collisionWeights_v001_jlim.hiplc

Edited by Atom

Share this post


Link to post
Share on other sites
WhyGee    0

Hi again,

I've ran both setups and there is still an affect on the fluid as it passes through. I've tried playing with the thresholds but unable to get rid of this behavior and it ruins the smooth stream as expected if the container was actually opened at point of entry. Included is a preview of what I mean. If you have an idea how to fix this it would be great. Otherwise looks like the 2 stream approach is going to have to do. 

Thanks alot!

Yaniv

fill_test_v1.mp4

Share this post


Link to post
Share on other sites
galagast    84

Heya Atom,

This is honestly the first time I tried looking into what the divergence field does. I've been seeing it before but never bothered using it. Thanks to you, I know now what it actually does :D

I adjusted the scene, hopefully it is what you were after, notes are below:

  • You added a source volume that should pipe in a divergence field, but your volume path is pointing to "/obj/geo1/OUT_source".
    This source (from Alejandro's setup) does not contain volumes, it only has particles.
    So the effect is that no divergence data is being written to the divergence field of the sim.
  • You could probably create a new Fluid Source SOP to generate a proper volume for the divergence field, then source it afterwards.
  • Or, in the hip file setup attached below, I simply added a @divergence attribute to the particles and used the Flip Solver's "Divergence by Attribute".

So far, the sim does seem to spread out a bit more after adding the divergence.

I hope this helps!

H16.0.557 Indie - ap_collisionWeights_v001_jlim_2.zip

  • Like 1

Share this post


Link to post
Share on other sites
galagast    84

@WhyGee: any chance you could post a sample file? I'm curious why it does that. :)

Share this post


Link to post
Share on other sites
galagast    84

I tried a couple of things, but in the end, it still had a bit of an effect to the fluid whenever it passes through the collision.
I've only minimized the effect.. check the file out to see if it is something highly noticeable.

changes/notes:

  • Removed the Fluid Source at the SOPs level because particles are the only ones needed in the setup.
  • Removed the Threshold Collision Weights DOP as the Flip Solver was already doing the same internally (albeit on a different sequence).
  • I increased the Gas Particle to Field -> Max Extrapolate Cells, in the hopes to extend where the cWeight gets applied.

flip_closed_container_2.gif

H16.0.557 Indie - collisionWeights_v001_jlim_fill_test2.zip

Share this post


Link to post
Share on other sites
galagast    84

Although I'm still hoping that there should still be a much simpler setup.. If only there was a way to avoid setting up multiple volumes, and just use the existing collision volumes. Then continue with the attribute approach to set a particle as colliding / not colliding.

Need more time to experiment with this! hehe :D

Share this post


Link to post
Share on other sites
WhyGee    0

I agree this effect should be much more straight forward.

Thanks for the hip, I'll have a look now to see how it behaves in my scene. The previous file tends to get worse when the sim resolution is finer so I hope your setup will work.

Cheers

Yaniv

Share this post


Link to post
Share on other sites
Pazuzu    175
On 5/5/2017 at 1:04 PM, galagast said:

After studying Alejandro's file, I adjusted it a bit so that you won't have to edit the flipsolver HDA.

Here are my adjustments:

  • Pulled out three nodes related to computing the collisionweights.
  • Set the Volume Motion -> Collisions -> Volume Fraction Method to None (to disable internal collision weight computation).

So far, everything seems to still work as before :D

H16.0.557 - collisionWeights_v001_jlim.zip

Nice changes!

On 5/5/2017 at 2:06 PM, Atom said:

Thanks for the updated file Jeff.

I am trying to get the sphere to fill up with fluid. So I added a Divergence field, but I think your Gas Solvers are blocking the divergence field from operating correctly. Do you know of a way to make the sphere fill up with fluid?

 

ap_collisionWeights_v001_jlim.hiplc

You don't need to define a new divergence volume if you want the divergence to work as it should. You only need to activate the field in the flip object, then define the divergence attribute on the particles directly. 

Regards filling faster, you can use the same rules for the collisionWeights to define the divergence and help the fluid gain volume when is inside the collision object, also you can create particles on demand when the fluid expands, so you can use reseeding for this or create your own dynamic setup for on demand particle generation.

Here is a mod to the Jim's file that shows that, it will became unstable at the end mainly because of the volume gain, but you can animate the reseeding toggle and kill the divergence, or test the fluid volume against the volume of the collision object to deactivate the expansion, a more procedural solution.

Finally one limitation on this collision weight technique is that if you use so much extrapolation the fluid will escape at the zone where the fluid stream is flowing, all of this is because of the fluid reconstruction with the gas particle to field.

Hope that helps!

Alejandro

 

ap_collisionWeights_v001_jlim_FasterFilling.hiplc

Edited by Pazuzu
  • Like 1

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

×