Jump to content

Changing gravity force when an object penetrates water surface


art3mis

Recommended Posts

Hi

Trying to create a very simple simulation with a torus falling into a FLIP tank. Instead of trying to add a buoyancy force to the torus I want to simply change the gravity when the torus impacts the water, so it will still sink, but at a much slower speed.

Much googling and checking the DOP references turned up nothing but came upon a reference in a book Houdini on the Spot which I think is the right direction.

The solution is to use dopnumrecords within a Modify Data DOP like so

dopnumrecords("/obj/dopnet1", "objectname", "Impacts","Impacts")

where you would use the name of the object you wanted to test instead of objectname and the name of the DOP network for dopnet1.

Being a newcomer to the world of DOPs I am stumbling in actual implementation.

Can any DOPs experts possibly help with my attached .hip?

 

10.19.16_DropClock - Copy (2).zip

Link to comment
Share on other sites

Changing gravity will also affect the splash portion of the fluid as well. You may want to simply add a buoyancy force to affect the RBD objects.

 

This image shows the setup.

Untitled-1.jpg

 

The fetchdata1 gets it's input from the result of the fliptank surface. You can also preview the surface as well. Buoyancy force needs large numbers to have affect.

In this animation I have used 3000 force in the Y axis. This causes the torus to raise back up quickly, out of the fluid, where it is no longer affected by the buoyancy force. But then gravity takes over and it falls into the fluid again.

buoancy_torus.gif

ap_dropClock_008.hiplc.hipnc

Edited by Atom
  • Like 3
Link to comment
Share on other sites

Hi, here's an alternative method. I added notes inside the hip file.

drag_drop_mplay.gif

RED: Current movement.
BLUE: With drag force after entering water.

I also added a simpler version, where instead of reading the fliptank's surface field. I simply create a custom Scalar field with manually-set size and dimensions to be used by the drag.

dropClock_008_jlim.zip

  • Like 1
Link to comment
Share on other sites

Wow..thanks guys. this make my weekend!

One gotcha I'm noticing with the buoyancy method is that Particle Separation, Buoyancy Force and Feedback Scale seem to be interdependent.

Changing one affects the others.

Edited by eco_bach
Link to comment
Share on other sites

Yeah, Feedback Scale seems to be largely affected by the Particle Separation.

feedback_comparisons.gif

Particle Separtion: Varies
Water Desnity: 1000
Ball Density: 500

Looking at the comparisons above, I suppose it's safe to say that a minimum separation of 0.1 would get you roughly the same result as a separation of 0.025.

 

 

  • Like 3
Link to comment
Share on other sites

Great test! Even more surprising to me is the extra level of detail when going from .05 to .025!

One parameter I've been ignoring is density. How did you come up with those values?

I want objects to sink. S L O  W  L Y

Does this mean my ball or torus density must be equal to or greater than the water?

No buoyancy force in this example?

From quick tests I've surmised buoyancy force is somewhat interchangeable with feedback.

 

and I've found altering timescale on the solver seems to affect feedback as well

Edited by eco_bach
Link to comment
Share on other sites

Quote

One parameter I've been ignoring is density. How did you come up with those values?

I did multiple tests to find a value that would make the ball float :D

Quote

Does this mean my ball or torus density must be equal to or greater than the water?

I suppose you'll need to set the density of your torus a bit lower than the water for it to slowly sink. Any density greater than the default 1000 might make it sink faster.

Quote

No buoyancy force in this example?

Yup, didn't use buoyancy on those tests.

 

Link to comment
Share on other sites

galagast...your test needs to be in the wiki and or documentation! Extremely frustrating trying to simply slow down a FLIP sim. I'm using a timescale vlaue of .1 on the actual solver node inside my AutoDopNetwork but when I try and go even slower by changing it to say 0.05, the entire look of the sim changes! Feedback, Buoyancy, Particle Separation and Timescale all seem inter connected. Change just one and the others are affected!

Also confusing is the use of "Scale Time" and "Sub Steps" on the actual AutoDop node. How are these different and or connected with the similarly named parameters inside on the solver node?

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...