SPHysics – development of a free-surface fluid solver – Part 2: Efficiency and test cases M. Gomez-Gesteira a,n , A.J.C. Crespo a , B.D. Rogers b , R.A. Dalrymple c , J.M. Dominguez a , A. Barreiro a a EPHYSLAB (Environmental Physics Laboratory), University of Vigo, Vigo, Spain. b School of Mechanical, Aerospace and Civil Engineering, University of Manchester, Manchester, UK c Department of Civil Engineering, Johns Hopkins University, Baltimore, MD, USA article info Article history: Received 12 September 2011 Received in revised form 24 January 2012 Accepted 26 February 2012 Available online 6 March 2012 Keywords: Computational fluid dynamics Smoothed particle hydrodynamics Free-surface flows abstract This paper, the second of a two-part series, analyses the efficiency of SPHysics and illustrates its capabilities by means of several test cases. Some intrinsic features of the SPH technique such as the use of link lists and the check for the limits are analysed here in detail. Numerical results are compared to experimental data for several cases studies: (i) Creation of waves by landslides, (ii) Dam-break propagation over wet beds and (iii) Wave-structure interaction. In addition, the capabilities of SPHysics to deal with realistic cases are depicted using the GPU version for several visual examples. & 2012 Elsevier Ltd. All rights reserved. 1. Introduction In Part 1 of the series the main theory used in the SPHysics codewas presented. This paper, Part 2, builds on that work, provides information on computational efficiency, discusses fea- tures intrinsically linked to the nature of Lagrangian models and the use of the link list. The examples provided include: (a) creation of waves by landslides; (b) dam-break propagation over wet beds; and (c) wave–structure interaction. Different model options as kernel choice, viscosity treatment, boundary conditions and density correction will be used to illustrate the SPHysics capabilities described in Part 1. In addition, the GPU version of the model will be used to simulate some visual examples in order to show the capabilities of the model to deal with realistic geometries. 2. Computational efficiency 2.1. Link list In SPH methods the determination of which particles interact, requires the computation of all pair-wise distances to find those within the interaction distance (2 h), which imposes high require- ments in terms of computational time, especially when the number of particles, N, increases. This procedure involves a number of interactions on the order of N 2 and is never used in SPH models devoted to the study of real problems as pointed out by Viccione et al. (2008). In SPHysics code, the computational domain is divided into square cells of side on the order of 2 h (Fig. 1) following Monaghan and Lattanzio (1985). Thus, for a particle located inside a cell, only the interactions with the particles of neighbouring cells need to be considered, diminishing the number of calculations per time step to N logN. In general, an SPH code can be split into three main parts: creation of the Neighbour List, Force Computation and System Update. According to Viccione et al. (2008), two different approaches have been considered traditionally to create a list of neighbours, the cell-linked list approach (CLL) and the Verlet list (VL). Domı ´nguez et al. (2011) compared both approaches, show- ing that the CLL is more suitable for SPHysics. Both approaches are similar in terms of computational time but the CLL method requires more memory. In the CLL approach, the computational domain is divided into cells of side 2 h (the extent of the kernel) and particles are stored in an array according to the cell to which they belong. During the Force Computation, only adjacent cells can possibly contain the real neighbours. Thus, the Force Computation loops over the list of adjacent cells, each of which contains a list of particles. Although the different neighbour finding algorithms can give rise to important changes both in memory requirements and also in the time needed to generate the list, the generation of the list in Contents lists available at SciVerse ScienceDirect journal homepage: www.elsevier.com/locate/cageo Computers & Geosciences 0098-3004/$ - see front matter & 2012 Elsevier Ltd. All rights reserved. doi:10.1016/j.cageo.2012.02.028 n Corresponding author. Tel.: þ34 988387232. E-mail addresses: mggesteira@uvigo.es (M. Gomez-Gesteira), alexbexe@uvigo.es (A.J.C. Crespo), benedict.rogers@manchester.ac.uk (B.D. Rogers), rad@jhu.edu (R.A. Dalrymple), jmdominguez@uvigo.es (J.M. Dominguez), anxo.barreiro@uvigo.es (A. Barreiro). Computers & Geosciences 48 (2012) 300–307