Abstract:
In CFD simulations, the wall-distance field plays a fundamental role in RANS-model computations, overset-grid assembly, enrichment-function methods, and related procedures. On unstructured meshes, distance-field computation typically falls into three categories: search-based methods, partial-differential-equation (PDE) methods, and iterative methods. Within the class of iterative methods, the Fast Iterative Method (FIM) is well suited to unstructured meshes and offers both high efficiency and good robustness. This work therefore presents the implementation of FIM on the domestic open-source CFD platform PHengLei. To accommodate PHengLei’s data structures and improve computational performance, we reformulate FIM into a cell-centered scheme, designing a parallel FIM algorithm that relies solely on the degrees of freedom located at cell centers by introducing a dual control volume based on cell-centered interpolation. In addition, to accelerate three-dimensional computations, we derive a closed-form analytical expression for the local optimization step in 3D FIM, further enhancing efficiency. Tests show that, compared with PHengLei’s original ADT (Alternating Digital Tree)-based method, the present FIM approach yields sufficiently small wall-distance errors and introduces negligible differences in CFD solutions based on the Spalart–Allmaras (SA) model. When the mesh contains more than ten million cells and the wall-cell count exceeds several hundred thousand, FIM achieves up to a fourfold speedup over the ADT method. Overall, the FIM method demonstrates acceptable accuracy while exhibiting substantially better parallel scalability and computational efficiency than PHengLei’s existing approach, showing promising potential for practical application. The source code and test cases used in this work have been made available on an open-source platform.