A high-efficiency parallel wall distance calculation method for complex geometry components
By combining distributed parallel computing and hash bucket indexing with Newton's iterative projection method, the problem of low efficiency in calculating wall distances in complex geometries is solved, achieving efficient parallel computing and accurate wall distance prediction, which is suitable for complex flow field simulations such as aero-engines and combustion chambers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TAIHANG NATIONAL LABORATORY
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-21
AI Technical Summary
Existing turbulence models suffer from low efficiency in calculating wall distances and poor parallel scalability when simulating complex geometries such as aero-engines, turbomachinery, and combustion chambers, resulting in low computational accuracy.
The distributed parallel computing framework MPI is adopted to divide the mesh model of complex geometric parts into multiple mesh blocks. Each MPI process processes one mesh block. Cross-process data synchronization is achieved through globally unique wall mesh cell IDs, and wall distances are calculated by combining hash bucket spatial indexing and Newton's iterative projection method.
It improves computational efficiency and accuracy in large-scale parallel computing environments, is suitable for high-precision flow field simulation of complex geometries, and ensures the integrity and consistency of wall information.
Smart Images

Figure CN121503340B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aero-engine technology and discloses a method for calculating turbulent, efficient, parallel wall distances applicable to complex geometric components. Background Technology
[0002] In the design and performance analysis of aerospace propulsion systems (such as aero-engines and gas turbines), computational fluid dynamics (CFD) numerical simulation has become an indispensable key tool. The high-speed rotating flow field inside turbomachinery (compressors, turbines), the complex reactive flow within the combustion chamber, and the coupling effects between them all rely on high-precision CFD simulations for prediction and optimization. One of the core aspects of these simulations is accurately capturing the flow characteristics in the near-wall region, which directly relates to aerodynamic efficiency, heat transfer prediction, flow loss estimation, and component life assessment.
[0003] In most widely used industrial-grade turbulence models (such as the k-omega SST model, k-epsilon model, and LES model), wall distance is an extremely important input parameter when simulating the effects of walls. Wall distance is typically defined as the Euclidean distance from the center (or node) of the computational grid cell to the nearest solid wall. The accuracy of this parameter directly affects the prediction accuracy of the turbulence model for the near-wall viscous sublayer, transition zone, and fully developed turbulent region, and consequently affects the reliability of key engineering parameters such as wall shear stress and heat flux density.
[0004] However, in applications such as aero-engines, turbomachinery, and combustion chambers, the geometry is extremely complex. To accurately capture these complex geometric details and the flow phenomena in their vicinity, the generated CFD meshes typically have a massive number of cells (tens of millions or even hundreds of millions of cells) and diverse mesh types (unstructured meshes, hybrid meshes, multi-block structured meshes, etc.), with complex cell topological relationships.
[0005] Traditional methods for calculating wall distances suffer from problems such as low computational efficiency, poor parallel scalability, and inaccurate wall distance calculations in large-scale computations and complex geometries.
[0006] Therefore, in high-precision CFD applications such as aero-engines, turbomachinery, and combustion chambers, there is an urgent need for a wall distance calculation method that can effectively handle extremely complex geometries and massive mesh sizes, and has high efficiency and good scalability in a large-scale parallel computing environment. Summary of the Invention
[0007] The purpose of this invention is to provide an efficient parallel wall distance calculation method for turbulent components with complex geometry, which can handle extremely complex geometry and massive mesh size, and improve computational efficiency in large-scale parallel computing environments.
[0008] To achieve the above-mentioned technical effects, the technical solution adopted by the present invention is as follows:
[0009] An efficient parallel method for calculating turbulent wall distances applicable to complex geometric components includes:
[0010] The target component simulation model is uniformly divided into several mesh blocks, the number of which is equal to the number of preset MPI processes and corresponds one-to-one; each MPI process identifies the wall mesh cells and the vertex coordinates of each wall mesh cell from the mesh partition file of the corresponding mesh block, calculates the geometric center coordinates and normal vector of each wall mesh cell based on the vertex coordinates of each wall mesh cell, and assigns a globally unique wall mesh cell ID to each wall mesh cell.
[0011] Each MPI process obtains the geometric center coordinates, normal vector, and wall mesh element ID of the global wall mesh element;
[0012] Construct a global bounding box containing all wall mesh units of the target component; calculate the size of the global bounding box, and combine it with the preset hash bucket size to evenly divide the space within the global bounding box into several hash buckets; calculate the three-dimensional bucket coordinates of each hash bucket and map them to one-dimensional bucket index values; and create a one-dimensional index array of the global hash bucket space.
[0013] Each MPI process traverses each fluid grid cell in the corresponding grid block and locates the set of candidate wall grid cell IDs corresponding to each fluid grid cell through a spatial hash mapping mechanism.
[0014] Based on the set of candidate wall cell IDs for each fluid grid cell, the distance from each fluid grid cell to all corresponding candidate wall grid cells is calculated using the Newton-Raphson iteration method. The minimum distance value is then selected as the wall distance for each fluid grid cell and stored.
[0015] Furthermore, based on the vertex coordinates of each wall mesh cell, the geometric center coordinates of each wall mesh cell are calculated using a node averaging algorithm, and then the normal vector of each wall mesh cell is calculated using the vertex vector cross product method.
[0016] Furthermore, the method for constructing a global bounding box containing all wall mesh elements of the target component is as follows: each MPI process traverses the geometric center coordinates of all wall mesh elements within the process, and... X axis, Y axis, Z Find the maximum and minimum values of the geometric center coordinates along the axis, and then construct a sub-bounding box containing all wall elements within the process, using the maximum and minimum values as boundaries; then construct a global bounding box containing all wall mesh elements of the target part based on all sub-bounding boxes.
[0017] Furthermore, the method for calculating the global bounding box size and, in conjunction with the preset hash bucket size, uniformly dividing the space within the global bounding box into several hash buckets is as follows:
[0018] Based on the geometric center coordinates of the inner wall mesh elements of the global bounding box X axis, Y axis, Z The maximum and minimum values of the coordinates along the axes are used to calculate the global bounding box. X axis, Y axis, Z Dimensions along the axial direction;
[0019] Set the global bounding box in X axis, Y axis, Z Divide the dimensions along the axes by the preset hash bucket size to obtain the global bounding box. X axis, Y axis, Z The number of hash buckets along the axis is calculated, and then the space within the global bounding box is evenly divided into several hash buckets.
[0020] Furthermore, the expression for calculating the three-dimensional bucket coordinates of each hash bucket is:
[0021] ;
[0022] ;
[0023] ;
[0024] in: , , Hash buckets respectively X axis, Y axis, Z Bucket coordinates on the axis; , , The geometric centers of the mesh elements on the inner wall of the hash bucket are respectively located at X axis, Y axis, Z Coordinates on the axis; , , The global bounding box is in X axis, Y axis, Z Minimum value of coordinate along the axis; Preset hash bucket size; This is the floor function.
[0025] Furthermore, the preset hash bucket size is 1.5 to 3 times the diameter of the circumscribed sphere corresponding to the largest wall element in the simulation model of the target component.
[0026] Furthermore, the expression for mapping the three-dimensional bucket coordinates of each hash bucket to a one-dimensional bucket index value is as follows:
[0027] ;
[0028] in: This is the index value of the one-dimensional bucket. For global bounding box in Y The number of hash buckets along the axis; For global bounding box in Z The number of hash buckets along the axis.
[0029] Furthermore, the steps of each MPI process traversing each fluid grid cell in the corresponding grid block and locating the candidate wall grid cell ID set corresponding to each fluid grid cell through a spatial hash mapping mechanism include:
[0030] In each MPI process's grid block, select any fluid grid cell as the target fluid grid cell. Based on the geometric center coordinates of the target fluid grid cell, determine the three-dimensional bucket coordinates of the main bucket where the target fluid grid cell is located, and map them to one-dimensional index values.
[0031] Centered on the main bucket where the target fluid grid cell is located, search all candidate hash buckets adjacent to the main bucket within a preset neighborhood radius;
[0032] Based on the one-dimensional index value of each candidate hash bucket, the wall grid cell ID stored in each candidate hash bucket is retrieved from the one-dimensional index array of the global hash bucket space to obtain the list of candidate wall grid cell IDs corresponding to the candidate hash bucket;
[0033] Traverse all fluid mesh cells within each MPI process to obtain the set of candidate wall mesh cell IDs corresponding to all fluid mesh cells.
[0034] Compared with the prior art, the beneficial effects of this invention are:
[0035] This invention employs the distributed parallel computing framework MPI, which decomposes large-scale grid computing tasks into multiple independent subtasks, which are processed in parallel by different computing nodes, thereby improving computational efficiency. Cross-process data synchronization is achieved through globally unique wall grid cell IDs, ensuring the integrity and consistency of wall information in complex geometric models. By combining hash bucket spatial indexing and Newton's iterative projection method, computational complexity is reduced while maintaining computational accuracy, making it suitable for high-precision flow field simulation scenarios with complex geometries such as aero-engine turbine blades and gas turbine combustors. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the efficient parallel wall distance calculation method for turbulent flow applicable to complex geometric components in the embodiments. Detailed Implementation
[0037] The present invention will now be described in further detail with reference to the embodiments and accompanying drawings. However, this should not be construed as limiting the scope of the above-described subject matter of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.
[0038] Example 1
[0039] See Figure 1 This embodiment provides an efficient parallel wall distance calculation method for turbulent flow suitable for complex geometries. It employs a distributed memory parallel computing architecture and utilizes MPI (Message Passing Interface) to achieve multi-process parallel computation. The entire computational domain is divided into multiple mesh blocks, with each MPI process responsible for processing one mesh block. Each process independently calculates the distance from all fluid mesh cells to wall mesh cells within its assigned mesh block, and processes coordinate through MPI communication. The wall distance calculation method includes the following steps:
[0040] The simulated model of the target component is uniformly divided into several mesh blocks, the number of which is equal to and corresponds one-to-one with the number of preset MPI processes. Each MPI process identifies the wall mesh elements and the vertex coordinates of each wall mesh element from the mesh partition file of the corresponding mesh block. Based on the vertex coordinates of each wall mesh element, it calculates the geometric center coordinates and normal vector of each wall mesh element and assigns a globally unique wall mesh element ID to each wall mesh element. It should be noted that...
[0041] Each MPI process obtains the geometric center coordinates, normal vector, and wall mesh cell ID of the global wall mesh cell.
[0042] Construct a global bounding box containing all wall mesh units of the target component; calculate the size of the global bounding box, and in conjunction with the preset hash bucket size, evenly divide the space within the global bounding box into several hash buckets; calculate the three-dimensional bucket coordinates of each hash bucket and map them to a one-dimensional bucket index value; and create a one-dimensional index array for the global hash bucket space.
[0043] Each MPI process traverses each fluid grid cell in the corresponding grid block and locates the set of candidate wall grid cell IDs corresponding to each fluid grid cell through a spatial hash mapping mechanism.
[0044] Based on the set of candidate wall cell IDs for each fluid grid cell, the distance from each fluid grid cell to all corresponding candidate wall grid cells is calculated using the Newton-Raphson iteration method. The minimum distance value is then selected as the wall distance for each fluid grid cell and stored.
[0045] This invention employs the distributed parallel computing framework MPI, which decomposes large-scale grid computing tasks into multiple independent subtasks, which are processed in parallel by different computing nodes, thereby improving computational efficiency. Cross-process data synchronization is achieved through globally unique wall grid cell IDs, ensuring the integrity and consistency of wall information in complex geometric models. By combining hash bucket spatial indexing and Newton's iterative projection method, computational complexity is reduced while maintaining computational accuracy, making it suitable for high-precision flow field simulation scenarios with complex geometries such as aero-engine turbine blades and gas turbine combustors.
[0046] Example 2
[0047] This embodiment further details the present invention, providing an efficient parallel wall distance calculation method for turbulent flow applicable to complex geometric components, comprising:
[0048] Step 1: For target components such as aero-engines, turbomachinery, and combustion chambers, the meshed simulation model of the target component is uniformly divided into several mesh blocks. The number of mesh blocks is equal to the number of preset MPI processes and corresponds one-to-one. Each MPI process identifies the wall mesh elements and the vertex coordinates of each wall mesh element from the mesh partition file of the corresponding mesh block. Based on the vertex coordinates of each wall mesh element, it calculates the geometric center coordinates and normal vector of each wall mesh element and assigns a globally unique wall mesh element ID to each wall mesh element. The specific steps are as follows:
[0049] Step 1.1: Based on the preset number of MPI processes, the meshed target component simulation model is divided into several mesh blocks. The mesh partition file for each mesh block is stored in a distributed storage system, and each MPI process is assigned one mesh block. Then, each MPI process independently reads the mesh partition file of its corresponding mesh block from the distributed storage system, scans all mesh cells within the corresponding mesh partition file, and identifies the wall mesh cells and the vertex coordinates of each wall mesh cell, such as the wall mesh cells on the surface of an aero-engine blade, or the wall mesh cells of the combustion chamber wall. It should be noted that the mesh partition file includes preset values for... x axis, y axis, z The axes are in a three-dimensional Cartesian coordinate system, and each vertex of the grid cell is assigned a three-dimensional coordinate.
[0050] Step 1.2: Calculate the geometric center coordinates of each wall mesh cell to accurately calculate the unit normal vector of the wall mesh cell as a representative point. The specific calculation method is as follows: Based on the convex polygon assumption, if the wall mesh cell is a triangular mesh cell, calculate the geometric center coordinates of the triangular mesh cell using the node averaging algorithm based on the vertex coordinates of each triangular mesh cell, and then calculate the normal vector of the triangular mesh cell using the vertex vector cross product method; if the wall mesh cell is a quadrilateral cell, split the quadrilateral mesh cell into two triangular mesh cells, calculate the normal vector of the two triangular mesh cells separately, and then take the average of the normal vectors of the two triangular mesh cells as the normal vector of the quadrilateral mesh cell.
[0051] Step 1.3: Assign a globally unique wall mesh cell ID to each wall mesh cell and associate it with geometric attributes. The globally unique wall mesh cell ID is a unique integer ranging from zero to infinity. The geometric attributes refer to the geometric region to which the wall mesh cell belongs; for example, a wall mesh cell may belong to a blade or a casing.
[0052] Step 2: Each MPI process obtains the geometric center coordinates, normal vector, and wall mesh element ID of the global wall mesh elements. Specifically, the number of wall mesh elements in each MPI process is collected through MPI_Allgather, and then the wall data of each MPI process is transmitted based on MPI, so that each MPI process obtains the geometric center coordinates, normal vector, and wall mesh element ID of the global wall mesh elements, providing a data foundation for building a globally consistent hash bucket. "Global" refers to the simulation model of the entire target component. By synchronizing the geometric center coordinates, normal vector, and wall mesh element ID of the global wall mesh elements to each MPI process, it can be ensured that all nodes have the same geometric reference frame.
[0053] Step 3: Construct a global bounding box containing all wall mesh units of the target component; calculate the global bounding box size, and based on the preset hash bucket size, evenly divide the space within the global bounding box into several hash buckets; calculate the 3D bucket coordinates of each hash bucket and map them to a 1D bucket index value; and create a 1D index array for the global hash bucket space. The specific steps are as follows:
[0054] Step 3.1: Determine the bounding box of the computational domain. Each MPI process traverses the geometric center coordinates of all wall mesh elements within the process. X axis, Y axis, ZFind the maximum and minimum values of the geometric center coordinates along the axis, and then use the maximum and minimum values as boundaries to construct a cubic region, i.e., a sub-bounding box, that can contain all wall units within the process; then, based on all sub-bounding boxes, determine the bounding box size of the entire target part through the MPI_Allreduce function, and then construct a global bounding box that includes all wall mesh units of the target part.
[0055] Step 3.2: Divide the space into a uniform grid (hash buckets). Based on the global bounding box size and the preset hash bucket size, calculate the... X axis, Y axis, Z The number of hash buckets needed to be divided along the axis is calculated using the following formula:
[0056] X axis: ;
[0057] Y axis: ;
[0058] Z axis: ;
[0059] in, , , These are the global bounding boxes in X axis, Y axis, Z The number of hash buckets that need to be divided along the axis; , , These are the global bounding boxes in X axis, Y axis, Z The maximum value of the geometric center coordinates along the axial direction; , , These are the global bounding boxes in X axis, Y axis, Z The minimum value of the geometric center coordinates along the axial direction; , , These represent the global bounding box in X axis, Y axis, Z Dimensions along the axial direction; This is the preset hash bucket size; This is the floor function.
[0060] Then, the global bounding box space is continuously discretized into The model uses three uniformly sized hash buckets, each representing a cubic mesh. Finally, all wall mesh elements within the target component simulation model are assigned to their respective hash buckets. Each hash bucket logically corresponds to a storage space, recording the IDs of the wall mesh elements falling within that bucket's space.
[0061] It should be noted that the preset hash bucket size is 1.5 to 3 times the diameter of the circumscribed sphere corresponding to the largest wall element in the simulation model of the target component.
[0062] Step 3.3: Establish the mapping from 3D bucket coordinates to 1D bucket indices. First, based on the geometric center coordinates of the inner wall cells of each hash bucket, determine the 3D bucket coordinates of each hash bucket using the 3D bucket coordinate calculation formula. The formula is as follows:
[0063] ;
[0064] ;
[0065] ;
[0066] in: , , Hash buckets respectively X axis, Y axis, Z The bucket coordinates on the axis are integers, ranging from [0, ..., ... nx -1],[0, ny -1],[0, nz -1]; , , The geometric centers of the mesh elements on the inner wall of the hash bucket are respectively located at X axis, Y axis, Z Coordinates on the axis; , , The global bounding box is in X axis, Y axis, Z Minimum value of coordinate along the axis; Preset hash bucket size; This is the floor function.
[0067] Then, the three-dimensional bucket coordinates of each hash bucket are converted into one-dimensional index values. The calculation formula is:
[0068] ;
[0069] in: For global bounding box inY The number of hash buckets along the axis; For global bounding box in Z Number of hash buckets along the axis. One-dimensional index value. The range is [0, [-1] uniquely represents a hash bucket in the space.
[0070] Finally, based on the one-dimensional index value of the global hash bucket Create a one-dimensional index array for the global hash bucket space so that subsequent calculations can be performed using this array. o (1) Quickly locate candidate wall grid cells with low complexity. Distributed construction of global hash buckets avoids master node bottlenecks, while hash bucket synchronization ensures that all processes have the same spatial index structure.
[0071] Step 4: Each MPI process traverses each fluid grid cell in its corresponding grid block, locating the set of candidate wall grid cell IDs corresponding to each fluid grid cell through a spatial hash mapping mechanism. Specific steps include:
[0072] Step 4.1: In each MPI process's grid block, select any fluid grid cell as the target fluid grid cell P. Based on the geometric center coordinates of the target fluid grid cell P, determine the unique spatial grid cell to which the target fluid grid cell P belongs in the global bounding box, i.e., the three-dimensional bucket coordinates of the main bucket, using the three-dimensional bucket coordinate calculation formula, and map these three-dimensional bucket coordinates to the corresponding one-dimensional index value.
[0073] Step 4.2: Perform a spatial neighborhood search. Centered on the main bucket containing the target fluid mesh unit P, search for all candidate hash buckets adjacent to the main bucket within a preset neighborhood radius. In this embodiment, the preset neighborhood radius is 3 adjacent hash buckets, so the spatial neighborhood search range is a 3×3×3 cube region centered on the main bucket, containing a total of 27 adjacent hash buckets. Since the distance from the target fluid mesh unit P to the nearest wall mesh unit may exceed the boundary of the main bucket containing the target fluid mesh unit P, to ensure that no potential nearest wall mesh unit is missed, this embodiment expands the search range to a neighborhood around the main bucket, thereby covering all potential wall mesh units that the fluid mesh unit may affect.
[0074] Step 4.3: Based on the one-dimensional index value of each candidate hash bucket, retrieve the wall grid cell ID stored in each candidate hash bucket from the one-dimensional index array of the global hash bucket space to obtain the candidate wall grid cell ID list corresponding to the candidate hash bucket. Then, insert the candidate wall grid cell ID list into the hash set. Utilize the underlying mechanism of the hash set to automatically check and reject duplicate key values to delete duplicate wall grid cell IDs from the candidate wall grid cell ID list, obtaining a unique and non-duplicate candidate wall grid cell ID set corresponding to the target fluid grid cell P, ensuring that each wall grid cell ID exists only once in the set. This process guarantees that each fluid grid cell is calculated with only one unique set of candidate wall grid cells, avoiding duplicate calculations.
[0075] Step 4.4: Traverse all fluid mesh cells within each MPI process, repeating steps 4.1 to 4.3 to obtain the candidate wall mesh cell ID set corresponding to each fluid mesh cell, providing accurate candidate ranges for subsequent distance calculations.
[0076] Step 5: Based on the candidate wall element IDs set for each fluid mesh element, calculate the distance from each fluid mesh element to all corresponding candidate wall mesh elements using Newton's iteration method. Select the minimum distance value as the wall distance for each fluid mesh element and store it. Specifically, this includes the following steps:
[0077] Step 5.1: For each candidate wall mesh element of the target fluid mesh element P, a local Cartesian coordinate system is constructed based on its triangular geometric features. Specifically, the unit normal vector n of the plane containing the candidate wall mesh element is used as the Z-axis direction of the local Cartesian coordinate system. Based on the geometric features of the triangular plane, two orthogonal basis vectors u and v located in the plane are determined and used as the X-axis and Y-axis of the local Cartesian coordinate system, thus constructing a complete local Cartesian coordinate system (u, v, n). The construction of this coordinate system ensures that the candidate wall mesh element is located on the plane Z=0, thereby simplifying the distance calculation problem in three-dimensional space into a projection point positioning problem in a two-dimensional plane.
[0078] Step 5.2: From the set of candidate wall element IDs of the target fluid mesh element P, select any candidate wall mesh element as the target candidate wall. Transform the geometric center coordinates of the target fluid mesh element P and the triangle vertex coordinates of the target candidate wall to the local Cartesian coordinate system constructed in Step 5.1. In the local Cartesian coordinate system, the target candidate wall lies entirely on the plane Z=0. Therefore, the problem of finding the nearest point from the target fluid mesh element P to the target candidate wall is simplified to finding the nearest projection point Q of the target fluid mesh element P within the corresponding triangular region on the two-dimensional UV plane.
[0079] Step 5.3: In the local rectangular coordinate system, the Newton-Raphson iteration method is used to find the nearest projection point Q of the target fluid mesh element P on the target candidate wall. The Newton-Raphson iteration method accurately calculates the coordinates of the projection point through iterative approximation. The iterative process is as follows: First, calculate the vector difference between the current projection point and the target fluid mesh element P. Based on the relationship between this vector difference and the wall normal vector, calculate the iteration step size. Then, update the coordinates of the iteration point. Repeat this process until the convergence condition is met.
[0080] The coordinates of the projection point Q can be solved using Newton's iteration method, expressed as:
[0081] ;
[0082] in, Let P be the coordinates of the target fluid mesh element P in the local Cartesian coordinate system; For the first The coordinates of the projection point Q obtained in the next iteration; For the target fluid mesh element P and the current projection point The vector difference between them; The number of iterations, for example, the th iteration. Second and third Second-rate; This is the iteration step size; is the normal vector of the candidate wall mesh element.
[0083] When iterates to | δ |<1 e -6 (Typically converges in 3-5 steps) During iterative convergence, the coordinates of the projection point Q of the target fluid mesh element P on the candidate wall element are obtained.
[0084] Step 5.4: The projection point Q obtained by Newton's iteration method may be located inside the target candidate wall or outside the triangle. When the projection point Q is inside the target candidate wall, it is the closest point; when the projection point Q is outside the target candidate wall, it is necessary to further calculate the shortest distance from the target fluid mesh element P to the three sides of the target candidate wall. Therefore, after obtaining the projection point Q, it is necessary to determine whether it is located within the target candidate wall region. If the projection point Q is located within the target candidate wall region, then, combined with the geometric center coordinates of the target fluid mesh element P, the formula is used... Calculate the wall distance from the target fluid mesh element P to the target candidate wall. d If the projection point Q is located outside the target candidate wall region, then calculate the shortest distances from the target fluid mesh element P to the three edges of the target candidate wall, and take the minimum of the three as the wall distance from the target fluid mesh element P to the target candidate wall. d .
[0085] Step 5.5: Traverse all candidate wall mesh elements of the target fluid mesh element P. For each candidate wall mesh element, repeat steps 5.1 to 5.4 to calculate the wall distance from the target fluid mesh element P to each candidate wall mesh element. d In all calculated wall distances d In this process, the minimum value is selected as the final wall distance from the target fluid mesh element P to the target component wall.
[0086] Step 5.6: Traverse all fluid mesh cells, and for each fluid mesh cell, execute steps 5.1 to 5.5 to calculate and store the minimum wall distance corresponding to each fluid mesh cell. This process ensures that each fluid mesh cell within the entire target component obtains accurate distance field information, providing precise wall distance data for subsequent CFD calculations.
[0087] This invention achieves a time complexity of O(n) by constructing a global hash bucket space index. O (1) Wall positioning solves the problem of inefficient tree structure traversal in complex geometry;
[0088] This invention uses a curved surface projection iterative algorithm to replace linear approximation calculation, which improves the calculation accuracy of wall distances in key areas such as the leading edge of aero-engine blades and combustion chamber vortex generators.
[0089] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for efficient parallel calculation of turbulent wall distances applicable to complex geometric components, characterized in that, include: The target component simulation model is uniformly divided into several grid blocks, and the number of grid blocks is equal to the number of preset MPI processes and corresponds one-to-one. Each MPI process identifies the wall mesh cells and the vertex coordinates of each wall mesh cell from the mesh partition file of the corresponding mesh block, calculates the geometric center coordinates and normal vector of each wall mesh cell based on the vertex coordinates of each wall mesh cell, and assigns a globally unique wall mesh cell ID to each wall mesh cell. Each MPI process obtains the geometric center coordinates, normal vector, and wall mesh element ID of the global wall mesh element; Construct a global bounding box containing all wall mesh elements of the target component; Calculate the global bounding box size and, in conjunction with the preset hash bucket size, evenly divide the space within the global bounding box into several hash buckets. Calculate the three-dimensional bucket coordinates of each hash bucket and map them to a one-dimensional bucket index value. Create a one-dimensional index array for the global hash bucket space. Each MPI process traverses each fluid grid cell in the corresponding grid block and locates the set of candidate wall grid cell IDs corresponding to each fluid grid cell through a spatial hash mapping mechanism. Based on the set of candidate wall cell IDs for each fluid grid cell, the distance from each fluid grid cell to all corresponding candidate wall grid cells is calculated using the Newton-Raphson iteration method. The minimum distance value is then selected as the wall distance for each fluid grid cell and stored.
2. The efficient parallel wall distance calculation method for turbulent flow according to claim 1, characterized in that, Based on the vertex coordinates of each wall mesh cell, the geometric center coordinates of each wall mesh cell are calculated using the node averaging algorithm, and then the normal vector of each wall mesh cell is calculated using the vertex vector cross product method.
3. The efficient parallel wall distance calculation method for turbulent flow according to claim 2, characterized in that, The method for constructing a global bounding box containing all wall mesh elements of the target component is as follows: Each MPI process iterates through the geometric center coordinates of all wall mesh elements within the process, and... X axis, Y axis, Z Find the maximum and minimum values of the geometric center coordinates along the axis, and then construct a sub-bounding box containing all wall elements within the process, using the maximum and minimum values as boundaries; then construct a global bounding box containing all wall mesh elements of the target part based on all sub-bounding boxes.
4. The efficient parallel wall distance calculation method for turbulent flow according to claim 3, characterized in that, The method for calculating the global bounding box size and, in conjunction with the preset hash bucket size, uniformly dividing the space within the global bounding box into several hash buckets is as follows: Based on the geometric center coordinates of the inner wall mesh elements of the global bounding box X axis, Y axis, Z The maximum and minimum values of the coordinates along the axes are used to calculate the global bounding box. X axis, Y axis, Z Dimensions along the axial direction; Set the global bounding box in X axis, Y axis, Z Divide the dimensions along the axes by the preset hash bucket size to obtain the global bounding box. X axis, Y axis, Z The number of hash buckets along the axis is calculated, and then the space within the global bounding box is evenly divided into several hash buckets.
5. The efficient parallel wall distance calculation method for turbulent flow according to claim 4, characterized in that, The expression for calculating the 3D bucket coordinates of each hash bucket is: ; ; ; in: , , Hash buckets respectively X axis, Y axis, Z Bucket coordinates on the axis; , , The geometric centers of the mesh elements on the inner wall of the hash bucket are respectively located at X axis, Y axis, Z Coordinates on the axis; , , The global bounding box is in X axis, Y axis, Z Minimum value of coordinate along the axis; Preset hash bucket size; This is the floor function.
6. The efficient parallel wall distance calculation method for turbulent flow according to claim 5, characterized in that, The preset hash bucket size is 1.5 to 3 times the diameter of the circumscribed sphere corresponding to the largest wall element in the simulation model of the target component.
7. The efficient parallel wall distance calculation method for turbulent flow according to claim 6, characterized in that, The expression that maps the 3D bucket coordinates of each hash bucket to the 1D bucket index value is: ; in: This is the index value of the one-dimensional bucket. For global bounding box in Y The number of hash buckets along the axis; For global bounding box in Z The number of hash buckets along the axis.
8. The efficient parallel wall distance calculation method for turbulent flow according to claim 7, characterized in that, The steps of each MPI process traversing each fluid grid cell in the corresponding grid block and locating the set of candidate wall grid cell IDs corresponding to each fluid grid cell through a spatial hash mapping mechanism include: In each MPI process's grid block, select any fluid grid cell as the target fluid grid cell. Based on the geometric center coordinates of the target fluid grid cell, determine the three-dimensional bucket coordinates of the main bucket where the target fluid grid cell is located, and map them to one-dimensional index values. Centered on the main bucket where the target fluid grid cell is located, search all candidate hash buckets adjacent to the main bucket within a preset neighborhood radius; Based on the one-dimensional index value of each candidate hash bucket, the wall grid cell ID stored in each candidate hash bucket is retrieved from the one-dimensional index array of the global hash bucket space to obtain the list of candidate wall grid cell IDs corresponding to the candidate hash bucket; Traverse all fluid mesh cells within each MPI process to obtain the set of candidate wall mesh cell IDs corresponding to all fluid mesh cells.
Citation Information
Patent Citations
Method and device for calculating wall distance under Cartesian grid
CN115357849A
Rotating speed determination method in aero-engine complete machine three-dimensional simulation
CN120562345A