Quantcast
Viewing latest article 17
Browse Latest Browse All 257

Animating Rayleigh-Taylor Instability in SideFX Houdini


The Rayleigh-Taylor instability is the instability between two fluids of different densities. It can appear as "fingers" of a denser liquid dropping into a less dense liquid or as a mushroom cloud in an explosion.

The phenomenon "comes for free" in SideFX Houdini FLIP Fluids. By simply creating a box, converting that to a FLIP fluid object and using groups to assign a lower density to the particles in the top half, it's easy to create an effect like this:



However, I wondered what would happen if rather than using the default linear gravity, I created concentric spheres of fluids of different densities and made the fluids subject to a radial gravity force (see Houdini FLIP Fluid and Radial Gravity).

Set up was pretty simple: for the fluid source, I created two spheres (an inner and outer). A Cookie node subtracts the inner from the outer so that I have a proper core and shell. Both of those geometries are converted to points and assigned to groups. Attribute Wrangle nodes define the densities - in my case the inner points have a density of 1 and the outer points have a density of 1.25.


I added a Blast node to the automatically generated fluid surface geometry node (so that only the inner fluid is rendered) and my radial gravity code in a POP Wrangle in the DOP Network. I tweaked the VEX a little so that it would consider density:
float mass = 100;
vector origin = {0, 0, 0};
float dist = max(distance(v@P, origin), 0.001);
float gravityStrength = (mass + @density) / pow(dist, 2.0);
vector gravity = (origin - v@P) * gravityStrength;
@force += gravity;
The final result, shown in the video above, is a fluid expanding into an invisible surrounding liquid of a greater density. Quite a nice effect with very little work! 




Viewing latest article 17
Browse Latest Browse All 257

Trending Articles