13.07.2015 Views

Controlling Fluid Simulations with Custom Fields in Houdini Master ...

Controlling Fluid Simulations with Custom Fields in Houdini Master ...

Controlling Fluid Simulations with Custom Fields in Houdini Master ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

dur<strong>in</strong>g the advection term. It has the eect of un<strong>in</strong>tentionally add<strong>in</strong>g viscousbehavior to the uid, which can damp down some of the <strong>in</strong>tricate turbulentbehavior seen <strong>in</strong> natural smoke and re[13]. In [8] a method is described fordetect<strong>in</strong>g the vorticity and add<strong>in</strong>g the rotational forces back <strong>in</strong>. Each smallpiece of vorticity can be thought of as a paddle wheel try<strong>in</strong>g to sp<strong>in</strong> the oweld <strong>in</strong> a particular direction. Articial numerical dissipation damps out theeect of these paddle wheels and the key idea is to simply add it back.The vorticity connement calculation is a good example <strong>in</strong> Houd<strong>in</strong>i of howsome of the microsolvers and elds can be used together. A Vortex Connementmicrosolver exists, but it is really a digital asset made out of smallermicrosolvers.These are the steps that are executed <strong>with</strong><strong>in</strong> the Vortex Connement microsolverand the accompany<strong>in</strong>g node tree can be seen <strong>in</strong> Figure (9):1. Create the elds for temporary results: curl (vector), curl magnitude(scalar) and vortex direction (vector) us<strong>in</strong>g Gas Match Field microsolvers.2. Calculate the curl of the velocity eld <strong>with</strong> a Gas Analysis microsolverand store the result <strong>in</strong> the curl eld.3. Calculate the length of the curl eld and store it <strong>in</strong> the curl magnitudeeld us<strong>in</strong>g a Gas Analysis microsolver.4. Calculate the gradient of the curl magnitude eld and store it <strong>in</strong> the vortexdirection eld us<strong>in</strong>g a Gas Analysis microsolver.5. Normalize the vortex direction eld us<strong>in</strong>g a Gas Analysis microsolver.6. Calculate the cross product between the vortex direction eld and the curleld <strong>with</strong> a Gas Cross microsolver and store the result back <strong>in</strong> the vortexdirection eld.7. Multiply the vortex direction eld by a scalar to <strong>in</strong>crease the amount ofconnement us<strong>in</strong>g a Gas Calculate microsolver.8. Multiply the vortex direction eld by a connement eld to <strong>in</strong>crease theamount of connement only at specic location <strong>with</strong><strong>in</strong> the eld us<strong>in</strong>g aGas Calculate.9. Update the velocity by add<strong>in</strong>g the vortex direction eld to it us<strong>in</strong>g a GasCalculate microsolver.10. Clear the temporary elds by copy<strong>in</strong>g 0 <strong>in</strong>to them us<strong>in</strong>g a Gas Calculatemicrosolver.From the above steps it becomes clear that the Gas Calculate, the Gas Analysisand the Gas Match Field are very useful microsolvers, and will come back allthe time. They are some of the mathematical build<strong>in</strong>g blocks to build morecomplex operations. While develop<strong>in</strong>g these operations the visualization of theresult<strong>in</strong>g steps can be very helpful as shown <strong>in</strong> Figure (10).16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!