Improved Algorithm for Reconstructing Singular Connection in Multi-Block CFD Applications

Yongxian Wang, Lilun Zhang, Yonggang Che, Chuanfu Xu, Wei Liu, Huayong Liu, Zhenghua WangarXiv 2017 · DOI

Abstract

An improved algorithm is proposed for the reconstruction of singular connectivity from the available pairwise connections during the preprocessing phase. To evaluate the performance of the algorithm, an in-house computational fluid dynamics (CFD) code utilizing a high-order finite-difference method for spatial discretization was run on the Tianhe-1A supercomputer. Test cases with varying mesh point counts indicate that the improved singular connection reconstruction algorithm achieves speedup factors of 1000X or more compared to the naive search method. Furthermore, parallel efficiency is enhanced through a local communication strategy based on this algorithm.

Introduction: The Challenge of Singular Nodes

In Computational Fluid Dynamics (CFD), simulating airflow around complex geometries like aircraft often necessitates dividing the physical space into a multi-block structured grid. While this decomposition simplifies the mathematical formulation, it introduces significant bookkeeping challenges at the block interfaces.

When multiple blocks meet at a single physical point, such as at a corner or a specific junction, it is referred to as a singular node. Standard grid generation tools typically export only pairwise (block-to-block) connectivity. Consequently, they "forget" that a specific node in one block is physically identical to nodes in several other blocks.

Visualizing singular nodes: (a) shows the junction of three blocks, and (b) illustrates the equivalent nodes that must be synchronized.

During simulation, these "ghost nodes" must remain synchronized to maintain physical accuracy. Identifying these equivalent nodes quickly is a critical preprocessing step. As simulations scale to millions of blocks on supercomputers, traditional "naive" search methods have become a major bottleneck.

Methodology: From Naive Search to Optimized Reconstruction

The research compares two primary approaches for identifying these singular connections:

  1. Algorithm 1 (Baseline): A naive search method with $O(N^2)$ computational complexity. It iterates through all candidate nodes to find matches, which becomes computationally prohibitive for modern large-scale grids.
  2. Algorithm 2 (Improved): The proposed high-efficiency algorithm optimizes the process through several key engineering strategies:
  3. Edge-Focused Search: Singularities must reside on block edges. By restricting the search space to edge nodes ($M$) rather than all surface nodes ($N$), the data volume is drastically reduced ($M \ll N$).
  4. Binary Sort Trees: Replacing linear searches with binary trees reduces search time to $O(\log M)$.
  5. Bucket Partitioning: Connectivity data is repartitioned into "buckets" based on block numbers, further minimizing the number of comparisons required.
The improved algorithm for reconstructing singular singularities, focusing on candidate grid nodes on block edges.

The resulting complexity is reduced to $O(N \log M)$, providing much better scaling for massive grids.

Experimental Results and Performance

The algorithm was validated using 14 configurations across four aerodynamic shapes: the DLR-F6 transport wing-body, NACA0012 airfoil, Delta Wing, and 30P30N multi-element airfoil. Test cases ranged from 13 million to 760 million cells, partitioned into up to 17,920 blocks.

The performance gains were transformative:

  • Massive Speedup: In a Delta Wing case with 106 million cells and 4,532 blocks, the original algorithm required 9.4 hours. The improved algorithm completed the task in less than one second.
  • Scalability: For the largest 30P30N airfoil cases, where the original method was estimated to take over 3 days, the new version finished in under 4 seconds—a speedup factor exceeding 360,000X.
  • Linear Growth: Results confirmed that while the old method's execution time grew quadratically ($T \propto N_s^2$), the new method scales almost linearly ($T \propto N_s$), making it suitable for future exascale computing tasks.

Conclusion

By leveraging the topological property that singular nodes must lie on block edges and employing optimized data structures, the proposed algorithm eliminates a significant bottleneck in CFD preprocessing. While currently limited to 1-to-1 connections, the efficiency gains demonstrate that intelligent search space reduction is vital for high-performance multi-block simulations.

Summary updated

BibTeX
@misc{wang2017improved,
  author = {Yongxian Wang and Lilun Zhang and Yonggang Che and Chuanfu Xu and Wei Liu and Huayong Liu and Zhenghua Wang},
  title = {{Improved Algorithm for Reconstructing Singular Connection in Multi-Block CFD Applications}},
  year = {2017},
  eprint = {1711.00110},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.00110},
}
Figure