This blog will serve as record keeping for work using NVidia's CUDA technology to simulate fluid effects including: water, smoke and fire.
Numerous resources have been helpful in grasping CUDA concepts located at:
[1]http://developer.nvidia.com/object/gpucomputing.html
Two chapters from GPU Gems 1 & 3 have been the most helpful for this application:
[2]http://http.developer.nvidia.com/GPUGems/gpugems_ch38.html - this chapter deals with creating a grid based Navier-Stokes equation solver that writes data to textures for fluid simulation and extensions for cloud or smoke simulation
[3]http://http.developer.nvidia.com/GPUGems3/gpugems3_ch30.html - this chapter outlines a more dynamic and complex approach to render different types of 3D fluids
The classic method of solving fluids is by using either a 2D or 3D Navier-Stokes equation solver:
where p is the pressure, r is the mass density, f represents any external forces (such as gravity), and is the gradient differential operator [3]
In short, solving for the velocity u at positions within a grid can be used to simulate different types of fluid based on the other parameters.
No comments:
Post a Comment