Simulation of Fluids Masters Thesis Alexander J. Kaminski N.C.C.A BOURNEMOUTH UNIVERSITY September 2005 Alexander J. Kamiński Simulation of Fluids 1 Contents List of Symbols .............................................................................................................. 3 1. Introduction ................................................................................................................ 4 2. Previous Work ........................................................................................................... 4 3. Fluid ........................................................................................................................... 5 3.1 Density ................................................................................................................. 5 3.2 Viscosity .............................................................................................................. 5 3.3 Compressible and Incompressible Flow .............................................................. 6 4. Fluid Dynamics Background ..................................................................................... 7 4.1 Navier-Stokes Equations ...................................................................................... 7 4.1.1 Advection ...................................................................................................... 7 4.1.2 Diffusion ....................................................................................................... 8 4.1.3 Pressure ......................................................................................................... 8 4.1.4 External Forces ............................................................................................. 8 5. Fluid Simulator .......................................................................................................... 9 5.1 MAC Grid ............................................................................................................ 9 5.2 Finite Differences............................................................................................... 10 5.3 MAC Method ..................................................................................................... 11 5.3.1 Simulation Algorithm ................................................................................. 11 5.3.1.1 Calculate Time Step ................................................................................. 11 5.3.1.2 Moving Particles ...................................................................................... 12 5.3.1.3 Identify Empty and Filled Voxels ............................................................ 12 5.3.1.4 Boundary Slip and Continuity Conditions ............................................... 12 5.3.1.4.1 No-Slip Boundary Conditions............................................................... 12 5.3.1.4.2 Slip Boundary Conditions ..................................................................... 13 5.3.1.4.3 Continuity Conditions ........................................................................... 13 5.3.1.5 Solving the Navier-Stokes Equations ...................................................... 13 5.3.2 Pressure Projection Step ............................................................................. 13 5.4 Solving a System of Linear Equations ............................................................... 14 5.4.1 Setting up Matrices ..................................................................................... 14 6. Implementation Issues ............................................................................................. 14 7. Conclusion ............................................................................................................... 17 8. References ................................................................................................................ 18 Alexander J. Kamiński Simulation of Fluids 2 List of Symbols A Matrix of size N x N b Array of known values f body forces as a whole f=(f,g,h) f body force in the x direction g body force in the y direction h body force in the z direction n the outward normal of the surface N number of fluid filled voxels within the computational domain p pressure u velocity u=(u,v,w), in metres per second u u component of velocity u v u component of best guess velocity v w v component of best guess velocity w x w component of best guess velocity v component of velocity w component of velocity array of unkown values in the linear system ∆t Dx time step width of the voxel gradient operator divergence operator ² Laplacian opertator Alexander J. Kamiński viscosity density Simulation of Fluids 3 1. Introduction The modelling of natural phenomena remains a taxing problem in the visual effects community and attracts a vast amount of research. Natural looking animation of “fluid-like” behaviour e.g. smoke, liquid and fire is highly desirable and difficult to produce. Arguably the most demanding of these is to produce is realistic liquid animation. This is a great challenge in computer graphics due to the complex dynamics of flows. This increasing need for fluid dynamics in film and computer game productions has made many researchers motivated to extensively examine computational fluid dynamics (CFD). This thesis describes the theory and methods behind implementing a stable fluid simulator that is able to handle varying levels of viscosity. By being able to handle varying levels of viscosity the simulator should be able to represent fluids from water to honey. 2. Previous Work Animation of fluids is approached in a number of ways in the computer graphics literature. The term “fluids” is used to encompass the motion of gases such as air (including simulating smoke), and liquids such as water. Several graphics researchers studied the large-scale motion of water in waves [FOU86]. These methods use elevation maps of the terrain underneath the water, and the line of waves is bent according to the variations in wave speed that the elevation profile induces. The simulation of breaking waves occurs at a particular sea floor elevation and wave velocity. The MAC method developed by Harlow and Welch [HAR65] provided a technique that allowed the Navier-Stokes equations to be applied and this approach was first used by Nick Foster [FOS96] for use within computer graphics. Foster produced very realistic results while being very computationally expensive. Most recently, Smoothed Particle Hydronamics have been used to so that there is no need for a computational domain for which to compute the Navier-Stokes equations on but rather momentum equations are directly applied particles that have a mass and interact with each other. Alexander J. Kamiński Simulation of Fluids 4 3. Fluid 3.1 Density The density of a fluid, r , is the mass of the fluid per unit volume and depends on both the temperature and pressure of the material. Table 3.1 lists the densities for common fluids at constant temperature and pressure values. Density (kg/m3) Fluid Hydrogen Helium Air Carbon Dioxide Gasoline Water Mercury 0.0899 0.1785 1.293 1.977 680 998.2 13600 Table 3.1 – Densities of common Fluids The gasses are roughly 1000 times denser than the liquids. 3.2 Viscosity Viscosity, n , is the resistance a fluid has to change in form and can be thought of as internal friction. It is also perceived as the “thickness”, or resistance to pouring. With this in mind, water is considered “thin”, having a low viscosity, whereas olive oil would be considered to be “thick”. Table 3.2 lists some common fluids and their viscosities at a constant room temperature (20°c). Fluid Hydrogen Air Water Whole Milk Olive Oil Honey Peanut Butter Window Putty Viscosity (centipoises) 0.0086 0.0182 1.002 2.12 84.0 10,000 250,000 100,000,000 Table 3.2 – Viscosities of common Fluids Alexander J. Kamiński Simulation of Fluids 5 3.3 Compressible and Incompressible Flow All fluids are to some degree compressible which means that the density of the fluid will change with applied pressure. However, liquids are extremely hard to compress and in the computational fluid dynamics world they are usually always held to be incompressible, whereas gases are easily to compressible. The density of liquids is therefore assumed to be constant everywhere ( ≡ c), which would therefore assure incompressibility. A sufficient condition for incompressibility is: ¶r ¶t + (u · Ñ )r = 0 (1) This condition states that flow can have variable density as long as it constant along streamlines. Alexander J. Kamiński Simulation of Fluids 6 4. Fluid Dynamics Background 4.1 Navier-Stokes Equations In the following discussion, u represents the velocity field. The p parameter represents the scalar pressure field and r represents the density of the fluid. The n parameter is used to represent the fluids kinematic viscosity. All the current techniques to simulate the motion for a viscous incompressible fluid use the Navier-Stokes equations (shown below). These two equations are concerned with the conservation of mass and conservation of momentum within the fluid. Ñ· u ut = - (u · Ñ )u + nÑ 2 - (2) 1 Ñp + f r (3) The first of the equations handles the conservation of mass within the fluid by stating that the velocity field has zero divergence everywhere. This simply means that in any small region of fluid, the amount of fluid entering the region is exactly equal to the amount leaving the region. In reality however, no fluid is ever really incompressible, but incompressibility is assumed for fluids moving at low speeds because their compression is negligible and the incompressibility allows for a convenient solution for the pressure. The second equation describes the conservation of momentum, and has several components. Reading from left to right, it states that the instantaneous change in velocity of the fluid at a given position is the sum of four terms: advection, diffusion, pressure, and body forces. The vector field ut is the time derivative of the fluid velocity. The Navier-Stokes equations rely heavily on the use of partial differentials, which is represented by the “del” operator, Ñ . When this operator is applied to a scalar value such as p a vector is created, and in this case the vector produced is known as the gradient of p Ñ p = ( px, py, pz ) (4) When the operator is applied to a vector as it is in the divergence equation (2) a scalar result is produced. Ñ · u = u x + v y + wz (5) The Laplacian operator, Ñ , is a scalar differential equation and is used as part of the viscous diffusion equation (EQUATION). The Laplacian operator on a scalar u is: 2 Ñ · (Ñ 2u) = Ñ 2u = uxx + u yy + uzz (6) 4.1.1 Advection Alexander J. Kamiński Simulation of Fluids 7 The advection term of the Navier-Stokes equation is, shown in equation 8, handles the transportation of objects, densities and accounts for the direction in which the surrounding fluid pushes a small region of fluid. This term represents the self-advection of the velocity field. Fast river water is an advection-dominated flow, and any small amount of water poured into the river will quickly be swept away with the current. - (u · Ñ )u (7) 4.1.2 Diffusion The momentum diffusion term describes how quickly the fluid damps out variation in the velocity surrounding a given point. For example, maple syrup flows slowly when poured due to the higher viscosity, whereas water flows quickly when poured due to the lower viscosity. The higher the viscosity value, the faster the velocity variations are damped nÑ 2u (8) 4.1.3 Pressure The third term is the pressure gradient, and it describes how a small parcel of fluid is pushed in a direction from high to low pressure. Since fluids molecules have the ability to freely move around each other they tend to “squish” and “slosh”. When a force is applied to a fluid, it does not instantly propagate through the entire volume. Instead, the molecules closer to the source of the force push on those further away, and pressure builds up. As pressure is a force per unit area, any pressure in the fluid naturally leads to acceleration. This coincides with Newton’s second law; F = ma . 1 r Ñp (9) 4.1.4 External Forces The last term in the Navier-Stokes equation (3) defines the acceleration due to the external forces applied to the fluid. The forces that act upon the fluid may be either classed as ‘body forces’ or ‘local forces’. Body forces are forces that will affect the fluid as a whole, such as gravity, whereas the local forces are forces that are only applied to a certain region of the fluid. An example of this would be the force of a fan blowing air. Alexander J. Kamiński Simulation of Fluids 8 5. Fluid Simulator In order for a computer to solve the Navier-Stokes equations, they must be broken down into simple smaller steps. A discrete domain must then be chosen to as a basis for solving these steps. A discrete computational domain, commonly known as a MAC grid, and a numerical technique known as finite differences, are used to break the Navier-Stokes equations into small pieces that the computer can solve. This method is based on a fixed, Eulerian grid of control volumes. Foster and Metaxis [FOS96] were the first to attempt to solve the Navier-Stokes equations in 3D computer graphics. In their papers they demonstrate how the Marker-And-Cell (MAC) approach of Harlow and Welch [HAR65] can be used to animate water and be modified to control the behaviour of animated fluids. This method demonstrated a new approach and that representing a liquid is no longer constrained to be a height field. The approach taken by Foster and Metaxis [FOS96] has continued to be the favourite choice when attempting to simulate fluids within computer graphics community. 5.1 MAC Grid The Marker-and-Cell (MAC) grid method was first developed by Harlow and Welch [HAR65] and is made up of uniformly sized cells or voxels (figure 5.1). Each voxel is a cube with sides of length D x . Figure 5.1 A voxel located at i,j,k There are two types of variable can be stored in one voxel – a scalar value, or a vector value. The scalar values are stored at the centre of the voxel and are sometimes referred to as the Alexander J. Kamiński Simulation of Fluids 9 cell nodes. The vector values are stored in a staggered grid formation, in which the x component of the vector is stored at the left face of the cube, the y component is stored at the bottom face of the cube, and the z component is stored at the back face of the cube. These face values are sometimes referred to as face nodes. Normally a voxel records two variables: the pressure and the velocity. The scalar pressure ρ is calculated and stored at the cell node, and the vector valued velocity u = ( u , v, w ) is stored as separate components at the appropriate face nodes. A single cell at location i,j,k is shown above in figure 5.1. The fluid volume is tracked within the grid by a set of marker particles that move with the velocity field, but have no volume, mass or other properties. The surfaces are simply the boundaries of the volumes, and in this sense surfaces may appear, merge or disappear. The grid voxels containing markers are considered occupied by fluid, while those without markers are empty. A free surface is defined to exist in any grid cell that contains particles and that also has at least one neighbouring grid cell that is empty. The location and orientation of the surface within the cell was not part of the original MAC method. The computational grid that is used with the MAC method uses the dimensions I x J x K, and the grid is indexed with the integers i Î [0, I - 1] , j Î [0, J - 1] , k Î [0, K - 1] the voxels positioned at on the outer edges of the grid are considered to be boundary voxels, therefore, fluid can only exist where 1 £ i £ I - 2,1 £ j £ J - 2 and 1 £ k £ K - 2 . 5.2 Finite Differences In order to solve the continuous partial differential equations on the discrete computational domain the finite difference method must be used. Other methods such as finite volumes and finite elements could be used, but these are more complex and less effective for a regular grid. Finite differences use the Taylor series [RAS04] to approximate the derivatives and the accuracy of approximations is measured in the number of terms that the Taylor series is expanded to. If the first term is used then the accuracy is first order. The following finite difference equations are first order accurate. The finite difference version of the divergence equation (2), of the velocity at the voxel i, j , k is the scalar: (Ñ · u)i , j ,k = ui+ 1, j ,k - ui , j ,k + vi , j+ 1,k - vi , j ,k + wi , j ,k + 1 - wi , j ,k Dx (10) This result is stored at the cell node. The finite difference version of the pressure gradient, equation 9, at voxel i, j , k is: æp - pi- 1, j ,k pi , j ,k - pi , j- 1,k pi , j ,k - pi , j ,k- 1 ö ÷ ÷ (Ñ p)i , j ,k = çç i , j ,k , , ÷ çè ÷ Dx Dx Dx ø (11) This is solved for each face node. The finite difference equation in the Navier-Stokes equation that is second order accurate is the Laplacian operator (equation 12). The finite version of this for voxel at i, j , k is: Ñ 2ui , j ,k = ui- 1, j ,k + ui , j- 1,k + ui , j ,k- 1 - 6ui , j ,k + ui+ 1, j ,k + ui , j+ 1,k + ui, j ,k + 1 Alexander J. Kamiński D x2 Simulation of Fluids (12) 10 5.3 MAC Method The MAC method has two major components: the voxels (previously described) and a large collection of marker particles that are used to carry velocities to previously empty voxels. Evolution of surfaces is computed by moving the marker particles with locally interpolated fluid velocities. Special treatments are used to define the fluid properties in newly filled grid cells and to cancel values in cells that are emptied. 5.3.1 Simulation Algorithm The method that will be used for the fluid simulation is a combination of the simulator defined by Nick Foster [FOS96] and the simulator defined by Mark Carlson [CAR04]. Foster implemented a solid fluid simulator that while being computationally expensive provided very realistic results. Carlson’s fluid simulator also is computationally expensive but allows for varying levels of viscosity unlike the simulator defined by Foster. Therefore, a combination of these designs will be used for the proposed simulator. One time-step in a fluid dynamic simulation using the MAC method is calculated in several stages: 1. An appropriate time-step, D t , size is chosen. 2. The marker particles are moved according to the current velocity field, u. 3. Each voxel is marked as being fluid-filled or empty according to whether a given voxel contains marker particles. The velocities are then set for previously empty voxels that now contain fluid. 4. Boundary conditions are set for all the solid obstacles and voxel faces that are empty on one side and have fluid on the other. 5. The velocity, u, values in the fluid-filled voxels are updated based on the NavierStokes equations. [CAR04] 5.3.1.1 Calculate Time Step Foster states [FOS96] that to be consistent with a true solution a restriction known as the Courant-Friedrichs-Lewy (CFL) condition (13) must be enforced. The CFL restriction states that the time-step must be small enough to make sure each marker particle does not travel more than one voxel cell at any one time. Dt Dx max(| u |,| v |,| w |) The Navier-Stokes momentum equation (3) also imposes another restriction on constant viscosity diffusion equation: nÑ 2u Alexander J. Kamiński Simulation of Fluids (13) D t by the (14) 11 The stability restriction is: D x2 6n Dt (15) 5.3.1.2 Moving Particles The marker particles in the system are moved forward with an explicit second order RungeKutta technique known as the modified Euler or midpoint method as described by Carlson [CAR04]. Assume that a particle starts at location x = ( x, y , z ) and is updated in two steps: step 1: x n+ 1 2 = xn + D tu(xn ) (16) step 2: x n+ 1 = x n + 1 n+ Dt [u(x n ) + u(x 2 )] 2 If this term makes a particle move into an empty voxel then the 2 nd step is not taken because reliable velocities are not available outside the fluid cells. The second order technique is used as it is the highest order that can be achieved when using linear interpolation. 5.3.1.3 Identify Empty and Filled Voxels Once the marker particles are moved successfully, they are used to identify which voxels are fluid-filled. If a previously empty voxel contains a particle the velocities for that voxel must be set. The velocities are set by using the marker particles within a face’s region. The region of a face is defined as size D x centred from the face (figure 5.1). 5.3.1.4 Boundary Slip and Continuity Conditions The boundary conditions affect how the fluid will react when in contact with the boundary itself. Without the boundary conditions the fluid would simply flow through walls and obstacles and cause a simulation failure. The conditions known as ‘no slip’ and ‘free slip’ boundary condition are defined the same throughout all CFD literature. 5.3.1.4.1 No-Slip Boundary Conditions At a no-slip boundary, there is no fluid motion relative to the boundary. For a stationary boundary, the fluid velocity should vanish, i.e. vn = 0, vt = 0 Alexander J. Kamiński Simulation of Fluids (17) 12 5.3.1.4.2 Slip Boundary Conditions At a free-slip boundary, there is no flow through the boundary, but there can be fluid motion tangential to the boundary: vn = 0, Where ¶ vt = 0 ¶n (18) ¶ denotes the derivative with respect to the normal vn direction. ¶n 5.3.1.4.3 Continuity Conditions When a voxel contains at least one marker particle it becomes filled. In the case of a filled voxel neighbouring an empty voxel it becomes a surface cell and the face between the empty and filled voxel become surface faces. This means that the surface cell contains an outer layer of marker particles that represent the fluids volume boundary. In a three-dimensional voxel grid there are 63 possible combinations of surface faces and the velocities for these surface faces are set using continuity conditions. For information how each of these combinations is set the reader is referred to Mark Carlson’s thesis [CAR04]. 5.3.1.5 Solving the Navier-Stokes Equations The solving the Navier-Stokes equation is calculated in two major steps while enforcing incompressibility. The first step is to describe the forward Euler solution to a best guess velocity, u. The equation for the best guess velocity with a constant viscosity is: u = u + D t[- (u · Ñ )u + nÑ 2u + f ] (19) Solving this equation for all the fluid faces (fluid on both sides of the face) within the MAC grid gives the best guess velocity. There is no pressure term in the best guess velocity as this is harder to solve. 5.3.2 Pressure Projection Step Solving the pressure term and combining the result with the best guess velocity will result in new the final velocity, u , and will be divergence free so that incompressibility is sustained. The solving of pressure is known as the pressure projection step and was first used by Chorin [CAR04]. Since the pressure term (9) was left out of the best guess velocity it must be accounted for in the final velocity, as shown in equation 20. u new = u - Dt Ñp r (20) To solve the pressure a system of linear equations must be used. Alexander J. Kamiński Simulation of Fluids 13 5.4 Solving a System of Linear Equations 5.4.1 Setting up Matrices In order to solve the pressure for each of the fluid filled voxels, N , within the MAC grid a linear system in a matrix form must be built. The notation for this system will is defined as: Ax = b (21) In this linear system, A is an N x N matrix where each row represents an equation; x is a column vector of size N with an entry for each of the unknowns, and b is a column vector of size N that represents the known values. A pressure must be found for each of the fluid filled voxels. To recast equation 21, for use in a linear system: A º - D x 2Ñ 2 (22) xº p (23) D x 2r Ñ · u bº Dt (24) The equation 24 for b that solves the each of the known values is straightforward to solve as all of the velocities have been already set with the best guest and the continuity conditions for all surface faces. However, the equations 22 and 23 are much harder to solve and require the use of a conjugate gradient (CG). For further information the reader is referred to 6. Implementation Issues For the implementation of the proposed simulator C++ and OpenGL will be used to program and represent the simulator. However, the final rendering of the images will be in Renderman. A file will be produced that will identify where all the marker particles are at any one frame. This file will then be used by Jamie Briens and the proposed simulation will be used as a means of representing his implicit surfaces. Figure 6.1 shows how the MAC grid is initially setup in the simulator. The blue faces are used to represent the boundary faces and all other faces are considered to be open and will let fluid freely pass through the face. The green particles are used to represent the marker particles within the simulator so that they could be visualised at each step of the simulation. Alexander J. Kamiński Simulation of Fluids 14 Figure 6.1 MAC Grid represented by the simulator Figure 6.2 shows the simulation at the first time step. The red faces are used so to represent the surface faces within the computational domain. Therefore, if a voxel has at least one surface face then it is considered to be a surface cell and the marker particles it contains should be used to represent the boundaries of the fluid domain. The velocities for all the red faces in the simulation use the continuity conditions to solve them. The pink faces shown in figure 6.2 are used to represent fluid faces, which are faces that have fluid voxels on both sides of it. The velocities at all fluid faces in the domain are solved using the Navier-Stokes equations. Alexander J. Kamiński Simulation of Fluids 15 Figure 6.2: Initial Fluid setup Figure 6.3 shows the simulation at frame 35. Note how the fluid is sliding correctly up the wall on the left boundary, whereas, the right hand side boundary is causing errors and the fluid appears to stick to the boundary. Figure 6.3: Example of the moving fluid within the Simulator Alexander J. Kamiński Simulation of Fluids 16 7. Conclusion In conclusion, the simulator is considered to be a success. The fluid motion is realistic and varying levels of viscosity are able to be simulated from “thicker” fluids such as honey to “thinner” fluids such as alcohol. Despite the simulator being a success one major known issue exists. There is a problem with the boundary slip conditions when the fluid reaches the max bounds of the computational domain in the I, J and K direction. The liquid on contact with these boundaries will either appear to “stick” to the boundary or simply move through it. This error has greatly affected the fluid motion when “splashing” back. However, even though this fault is considered to be a major error, its correction is believed it to be easily solved and has only been not rectified due to time constraints. The figure below is a final rendered shot using Jamie Brien’s implicit surfaces on the marker particles. The initial fluid started off at opposite ends of the domain and was sent towards each other so that a crashing effect could be demonstrated. Figure 7.1 Rendered Image of Fluid Motion Alexander J. Kamiński Simulation of Fluids 17 8. References [HAR65] [FOS01] HARLOW, F.H. and WELCH, J.E., "Numerical Calculation of TimeDependent Viscous Incompressible Flow," Phys. Fluids 8, 2182. 1965. FOSTER, N. and FEDKIW, R. Practical animation of liquids. In Proceedings of ACM SIGGRAPH 2001, Computer Graphics Proceedings, Annual Conference Series, pages 23{30. ACM Press / ACM SIGGRAPH, August 2001. [FOS96] FOSTER, N. and METAXAS, D. Realistic animation of liquids. In Graphics Interface '96, pages 204{212, May 1996. ISBN 0-9695338-5-3. [FOS97] FOSTER, N. and METAXAS, D. Controlling fluid animation. In Proceedings of Computer Graphics International '97, pages 178{188, June 1997. [FOS97] FOSTER, N. and METAXAS, D. Modelling the motion of hot, turbulent gas. In SIGGRAPH 97 Conference Proceedings, Annual Conference Series, pages 181{188. Addison Wesley, August 1997. [FOU86] FOURNIER, A and REEVES W, T. A simple model of ocean waves. In Computer Graphics (SIGGRAPH '86 Proceedings), volume 20, pages 75{84, August 1986. [PRE03] PREMOE, S., TASDIZEN, T., BIGLER, J., LEFOHN, A., and WHITAKER, R. T., “Particle-based simulation of fluids,” Computer Graphics Forum, vol. 22, pp. 401–411, Sept. 2003. [RAS03] RASMUSSEN, N., N. D. G. W. and FEDKIW, R., “Smoke simulation for large scale phenomena,”ACM Transactions on Graphics, vol. 22, pp. 703–707, July 2003. [RAS04] RASMUSSEN, N., ENRIGHT, D., NGUYEN, D., MARINO, S., SUMNER, N., GEIGER, W.,HOON, S., and FEDKIW, R., “Directable photorealistic liquids,” in Eurographics/ACM SIGGRAPH Symposium on Computer Animation, p. in press, Aug. 2004. [REY87] REYNOLDS, C. W., “Flocks, herds, and schools: A distributed behavioural model,” vol. 21,pp. 25–34, July 1987. [SAA03] SAAD, Y., Iterative Methods for Sparse Linear Systems. Philadelphia: SIAM, 2nd ed., 2003. [SET99] SETHIAN, J., Level Sets Methods and Fast Marching Methods. Cambridge University Press, 2nd ed., 1999. [SET96] SETHIAN, J., “A fast marching level set method for monotonically advancing fronts,” Proceedings of the National Academy of Sciences, vol. 93, pp. 1591– 1595, 1996. [SHA04] SHAH, M., COHEN, J. M., PATEL, S., LEE, P., and PIGHIN, F., “Extended galilean invariance for adaptive fluid simulation,” in Eurographics/ACM SIGGRAPH Symposium on Computer Animation, p. in press, Aug. 2004. [SHI02] SHI, L. and YU, Y., “Visual smoke simulation with adaptive octree refinement,” Tech. Rep.UIUCDCS-R-2002-2311, University of Illinois at Urbana-Champaign, Dec. 2002. Alexander J. Kamiński Simulation of Fluids 18 [SIN03] SINGH, P., HESLA, T. I., and JOSEPH, D. D., “Distributed Lagrange multiplier method for particulate flows with collisions,” International Journal of Multiphase Flow, vol. 29, pp. 495–509, Mar. 2003.101 [STA99] STAM, J., “Stable fluids,” in Proceedings of SIGGRAPH 99, Computer Graphics Proceedings, Annual Conference Series, pp. 121–128, Aug. 1999. [STA00] STAM, J., “Interacting with smoke and fire in real time,” Communications of the ACM, vol. 43, no. 7, pp. 76–83, 2000. [STA01] STAM, J., “A simple fluid solver based on the fft,” Journal of Graphics Tools, vol. 6, no. 2, pp. 43–52, 2001. [STA03] STAM, J., “Real-time fluid dynamics for games,” in Proceedings of the Game Developer Conference, Mar. 2003. Alexander J. Kamiński Simulation of Fluids 19