GPU Simulations of Violent Flows with Smooth Particle Hydrodynamics (SPH) Method

Similar documents
SPH: Why and what for?

PARALLEL SIMULATION OF A FLUID FLOW BY MEANS OF THE SPH METHOD: OPENMP VS. MPI COMPARISON. Pawe l Wróblewski, Krzysztof Boryczko

SPH: Towards the simulation of wave-body interactions in extreme seas

Acknowledgements. Prof. Dan Negrut Prof. Darryl Thelen Prof. Michael Zinn. SBEL Colleagues: Hammad Mazar, Toby Heyn, Manoj Kumar

Characteristic Aspects of SPH Solutions

Interaction of Fluid Simulation Based on PhysX Physics Engine. Huibai Wang, Jianfei Wan, Fengquan Zhang

C. A. D. Fraga Filho 1,2, D. F. Pezzin 1 & J. T. A. Chacaltana 1. Abstract

CGT 581 G Fluids. Overview. Some terms. Some terms

Experimental Validation of the Computation Method for Strongly Nonlinear Wave-Body Interactions

PySPH: A Python Framework for Smoothed Particle Hydrodynamics

Simulation of Automotive Fuel Tank Sloshing using Radioss

Numerical Simulation of Coastal Wave Processes with the Use of Smoothed Particle Hydrodynamics (SPH) Method

MODELLING WATER ENTRY OF A WEDGE BY MULTIPHASE SPH METHOD. Kai GONG, Benlong WANG and Hua LIU 1

Transfer and pouring processes of casting by smoothed particle. hydrodynamic method

Simulation of Fuel Sloshing Comparative Study

Technical Report TR

IMPROVED WALL BOUNDARY CONDITIONS WITH IMPLICITLY DEFINED WALLS FOR PARTICLE BASED FLUID SIMULATION

Fluid-structure Interaction by the mixed SPH-FE Method with Application to Aircraft Ditching

Simulation of liquid cube fracture with SPH

Divergence-Free Smoothed Particle Hydrodynamics

Thermal Coupling Method Between SPH Particles and Solid Elements in LS-DYNA

Two-Phase flows on massively parallel multi-gpu clusters

Modelling of Impact on a Fuel Tank Using Smoothed Particle Hydrodynamics

3D Simulation of Dam-break effect on a Solid Wall using Smoothed Particle Hydrodynamic

Support for Multi physics in Chrono

Chapter 1 - Basic Equations

Parallel Summation of Inter-Particle Forces in SPH

A Hybrid Technique Using Particle and Boundary-Element Methods for Wave-Body Interaction Problems

Lagrangian methods and Smoothed Particle Hydrodynamics (SPH) Computation in Astrophysics Seminar (Spring 2006) L. J. Dursi

Realistic Animation of Fluids

University of Quebec at Chicoutimi (UQAC) Friction Stir Welding Research Group. A CUDA Fortran. Story

AN INVESTIGATION OF SLAM EVENTS IN TWO DIMENSIONS USING SMOOTHED PARTICLE HYDRODYNAMICS

Fluid-Structure-Interaction Using SPH and GPGPU Technology

Numerical and experimental investigations into liquid sloshing in a rectangular tank

Comparison between incompressible SPH solvers

CFD MODELING FOR PNEUMATIC CONVEYING

Applications of ICFD /SPH Solvers by LS-DYNA to Solve Water Splashing Impact to Automobile Body. Abstract

Available online at ScienceDirect. Procedia Engineering 126 (2015 )

SHAPE pilot Monotricat SRL: Hull resistance simulations for an innovative hull using OpenFOAM

1.2 Numerical Solutions of Flow Problems

Flux Vector Splitting Methods for the Euler Equations on 3D Unstructured Meshes for CPU/GPU Clusters

2D numerical simulation of ocean waves

Parametric Study of Sloshing Effects in the Primary System of an Isolated LFR Marti Jeltsov, Walter Villanueva, Pavel Kudinov

CHRONO::HPC DISTRIBUTED MEMORY FLUID-SOLID INTERACTION SIMULATIONS. Felipe Gutierrez, Arman Pazouki, and Dan Negrut University of Wisconsin Madison

2-D Tank Sloshing Using the Coupled Eulerian- LaGrangian (CEL) Capability of Abaqus/Explicit

EXPLICIT MOVING PARTICLE SIMULATION METHOD ON GPU CLUSTERS. of São Paulo

Navier-Stokes & Flow Simulation

Simulation of Fluid Sloshing in a Tank

LS-DYNA 980 : Recent Developments, Application Areas and Validation Process of the Incompressible fluid solver (ICFD) in LS-DYNA.

Adaptive-Mesh-Refinement Hydrodynamic GPU Computation in Astrophysics

NVIDIA. Interacting with Particle Simulation in Maya using CUDA & Maximus. Wil Braithwaite NVIDIA Applied Engineering Digital Film

Parallel Interpolation in FSI Problems Using Radial Basis Functions and Problem Size Reduction

Lattice Boltzmann with CUDA

Driven Cavity Example

Flux Vector Splitting Methods for the Euler Equations on 3D Unstructured Meshes for CPU/GPU Clusters

Thermal Coupling Method Between SPH Particles and Solid Elements in LS-DYNA

A stable moving-particle semi-implicit method for free surface flows

Particle-based Fluid Simulation

Application of Finite Volume Method for Structural Analysis

Realtime Water Simulation on GPU. Nuttapong Chentanez NVIDIA Research

AQUAgpusph, a free 3D SPH solver accelerated with OpenCL

MESHLESS SOLUTION OF INCOMPRESSIBLE FLOW OVER BACKWARD-FACING STEP

Navier-Stokes & Flow Simulation


1.6 Smoothed particle hydrodynamics (SPH)

Numerical Wave Tank Modeling of Hydrodynamics of Permeable Barriers

Proposal of Research Activity. PhD Course in Space Sciences, Technologies and Measurements (STMS)

Overview of Traditional Surface Tracking Methods

Analysis, extensions and applications of the Finite-Volume Particle Method (FVPM) PN-II-RU-TE Synthesis of the technical report -

Interactive Fluid Simulation using Augmented Reality Interface

Particleworks: Particle-based CAE Software fully ported to GPU

Keywords: flows past a cylinder; detached-eddy-simulations; Spalart-Allmaras model; flow visualizations

OMAE SLOSHING AND SWIRLING IN PARTIALLY LOADED PRISMATIC CHAMFERED TANKS

Example 13 - Shock Tube

LATTICE-BOLTZMANN METHOD FOR THE SIMULATION OF LAMINAR MIXERS

2.7 Cloth Animation. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter 2 123

Robust Simulation of Sparsely Sampled Thin Features in SPH-Based Free Surface Flows

Parallel Direct Simulation Monte Carlo Computation Using CUDA on GPUs

Available online at ScienceDirect. Procedia Engineering 111 (2015 )

Parallel Mesh Multiplication for Code_Saturne

DualSPHysics: past, present and future

Very fast simulation of nonlinear water waves in very large numerical wave tanks on affordable graphics cards

Modelling and Analysis of Liquid Container Baffler to Reduce Sloshing Effect

Application Aspects of the Meshless SPH Method

Particle-Based Fluid Simulation. CSE169: Computer Animation Steve Rotenberg UCSD, Spring 2016

Development of the Compliant Mooring Line Model for FLOW-3D

Fluid Simulation. [Thürey 10] [Pfaff 10] [Chentanez 11]

Solving Partial Differential Equations on Overlapping Grids

Shape of Things to Come: Next-Gen Physics Deep Dive

EXPERIMENTAL VALIDATION OF STAR-CCM+ FOR LIQUID CONTAINER SLOSH DYNAMICS

International Supercomputing Conference 2009

A higher-order finite volume method with collocated grid arrangement for incompressible flows

A GPU ACCELERATED SMOOTHED PARTICLE HYDRODYNAMICS CAPABILITY FOR HOUDINI. A Thesis MATHEW ALLEN SANFORD

General Purpose GPU Computing in Partial Wave Analysis

Technical Report Smoothed Particle Hydrodynamics in Acoustic Simulations. Philipp Hahn, Dan Negrut

Large-scale Gas Turbine Simulations on GPU clusters

Numerical Simulation of Coupled Fluid-Solid Systems by Fictitious Boundary and Grid Deformation Methods

Smoothed Particle Hydrodynamics

Massively Parallel OpenMP-MPI Implementation of the SPH Code DualSPHysics

Software and Performance Engineering for numerical codes on GPU clusters

Transcription:

Available online at www.prace-ri.eu Partnership for Advanced Computing in Europe GPU Simulations of Violent Flows with Smooth Particle Hydrodynamics (SPH) Method T. Arslan a*, M. Özbulut b a Norwegian University of Science and Technology b Piri Reis University Abstract Graphics processing unit (GPU) accelerated supercomputers have proved to be very powerful and energy effective for to accelerate the compute intensive applications and become the new standard for high performance computing (HPC) and a critical ingredient in the pursuit of exascale computing. In this study, a quantitative comparison of a recent numerical treatment on GPUs which are applied on the solution of a violent free-surface flow problem by Smoothed Particle Hydrodynamics (SPH) method will be presented. The performance and the scalability of the cards will be evaluated on sway sloshing problem in a tank by solving Euler's equation of motion and utilizing weakly compressible SPH method (WCSPH). The algorithms demands extensive computational power for the simulations require large number of particles as in a sloshing tank which is a two or three-dimensional complex geometry. Thus, the parallelization of the solver is the key for to utilize the method on a real industrial flow problem. The recent researches showed that WCSPH approach is highly suitable for adopting it into GPU cards because of its explicit approach. The comparisons will show that how many times the computational speed of the proposed method on the GPU is faster than that implemented on the CPU. For the sway-sloshing problem, the time histories of free surface elevations on the left side wall of the tank will be compared with experimental and numerical results available in the literature to show the accuracy of the method briefly and finally analyze the solver s efficiency on GPUs. 1. Introduction The goals of this task have been to apply GPU implementation of an engineering simulation tool to a real and for PRACE application. The application is a Fortran based in-house Computaional Fluid Dynamics code which is developed by the authors. The code uses Smoothed Particle Hydrodynamics (SPH) method to calculate velocity and pressure distribution in the domain without using any computational grid. Due to its Lagrangian and meshless nature, the SPH method is an exceptionally suitable tool for modelling highly nonlinear violent flows with a free surface. The SPH method was introduced simultaneously by Gingold and Monaghan [1] and Lucy [2] to simulate compressible flow problems in astro-physics and later extended by Monaghan [3] to model incompressible free surface flows through using a Weakly Compressible SPH approach (WCSPH) which assumes that a fluid is incompressible if its density variation is less than 1%. In the SPH method, the continuum is represented by particle which carry fluid properties such as density, velocity and pressure, among others. These particles represent infinitesimally small fluid elements having finite volumes, and can interact with each other in each time-step through a weight function having a compact support domain. The relevant governing equations and boundary conditions are discretized in space over these particles. Present work uses numerical remedies namely, density correction, VFS (Velocity-variance based Free Surface), and Artificial Particle Displacement (APD) algorithms [4] which helps to improve the accuracy and stability of the numerical scheme. Density correction algorithm should be included into the solution scheme because in * Corresponding author. E-mail address: tufan.arslan@ntnu.no 1

WCSPH approach the pressure values are calculated through an equation of state which couples density and pressure values. The coupling of pressure and density brings the necessity of precise calculation of density values which has a significant importance while finding the pressure values of particles. In addition to density correction algorithm, VFS algorithm is applied only to free-surface particles while APD is used to regularize the arrangement of particles with fully populated influence domain, which are identified via the kernel truncation. A two dimensional sway- sloshing problem, which is well-accepted as a benchmark test case among SPH researchers, is solved using Euler's equation of motion. Sloshing problem is an important phenomenon in several engineering fields including marine, oil-gas and aeronautics because of its significant effects on design of gas, fuel and water tanks and transporting them with ships and aircrafts. The results from this work maybe interesting for CoEs and research communities such as SPHERIC, SPHysics, CNRS, CNR-INSEAN and MARSTRUCT Network of Excellence. The flow is modelled to test if the numerical treatment gives accurate and reliable results in the numerical simulations. The code developed to perform simulation is written in Fortran 90. The results from some of serial simulations performed in CPU are priminelary published in Ozbulut et al. [5]. Due to explicit approach of the method, it is highly suitable for parallelization by using graphic cards. In this work, first results from GPU performance test is presented. 2. Numerical modelling SPH is a Lagrangian method where the flow domain is represented by a finite number of movable particles which can carry the characteristic properties of the problem at hand such as mass, position, velocity, momentum, and energy. The core of its mathematical formulation is based on the interpolation process, wherefore the fluid system is modeled through the interaction among particles, which is achieved by an analytical function widely referred to as the kernel/weighting function W(r ij,h) where r ij is the magnitude of the distance vector, r = r r (1) ij i j for a pair of particles, namely, the particle of interest i and its neighboring particles j, and h is the smoothing length. Here, r i and r j are the position vectors for the particle i and j, respectively, and as to be understood, boldface indices i and j are particle identifiers to denote particles. An arbitrary continuous function (which can A, or concisely denoted as A i, can be interpolated as be scalar, vectorial, or tensorial), ( ) A Ar Ar W r hdr ( ) ( ) (, ) 3 i i j ij j W r i where the angle bracket denotes the kernel approximation, d 3 r j is the infinitesimal volume element inside the domain, and Ω represents the total bounded volume of the domain. The function A i may represent any hydrodynamic properties such as velocity, pressure, density, and viscosity. The kernel function used in the current work is a quintic spline with the form of (3 RR)5 6(2 RR) 5 + 15(1 RR) 5, 0 RR < 1 (3 RR) WW(RR, h) = 5 6(2 RR) 5, 1 RR < 2 dd (3) (3 RR) 5, 2 RR < 3 0, RR 3 where R=r ij /h and α d is a coefficient that depends on the dimension of the problem such that 120/h, 7/(478πh 2 ) and 3/(359πh 3 ) for one, two and three dimensions, respectively [6]. Upon using the SPH approximations which involve the replacement of the integral operation over the volume of the bounded domain by the mathematical summation operation over all neighboring particles j of the particle of interest i, and the differential volume element by the m j =ρ j, and performing some tedious mathematical manipulations. (2) 3. CUDA implementation SPH method requires calculation of the weight functions between the particles in neighborhood as described in Equation 2 and 3. In order to calculate the function, the distance between every particle combination should be calculated (Equation 1) and compared with a certain radius (smoothing length) shown in Fig 1. Calculating the neighbourhood of each particles is computationally demanding. TAU profiling tool [7] has also been used and it showed that neighbourhood finding and weight function calculation of the particles are computationally heavy spots in entire process (approx. 70% of the calculation time). 2

Fortran DO loops were modified with CUDA Fortran functions in a simple way and calculations in the loops were sent to the CUDA cores of the graphic card to be processed in different threads. The particle distance calculation routine (Equation 1) with CUDA Fortran implementation is shown in Fig. 2. This routine calculates the distance between particles at each time step according to distance vector (Equation 1) definition as mentioned in Numerical modelling section. The source code is compiled by PGI s CUDA Fortran [8] compiler pgfortran version 16. CUDA Fortran is a Fortran analog to NVIDIA CUDA C, CUDA Fortran includes a Fortran 2003 compiler and tool chain for programming NVIDIA GPUs using Fortran. CUDA Fortran is supported on Linux, macos and Windows. Figure 1: Neighbourhood for particles (smoothing length) left, simulation domain for sway sloshing tank, right DO i=1,ntotal j =threadidx%x + blockdim%x * (blockidx%x - 1) if (j <= ntotal) THEN dx(i,j)=x(i)-x(j) dy(i,j)=y(i)-y(j) ra(i,j)=sqrt(dx(i,j)*dx(i,j)+dy(i,j)*dy(i,j)) END IF END DO Figure 2: Generated CUDA kernel 4. Results For the development, a single NVIDIA s GeForce GTX 690 card combining two Kepler GPUs (4 GB memory in total) is used. Simulations performed with NVIDIA s Tesla K20 (Kepler architecture) with 6 GB memory. GPU version of the particle distance subroutine (Fig.2) performed 15 times faster over serial CPU version which is run on a Intel(R) Core(TM) i7-3820 CPU with approx. 3000 particles. However this doesn t bring a significant speed up for code in overall. In the same way, CUDA implementing of weight function (Equation 3) makes the subroutine running 6 times faster compare to CPU version running serial however this doesn t bring too much benefit for the entire simulation time. The overall speed-is x2.2 Figure 3: Comparison of digital time series of the water level evolution close to the left wall where ξ(t) denotes the water level change in time [5]. 3

Figure 3 present the results of the current work as compared to experimental and numerical results in terms of digital time series of free surface elevations for two different positions of the tank, (namely, close to the left wall and at the mid section of the tank). It can be seen from Fig. 3 that the periods and the amplitudes of the harmonic motion of the fluid are in very good agreement with the numerical results and experimental data of the literature. The aim of comparative results given in Figure 3 is to show the compatibility of our simulation results with the given experimental and numerical based literature data. Along this line, it is not easy to claim an idea as "one numerical result is more accurate than the other". But one can see that the periods and the amplitudes of the harmonic motion of the fluid are in very good agreement with the numerical results and experimental data of the literature. (a) (b) (c) (d) (e) (f) (g) (h) Figure 4: Particle positions and pressure distributions at given instants (time is advancing from a to h) [5] 4

As a final output of this study, the free surface profiles and the pressure distributions at given instants are shown in Fig. 4. From the figures it can be seen that the particles starts to move when the harmonic motion of the tanks starts, and splash to upper and side walls of the tank in time (time advances from a to h). The color shows the pressure levels. It can be seen that the free surface is captured well and the splashing of water to the tank ceiling is simulated with the particles fairly. It is from the figures that the VFS+APD treatment provides satisfactory particle distribution and free surface profiles wherein particle clustering and particle splashing or separation from the free surface are eliminated. 5. Conclusions and Future work Porting of some of the essential subroutines of the Fortran code to the GPU platform by using CUDA did not bring a substantial speed up for entire simulation however it showed the potential of high performance computing ability of the graphics cards for SPH method specifically. Parallelization of weight function subroutine has some difficulties because of mathematical relations of particle neighborhood and of unbalanced load distribution on the threads. This will be overcome by using dynamic parallelization. It is expected that this will bring substantial performance acceleration. Simulations have been performed with low resolution (fewer particles) and with higher resolution better speed up is expected by overcoming the memory bottleneck in GPU cards. To perform simulations with higher particle numbers, in the future, MPI libraries will be used for taking advantage of the enhanced computing power of several GPUs working simultaneously. These let the code performs for flows around more complex geometries, in fact 3D problems. More test runs with different number of particles will be performed and how scalability/performance of presented solution scales with problem size and number of GPU threads/blocks will be observed. Using GPUs or multicore platforms is regarded as important and necessary steps for enabling a software for an exascale future. However current algorithms should be restructured and adopted to the new platform. References [1] Monaghan J, Gingold R. Smoothed particle hydrodynamics: theory and application to non-spherical stars. Mon Not R Astron Soc 1977;181:375 89. [2] Lucy L. Numerical approach to testing the fission hypothesis. Astron J 1977;82:1013 24. [3] Monaghan J. Simulating free surface flow with SPH. J Comput Phys 1994;110:399 406. [4] Shadloo M, Zainali A, Yildiz M, Suleman A. A robust weakly compressible SPH method and its comparison with an incompressible SPH. Int J Numer Methods Eng 2011;89(8):939 56. [5] Ozbulut, M., M. Yildiz, and O. Goren. "A numerical investigation into the correction algorithms for SPH method in modeling violent free surface flows." International Journal of Mechanical Sciences 79 (2014): 56-65. [6] M. Liu, G. Liu, Smoothed particle hydrodynamics: an overview and recent developments, Arch Comput Methods Eng, 17 (2010), pp. 25 76 [7] Tuning and Analysis Utilities, http://www.cs.uoregon.edu/research/tau/home.php [8] PGI Compiler and Tools, http://www.pgroup.com/ Acknowledgements This work is supported by NOTUR for computing time at ABEL system in Oslo This work was financially supported by the PRACE project funded in part by the EU s Horizon 2020 research and innovation programme (2014-2020) under grant agreement 653838. 5