![]() Because our simulation grids are stored in textures, this speed and parallelism is just what we need. They are also optimized to perform multiple texture lookups per cycle. GPUs achieve high performance through parallelism: they are capable of processing multiple vertices and pixels simultaneously. Programmable GPUs are optimized for performing computations on pixels, which we can consider to be a grid of cells. The simulation we describe is performed on a grid of cells. However, while Stam's simulations used a CPU implementation, we choose to implement ours on graphics hardware because GPUs are well suited to the type of computations required by fluid simulation. The techniques we describe are based on the "stable fluids" method of Stam 1999. If you have ever implemented any sort of physical simulation, such as projectile motion or rigid body dynamics, many of the concepts we use will be familiar. Also, experience with finite difference approximations of derivatives is useful. An understanding of vector calculus principles is helpful, but not required (we will review what we need). The reader is expected to have at least a college-level calculus background, including a basic grasp of differential equations. Wherever possible, we provide clear explanations and draw connections between the math and its implementation. As a result, this chapter contains many potentially daunting equations. For this reason, we did not skimp on the mathematics here. Without understanding the basic physics and mathematics of fluids, using and extending the algorithms we present would be very difficult. Fluid dynamics is such a useful component of more complex simulations that treating it as a black box would be a mistake. Our goal is to assist you in learning a powerful tool, not just to teach you a new trick. Using an NVIDIA GeForce FX, we have achieved a speedup of up to six times over an equivalent CPU simulation. Because of the large amount of parallelism in graphics hardware, the simulation we describe runs significantly faster on the GPU than on the CPU. Figure 38-1 shows examples of fluids simulated using the source code provided with this book.įigure 38-1 Colored "Dye" Carried by a Swirling Fluidįluid simulation is a useful building block that is the basis for simulating a variety of natural phenomena. All are phenomena that we would like to portray realistically in interactive graphics applications. Underlying all of them is the flow of fluids. 38.1 Introductionįluids are everywhere: water passing between riverbanks, smoke curling from a glowing cigarette, steam rushing from a teapot, water vapor forming into clouds, and paint being mixed in a can. The source code accompanying this book demonstrates the techniques described in this chapter. After reading this chapter, you should have a basic understanding of fluid dynamics and know how to simulate fluids using the GPU. It introduces fluid dynamics and the associated mathematics, and it describes in detail the techniques to perform the simulation on the GPU. This chapter describes a method for fast, stable fluid simulation that runs entirely on the GPU. University of North Carolina at Chapel Hill Fast Fluid Dynamics Simulation on the GPU The CD content, including demos and content, is available on the web and for download.Ĭhapter 38. You can purchase a beautifully printed version of this book, and others in the series, at a 30% discount courtesy of InformIT and Addison-Wesley. It does not store any personal data.GPU Gems GPU Gems is now available, right here, online. The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. The cookie is used to store the user consent for the cookies in the category "Performance". This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. Necessary cookies are absolutely essential for the website to function properly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |