Method and device for identifying boundary types of structured grids

By analyzing the target grid file of the structural grid and applying preset boundary type recognition rules, the boundary type of the structural grid is automatically identified, which solves the problem of automatic boundary recognition in the existing technology and improves the efficiency of pre-processing of numerical simulation.

CN118568798BActive Publication Date: 2025-03-04AERO ENGINE ACAD OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410688560.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2025-03-04
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

In the prior art, no automatic identification of the boundaries of structural grids is performed, resulting in low efficiency in numerical simulation.

Method used

By obtaining the target grid file of the structural grid, the boundary topology information is obtained, multiple boundaries are determined, and the boundary types of each boundary are automatically identified based on the preset boundary type recognition rules.

Benefits of technology

Automatic identification of structural mesh boundary types is realized, the efficiency of numerical simulation pre-processing is improved, and manual interference is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568798B_ABST
    Figure CN118568798B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and device for identifying the boundary type of a structured grid. The method for identifying the boundary type of the structured grid includes: obtaining a target grid file of the structured grid, parsing the target grid file, and obtaining boundary topology information of the structured grid; determining multiple boundaries of the structured grid based on the boundary topology information; obtaining a preset boundary type identification rule, and determining the boundary type of each boundary based on the preset boundary type identification rule. The present disclosure can automatically identify the boundary type of each boundary of the structured grid by using the preset boundary type identification rule, which helps to improve the efficiency of numerical simulation pre-processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of grid computing technology, and in particular to a method and device for identifying boundary types of a structured grid. Background Art

[0002] Structured grids have the advantages of simple generation method, easy description, small storage space requirement, good grid orthogonality and body-fitting properties, and are widely used in the engineering field.

[0003] However, the related technology does not automatically identify the boundaries of the structural grid, resulting in low efficiency in numerical simulation pre-processing. Summary of the invention

[0004] In view of this, exemplary embodiments of the present disclosure provide a method and device for identifying the boundary type of a structured grid to solve the problems existing in the related art.

[0005] According to a first aspect of an exemplary embodiment of the present disclosure, a method for identifying a boundary type of a structured grid is provided, comprising:

[0006] Acquire a target grid file of the structured grid, and parse the target grid file to obtain boundary topology information of the structured grid;

[0007] Based on the boundary topology information, determining a plurality of boundaries of the structured grid;

[0008] A preset boundary type identification rule is obtained, and based on the preset boundary type identification rule, a boundary type of each boundary is determined.

[0009] According to a second aspect of the exemplary embodiments of the present disclosure, there is provided a device for identifying a boundary type of a structured grid, comprising:

[0010] An acquisition module is used to acquire a target grid file of a structured grid;

[0011] A parsing module, used for parsing the target grid file to obtain the boundary topology information of the structural grid;

[0012] A processing module, configured to determine a plurality of boundaries of the structural grid based on the boundary topology information;

[0013] The acquisition module is also used to acquire preset boundary type identification rules;

[0014] The processing module is further configured to determine a boundary type of each boundary based on the preset boundary type identification rule.

[0015] According to a third aspect of the exemplary embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor; a memory for storing at least one processor executable instruction; wherein the at least one processor is used to execute instructions to implement the steps of the above method.

[0016] According to a fourth aspect of the exemplary embodiments of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the steps of the above method.

[0017] At least one of the above-mentioned technical solutions adopted in the exemplary embodiment of the present disclosure can achieve the following beneficial effects: by acquiring the target grid file of the structural grid and parsing the target grid file, the boundary topology information of the structural grid is obtained; based on the boundary topology information, multiple boundaries of the structural grid are determined; preset boundary type identification rules are obtained, and based on the preset boundary type identification rules, the boundary type of each boundary is determined, and the boundary type of each boundary of the structural grid can be automatically identified by using the pre-set preset boundary type identification rules, which helps to improve the efficiency of numerical simulation pre-processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the exemplary embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 A schematic flow chart of a method for identifying a boundary type of a structured grid provided by an exemplary embodiment of the present disclosure is shown;

[0020] Figure 2A A schematic diagram of a structural grid provided by an exemplary embodiment of the present disclosure is shown;

[0021] Figure 2B A schematic diagram of another structural grid provided by an exemplary embodiment of the present disclosure is shown;

[0022] Figure 3 A schematic structural diagram of a device for identifying the boundary type of a structured grid provided by an exemplary embodiment of the present disclosure is shown;

[0023] Figure 4 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure is shown;

[0024] Figure 5 A schematic diagram of the structure of a computer system provided by an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0025] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0026] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0027] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] The whole process of numerical simulation analysis can mainly include: geometric modeling, meshing, numerical solution, and post-processing. Meshing, as the starting point of numerical simulation, is one of the basic core technologies in the field of Computer Aided Engineering (CAE), accounting for about 70%-80% of the entire process time, and is also the prerequisite for the credibility of simulation analysis.

[0031] Structured grids have the advantages of simple generation method, easy description, small storage space requirement, good grid orthogonality and body-fitting, etc., and are widely used in the engineering field. In the related technology, there is no automatic recognition of the boundaries of structured grids, which leads to the problem of low efficiency of numerical simulation pre-processing.

[0032] Therefore, in order to solve the above problems, an exemplary embodiment of the present invention provides a method for identifying the boundary type of a structural grid, which can automatically identify the boundary type of each boundary of the structural grid by using pre-set preset boundary type identification rules. In addition to optimization at the algorithm level, it can also minimize human intervention and allow the computer to automatically perform the meshing process, which helps to improve the efficiency of numerical simulation pre-processing.

[0033] The exemplary embodiments of the present disclosure provide a method for identifying a boundary type of a structured grid, which may be executed by a terminal or by a chip applied to the terminal.

[0034] Exemplarily, the above-mentioned terminal may include one or more of a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and a wearable device based on augmented reality (AR) and / or virtual reality (VR) technology, etc., and the exemplary embodiments of the present disclosure do not impose specific limitations on this.

[0035] Figure 1 FIG. 1 is a flow chart showing a method for identifying the boundary type of a structured grid provided by an exemplary embodiment of the present disclosure. Figure 1 As shown, the method for identifying the boundary type of the structured grid includes:

[0036] S101, obtaining a target grid file of a structured grid, and parsing the target grid file to obtain boundary topology information of the structured grid;

[0037] S102, determining multiple boundaries of the structure grid based on the boundary topology information;

[0038] S103: Obtain a preset boundary type identification rule, and determine the boundary type of each boundary based on the preset boundary type identification rule.

[0039] Specifically, the target grid file may be a grid file in the Plot3D format, or a grid file in other formats, which is not specifically limited in the exemplary embodiment of the present disclosure. The exemplary embodiment of the present disclosure parses the target grid file to obtain the boundary topology information of the structure grid, which may include the overall information data required for identifying the boundary of the structure grid, and the overall information data may include but is not limited to the storage format, single / multi-block structure grid, dimension, whether to include iblank items, etc.

[0040] Here, the boundary topology information may include the number of structural grids, the number of cells of each structural grid in each preset direction, the total number of grid nodes, and the coordinates of each grid node.

[0041] At this time, the exemplary embodiment of the present disclosure may determine a plurality of boundaries of the structure mesh based on the boundary topology information.

[0042] In practical applications, the exemplary embodiments of the present disclosure may pre-set a preset boundary type identification rule, which may be formulated according to the actual application scenario, and the exemplary embodiments of the present disclosure do not specifically limit this. Then, the preset boundary type identification rule may be used to automatically identify the boundary type of each boundary, and when used for subsequent mesh division, the mesh division efficiency may be improved.

[0043] According to the technical solution of the example embodiment of the present disclosure, the boundary topology information of the structural grid is obtained by acquiring the target grid file of the structural grid and parsing the target grid file; based on the boundary topology information, multiple boundaries of the structural grid are determined; preset boundary type identification rules are obtained, and based on the preset boundary type identification rules, the boundary type of each boundary is determined. The preset preset boundary type identification rules can be used to automatically identify the boundary type of each boundary of the structural grid, which helps to improve the efficiency of numerical simulation pre-processing.

[0044] In some embodiments, determining a plurality of boundaries of the structure grid based on the boundary topology information may include:

[0045] Determine multiple preset directions of the structural grid in parameter space;

[0046] Obtaining sub-boundary topology information of each preset direction from the boundary topology information;

[0047] Based on the sub-boundary topology information, two boundaries in each preset direction are determined.

[0048] Specifically, the parameter space may be a parameter space of a computational domain, and the multiple preset directions of the structure grid in the parameter space may be an i direction, a j direction, and a k direction in the parameter space of the computational domain. The exemplary embodiment of the present disclosure may first obtain sub-boundary topology information of each preset direction from the boundary topology information; then, based on the sub-boundary topology information, determine two boundaries of each preset direction.

[0049] Here, the two boundaries in the i direction may be the starting boundary in the i direction and the ending boundary in the i direction, the two boundaries in the j direction may be the starting boundary in the j direction and the ending boundary in the j direction, and the two boundaries in the k direction may be the starting boundary in the k direction and the ending boundary in the k direction.

[0050] It should be noted that in the method of the exemplary embodiment of the present disclosure, (i, j, k) is a set of coordinates mapped from the physical space coordinates (x, y, z) to the parameter space, and is generally used as the index of the grid node.

[0051] In addition, the number of structural grids can be one or more, and the multiple boundaries of each structural grid can include six boundaries, namely, the starting boundary in the i direction, the ending boundary in the i direction, the starting boundary in the j direction, the ending boundary in the j direction, the starting boundary in the k direction, and the ending boundary in the k direction.

[0052] In some embodiments, the preset boundary type identification rules may include multiple preset boundary types, preset judgment conditions for each preset boundary type, and a preset judgment order;

[0053] Based on the preset boundary type identification rules, the boundary type of each boundary is determined, which may include:

[0054] By using the preset judgment conditions and in accordance with the preset judgment order, the boundary type of each boundary is determined from a plurality of preset boundary types.

[0055] Specifically, the preset boundary type identification rule may include a plurality of preset boundary types, preset judgment conditions for each preset boundary type, and a preset judgment order.

[0056] Exemplarily, the above-mentioned multiple preset boundary types may include but are not limited to at least two of periodic boundaries, axial boundaries or partial axial boundaries or mirror-symmetric boundaries, two-dimensional boundaries, constant plane boundaries and wall boundaries.

[0057] The preset judgment conditions of the above-mentioned preset boundary types may be judgment conditions pre-set for the above-mentioned preset boundary types, and are used to judge whether the boundary type of a boundary of a certain boundary of the structural network is the corresponding preset boundary type.

[0058] The preset judgment order of the above-mentioned preset boundary types can be to judge whether it is a periodic boundary, judge whether it is an axial boundary or a partial axial boundary or a mirror symmetric boundary, judge whether it is a two-dimensional boundary, judge whether it is a constant plane boundary and judge whether it is a wall boundary.

[0059] Based on this, the exemplary embodiment of the present disclosure uses preset judgment conditions and sequentially determines the boundary type of each boundary from a plurality of preset boundary types according to a preset judgment order.

[0060] Exemplarily, the preset judgment condition of the periodic boundary may be:

[0061] Step 1.1, determine whether the i direction is a periodic boundary: determine whether the coordinate values ​​(x, y, z) of the grid nodes corresponding to i=1 and i=imax are equal one by one. If they are equal, it is considered that the structural grid is periodic in the i direction, that is, the starting boundary and the ending boundary of the i direction are periodic boundaries;

[0062] Step 1.2: Determine whether the j direction is a periodic boundary: refer to step 1.1;

[0063] Step 1.3: Determine whether the j direction is a periodic boundary: refer to step 1.1.

[0064] Exemplarily, the preset judgment conditions for the axis boundary, partial axis boundary, and mirror symmetry boundary may be:

[0065] Step 2.1, determine whether the starting boundary in the i direction is an axis boundary or a partial axis boundary: First, check whether there is an axis around the j direction, traverse all nodes on the boundary and the grid lines adjacent to the boundary (j direction), and determine whether the coordinate values ​​are equal one by one. If so, the starting boundary in the i direction is determined to be an axis boundary. Then, check whether there is an axis around the k direction. Finally, check whether there is a partial axis in the starting boundary in the i direction, traverse all nodes on the starting boundary in the i direction and the grid lines adjacent to the boundary (j direction, k direction), and determine whether there are corresponding nodes with equal coordinate values. If so, the starting boundary in the i direction is determined to be a partial axis boundary.

[0066] Step 2.2, determine whether the termination boundary in the i direction is an axis boundary or a partial axis boundary: refer to step 2.1;

[0067] Step 2.3, determine whether the starting boundary in the i direction is a mirror symmetric boundary condition: First, determine whether the structural grid is symmetric about the yz plane, traverse all corresponding nodes on i=1 and i=3, and determine whether it is symmetric about the i=2 grid plane; then, determine whether the grid is symmetric about the xz plane; finally, determine whether the grid is symmetric about the xy plane.

[0068] Step 2.4: Determine whether the termination boundary in the i direction is a mirror symmetric boundary: refer to step 2.3.

[0069] Step 2.5: Determine whether the starting boundary in the j direction, the ending boundary in the j direction, the starting boundary in the k direction, and the ending boundary in the k direction are axial boundaries or partial axial boundaries: refer to step 2.1; determine whether the starting boundary in the j direction, the ending boundary in the j direction, the starting boundary in the k direction, and the ending boundary in the k direction are mirror-symmetric boundaries: refer to step 2.3.

[0070] Exemplarily, the preset judgment condition of the two-dimensional boundary may be:

[0071] Step 3.1, determine whether the starting boundary in the i direction or the ending boundary in the i direction is a two-dimensional boundary: This judgment is enabled when imax=3, and the coordinate value difference calculation is performed for the corresponding grid points on i=3, i=2 and i=2, i=1. If the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary.

[0072] Step 3.2, determine whether the starting boundary in the j direction or the ending boundary in the j direction is a two-dimensional boundary: This judgment is enabled when jmax=3, and the coordinate value difference calculation is performed for the corresponding grid points on j=3, j=2 and j=2, j=1. If the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary.

[0073] Step 3.3, determine whether the starting boundary in the k direction or the ending boundary in the k direction is a two-dimensional boundary: This judgment is enabled when kmax=3, and the coordinate value difference calculation is performed for the corresponding grid points on k=3, k=2 and k=2, k=1. If the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary.

[0074] Exemplarily, the preset judgment condition of the constant plane boundary may be:

[0075] Step 4.1. Determine whether the starting boundary in the i direction or the ending boundary in the i direction is a constant plane: first determine the coordinate value of the starting point, traverse all nodes, and if there is a node whose horizontal coordinate is not equal to the horizontal coordinate of the starting point, then exclude the boundary as a constant plane parallel to the yz plane; otherwise, it is a constant plane parallel to the yz plane.

[0076] Step 4.2: Determine whether the starting boundary in the j direction or the ending boundary in the j direction is a constant plane: refer to step 4.1.

[0077] Step 4.3: Determine whether the starting boundary in the k direction or the ending boundary in the k direction is a constant plane: refer to step 4.1.

[0078] For example, the preset judgment condition of the wall boundary may be:

[0079] Step 5.1, calculate the average spacing of the boundaries in the i, j, and k directions. Taking the starting boundary in the i direction as an example, traverse all points on the surfaces of i=2 and i=1. The distance of each corresponding point is:

[0080]

[0081] The calculation formula of average spacing spa is as follows:

[0082]

[0083] Step 5.2. Compare to obtain the maximum average spacing spamax and the minimum average spacing spamin of the six surfaces. Take the reference value for the non-viscous wall boundary as ratinv = 10 and the reference value for the viscous wall boundary as ratvis = 100. Calculate the spacing ratio as: sprat = spamax / spamin. When ratinv ≤ sprat < ratvis, it is a non-viscous wall boundary; when sprat ≥ ratvis, it is a viscous wall boundary.

[0084] In some embodiments, the boundary type of each boundary can be at least one of multiple preset boundary types.

[0085] Specifically, in the foregoing, the exemplary embodiments of the present disclosure can use preset judgment conditions and sequentially determine the boundary types of each boundary from multiple preset boundary types according to a preset judgment order. For each boundary, if the boundary type of the boundary only satisfies the preset judgment conditions of one preset boundary type among multiple preset boundary types, the boundary type of the boundary can be one of the multiple preset boundary types.

[0086] If the boundary type of the boundary satisfies the preset judgment conditions of at least two preset boundary types among multiple preset boundary types, the boundary type of the boundary can be at least two of the multiple preset boundary types. That is to say, in the method of the exemplary embodiments of the present disclosure, the boundary type of a boundary can simultaneously be at least two preset boundary types among multiple preset boundary types.

[0087] In some embodiments, the method may further include:

[0088] Obtain a preset marking rule;

[0089] Mark the boundary types of each boundary according to the preset marking rule to obtain the boundary marking information of the structured grid.

[0090] Specifically, the above preset marking rule can be set according to the actual application scenario, and the exemplary embodiments of the present disclosure do not make specific limitations thereto. In the method of the exemplary embodiments of the present disclosure, the preset marking rule can be as shown in Table 1.

[0091] Table 1 Preset Marking Rule

[0092] The value of the boundary type marker parameter Boundary marker information 1 This boundary is a constant plane boundary parallel to the yz plane 2 This boundary is a constant plane boundary parallel to the xz plane 3 The boundary is a constant plane boundary parallel to the xy plane 10 Periodic Boundary 11 Mirror symmetry boundary, the symmetry plane is parallel to the yz axis 12 Mirror symmetry boundary, the symmetry plane is parallel to the xz axis 13 Mirror symmetry boundary, the symmetry plane is parallel to the xy axis 14 The boundary is the axis (along the i direction) 15 The boundary is the axis (along the j direction) 16 The boundary is the axis (along the k direction) 21 2D plane boundary 101 Inviscous wall boundaries 105 Viscous wall boundary -1 Initial value, unrecognized bounds type

[0093] As shown in Table 1, the above preset marking rule may include the values of the boundary type marking parameters of the boundary type and the corresponding boundary marking information, where the boundary marking information can be used to represent the boundary type corresponding to the value of the boundary type marking parameter.

[0094] The boundary type marking parameters of the start boundary in the i direction, the end boundary in the i direction, the start boundary in the j direction, the end boundary in the j direction, the start boundary in the k direction, and the end boundary in the k direction can be represented by ibcs, ibce, jbcs, jbce, kbcs, and kbce, respectively. The initial value of the boundary type marking parameter of each boundary is set to -1. When this value is returned, it means that the boundary information here is not recognized.

[0095] The following is an example.

[0096] 1. Determine whether it is a periodic boundary.

[0097] (1.1) Taking the i direction as an example, the grid nodes in the i direction of the grid block to be processed are traversed, and the typical unit sizes of i=1 and imax nodes are calculated respectively. The calculation formula is:

[0098] tcellsize=(x(2,j,k)-x(1,j,k)) 2 +(y(2,j,k)-y(1,j,k)) 2 +(z(2,j,k)-z(1,j,k)) 2

[0099] Among them, tcellsize represents all typical cell sizes in the structural grid, and it is necessary to traverse from i=1. The above formula is an example when i=1.

[0100] (1.2) Calculate the periodic notch size (can also be directly defined as 0, it is recommended to use the calculated value in engineering applications), the calculation formula is:

[0101] periogap=(x(jmax,j,k)-x(1,j,k)) 2 +(y(jmax,j,k)-y(1,j,k)) 2 +(z(jmax,j,k)-y(1,j,k))

[0102] Among them, Periogap represents the periodic gap size, which is theoretically 0, but tolerance needs to be calculated in engineering applications, and it is recommended to apply the above calculated value. When the periodogap is less than the tolerance, it can be considered that the periodic boundary is established.

[0103] (1.3) Compare periodgap with tcellsize*tol; tol is the tolerance, and the default value is 0.0001. During the traversal process, if periodgap>tcellsize*tol appears, the periodic boundary does not hold, and ibcs=-1. If all points satisfy periodgap<tcellsize*tol, the boundary in the i direction is a periodic boundary, and ibcs=ibce=10. The judgment method of the periodic boundary in the j and k directions refers to the i direction.

[0104] 2. Determine whether it is an axis boundary, a partial axis boundary, or a mirror symmetric boundary.

[0105] (2.1) Taking the i direction as an example, check whether it is an axis boundary around the j direction, traverse all nodes in the i direction, and determine whether any of the following three equations is true. If true, the boundary is determined to be a non-axis boundary. If none of them is true, output ibcs=15.

[0106] x(i,j+1,k)≠x(i,j+1,k)

[0107] y(i,j+1,k)≠y(i,j+1,k)

[0108] z(i,j+1,k)≠z(i,j+1,k)

[0109] (2.2) Check whether it is an axis boundary around the k direction, refer to (2.1), if it is an axis boundary, output ibcs=16.

[0110] (2.3) Check whether it is a partial axis boundary around the j direction, traverse all nodes in the i direction, and determine whether the following three equations are true at the same time. If they are true at the same time, output ibcs=19.

[0111] x(i,j+1,k)=x(i,j+1,k)

[0112] y(i,j+1,k)=y(i,j+1,k)

[0113] z(i,j+1,k)=z(i,j+1,k)

[0114] (2.4) Check whether it is a partial axis boundary around k, refer to (2.3). If so, output ibcs=19.

[0115] (2.5) Determine whether the ending boundary in the i direction is an axis boundary or a partial axis boundary. For specific steps, refer to 2.1 to 2.4 above.

[0116] (2.6) Check whether the starting node in the i direction is a mirror symmetric boundary. If ibcs = -1 and imax>3, first determine whether the grid is about the yz plane. The specific method is as follows: traverse all nodes in i = 1 and obtain:

[0117] dx=x(2,j,k)-x(2,1,1)

[0118] dx1=x(2,j,k)-x(1,j,k)

[0119] dx2=x(3,j,k)-x(2,j,k)

[0120] dy=y(3,j,k)-y(1,j,k)

[0121] dz=z(3,j,k)-z(1,j,k)

[0122] err=max(abs(dx1-dx2), abs(dx), abs(dy), abs(dz))

[0123] dtol=abs(dx1*tol)

[0124] Among them, dx, dxl, dx2, dy, and dz represent the coordinate differences in that direction, err is the residual of the mirror calculation, max represents the maximum value, abs represents the absolute value, and dtol is the designed tolerance value, which is theoretically 0, but this calculated value is recommended for actual engineering.

[0125] Judge err>dtol and abs(x(i, 1, 1))>dtol. If either of them holds, the boundary is a non-mirror symmetric boundary. Otherwise, output ibcs = 11. The judgment method for the y (if it holds, ibcs = 12), z (if it holds, ibcs = 13) mirror symmetric boundary and j and k directions is the same as above.

[0126] 3. Determine whether it is a two-dimensional boundary.

[0127] (3.1) Taking the i direction as an example, calculate the typical y-axis offset, dytype = y(2, 1, 1) - y(1, 1, 1), tolerance dytol = abs(dytype*tol);

[0128] (3.2) Calculate the minimum offset in the selected grid block, traverse all grid nodes with i=1, and calculate the following parameters:

[0129] dx1=x(2,j,k)-x(1,j,k)

[0130] dz1=x(2,j,k)-x(1,j,k)

[0131] dx2=x(3,j,k)-x(2,j,k)

[0132] dz2=x(3,j,k)-x(2,j,k)

[0133] dy=y(2,j,k)-y(2,1,1)

[0134] dy1=y(2,j,k)-y(1,j,k)

[0135] dy2=y(3,j,k)-y(2,j,k)

[0136] skew=max(abs(dx1), abs(dx2), abs(dz1), abs(dz2), abs(dy))

[0137] yerr=max(abs(dy1-dytype), abs(dy2-dytype))

[0138] Among them, dx, dy, and dz are all offsets calculated at different nodes in this direction, skew is the maximum offset, and yerr represents the maximum difference from the typical offset. When the maximum value of the two is less than the calculated tolerance, it can be considered that the three-dimensional grid can be approximately treated as a two-dimensional grid.

[0139] If skew=max(yerr,skew)>dytol exists, it is a non-two-dimensional boundary, otherwise output ibcs=21.

[0140] 4. Determine whether it is a constant plane boundary.

[0141] Taking the i direction as an example, assuming that the x, y, and z directions are constant planes, icx=icy=icz=1, xc=x(1,1,1), yc=y(1,1,1), zc=z(1,1,1), traverse all grid nodes where i=1, if x(i,j,k)≠xc, then icx=0, otherwise ibcs=1.

[0142] The same is true for the j and k directions, ibcs=2 or 3.

[0143] 5. Determine whether it is a wall boundary.

[0144] (5.1) Calculate the average spacing of the boundaries in the i, j, and k directions. Taking the starting boundary in the i direction as an example, traverse all points on the surfaces i=2 and i=1. The distance between each corresponding point is:

[0145]

[0146] The calculation formula of average spacing spa is as follows:

[0147]

[0148] (5.2) Compare to obtain the maximum average spacing spamax and the minimum average spacing spamin of the six faces. Take the reference value of the non - sticky wall boundary as ratinv = 10, and the reference value of the sticky wall boundary as ratvis = 100. Calculate the spacing ratio as: sprat = spamax / spamin. When ratinv ≤ sprat < ratvis, it is a non - sticky wall boundary; when sprat ≥ ratvis, it is a sticky wall boundary.

[0149] Figure 2A The schematic diagram of a structured grid provided by an exemplary embodiment of the present disclosure is shown. As Figure 2A shown, the boundary topology recognition result of this structured grid is: ibcs = 101, ibce = 101, jbcs = 105, jbce = 101, kbcs = 105, kbce = 105. Combining with Table 1, this boundary topology recognition result shows that: both the starting boundary and the ending boundary in the i - direction are recognized as non - sticky wall boundaries, and no other characteristic boundaries are recognized; the starting boundary in the j - direction and the j - direction are respectively recognized as a sticky wall boundary and a non - sticky wall boundary, and no other characteristic boundaries are recognized; both the starting boundary and the ending boundary in the k - direction are recognized as sticky wall boundaries, and no other characteristic boundaries are recognized.

[0150] Figure 2B The schematic diagram of another structured grid provided by an exemplary embodiment of the present disclosure is shown. As Figure 2B shown, the boundary topology recognition result of this structured grid is: ibcs = 1,101; ibce = 1,101; jbcs = 10,13; jbce = 10,13; kbcs = 105; kbce 105. Combining with Table 1, this boundary topology recognition result shows that: the starting boundary in the i - direction is recognized as a constant - plane boundary parallel to the yz - plane and a non - sticky wall boundary, and no other characteristic boundaries are recognized; the ending boundary in the i - direction is recognized as a constant - plane boundary parallel to the yz - plane and a non - sticky wall boundary, and no other characteristic boundaries are recognized; the starting boundary in the j - direction is recognized as a periodic boundary and a mirror - symmetric boundary, and no other characteristic boundaries are recognized; the ending boundary in the j - direction is recognized as a periodic boundary and a mirror - symmetric boundary, and no other characteristic boundaries are recognized; the starting boundary in the k - direction is recognized as a sticky wall boundary, and no other characteristic boundaries are recognized; the ending boundary in the k - direction is recognized as a sticky wall boundary, and no other characteristic boundaries are recognized.

[0151] Based on this, the exemplary embodiment of the present disclosure can, after determining the boundary type of each boundary, mark the boundary type of each boundary according to the above-mentioned preset marking rules to obtain the boundary marking information of the structural grid, so as to automatically identify the topological information of the three-dimensional grid boundary and provide marking information, which helps the subsequent loading of boundary conditions and simplification of the numerical simulation calculation domain, and improves the efficiency of numerical simulation pre-processing.

[0152] At least one of the above-mentioned technical solutions adopted in the exemplary embodiment of the present disclosure can achieve the following beneficial effects: by acquiring the target grid file of the structural grid and parsing the target grid file, the boundary topology information of the structural grid is obtained; based on the boundary topology information, multiple boundaries of the structural grid are determined; preset boundary type identification rules are obtained, and based on the preset boundary type identification rules, the boundary type of each boundary is determined, and the boundary type of each boundary of the structural grid can be automatically identified by using the pre-set preset boundary type identification rules, which helps to improve the efficiency of numerical simulation pre-processing.

[0153] The above mainly introduces the solutions provided by the exemplary embodiments of the present disclosure. It is understandable that in order to implement the above functions, the electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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 the present disclosure.

[0154] The exemplary embodiments of the present disclosure can divide the functional units of the electronic device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the exemplary embodiments of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0155] In the case of dividing each functional module according to each function, an exemplary embodiment of the present disclosure provides a device for identifying the boundary type of a structured grid, and the device for identifying the boundary type of a structured grid may be an electronic device or a chip applied to an electronic device. Figure 3 FIG. 2 is a schematic diagram showing a structure of a device for identifying the boundary type of a structured grid provided by an exemplary embodiment of the present disclosure. Figure 3As shown, the device 300 includes:

[0156] An acquisition module 301 is used to acquire a target grid file of a structured grid;

[0157] The parsing module 302 is used to parse the target grid file to obtain the boundary topology information of the structural grid; the processing module 303 is used to determine multiple boundaries of the structural grid based on the boundary topology information;

[0158] The acquisition module 301 is also used to acquire a preset boundary type identification rule;

[0159] The processing module 303 is further configured to determine the boundary type of each boundary based on the preset boundary type identification rule.

[0160] In some embodiments, the preset boundary type identification rule includes a plurality of preset boundary types, preset judgment conditions and a preset judgment order for each of the preset boundary types;

[0161] The processing module 303 is further configured to use the preset judgment condition and determine the boundary type of each boundary from the plurality of preset boundary types in sequence according to the preset judgment order.

[0162] In some embodiments, the plurality of preset boundary types include but are not limited to at least two of periodic boundaries, axial boundaries or partial axial boundaries or mirror-symmetric boundaries, two-dimensional boundaries, constant plane boundaries and wall boundaries.

[0163] In some embodiments, the boundary type of each of the boundaries is at least one of the plurality of preset boundary types.

[0164] In some embodiments, the acquisition module 301 is further used to acquire a preset marking rule;

[0165] The processing module 303 is further configured to mark the boundary type of each boundary according to a preset marking rule to obtain boundary marking information of the structured grid.

[0166] In some embodiments, the processing module 303 is also used to determine multiple preset directions of the structural grid in the parameter space; obtain sub-boundary topology information of each preset direction from the boundary topology information; and determine two boundaries of each preset direction based on the sub-boundary topology information.

[0167] In some embodiments, the boundary topology information includes the number of the structural grids, the number of cells of each of the structural grids in each of the preset directions, the total number of grid nodes, and the coordinates of each of the grid nodes.

[0168] The exemplary embodiments of the present disclosure also provide an electronic device, comprising: at least one processor; a memory for storing at least one processor-executable instruction; wherein the at least one processor is used to execute the instruction to implement the steps of the above method disclosed in the exemplary embodiments of the present disclosure.

[0169] Figure 4 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure. Figure 4 As shown, the electronic device 400 includes at least one processor 401 and a memory 402 coupled to the processor 401 . The processor 401 can execute corresponding steps in the above method disclosed in the exemplary embodiment of the present disclosure.

[0170] The processor 401 may also be referred to as a central processing unit (CPU), which may be an integrated circuit chip having signal processing capabilities. Each step in the method disclosed in the exemplary embodiment of the present disclosure may be completed by an integrated logic circuit of hardware in the processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the exemplary embodiment of the present disclosure may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a memory 402, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage media in the art. The processor 401 reads the information in the memory 402 and completes the steps of the method in conjunction with its hardware.

[0171] In addition, when various operations / processes according to the present disclosure are implemented by software and / or firmware, they can be transmitted from a storage medium or a network to a computer system having a dedicated hardware structure, for example, Figure 5 The computer system 500 shown is installed with the programs constituting the software. When the various programs are installed, the computer system can perform various functions, including the functions described above. Figure 5 A schematic diagram of the structure of a computer system provided by an exemplary embodiment of the present disclosure is shown.

[0172] Computer system 500 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0173] like Figure 5 As shown, the computer system 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0174] A plurality of components in the computer system 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the computer system 500, and the input unit 506 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 507 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 508 may include, but is not limited to, a disk, an optical disk. The communication unit 509 allows the computer system 500 to exchange information / data with other devices over a network such as the Internet, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, for example, a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0175] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the above methods disclosed in the exemplary embodiments of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via a ROM 502 and / or a communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the above methods disclosed in the exemplary embodiments of the present disclosure in any other appropriate manner (e.g., by means of firmware).

[0176] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the above method disclosed in the exemplary embodiments of the present disclosure.

[0177] The computer-readable storage medium in the exemplary embodiment of the present disclosure may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. The above-mentioned computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the above. More specifically, the above-mentioned computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0178] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0179] The exemplary embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor, the above method disclosed in the exemplary embodiments of the present disclosure is implemented.

[0180] In embodiments of the present disclosure, computer program codes for performing the operations of the present disclosure may be written in one or more programming languages ​​or combinations thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer.

[0181] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart 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.

[0182] The modules, components or units involved in the exemplary embodiments described in the present disclosure may be implemented by software or hardware, wherein the names of the modules, components or units do not, in some cases, limit the modules, components or units themselves.

[0183] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0184] The above descriptions are only some embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions 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 above disclosed concept. For example, a technical solution formed by replacing the above features with the technical features with similar functions disclosed in the present disclosure (but not limited to).

[0185] Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A method for identifying boundary types of structured grids, characterized in that: include: Acquire a target grid file of the structured grid, and parse the target grid file to obtain boundary topology information of the structured grid; Based on the boundary topology information, determining a plurality of boundaries of the structured grid; Obtaining a preset boundary type identification rule, and determining a boundary type of each boundary based on the preset boundary type identification rule; The preset boundary type identification rule includes a plurality of preset boundary types, preset judgment conditions and a preset judgment order for each of the preset boundary types; The determining the boundary type of each boundary based on the preset boundary type identification rule includes: Using the preset judgment condition, and in accordance with the preset judgment order, determine the boundary type of each boundary from the plurality of preset boundary types; The plurality of preset boundary types include at least two of a periodic boundary, an axial boundary, a partial axial boundary, a mirror symmetric boundary, a two-dimensional boundary, a constant plane boundary and a wall boundary; The preset judgment condition of the periodic boundary is: Step 1.1, determine whether the i direction is a periodic boundary: determine whether the coordinate values ​​(x, y, z) of the grid nodes corresponding to i=1 and i=imax are equal one by one; if they are equal, it is considered that the structural grid is periodic in the i direction, that is, the starting boundary in the i direction and the ending boundary in the i direction are periodic boundaries; Step 1.2: Determine whether the j direction is a periodic boundary: refer to step 1.1; Step 1.3, determine whether the j direction is a periodic boundary: refer to step 1.1; The preset judgment conditions of the axis boundary, the partial axis boundary, and the mirror symmetry boundary are: Step 2.1, determine whether the starting boundary in the i direction is an axis boundary or a partial axis boundary: first, check whether there is an axis around the j direction, traverse all nodes on the boundary and the grid lines adjacent to the boundary, and determine whether the coordinate values ​​are equal one by one; if so, determine that the starting boundary in the i direction is an axis boundary; then, check whether there is an axis around the k direction; finally, check whether there is a partial axis in the starting boundary in the i direction, traverse all nodes on the starting boundary in the i direction and the grid lines adjacent to the boundary, and determine whether there are corresponding nodes with equal coordinate values. If so, determine that the starting boundary in the i direction is a partial axis boundary; Step 2.2, determine whether the termination boundary in the i direction is an axis boundary or a partial axis boundary: refer to step 2.1; Step 2.3, determine whether the starting boundary in the i direction is a mirror symmetric boundary condition: first, determine whether the structural grid is symmetric about the yz plane, traverse all the corresponding nodes on i=1 and i=3, and determine whether it is symmetric about the i=2 grid plane; then, determine whether the grid is symmetric about the xz plane; finally, determine whether the grid is symmetric about the xy plane; Step 2.4, determine whether the termination boundary in the i direction is a mirror symmetric boundary: refer to step 2.3; Step 2.

5. Determine whether the starting boundary in the j direction, the ending boundary in the j direction, the starting boundary in the k direction, and the ending boundary in the k direction are axis boundaries or partial axis boundaries: Refer to Step 2.1; determine whether the starting boundary in the j direction, the ending boundary in the j direction, the starting boundary in the k direction, and the ending boundary in the k direction are mirror-symmetric boundaries: Refer to Step 2.3; The preset judgment condition for the two-dimensional boundary is as follows: Step 3.

1. Determine whether the starting boundary or the ending boundary in the i direction is a two-dimensional boundary: This judgment is enabled when imax = 3. Calculate the coordinate value differences for the corresponding grid points on i = 3, i = 2 and i = 2, i = 1; if the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary; Step 3.

2. Determine whether the starting boundary or the ending boundary in the j direction is a two-dimensional boundary: This judgment is enabled when jmax = 3. Calculate the coordinate value differences for the corresponding grid points on j = 3, j = 2 and j = 2, j = 1; if the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary; Step 3.

3. Determine whether the starting boundary or the ending boundary in the k direction is a two-dimensional boundary: This judgment is enabled when kmax = 3. Calculate the coordinate value differences for the corresponding grid points on k = 3, k = 2 and k = 2, k = 1; if the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary; The preset judgment condition for the constant plane boundary is as follows: Step 4.

1. Determine whether the starting boundary or the ending boundary in the i direction is a constant plane: First, determine the coordinate value of the starting point. Traverse all nodes. If there exists a node whose abscissa is not equal to the abscissa of the starting point, then exclude this boundary as a constant plane parallel to the yz plane; otherwise, it is a constant plane parallel to the yz plane; Step 4.

2. Determine whether the starting boundary or the ending boundary in the j direction is a constant plane: Refer to Step 4.1; Step 4.

3. Determine whether the starting boundary or the ending boundary in the k direction is a constant plane: Refer to Step 4.1; The preset judgment condition for the wall boundary is as follows: Step 5.

1. Calculate the average spacing of each boundary in the i, j, and k directions. Taking the starting boundary in the i direction as an example, traverse all points on the surfaces of i = 2 and i = 1. The distance between each corresponding point is: The calculation formula for the average spacing spa is as follows: Step 5.

2. Compare to obtain the maximum average spacing spamax and the minimum average spacing spamin of the six surfaces. Take the reference value for the non-viscous wall boundary as ratinv = 10, and the reference value for the viscous wall boundary as ratvis = 100. Calculate the spacing ratio as: sprat = spamax / spamin; when ratinv ≤ sprat < ratvis, it is a non-viscous wall boundary; when sprat ≥ ratvis, it is a viscous wall boundary.

2. The method according to claim 1, characterized in that The boundary type of each of the above boundaries is at least one of the multiple preset boundary types.

3. The method according to claim 1, characterized in that The method further includes: Obtain a preset marking rule; Mark the boundary types of each of the above boundaries according to the preset marking rule to obtain the boundary marking information of the structured grid.

4. The method according to any one of claims 1 to 3, characterized in that The step of determining a plurality of boundaries of the structured grid based on the boundary topology information includes: Determining a plurality of preset directions of the structural grid in a parameter space; Acquire sub-boundary topology information of each of the preset directions from the boundary topology information; Based on the sub-boundary topology information, two boundaries of each of the preset directions are determined.

5. The method according to claim 4, characterized in that The boundary topology information includes the number of the structural grids, the number of cells of each of the structural grids in each of the preset directions, the total number of grid nodes and the coordinates of each of the grid nodes.

6. A device for identifying the boundary type of a structured grid, characterized in that: include: An acquisition module is used to acquire a target grid file of a structured grid; A parsing module, used for parsing the target grid file to obtain the boundary topology information of the structural grid; A processing module, configured to determine a plurality of boundaries of the structural grid based on the boundary topology information; The acquisition module is also used to acquire preset boundary type identification rules; The processing module is further used to determine the boundary type of each boundary based on the preset boundary type identification rule; The preset boundary type identification rule includes a plurality of preset boundary types, preset judgment conditions and a preset judgment order for each of the preset boundary types; The processing module is further used to determine the boundary type of each boundary from the plurality of preset boundary types in sequence according to the preset judgment order by using the preset judgment condition; The plurality of preset boundary types include at least two of a periodic boundary, an axial boundary, a partial axial boundary, a mirror symmetric boundary, a two-dimensional boundary, a constant plane boundary and a wall boundary; The preset judgment condition of the periodic boundary is: Step 1.1, determine whether the i direction is a periodic boundary: determine whether the coordinate values ​​(x, y, z) of the grid nodes corresponding to i=1 and i=imax are equal one by one; if they are equal, it is considered that the structural grid is periodic in the i direction, that is, the starting boundary in the i direction and the ending boundary in the i direction are periodic boundaries; Step 1.2: Determine whether the j direction is a periodic boundary: refer to step 1.1; Step 1.3, determine whether the j direction is a periodic boundary: refer to step 1.1; The preset judgment conditions of the axis boundary, the partial axis boundary, and the mirror symmetry boundary are: Step 2.1, determine whether the starting boundary in the i direction is an axis boundary or a partial axis boundary: first, check whether there is an axis around the j direction, traverse all nodes on the boundary and the grid lines adjacent to the boundary, and determine whether the coordinate values ​​are equal one by one; if so, determine that the starting boundary in the i direction is an axis boundary; then, check whether there is an axis around the k direction; finally, check whether there is a partial axis in the starting boundary in the i direction, traverse all nodes on the starting boundary in the i direction and the grid lines adjacent to the boundary, and determine whether there are corresponding nodes with equal coordinate values. If so, determine that the starting boundary in the i direction is a partial axis boundary; Step 2.2, determine whether the termination boundary in the i direction is an axis boundary or a partial axis boundary: refer to step 2.1; Step 2.3, determine whether the starting boundary in the i direction is a mirror symmetric boundary condition: First, determine whether the structural grid is symmetric about the yz plane, traverse all corresponding nodes on i=1 and i=3, and determine whether it is symmetric about the i=2 grid plane; Then, determine whether the grid is symmetric about the xz plane; finally, determine whether the grid is symmetric about the xy plane; Step 2.4, determine whether the termination boundary in the i direction is a mirror symmetric boundary: refer to step 2.3; Step 2.5, determine whether the starting boundary in the j direction, the ending boundary in the j direction, the starting boundary in the k direction, and the ending boundary in the k direction are axial boundaries or partial axial boundaries: refer to step 2.1; determine whether the starting boundary in the j direction, the ending boundary in the j direction, the starting boundary in the k direction, and the ending boundary in the k direction are mirror symmetric boundaries: refer to step 2.3; The preset judgment condition of the two-dimensional boundary is: Step 3.1, determine whether the starting boundary in the i direction or the ending boundary in the i direction is a two-dimensional boundary: this judgment is enabled when imax=3, and the coordinate value difference calculation is performed for the corresponding grid points on i=3, i=2 and i=2, i=1; if the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary; Step 3.2, determine whether the starting boundary in the j direction or the ending boundary in the j direction is a two-dimensional boundary: when jmax=3, this determination is enabled, and the coordinate value difference calculation is performed for the corresponding grid points on j=3, j=2 and j=2, j=1; if the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary; Step 3.3, determine whether the starting boundary in the k direction or the ending boundary in the k direction is a two-dimensional boundary: when kmax=3, this judgment is enabled, and the coordinate value difference calculation is performed for the corresponding grid points on k=3, k=2 and k=2, k=1; if the difference is greater than 0, it is a non-two-dimensional boundary; otherwise, it is a two-dimensional boundary; The preset judgment condition of the constant plane boundary is: Step 4.1, determine whether the starting boundary in the i direction or the ending boundary in the i direction is a constant plane: first determine the coordinate value of the starting point, traverse all nodes, if there is a node whose horizontal coordinate is not equal to the horizontal coordinate of the starting point, then exclude the boundary as a constant plane parallel to the yz plane; otherwise, it is a constant plane parallel to the yz plane; Step 4.2, determine whether the starting boundary in the j direction or the ending boundary in the j direction is a constant plane: refer to step 4.1; Step 4.3, determine whether the starting boundary in the k direction or the ending boundary in the k direction is a constant plane: refer to step 4.1; The preset judgment condition of the wall boundary is: Step 5.1, calculate the average spacing of the boundaries in the i, j, and k directions. Taking the starting boundary in the i direction as an example, traverse all points on the surfaces of i=2 and i=1. The distance of each corresponding point is: The calculation formula of average spacing spa is as follows: Step 5.2: Compare to obtain the maximum average spacing spamax and the minimum average spacing spamin of the six surfaces. Take the reference value of the non-adhesive wall boundary as ratinv = 10, and the reference value of the adhesive wall boundary as ratvis = 100. Calculate the spacing ratio as: sprat = spamax / spamin; when ratinv ≤ sprat < ratvis, it is a non-adhesive wall boundary; when sprat ≥ ratvis, it is an adhesive wall boundary.

7. An electronic device, characterized in that: Comprising: At least one processor; A memory for storing executable instructions of the at least one processor; Wherein, the at least one processor is configured to execute the instructions to implement the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Image processing device, image processing method, imaging system, and program

    WO2011074078A1

  • Class boundary detection device, control method, and non-transitory computer-readable medium

    WO2023073795A1