A method, device, equipment and medium for supplementing missing boundary surfaces of unstructured grids

By constructing and using map function to process grid information files, the problem of missing boundary surfaces in grid files in CFD numerical simulation is solved, and the supplementation of missing boundary surfaces and effective reconstruction of grids is achieved, avoiding the time loss of re-drawing the grid.

CN119808660BActive Publication Date: 2025-05-30CALCULATION AERODYNAMICS INST CHINA AERODYNAMICS RES & DEV CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510302361.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-05-30
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

In CFD numerical simulation, the missing interface often occurs in the grid files generated by commercial software, which makes it impossible to determine the boundary type of missing faces and the inability to supplement the missing interface.

Method used

By reading the basic information in the grid file, constructing a structure that stores the surface unit information to define the first map function and the second map function, analyzing the composition information of the boundary surface to obtain target information, determining whether the body unit surface exists, updating the surface unit information, determining the number of missing boundary surfaces and adjacent surfaces, judging the boundary type of the missing boundary surface according to the boundary type of the adjacent surface, and storing complete information in the second map function to supplement the missing surface.

Benefits of technology

It effectively supplements the missing boundary interface, avoids the time loss of redrawing the grid, and ensures the accuracy and efficiency of CFD numerical simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808660B_ABST
    Figure CN119808660B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, device and medium for supplementing missing boundary surfaces of unstructured grids, which relates to the field of grid data processing, and includes: reading the basic information of a grid file, defining a map function through a structure body, and obtaining target information by parsing the composition information of boundary surfaces; inputting the target key-value into the first map function, parsing the composition information of volume elements, and judging whether each surface of the volume element exists in the first map function based on the numbers of points on each surface of the obtained volume element; if it exists, updating the information of each surface element, writing the key-value pair into the second map function, and determining the number of missing boundary surfaces and the adjacent surfaces of the missing boundary surfaces based on the map function; judging the boundary type of the missing boundary surface according to the boundary type of the adjacent surface, writing the key-value pair corresponding to the boundary type and the unit number of the missing boundary surface into the second map function, and supplementing the missing surface of the missing boundary surface based on the surface element information stored in the second map function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of grid data processing, and in particular to a method, device, equipment and medium for supplementing missing boundary surfaces of unstructured grids. Background Art

[0002] Unstructured grids have the advantages of high automation, short generation period, flexible distribution control, etc., and are often used to discretize the spatial regions of complex engineering shapes, and are widely used in computational fluid dynamics (CFD) of complex shapes. Currently, the vast majority of CFD numerical simulations use unstructured linear elements. At present, the grid information storage file formats generated by commercial software are diverse. Taking CGN as an example, the CGNS (CFD General Notation System, CGNS) format is a commonly used format output by unstructured grid software. The grid format of the CGNS format contains the relationship between cell bodies and points, as well as data such as the coordinate values of points and boundary surface information. However, in actual use, when some commercial software generates grid files, one or two boundary surfaces may be missing. At this time, the boundary type of the missing surface is unknown, and the missing boundary surface cannot be supplemented. Therefore, how to supplement the missing boundary surface is an urgent problem to be solved at present. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for supplementing missing boundary surfaces of unstructured grids, which can supplement the missing boundary surfaces and avoid the time loss of redrawing the grids. The specific solutions are as follows:

[0004] In a first aspect, the present application discloses a method for supplementing missing boundary surfaces of unstructured grids, including:

[0005] Reading the basic information in the grid file, defining a first map function and a second map function through a structure for storing surface cell information, and obtaining the target information of the boundary surface by parsing the composition information of the boundary surface in the grid file; the basic information includes the cell body type and composition information, point numbers and coordinates, and the type and composition information of the boundary surface; the target information includes the surface cell number, the number of points forming the surface, the boundary surface type number, and the numbers of points on the surface;

[0006] Inputting the target key value determined based on the target information into the first map function, parsing the composition information of the cell bodies in the grid file, and judging whether each surface of the cell body exists in the first map function based on the numbers of points on each surface of the cell body obtained after directional arrangement;

[0007] If it exists, update the information of each face unit, write the key-value pair determined based on the updated information of the subsequent face unit into the second map function, and determine the number of missing boundary faces and the adjacent faces of the missing boundary faces based on the first map function and the second map function;

[0008] Judge the boundary type of the missing boundary face according to the boundary type of the adjacent face, write the key-value pair corresponding to the boundary type of the missing boundary face and the unit number into the second map function, and supplement the missing face for the missing boundary face based on all the face unit information stored in the second map function.

[0009] Optionally, defining the first map function and the second map function through the constructed structure for storing face unit information includes:

[0010] Construct a first structure for storing the numbers of points on the face; wherein, the numbers of points on the face stored in the first structure are the numbers after sorting the numbers of each point in the preset size order;

[0011] Construct a second structure for storing the face unit number, the left-side unit number of the face, the right-side unit number of the face, the numbers of points on the face, and the number of points forming the face;

[0012] Define the first map function and the second map function by taking the first structure and the second structure as the key and the value respectively.

[0013] Optionally, inputting the target key-value determined based on the target information into the first map function includes:

[0014] Arrange the numbers of points on the face in descending order to obtain an array of number information, and determine the array of number information as the target key;

[0015] Determine the face unit number, the number of points forming the face, and the boundary face type number as the target value;

[0016] Input the target key-value determined based on the target key and the target value into the first map function.

[0017] Optionally, after judging whether each face of the body unit exists in the first map function based on the numbers of points on each face of the body unit obtained by the oriented arrangement, it further includes:

[0018] If the face of the body unit does not exist in the map function, construct a first key-value pair based on the target information of the non-existent face, and write the first key-value pair into the first map function.

[0019] Optionally, the updating the information of each face unit includes:

[0020] Updating the order of the points on each of the face units and the information of the left and right face units.

[0021] Optionally, the determining the number of missing boundary faces and the adjacent faces of the missing boundary faces based on the first map function and the second map function includes:

[0022] Determining the number of missing boundary faces according to the length of the first map function;

[0023] Judging whether the faces stored in the second map function are collinear with the missing boundary faces, and determining the adjacent faces of the missing boundary faces according to the corresponding judgment results.

[0024] Optionally, the judging the boundary type of the missing boundary face according to the boundary types of the adjacent faces includes:

[0025] Determining whether the adjacent faces of the missing boundary face are missing;

[0026] If not missing, judging whether the boundary types of the adjacent faces are the same, and determining the first sindex value according to the corresponding judgment results;

[0027] If the first sindex value is a preset first type value, determining the boundary type with the most in the adjacent faces as the boundary type of the missing boundary face;

[0028] If the first sindex value is a preset second type value, multiplying the normal vectors of the adjacent faces by the normal vector of the missing boundary face, and determining the boundary type of the adjacent face corresponding to the multiplication result with the maximum value in the corresponding multiplication results as the boundary type of the missing boundary face;

[0029] If one of the adjacent faces of the missing boundary face is missing, judging whether the boundary types of the adjacent faces are the same, and determining the second sindex value according to the corresponding judgment results;

[0030] If the second sindex value is a preset third type value, determining the boundary type with the most in the adjacent faces as the boundary type of the missing boundary face;

[0031] If the second sindex value is a preset fourth type value, multiplying the normal vectors of the adjacent faces by the normal vector of the missing boundary face, and determining the boundary type of the adjacent face corresponding to the multiplication result with the maximum value in the corresponding multiplication results as the boundary type of the missing boundary face.

[0032] Optionally, the supplementing the missing face for the missing boundary face based on all the face unit information stored in the second map function includes:

[0033] Construct a surface information array by using all the surface element information stored in the second map function; the surface information array includes an array of the relationships between non-structural elements and surface elements, an array of the relationships between surface elements and the vertices of surface elements, and an array of the number of points on the surface elements.

[0034] Based on the surface information array, perform missing surface supplementation on the missing boundary surface.

[0035] In a second aspect, the present application discloses a non-structured grid missing boundary surface supplementation device, including:

[0036] A target information acquisition module, configured to read the basic information in the grid file, define a first map function and a second map function through a constructed structure for storing surface element information, and obtain the target information of the boundary surface by parsing the composition information of the boundary surface in the grid file; the basic information includes the type and composition information of volume elements, point numbers and coordinates, and the type and composition information of the boundary surface; the target information includes surface element numbers, the number of points forming the surface, boundary surface type numbers, and the numbers of points on the surface.

[0037] A judgment module, configured to input the target key value determined based on the target information into the first map function, parse the composition information of the volume elements in the grid file, and judge whether each surface of the volume element exists in the first map function based on the numbers of points on each surface of the volume element obtained after the oriented arrangement.

[0038] An adjacent surface determination module, configured to, if it exists, update the information of each surface element, write the key-value pair determined based on the information of the updated surface element into the second map function, and determine the number of missing boundary surfaces and the adjacent surfaces of the missing boundary surfaces based on the first map function and the second map function.

[0039] A missing surface supplementation module, configured to judge the boundary type of the missing boundary surface according to the boundary type of the adjacent surface, write the key-value pair corresponding to the boundary type and unit number of the missing boundary surface into the second map function, and perform missing surface supplementation on the missing boundary surface based on all the surface element information stored in the second map function.

[0040] In a third aspect, the present application discloses an electronic device, including:

[0041] A memory, configured to store a computer program;

[0042] A processor, configured to execute the computer program to implement the non-structured grid missing boundary surface supplementation method as described above.

[0043] Fourthly, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the foregoing method for supplementing missing boundary surfaces of an unstructured grid.

[0044] When supplementing the missing boundary surfaces of the unstructured grid, the present application first reads the basic information in the grid file, defines the first map function and the second map function through a structure for storing surface unit information, and obtains the target information of the boundary surface by parsing the composition information of the boundary surface in the grid file; the basic information includes the type and composition information of the volume unit, the point numbers and coordinates, and the type and composition information of the boundary surface; the target information includes the surface unit number, the number of points forming the surface, the boundary surface type number, and the numbers of points on the surface; inputs the target key value determined based on the target information into the first map function, parses the composition information of the volume units in the grid file, and determines whether each surface of the volume unit exists in the first map function based on the numbers of points on each surface of the volume unit obtained after directional arrangement; if it exists, updates the information of each surface unit, writes the key-value pair determined based on the information of the updated surface unit into the second map function, determines the number of missing boundary surfaces and the adjacent surfaces of the missing boundary surfaces based on the first map function and the second map function; determines the boundary type of the missing boundary surface according to the boundary type of the adjacent surface, writes the key-value pair corresponding to the boundary type and unit number of the missing boundary surface into the second map function, and supplements the missing surface for the missing boundary surface based on all the surface unit information stored in the second map function. It can be seen that the present application processes the grid information file through the map function. Determines the position of the missing surface by parsing the grid file information, then determines the boundary type of the missing surface through the adjacent boundary surface information of its surface unit, and then writes the complete information of the obtained missing surface into the parsed grid data array to complete the supplement of the missing boundary surface. Furthermore, the time loss of redrawing the grid is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for describing the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

[0046] Figure 1 It is a flowchart of a method for supplementing missing boundary surfaces of an unstructured grid disclosed in the present application;

[0047] Figure 2 It is a grid schematic diagram disclosed in the present application;

[0048] Figure 3 A schematic diagram of a missing surface disclosed in the present application;

[0049] Figure 4 A schematic diagram of adjacent surfaces disclosed in the present application;

[0050] Figure 5 Another schematic diagram of adjacent surfaces disclosed in the present application;

[0051] Figure 6 A schematic diagram of the structure of a supplementary device for missing boundary surfaces of unstructured grids disclosed in the present application;

[0052] Figure 7 A schematic diagram of the structure of an electronic device disclosed in the present application. Specific embodiments

[0053] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0054] Currently, the grid information storage file formats generated by commercial software are diverse. Taking CGN as an example, the CGNS (CFD General Notation System, CGNS) format is a commonly used format output by unstructured grid software. The grid format of the CGNS format contains the relationship between cell bodies and points, as well as data such as the coordinate values of points and boundary surface information. However, in actual use, when some commercial software generates grid files, one or two boundary surfaces may be missing. At this time, the boundary type of the missing surface is unknown, and the missing boundary surface cannot be supplemented. To solve the above technical problems, the present application discloses a method, device, equipment, and medium for supplementing missing boundary surfaces of unstructured grids, which can supplement the missing boundary surfaces and avoid the time loss of redrawing the grid.

[0055] See Figure 1 As shown, the embodiments of the present invention disclose a method for supplementing missing boundary surfaces of unstructured grids, including:

[0056] Step S11: Read the basic information in the grid file, define the first map function and the second map function through the constructed structure for storing surface unit information, and obtain the target information of the boundary surface by parsing the composition information of the boundary surface in the grid file; the basic information includes the cell body type and composition information, point numbers and coordinates, and the type and composition information of the boundary surface; the target information includes the surface unit number, the number of points forming the surface, the boundary surface type number, and the numbers of points on the surface.

[0057] In this embodiment, the present application first reads the basic information in the mesh file, including data such as the volume element type and composition information, point numbers and coordinates, and the type and composition information of the boundary surface. Taking a problem mesh information file as an example, as Figure 2 shown, the mesh is a hexahedral element.

[0058] Then, a first structure for storing the numbers of points on the surface is constructed; among them, the numbers of points on the surface stored in the first structure are the numbers obtained by sorting the numbers of each point in ascending order based on a preset size; a second structure for storing the surface element number, the number of the left-side element of the surface, the number of the right-side element of the surface, the number of points on the surface, and the number of composition points of the surface is constructed; by taking the first structure and the second structure as the key and value respectively, the first map function and the second map function are defined. Specifically, a structure for storing surface element information is constructed. The first structure, FaceOrder, is used to store the numbers of four points on the surface, and the values in the input array facenode[4] are compared in sequence to ensure their uniqueness; the second structure, FaceInfor, includes information such as the surface number face_id, the label of the left-side element of the surface f2cl, the number of the right-side element of the surface f2cr (when the surface is a boundary surface, this value is negative), the numbers of points on the surface f2n_tmp[4], and the number of points on the surface nNPF. Using these two structures as the key and value, the map function is defined.

[0059] In this embodiment, the boundary surface information in the grid file is processed, that is, the composition information of the boundary surfaces in the grid file is parsed, and its composition key-value pairs are written into the map function FacesInfor1. The boundary surface types include triangles and quadrilaterals. An array f2ntmp[4] is established to temporarily store the number information of the points on the surface, and the number face_id of the boundary surface unit is arranged starting from zero. Loop through all the units in the grid file. According to the CGNS library function, it can be determined whether the current unit is a volume unit or a surface unit. Skip the volume units. When it is determined that the current unit is a quadrilateral boundary surface unit, store the point number information into f2ntmp[4] according to the read information. When it is determined that the current unit is a triangular boundary surface unit, store the point number information into f2ntmp[4] according to the read information, and set f2ntmp[3] = -1. In other words, according to the CGNS library function, the following can be obtained: ① the surface unit number findex; ② the number of points forming each surface nodeofface; ③ the boundary surface type number bct; ④ the point number information f2ntmp[4] on the surface. When it is determined that the current unit is a triangular boundary surface unit, since there are only three point numbers in f2ntmp, set f2ntmp[3]=-1. For the keys in FacesInfor1, a new f2ntmp_[4] array is created, and the arrangement order of f2ntmp[4] is changed to be arranged from largest to smallest in turn using the ReorderPnts function and assigned to f2ntmp_[4]. Set f2ntmp_[4] as a structure as the key (unique) of FacesInfor1.

[0060] For the values in FacesInfor1, assign nodeofface to face Infor.nNPF, assign the negative value of bct as the number of the unit on the left side of the surface unit to face_infor.f2cl, and use the ReorderPnts function to change the arrangement order of f2ntmp[4] so that the value of the smallest point number is in the first place, and then assign its value to face_Infor.f2n_tmp.

[0061] Taking the storage information of one unit as an example:

[0062] IntType f2ntmp_[4];

[0063] Reorderpnts_(f2ntmp_,f2ntmp,4);

[0064] if (f2ntmp_[3]==-1) nodeofface=3;

[0065] else nodeofface =4;

[0066] face_Infor.face_id = findex;

[0067] face_Infor.f2cl = -bct[findex];

[0068] face_Infor.nNPF = nodeofface;

[0069] ReorderPnts(f2ntmp, nodeofface);

[0070] for (IntType ii = 0; ii < nodeofface; ii++)

[0071] {

[0072] face_Infor.f2n_tmp[ii] = f2ntmp[ii];

[0073] }

[0074] FaceOrder faceorder(f2ntmp_);

[0075] FacesInfor1.insert(std::make_pair(faceorder, face_Infor));

[0076] findex++;

[0077] Step S12: Input the target key value determined based on the target information into the first map function, parse the composition information of the volume elements in the mesh file, and determine whether each face of the volume element exists in the first map function based on the numbers of the points on each face of the volume element obtained after the oriented arrangement.

[0078] In this embodiment, the numbers of the points on the face are arranged in descending order to obtain an array of number information, and the array of number information is determined as the target key; the face element number, the number of points forming the face, and the boundary face type number are determined as the target values; the target key value determined based on the target key and the target values is input into the first map function. Specifically, the numbers of the points on the face are arranged in descending order to obtain an array of number information, and the array of number information is determined as the target key; the face element number, the number of points forming the face, and the boundary face type number are determined as the target values. The target key value determined according to the target values and the target key is added to the structure FacesInfor1 through the inser function. Repeat the above process until all the boundary faces are processed and then input into the map function.

[0079] Then, process the surface element information in the grid file. After the processing of the above steps, the boundary surface elements have been processed, and their numbers face_id are all arranged in the front. Now, process the volume element grid. Non-structural elements are generally divided into hexahedrons, triangular prisms, pyramids, and tetrahedrons. According to the vertex information, the volume elements are divided into six faces, five faces, five faces, and four faces in sequence. Taking the hexahedron as an example, a two-dimensional array C2N[cell][8] can be constructed through the CGNS library function. The first dimension is the hexahedron element number, and the second dimension represents its 8 vertices. The arrangement order of the points is as shown in the hexahedron in Figure 2 Then, the point number information of the six faces can be constructed, and the array f2ntmp is used to record the point number information of each face in sequence:

[0080] f2ntmp[0] = C2N[cindex][0];

[0081] f2ntmp[1] = C2N[cindex][4];

[0082] f2ntmp[2] = C2N[cindex][7];

[0083] f2ntmp[3] = C2N[cindex][3];

[0084] Next, reorder f2ntmp[4], arrange the point numbers from largest to smallest to get f2ntmp_[4], form a key with unique value through the structure FaceOrder, and then use the search function of the map function to search in FacesInfor1 whether there is a key the same as f2ntmp_[4]. That is, it is necessary to judge whether there are the faces of the volume element in the first map function based on the point numbers on each face of the volume element obtained after the oriented arrangement.

[0085] Step S13: If it exists, update the information of each face element, write the key-value pair determined based on the updated information of the subsequent elements into the second map function, and determine the number of missing boundary surface elements and the adjacent faces of the missing boundary surface elements based on the first map function and the second map function.

[0086] In this embodiment, if there is no face of the volume element in the map function, a first key-value pair is constructed based on the target information of the non-existent face, and the first key-value pair is written into the first map function. If it exists, the information of each face element is updated to obtain each updated face element, that is, the order of the points on each face element and the information of the left and right face elements are updated. Specifically, if a key the same as f2ntmp_[4] cannot be found in FacesInfor1, it means that the information of this face does not exist in FacesInfor1. At this time, the key-value pair is constructed and written into FacesInfor1 in the same way as in the step of obtaining the target information of the boundary face and determining the target key-value based on the target information, where face_id starts from nBFace (the number of boundary faces), and f2cl starts from zero, which is the volume element number. If a key the same as f2ntmp_[4] is found in FacesInfor1, it means that the information of this face already exists in FacesInfor1, and it also means that the left and right elements of this face are found. At this time, the order of the points on the face needs to be updated, and the information of the left and right elements of the updated face is exchanged.

[0087] ReorderPnts(f2ntmp, nodeofface);

[0088] facetype = iter->second.f2cl;

[0089] face_Infor.f2cl = cindex;

[0090] face_Infor.f2cr = facetype;

[0091] face_Infor.nNPF = nodeofface;

[0092] face_Infor.face_id = iter->second.face_id;

[0093] for (IntType ii = 0; ii < nodeofface; ii++)

[0094] {

[0095] face_Infor.f2n_tmp[ii] = f2ntmp[ii];

[0096] };

[0097] Moreover, after the information is updated, the key-value pair is deleted from FacesInfor1, and the updated key-value pair is added to the second map function FacesInfor2;

[0098] FacesInfor1.erase(iter);

[0099] FacesInfor2.insert(std::make_pair(faceorder, face_Infor));

[0100] In this embodiment, the loop is completed for the faces of all volume elements. Then, the number of missing boundary faces and the adjacent faces of the missing boundary faces can be determined based on the first map function and the second map function. In this process, the number of missing boundary faces is determined according to the length of the first map function; it is judged whether the faces stored in the second map function are collinear with the missing boundary faces, and the adjacent faces of the missing boundary faces are determined according to the corresponding judgment results. Specifically, according to the above operations, if there are no missing boundary faces in the mesh file and all face elements can find their left and right elements, the length of FacesInfor1 should become zero, and the length of FacesInfor2 should be the total number of faces nTFace; but when there are missing boundary faces, the non-missing faces are written into FacesInfor2 during the loop of the boundary faces. During the loop of the volume elements, the unit faces originally at the boundary cannot confirm the right unit information and cannot be deleted. FacesInfor1 also records the other unit information of these boundary faces. At this time, the size of FacesInfor1 is the number of missing boundary faces nPFace, and the size of FacesInfor2 is nTFace - nPFace. As Figure 3 shown, in this example, FacesInfor1.size() = 2. The positions are found in the original mesh through point elements, and the face numbers are 1344 and 1346. Then, according to the size of FacesInfor1, the number of missing boundary faces is known, and according to the number of face points of each face in FacesInfor1.nNPF, the number of missing quadrilateral and triangular boundary faces can be known. Then there are:

[0101] nT_quad += nP_quad;

[0102] nT_tri += nP_ptri;

[0103] nTFace = (4 * nT_tet + 5 * nT_pyr + 5 * nT_pris + 6 * nT_hex + nT_tri + nT_quad) / 2;

[0104] nBFace = nT_quad + nT_tri;

[0105] In this example, the actual number of boundary faces should be 2072. However, due to incorrect information storage in CGNS, only 2070 boundary faces are written. At this time, correct the number of faces stored in CGNS. Then find the adjacent faces of the missing faces, and obtain the array arf2n[nNPF_fix][4] composed of the points of the adjacent faces, the array arfacetype[nNPF_fix] of the boundary types of the adjacent faces, and the number iaround of the adjacent faces. The information of the missing boundary faces is stored in FacesInfor1, and the information of all faces except the missing boundary faces is stored in FacesInfor2. Loop through them respectively, and judge whether they are adjacent faces of the missing boundary faces by judging whether they are collinear with the missing boundary faces. In this example, for the missing faces 1344 and 1346, the number of their adjacent known faces is 3. The symmetry face number is taken as -1, and the far-field number is taken as -2. arfacetype[0-2] of face 1344 are all -1, and arfacetype[0-2] of face 1346 are -1, -2, -2 respectively.

[0106] Step S14: Judge the boundary type of the missing boundary face according to the boundary type of the adjacent face, write the key-value pair corresponding to the boundary type and the cell number of the missing boundary face into the second map function, and supplement the missing face for the missing boundary face based on all the face cell information stored in the second map function.

[0107] In this embodiment, after determining the adjacent faces of the missing boundary face, the present application determines the boundary type of the missing boundary face according to the boundary types of the adjacent faces. In this process, it is first determined whether the adjacent faces of the missing boundary face are missing; if not, it is determined whether the boundary types of the adjacent faces are the same, and the first sindex value is determined according to the corresponding determination result; if the first sindex value is a preset first type value, the boundary type with the largest number in the adjacent faces is determined as the boundary type of the missing boundary face; if the first sindex value is a preset second type value, the normal vectors of the adjacent faces are multiplied by the normal vector of the missing boundary face, and the boundary type of the adjacent face corresponding to the multiplication result with the largest value in the corresponding multiplication results is determined as the boundary type of the missing boundary face; if one of the adjacent faces of the missing boundary face is missing, it is determined whether the boundary types of the adjacent faces are the same, and the second sindex value is determined according to the corresponding determination result; if the second sindex value is a preset third type value, the boundary type with the largest number in the adjacent faces is determined as the boundary type of the missing boundary face; if the second sindex value is a preset fourth type value, the normal vectors of the adjacent faces are multiplied by the normal vector of the missing boundary face, and the boundary type of the adjacent face corresponding to the multiplication result with the largest value in the corresponding multiplication results is determined as the boundary type of the missing boundary face. Generally speaking, when iaround = nNPF_fix[ipface], it means that all adjacent faces of the missing face are present. For a quadrilateral, iaround = 4, and for a triangle, iaround = 3. The method of using repeated point marking is used to judge different situations of the adjacent face boundary types, and the sindex parameter is used to distinguish different situations. The specific method is as follows: perform a double loop on the adjacent faces to determine whether the boundary types of the adjacent faces are the same. If they are the same, add 1. For example, if the missing boundary face is a quadrilateral, it has a total of 4 adjacent boundary faces, and the boundary type numbers of these four boundary faces are 1, 1, 2, and 3 in sequence, indicating that two of the face boundary types are the same, and the other two faces are of the other two types. At this time, sindex = 2 + 2 + 1 + 1 = 6.

[0108] if (iaround == nNPF_fix[ipface]) / / Indicates that all four adjacent faces are present

[0109] {

[0110] for (IntType ii = 0; ii < iaround; ii++)

[0111] {

[0112] for (IntType jj = 0; jj < iaround; jj++)

[0113] {

[0114] if (arfacetype[ii] == arfacetype[jj])

[0115] {

[0116] ntimes[ii] ++;

[0117] }

[0118] }

[0119] if (ntimes[ii] == 4) sindex += 4, pindex1 = arfacetype[ii];

[0120] if (ntimes[ii] == 3) sindex += 3, pindex1 = arfacetype[ii];

[0121] if (ntimes[ii] == 2);

[0122] {

[0123] sindex += 2;

[0124] if (nNPF_fix[ipface] == 3) {

[0125] pindex1 = arfacetype[ii];

[0126] }

[0127] }

[0128] if (ntimes[ii] == 1) sindex += 1;

[0129] }。

[0130] Specifically, sindex has 8 values representing different cases as shown in Table 1.

[0131] Table 1

[0132]

[0133] For the cases where sindex is equal to 16, 10, 9, 6, 5, it can be determined that the boundary type of the missing face is the boundary type with the most adjacent faces; for the cases where sindex is equal to 8, 4, 3, it is judged by the normal vectors of the adjacent faces. The normal vectors of the missing face and each adjacent face are calculated respectively, and the normal vectors of the adjacent edges are multiplied by the normal vector of the missing face in turn, and the boundary type of the face with the largest value is used as the boundary type of the missing face.

[0134] When iaround = nNPF_fix[ipface] - 1, it means that one of the adjacent faces of the missing face is also missing. For a quadrilateral, iaround = 3, and for a triangle, iaround = 2. The same as the previous method. Specifically, sindex has 8 values representing different cases as shown in Table 2.

[0135] Table 2

[0136]

[0137] For the cases where sindex is equal to 9 or 4, the boundary type of the missing face can be determined as the most common boundary type among the adjacent faces. For the cases where sindex is equal to 5, 3, or 2, it is judged by the normal vectors of the adjacent faces. Calculate the normal vectors of the missing face and each adjacent face respectively, and multiply the normal vectors of the adjacent edges with the normal vector of the missing face in turn. Take the boundary type of the face with the largest value as the boundary type of the missing face.

[0138] In a specific embodiment, Figure 3 belonging to the cases in Table 2, one adjacent face of each of the two missing faces is missing. For the 1344 face, as Figure 4 shown, since the boundary types of the adjacent faces are all -1, then sindex = 9, and at this time, the boundary type of the 1344 face can be obtained as -1. For the 1346 face, as Figure 5 shown, the boundary types of the adjacent faces ① and ③ are -2, and the boundary type of the adjacent face ② is -1, then sindex = 5. At this time, it can only be judged by the magnitude of the normal vector product, and it can be obtained that then the boundary type of the 1346 face can be obtained as -2.

[0139] Repeat the above steps to complete the processing of all missing boundary faces, and then write the updated information of the missing boundary faces (the boundary type of the missing boundary face, element number) into FacesInfor2. Finally, use all the face element information stored in FacesInfor2 to construct an array of face information, including the relationship between non-structural elements and element faces f2c[2*nTFace], the relationship between element faces and element face vertices f2n[nnodes], the number of points on the face element nNPF[nTFace], etc. arrays, complete the parsing of the mesh file, and at the same time supplement the missing faces for the missing boundary faces based on the array of face information. In this way, data input can be provided for subsequent mesh partitioning and flow field calculation.

[0140] In summary, when supplementing the missing boundary surfaces of the unstructured grid in this application, the basic information in the grid file is first read. The first map function and the second map function are defined through the structure for storing surface element information. The target information of the boundary surface is obtained by parsing the composition information of the boundary surface in the grid file. The basic information includes the volume element type and composition information, point numbers and coordinates, and the type and composition information of the boundary surface. The target information includes the surface element number, the number of points forming the surface, the boundary surface type number, and the numbers of points on the surface. The target key-value determined based on the target information is input into the first map function to parse the composition information of the volume elements in the grid file. Based on the numbers of points on each surface of the volume elements obtained after the oriented arrangement, it is determined whether each surface of the volume element exists in the first map function. If it exists, the information of each surface element is updated, and the key-value pair determined based on the information of the updated surface element is written into the second map function. The number of missing boundary surfaces and the adjacent surfaces of the missing boundary surfaces are determined based on the first map function and the second map function. The boundary type of the missing boundary surface is judged according to the boundary type of the adjacent surface, and the key-value pair corresponding to the boundary type and the element number of the missing boundary surface is written into the second map function. The missing boundary surfaces are supplemented with missing surfaces based on all the surface element information stored in the second map function. It can be seen that this application processes the grid information file through the map function. The position of the missing surface is determined by parsing the grid file information, and then the boundary type of the missing surface is determined by the adjacent boundary surface information of its surface element. Finally, the complete information of the obtained missing surface is written into the parsed grid data array to complete the supplementation of the missing boundary surfaces. This avoids the time loss of redrawing the grid.

[0141] Based on the previous embodiment, this application discloses a method for supplementing missing boundary surfaces of an unstructured grid, which can complete the supplementation of missing boundary surfaces. Next, the specific supplementation process will be described in detail.

[0142] In a specific embodiment, the configuration of the CFD simulation is a flat plate, aiming to test the high-precision calculation function of the turbulent boundary layer of the flat plate. The calculated Mach number is Ma = 0.2, the calculated temperature T = 288.15 K, the Reynolds number per meter of the oncoming flow is 100000, and the calculated angles of attack and sideslip of the oncoming flow are both 0°. The calculation grid is as Figure 2 shown, and this grid is composed of unstructured hexahedral grid elements.

[0143] When supplementing the missing faces of the hexahedral mesh element, first read the basic information in the mesh file. Through the CGNS library functions, data such as the volume element type and composition information, point numbers and coordinates, and the type and composition information of the boundary faces can be obtained from the CGNS-format mesh file. Then construct a structure for storing face element information. The first structure, FaceOrder, is used to store the four point numbers on the face, and the second structure, FaceInfor, stores the face element data. Define two map functions, FacesInfor1 and FacesInfor2, with FaceOrder and FaceInfor as key-value pairs. Next, first parse the boundary faces in the mesh to obtain the reordering numbers of the boundary faces, the right-side element numbers, the composition point numbers, the number of face points, etc., and form the point-oriented arrangement of the face and these values as key-value pairs and input them into FacesInfor1. Then parse the faces of the volume elements in the mesh. Loop through all the faces that make up the volume element. By comparing the point-oriented arrangement of the faces that make up the face as the key value, determine whether the face already exists in FacesInfor1. When it already exists, update the face information, update the left-side element number, and write the updated key-value pair into FacesInfor2 and delete it in FacesInfor1; if it does not exist, generate a key-value pair and input it into FacesInfor1. If there are missing boundary faces in the CGNS mesh file, the remaining length of FacesInfor1 is not zero, and its length is the number of missing faces, and start the operation of supplementing the missing face element information. Then use the sindex number to judge different situations, and adopt different methods to obtain the boundary types of the missing boundary faces for different situations. The specific acquisition process and steps are the same as those in method S14 and will not be elaborated here. After obtaining all the information of the missing faces and reordering them, write their key-value pairs into FacesInfor2, and use the information of all the face elements stored in FacesInfor2 to construct a face information array, and partition the mesh data parsed in this way. The flow field solver calculates data such as mesh reconstruction, cell centroids, and volumes through the partitioned mesh data, and conducts CFD simulations to obtain the flow field characteristics of the flat plate boundary layer.

[0144] In this way, the present application realizes the supplement of the missing boundary faces, thereby avoiding the time loss of redrawing the mesh.

[0145] See Figure 6 As shown in

[0146] The target information acquisition module 11 is used to read the basic information in the grid file, define the first map function and the second map function through the structure for storing surface unit information, and obtain the target information of the boundary surface by parsing the composition information of the boundary surface in the grid file; the basic information includes the volume unit type and composition information, point numbers and coordinates, and the boundary surface type and composition information; the target information includes the surface unit number, the number of points forming the surface, the boundary surface type number, and the numbers of points on the surface.

[0147] The judgment module 12 is used to input the target key value determined based on the target information into the first map function, parse the composition information of the volume units in the grid file, and judge whether each surface of the volume unit exists in the first map function based on the numbers of points on each surface of the volume unit obtained after orientation arrangement.

[0148] The adjacent surface determination module 13 is used to, if it exists, update the information of each surface unit, write the key-value pair determined based on the information of the updated surface unit into the second map function, and determine the number of missing boundary surfaces and the adjacent surfaces of the missing boundary surfaces based on the first map function and the second map function.

[0149] The missing surface supplement module 14 is used to judge the boundary type of the missing boundary surface according to the boundary type of the adjacent surface, write the key-value pair corresponding to the boundary type and unit number of the missing boundary surface into the second map function, and supplement the missing surface for the missing boundary surface based on all the surface unit information stored in the second map function.

[0150] When supplementing the missing boundary surfaces of the unstructured grid in this application, first, the basic information in the grid file is read. The first map function and the second map function are defined by constructing a structure for storing the information of surface elements. The target information of the boundary surface is obtained by parsing the composition information of the boundary surface in the grid file. The basic information includes the type and composition information of volume elements, point numbers and coordinates, and the type and composition information of the boundary surface. The target information includes the surface element number, the number of points forming the surface, the boundary surface type number, and the numbers of points on the surface. The target key-value determined based on the target information is input into the first map function to parse the composition information of the volume elements in the grid file. Based on the numbers of points on each surface of the volume elements obtained after the orientation arrangement, it is judged whether each surface of the volume element exists in the first map function. If it exists, the information of each surface element is updated, and the key-value pair determined based on the information of the updated surface element is written into the second map function. The number of missing boundary surfaces and the adjacent surfaces of the missing boundary surfaces are determined based on the first map function and the second map function. The boundary type of the missing boundary surface is judged according to the boundary type of the adjacent surface, and the key-value pair corresponding to the boundary type and the unit number of the missing boundary surface is written into the second map function. The missing boundary surfaces are supplemented with missing surfaces based on all the surface element information stored in the second map function. It can be seen that this application processes the grid information file through the map function. The position of the missing surface is determined by parsing the grid file information, and then the boundary type of the missing surface is determined by the information of the adjacent boundary surfaces of its surface elements. Then, the complete information of the obtained missing surface is written into the parsed grid data array to complete the supplement of the missing boundary surfaces. Furthermore, the time loss of redrawing the grid is avoided.

[0151] In some specific embodiments, the target information acquisition module 11 can specifically be used to construct a first structure for storing the numbers of points on the surface. The numbers of points on the surface stored in the first structure are the numbers obtained by sorting the numbers of each point in the order of the preset size. A second structure for storing the surface element number, the left-side unit number of the surface, the right-side unit number of the surface, the numbers of points on the surface, and the number of points forming the surface is constructed. The first map function and the second map function are defined by taking the first structure and the second structure as the key and the value respectively.

[0152] In some specific embodiments, the judgment module 12 can specifically be used to arrange the numbers of points on the surface in descending order to obtain an array of number information, and determine the array of number information as the target key. The surface element number, the number of points forming the surface, and the boundary surface type number are determined as the target values. The target key-value determined based on the target key and the target values is input into the first map function.

[0153] In some specific embodiments, the device may further be configured to, if the face of the body unit does not exist in the map function, construct a first key-value pair based on the target information of the non-existent face, and write the first key-value pair into the first map function.

[0154] In some specific embodiments, the adjacent face determination module 13 may specifically be configured to update the order of the points on the face of each face unit and the information of the left and right face units.

[0155] In some specific embodiments, the adjacent face determination module 13 may specifically be configured to determine the number of missing boundary faces according to the length of the first map function; determine whether the faces stored in the second map function are collinear with the missing boundary faces, and determine the adjacent faces of the missing boundary faces according to the corresponding determination result.

[0156] In some specific embodiments, the missing face supplement module 14 may specifically be configured to determine whether the adjacent faces of the missing boundary face are missing; if not, determine whether the boundary types of the adjacent faces are the same, and determine a first sindex value according to the corresponding determination result; if the first sindex value is a preset first type value, determine the boundary type with the most adjacent faces as the boundary type of the missing boundary face; if the first sindex value is a preset second type value, multiply the normal vectors of the adjacent faces by the normal vector of the missing boundary face, and determine the boundary type of the adjacent face corresponding to the multiplication result with the maximum value in the corresponding multiplication results as the boundary type of the missing boundary face; if one of the adjacent faces of the missing boundary face is missing, determine whether the boundary types of the adjacent faces are the same, and determine a second sindex value according to the corresponding determination result; if the second sindex value is a preset third type value, determine the boundary type with the most adjacent faces as the boundary type of the missing boundary face; if the second sindex value is a preset fourth type value, multiply the normal vectors of the adjacent faces by the normal vector of the missing boundary face, and determine the boundary type of the adjacent face corresponding to the multiplication result with the maximum value in the corresponding multiplication results as the boundary type of the missing boundary face.

[0157] In some specific embodiments, the missing face supplement module 14 may specifically be configured to construct a face information array by using all the face unit information stored in the second map function; the face information array includes an array of the relationships between non-structural units and face units, an array of the relationships between face units and the vertices of face units, and an array of the number of points on the face units; and supplement the missing faces of the missing boundary faces based on the face information array.

[0158] Furthermore, an embodiment of the present application also discloses an electronic device. Figure 7It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be considered as any limitation on the scope of use of this application.

[0159] Figure 7 This is a schematic structural diagram of an electronic device 20 provided by an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the non-structured grid missing boundary surface supplement method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0160] In this embodiment, the power supply 23 is used to provide operating voltages for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of this application, and specific limitations are not imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application requirements, and no specific limitations are imposed here.

[0161] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a magnetic disk, or an optical disc, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be short-term storage or permanent storage.

[0162] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, and it may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the non-structured grid missing boundary surface supplement method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.

[0163] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the non-structured grid missing boundary surface supplement method disclosed above. For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.

[0164] In the present specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.

[0165] Those skilled in the art can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0166] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0167] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0168] The technical solutions provided in this application have been introduced in detail above. Specific examples are used in this article to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.

Claims

1. A method for supplementing missing boundary surfaces of unstructured grids, characterized in that: include: Read the basic information in the grid file, define the first map function and the second map function by constructing a structure storing the surface unit information, and obtain the target information of the boundary surface by parsing the composition information of the boundary surface in the grid file; the basic information includes the type and composition information of the volume unit, the point number and coordinates, and the type and composition information of the boundary surface; the target information includes the surface unit number, the number of the composition points of the surface, the boundary surface type number, and the number of the points on the surface; Inputting the target key value determined based on the target information into the first map function, parsing the composition information of the volume unit in the grid file, and judging whether each surface of the volume unit exists in the first map function based on the numbers of the points on each surface of the volume unit after the directional arrangement; If it exists, update the information of each face unit, write the key-value pair determined based on the corresponding updated information of the subsequent unit into the second map function, and determine the number of missing boundary faces and the adjacent faces of the missing boundary faces based on the first map function and the second map function; Determining the boundary type of the missing boundary surface according to the boundary type of the adjacent surface, writing the boundary type of the missing boundary surface and the key-value pair corresponding to the unit number into the second map function, and supplementing the missing boundary surface based on all the surface unit information stored in the second map function; The structure of the storage surface unit information constructed to define the first map function and the second map function includes: Constructing a first structure for storing numbers of points on a surface; wherein the numbers of the points on the surface stored in the first structure are numbers obtained by sorting the numbers of the points based on a preset size order; Constructing a second structure for storing the surface unit number, the surface left unit number, the surface right unit number, the surface point number and the number of constituent points of the surface; A first map function and a second map function are defined by respectively determining the first structure and the second structure as a key and a value.

2. The method for supplementing missing boundary surfaces of unstructured grids according to claim 1, characterized in that: The step of inputting the target key value determined based on the target information into the first map function comprises: Arrange the numbers of the points on the surface in descending order to obtain a number information array, and determine the number information array as a target key; Determine the surface unit number, the number of constituent points of the surface, and the boundary surface type number as target values; A target key value determined based on the target key and the target value is input into the first map function.

3. The method for supplementing missing boundary surfaces of unstructured grids according to claim 1, characterized in that: After judging whether each surface of the volume unit exists in the first map function based on the obtained numbers of the points on each surface of the volume unit after the directional arrangement, the method further includes: If the face of the body unit does not exist in the map function, a first key-value pair is constructed based on the target information of the non-existent face, and the first key-value pair is written into the first map function.

4. The method for supplementing missing boundary surfaces of unstructured grids according to claim 1, characterized in that: The updating of information of each surface unit includes: The order of the surface points of each surface unit and the information of the left and right surface units are updated.

5. The method for supplementing missing boundary surfaces of unstructured grids according to claim 1, characterized in that: The determining the number of missing boundary surfaces and adjacent surfaces of the missing boundary surfaces based on the first map function and the second map function includes: Determining the number of the missing boundary surfaces according to the length of the first map function; Determine whether the face stored in the second map function is colinear with the missing boundary face, and determine the adjacent faces of the missing boundary face according to the corresponding determination result.

6. The method for supplementing missing boundary surfaces of unstructured grids according to claim 1, characterized in that: The step of determining the boundary type of the missing boundary surface according to the boundary type of the adjacent surface includes: Determining whether an adjacent surface of the missing boundary surface is missing; If not missing, determine whether the boundary types of the adjacent faces are the same, and determine the first sindex value according to the corresponding determination result; If the first sindex value is a preset first type value, the most common boundary type among the adjacent faces is determined as the boundary type of the missing boundary face; If the first sindex value is a preset second type value, then the normal vector of each adjacent face is multiplied by the normal vector of the missing boundary face, and the boundary type of the adjacent face corresponding to the multiplication result of the maximum value among the corresponding multiplication results is determined as the boundary type of the missing boundary face; If one adjacent face of the missing boundary face is missing, determining whether the boundary types of the adjacent faces are the same, and determining a second sindex value according to the corresponding determination result; If the second sindex value is a preset third type value, the most common boundary type among the adjacent faces is determined as the boundary type of the missing boundary face; If the second sindex value is the preset fourth category value, the normal vector of each adjacent face is multiplied with the normal vector of the missing boundary face, and the boundary type of the adjacent face corresponding to the multiplication result of the maximum value in the corresponding multiplication results is determined as the boundary type of the missing boundary face.

7. The method for supplementing missing boundary surfaces of unstructured grids according to any one of claims 1 to 6, characterized in that: The step of supplementing the missing boundary surface based on all the surface unit information stored in the second map function includes: Constructing a surface information array using all the surface unit information stored in the second map function; the surface information array includes a relationship array between non-structural units and surface units, a relationship array between surface units and surface unit vertices, and an array of the number of points on the surface units; The missing boundary surface is supplemented based on the surface information array.

8. A device for supplementing missing boundary surfaces of unstructured grids, characterized in that: include: A target information acquisition module is used to read basic information in a grid file, define a first map function and a second map function by constructing a structure storing surface unit information, and acquire target information of a boundary surface by parsing the composition information of the boundary surface in the grid file; the basic information includes the type and composition information of the volume unit, the number and coordinates of the point, and the type and composition information of the boundary surface; the target information includes the surface unit number, the number of the surface composition points, the boundary surface type number, and the number of the surface points; A judgment module, used for inputting the target key value determined based on the target information into the first map function, parsing the composition information of the body unit in the grid file, and judging whether each surface of the body unit exists in the first map function based on the number of the points on each surface of the body unit after the directional arrangement; an adjacent face determination module, configured to update the information of each face unit if it exists, write the key-value pair determined based on the corresponding updated information of the subsequent unit into the second map function, and determine the number of missing boundary faces and the adjacent faces of the missing boundary faces based on the first map function and the second map function; a missing surface supplementation module, configured to determine the boundary type of the missing boundary surface according to the boundary type of the adjacent surface, write the boundary type of the missing boundary surface and the key-value pair corresponding to the unit number into the second map function, and supplement the missing boundary surface based on all the surface unit information stored in the second map function; The target information acquisition module is used to construct a first structure for storing the numbers of points on a surface; wherein the numbers of the points on the surface stored in the first structure are the numbers after sorting the numbers of each point based on a preset size order; construct a second structure for storing the surface unit number, the left unit number of the surface, the right unit number of the surface, the numbers of the points on the surface, and the number of constituent points of the surface; and define a first map function and a second map function by respectively determining the first structure and the second structure as keys and values.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the method for supplementing missing boundary surfaces of an unstructured grid as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the method for supplementing missing boundary surfaces of an unstructured grid as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Grid boundary condition processing method of unstructured grid CFD computation

    CN105631068A

  • Non-structural linear triangular prism grid unit reconstruction method, system, equipment and medium

    CN116522828A