# Boundary SPH for Robust Particle–Mesh Interaction in Three Dimensions

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

- For each fluid particle and mesh triangle $[p,t|p\in P,t\in T]$, project p onto the 2D plane defined by t ($pro{j}_{p}$) and determine the closest point on the triangle to this projection ($pro{j}_{p,t}$). Voronoi region tessellation is needed here to divide the 2D plane of each triangle into regions that identify if $pro{j}_{p}$ is closest to either a vertex or edge or if $pro{j}_{p}$ is located inside the triangle.
- For each fluid particle $p\in P$, determine the closest point on the mesh such that the distance between p and $pro{j}_{p,t}$ is minimized.
- For each fluid particle, determine the boundary normal ${N}_{b}$ based on the closest $pro{j}_{p,t}$’s position on the mesh as well as the signed distance from p to the closest $pro{j}_{p,t}$ based on ${N}_{b}$.

#### 2.1. Triangle Mesh Basics

**Choice of face type**: Meshes can be defined based on their face type. Typical face types include triangles, quads, or n-gons.**Choice of representation**: This refers to the explicit format and type of data that are stored about the mesh. Types include but are not limited to vertex–vertex (“VV”), face–vertex meshes, and winged-edge meshes [34].

#### 2.2. Pre-Processing 3D Meshes

**Vertices**: In mesh data, vertices are stored as float3 vectors that may overlap based on how the mesh data was created. We must filter vertices into a condensed list where each vertex is unique and no overlaps exist among vertices. For example, Unity3D’s “Cube” primitive is originally represented by 24 vertices, which can be condensed into 8 vertices. We also must calculate the pseudonormal vector of each vertex that represents the boundary normal vector at the vertex. This pseudonormal vector is the average of the pseudonormal vectors of all triangles connected to a vertex, weighted by the angle of influence that the vertex has on the face area (see Figure 1).**Edges**: Edges are not stored in face–vertex triangle meshes and must be computed manually. Edges are composed of two vertices, with a midpoint calculated based on the average of its two vertices’ positions. We must also calculate the pseudonormal vector of each edge that represents the boundary normal vector. We take advantage of the idea that an edge can only connect two triangles at maximum and calculate the pseudonormal vector as the average of the two faces’ pseudonormal vectors. If a mesh is incomplete and is compsed of only one triangle, we simply set the pseudonormal vector as the same as the connected triangle’s pseudonormal vector.**Triangles**: Triangles are stored as a tuple of index values that point to vertices in the mesh’s vertices array. In our scheme, mesh triangles also feature a centroid position based on the average positions of its vertices, a pseudonormal vector orthogonal to the plane defined by the triangle, a signed distance float value from the triangle’s 2D plane to the origin, and 2D pseudonormal vectors of each edge along the 2D plane defined by the triangle. All of these properties need to be manually calculated.

#### 2.3. Single Particle–Triangle Scenario

#### 2.3.1. Calculating Plane Projection

- p: The particle’s current position in 3D space; it also represents the vector from world origin $(0,0,0)$ to the particle’s current position.
- ${N}_{t}$: The triangle’s face pseudonormal vector.
- ${c}_{t}$: The triangle’s centroid.
- ${N}_{t}\xb7\left({c}_{t}-p\right)$: The signed distance between p and $Plan{e}_{t}$. A negative (−) distance means that the particle is “above” the mesh triangle, while a positive (+) distance means the particle is “below” the mesh triangle. Note that a positive sign does not necessarily mean that the particle is submerged or intersecting with the mesh obstacle as the particle may simply be in a concave segment of the mesh.

#### 2.3.2. Calculating the Closest Point and Corresponding Boundary Normal

#### 2.3.3. Calculating the Signed Distance

#### 2.4. SPH Fluid Interaction

## 3. Results

#### 3.1. Simple Setups

#### 3.2. Water Tank Setups

#### 3.3. Concave Mesh and Fluid Flow Setups

#### 3.4. Mesh Boundary Performance

## 4. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## Appendix A. Mesh Pre-Processing Algorithm

Algorithm A1: Mesh Pre-Processing during Initialization |

Algorithm A2: PreprocessMesh() |

Algorithm A3: PreprocessVertices() |

Algorithm A4: PreprocessTriangles() |

Data: $ti$: Current triangle index, $ts$: original mesh triangles, $mvs$: mesh’s condensed list of vertices, $vmap$: mapper from original vertex indices to condensed vertices, ref $mts$: reference to mesh’s triangle data Result: Extending $mts$ with angle, center, and normal data// Retrieving positions of triangle’s vertices$mts\left[ti\right].vertices=\left(vmap\right[ts[ti\ast 3]],vmap[ts[ti\ast 3+1]],vmap[ts[ti\ast 3+2]\left]\right)$; ${v}_{1}=mvs[mts.vertices\left[0\right]].position$← First vertex’s position; ${v}_{2}=mvs[mts.vertices\left[1\right]].position$← Second vertex’s position; ${v}_{3}=mvs[mts.vertices\left[2\right]].position$← Third vertex’s position; // Updating vertex angles for this triangle$mts\left[ti\right].angles=(\angle \left(\overrightarrow{{v}_{1}{v}_{3}},\overrightarrow{{v}_{1}{v}_{2}}\right),\angle \left(\overrightarrow{{v}_{2}{v}_{3}},\overrightarrow{{v}_{2}{v}_{1}}\right),\angle \left(\overrightarrow{{v}_{3}{v}_{2}},\overrightarrow{{v}_{3}{v}_{1}}\right))$; // Updating triangle’s centroid and orthogonal normal vector$mts\left[ti\right].center=\left({v}_{1}+{v}_{2}+{v}_{3}\right)/3$; $mts\left[ti\right].normal=normalize({v}_{2}-{v}_{1}\times {v}_{3}-{v}_{1})$← Right-hand Rule; |

Algorithm A5: PreprocessEdges() |

## References

- Reynolds, C. Big fast crowds on PS3. In Proceedings of the 2006 ACM SIGGRAPH Symposium on Videogames, New York, NY, USA, 30–31 June 2006; pp. 113–121. [Google Scholar] [CrossRef]
- Monaghan, J. Smoothed Particle Hydrodynamics and Its Diverse Applications. Annu. Rev. Fluid Mech.
**2012**, 44, 323–346. [Google Scholar] [CrossRef] - Shadloo, M.; Oger, G.; Le Touzé, D. Smoothed particle hydrodynamics method for fluid flows, towards industrial applications: Motivations, current state, and challenges. Comput. Fluids
**2016**, 136, 11–34. [Google Scholar] [CrossRef] - Ye, T.; Pan, D.; Huang, C.; Liu, M. Smoothed particle hydrodynamics (SPH) for complex fluid flows: Recent developments in methodology and applications. Phys. Fluids
**2019**, 31, 011301. [Google Scholar] [CrossRef] - Zhang, C.; Zhu, Y.J.; Wu, D.; Adams, N.A.; Hu, X. Smoothed particle hydrodynamics: Methodology development and recent achievement. J. Hydrodyn.
**2022**, 34, 767–805. [Google Scholar] [CrossRef] - Boregowda, P.; Liu, G.R. On the accuracy of SPH formulations with boundary integral terms. Math. Comput. Simul.
**2023**, 210, 320–345. [Google Scholar] [CrossRef] - Peskin, C.S. Numerical analysis of blood flow in the heart. J. Comput. Phys.
**1977**, 25, 220–252. [Google Scholar] [CrossRef] - Peskin, C.S. The immersed boundary method. Acta Numer.
**2002**, 11, 479–517. [Google Scholar] [CrossRef] - Hou, G.; Wang, J.; Layton, A. Numerical Methods for Fluid-Structure Interaction—A Review. Commun. Comput. Phys.
**2012**, 12, 337–377. [Google Scholar] [CrossRef] - Stockie, J.M.; Wetton, B.R. Analysis of Stiffness in the Immersed Boundary Method and Implications for Time-Stepping Schemes. J. Comput. Phys.
**1999**, 154, 41–64. [Google Scholar] [CrossRef] - Monaghan, J. Simulating Free Surface Flows with SPH. J. Comput. Phys.
**1994**, 110, 399–406. [Google Scholar] [CrossRef] - Morris, J.P.; Fox, P.J.; Zhu, Y. Modeling Low Reynolds Number Incompressible Flows Using SPH. J. Comput. Phys.
**1997**, 136, 214–226. [Google Scholar] [CrossRef] - Colagrossi, A.; Landrini, M. Numerical simulation of interfacial flows by smoothed particle hydrodynamics. J. Comput. Phys.
**2003**, 191, 448–475. [Google Scholar] [CrossRef] - Bonet, J.; Kulasegaram, S.; Rodriguez-Paz, M.; Profit, M. Variational formulation for the smooth particle hydrodynamics (SPH) simulation of fluid and solid problems. Comput. Methods Appl. Mech. Eng.
**2004**, 193, 1245–1256. [Google Scholar] [CrossRef] - Ferrand, M.; Laurence, D.R.; Rogers, B.D.; Violeau, D.; Kassiotis, C. Unified semi-analytical wall boundary conditions for inviscid, laminar or turbulent flows in the meshless SPH method. Int. J. Numer. Methods Fluids
**2013**, 71, 446–472. [Google Scholar] [CrossRef] - Yildiz, M.; Rook, R.A.; Suleman, A. SPH with the multiple boundary tangent method. Int. J. Numer. Methods Eng.
**2009**, 77, 1416–1438. [Google Scholar] [CrossRef] - Dalrymple, R.; Rogers, B. Numerical modeling of water waves with the SPH method. Coast. Eng.
**2006**, 53, 141–147. [Google Scholar] [CrossRef] - Dalrymple, R.A.; Knio, O. SPH Modelling of Water Waves. In Coastal Dynamics ’01; American Society of Civil Engineers: Reston, VA, USA, 2012; pp. 779–787. [Google Scholar] [CrossRef]
- Marrone, S.; Antuono, M.; Colagrossi, A.; Colicchio, G.; Le Touzé, D.; Graziani, G. δ-SPH model for simulating violent impact flows. Comput. Methods Appl. Mech. Eng.
**2011**, 200, 1526–1542. [Google Scholar] [CrossRef] - Antuono, M.; Colagrossi, A.; Marrone, S.; Lugni, C. Propagation of gravity waves through an SPH scheme with numerical diffusive terms. Comput. Phys. Commun.
**2011**, 182, 866–877. [Google Scholar] [CrossRef] - Müller, M.; Schirm, S.; Teschner, M.; Heidelberger, B.; Gross, M. Interaction of fluids with deformable solids. Comput. Animat. Virtual Worlds
**2004**, 15, 159–171. [Google Scholar] [CrossRef] - Monaghan, J.; Kajtar, J. SPH particle boundary forces for arbitrary boundaries. Comput. Phys. Commun.
**2009**, 180, 1811–1820. [Google Scholar] [CrossRef] - Vacondio, R.; Altomare, C.; De Leffe, M.; Hu, X.; Le Touzé, D.; Lind, S.; Marongiu, J.C.; Marrone, S.; Rogers, B.D.; Souto-Iglesias, A. Grand challenges for Smoothed Particle Hydrodynamics numerical schemes. Comput. Part. Mech.
**2020**, 8, 575–588. [Google Scholar] [CrossRef] - Torrens, P.M. Exploring behavioral regions in agents’ mental maps. Ann. Reg. Sci.
**2016**, 57, 309–334. [Google Scholar] [CrossRef] - Okabe, A.; Boots, B.; Sugihara, K.; Chiu, S.N. Spatial Tessellations: Concepts and Applications of Voronoi Diagrams; John Wiley & Sons: Chichester, West Sussex, England, 2009; ISBN 0-471-98635-6. [Google Scholar]
- Gilbert, E.; Johnson, D.; Keerthi, S. A fast procedure for computing the distance between complex objects in three-dimensional space. IEEE J. Robot. Autom.
**1988**, 4, 193–203. [Google Scholar] [CrossRef] - Jones, M.; Baerentzen, J.; Sramek, M. 3D distance fields: A survey of techniques and applications. IEEE Trans. Vis. Comput. Graph.
**2006**, 12, 581–599. [Google Scholar] [CrossRef] - Sigg, C.; Peikert, R.; Gross, M. Signed distance transform using graphics hardware. In Proceedings of the IEEE Visualization, Seattle, WA, USA, 19–24 October 2003; pp. 83–90. [Google Scholar] [CrossRef]
- Mauch, S. A Fast Algorithm for Computing the Closest Point and Distance Transform. 2000. Available online: https://www.researchgate.net/publication/2393786_A_Fast_Algorithm_for_Computing_the_Closest_Point_and_Distance_Transform (accessed on 18 July 2023).
- Toga, A.W.; Payne, B.A. Distance Field Manipulation of Surface Models. IEEE Comput. Graph. Appl.
**1992**, 12, 65–71. [Google Scholar] [CrossRef] - Baerentzen, J.; Aanaes, H. Signed distance computation using the angle weighted pseudonormal. IEEE Trans. Vis. Comput. Graph.
**2005**, 11, 243–253. [Google Scholar] [CrossRef] [PubMed] - Thürrner, G.; Wüthrich, C.A. Computing Vertex Normals from Polygonal Facets. J. Graph. Tools
**1998**, 3, 43–46. [Google Scholar] [CrossRef] - Fuhrmann, A.; Sobottka, G.A. Distance Fields for Rapid Collision Detection in Physically Based Modeling. Proc. GraphiCon
**2003**, 2003, 58–65. [Google Scholar] - Baumgart, B.G. A polyhedron representation for computer vision. In Proceedings of the May 19–22, 1975, National Computer Conference and Exposition on—AFIPS ’75, Anaheim, CA, USA, 19–22 May 1975. [Google Scholar] [CrossRef]
- Fraga Filho, C.A.D. Reflective boundary conditions coupled with the SPH method for the three-dimensional simulation of fluid–structure interaction with solid boundaries. J. Braz. Soc. Mech. Sci. Eng.
**2024**, 46, 256. [Google Scholar] [CrossRef] - Müller, M.; Charypar, D.; Gross, M. Particle-based fluid simulation for interactive applications. In Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, San Diego, CA, USA, 26–27 July 2003; pp. 154–159. [Google Scholar]
- Desbrun, M.; Gascuel, M.P. Smoothed Particles: A new paradigm for animating highly deformable bodies. In Proceedings of the Eurographics Workshop, Poitiers, France, 31 August–1 September 1996; pp. 61–76. [Google Scholar]

**Figure 1.**Calculation of pseudonormal vectors of faces, edges, and vertices. The face pseudonormal is the cross-product of two edges, while the edge pseudonormal is the unweighted sum of the two triangles connected to the edge. The vertex pseudonormal is the weighted sum of all triangle face pseudonormals, whose triangles are connected to the vertex, weighted by the vertex’s angle in each triangle.

**Figure 2.**Visual representation of the pre-processing steps described for three mesh obstacles. The first mesh is represented with blue, the second with light green, and the third with dark green. Each mesh’s vertex, edge, and triangle data are stored into global lists that are then buffered into the GPU.

**Figure 3.**Depiction of a single triangle t with three vertices, a centroid calculated from the average position of the three vertices, and a face normal vector. With particle p with radius ${r}_{p}$, the steps are to first find $pro{j}_{p}$ and then calculate $pro{j}_{p,t}$, which lies on either a vertex, edge, or within t.

**Figure 4.**The Voronoi Region tessellation of $Plan{e}_{t}$ based on the planar 2D normal vectors of each edge. Regions are colored to distinguish them from one another in the visualization. The red dot represents $pro{j}_{p}$, a particle’s projection onto the 2D plane. (

**a**) The original 7 regions that need to be checked. (

**b**) An optimization that considers a 4-region rather than 7-region check.

**Figure 5.**Example process of checking which Voronoi region $pro{j}_{p}$ lies in. Regions are colored to distinguish them from one another in the visualization, and the red dot represents $pro{j}_{p}$. The process starts with Panel (

**a**) and shows that region ${R}_{{1}_{t}}$ is rejected. Panels (

**b**) and (

**c**) show the same with regions ${R}_{{1}_{t},{2}_{t}}$ and ${R}_{{1}_{t},{3}_{t}}$, respectively. The algorithm ends in Panel (

**d**) where $pro{j}_{p}$ is determined to be in region ${R}_{t}$. Therefore, $pro{j}_{p,t}=pro{j}_{p}$ and ${N}_{b}={N}_{t}$.

**Figure 6.**Overview of the general operational pipeline from the pre-processing to simulation step. In this visualization, three mesh obstacles are represented by blue, light green, and dark green. (

**a**) Pre-processing occurs prior to the first simulation step. (

**b**) During each simulation step, parallelization allows for each particle to be compared with each mesh obstacle and their vertices, edges, and triangles in thread groups on the GPU. The final determination of the closest mesh and its corresponding closest projection $pro{j}_{p,t}$ and boundary normal vector ${N}_{b}$ is calculated for each particle.

**Figure 7.**Calculation of the reflected velocity vector ${V}_{p}^{\prime}$ based on the particle’s initial velocity ${V}_{p}$, the projected point of p on the boundary manifold $pro{j}_{p,t}$, and the boundary normal vector ${N}_{b}$. Particle p is represented by the light blue circle whose center is the darker, inner circle. ${V}_{p}^{\prime}$ is derived from combining ${V}_{T}^{\prime}$, the tangential component of the reflected velocity that is affected by the boundary’s friction coefficient, and ${V}_{{N}_{b}}^{\prime}$, the normal component of the reflected velocity that is affected by the boundary’s restitution coefficient.

**Figure 8.**The flat-plane simulation run with an 8 × 8 grid of particles placed 0.125 m apart and forced to fall onto a horizontal plane. Panels (

**a**–

**f**) depict the pathlines of the 64 particles as they fall, while panel (

**g**) shows the final result in Unity3D that corresponds with panel (

**f**).

**Figure 9.**The inclined plane simulation run with a 5 × 5 grid of particles placed slightly further than the smoothing kernel radius and forced to fall onto the plane inclined at 10 degrees and with a friction coefficient of 0. Panels (

**a**–

**f**) depict the pathlines of five of particles as they fall and “roll” down the incline path, while panel (

**g**) shows the screenshot of the particles during movement in Unity3D.

**Figure 10.**The inclined plane simulation run with a 5 × 5 grid of particles placed slightly further than the smoothing kernel radius and forced to fall onto the plane inclined at 10 degrees with a friction coefficient of 1. Panels (

**a**–

**f**) depict the pathlines of five of particles as they fall and “stick” onto the inclined plane. Panel (

**g**) shows the screenshot of the particles at the end of the simulation run, where they still remain uphill and in formation.

**Figure 11.**A slice of the empty tank simulation depicting particles along the middle of the Z-axis and the resulting pressure gradient at the end of the simulation run. Visual observation shows that while the pressure gradient decreases with elevation, the sides of the simulation feature irregular pressure values among particles closest to the mesh edge. Irregular pressure values can also be seen along the bottom of the tank, where particles are touching the bottom of the cube mesh.

**Figure 12.**A slice of the wedged tank simulation depicting particles along the middle of the Z-axis and the resulting pressure gradient at the end of the simulation run. Visual observation shows similar results to the empty tank scenario, where the particles are directly touching or are in close proximity to the mesh boundaries experience irregular pressure values. The particles successfully conform to the manifold shape of the tank, following the general contour of the boundary in 3D space.

**Figure 13.**Screen captures of the dam break simulation from Unity3D, with each frame (

**a**–

**d**) depicting the status of the simulation at 1-second intervals. Coloration is indicative of particle speed from 0 m/s (blue) to 5 m/s (green). The wedged slope shows particles following the sloped contour to produce the wave-like flow that collides with the other side of the tank. The tank’s mesh boundary successfully prevents all particles from escaping the tank.

**Figure 14.**Screen captures of the flow field simulation with a concave sphere with a radius of 7.5 m. This visual was generated approximately 3 s after the start of the simulation. Panel (

**a**) visualizes the flow field as a cone field, while Panel (

**b**) is a screen capture of the Unity3D simulation. The Unity3D simulation uses a transparent sphere to highlight possible submerged particles. Both visualizations’ coloration represent particle speeds within a range of 0–30 m/s.

**Figure 15.**Screen captures of the flow field simulation with an elongated torus forming a tunnel that particles are expected to flow through. This visual was generated approximately 3 s after the start of the simulation. Panel (

**a**) visualizes the flow field as a cone field, while Panel (

**b**) is a screen capture of the Unity3D simulation. The Unity3D simulation uses a transparent torus to highlight possible submerged particles. Both visualizations’ coloration represent particle speed within a range of 0–30 m/s.

**Figure 16.**Screen captures of the flow field simulation with a cooking pot mesh creating a cavity where particles were expected to fall into and remain. This visual was generated approximately 3 s after the start of the simulation. Panel (

**a**) visualizes the flow field as a cone field, while Panel (

**b**) is a screen capture of the Unity3D simulation. The Unity3D simulation uses a transparent mesh to highlight possible submerged particles. Both visualizations’ coloration represent particle speeds within a range of 0–30 m/s.

Property | Notation | Equation |
---|---|---|

Vertices | ${V}_{t}=[{v}_{1},{v}_{2},{v}_{3}]$ | (Usually provided in mesh data) |

Centroid | ${c}_{t}$ | $\frac{{v}_{1}+{v}_{2}+{v}_{3}}{3}$ |

Face Pseudonormals * | ${N}_{t}$ | $\left\{\begin{array}{cc}({v}_{3}-{v}_{1})\times ({v}_{2}-{v}_{1})\hfill & \mathrm{if}\phantom{\rule{4.pt}{0ex}}\mathrm{CCW}\hfill \\ ({v}_{2}-{v}_{1})\times ({v}_{3}-{v}_{1})\hfill & \mathrm{if}\phantom{\rule{4.pt}{0ex}}\mathrm{CW}\hfill \end{array}\right.$ |

Edge Pseudonormals | ${N}_{a,b}\mid {v}_{a},{v}_{b}\in {V}_{t}$ | ${N}_{b}=\frac{{\sum}_{t}^{{T}_{a,b}}{N}_{t}}{\parallel {\sum}_{t}^{{T}_{a,b}}{N}_{t}\parallel}$, where ${T}_{a,b}$ is the set of triangles connected to the edge between ${v}_{a}$ and ${v}_{b}$ |

Vertex Peudonormals | ${N}_{a}|{v}_{a}\in {V}_{t}$ | ${N}_{a}=\frac{{\sum}_{t}^{{T}_{{v}_{a}}}{\alpha}_{a,t}{N}_{t}}{\parallel {\sum}_{t}^{{T}_{{v}_{a}}}{\alpha}_{a,t}{N}_{t}\parallel}$, where ${T}_{{v}_{a}}$ is the set of triangles connected to ${v}_{a}$ and ${\alpha}_{a,t}$ is the vertex angle of ${v}_{a}$ in triangle t |

Region | Check | Outputs |
---|---|---|

${R}_{c}$ | $(pro{j}_{p}-{v}_{c})\xb7{E}_{1}\le 0$ and $(pro{j}_{p}-{v}_{c})\xb7{E}_{2}\le 0$ | $pro{j}_{p,t}={v}_{c}$ ${N}_{b}$ is the vertex pseudonormal vector. |

${R}_{1}$ | $(pro{j}_{p}-{v}_{c})\xb7{N}_{1}\ge 0$ | $pro{j}_{p,t}={v}_{c}+\frac{(pro{j}_{p}-{v}_{c})\xb7{E}_{1}}{{E}_{1}\xb7{E}_{1}}{E}_{1}$ ${N}_{b}$ is ${E}_{1}$’s pseudonormal vector. |

${R}_{2}$ | $(pro{j}_{p}-{v}_{c})\xb7{N}_{2}\ge 0$ | $pro{j}_{p,t}={v}_{c}+\frac{(pro{j}_{p}-{v}_{c})\xb7{E}_{2}}{{E}_{2}\xb7{E}_{2}}{E}_{2}$ ${N}_{b}$ is ${E}_{2}$’s pseudonormal vector. |

${R}_{t}$ | Other checks fail; default condition | $pro{j}_{p,t}=pro{j}_{p}$ ${N}_{b}$ is the face pseudonormal vector. |

Flat-Plane | Number of Particles | 64 | Ideal Density ${\rho}_{0}$ | 1000 |

Initial Spacing ^{ab} | 0.125 | Viscosity Coeff. | 0.001 | |

Render Size ^{b} | 0.12 | Bulk Modulus (k) | 100 | |

Particle Mass | 1 | Friction Coeff. (${c}_{friction}$) | 0.0 | |

Kernel Radius ^{b} | 0.125 | Restitution Coeff. (${c}_{rest}$) | 0.25 | |

10 deg. In-clined Plane (Slip) | Number of Particles | 25 | Ideal Density ${\rho}_{0}$ | 1000 |

Initial Spacing ^{ab} | 0.2 | Viscosity Coeff. | 0.001 | |

Render Size ^{b} | 0.12 | Bulk Modulus (k) | 100 | |

Particle Mass | 1 | Friction Coeff. (${c}_{friction}$) | 0.0 | |

Kernel Radius ^{b} | 0.125 | Restitution Coeff. (${c}_{rest}$) | 0.25 | |

10 deg. In-clined Plane (No-Slip) | Number of Particles | 25 | Ideal Density ${\rho}_{0}$ | 1000 |

Initial Spacing ^{ab} | 0.2 | Viscosity Coeff. | 0.001 | |

Render Size ^{b} | 0.12 | Bulk Modulus (k) | 100 | |

Particle Mass | 1 | Friction Coeff. (${c}_{friction}$) | 1.0 | |

Kernel Radius ^{b} | 0.125 | Restitution Coeff. (${c}_{rest}$) | 0.25 |

^{a}“Initial Spacing” refers to the initial spacing between particle centers during the initialization of a simulation scene.

^{b}All distance units are in Unity3D meters.

Tank (Empty) | Number of Particles | 15,750 | Ideal Density ${\rho}_{0}$ | 1000 |

Initial Spacing ^{ab} | 0.2 | Viscosity Coeff. | 0.001 | |

Render Size ^{b} | 0.05 | Bulk Modulus (k) | 250 | |

Particle Mass | 1 | Friction Coeff. (${c}_{friction}$) | 0.0 | |

Kernel Radius ^{b} | 0.2 | Restitution Coeff. (${c}_{rest}$) | 0.25 | |

Tank (with Wedge) | Number of Particles | 13,500 | Ideal Density ${\rho}_{0}$ | 1000 |

Initial Spacing ^{ab} | 0.2 | Viscosity Coeff. | 0.001 | |

Render Size ^{b} | 0.05 | Bulk Modulus (k) | 250 | |

Particle Mass | 1 | Friction Coeff. (${c}_{friction}$) | 0.0 | |

Kernel Radius ^{b} | 0.2 | Restitution Coeff. (${c}_{rest}$) | 0.25 | |

Dam Break | Number of Particles | 20,445 | Ideal Density ${\rho}_{0}$ | 600 |

Initial Spacing ^{ab} | 0.15 | Viscosity Coeff. | 0.001 | |

Render Size ^{b} | 0.05 | Bulk Modulus (k) | 250 | |

Particle Mass | 1 | Friction Coeff. (${c}_{friction}$) | 0.0 | |

Kernel Radius ^{b} | 0.2 | Restitution Coeff. (${c}_{rest}$) | 0.25 |

^{a}“Initial Spacing” refers to the initial spacing between particle centers during the initialization of a simulation scene.

^{b}All distance units are in Unity3D meters.

Flow Field (Sphere, Torus, and Bowl) | Number of Particles | 31,250 | Ideal Density ${\rho}_{0}$ | 600 |

Initial Spacing ^{ab} | 0.3 | Viscosity Coeff. | 0.001 | |

Render Size ^{b} | 0.1 | Bulk Modulus (k) | 250 | |

Particle Mass | 1 | Friction Coeff. (${c}_{friction}$) | 0.0 | |

Kernel Radius ^{b} | 0.2 | Restitution Coeff. (${c}_{rest}$) | 0.25 |

^{a}“Initial Spacing” refers to the initial spacing between particle centers during the initialization of a simulation scene.

^{b}All distance units are in Unity3D meters.

Scene | Num. Particles | Num. Obstacles | Num. Vertices | Num. Edges | Num. Triangles | Average FPS |
---|---|---|---|---|---|---|

Flat Plane | 64 | 2 | 12 | 23 | 14 | 179.912 |

10 Deg Inclined Plane (Slip) | 25 | 2 | 12 | 23 | 14 | 268.041 |

10 Deg Inclined Plane (No-Slip) | 25 | 2 | 12 | 23 | 14 | 251.574 |

Tank (Empty) | 15,750 | 1 | 8 | 18 | 12 | 179.894 |

Tank (with Wedge) | 13,500 | 2 | 14 | 30 | 20 | 189.525 |

Dam Break | 20,445 | 2 | 14 | 30 | 20 | 149.303 |

Flow Field (Sphere) | 31,250 | 2 | 394 | 1170 | 780 | 155.875 |

Flow Field (Torus) | 31,250 | 2 | 392 | 1170 | 780 | 152.735 |

Flow Field (Bowl) | 31,250 | 2 | 144 | 408 | 272 | 150.070 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2024 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 (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Kim, R.; Torrens, P.M.
Boundary SPH for Robust Particle–Mesh Interaction in Three Dimensions. *Algorithms* **2024**, *17*, 218.
https://doi.org/10.3390/a17050218

**AMA Style**

Kim R, Torrens PM.
Boundary SPH for Robust Particle–Mesh Interaction in Three Dimensions. *Algorithms*. 2024; 17(5):218.
https://doi.org/10.3390/a17050218

**Chicago/Turabian Style**

Kim, Ryan, and Paul M. Torrens.
2024. "Boundary SPH for Robust Particle–Mesh Interaction in Three Dimensions" *Algorithms* 17, no. 5: 218.
https://doi.org/10.3390/a17050218