# OGSM: A Parallel Implicit Assembly Algorithm and Library for Overlapping Grids
## 1 Introduction  
Thanks to the development of large-scale parallel computing technology, computational fluid dynamics (CFD) is becoming increasingly significant in dealing with unsteady numerical simulations [1]. It is well acknowledged that a single grid is no longer satisfactory for the simulation of complex multi-body dynamics such as the dynamic flow field of flapping wings [2], the internal flow field of turbines [3], the aerodynamic interactions of a rigid coaxial rotor in hover [4] and external store separation [5]. Consequently, overlapping grids [6; 7; 8] are often utilized for complex configurations consisting of multiple components, and the efficient assembly of overlapping grids has attracted much attention from domestic and foreign researchers. The assembly methods for overlapping grids can be divided into two categories, i.e., the explicit methods and their implicit counterparts. The explicit methods [9; 10; 11] need to construct a hole boundary in the vicinity of the solid wall when determining cell types and manually assign the overlapping relation matrix for multiple component grids. As a result, these procedures feature a low level of automation. The implicit methods [12; 13], on the contrary, utilize only the topology information and the wall-distance parameters between component grids to perform the grid assembly. Overlapping grids are usually implicitly assembled in three steps. First, the active and inactive nodes are distinguished based on criteria such as wall distance [12], which can identify the position of the hole-cutting boundaries. Then, the grid cells are divided into different categories, e.g., overlapping cells, flow-field cells and in-hole cells. Finally, the overlapping cells and donor cells on the grids of different components are matched. For the first two steps, [PERSON] [12], [PERSON] [14] and [PERSON] [15] all employed the walldistance criterion [12] to divide the sets of nodes and volume cells, which has the following two deficiencies. (1) The influence of the external boundaries on the hole-cutting boundary position is ignored. The external boundaries and the solid-wall boundaries jointly constrain the spatial coverage of the cells in the current grid on the nodes of the other grids. Therefore, the hole-cutting boundaries determined by simply comparing the wall distance may sometimes lie outside the overlapping regions of the grids, which breaks the connectivity of the computational regions. (2) The transitional cell consisting of both active and inactive nodes is considered an overlapping cell, which may lead to invalid donor cells. Besides, the transitional cells on different components are treated in the same way, and the data exchange involved is not allowed in numerical simulations [16]. Since large-scale CFD simulations are usually performed in parallel supercomputers, the parallelization of an implicit assembly algorithm is indispensable for the usability of overlapping grids in various engineering problems. Many commercial codes [17; 18; 19; 20; 21; 22] have been developed with the aim to improve the implicit assembly efficiency. PEGASUS [19] parallelized the overlapping grids assembly, whereas the primary parameters were manually controlled, yielding a low level of automation. The SUGGAR series software [20; 21] embedded the assembly of structured and unstructured overlapping grids in numerous flow-field solvers; however, their hole-cutting algorithm could not adapt to unclosed geometry configurations. The assembly middleware TIOGA [22] combined fast search algorithms with the dynamic load balancing technology, thereby enhancing the efficiency of parallel assembly; however, the inherent properties of the algorithm resulted in poor smoothness of the hole boundary, which correspondingly affected the flow simulation quality.