I want to pour a viscous liquid from a glass into a bowl. To fill the glass I followed the Tips&Tricks page and discharged from a volume over two frames, then animated to zero. In this case the glass should be half full then, but the fluid keeps increasing, coming out of the glass, filling the bowl already. Inside the bowl it keeps growing as well. This could be a result of the cascading setup I needed to have an animated glass with attached Phoenix and inertial forces and the fixed bowl, which needs, as I have read, a discharge higher than 0, so I put that to 0,001. But it seems it is growing way too much for this small amount. And the remainings in the glass after pouring also grow again. According to the volume calculations of 3ds Max the bowl would need about 8 glasses to get filled. So, how do I stop the blob from growing before it eats us all?
Please have a look at the attached preview to see what happens. Here are the specs of my scene:
System unit 1 cm
Inscribed
Smooth
Quality 200
Method Classic
SPF 8
Cell size 0,04
Gravity 0,9
Sharpness 0
Viscosity 0,8
Wetting on
Strong surface mode on
the reason is the default interaction of phoenix with every object in the scene . this includes the second source, that is intended to be used in the second simulator, not in the first one.
now i’m waiting to see the simulation result with the fixed setup, but i’m almost sure that this is the reason.
i strongly recommend include interaction list to be used instead the default exclude list when a complex simulation like this is prepared.
Ah, ok, I see. Please let me know, how your test comes out. Is this setup the right way to do this anyway? Or do you have a better way to approach this? Also I would like to ask additionally for further scene development, if there is a possibility to get higher viscosity than 1. Is this only a matter of time-scale then? Or gravity? So the fluid in the glass comes out more slowly, more like glue.
Thanks,
Bob
the test showed that the reason is not in the self interaction as i suggested, nevertheless i still recommend to use include list in such simulations.
my second suggestion is that the grid anisotropy is to blame, your grid is rotated and the gravity is directed diagonally. I have never tried this, it’s very probably that the gravity pressure is overcompensated and there is residual upward velocity. i.m testing this now, and at frame 350 it seems stable.
btw, why the grid is rotated? this produces big empty areas, your grid was 1.6M cells, after the reorientation it is only 600k and simulates 3 times faster! I also decreased the conservation down to 30, because i suspect you have tried to solve the problem with high conservation.
there is something in your scene that slows down the entire interactiveness of max, and of course this makes the simulation slower, because every step the viewport is redrawn and needs about 5 sec to update. perhaps this is the container that collects the liquid in the second simulator, because it has two modifiers. it’s hidden now, and with all the other optimizations the simulation runs with 5 sec/frame, the initial speed was 30 sec frame, 6 times slower.
well, it’s frame 450 now and the the container is already rotated, my second suggestion was correct and the vertical gravity makes the simulation stable. perhaps the container have to be adjusted to cover the areas where the liquid have to enter into the second container.
i also changed the brush animation, it’s always better to have one frame with stable 100% brush strength, so i shifted the keys one frame forward Fluid_Pouring.zip (399 KB)
Thanks a lot for your insightful response and your support. I will try that again in a whole simulation. I have to admit, the initial rotation has only evolutionary reasons. At first I tried it all with only one container, but then the fluid did not stay in the glass during its rotation, then I linked it and tried to reach the bowl with the smallest possible grid etc.
Could you please say something to my viscosity question as well?
about the viscosity - phoenix is grid based and this leads to some limitations of the viscous simulations. btw there is one more factor that can increase the viscosity, but it is switched off, because makes some simulations worse. i’m considering to allow the users to use it. if you want, i can prepare a build that uses this option for you, and if you like the result, we can include it in the official builds
I have built your advices in my scene and simulated again, it is better and faster now. But as it reaches the second container it still goes wild with the volume. Have I missed something? Please see the attached preview video and max scene.
About the additional viscosity function: Sure, sounds like fun, I would like to test it.
i suppose the reason is the small scale. in this scene we used bigger scale exactly to avoid the uprising liquid.
why the small scale produces uprising liquid? because the gravity is huge measured in the scene units. for one second a free falling object travels a distance about 100 times bigger than the size of your grid!
to have stable simulation you need very big spf, but this is slow. so, the easiest solution is just to increase the scene scale. now it is 1 cm, make it 5 cm.
and one more thing - start the simulation few frames before the rotation of the cup. there is no activity 300 frames, and you simulate all this sequence!
Thanks, changing the units makes it definitely much better - although I would prefer not to mess with the system units since this can have an impact on the rest of the scene. How about a system unit multiplier setting within Phoenix? Or is there one I did not see?
The extra simulation time was for the first tries to letting the liquid settle in the glass, but you are right, this not needed anymore now.
I still have problems keeping the overall volume of the fluid. It is not visibly growing anymore like it used to have, but as soon as the second container is reached, it just becomes more mass. I would not mind a little change, but it is about 4 to 5 times more volume in the second container. I have attached some previews with different settings.
Creating these I would really like to have something like the Max Batch Renderer for simulations, to create several simulations with different settings overnight.
Do I need really high settings for everything with several days of simulation or is there anything else I could do?
as i said the reason for the liquid grow is the high gravity/spf rate, if you can’t change the scale, you may decrease the gravity or increase the spf. actually there is a more important reason that i found today. i did two experiments, one with liquid created using the initial fill up and one with pouring. the first one remain stable even with spf=2, the second requires very high spf to keep the liquid quantity. what is the reason? it’s the hit of the liquid in the geometry! so i modified the experiment, to be similar ot your simulation, i made a brush cylinder that fills the liquid. i ran two sims, the first one was with radius a bit smaller than the container size, the second one was a bit bigger than the container size. what is the idea? the first setup creates a small crevice between the initial liquid and the wall, the liquid fits in the container that produces hit in the walls, the second one does not produce crevice and the liquid does not hit the walls. the result was very different! the first simulation behaves exactly like you sim, it grows, the second one does not grow. let say it again - if you simulate vith very high spf, both the sims will keep the quantity, but the low spf is compatible only with the second simulation. so, just make your source to penetrate the walls, including the botom, and you can keep the 1cm scale
and one more thing: it seems like your cascade connection is not set properly, the source in the second simulator does not transfer the liquid velocity. this is because in the PHXSource_Auffang source you have not enabled the velocity chackbox, that means the source does not affect the velocity and the created liquid has zero velocity. i think this is because in our old versions the checkbox was enabled by default. we changed this in order to make the brush setup easier (it’s a very used setup)
Thanks a lot for all your effort! Unfortunately my result is not the way you described. Yes, it behaves differently, it is right there without settling time and I had to lower the viscosity now to get it even out of the glass. But now I have cells stuck in the wall of the glass and the volume problem persists (see attached previews). Don’t get me wrong here, your support is absolutely great (!!), but the hunt for the right combination of system units/SPF/gravity/viscosity is becoming rather tedious, since every value can change everything, and the deadline approaches menacingly.
What would you consider as a high SPF value to get it over with?
And thanks for the hint on the velocity checkbox, I forgot to check that. Previews_penetrating.zip (1.15 MB)
well, because your scene produces some UI lag that i can’t explain, i decided to make a very fast setup that makes what you need (if i understand correctly), so just replace the geometry with yours.
you can try to retype the settings into your scene, but it’s very probably that the reason for the problems will remain.
in the attachment is the scene and a small avi showing the result.
however, you will need the latest nightly build to achieve the same result, because i’m using forward transfer to simulate the upper container, the classic advection is less physically correct but unfortunately is very stable and only with it you can achieve perfect flat liquid surface. in the official build the forward transfer advection produces boiling, this was fixed last month. beside the viscosity i’m using surface tension, it improves the viscosity result, but also requires nightly build.
so, contact the support, and tell them why you need nightly access (or directly paste a link to this thread).
btw, note that i’m using different cascade setup, now the transferring source is in brush mode, seems to work better like this. pouring.zip (123 KB)
Thanks for the nightly build access, several simulations later here is an update to my case:
- At first I tried a very high SPF increase to 128. It made things a lot worse, the liquid mass raised so quickly, it shot out of the second container like a small volcano.
- For testing purposes of my machine I rebuilt your scene completely from scratch and it simulated just the same, so at least no installation oddities as it seems.
- I merged my geometry into your scene. My objects came in a lot smaller than yours. I am not sure anymore if this was just a result of fiddling with the system units or they were smaller all the time. Anyway, I made everything bigger to fit your objects.
- I could not use the penetrating fill technique, because of all the cells stuck in the wall and having to render transparent glass, so I made the emitter smaller. This lead to vanishing cells. They did not drop out anywhere, they just disappeared downward, at the time of the rotation it was nothing left to pour out. This was fixed by switching back to classic.
- Then I fiddled around with all the settings to get the viscosity I was after. Some settings basically worked, some don’t, some had new strange problems, where the fluid did not stop to pour out from the upper container, like a stuck cell producing new cells all the time - I can’t recall them all. Eventually I came up with a sim I could use for the intended shot.
- The only problem left were some visible grid steps along the round glass walls. So I made only the cells smaller, simulated again - and got again a volume increase of about twice the amount of the further simulation and the viscosity got a little more fluid. Frankly, this is driving me crazy. Change one value and you have to start from scratch for all the others, and with more cells to simulate this becomes even more tedious. It is a pity there is no absolute interpretation of a value, e.g. viscosity of 1 can be anything, like very fluid freshly melted chocolate or a slug, all being relative to other values. Therefore I often did not know, which value to change first to get a behaviour in this or that direction.
To deliver on time I surrendered. I got away with highly mesh-smoothed sim keeping the bigger cells, but I am not really satisfied. Whenever there is the next project with fluids, I will have to calculate way more sim and testing time… And maybe you can do some magic to make volume preservance more easy or at least find a solid guideline to work around.
And by the way, why did you block the option in the nightly build to start a simulation via script? This was quite handy to automatically start the sim of the second container, after the first one finished. Now I had to stay in front of the computer and wait for it to not lose sim time. An overnight sim of the whole cascade would not be possible anymore. So please bring this feature back.
Thanks for all your help, maybe you still have some tipps, what could have went wrong, I would still be interested in that!
Bob
The only problem left were some visible grid steps along the round glass walls. So I made only the cells smaller,
and
I could not use the penetrating fill technique, because of all the cells stuck in the wall and having to render transparent glass,
this problem is very common and is described here . the solution is described in the help (use gizmo), just to add that by default the liquids are rendered with the mesh option, that does not support gizmo yet, and you have to replace it with a standard max boolean operator.
the beer sample scene (see in your documents/phoenix fd/samples folder) uses gizmo to render the glass.
i strongly recommend to use FT in your case, beacuse it has no problems with the liquid quantity. can you post simple animation of these vanishing cells that made you to use classic advection?