Fast free-surface detection and level-set function definition in SPH solvers S. Marrone a,c , A. Colagrossi a, * , D. Le Touzé b , G. Graziani c a INSEAN, The Italian Ship Model Basin, Roma, Italy b Fluid Mechanics Lab., École Centrale Nantes/CNRS, Nantes, France c Department of Mechanics and Aeronautics, University of Rome ‘‘La Sapienza”, Italy article info Article history: Received 15 July 2009 Received in revised form 11 January 2010 Accepted 13 January 2010 Available online 25 January 2010 Keywords: Smoothed particle hydrodynamics Free-surface flows Fluid-structure impact flows Level-set function Flow visualization abstract The present paper proposes a novel algorithm to detect the free-surface in particle simu- lations, both in two and three dimensions. Since the proposed algorithms are based on SPH interpolations their implementation does not require complex geometrical proce- dures. Thus the free-surface detection can be easily embedded in SPH solvers, without a significant increase of the CPU time. Throughout this procedure accurate normal vectors to the free-surface are made available. Then it is possible to define a level-set function algo- rithm which is presented in detail. The latter allows in-depth analyses of three-dimen- sional free-surface simulations by using standard visualization tools, including internal features of the flow. The algorithms proposed for detecting free-surface particles and defin- ing the level-set function are validated on simple and complex two- and three-dimensional flow simulations. The usefulness of the proposed procedures to post-process and analyze complex flows are illustrated on realistic examples. Ó 2010 Elsevier Inc. All rights reserved. 1. Introduction In recent years the SPH method has been successfully applied to problems involving free-surface flows with fragmenta- tion. In order to analyze flows with complex free-surface patterns (fragmentations, air entrapment, etc.) and to face a larger range of problems it is required to know which particles belong to the free-surface. This detection can also be required for the enforcement of suitable boundary conditions along the free-surface (surface tension, isothermal condition, etc.) in order to deal with different physical phenomena and flow behaviors. Dilts [1] developed an algorithm for the free-surface tracking that can detect free-surface particles in a robust and reliable way and that is applicable to any meshless method. However, it is quite difficult to implement, particularly in its extension to three-dimensional simulations [2]. In this work a novel algorithm for free-surface detection is presented. Such a scheme, based on the properties of the SPH kernel, is easy to implement both in two and three dimensions, and computationally cheap. The accuracy of the method is comparable to that of the method proposed by Dilts. It is possible, indeed, to catch small cavities of diameter as small as 2h (h being the smoothing length) and fluid elements with dimension smaller than h (like jets and drops). Thanks to these valuable features, the proposed algorithm can be used at each time-step of the simulations, without an appreciable increase of the CPU time. Moreover, free-surface detection permits strong improvement of the post-processing phase, particularly in three-dimen- sional simulations with complex flow features. In fact, if one uses merely a SPH output, flow analysis is problematic since data are known on scattered points, and it is difficult to obtain contour plots, slices and iso-surfaces. Such an analysis can be performed in a straightforward way using standard tools if data are interpolated on a regular grid. In this context it is 0021-9991/$ - see front matter Ó 2010 Elsevier Inc. All rights reserved. doi:10.1016/j.jcp.2010.01.019 * Corresponding author. Tel.: +39 0650299343; fax: +39 065070619. E-mail address: a.colagrossi@insean.it (A. Colagrossi). Journal of Computational Physics 229 (2010) 3652–3663 Contents lists available at ScienceDirect Journal of Computational Physics journal homepage: www.elsevier.com/locate/jcp