Robust event-driven particle tracking in complex geometries

https://doi.org/10.1016/j.cpc.2020.107229Get rights and content

Abstract

Particle tracking, that is, the repeated localization of particles within a grid by means of tracking the particles’ trajectories, is routinely applied in particle-based schemes where the domain is described by an unstructured polyhedral grid. A range of tracking algorithms are available in the literature, which are inherently similar to algorithmic approaches common both in event-driven particle dynamics (EDPD) and ray-tracing methods. We propose a reformulation of existing particle tracking algorithms in the context of EDPD. On the one hand, this resolves inconsistencies in the mapping between particle positions and grid cells triggered, e.g., by imperfect grids. More importantly, it allows the specification of solid objects via constructive solid geometry (CSG), a standard technique for the modeling of solids in computer-aided design. While usually considered contrary approaches, our description of the computational domain as the combination of a bounding volume defined by an unstructured grid and solids modeled via CSG embedded into this volume can be highly advantageous. The two different approaches of modeling the computational domain complement each other perfectly, as the CSG representation is not only efficient in terms of memory and computing time, but also avoids the challenges of generating finely resolved unstructured grids in the presence of complicated boundaries. These benefits, as well as the positive impact of several algorithmic optimizations of the extended tracking algorithm, are exemplified via a particle-based simulation of a gas flow through a highly porous medium.

Introduction

Particle models are one of the earliest applications of computer simulation, first appearing in 1957 [1]. Initially, the technique could only be applied to relatively simple problems due to limitations in the available computational resources; however, modern applications of particle-based methods include both complex applied engineering problems [2], [3], [4] and fundamental research into coupled fluid–particle problems [5], [6], [7]. These simulations typically require accurate descriptions of fluid–particle and fluid–boundary interactions at both the macroscopic scale, such as in the optimization of fluidized bed reactors [8], [9], [10], [11], and on the microscopic scale, such as in colloidal suspensions [12], [13], [14], [15].

A common motif of these simulations is the requirement to handle boundary conditions of complicated shape. The usage of unstructured polyhedral grids/meshes, as they are most prominent in the context of finite element analysis, allows for a convenient definition of the computational domain also in the case of particle simulations. In general, the mesh here serves merely as a geometric description of the domain, the dynamics of the system are tied to the particles. The specific role of the mesh in the context of the simulation scheme depends on the exact method. Particles typically interact in some way or another with the boundaries of the system, linked to the surface elements of the grid. Additionally, neighbor-lists [16] are commonly employed, which logically group particles based on their spatial proximity. These neighbor-lists are used to optimize the calculation of physical interactions between particles by accelerating the search for nearby particles. The concept of neighbor-lists is independent of the shape of the grid cells, as long as a mapping between the particles’ position and the corresponding grid cells can be obtained at any time. This mapping is also essential if a particle-based method such as the discrete element method (DEM) is coupled with an Eulerian method, e.g., for the simulation of a fluidized bed reactor [17].

Independent of the exact use of the mesh, it is necessary to derive a mapping from the current particle position to the enclosing mesh element and vice versa. There are two general approaches to this: (1) particles are repeatedly sorted into the elements of the mesh at regular intervals or (2) particles are tracked as they move through the mesh (after an initial sorting step). For structured grids, the sorting operation can usually be implemented efficiently by evaluating a closed-form expression; for unstructured grids, however, the naive attempt of checking the position against all elements in the mesh is too computationally expensive to perform. Assuming, however, the mapping of the initial position is available for each particle, e.g., by resorting to optimized search data structures such as quad-/octrees [18], [19] or k–d trees [20], the tracking of particles provides an efficient method to maintain the mapping, independent of the structure of the grid. Tracking the trajectory of particles avoids the potentially high computational cost of regular sorting but requires the overhead of determining the transition times when particles cross the boundaries of their enclosing mesh element (or cell). Even for complex meshes, this overhead is usually relatively small and thus a wide variety of algorithms implementing this approach have become available [21], [22], [23], [24], [25], [26]. While the basic algorithms are well studied and variations supporting specialized configurations are available, we here want to address two remaining issues with existing approaches.

First, particle tracking algorithms are susceptible to failures triggered by imperfect meshes as well as floating-point imprecision itself. This can result in inconsistencies between a particle’s position and the derived mapping to a cell, up to the point where particles are “lost” in-between cells. Several other publications [21], [22], [23], [24], [25], [26], [27] address this issue, yet the resulting algorithms are constructed without an underlying general formalism. The equivalent challenges for event detection algorithms in event-driven particle dynamics (EDPD) [28], [29] as well as algorithmic solutions are presented by the authors in previous contributions [30], [31]. Based on the equivalence of particle tracking and EDPD which is established in Section 2, the framework for event-driven tracking algorithms is introduced and an inherently robust yet computationally efficient tracking algorithm for unstructured meshes is derived in Section 3.

Second, while particle-based simulations using particle tracking in unstructured meshes allow for simulation domains of complex shape, this does come at a cost. The process of generating the volumetric mesh can be tedious, time consuming, and often require manual steps. This becomes especially problematic in the presence of larger numbers of (not necessarily stationary) obstacles embedded into the domain. Additionally, the computational cost of the particle tracking is a function of the ratio between the distance particles travel during one tracking step and the spatial extent of the mesh elements. For some simulation models where the computational cost of the interaction model capturing the physics of the system is limited, the particle tracking can then dominate the execution time of the simulation. In Section 4 we thus propose an extension to the tracking algorithm that relies on the description of parts of the domain using constructive solid geometry (CSG). To limit the impact of this extension towards CSG on the computational performance, in Section 5 several optimization strategies are presented. While still an underlying grid has to be generated using the typical procedures, this grid does not have to capture the surface features of the obstacles embedded into the domain. Especially for simulations where the obstacles are placed dynamically during the initialization or even follow their own dynamics this is a significant advantage. As an example, a single mesh can be reused to study a large number of different packings, simply by adjusting the parameters of the obstacles. The capabilities of this hybrid approach of using a mesh and additional obstacles defined using CSG are illustrated in Section 6. An open-cell foam is modeled using analytical geometric shapes for the simulation of a gas flow using a particle-based method. By changing the radii of the pores packings of different porosity can be automatically generated without any re-meshing.

Section snippets

Event-driven particle tracking

Consider a bounded and connected domain, ΩRd, of dimensionality d which is then decomposed into a mesh, M={Ei}i=1NE, of NE closed non-empty convex polyhedral elements/cells, Ei, satisfying, Ω=i=1NEEi.It is also required that the interiors of the elements are exclusive of each other, i.e., ij,int(Ei)int(Ej)=where i,j{1,,NE}.Although the interiors of elements are distinct, neighboring elements must share (depending on the dimensionality) vertices, edges, and facets as they are closed

Robust event detection for particle tracking

In order to formulate a robust EDPD methodology, the authors systemized the approach for obtaining stable event detection algorithms in a previous work [30]. There, several fundamental concepts are introduced: (1) the definition of valid states, (2) suitable overlap functions, and (3) stabilizing interactions. For EDPD, a valid state can be defined as a physically meaningful configuration of particles, e.g., for a hard-sphere system a configuration where no particles are overlapping. Whether a

Constructive solid geometry

While particle tracking in combination with unstructured meshes allows for particle-based simulations in complex geometries, there is a serious downside: The computational cost is a function of the distance particles travel in between tracking steps and the resolution of the mesh. In order to capture boundary features that are small compared to the overall size of the computational domain, a finely resolved mesh is required, at least locally. This is feasible for many technical devices such as

Optimization of particle tracking using CSG

For simulations using more elaborate CSG models than the examples depicted in Fig. 3 consisting only of a few primitives, the event prediction using the full CSG tree can become a bottleneck. It is therefore vital to integrate standard optimization techniques from the field of CSG modeling into the tracking scheme.

Application example: Open-cell foams

The advantages of using the hybrid representation of a computational domain via a mesh and CSG objects embedded into it for a particle-based simulation can be illustrated using the example of fluid flows through open-cell foams. These foams feature a high porosity which makes them attractive for reactive gas flows due to the combination of a large surface area with a low pressure drop. It is this high porosity, however, which poses a challenge for numerical simulations as the struts between the

Conclusions

The tracking of particles in unstructured grids can be considered a special case of event-driven particle dynamics and as such can benefit from recent improvements in the numerical robustness of the method. With this, it is possible to construct an inherently stable event-driven particle tracking scheme. This event-driven tracking scheme can be extended to allow the integration of complex-shaped boundaries modeled using the technique of constructive solid geometry (CSG). Using this

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

The authors gratefully acknowledge the support of the German Research Foundation (DFG) through Grants PO 472/20 and SFB-814. FPS and ZISC are thanked for support. We would like to thank Prapanch Nair for helpful discussions.

References (43)

  • KuangS.B. et al.

    Int. J. Multiph. Flow.

    (2008)
  • MartinG. et al.

    Comput. Fluids

    (2009)
  • DonevA. et al.

    J. Comput. Phys.

    (2005)
  • ScanlonT. et al.

    Comput. Fluids

    (2010)
  • TheisC. et al.

    Nucl. Instrum. Methods Phys. Res. A

    (2006)
  • SmorygoO. et al.

    Acta Mater.

    (2011)
  • BoomsmaK. et al.

    Int. J. Heat Fluid Flow

    (2003)
  • AlderB.J. et al.

    J. Chem. Phys.

    (1957)
  • AlexeenkoA.A. et al.

    J. Microelectromech. Syst.

    (2006)
  • LoM.-C. et al.

    Commun. Comput. Phys.

    (2015)
  • LimE.W.C. et al.

    AIChE J.

    (2006)
  • Cited by (6)

    • Rarefied reactive gas flow in T-shape microreactors

      2021, Applied Thermal Engineering
      Citation Excerpt :

      Moreover, the code is based on quite novel particle tracking algorithms in complex geometries and has been thoroughly tested on several benchmark problems. For details on the code, the readers are referred to [4–6]. This study investigates the rarefied reactive gas flow in the T-shape microreactor with the aim to develop better understanding of reactive fluid flow on such small scales.

    • A SCALABLE LAGRANGIAN PARTICLE TRACKING METHOD

      2021, PARTICLES 2021 - 7th International Conference on Particle-Based Methods: Fundamentals and Applications

    The review of this paper was arranged by Prof. D.P. Landau.

    View full text