Jump to content

Collision between different flip simulations


FunnyName

Recommended Posts

Hello all!,

I am trying to create two different flip sims, which should collide with each other. Sim A is a flat tank, with a suction force and some vortex force. Sim B is a simple sphere emitting fluid. I want Sim B fluid to collide with Sim A fluid. Problem is if I do these inside one DOP network, Sim B inherits all the forces attached to Sim A, I am trying to prevent that. Maybe I'm overcomplicating this whole thing.

 

Any ideas on how I can get them to collide with each other? Please refer to the attached hip file.

 

Thank you all for your time.

TwistForce.hipnc

Link to comment
Share on other sites

Don't use two solvers. Connect the sphere Volume Source to input #4 on the flat tank solver, then extend the flip sim boundary to include that emitter within the domain.

Untitled-1.jpg

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

Hey Atom!

Thanks a lot for taking the time to help!

This setup works, however the problem that I am having with it is that now the emitted particles also have a suction force, and are affected by the vortex force. Is there any way to exclude the falling particles from these forces?

Link to comment
Share on other sites

Hello FunnyName,

Have you tried putting the two different fluid particles into different groups?

The only thing is that you have to assign the groups outside of the DOPNET, in the SOPs level. What I'm trying to say is that we assign the flat tank particles with group A and the sphere emitter with group B. Then all particles born in the sphere emitter will, by default, belong to group B inside the DOPNET. Then we can use the group option in the forces node to isolate the forces to act only on that group. So in a sense, you have control over which forces will act on each group.

I have attached a screenshot of the group option for your reference:

Capture.PNG.15242bbf69631c7db65f3847514f1fe8.PNG

I hope this helps you out.

Link to comment
Share on other sites

Hey thanks a lot Eyeracker!

That's a neat trick, I didn't know you could create groups in the SOPs level. It solved most of my problem. However, while the other forces do have the option to work on a specific group, the suction force doesn't, or not that I could find. Is there any workaround for it?

image.thumb.png.bcbcdf1442e9c8625075e1cc22c40711.png

 

Thanks again for your help so far:rolleyes:

Link to comment
Share on other sites

Okay, I think I have a solution. Here is the file:

suctionforce_Modified.hipnc

I added a group functionality in the code. It's not as versatile as the Houdini group parameter, but it should help you out with the problem you are having.

Here is how it works:

Type in the groups that you need in the parameter separated by a space. You can type multiple groups or single groups in the slot. If there is more than one group please see to it that it's separated by a space otherwise it won't work. However, if nothing is typed in the group parameter slot, the entire node is turned off. So you need at least one group to make it work. Please note that the normal wildcards and group operations such as "*",  "!",  "^" etc will not work. So you will have to type the group name exactly as it is.

Capture.PNG.f0dfdab2ae952dc40c6b8ea6a1a5bce8.PNG

There are more elegant ways of doing this, but that would require a lot of python coding and attaching codes to parameters. Unfortunately, I lack the knowledge to implement those features. So sorry about that. But for the most part, this should work.

You can take a look at the code and implement a similar technique for your other nodes which don't have the group functionality; Maybe you can even improve it. I haven't done extensive testing on this, so I'm kind of waiting for your feedback on this. See if this solves the problem.

Edited by Eyeracker
  • Thanks 1
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...