140 likes | 357 Vues
GPU Accelerated Free Surface Flows Using Smoothed Particle Hydrodynamics. Christopher McCabe, Derek Causon and Clive Mingham Centre for Mathematical Modelling & Flow Analysis Manchester Metropolitan University MANCHESTER M1 5GD United Kingdom. Smoothed Particle Hydrodynamics.
E N D
GPU Accelerated Free Surface Flows Using Smoothed Particle Hydrodynamics Christopher McCabe, Derek Causon and Clive Mingham Centre for Mathematical Modelling & Flow Analysis Manchester Metropolitan University MANCHESTER M1 5GD United Kingdom
Smoothed Particle Hydrodynamics • Highly parallel algorithm • Tracks particle movement rather than calculates physical properties at fixed points in space • Ideal for modelling of free surface flows • Wave interactions with floating structures • Environmental scenarios • Dambreaks • Flooding and coastal inundation
Problem Specification and Particle Configuration • 2D Dambreak of 8m x 8m body of water. • 4096 (64 x 64) real particles, with 1024 virtual particles to describe the fixed solid boundaries. • Obstacle in path of dam break flow. • Algorithm based on “Simulating Free Surface Flows with SPH” by J J Monaghan, Journal of Computational Physics 110,399-406 (1994)
Particle Approximation • Particles approximated by a kernel function Wij which • is normalized over its support domain • offers compact support • is symmetric (even function) • is non-negative • has smoothing length h such that • Kernel used was the Gaussian
Governing Equations Momentum Equation Viscosity where Energy equation Continuity Equation
Boundary Conditions To model a fixed solid boundary we use virtual particles that have the physical properties of water but exert a repulsive force on any real particle approaching the boundary . A Lennard-Jones repulsive force F on a real particle from a boundary particle a distance r apart is given by for , where and A velocity correction prevents penetration of the boundary by any real particle, given by
Tait Equation of State , = 7 , where Each real particle given an initial hydrostatic pressure according to
Algorithm Implementation on GPU • Hardware used was one Tesla C870 multiprocessor with the NVIDIA CUDA SDK and nvcc compiler • Algorithm uses the very fast shared memory on the C870 to process particle interactions • Algorithm is based on N-body simulation (Chapter 31 GPU Gems 3) but with an improvement to record particle interactions to reduce the computation per time step • All reads from and writes to global memory are coalesced
Performance No code was optimized in favour of the other. All codes written in C and all perform the same functions. The code executed on the C870 used its architecture only without any ‘tricks of the trade’ (loop unrolling etc.). The code executed on the two Pentium IVs was compiled and executed within MS Visual Studio 2005.
Conclusions • The Nvidia C870 accelerated the code execution by a significant factor. • The algorithm is based on a mathematical formulation. • Results are very realistic.
Future Work • Implement more accurate and faster SPH algorithms • Consider larger and different benchmark problems • Use multiple GPUs