# A Fast Particle-Locating Method for the Arbitrary Polyhedral Mesh

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. PLUG Method

#### 2.1. Background Grid

_{min}, y

_{min,}and z

_{min}are minimal values of x, y, and z coordinates of the computational domain, x

_{max}, y

_{max,}and z

_{max}are corresponding maximal values, and $\delta $ is a small positive number to assure that the background grid completely covers the whole computational domain.

_{x}, n

_{y}

_{,}and n

_{z}. As a result, the grid spacings in different directions are

_{p}, y

_{p}, z

_{p}), the index of background cell containing the point P (${\tilde{C}}_{ijk}$, the host cell on the background grid) is easily determined as

#### 2.2. Mapping Relation Between Background Cells and Computational Cells

_{I1}, a

_{I2}, …, a

_{Is}] for any background cube ${\tilde{C}}_{I}$, which are the indices of a set of the computational cells [C

_{aI1}, C

_{aI2}, …, C

_{aIs}] containing or partially overlapping with the corresponding background cube, i.e., satisfying

_{aIq}is the volume covered by the computational cell C

_{Iq}and ${\tilde{S}}_{I}$ is the volume covered by background cube ${\tilde{C}}_{I}$. For some background cells, there is a computational cell overlapping with them. Thus, the q should start from zero in Equation (6).

_{J}, a set of background cubes is $\left[{\tilde{C}}_{bJ1,}{\tilde{C}}_{bJ2,\dots ,}{\tilde{C}}_{bJt}\right]$, which are the background cubes fully or partially covered by the corresponding computational cell, i.e., satisfying

_{J}is the volume covered by computational cell C

_{J}.

#### 2.2.1. Creating the Cell2cube List

_{J}will be a union set of indices of background cubes fully or partially covered by several tetrahedrons decomposed from C

_{J}. Therefore, the procedure described hereafter can be applied on the arbitrary polyhedral mesh. In order to find all the background cubes covered by a given tetrahedron, several characteristic points are defined for the tetrahedron. As shown Figure 4, two types of the characteristic points are adopted in this study, i.e., the interior points shown in panel (a) and the boundary points shown in panel (b). Within each tetrahedron (panel (a) of Figure 4), the characteristic points are the centroid (point O) and the centers of lines $\overline{OA}$, $\overline{OB}$, $\overline{OC}$, and $\overline{OD}$. On each boundary surface (triangle ABC in panel (b) of Figure 2), the characteristic points are the centroid (point ${O}^{\prime}$), the centers of edges $\overline{AB}$, $\overline{BC}$, and $\overline{CA}$, and the centers of the lines $\overline{{O}^{\prime}A}$, $\overline{{O}^{\prime}B}$, and $\overline{{O}^{\prime}C}$.

#### 2.2.2. Creating the Cube2cell List

#### 2.3. Particle Locating

**Exterior cubes.**There are some background cubes which are not covered by any computational cell, since the physical domain covered by background grid is a little larger than the computational domain, as we have mentioned in Section 2.1. In this case, the corresponding component in the cube2cell list is empty.**Boundary cubes.**The boundary elements are the cubes near the boundary surface of the computational domain. One can find the background cubes for a given polygonal face on boundary with the same method as that for finding those for a given computational cell. A general polygon is decomposed into several triangles. The characteristic points for searching are shown in Figure 4b, and the subdivision process for a triangle is the same as that for the boundary surface of a tetrahedron, as shown in Figure 5b.**Interior cubes.**All the elements, excluding exterior cubes and boundary cubes belong to this type.

- For particles inside an exterior cube, these particles are outside the computational domain and not in any polyhedral computational cell.
- For particles inside a boundary cube, the point-in-cell test is adopted to check whether these points are inside one of the computational cells stored in the corresponding component of the cube2cell list. If a computational cell is found, it is the host cell. Otherwise, this particle is out of the computational domain.
- For particles inside an interior cube, the point-in-cell test is carried out to find the host cell. It is worth nothing that, in this case, some background cubes are contained by only one computational cell, and only one index appears in the corresponding component of the cube2cell list. In this case, the host cell can be determined without any point-in-cell test. This makes the PLUG method much more efficient than existing point locating algorithms.

**n**is the outward normal direction of a boundary surface, x

_{p}is the location of the tested point, and x

_{c}is the location of centroid of the surface.

## 3. Tests and Results

_{J}are the location of the center and the volume of the cell. Function rand (−1, 1) returns random real number in the range of [−1, 1].

^{6}particles at randomly selected locations in the computational domain. The computational efficiency of the proposed PLUG method depends on the resolution of the background grid on tetrahedral and polyhedral meshes. Figure 9a shows the change of the CPU times with the ratio of the total number of cubes on background grid (N

_{bc}) and the computational cells (N

_{cc}). When N

_{bc}/N

_{cc}< 1000, the computational efficiency was significantly improved by refining background grids. However, it was unworthy of further increasing the resolution of the background grid after that point, because the CPU time decreased little in the cases with the polyhedral mesh and tetrahedral mesh and increased in the case with hexahedral mesh. Moreover, more memory is required to store the cube2cell list. On the hexahedral grid, the CPU time was almost independent of the resolution of the background grid because of the same topological structure on the background grid and computational meshes. Comparing the CPU times consumed on the different meshes, particle locating was fastest on the hexahedral meshes, followed by the tetrahedral mesh, which was a little faster than the polyhedral mesh. With the refining background grid resolution, the CPU times finally arrived at the same values with a very fine background grid on different meshes.

^{3}background cubes) was the fastest one among all methods and its computational efficiency was independent of the types of the computational cells.

^{3}background grid, CPU time consumed by PLUG method was about two times that of GNHHC and similar to that of GNHNC on the tetrahedral mesh. As the CPU times of PLUG method reduced very quickly with the increasing resolution of the background grid, the CPU time of the PLUG method was about 15% of that of the GNHRC method and 6.3% of that of the GNHNC, using a 400

^{3}background grid on the tetrahedral mesh. Similar results were observed on the polyhedral mesh. The PLUG method had the similar computational overheads to the GNHHC method and a little larger expenses than that of the GNHHC method, when using 100

^{3}background grid. Increasing the number of the background cubes to 400

^{3}, the PLUG method was about 38.7 times faster than the GNHHC method.

^{3}background grid, the percentage of the background cubes covered by more than four cells was about 18.5%, 99.99%, and 86.9% on the hexahedral mesh, tetrahedral mesh, and the polyhedral mesh, respectively. As a result, the CPU times consumed by the PLUG method on tetrahedral and polyhedral grid were much larger than that on the hexahedral mesh. With the increasing resolution of the background grid, the percentage of the cubes covered by more than four cells reduced on all meshes. With a 400

^{3}background grid, the percentage reduced to 20.47% on the tetrahedral mesh and 0.00058% on the polyhedral mesh. The computational efficiency was then highly improved. The percentage of the cubes covered by one computational cell increased on all three meshes with refined background grids. However, it increased much faster on the tetrahedral meshes and the polyhedral meshes than on the hexahedral mesh. As a result, the PLUG method was much more sensitive to the background grid resolution on the tetrahedral and polyhedral meshes, as shown in Figure 9.

^{3}cubes. The PLUG method was the best one of all adopted locating methods in all tests. And all methods had the similar time complexity.

## 4. Summary

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Su, J.; Gu, Z.; Xu, X.Y. Discrete element simulation of particle flow in arbitrarily complex geometries. Chem. Eng. Sci.
**2011**, 66, 6069–6088. [Google Scholar] [CrossRef] - Su, J.; Gu, Z.; Zhang, M.; Xu, X.Y. An improved version of RIGID for discrete element simulation of particle flows with arbitrarily complex geometries. Powder. Techno.
**2014**, 253, 393–405. [Google Scholar] [CrossRef] - Chen, X.Q.; Pereira, J.C.F. A new particle-locating method accounting for source distribution and particle-field interpolation for hybrid modeling of strongly coupled two-phase flows in arbitrary coordinates. Numer. Heart Transf. B
**1991**, 35, 41–63. [Google Scholar] - Vaidya, A.M.; Subbarao, P.M.V.; Gaur, R.R. A Novel and Efficient Method for Particle Locating and Advancing over Deforming, NonOrthogonal Mesh. Numer. Hear. Tran. B.
**2006**, 49, 67–88. [Google Scholar] [CrossRef] - Haselbacher, A.; Najjar, F.M.; Ferry, J.P. An efficient and robust particle- localization algorithm for unstructured grids. J. Comput. Phys.
**2007**, 225, 2198–2213. [Google Scholar] [CrossRef] - Martin, G.D.; Loth, E.; Lankford, D. Particle host cell determination in un- structured grids. Comput. Fluids
**2009**, 38, 101–110. [Google Scholar] [CrossRef] - Ke, P.; Zhang, S.; Wu, J.; Yang, C. An improved known vicinity algorithm based on geometry test for particle localization in arbitrary grid. J. Comput. Phys.
**2009**, 228, 9001–9019. [Google Scholar] [CrossRef] - Capodaglio, G.; Aulisa, E. A particle tracking algorithm for parallel finite element applications. Comput. Fluids
**2017**, 159, 338–355. [Google Scholar] [CrossRef] - Stuart, D.C.C.; Kleijn, C.R.; Kenjereš, S. An efficient and robust method for Lagrangian magnetic particle tracking in fluid flow simulations on unstructured grids. Comput. Fluid.
**2011**, 40, 188–194. [Google Scholar] [CrossRef] - Seldner, D.; Westermann, T. Algorithms for interpolation and localization in irregular 2D meshes. J. Comput. Phys.
**1988**, 79, 1–11. [Google Scholar] [CrossRef] - Muradoglu, M.; Kayaalp, A.D. An auxiliary grid method for computations of multiphase flows in complex geometries. J. Comput. Phys.
**2006**, 214, 858–877. [Google Scholar] [CrossRef] - Macpherson, G.B.; Nordin, N.; Weller, H.G. Particle tracking in unstructured, arbitrary polyhedral meshes for use in CFD and molecular dynamics. Comm. Numer. Meth. Eng.
**2010**, 25, 263–273. [Google Scholar] [CrossRef] - Jin, H.; He, C.; Chen, S.; Wang, C.; Fan, J. A method of tracing particles in irregular unstructured grid system. J. Comput. Multiph. Flows.
**2013**, 5, 231–238. [Google Scholar] [CrossRef] - Sani, M.; Saidi, M.S. A set of particle locating algorithms not requiring face belonging to cell connectivity data. J. Comput. Phys.
**2009**, 228, 7357–7367. [Google Scholar] [CrossRef] - Ferziger, J.H.; Peric, M. Computational Methods for Fluid Dynamics, 3rd ed.; Springer: Berlin, Germany, 2012. [Google Scholar]

**Figure 1.**An illustration of different background grid configurations. (

**a**) large-spacing grid; (

**b**)small-spacing grid.

**Figure 5.**The sub-division of a tetrahedron. (

**a**) Original tetrahedron; (

**b**) Initial subdivision; (

**c**) Central octahedron; (

**d**) Subdivision of central octahedron.

**Figure 8.**Three different types of meshes used in numerical tests. (

**a**) Hexahedral mesh; (

**b**) Tetrahedral mesh; (

**c**) Polyhedral mesh.

**Figure 9.**CPU times consumed by different particle-locating methods on different grids. (

**a**) CPU times of PLUG method; (

**b**) CPU times of other methods.

**Figure 11.**The percentage of background cubes covered by a given number of computational cells. (

**a**) Background grid with 100

^{3}cells; (

**b**) Background grid with 200

^{3}cells; (

**c**) Background grid with 300

^{3}cells; (

**d**) Background grid with 400

^{3}cells.

**Figure 12.**Scalability of the different methods with regard to the increasing number of the particles on the different types of meshes. (

**a**)Hexahedral mesh; (

**b**) Tetrahedral mesh; (

**c**) Polyhedral mesh.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Li, Z.; Wang, Y.; Wang, L.
A Fast Particle-Locating Method for the Arbitrary Polyhedral Mesh. *Algorithms* **2019**, *12*, 179.
https://doi.org/10.3390/a12090179

**AMA Style**

Li Z, Wang Y, Wang L.
A Fast Particle-Locating Method for the Arbitrary Polyhedral Mesh. *Algorithms*. 2019; 12(9):179.
https://doi.org/10.3390/a12090179

**Chicago/Turabian Style**

Li, Zongyang, Yefei Wang, and Le Wang.
2019. "A Fast Particle-Locating Method for the Arbitrary Polyhedral Mesh" *Algorithms* 12, no. 9: 179.
https://doi.org/10.3390/a12090179