For boundary particle detection, Randles and Libersky[1]} previously have suggested using the sums of the gradients of the SPH kernels. Ideally, these kernel gradients sum to zero for interior particles. Any particle for which the sum of the gradient kernels is not near zero is presumably an exterior particle. This method gives correct results when the particles are uniformly spaced. Aamer and Dilts[2]} developed an algorithm using overlapping spheres as fluid particles representation. The method can geometrically detect free-surface particles in a robust way. However, its extension to three dimensional simulations requires a large amount of calculation. Marrone[3]} gave the idea of using a scan cone around the expected normal vector of the fluid surface to make a further check if there is any particle covering the test particle.
