Fluid Buoyancy


#1

Im working on a fluid sim where i need to create a dry-ice sort of smoke. Id like to be able to somehow base the fluids buoyancy on its heat or temperature, so that the fluid starts out very buoyant, but as it gets cooler, the buoyancy becomes negative and it begins to fall. Does anyone know of a way to do this, possibly with an expression on the fluids buoyancy? or is there some other way to control this? Ive tried keying the buoyancy, but that doesnot work because i still need the fuid thats being emitted to rise…


#2

Did you try ramming a Y ramp into the buoyancy? Or maybe you can set the buoyancy or speed with setFluidAttr?


#3

I was able to get a very nice result simply by emitting a little more heat and adjusting the temperatures buoyancy to be negative of the fluids buoyancy.
Im still curious if there is a way to ramp fluid attributes on an axis, or based on other fluid attributes. Ive tried plugging ramps into fluid attributes, but the fluid values stay constant. I guess what im looking for is sort of a per voxel attribute like a per particle attribute… Does anyone know if there is a way to access this ‘pervoxel’ information or to control it?..Duncan maybe?


#4

As you discovered one way to have buoyancy go from positive to negative is to have a negative density buoyancy and a larger positive temperature buoyancy with a high temperature dissipation. As the temperature dissipates the density buoyancy takes over.

You can modify the fluid grid values using expressions where you set individual voxel values. Check out the following mel commands:
fluidVoxelInfo
getFluidAttr
setFluidAttr

You can’t set values like “buoyancy” per voxel, however you can read the density/temperature, etc and modify the velocity values based on this, in essence coding your own buoyancy effects. In theory you could write your own fluids solver totally in mel( it would be a bit slow for something like a full blown navier stokes solver, however).

Duncan


#5

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.