Jump to content

Driving FLIP viscosity with Pyro


Skybar

Recommended Posts

After watching Frictional Viscosities by Craig Tonks I got intrigued to learn about microsolvers, which I essantially knew nothing about. I came up with the idea to melt and then freeze FLIP with the temperature from a Pyro sim, kind of like how candlewax behaves.

I first tried something simple (no microsolvers or pyro involved) with a SOP Solver, driving viscosity with color:

But as I said I wanted to learn microsolvers, so I've been slowly trying different things out to make this work, learning lots in the process. I finally got it to work somewhat, it melts and then freezes again:

Right now it's quite hard to control, as you can see it melts really fast and freezes really fast. But atleast I nailed those two things, and I understand how it works - so now just to continue to build on this to give it more control. Microsolvers is really fun to fiddle with :D

If anyone got any general tips or something, that would be greatly appreciated!

  • Like 3
Link to comment
Share on other sites

Some progress:

I added some Surface Tension in this one as well, it makes it drizzle down quite nicely - but it introduces some problems I don't want so I will probably look at other ways to make it stick better.

Link to comment
Share on other sites

Interesting. Are you using a exponent for the speed of cooling? Or is it linear?

It's linear right now, basically just removing a set value every timestep. But "exponential falloff" is probably something I should look into for the cooling (and probably for the heating as well). I don't really know how to accomplish that though, I haven't really thought if it other than "why is it cooling so quick??" hehe. Thanks for the tip, I will look into it :)

Link to comment
Share on other sites

Yo David my friend!

To create an exponential fallof just remove that set value depending on how far/close the fluid is to the "solidify" temperature. A multiply combined with a ramp parm(for adjustments and a exponential curve) if you want to do this whithin a geometry VOP. I am not sure how to achieve that completely with microsolvers but I wouldn't expect it being extremly difficult.

Edited by Hudson
Link to comment
Share on other sites

I would use a separate attribute/field called "cooling" that goes from 0-1 and base the viscosity off that, mapping it linearly or expo.

Like, viscosity = 1000 ^ ($COOLING^0.5) or fit01($COOLING^0.2,100,1000)

I think something like that would work.

Check here for adding an addition field: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=27389&highlight=color+colour+smoke

It's smoke, but the solver setup should probably work for fluids too... I think.

Link to comment
Share on other sites

I would use a separate attribute/field called "cooling" that goes from 0-1 and base the viscosity off that, mapping it linearly or expo.

Like, viscosity = 1000 ^ ($COOLING^0.5) or fit01($COOLING^0.2,100,1000)

I think something like that would work.

Check here for adding an addition field: http://www.sidefx.co...or colour smoke

It's smoke, but the solver setup should probably work for fluids too... I think.

Hey, thanks. Actually I have a field I call vtemp, which I copy the pyro temp to. That in turn is creating an attribute (also called vtemp) on the particles which the viscosity is based off. I think the main problem I have is that the particles needs to have really high viscosity to be stable when not heated, so at the moment 0-1 vtemp is mapped linearly to 100000000-0 viscosity with a Fit Range VOP (in reality 1-0 visc, too keep it simple while working things out I multiply the viscosity to the right numbers afterwards on the flipsolver).

Right now I'm trying to multiply the vtemp (the attribute) down to remove 0.000001% every timestep, and it kinda works alright. Multiplying it down "cools" 1 vtemp faster than 0.1, for example 1*0.9 removes 0.1 - and 0.1*0.9 removes only 0.01. So I guess I got some non-linear cooling right there, but I want it to be in reverse. So that 1 vtemp (low visc) doesn't cool as quick, but the more it cools off it goes quicker. Is there any way to do that?

Link to comment
Share on other sites

I did a similar thing with candles a while ago,

great fun! I used a sopsolver to handle the viscosity, but I'd love to see your take on it!

Thank you! Yeah it is a bit easier to control in sops, but I'm trying to stay away as much as possible from that to learn dops, which mainly is the goal here.

I think I might have solved the "problem" described above, rather than multiplying with a constant number I multiply with a ramp.. Like Hudson suggested earlier, but I didn't quite understand then how it would fit in. I think I do now :P

Link to comment
Share on other sites

One question, are you first simulating the fire simulation and then separating the temperature field to pull that into the flip simulation with a sop scalar field?

I got a setup working like this, but I'm wondering if it's possible to have it all in one DOP network. Is there a node for fetching fields from other parts of your dop network or is there another way?

Link to comment
Share on other sites

One question, are you first simulating the fire simulation and then separating the temperature field to pull that into the flip simulation with a sop scalar field?

I got a setup working like this, but I'm wondering if it's possible to have it all in one DOP network. Is there a node for fetching fields from other parts of your dop network or is there another way?

Yeah it certainly is possible to have them in the same DOPnet and sim both at the same time. There is a DOP called "Gas Fetch Fields To Embed" which does this, just stick it between your flip object and flip solver.

However that imports more fields than I want, so if you dive into it you can see that is uses an Apply Data and a Fetch Data to get the fields. So instead you can use that setup right away; stick an Apply Data between your flip object and flip solver - and then a Fetch Data into that. Then you just point it to your Smoke Object (probably called Pyro) for "source object"-parameter, and Temperature for "source data name" if that is the field you want. "Data Name" is what your imported field will be called.

Hope that helped :)

  • Like 1
Link to comment
Share on other sites

Right now I'm trying to multiply the vtemp (the attribute) down to remove 0.000001% every timestep, and it kinda works alright. Multiplying it down "cools" 1 vtemp faster than 0.1, for example 1*0.9 removes 0.1 - and 0.1*0.9 removes only 0.01. So I guess I got some non-linear cooling right there, but I want it to be in reverse. So that 1 vtemp (low visc) doesn't cool as quick, but the more it cools off it goes quicker. Is there any way to do that?

I am not sure if I understand your question. But couldn´t you take the reverse of your vtemp to start with? if you calculate your cooling with (1-(vtemp)) instead of just vtemp you would get the reverse from what you are having. But it is kinda difficult to understand this -> "for example 1*0.9 removes 0.1 - and 0.1*0.9 removes only 0.01".

I hope it helps

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