Multi-partition grid flow field data merging visualization method
Through the numbering information mapping relationship and virtual grid reconstruction technology, the problem of grid integrity damage caused by multi-partition grids in parallel computing is solved, seamless merge and visualization of flow field data is realized, and fluid mechanics simulation is improved Accuracy and efficiency.
Patent Information
- Application Number
- CN202411391522.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The prior art multi-partition grid in parallel computing causes damage to the integrity of the grid in key flow areas, affecting the accuracy and visual analysis of flow field data.
Through the numbering information mapping relationship, a virtual grid is used to store the output flow field data, reconstruct the original grid, and realize the merge and visualization of the flow field data of the multi-partition grid to ensure data integrity.
It effectively avoids the problem of damaged grid integrity, ensures the integrity and consistency of flow field data, and improves the credibility of calculation results and the accuracy and efficiency of fluid mechanics simulation.
Smart Images

Figure CN119312730A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of computational fluid dynamics, and is applied to the processing and display of flow field data, and specifically relates to a multi-partition grid flow field data merging and visualization method. Background Art
[0002] Computational Fluid Dynamics (CFD) is an interdisciplinary subject that uses computer science and numerical algorithms to simulate and analyze fluid flow. The development of this technology aims to solve key aerodynamic problems in the development of aerospace vehicles, as well as its wide application in many other industrial fields. Early research on CFD technology focused on the development of theoretical models and basic algorithms, and the research objects were limited to simple geometric shapes such as two-dimensional cylinders and airfoils.
[0003] With the rapid progress of computer hardware performance and the emergence of advanced methods such as Reynolds-averaged NS equations RANS, large eddy simulation LES, and direct numerical simulation DNS, CFD technology has been able to break through its original limitations and rapidly develop in the direction of complex geometric shapes, ultra-large-scale grids, multidisciplinary intersections, and multi-physical field coupling. This transformation has significantly enhanced CFD's ability to simulate high-precision fluid flow behavior. However, a single serial program calculation can no longer meet the needs of modern engineering calculations, especially when it comes to large-scale calculations. Therefore, program parallelization has become a key means to improve computing efficiency and expand the scale of operations.
[0004] In CFD, one of the commonly used parallel computing methods is the regional decomposition method, which is to divide the original computational domain into several sub-regions through grid partitioning, and assign these sub-regions to different computing cores. Each core performs the computing task independently, and exchanges data between adjacent sub-regions through a parallel communication mechanism, thereby completing the parallel computing of the entire computational domain. The quality of grid partitioning has a direct impact on the efficiency of parallel computing.
[0005] Currently, there are many grid partitioning methods, such as METIS and its parallel version PARMETIS for unstructured grids, and Greedy Algorithm for structured grids. Although these methods can ensure load balance and reduce the amount of data exchange between computing cores to a certain extent, they usually ignore the importance of flow characteristics in grid partitioning. In particular, in critical flow areas such as boundary layers, flow separation points, or near shock waves, if the grid is unreasonably divided, it may lead to the loss or distortion of flow characteristics, which in turn affects the accuracy of the calculation results and the subsequent flow field visualization analysis and data processing.
[0006] Therefore, how to ensure the mesh integrity in key flow areas while maintaining mesh partitioning efficiency has become one of the important technical challenges facing the current CFD field. Summary of the invention
[0007] The purpose of the present invention is to solve the problem in the prior art that the integrity of the grid in the key flow area is damaged after parallel calculation of multi-partition grids, thereby affecting the accuracy of flow field data visualization analysis. Therefore, a multi-partition grid flow field data merging visualization method is proposed. The present invention realizes the merging visualization of the flow field data of multi-partition grids by applying the mapping relationship of number information and using virtual grids to store and output flow field data, thereby ensuring data integrity and laying a foundation for subsequent flow field characteristic analysis.
[0008] The present invention adopts the following technical solutions to achieve the purpose:
[0009] A method for merging and visualizing multi-partition grid flow field data, the method comprising the following steps:
[0010] S1, obtaining the original grid and performing a grid partitioning process, and obtaining multiple block grids after partitioning;
[0011] S2, constructing a grid element mapping relationship between the original grid and each block grid;
[0012] S3, using CFD technology to calculate and obtain the flow field data corresponding to each block grid;
[0013] S4, according to the mapping relationship of the grid elements, through the grid elements of each block grid, index and obtain the grid elements corresponding to the original grid, and reconstruct a virtual grid matching the original grid;
[0014] S5, reconstructing the grid topology of the virtual grid, and storing the flow field data corresponding to each block grid into the corresponding area of the virtual grid, so as to obtain the virtual grid information with the flow field data;
[0015] S6. Output the virtual grid information to the visualization file to complete the merging and visualization of multi-partition grid flow field data.
[0016] Specifically, in step S1, the original grid is a two-dimensional unstructured grid; the grid elements of the original grid and the block grid both include points, surfaces, cells and grid blocks.
[0017] Specifically, for grid elements, grid blocks are several areas divided from the flow field calculation domain for independent calculation of flow field data. Each grid block is composed of multiple units, and each grid block stores corresponding flow field data after CFD technology calculation; each unit is defined by multiple points to form a two-dimensional shape, and adjacent units have common points and common faces; each face connects two points and constitutes the boundary of the corresponding unit; each point has a unique number and / or position coordinates, and is a geometric point in the corresponding grid.
[0018] Furthermore, in step S2, the points, surfaces, cells and grid blocks of the original grid before partitioning and the block grid after partitioning are sequentially numbered to obtain corresponding numbering information; based on the numbering information, a grid element mapping relationship is constructed.
[0019] Specifically, based on the numbering information of the original grid and the block grid, the numbers of each type of grid elements at different positions in the block grid are associated with the numbers of the corresponding positions of the same type of grid elements in the original grid, thereby completing the construction of the grid element mapping relationship.
[0020] Specifically, in step S3, the numbering information of each grid block is obtained, and the corresponding CFD calculation process is performed; after the CFD calculation is completed, the calculated flow field data is stored in multiple grid blocks of the corresponding grid block.
[0021] Specifically, the flow field data stored in each grid block includes the density, velocity, pressure and temperature of the flow field region where the grid block is located.
[0022] Furthermore, in step S4, based on the mapping relationship of grid elements, the numbers of the same type of grid elements at corresponding positions in the original grid are indexed through the numbering information of each block grid; and then, based on the numbers obtained by the index, multiple block grids are reconstructed into a virtual grid.
[0023] Specifically, in step S5, based on the reconstructed virtual grid, the topological relationship between the same type of grid elements and different types of grid elements in the virtual grid is analyzed and reconstructed by determining the number of adjacent elements to meet the needs of the visualization file.
[0024] Specifically, after completing the reconstruction of the grid topology, the flow field data stored in multiple grid blocks of the block grid are filled into the corresponding area of the virtual grid, so that the virtual grid has all the flow field data of the flow field calculation domain, thereby forming virtual grid information that can be visualized.
[0025] In summary, due to the adoption of this technical solution, the beneficial effects of the present invention are as follows:
[0026] The method of the present invention constructs a mapping relationship between the number information of the original grid and the partitioned block grid during the grid partitioning process. Through this method, after the parallel iterative calculation is completed, the virtual grid can be reconstructed according to the pre-established mapping relationship, and the flow field data information of each block grid is stored in the corresponding area of the virtual grid, finally realizing the seamless merging and visual display of the multi-partition grid flow field data.
[0027] After merging the multi-partition grid flow field data using the method of the present invention, it can not only effectively avoid the problem of damaged grid integrity caused by multiple subdivisions in key flow areas such as boundary layers, flow separation points or shock waves in traditional methods, but also ensure the integrity and consistency of the flow field data after merging. This provides a reliable basis for subsequent flow field characteristic analysis, improves the credibility of the calculation results, and simplifies the complexity of flow field visualization, thereby improving the accuracy and efficiency of the overall computational fluid dynamics simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 The overall process diagram of the method of the present invention is briefly described;
[0029] Figure 2 is a schematic diagram of numbering of a two-dimensional unstructured grid in the present invention;
[0030] Figure 3 A schematic diagram of the mapping relationship of grid elements before and after grid partitioning in the present invention;
[0031] Figure 4 It is a schematic diagram of flow field data in each grid block after CFD calculation in the present invention;
[0032] Figure 5 A schematic diagram of indexing the numbers of the same type of grid elements in the original grid in the present invention;
[0033] Figure 6 is a schematic diagram of a virtual grid reconstructed in the present invention;
[0034] Figure 7 A schematic diagram of a grid topology relationship of a virtual grid reconstructed in the present invention;
[0035] Figure 8 A schematic diagram of storing corresponding flow field data in a virtual grid in the present invention;
[0036] Fig. 9 A schematic diagram of the visual output of virtual grid information in the present invention;
[0037] Fig.10 This is a schematic diagram of the flow field results without flow field data merging in the example;
[0038] Fig.11This is a schematic diagram of the flow field results using flow field data merging in the example. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0040] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] Example
[0042] A method for merging and visualizing multi-partition grid flow field data. Figure 1 The overall process of the method is briefly described in FIG. 1 , which can be viewed simultaneously. The various steps of the method are summarized as follows:
[0043] S1, obtaining the original grid and performing a grid partitioning process, and obtaining multiple block grids after partitioning;
[0044] S2, constructing a grid element mapping relationship between the original grid and each block grid;
[0045] S3, using CFD technology to calculate and obtain the flow field data corresponding to each block grid;
[0046] S4, according to the mapping relationship of the grid elements, through the grid elements of each block grid, index and obtain the grid elements corresponding to the original grid, and reconstruct a virtual grid matching the original grid;
[0047] S5, reconstructing the grid topology of the virtual grid, and storing the flow field data corresponding to each block grid into the corresponding area of the virtual grid, so as to obtain the virtual grid information with the flow field data;
[0048] S6. Output the virtual grid information to the visualization file to complete the merging and visualization of multi-partition grid flow field data.
[0049] In this embodiment, the main idea of the method is: first, in the grid partitioning process, a mapping relationship between the original grid before partitioning and the block grid after partitioning is constructed, and the mapping relationship between the points, surfaces, units, and grid block numbering information from the original grid to the block grid is recorded. After the CFD calculation is completed and the flow field data of each block grid is obtained, according to the mapping relationship, the points, surfaces, units, and grid block numbering information of each block grid are used to index and obtain the points, surfaces, units, and grid block numbering information of the original grid and rebuild the virtual grid. Then, based on the numbering information of the points, surfaces, units, etc. on the newly constructed virtual grid, the grid topology relationship is re-established on the virtual grid. Finally, after the flow field data information of each block grid is stored in the corresponding area of the virtual grid, all the virtual grid information with flow field data is output to the visualization file, thereby realizing the visualization of the merged flow field data of the multi-partition grid.
[0050] This embodiment uses Figure 2 The method process is described in detail by taking the two-dimensional unstructured grid shown as an example. For the two-dimensional unstructured grid, the grid elements of the original grid and the block grid include points, faces, cells and grid blocks. Among them, for the grid elements, the grid block is a number of areas divided by the flow field calculation domain for independent calculation of flow field data. Each grid block is composed of multiple cells. Each grid block stores the corresponding flow field data after CFD technology calculation; each cell is defined by multiple points to form a two-dimensional shape, and adjacent cells have common points and common faces. The cells are usually triangles or quadrilaterals; each face connects two points and constitutes the boundary of the corresponding cell. The face is also the basis for information transmission within and between cells. The face can belong to one or more cells; each point has a unique number and / or position coordinates, which is a geometric point in the corresponding grid. They define the vertices of the cell, and each point can also be shared by multiple cells.
[0051] exist Figure 2 In the diagram, red numbers represent point numbers, green numbers represent surface numbers, pink numbers represent unit numbers, and blue letters and numbers represent grid block numbers.
[0052] In the process of grid partitioning, the grid element mapping relationship between the original grid before partitioning and the block grid after partitioning is constructed, that is, the corresponding relationship between the point, surface, unit, and grid block numbers from the original grid to the block grid is recorded. Figure 3 As shown in the figure, it is a schematic diagram of the mapping relationship of grid elements before and after grid partitioning. Figure 3 Take the example of a grid block of the original grid being partitioned to obtain two grid blocks of the block grid. Figure 3In the grid element position, the numbers in the brackets represent the numbering information of the original grid, and the numbers outside the brackets represent the numbering information of the block grid; and the elements involved in each grid block are numbered sequentially starting from 0, and the grid blocks themselves are also numbered sequentially starting from 0.
[0053] Then read in the relevant information of the partitioned block grid to perform CFD calculations; for the partition process of the original grid, it is necessary to obtain the flow field data corresponding to each block grid after the calculation converges. Figure 4 As shown, pink q0 and green q1 represent the density density, velocity component u along the x-axis, velocity component v along the y-axis, pressure pressure and temperature temperature stored after the CFD calculation is completed on the grid block 0 and grid block 1 of the example, that is, the flow field data.
[0054] According to the previously constructed grid element mapping relationship, the number information of the points, surfaces, cells, and grid blocks of the original grid is indexed by the number information of each block grid after partitioning. Figure 5 As shown in the figure, arrows of different colors represent the process of obtaining the point, surface, unit, and grid block number information of the original grid by indexing the number information of the block grid. Then, the corresponding grid element can be determined based on the original grid number information obtained by the index, and a virtual grid matching the original grid can be reconstructed. The virtual grid can be found in Figure 6 's hint.
[0055] In the reconstructed virtual grid, the topological relationship between the same type of grid elements and different types of grid elements in the virtual grid is analyzed and reconstructed by determining the number of adjacent elements to meet the needs of visualization files. Figure 7 As shown, Figure 7 In the example, the 0th point, 0th surface and 0th unit of the virtual grid are taken as an example, and the grid topological relationship of the virtual grid is formed by determining the number of their respective adjacent elements.
[0056] Similarly, based on the previously constructed grid element mapping relationship and the flow field data stored on each grid block of the block grid after CFD calculation, the flow field data is filled into the corresponding area of the virtual grid. Figure 8 As shown, the flow field data q0 and q1 corresponding to different grid blocks 0 and 1 in the block grid are filled and stored in the corresponding area of the virtual grid, thereby forming virtual grid information with flow field data.
[0057] Finally, all the virtual grid information is output to the visualization file, because it also contains the calculated flow field data, thus realizing the merging and visualization output of the flow field data of multi-partitioned grids. In addition, due to the characteristics of two-dimensional unstructured grids, after the merging of partitioning, mapping, reconstruction and reconstruction, the integrity of the grid and data in the key flow area is guaranteed. The results of the visualization output are as follows: Fig. 9 shown.
[0058] Fig.10 and Fig.11 The comparison of the results of the above method process of this embodiment after performing 4-partition 4-core parallel CFD calculation on a two-dimensional non-structured 30P30N airfoil; Fig.10 The data merging and visualization method of this embodiment is not adopted. Fig.11 The method of this embodiment is adopted.
[0059] according to Fig.10 and Fig.11 The flow field visualization results are compared. After the multi-partition grid flow field data are merged using the method of this embodiment, the integrity of the flow field data in the key flow areas near the slats and flaps of the airfoil is guaranteed, and there will be no black gap boundaries formed by the visualization due to the unmerged data. Therefore, a better foundation is laid for the subsequent further flow field characteristic analysis.
Claims
1. A method for merging and visualizing multi-partition grid flow field data, characterized in that: The method comprises the following steps: S1, obtaining the original grid and performing a grid partitioning process, and obtaining multiple block grids after partitioning; S2, constructing a grid element mapping relationship between the original grid and each block grid; S3, using CFD technology to calculate and obtain the flow field data corresponding to each block grid; S4, according to the mapping relationship of the grid elements, through the grid elements of each block grid, index and obtain the grid elements corresponding to the original grid, and reconstruct a virtual grid matching the original grid; S5, reconstructing the grid topology of the virtual grid, and storing the flow field data corresponding to each block grid into the corresponding area of the virtual grid, so as to obtain the virtual grid information with the flow field data; S6. Output the virtual grid information to the visualization file to complete the merging and visualization of multi-partition grid flow field data.
2. The multi-partition grid flow field data merging and visualization method according to claim 1 is characterized in that: In step S1, the original grid is a two-dimensional unstructured grid; the grid elements of the original grid and the block grid both include points, surfaces, cells and grid blocks.
3. The multi-partition grid flow field data merging and visualization method according to claim 2 is characterized in that: For grid elements, grid blocks are several areas divided from the flow field calculation domain for independent calculation of flow field data. Each grid block is composed of multiple units, and each grid block stores corresponding flow field data after CFD technology calculation; each unit is defined by multiple points to form a two-dimensional shape, and adjacent units have common points and common faces; each face connects two points and constitutes the boundary of the corresponding unit; each point has a unique number and / or position coordinates, and is a geometric point in the corresponding grid.
4. The multi-partition grid flow field data merging and visualization method according to claim 2 is characterized in that: In step S2, the points, surfaces, cells and grid blocks of the original grid before partitioning and the block grid after partitioning are sequentially numbered to obtain corresponding numbering information; based on the numbering information, a grid element mapping relationship is constructed.
5. The method for merging and visualizing multi-partition grid flow field data according to claim 4, characterized in that: Based on the numbering information of the original grid and the block grid, the numbers of each type of grid elements at different positions in the block grid are associated with the numbers of the corresponding positions of the same type of grid elements in the original grid, thereby completing the construction of the grid element mapping relationship.
6. The method for merging and visualizing multi-partition grid flow field data according to claim 4, characterized in that: In step S3, the numbering information of each grid block is obtained, and the corresponding CFD calculation process is performed; after the CFD calculation is completed, the calculated flow field data is stored in multiple grid blocks of the corresponding grid block.
7. The method for merging and visualizing multi-partition grid flow field data according to claim 6, characterized in that: The flow field data stored in each grid block includes the density, velocity, pressure and temperature of the flow field area where the grid block is located.
8. The method for merging and visualizing multi-partition grid flow field data according to claim 6, characterized in that: In step S4, according to the mapping relationship of grid elements, the numbers of the same type of grid elements at corresponding positions in the original grid are indexed through the numbering information of each block grid; and then, according to the numbers obtained by the indexing, the multiple block grids are reconstructed into a virtual grid.
9. The method for merging and visualizing multi-partition grid flow field data according to claim 8, characterized in that: In step S5, based on the reconstructed virtual grid, the topological relationship between the same type of grid elements and different types of grid elements in the virtual grid is analyzed and reconstructed by determining the number of adjacent elements to meet the needs of the visualization file.
10. The multi-partition grid flow field data merging and visualization method according to claim 9 is characterized in that: After completing the reconstruction of the grid topology, the flow field data stored in multiple grid blocks of the block grid are filled into the corresponding area of the virtual grid, so that the virtual grid has all the flow field data of the flow field calculation domain, thereby forming virtual grid information that can be visualized.
Citation Information
Patent Citations
MPI parallel data structure based on arbitrary polyhedral unstructured grid
CN113900808A
Flow field numerical simulation method and device, computer equipment and storage medium
CN115016951A
Data monitoring method and equipment based on flow field numerical simulation and medium
CN117875220A
Automatic thermal fluid analysis system, analysis program and recording medium
JP2003216660A