A flow field prediction method and system

By determining the wall distance and normal vector of the grid unit in the flow field preprocessing stage, and using CFD software to iteratively calculate and train the flow field prediction model, the problems of low flow field prediction accuracy and slow calculation convergence speed in the existing technology are solved. More efficient flow field prediction is achieved.

CN118485025BActive Publication Date: 2024-09-10CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410919473.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-09-10
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

The flow field prediction accuracy in the existing technology is low and the calculation convergence speed is slow. This is mainly due to the fact that only coordinates are used as local features of the flow field, resulting in unknown parameterized input network of shape features and unknown relationship between flow field points and shape.

Method used

By establishing a grid in the flow field preprocessing stage, determining the wall distance and normal vector of each grid unit, and using CFD software to iteratively calculate until convergence, the flow field variables under the corresponding working conditions are obtained as input to the flow field prediction model. , train the model to improve prediction accuracy.

Benefits of technology

The prediction accuracy and calculation efficiency of the flow field prediction model are improved, the geometric characteristics and the relationship between points and shapes of the flow field can be more accurately characterized, and the iterative calculation time is shortened.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485025B
    Figure CN118485025B
Patent Text Reader

Abstract

The present application relates to the field of computational fluid dynamics, and in particular to a flow field prediction method and system, wherein the method first uses pre-processing software to establish a grid for the flow field; determines the wall distance and normal vector of each grid unit; then pre-sets a certain working condition based on the flow field shape, and uses CFD software to iteratively calculate until convergence to obtain the flow field variables under the corresponding working condition; then uses the wall distance, normal vector and the angle of attack of the target object relative to the flow field as the input of a pre-constructed flow field prediction model, uses the flow field variables as the output of the flow field prediction model, and trains the flow field prediction model; finally uses the trained flow field prediction model to predict the target flow field and obtain the target flow field variables. The method solves the technical problems of low flow field prediction accuracy and slow calculation convergence speed in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computational fluid dynamics, and in particular to a flow field prediction method and system. Background Art

[0002] Computational Fluid Dynamics (CFD) technology is an interdisciplinary subject that uses computers to numerically solve the flow control NS equations (short for the Navier-Stokes equations, which are used to describe the control equations of fluid mechanics). CFD numerical simulation method is an indispensable means in the development of aircraft, with the advantages of low cost and high fidelity. Therefore, improving the efficiency of CFD simulation is of great significance for reducing the cost and improving the fidelity of aircraft development.

[0003] In the prior art, the coordinates of each point in the flow field are used as the local features of the flow field and as the input features of the model. By establishing a mathematical and physical model, a flow field that is relatively close to the real solution is constructed, thereby improving the efficiency of CFD numerical simulation.

[0004] However, in the process of implementing the technical solution of the invention in the embodiment of the present application, the inventors of the present application found that the above technical solution has at least the following technical problems:

[0005] Since the initial flow field setting is simple and only coordinates are used as local features of the flow field, the shape features of the example will be missing. The shape features are parameterized and input into the network. The relationship between the points in the flow field and the shape is unknown, resulting in low accuracy of flow field prediction and long convergence time. Summary of the invention

[0006] The invention discloses a flow field prediction method and system, aiming to solve the technical problem of how to improve the flow field prediction accuracy and calculation efficiency.

[0007] The above invention objectives are mainly achieved through the following technical solutions:

[0008] In a first aspect, a flow field prediction method is provided, which is executed by a flow field prediction system. The flow field is first gridded using pre-processing software; the wall distance and normal vector of each grid unit are determined; then, based on the flow field shape, certain working conditions are pre-set, and CFD software is used to iteratively calculate until convergence to obtain flow field variables under the corresponding working conditions; the wall distance, the normal vector and the angle of attack of the target object relative to the flow field are used as inputs of a pre-constructed flow field prediction model, and the flow field variables are used as outputs of the flow field prediction model to train the flow field prediction model; finally, the trained flow field prediction model is used to predict the target flow field to obtain the target flow field variables.

[0009] In a preferred technical solution, determining the wall distance and normal vector of each grid cell includes:

[0010] Determining whether the flow field is a turbulent flow field;

[0011] If so, a Cartesian three-dimensional rectangular coordinate system of the flow field shape wall is established, and the number of flow field shape grid cells parallel to the three coordinate planes of the Cartesian three-dimensional rectangular coordinate system is determined, wherein the flow field shape grid cells represent grid cells containing the flow field shape, and it is determined whether the number of flow field shape grid cells on each coordinate plane is greater than or equal to a preset value;

[0012] If the number of flow field shape grid cells in the three coordinate planes is less than the preset value, the distance between the grid cell and each flow field shape grid cell is calculated, and the minimum distance is selected as the wall distance of the grid cell relative to the flow field shape; based on the intersection of the grid cell and the wall of the flow field shape, the normal vector of the grid cell relative to the flow field shape at the intersection is obtained; each grid cell established in the flow field is traversed and looped to obtain the wall distance and normal vector of each grid cell.

[0013] In a preferred technical solution, the method further comprises:

[0014] If there is at least one coordinate plane among the three coordinate planes, and the number of flow field shape grid units parallel to it is greater than or equal to a preset value, then the coordinate plane corresponding to the maximum number of parallel coordinate planes is used as the target coordinate plane, and the coordinate axis perpendicular to the target coordinate plane is used as the target coordinate axis; the flow field shape and the grid unit are rotated according to the preset angle value with the target coordinate axis as the baseline, and a search box of the rotated grid unit is established, and the flow field shape grid unit falling into the search box is selected; the distance between the grid unit and the flow field shape grid unit falling into the search box is calculated, and the minimum distance is selected as the wall distance of the grid unit relative to the flow field shape; according to the intersection of the grid unit and the wall of the flow field shape, the normal vector of the grid unit relative to the flow field shape at the intersection is obtained; each grid unit established in the flow field is traversed and looped to obtain the wall distance and normal vector of each grid unit.

[0015] In a preferred technical solution, a certain working condition is pre-set based on the flow field shape, and the CFD software is used to iteratively calculate until convergence to obtain the flow field variables under the corresponding working condition, including:

[0016] If the flow field is a turbulent field, a certain working condition is pre-set based on the shape of the turbulent field, and the CFD software is used to iteratively calculate until convergence to obtain the flow field density, velocity, pressure, temperature and turbulence coefficient under the corresponding working condition.

[0017] In a preferred technical solution, it also includes:

[0018] If the flow field is a non-turbulent flow field, determining whether the grid established for the flow field is a structured grid;

[0019] If so, the topological relationship of the structured grid is converted into the topological relationship of the unstructured grid; the wall distance of each unstructured grid unit relative to the flow field shape is calculated using the calculation method of the unstructured wall distance; according to the intersection of the unstructured grid unit and the wall of the flow field shape, the normal vector of the unstructured grid unit relative to the flow field shape at the intersection is obtained; the wall distance of each unstructured grid unit is mapped back to the structured grid to obtain the wall distance and normal vector of each structured grid unit in the structured grid relative to the flow field shape.

[0020] In a preferred technical solution, a certain working condition is pre-set based on the flow field shape, and the CFD software is used to iteratively calculate until convergence to obtain the flow field variables under the corresponding working condition, including:

[0021] If the flow field is a non-turbulent flow field, a certain working condition is pre-set based on the flow field shape, and the CFD software is used to iteratively calculate until convergence to obtain the flow field density, velocity, pressure and temperature under the corresponding working condition.

[0022] In a preferred technical solution, the method further comprises:

[0023] The wall distance is normalized; the normalized calculation formula is as follows:

[0024] ;

[0025] in:

[0026] d represents the distance to the wall;

[0027] d max represents the maximum wall distance in the flow field;

[0028] d min represents the minimum wall distance in the flow field;

[0029] d new represents the normalized wall distance.

[0030] In a preferred technical solution, the method further comprises:

[0031] The target flow field variables are used as the initial fields calculated by the CFD software, and the CFD software is used again to iterate the calculation until convergence.

[0032] In a preferred technical solution, a flow field prediction model is pre-built using random forest.

[0033] In a second aspect, a flow field prediction system is provided, comprising:

[0034] The grid building module uses the pre-processing software to build the grid of the flow field;

[0035] A determination module for determining the wall distance and normal vector of each grid cell;

[0036] The CFD calculation module pre-sets certain working conditions based on the flow field shape, and uses CFD software to iteratively calculate until convergence to obtain the flow field variables under the corresponding working conditions;

[0037] A model training module, used to use the wall distance, the normal vector and the angle of attack of the target object relative to the flow field as inputs of a pre-built flow field prediction model, and use the flow field variables as outputs of the flow field prediction model to train the flow field prediction model;

[0038] The flow field prediction module uses the trained flow field prediction model to predict the target flow field and obtain the target flow field variables.

[0039] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements part or all of the steps of a flow field prediction method as described in the first aspect.

[0040] Compared with the existing technology, the beneficial effects are:

[0041] The present invention uses the wall distance, normal vector and angle of attack in the flow field as the input of the flow field prediction model, uses CFD software to iteratively calculate until convergence, and uses the obtained flow field variables as the output of the flow field prediction model, trains the flow field prediction model, and finally uses the trained flow field prediction model to predict the target flow field to obtain the target flow field variables; the wall distance and normal vector can characterize the geometric characteristics of the flow field, can represent both local characteristics and global characteristics, and can also describe the relationship between points and shapes in the flow field, thereby improving the prediction accuracy of the flow field prediction model and accelerating the iterative calculation of the flow field. The technical problem of low flow field prediction accuracy and slow calculation convergence speed in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A schematic diagram of the structure of a flow field prediction system in an embodiment of the present invention;

[0043] Figure 2 A schematic diagram of a flow field prediction method in an embodiment of the present invention;

[0044] Figure 3 A schematic diagram of a mesh generation process in an embodiment of the present invention;

[0045] Figure 4 Schematic diagram of wall distance and normal vector in an embodiment of the present invention;

[0046] Figure 5 Schematic diagram of the calculation process of the flow field prediction model in an embodiment of the present invention;

[0047] Figure 6 A schematic diagram of a flow chart of a turbulence field prediction method in an embodiment of the present invention;

[0048] Figure 7 It is a schematic diagram of a flow field contour wall parallel to a Cartesian coordinate plane in an embodiment of the present invention;

[0049] Figure 8 A schematic diagram of rotating the flow field shape and the grid unit in an embodiment of the present invention;

[0050] Fig. 9 Schematic diagram of the relative positions of the flow field shape wall and the rotating grid unit after rotation in an embodiment of the present invention;

[0051] Fig.10 Schematic diagram of another turbulence field prediction method according to an embodiment of the present invention;

[0052] Fig.11 A schematic diagram of a flow chart of another flow field prediction method according to an embodiment of the present invention;

[0053] Fig.12 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the following will be combined with the drawings in one or more embodiments of this specification to clearly and completely describe the technical solutions in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0055] It should be noted that the description of the embodiments of the present invention is only for more clearly illustrating the technical solutions of the embodiments of the present invention, and does not constitute a limitation on the technical solutions provided by the embodiments of the present invention.

[0056] Embodiment 1

[0057] The embodiment of the present invention discloses a flow field prediction method, which is implemented by a flow field prediction system, hereinafter referred to as the system. Figure 1As shown, the system includes a grid establishment module 101, a determination module 102, a CFD calculation module 103, a model training module 104 and a flow field prediction module 105. First, the grid is established for the flow field by using the pre-processing software through the grid establishment module; the wall distance and normal vector of each grid unit are determined by the determination module; then, based on the flow field shape, a certain working condition is pre-set, and the CFD software is used to iteratively calculate until convergence to obtain the flow field variables under the corresponding working condition; then, the model training module is used to take the wall distance, the normal vector and the angle of attack of the target object relative to the flow field as the input of the pre-constructed flow field prediction model, and the flow field variables are used as the output of the flow field prediction model to train the flow field prediction model; finally, the flow field prediction module uses the trained flow field prediction model to predict the target flow field to obtain the target flow field variables.

[0058] like Figure 2 As shown, the above method specifically includes the following steps:

[0059] 201. Use pre-processing software to establish a grid for the flow field.

[0060] like Figure 3 As shown, a pre-processing software such as ICEM (Integrated Computational Environment for Multiphysics, a fluid dynamics software) is used to establish a grid for a pre-selected flow field. In the figure, B represents the flow field calculation domain and G represents the grid.

[0061] 202. Determine the wall distance and normal vector of each grid cell.

[0062] Select the shape and its mesh model to be accelerated, and obtain the wall distance and normal vector of each mesh point relative to the shape wall from the mesh model. Figure 4 As shown, for a grid unit A in the flow field, the wall distance d is the shortest distance between the grid unit A and the outer wall; let the intersection of d and the outer wall be B, and the normal vector n be the normal vector of point B on the outer wall.

[0063] Based on the flow field shape, certain working conditions are set in advance, and CFD software is used to iteratively calculate until convergence to obtain the flow field variables under the corresponding working conditions.

[0064] For the flow field shape that needs to be accelerated, a certain amount of working conditions are selected, and the CFD software is used to calculate until convergence to obtain the flow field variables, which include flow field density, velocity, pressure, temperature and turbulence coefficient.

[0065] 204. Using the wall distance, normal vector, and angle of attack of the target object relative to the flow field as inputs of a pre-built flow field prediction model, using the flow field variables as outputs of the flow field prediction model, and training the flow field prediction model.

[0066] like Figure 5 As shown in the figure, the wall distance, normal vector and angle of attack are used as the input of the pre-built flow field prediction model, and the calculated flow field variables are used as the output of the flow field prediction model to train the flow field prediction model. The angle of attack is the angle between the target object and the flow field, which can be customized according to different application scenarios; for example, for the wing shape, the angle of attack is defined as the angle between the chord and the incoming flow velocity, with the head up being positive and the head down being negative.

[0067] In a feasible implementation, the flow field prediction model is constructed using random forest, which is beneficial to further improve the flow field prediction accuracy.

[0068] 205. The trained flow field prediction model is used to predict the target flow field to obtain the target flow field variable.

[0069] Similarly, the target flow field is meshed using pre-processing software. The target wall distance and target normal vector of each mesh unit of the target flow field relative to the outer wall are determined. The target wall distance, target normal vector, and the angle of attack of the target object relative to the flow field are used as inputs of the trained flow field prediction model to predict the target flow field and obtain the target flow field variables.

[0070] The present invention uses the wall distance, normal vector and angle of attack in the flow field as the input of the flow field prediction model, uses CFD software to iteratively calculate until convergence, and uses the obtained flow field variables as the output of the flow field prediction model, trains the flow field prediction model, and finally uses the trained flow field prediction model to predict the target flow field to obtain the target flow field variables; the wall distance and normal vector can characterize the geometric characteristics of the flow field, can represent both local characteristics and global characteristics, and can also describe the relationship between points and shapes in the flow field, thereby improving the prediction accuracy of the flow field prediction model and accelerating the iterative calculation of the flow field. The technical problem of low flow field prediction accuracy and slow calculation convergence speed in the prior art is solved.

[0071] Embodiment 2

[0072] The embodiment of the present invention discloses a turbulence field prediction method, which is still implemented by the above-mentioned flow field prediction system, hereinafter referred to as the system, and the structure is shown in FIG. Figure 1 As shown, when the determination module 102 determines that the flow field is a turbulent field, the system executes a turbulent field prediction method disclosed in the present invention.

[0073] like Figure 6 As shown, the above method specifically includes the following steps:

[0074] 601. Use pre-processing software to establish a grid for the flow field.

[0075] 602. Establish a Cartesian three-dimensional rectangular coordinate system for the flow field shape wall.

[0076] The grid described in this application, i.e., the computational grid, refers to the discretization of a continuous flow field into a finite number of discrete units (triangles, tetrahedrons, etc.). These units and the geometric topological relationship between them are called computational grids. The flow field shape wall refers to the surface of a solid contained in the computational domain of CFD simulation, such as the shape wall of a turbulent field, or the shape wall of an aircraft. The flow field shape grid unit described below refers to the discrete unit on the flow field shape wall in the computational grid.

[0077] Cartesian coordinate system refers to the general term for rectangular coordinate system and oblique coordinate system. Two coordinate axes intersecting at the origin constitute a plane affine coordinate system. If the units of measurement on the two coordinate axes are equal, the affine coordinate system is called a Cartesian coordinate system. A Cartesian coordinate system with two coordinate axes perpendicular to each other is called a Cartesian rectangular coordinate system. In this application, Cartesian coordinate system refers to a Cartesian three-dimensional rectangular coordinate system.

[0078] 603. Determine the number of flow field shape grid cells parallel to three coordinate planes of the Cartesian three-dimensional rectangular coordinate system, wherein the flow field shape grid cells represent grid cells that contain the flow field shape.

[0079] The coordinate axes of the Cartesian three-dimensional rectangular coordinate system include the X-axis, Y-axis and Z-axis which are perpendicular to each other. The coordinate plane of the Cartesian three-dimensional rectangular coordinate system refers to the plane formed by two coordinate axes in the Cartesian three-dimensional rectangular coordinate system, specifically including three XOY planes, YOZ planes and XOZ planes.

[0080] In a feasible implementation, each flow field shape grid unit on the flow field shape wall is traversed; it is determined whether the surface normal vector of the flow field shape grid unit is parallel to the coordinate axis of the Cartesian three-dimensional rectangular coordinate system; if so, a coordinate plane perpendicular to the coordinate axis is determined, and the number of flow field shape grid units parallel to the coordinate plane is increased by one to obtain the number of flow field shape grid units parallel to the coordinate plane.

[0081] like Figure 7 As shown in the figure, if the normal vector of the flow field shape grid unit surface is parallel to the X-axis, then this flow field shape grid unit is parallel to the YOZ plane of the Cartesian coordinate plane. If the flow field shape grid unit is parallel to the Cartesian coordinate plane, the total number of flow field shape grid units parallel to the YOZ plane of the Cartesian coordinate plane is saved and recorded as a. Similarly, the number of flow field shape grid units parallel to each coordinate plane is obtained; the total number of flow field shape grid units parallel to the XOZ and XOY planes of the Cartesian coordinate plane is recorded as b and c. Figure 7 In the figure, each dot represents a flow field shape grid unit.

[0082] 604. Determine whether the number of mesh units of the flow field shape on each coordinate plane is greater than or equal to a preset value.

[0083] That is, determine whether a, b, and c are greater than or equal to the preset values. If a, b, and c are all less than the preset values, it is determined that the wall surface of the flow field shape is not parallel to the corresponding Cartesian coordinate plane; if at least one of a, b, and c is greater than or equal to the preset value, it is determined that the wall surface of the flow field shape is parallel to the Cartesian coordinate plane.

[0084] 605. If the number of flow field shape grid units on the three coordinate planes is less than a preset value, the distance between the grid unit and each flow field shape grid unit is calculated, and the minimum distance is selected as the wall distance of the grid unit relative to the flow field shape.

[0085] As mentioned above, if a, b, and c are all smaller than the preset values, it is determined that the wall of the flow field shape is not parallel to the corresponding Cartesian coordinate plane; the ADT (Alternating Digital Tree, a special binary tree data structure) search method can be used to calculate the wall distance, calculate the distance between the grid unit and each flow field shape grid unit, and select the minimum distance as the wall distance of the grid unit relative to the flow field shape. At this time, there is no need to traverse all the flow field shape grid units, so the efficiency is extremely high.

[0086] 606. If there is at least one coordinate plane among the three coordinate planes, and the number of flow field shape grid units parallel to it is greater than or equal to a preset value, the coordinate plane corresponding to the maximum number is used as the target coordinate plane, and the coordinate axis perpendicular to the target coordinate plane is used as the target coordinate axis.

[0087] As mentioned above, if at least one of a, b, and c is greater than or equal to the preset value, it is determined that the flow field shape wall is parallel to the Cartesian coordinate plane. At this time, since the flow field shape wall is parallel to the Cartesian coordinate plane, the boundary of the geometric coordinate box of the spatial point is parallel to the flow field shape wall; when performing ADT search, if the given search radius r1 is too small, the flow field shape grid unit cannot be searched; and after enlarging the search radius r2, too many flow field shape grid units will be searched. Both of these situations will cause the ADT method to degenerate into a direct search method, and the efficiency will be greatly reduced.

[0088] Therefore, the coordinate plane corresponding to the maximum number is taken as the target coordinate plane, and the coordinate axis perpendicular to the target coordinate plane is taken as the target coordinate axis. The flow field shape and the grid unit are rotated according to the preset angle value with the target coordinate axis as the baseline. The wall surface of the flow field shape after rotation is no longer parallel to the Cartesian coordinate plane, and then the wall distance is calculated. This solves the technical problem that the flow field shape grid unit searched by the ADT method cannot be found because the given search radius r1 is too small, or too many flow field shape grid units are searched after the search radius r2 is enlarged, resulting in a significant decrease in search efficiency. This is conducive to greatly improving the efficiency of wall distance calculation. That is, proceed to step 607.

[0089] 607. Rotate the flow field shape and grid unit according to a preset angle value based on the target coordinate axis.

[0090] It is understandable that the coordinate values ​​of each flow field shape grid unit after rotation are stored in the ADT data structure. It should be noted that the wall distance refers to the shortest distance from any grid unit in space to the flow field shape wall. Therefore, after the grid unit is rotated, a rotated grid unit for calculating the wall distance is generated, such as Figure 8 As shown, the rotation operation of the grid cells is consistent with the rotation operation of the flow field shape grid cells.

[0091] 608. Create a search box for the rotated grid cells, and select the flow field shape grid cells that fall within the search box.

[0092] Then determine the appropriate search radius and establish a search box for the rotated grid unit. The search box can be a circular area with the rotated grid unit as the center and a preset search radius as the radius. Alternatively, determine the search diameter; on a plane parallel to the target coordinate plane, establish a square with the rotated grid unit as the center and the search diameter as the side length; use the square as the search box for the rotated grid unit; and the two adjacent sides of the search box are parallel to the two coordinate axes in the target coordinate plane.

[0093] In a feasible implementation, before step 607, the method may further include: determining a quantity interval to which the quantity of the flow field shape grid units parallel to the target coordinate plane belongs; and presetting an associated rotation angle according to the quantity interval. , the rotation angle is 25°, , the rotation angle is 35°; therefore, the rotation angle can be preset as a fixed value, or can be preset as an associated setting according to a quantity interval, and can be set according to a specific application scenario, which will not be described here.

[0094] 609. Calculate the distance between the grid unit and the grid unit of the flow field shape falling into the search box, and select the minimum distance as the wall distance of the grid unit relative to the flow field shape.

[0095] Based on the constructed search box, the flow field shape grid cells contained in the search box are searched in the ADT data structure. Fig. 9 The relative positions of a rotated flow field shape wall and a rotated grid unit are shown. Fig. 9 In the figure, each small dot represents a flow field shape grid unit, the dotted box represents the established search box, the flow field shape grid unit that falls into the search box is determined, the distance between the rotated grid unit and the flow field shape grid unit that falls into the search box is calculated, and the minimum distance is selected as the wall distance of the grid unit relative to the flow field shape.

[0096] It should be noted that, in this embodiment, the flow field shape grid unit is rotated, and only the rotated flow field shape grid unit is stored in the ADT, and the original calculation grid will not be changed; the grid unit is rotated, and only the rotated grid unit is used to calculate the wall distance, and the original calculation grid will not be changed. The flow field shape grid unit and the grid unit are subjected to exactly the same rotation operation, so that the relative position of the rotated grid unit to the flow field shape grid unit in the ADT is consistent with the relative position of the real grid unit to the real flow field shape wall, ensuring the accuracy of the wall distance calculation result. Therefore, the calculated wall distance is also the wall distance from the real grid unit to the real flow field shape wall.

[0097] In the present embodiment, when calculating the wall distance of the turbulent field, when the turbulent field shape wall is parallel to the Cartesian coordinate plane, the flow field shape grid units and grid points are synchronously rotated so that the rotated wall is no longer parallel to the Cartesian coordinate plane, and then the wall distance is calculated. This solves the technical problems that the flow field shape grid units searched by the ADT method cannot be found due to the given search radius r1 being too small, or that too many flow field shape grid units are searched after the search radius r2 is enlarged, resulting in a significant decrease in search efficiency. This is conducive to greatly improving the efficiency of wall distance calculation.

[0098] 610. According to the intersection point between the grid unit and the wall surface of the flow field shape, obtain the normal vector of the grid unit relative to the flow field shape at the intersection point.

[0099] like Figure 4As shown in the figure, for a grid unit A in the flow field, the wall distance d is the shortest distance between the grid unit A and the outer wall; let the intersection of d and the outer wall be B, and the normal vector n be the normal vector of point B on the outer wall. According to the intersection of the grid unit and the wall of the flow field outer shape, the normal vector of the grid unit relative to the flow field outer shape at the intersection is obtained.

[0100] 611. Traverse each grid unit established in the flow field to obtain the wall distance and normal vector of each grid unit.

[0101] Repeat the above steps 605 to 610, traverse each grid unit in the flow field, and calculate in the above manner to obtain the wall distance and normal vector of each grid unit.

[0102] 612. Normalize the wall distance.

[0103] In a feasible implementation, the normalized calculation formula is as follows:

[0104] ;

[0105] in:

[0106] d represents the distance to the wall;

[0107] d max represents the maximum wall distance in the flow field;

[0108] d min represents the minimum wall distance in the flow field;

[0109] d new represents the normalized wall distance

[0110] Based on the turbulent field shape, a certain working condition is pre-set, and CFD software is used to iteratively calculate until convergence to obtain the flow field density, velocity, pressure, temperature and turbulence coefficient under the corresponding working condition.

[0111] 614. Using the wall distance, normal vector, and angle of attack of the target object relative to the flow field as inputs of a pre-built flow field prediction model, using the flow field variables as outputs of the flow field prediction model, and training the flow field prediction model.

[0112] 615. The trained flow field prediction model is used to predict the target flow field to obtain the target flow field variables.

[0113] That is, the predicted target flow field variables include flow field density, velocity, pressure, temperature and turbulence coefficient.

[0114] The specific implementation of steps 601, 613, and 614 may refer to steps 201, 204, and 205 in the above-mentioned embodiment 1, and will not be repeated here.

[0115] The present invention uses the wall distance, normal vector and angle of attack in the flow field as the input of the flow field prediction model, uses CFD software to iteratively calculate until convergence, and uses the obtained flow field variables as the output of the flow field prediction model, trains the flow field prediction model, and finally uses the trained flow field prediction model to predict the target flow field to obtain the target flow field variables; the wall distance and normal vector can characterize the geometric characteristics of the flow field, can represent both local characteristics and global characteristics, and can also describe the relationship between points and shapes in the flow field, thereby improving the prediction accuracy of the flow field prediction model and accelerating the iterative calculation of the flow field. The technical problem of low flow field prediction accuracy and slow calculation convergence speed in the prior art is solved.

[0116] Embodiment 3

[0117] The embodiment of the present invention also discloses a non-turbulent flow field prediction method, which is still implemented by the flow field prediction system, hereinafter referred to as the system, and the structure is shown in FIG. Figure 1 As shown, when the determination module 102 determines that the flow field is a non-turbulent flow field, the system executes a non-turbulent flow field prediction method disclosed in the present invention.

[0118] like Fig.10 As shown, the above method specifically includes the following steps:

[0119] 1001. Use pre-processing software to establish a grid for the flow field.

[0120] 1002. Determine whether the grid established for the flow field is a structural grid.

[0121] 1003. If so, the topological relationship of the structured grid is converted into the topological relationship of the unstructured grid.

[0122] In a feasible implementation, the structured grid points and structured grid units of the structured grid are numbered; a mapping relationship between the structured grid points and the unstructured grid points is constructed, and a mapping relationship between the structured grid units and the unstructured grid units is constructed; and a topological relationship of the unstructured grid is obtained. The topological relationship of the unstructured grid includes a topological connection relationship between the unstructured grid units and the unstructured grid unit points; the topological connection relationship of the unstructured grid includes the serial number of the unstructured grid unit, the number of the unstructured grid points, and the serial number of the unstructured grid points.

[0123] 1004. The non-structured wall distance calculation method is used to calculate the wall distance of each non-structured grid unit relative to the flow field shape.

[0124] As described above, all flow field shape grid cells of the unstructured grid are traversed, and the coordinate information of the flow field shape grid cells is stored in an alternating digital tree data structure (ADT); a geometric search box of the grid cells is constructed, a search radius is preset, and the flow field shape grid cells contained in the geometric search box are searched in the ADT; the distance from the unstructured grid cell to the flow field shape grid cell in the geometric search box is calculated, and the minimum distance is selected as the wall distance of the unstructured grid cell relative to the flow field shape.

[0125] The present invention obtains an unstructured grid by converting the topological relationship of a structured grid into the topological relationship of an unstructured grid, so that the structured grid can be temporarily converted into an unstructured grid, thereby providing a prerequisite for the application of a wall distance calculation method using an unstructured grid; the wall distance information of the structured grid is obtained by mapping the wall distance information of the temporary unstructured grid back to the structured grid, and then the wall distance information of the structured grid is obtained by using the wall distance calculation method of the unstructured grid, thereby providing a new idea for the calculation method of the wall distance of the structured grid; by constructing an unstructured grid that can use the calculation method of the unstructured wall distance to obtain the wall distance information, the problem of different grid topologies in the prior art is avoided. , the problem that a single wall distance calculation program cannot process structured and unstructured grids at the same time, realizes the need for simultaneous calculation of structured and unstructured grid wall distances, and reduces the maintenance cost and difficulty of using the program; while the calculation method of structured grid wall distance, using a set of wall distance calculation programs can satisfy the calculation of wall distances in hybrid grids, and can simultaneously meet the needs of wall distance calculations for structured grids in the hypersonic field and unstructured grids in the low-speed and sub-transonic fields, broadens the application scenarios of wall distance calculation methods in the existing technology, greatly reduces the storage and calculation amount of wall distance calculation programs in hybrid grids, effectively improves the calculation efficiency, and has the advantages of low cost and simplicity.

[0126] 1005. According to the intersection point between the unstructured grid unit and the wall surface of the flow field shape, obtain the normal vector of the unstructured grid unit relative to the flow field shape at the intersection point.

[0127] like Figure 4 As shown in the figure, for a grid unit A in the flow field, the wall distance d is the shortest distance between the grid unit A and the outer wall; let the intersection of d and the outer wall be B, and the normal vector n be the normal vector of point B on the outer wall. According to the intersection of the grid unit and the wall of the flow field outer shape, the normal vector of the grid unit relative to the flow field outer shape at the intersection is obtained.

[0128] 1006. Traverse each grid unit established in the flow field to obtain the wall distance and normal vector of each grid unit.

[0129] Repeat the above steps 1004 to 1005, traverse each unstructured grid unit in the flow field, and calculate in the above manner to obtain the wall distance and normal vector of each unstructured grid unit.

[0130] 1007. Map the wall distance of each unstructured grid unit back to the structured grid to obtain the wall distance and normal vector of each structured grid unit in the structured grid relative to the flow field shape.

[0131] According to the mapping relationship established above, the wall distance of each unstructured grid unit is mapped back to the structured grid to obtain the wall distance and normal vector of each structured grid unit in the structured grid relative to the flow field shape.

[0132] 1008. Normalize the wall distance.

[0133] In a feasible implementation, the normalized calculation formula is as follows:

[0134] ;

[0135] in:

[0136] d represents the distance to the wall;

[0137] d max represents the maximum wall distance in the flow field;

[0138] d min represents the minimum wall distance in the flow field;

[0139] d new represents the normalized wall distance

[0140] 1009. Based on the non-turbulent flow field shape, a certain working condition is pre-set, and the CFD software is used to iteratively calculate until convergence to obtain the flow field density, velocity, pressure and temperature under the corresponding working condition.

[0141] 1010. Use the wall distance, normal vector and angle of attack of the target object relative to the flow field as inputs of a pre-built flow field prediction model, use the flow field variables as outputs of the flow field prediction model, and train the flow field prediction model.

[0142] 1011. Use the trained flow field prediction model to predict the target flow field and obtain the target flow field variables.

[0143] That is, the predicted target flow field variables include flow field density, velocity, pressure and temperature.

[0144] Among them, the specific implementation methods of steps 1001, 1005, 1006, 1008, 1009, 1010, and 1011 can refer to steps 201, 204, 205, 610~615 in the above-mentioned embodiments 1 and 2, and will not be repeated here.

[0145] The present invention uses the wall distance, normal vector and angle of attack in the flow field as the input of the flow field prediction model, uses CFD software to iteratively calculate until convergence, and uses the obtained flow field variables as the output of the flow field prediction model, trains the flow field prediction model, and finally uses the trained flow field prediction model to predict the target flow field to obtain the target flow field variables; the wall distance and normal vector can characterize the geometric characteristics of the flow field, can represent both local characteristics and global characteristics, and can also describe the relationship between points and shapes in the flow field, thereby improving the prediction accuracy of the flow field prediction model and accelerating the iterative calculation of the flow field. The technical problem of low flow field prediction accuracy and slow calculation convergence speed in the prior art is solved.

[0146] Embodiment 4

[0147] The embodiment of the present invention also discloses a flow field prediction method, which is still implemented by the above-mentioned flow field prediction system, hereinafter referred to as the system, and the structure is shown in FIG. Figure 1 As shown, the system executes a non-turbulent flow field prediction method disclosed in the present invention.

[0148] like Fig.11 As shown, the above method specifically includes the following steps:

[0149] 1101. Use pre-processing software to establish a grid for the flow field.

[0150] 1102. Determine the wall distance and normal vector of each grid cell.

[0151] 1103. Based on the flow field shape, certain working conditions are set in advance, and CFD software is used to iteratively calculate until convergence to obtain the flow field variables under the corresponding working conditions.

[0152] 1104. Use the wall distance, normal vector, and angle of attack of the target object relative to the flow field as inputs of a pre-built flow field prediction model, use the flow field variables as outputs of the flow field prediction model, and train the flow field prediction model.

[0153] 1105. Use the trained flow field prediction model to predict the target flow field and obtain the target flow field variables.

[0154] 1106. Use the target flow field variable as the initial field calculated by the CFD software, and iterate the calculation again using the CFD software until convergence.

[0155] The embodiment of the present invention uses the predicted flow field variables as the initial field of CFD calculation, converts the format of the predicted flow field variable matrix into a format recognizable by CFD software, assigns the obtained flow field variables to the flow field of CFD software, and uses CFD software to perform iterative calculation again until convergence. The predicted flow field variables are used as the initial field of CFD calculation, and CFD calculation is performed again until convergence; through two iterative calculation convergences, compared with the existing CFD calculation method, the CFD calculation speed is improved, and at the same time, physical constraints are met, and the same accuracy as CFD calculation is achieved.

[0156] like Fig.12 As shown, an embodiment of the present invention also provides an electronic device, which includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 to a random access memory (RAM) 1203. Various programs and data required for system operation are also stored in (RAM) 1203. CPU 1201, ROM 1202 and RAM 1203 are connected to each other through a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0157] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage section 1208 as needed.

[0158] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0159] As another aspect, the present invention further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements part or all of the steps of a flow field prediction method described in the above embodiment.

[0160] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.

Claims

1. A flow field prediction method, characterized in that: include: Using pre-processing software to establish a grid for the flow field, determine the wall distance and normal vector of each grid unit; determine whether the flow field is a turbulent field; If so, a Cartesian three-dimensional rectangular coordinate system of the flow field shape wall is established, and the number of flow field shape grid cells parallel to the three coordinate planes of the Cartesian three-dimensional rectangular coordinate system is determined, wherein the flow field shape grid cells represent grid cells containing the flow field shape, and it is determined whether the number of flow field shape grid cells on each coordinate plane is greater than or equal to a preset value; If the number of mesh units of the flow field shape of the three coordinate planes is less than the preset value, the distance between the mesh unit and each mesh unit of the flow field shape is calculated, and the minimum distance is selected as the wall distance of the mesh unit relative to the flow field shape; according to the intersection of the mesh unit and the wall of the flow field shape, the normal vector of the mesh unit relative to the flow field shape at the intersection is obtained; each mesh unit established in the flow field is traversed and looped to obtain the wall distance and normal vector of each mesh unit; Based on the flow field shape, a certain working condition is pre-set, and the CFD software is used to iteratively calculate until convergence to obtain the flow field variables under the corresponding working condition; if the flow field is a turbulent field; based on the turbulent field shape, a certain working condition is pre-set, and the CFD software is used to iteratively calculate until convergence to obtain the flow field density, velocity, pressure, temperature and turbulence coefficient under the corresponding working condition; If the flow field is a non-turbulent flow field, determining whether the grid established for the flow field is a structured grid; If so, convert the topological relationship of the structured grid into the topological relationship of the unstructured grid; use the calculation method of the unstructured wall distance to calculate the wall distance of each unstructured grid unit relative to the flow field shape; according to the intersection of the unstructured grid unit and the wall of the flow field shape, obtain the normal vector of the unstructured grid unit relative to the flow field shape at the intersection; map the wall distance of each unstructured grid unit back to the structured grid, and obtain the wall distance and normal vector of each structured grid unit in the structured grid relative to the flow field shape; The wall distance, the normal vector and the angle of attack of the target object relative to the flow field are used as inputs of a pre-constructed flow field prediction model, and the flow field variables are used as outputs of the flow field prediction model to train the flow field prediction model; The trained flow field prediction model is used to predict the target flow field to obtain the target flow field variables.

2. The flow field prediction method according to claim 1, characterized in that: Also includes: If there is at least one coordinate plane among the three coordinate planes, and the number of flow field shape grid units parallel to it is greater than or equal to a preset value, then the coordinate plane corresponding to the maximum number of parallel units is taken as the target coordinate plane, and the coordinate axis perpendicular to the target coordinate plane is taken as the target coordinate axis; The flow field shape and the grid unit are rotated according to a preset angle value with the target coordinate axis as a baseline, a search box of the rotated grid unit is established, and the flow field shape grid unit falling into the search box is selected; Calculate the distance between the grid unit and the grid unit of the flow field shape falling into the search box, and select the minimum value of the distance as the wall distance of the grid unit relative to the flow field shape; according to the intersection point of the grid unit and the wall of the flow field shape, obtain the normal vector of the grid unit relative to the flow field shape at the intersection point; Each grid unit established in the flow field is traversed and cycled to obtain the wall distance and normal vector of each grid unit.

3. The flow field prediction method according to claim 1, characterized in that: Based on the flow field shape, a certain working condition is set in advance, and the CFD software is used to iteratively calculate until convergence to obtain the flow field variables under the corresponding working condition, including: If the flow field is a non-turbulent flow field, a certain working condition is pre-set based on the flow field shape, and the CFD software is used to iteratively calculate until convergence to obtain the flow field density, velocity, pressure and temperature under the corresponding working condition.

4. The flow field prediction method according to any one of claims 1 to 3, characterized in that: Also includes: normalizing the wall distance; The normalized calculation formula is as follows: ; in: represents the wall distance; represents the maximum wall distance in the flow field; represents the minimum wall distance in the flow field; represents the normalized wall distance.

5. The flow field prediction method according to any one of claims 1 to 3, characterized in that: Also includes: The target flow field variables are used as the initial fields calculated by the CFD software, and the CFD software is used again to iterate the calculation until convergence.

6. A flow field prediction system, characterized in that: include: The grid building module uses the pre-processing software to build the grid of the flow field; A determination module for determining the wall distance and normal vector of each grid cell; Determine whether the flow field is a turbulent field; if so, establish a Cartesian three-dimensional rectangular coordinate system for the flow field shape wall, determine the number of flow field shape grid units parallel to the three coordinate planes of the Cartesian three-dimensional rectangular coordinate system, wherein the flow field shape grid unit represents a grid unit containing the flow field shape, and determine whether the number of flow field shape grid units on each coordinate plane is greater than or equal to a preset value; If the number of mesh units of the flow field shape of the three coordinate planes is less than the preset value, the distance between the mesh unit and each mesh unit of the flow field shape is calculated, and the minimum distance is selected as the wall distance of the mesh unit relative to the flow field shape; according to the intersection of the mesh unit and the wall of the flow field shape, the normal vector of the mesh unit relative to the flow field shape at the intersection is obtained; each mesh unit established in the flow field is traversed and looped to obtain the wall distance and normal vector of each mesh unit; The CFD calculation module pre-sets certain working conditions based on the flow field shape, and uses CFD software to iteratively calculate until convergence to obtain the flow field variables under the corresponding working conditions; if the flow field is a turbulent field, a certain working condition is pre-set based on the turbulent field shape, and CFD software is used to iteratively calculate until convergence to obtain the flow field density, velocity, pressure, temperature and turbulence coefficient under the corresponding working conditions; If the flow field is a non-turbulent flow field, determining whether the grid established for the flow field is a structured grid; If so, convert the topological relationship of the structured grid into the topological relationship of the unstructured grid; use the calculation method of the unstructured wall distance to calculate the wall distance of each unstructured grid unit relative to the flow field shape; according to the intersection of the unstructured grid unit and the wall of the flow field shape, obtain the normal vector of the unstructured grid unit relative to the flow field shape at the intersection; map the wall distance of each unstructured grid unit back to the structured grid, and obtain the wall distance and normal vector of each structured grid unit in the structured grid relative to the flow field shape; A model training module, used to use the wall distance, the normal vector and the angle of attack of the target object relative to the flow field as inputs of a pre-built flow field prediction model, and use the flow field variables as outputs of the flow field prediction model to train the flow field prediction model; The flow field prediction module uses the trained flow field prediction model to predict the target flow field and obtain the target flow field variables.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a flow field prediction method as described in any one of claims 1 to 5 are implemented.