Rapid flow field visualization data loading method
Through the combination of multi-threading method and VTK system, the problem of inefficiency in traditional flow field numerical simulation methods when processing flow field grid data is solved, and fast and accurate flow field visualization is achieved, improving user experience and processing efficiency.
Patent Information
- Application Number
- CN202510459244.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-14
AI Technical Summary
In the process of converting high-precision numerical simulation data into visual images or animations, the traditional flow field numerical simulation method has low efficiency and slow loading, resulting in slow response speed or crash.
The multi-threading method is used to effectively utilize processor resources, and the user interaction with the 3D visual scene is realized by importing flow field grid data, extracting flow field features, decoupling the graphical user interface and flow field loading, and using the VTK system to draw and visualize the grid and flow field.
It significantly improves the efficiency of flow field grid data processing, realizes fast and accurate flow field visualization, reduces dependence on computing resources, avoids user interface lags and blockages, and improves the fluency and response speed of the user experience.
Smart Images

Figure CN119987901A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of flow field visualization, and in particular relates to a fast flow field visualization data loading method. Background Art
[0002] Flow field visualization technology converts the physical characteristics of the flow field into visible images or animations through specific processing methods, thereby intuitively displaying the flow field conditions. This technology can intuitively observe the movement of the fluid around the aircraft model, including the distribution state and dynamic changes of a series of key physical quantities such as speed, pressure, and temperature, so as to have a deeper understanding of the laws of fluid movement. At present, a core challenge facing the field of flow field visualization is to quickly and accurately draw and render flow field grid data, while realizing real-time switching of flow field cloud maps corresponding to different physical quantities, thereby helping users to intuitively observe complex flow field structures.
[0003] At present, there are two main typical methods in the field of flow field visualization. One is the physical experimental method, which makes the physical information in the flow field (such as velocity, pressure, temperature, etc.) visible or measurable by introducing external media or applying energy into the flow field, thereby realizing an intuitive display of the flow field. The physical experimental method usually requires a large amount of experimental equipment and material resources, resulting in high costs, and is limited by experimental conditions, such as the range of conditions such as temperature, pressure, and flow rate. In the actual measurement process, the measurement area may be difficult to reach, or the installation and use of the sensor will cause certain disturbances to the flow field, which may cause large visualization errors. Another important flow field visualization method is the flow field numerical simulation method, which uses advanced computer technology and numerical calculation methods to obtain numerical solutions to the flow field by solving basic equations in the flow field (such as the Navier-Stokes equations, the Euler equations, etc.). Furthermore, these numerical solutions will be cleverly converted into intuitive and visual images or animations. Compared with physical experimental methods, this type of method is not only lower in cost and faster in calculation speed, but also can simulate various extreme conditions, fully cover the calculation area, and provide detailed flow field visualization data.
[0004] However, traditional flow field numerical simulation methods often fail to efficiently process and display high-precision numerical simulation data when converting them into visual images or animations, resulting in slow response and even crashes. In addition, grid data also presents a high degree of complexity and diversity, including structured grids, unstructured grids, and Cartesian grids. The diversity and complexity of these grid types pose great challenges to visualization. Summary of the invention
[0005] The purpose of the present invention is to provide a fast flow field visualization data loading method to address the above-mentioned problems, hoping to improve the problem of low efficiency and slow loading of flow field grid data in the process of converting high-precision numerical simulation data into visual images or animations by traditional flow field numerical simulation methods.
[0006] The technical solution adopted by the present invention is as follows: In view of the problems of slow flow field loading speed and low efficiency of grid and flow field rendering, a fast flow field visualization data loading method is proposed by effectively utilizing processor resources through a multi-threading method. The method comprises the following steps: Import the flow field grid data, initialize the flow field grid data, and normalize the flow field grid data; Extract flow field features. According to the properties of each flow field, the physical features of the flow field are extracted through multi-threaded programming technology, and the extracted physical features are stored; Decouple the graphical user interface from flow field loading, and separate data loading and the graphical user interface GUI through multi-threaded programming technology; mesh and flow field drawing and visualization, and visualize the mesh data through the VTK system; Realize the interaction between users and 3D (three-dimensional space) visualization scenes through the VTK system; Perform flow field analysis based on the visualization results.
[0007] Furthermore, the initialization of the flow field grid data includes the following steps: Read in flow field grid data to generate control parameters, generate initial grids according to the control parameters, and establish connection relationships of the initial grids; The initial grid is input into the flow field solution algorithm to generate a data set containing flow field information.
[0008] Furthermore, in view of the complexity and diversity of grid data and to ensure that data between different grids can correspond to each other, the normalization processing of flow field grid data includes: verifying the input flow field grid data, adaptively identifying and analyzing different types of grid data, and unifying the flow field type, number of nodes, number of units and key parameter information of grid boundaries in the grid.
[0009] Further, the decoupled graphical user interface includes: Establishing the correspondence between mesh data units and geometric primitives; Establishing a mapping relationship between physical quantities and geometric properties, where the physical quantities include pressure and temperature, and the geometric properties include the visual features of geometric primitives; According to the mapping relationship, a connection relationship is established for the generated geometric primitives, and the geometric primitives are converted into image data through the VTK system.
[0010] The connection relationship not only ensures the logical consistency between graphics elements, but also provides necessary evidence for subsequent drawing and display.
[0011] Furthermore, the geometric primitives are converted into image data through the VTK system, specifically including: Using the VTK system, the mesh data is read into the data structure of the VTK system, and multi-threaded programming technology is used to read and store different mesh data; Generate corresponding geometric primitives according to the grid data, and the geometric primitives are used to represent the structure and flow field characteristics of the grid in three-dimensional space; Map geometric primitives to the rendering engine of the VTK system and render them; Rendering requires setting rendering parameters such as light source, camera, material, and selecting appropriate visual attributes such as color and transparency to represent the physical phenomena and characteristics of the flow field.
[0012] The geometric primitives are converted into image data through the VTK system, and the distribution of physical quantities in the flow field is represented by color coding technology. A color mapping system is constructed to use different colors to represent different data values.
[0013] It should be noted that in order to solve the problems of slow flow field loading and inefficient mesh and flow field rendering, a multi-threading strategy is adopted to more effectively utilize processor resources. This ensures that the system can run smoothly even when processing large-scale mesh and flow field mesh data sets, significantly reducing the dependence on computing resources.
[0014] Second, when loading large-scale grids and flow field grid data, the user interface may freeze, block, or freeze. A multi-threaded strategy is used to distinguish between the graphical user interface (GUI) and flow field loading, and the flow field loading process is used for background tasks, which effectively avoids the freeze, block, and freeze of the GUI interface, and further improves the smoothness and response speed of the user experience.
[0015] The geometric primitives accurately reflect the numerical characteristics of the flow field, which facilitates subsequent graphics drawing.
[0016] The VTK system (visualization toolkit) is an existing visualization tool library.
[0017] Furthermore, in the color mapping system, users can adjust color mapping, transparency and viewing angle parameters through the VTK system.
[0018] In order to solve the problem of inefficiency caused by reloading when switching the visualization flow field, we use a multi-threaded method to load different flow fields at the same time, and store the flow field grid data during the loading process, so that there is no need to reload the flow field grid data again when switching the flow field, which greatly improves the user experience. At the same time, it supports users to adjust visualization parameters (such as color mapping, transparency, viewing angle, etc.) in real time, allowing users to dynamically track changes in the flow field, thereby obtaining more in-depth and comprehensive insights.
[0019] Furthermore, the interaction between the user and the 3D visualization scene through the VTK system includes: The interactive tools in the VTK system are used to interact with the 3D visualization scene. The functions of the interactive tools include translation, rotation, zooming in, zooming out, and mirroring. At the same time, the grid data can be switched interactively, allowing users to switch and view different flow field grid data without reloading the data.
[0020] In view of the poor visualization effect in the traditional flow field visualization process, the powerful graphics rendering and interactive functions provided by the Visualization Tool Library (VTK) are fully utilized. The quality of visualization is greatly improved, which not only makes the flow field grid data more vivid and intuitive, but also ensures the friendliness and intuitiveness of the user interface, thus bringing users a smoother and more pleasant visualization experience.
[0021] Furthermore, the performing flow field analysis according to the visualization results specifically includes: performing flow field analysis using the visualization results, and if problems are found in the numerical simulation process, recording the problems and providing feedback in a timely manner.
[0022] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. Through multi-threaded programming methods, flow field grid data can be captured and analyzed more quickly and accurately; it breaks the limitations of traditional flow field visualization technology and significantly improves the efficiency of flow field grid data processing; 2. Utilizing the powerful rendering and interactive capabilities of VTK, high-definition flow field display and real-time switching of flow field views are achieved, bringing users a more immersive visualization experience of flow fields; 3. It is easy to switch quickly between different flow field views, and comprehensive control of the flow field can be achieved without complicated operation steps, which not only improves the user's work efficiency, but also lowers the usage threshold, providing strong visualization support for scientific research, engineering design, numerical simulation and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of the method of the present invention; Figure 2A schematic diagram of an initial Cartesian grid according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the visualization results of different flow field grid data. DETAILED DESCRIPTION
[0024] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0025] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0026] like Figure 1 As shown, a method for fast flow field visualization data loading comprises the following steps: Importing flow field grid data, initializing the flow field grid data, and normalizing the flow field grid data; initializing the flow field grid data includes the following steps: Read in flow field grid data to generate control parameters, generate initial grids according to the control parameters, and establish connection relationships of the initial grids; The initial grid is input into the flow field solution algorithm to generate a data set containing flow field information.
[0027] The normalization processing of flow field grid data includes: verifying the input flow field grid data, adaptively identifying and analyzing different types of grid data, and unifying the flow field type, number of nodes, number of units, and key parameter information of the grid boundary in the grid.
[0028] Extract flow field features, extract the physical features of the flow field through multi-threaded programming technology, and store the extracted physical features; Decouple the graphical user interface from flow field loading, and separate data loading and the graphical user interface GUI through multi-threaded programming technology; draw and visualize the mesh and flow field, and visualize the mesh data through the VTK system; preload and quickly switch the flow field. During the flow field loading process, all the flow field mesh data contained in the mesh is preprocessed and stored. When the user switches the flow field, there is no need to reload it; uniformly process different types of mesh data, automatically identify and analyze the mesh data type, and classify and unify the input flow field mesh data.
[0029] The decoupled graphical user interface comprises: Establishing the correspondence between mesh data units and geometric primitives; Establishing a mapping relationship between physical quantities and geometric properties, where the physical quantities include pressure and temperature, and the geometric properties include the visual features of geometric primitives; According to the mapping relationship, a connection relationship is established for the generated geometric primitives, and the geometric primitives are converted into image data through the VTK system.
[0030] The geometric primitives are converted into image data through the VTK system, including: Using the VTK system, the mesh data is read into the data structure of the VTK system, and multi-threaded programming technology is used to read and store different mesh data; Generate corresponding geometric primitives according to the grid data, and the geometric primitives are used to represent the structure and flow field characteristics of the grid in three-dimensional space; Map geometric primitives to the rendering engine of the VTK system and render them; The geometric primitives are converted into image data through the VTK system, and the distribution of physical quantities in the flow field is represented by color coding technology. A color mapping system is constructed to use different colors to represent different data values.
[0031] In the color mapping system, users can adjust color mapping, transparency and viewing angle parameters through the VTK system.
[0032] Realize the interaction between users and 3D visualization scenes through the VTK system; The interaction between the user and the 3D visualization scene through the VTK system includes: The interactive tools in the VTK system are used to interact with the 3D visualization scene. The functions of the interactive tools include translation, rotation, zooming in, zooming out, and mirroring. At the same time, the grid data can be switched interactively, allowing users to switch and view different flow field grid data without reloading the data.
[0033] Perform flow field analysis based on visualization results. The flow field analysis based on visualization results specifically includes: using visualization results to perform flow field analysis, and if problems are found in the numerical simulation process, timely record the problems and provide feedback.
[0034] Example like Figure 2 As shown, this embodiment takes the Cartesian grid as an example, but this method is also applicable to other grids (structured and unstructured grids).
[0035] Step S100, importing the initial Cartesian grid and flow field grid data. The generation process of the initial Cartesian grid and flow field grid data is as follows: 1) reading in the model geometry data and grid generation control parameters; 2) generating an initial uniform grid according to the control parameters, and establishing the connection relationship between the initial grid cells, and finally generating the initial Cartesian grid data, such as Figure 1 ; 3) The generated initial Cartesian grid is input into the flow field solution algorithm. After a series of complex calculation processes, a data set containing rich flow field information is finally generated.
[0036] Step S200, data normalization. Strictly check the input geometric data and flow field grid data to ensure the accuracy and consistency of the data. Any inaccuracy or inconsistency of the data may cause errors in the final result.
[0037] Step S300: Extract flow field features. Extract different types of representative information (such as pressure, velocity and other force field information) from the normalized flow field grid data to better understand and analyze the flow structure and behavior.
[0038] Step S400, data mapping and geometric primitive generation. Convert numerical data into intuitive geometric data, that is, construct a geometric representation of the data. This usually involves mapping the flow field grid data into geometric primitives, such as points, lines, surfaces, etc. Specifically, one is to establish a correspondence between Cartesian grid units and geometric primitives, and each Cartesian grid unit can correspond to a geometric primitive, such as a point, a small cube, etc., so as to achieve the spatial presentation of numerical data. The size and shape of the Cartesian grid unit can determine the size and shape of the geometric primitive. The second is to establish a mapping relationship between physical quantities and geometric properties, and map physical information such as pressure or temperature into visual features such as color depth and transparency of geometric primitives, thereby achieving an intuitive visual expression of flow field characteristics.
[0039] Step S500, mesh and flow field drawing and visualization. Use VTK to visualize the generated Cartesian mesh. Convert the geometric primitives corresponding to the Cartesian mesh units into image data to intuitively display the physical phenomena and characteristics of the flow field. The specific steps are as follows: 1) First, read the generated Cartesian grid data (such as the coordinates of grid points, connection information of grid cells, etc.) into the VTK data structure, and use multi-threaded programming technology to efficiently read and store different flow field grid data. This usually involves converting the original data format to a format supported by VTK, such as vtkPolyData, vtkDataSet, etc.
[0040] 2) Generate corresponding geometric primitives such as points, lines, and surfaces based on the mesh data. These geometric primitives will be used to represent the structure of the mesh and the characteristics of the flow field in three-dimensional space.
[0041] 3) Map the geometric primitives to the VTK rendering engine and render them, which requires setting rendering parameters such as light source, camera, material, and selecting appropriate visual attributes such as color and transparency to represent the physical phenomena and characteristics of the flow field.
[0042] 4) Use color coding technology to represent the distribution of physical quantities such as pressure and temperature in the flow field. Different colors can represent different data values, thus building a clear and intuitive color mapping system. Through this clever correspondence between colors and data values, the subtle differences in various physical characteristics in the flow field can be vividly displayed, and the overall situation and local details of the flow field can be accurately captured, such as Figure 3 The schematic diagram of visualization results of different flow field grid data is shown in the figure, where U, V, W represent the velocity fields in the x, y, and z directions respectively, PO represents density, CP represents pressure coefficient, and MACH represents Mach number.
[0043] Step S600, human-computer interaction. The interactive tools provided by VTK are used to implement the user's interactive functions with the 3D visualization scene (including translation, rotation, zooming in, zooming out, and mirroring, etc.). At the same time, the stored Cartesian grid flow field grid data is interactively switched, allowing the user to easily switch and view different flow field grid data without reloading the data.
[0044] Step S700, result analysis. Use the visualization results to analyze the flow field, such as evaluating the correctness and rationality of the numerical calculation method, and gaining insight into the complex physical laws in the flow field. If problems are found in the numerical simulation process, such as data anomalies and algorithm defects, timely feedback is required. According to the feedback problems, the numerical simulation method and visualization process are improved and optimized to improve accuracy and efficiency.
[0045] Based on the three-dimensional Cartesian grid and the visualization tool library (VTK), a fast flow field visualization data loading method is proposed. The input Cartesian grid and the physical characteristics of the flow field are extracted and the corresponding geometric primitives are generated. The generated primitives are mapped to the three-dimensional Cartesian grid using VTK. This process involves VTK's geometric transformation and color coding technology to ensure that the physical characteristics of the flow field (such as velocity, pressure, temperature, etc.) can be accurately reflected in three-dimensional space. Through dynamic mapping, the distribution and changes of the flow field grid data on the grid can be observed in real time. Using multi-threading technology, the physical characteristics of the flow field are extracted and stored, and real-time switching is achieved through VTK's interactive technology, realizing fast, accurate and intuitive visualization of the flow field grid data.
[0046] The above description is only a preferred embodiment of the present invention and is 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 in the protection scope of the present invention.
Claims
1. A method for fast flow field visualization data loading, characterized in that: The method comprises the following steps: Import the flow field grid data, initialize the flow field grid data, and normalize the flow field grid data; Extract flow field features, extract the physical features of the flow field through multi-threaded programming technology, and store the extracted physical features; Decouple the graphical user interface from flow field loading, and separate data loading and the graphical user interface GUI through multi-threaded programming technology; mesh and flow field drawing and visualization, and visualize the mesh data through the VTK system; Realize the interaction between users and 3D visualization scenes through the VTK system; Perform flow field analysis based on the visualization results.
2. A fast flow field visualization data loading method according to claim 1, characterized in that: Initializing the flow field grid data includes the following steps: Read in flow field grid data to generate control parameters, generate initial grids according to the control parameters, and establish connection relationships of the initial grids; The initial grid is input into the flow field solution algorithm to generate a data set containing flow field information.
3. A fast flow field visualization data loading method according to claim 1, characterized in that: The normalization processing of flow field grid data includes: verifying the input flow field grid data, adaptively identifying and analyzing different types of grid data, and unifying the flow field type, number of nodes, number of units, and key parameter information of the grid boundary in the grid.
4. A fast flow field visualization data loading method according to claim 1, characterized in that: The decoupled graphical user interface comprises: Establishing the correspondence between mesh data units and geometric primitives; Establishing a mapping relationship between physical quantities and geometric properties, where the physical quantities include pressure and temperature, and the geometric properties include the visual features of geometric primitives; According to the mapping relationship, a connection relationship is established for the generated geometric primitives, and the geometric primitives are converted into image data through the VTK system.
5. A fast flow field visualization data loading method according to claim 4, characterized in that: The geometric primitives are converted into image data by the VTK system, specifically including: Using the VTK system, the mesh data is read into the data structure of the VTK system, and multi-threaded programming technology is used to read and store different mesh data; Generate corresponding geometric primitives according to the grid data, and the geometric primitives are used to represent the structure and flow field characteristics of the grid in three-dimensional space; Map geometric primitives to the rendering engine of the VTK system and render them; The geometric primitives are converted into image data through the VTK system, and the distribution of physical quantities in the flow field is represented by color coding technology. A color mapping system is constructed to use different colors to represent different data values.
6. A fast flow field visualization data loading method according to claim 5, characterized in that: In the color mapping system, users can adjust color mapping, transparency and viewing angle parameters through the VTK system.
7. A fast flow field visualization data loading method according to claim 1, characterized in that: The interaction between the user and the 3D visualization scene through the VTK system includes: The interactive tools in the VTK system are used to allow users to interact with the 3D visualization scene. The functions of the interactive tools include translation, rotation, zooming in, zooming out, and mirroring. At the same time, the mesh data can be switched interactively, allowing users to switch and view different flow field mesh data without reloading the data.
8. A fast flow field visualization data loading method according to claim 1, characterized in that: The performing flow field analysis according to the visualization results specifically includes: performing flow field analysis using the visualization results, and if problems are found in the numerical simulation process, recording the problems and providing feedback in a timely manner.
Citation Information
Patent Citations
Streamline visualization parallel acceleration method based on process parallelism
CN115344383A
Unsteady flow field data processing method and device, electronic equipment and storage medium
CN116629162A
Visual rendering method for digital twinborn flood flow field
CN117237567A
Knowledge-guided flow field reconstruction and shock train leading edge position detection method and system
CN119475605A
Hydrodynamic model display method, system and equipment based on digital twinning and storage medium
CN119783589A
Cited By
Camera for capturing three-dimensional stress field of structure
CN121072335A
A camera for capturing a three-dimensional stress field of a gripping structure
CN121072335B