Constraint based particle fluids on GPGPU
2011 (English)Conference paper, Abstract (Other academic)
We present a fluid simulation method adapted for stream parallelism on general purpose graphics processingunits (GPGPU). In this method the equations of Navier and Stokes are discretized using particles and kernelfunctions as in Smoothed Particle Hydrodynamics (SPH), but rather than using penalty methods or solving for a divergence free velocity field, incompressibility is enforced using holonomic kinematic constraints . We useone constraint for each smoothed particle stating that the local density should be kept constant. Other constraintsare used for boundary conditions and multiphysics coupling. We also present a viscosity model in which theshear rate at each pseudo particle is constrained to satisfy a given constitutive law. The computation of theconstraint forces, namely, the pressure and the stresses, requires the solution system of linear equations whichhave a sparse, saddle point structure. These are solved using the Uzawa method of preconditioned conjugate gradients (CG) applied directly to the symmetric indefinite matrix. The overall simulation method has its rootsin a discrete variational principle and the SPOOK time stepping scheme for constrained mechanical systems .The SPOOK method is second order accurate on the positions and constraints violations, and is stable at largetime-steps, thus often allowing several orders of magnitude larger timesteps in our method compared to intraditional SPH methods. The numerical implementation on GPGPU that is the main result of this paper consistsof the following components: particle neighbour searches based on spatial decomposition; summation of kernel densities; construction of Jacobians representing the constraints on the density, boundary conditions, viscosityand multiphysics couplings; a Uzawa CG solver for the system of linear equations; and finally, discrete timestepping of velocities and positions. The CG solver is particularly suitable for stream computing since it is basedon matrix-vector multiplications. The sparse system data is stored in a compressed matrix format and the algorithms operating on this data on GPGPU are implemented in CUDA and OpenCL. Our simulation resultsinclude performance measurements, and validation of the method for benchmark problems. We achieve up totwo orders of magnitude speed-up from the GPGPU over traditional processors and together with the increased timestep efficiency of our method we arrive at interactive performance for systems with up to two million fluidparticles representing an incompressible fluid.
Place, publisher, year, edition, pages
Fluid Mechanics and Acoustics Other Mathematics
IdentifiersURN: urn:nbn:se:umu:diva-55939OAI: oai:DiVA.org:umu-55939DiVA: diva2:532472
Particles 2011 – ECCOMAS International Conference on Particle-based Methods, 26-28 October 2011, Barcelona, Spain