CN112257202A - Neural network-based two-dimensional structure grid automatic decomposition method for multi-inner-hole part - Google Patents
Neural network-based two-dimensional structure grid automatic decomposition method for multi-inner-hole part Download PDFInfo
- Publication number
- CN112257202A CN112257202A CN202011145501.0A CN202011145501A CN112257202A CN 112257202 A CN112257202 A CN 112257202A CN 202011145501 A CN202011145501 A CN 202011145501A CN 112257202 A CN112257202 A CN 112257202A
- Authority
- CN
- China
- Prior art keywords
- point
- grid
- singular
- vector
- frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 38
- 238000000354 decomposition reaction Methods 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 title claims abstract description 22
- 239000013598 vector Substances 0.000 claims abstract description 149
- 238000003062 neural network model Methods 0.000 claims abstract description 17
- 238000012545 processing Methods 0.000 claims abstract description 5
- 238000013507 mapping Methods 0.000 claims abstract description 4
- 238000012549 training Methods 0.000 claims description 35
- 238000000605 extraction Methods 0.000 claims description 24
- 238000002372 labelling Methods 0.000 claims description 20
- 230000006870 function Effects 0.000 claims description 9
- WSNMPAVSZJSIMT-UHFFFAOYSA-N COc1c(C)c2COC(=O)c2c(O)c1CC(O)C1(C)CCC(=O)O1 Chemical compound COc1c(C)c2COC(=O)c2c(O)c1CC(O)C1(C)CCC(=O)O1 WSNMPAVSZJSIMT-UHFFFAOYSA-N 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000004519 manufacturing process Methods 0.000 claims description 6
- 238000011176 pooling Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 claims description 3
- 230000008859 change Effects 0.000 claims description 3
- 238000013461 design Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 claims description 3
- 238000004088 simulation Methods 0.000 abstract description 5
- 238000004458 analytical method Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000009499 grossing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/17—Mechanical parametric or variational design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/23—Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
- G06T17/205—Re-meshing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Geometry (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Biology (AREA)
- Computer Graphics (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Medical Informatics (AREA)
- Apparatus For Radiation Diagnosis (AREA)
Abstract
The invention discloses a neural network-based two-dimensional structure grid automatic decomposition method for a multi-inner-hole part. The introduction of manual links in the existing block structured grid generation can greatly reduce the grid generation efficiency. Firstly, a sample set for neural network learning two-dimensional area decomposition is manufactured, and a neural network model is trained through position information of grid points in the sample set and frame vector marking information of frames; then, carrying out neural network prediction on prediction sample data of a multi-inner-hole part of the structural grid to be divided, and processing the prediction sample data by using frame vector marking information of the neural network prediction to obtain final regional decomposition data; and finally, generating the quadrilateral grids of the multi-inner-hole part of the structural grid to be divided by using a mapping method. The method can realize rapid automatic regional decomposition aiming at the new model, and has important significance for rapid and accurate simulation analysis of the multi-inner-hole part.
Description
Technical Field
The invention relates to a regional decomposition process for block structured quadrilateral grid generation in pretreatment in the field of numerical simulation, in particular to a neural network-based two-dimensional structure grid automatic decomposition method for a multi-inner-hole part.
Background
The grid types commonly used in the numerical simulation analysis include a structural grid, an unstructured grid, a nested grid, a right-angle grid, a mixed grid and the like, and various grids have advantages and disadvantages respectively. In the two-dimensional problem, the structural grid is composed of regularly arranged quadrilateral units, and the structural grid is favored in various simulation analyses due to the characteristics of high solving precision, small number of required units and the like. However, structural meshes have strong topological constraints relative to other types of meshes; for complex geometric models, generating a set of high quality structural meshes is a very time consuming and difficult task. By decomposing the model region into a plurality of subdomains and generating the structured grid in each subdomain, and the topology between subdomains does not require to maintain the structured characteristic, the block structured grid is obtained, which reduces the grid generation difficulty to a certain extent and can also avoid generating distortion units which may appear in the fully structured grid. As such, in practical engineering, the block structured grid has a wider application range than the fully structured grid. At present, for the generation of the block structured grid of the complex model, the region decomposition of the model still needs to be carried out manually, then the structured grid of each sub-domain is automatically generated, and the introduction of manual links greatly reduces the grid generation efficiency. For example, for local variations in the design of a multi-bore part, the mold region needs to be re-decomposed to create the mesh.
Artificial intelligence methods represented by neural networks have been successful in engineering practice, for example, convolutional neural networks are widely used in the field of computer vision and have excellent performance in terms of model processing. If the automatic regional decomposition of the complex model can be rapidly realized through the autonomous learning of the computer on the basis of the existing data by means of the current rapidly developed artificial intelligence technology, the grid generation efficiency can be greatly improved.
Disclosure of Invention
The invention aims to overcome the defect that manual regional decomposition is required to be introduced in the generation of the conventional block structured grid, and provides a neural-network-based two-dimensional structural grid automatic decomposition method for a multi-inner-hole part.
The technical scheme adopted by the invention is as follows:
the invention discloses a neural network-based two-dimensional structure grid automatic decomposition method for a multi-inner-hole part, which comprises the following specific steps:
step 1, making a sample set for neural network learning two-dimensional area decomposition, specifically as follows:
1.1, selecting more than 10 multi-inner-hole parts which only change locally, and manufacturing training sample data for neural network learning two-dimensional area decomposition aiming at each multi-inner-hole part; each sample point of the training sample data comprises the characteristics of a frame vector, position information of a grid point where the frame vector is located, the distance between the grid point where the frame vector is located and the nearest boundary, the distance between the grid point where the frame vector is located and the nearest singular point and frame vector labeling information. The manufacturing process of the training sample data comprises the following steps:
firstly, dispersing the multi-inner-hole part into a triangulated mesh and restricting the number of vertexes of the triangulated mesh to be 2020 and 2050; then, a frame field (in the prior art, each frame is composed of four unit vectors and can be represented by two orthogonal unit vectors) is generated for describing the internal structure of the multi-inner-hole part region, and region decomposition data (in the prior art) suitable for generating the block structured quadrilateral grids, namely a singular structure composed of singular lines, is generated based on the frame field. Then, the following labeling information is made for the frame vector positioned on each grid point of the triangulated mesh: for the frame vectors positioned on the grid points through which the singular lines flow, marking the frame vector consistent with the flow direction of the singular lines as 1 and marking the frame vector inconsistent with the flow direction of the singular lines as 0; the frame vectors at grid points where the singular lines do not flow are all labeled 0. And finally, determining the position information of the grid point of each frame vector, the distance between the grid point of each frame vector and the nearest boundary and the distance between the grid point of each frame vector and the nearest singular point, thereby obtaining the characteristics contained in each sample point, and finally obtaining training sample data according to all the sample points.
1.2 in order to obtain a large amount of training data, carrying out grid deformation operation on the triangulated grid of each multi-inner-hole part (specifically, moving the position of an internal grid point on the basis of keeping a boundary unchanged), and making training sample data for the triangulated grid after the grid deformation operation, so that a sample set can be conveniently and quickly expanded.
1.3 put all training sample data into the sample set.
Step 2: training a neural network model through the position information of each grid point in the sample set and the frame vector marking information of each frame, which is as follows:
inputting the multi-inner-hole part sample set into a neural network model to obtain a tensor T with the characteristic of second order, wherein the first order of the tensor T expresses the probability that the frame vector of the grid point is marked as 0, and the second order expresses the probability that the frame vector of the grid point is marked as 1; the first-order index of the tensor T is 0, and the second-order index of the tensor T is 1; then, randomly selecting 80% of data from a multi-inner-hole part sample set as a training set, using 20% of the data as a testing set, setting a training period to be 200, calculating loss amount loss of tensor T relative to labeled information in the sample set in each training, and optimizing neural network parameters through a back propagation algorithm to reduce the loss; and obtaining the trained neural network model after the training period is reached. Wherein, the calculation process of loss is as follows:
loss=0.5*loss0+0.5*loss1,
therein, loss0Through cross entropy loss function calculation, loss1Calculating by a Dice loss function;
loss0=labels*-log(z)+(1-labels)*-log(1-z),
wherein, z is Sigmoid (T), that is, the value of z is the result of using Sigmoid activation function for tensor T, labels is the frame vector labeling information of the sample set, and sum is the summation of each element in the tensor.
And step 3: carrying out neural network prediction on prediction sample data of a multi-inner-hole part of a structural grid to be divided, and specifically comprising the following steps:
3.1 generating prediction sample data without frame vector marking information for the multi-inner-hole part of the structural grid to be divided, which is specifically as follows: dispersing the multi-inner-hole parts of the structural mesh to be divided into triangulated meshes and restricting the number of the vertexes of the triangular meshes to be 2020 and 2050; then, generating a frame marking field (adopting the existing mature technology) for describing the internal structure of the multi-inner-hole part area; and finally, obtaining prediction sample data, wherein each sample point of the prediction sample data comprises the characteristics of a frame vector, position information of a grid point where the frame vector is located, the distance between the grid point where the frame vector is located and the nearest boundary, and the distance between the grid point where the frame vector is located and the nearest singular point.
And 3.2, inputting the prediction sample data into the trained neural network model to obtain a second-order probability vector containing the frame vector labeling information probability at each grid point in the prediction sample data, wherein the index of the element with the maximum probability in the second-order probability vector is the frame vector labeling information predicted by the neural network.
And 4, step 4: processing the prediction sample data by using the frame vector labeling information predicted by the neural network to obtain final region decomposition data, which is specifically as follows:
4.1 determining the position of the singular point and the initial flow direction of the singular line. Defining a vector field u (x, y), wherein (x, y) is the two-dimensional coordinates of a grid point; triangulated mesh point (x) of multi-bore part for given structural mesh to be dividedp,yp) If u (x)p,yp) If the grid point is 0, the grid point is a singular point; then calculating the Suqi according to the price of the singular pointAnd taking the vector of the intersection point pointed by the singular point as the initial flow direction vector of the singular line.
4.2 find the discrete points forming the singular line in the triangularized grid of the multi-inner-hole part of the structural grid to be divided, which is as follows:
4.2.1 the last discrete point p of the singular linei1-1Pointing to the current discrete point pi1Vector ofRemoving discrete points p1The current flow direction vector is set to be out of the initial flow direction vector of the singular line, and the other discrete points pi1Current flow direction vector ofI.e. discrete points pi1Frame vector of (2); wherein when i1 is 1, the point p is discrete0To set an imaginary point, a discrete point p1I.e. singular points, discrete points p0To satisfy the following conditions: discrete point p0Pointing to a discrete point p1The vector of (a) is a unit vector collinear with the initial flow direction vector of the singular line; p is to bei1Dividing m nearest neighbor points into n result point sets with frame vectors marked as 1 according to frame vector marking information predicted by neural network And m-n sets of non-result points with frame vectors labeled 0 m is 15; then, P is obtainedi1Vector set of upper frameEach element ofJ1 is more than or equal to 1 and less than or equal to nThe minimum angle between and the element andsum of minimum angles therebetweenP′i1Vector set of upper frameEach element ofJ2 is more than or equal to 1 and less than or equal to nThe minimum angle between and the element andsum of minimum angles therebetweenThen, obtain1 < j1 < ni1And an1 < j2 < n′i1(ii) a If thetai1>θ′i1And thetai1>35 deg., then theta′i1The element in the corresponding set of non-result points as the next discrete point of the singular line willAs the current flow vector for the next discrete point; otherwise select θi1The element in the corresponding result point set is taken as the next discrete point of the singular lineAs the current flow vector for the next discrete point.
4.2.2 repeat step 4.2.1 until all the discrete points making up the whole singular line are determined, thus obtaining the whole singular line.
4.3 repeating steps 4.1 and 4.2 to obtain all singular point positions and all singular lines.
And 4.4, combining repeated singular lines in the multi-inner-hole part of the structural grid to be divided, and smoothing all the singular lines after the combination to obtain a singular structure. Singular line S0And singular line S1The criterion for determining whether to repeat is as follows: get singular line S0Divided by 2 to get the discrete point q corresponding to the position after roundingi2(i.e., setting the discrete point q)i2As a singular line S0The i2 point above), q is extracted from the discrete point set of all singular linesi2If there are discrete points Q 'in Q, the set of k' nearest neighbor points Q, k 'is 15'j3Q 'of'j3The singular line S1Is a singular line S0End point of, singular line S1Is a singular line S0A starting point of (2), and then will S0And S1Is a repeating singular line; wherein, q'j3-1As a singular line S1Upper discrete point q'j3The previous discrete point of (a) is,is qi2The normal vector of the grid in which it is located,is q'j3The normal vector of the grid in which it is located.
And 5: and (4) generating a quadrilateral mesh of the multi-inner-hole part of the structural mesh to be divided by using a mapping method on the basis of the singular structure generated in the step (4).
Preferably, the neural network model comprises the following main structural design:
the structure is that: and a global feature extraction layer. Layer 1 global feature extraction layer X1Obtaining a sample set through convolution operation; when l is more than or equal to 2, the l-th layer global feature extraction layer is obtained by the l-1-th layer feature tensor through convolution operation, and the convolution formula is Xl=conv(Fl-1),XlThe feature tensor representing the l-th global feature extraction layer, conv () representing the convolution operation, Fl-1The feature tensor representing the l-1 th feature extraction layer.
The structure II: a local feature extraction layer. Define ith sample Point F'iK nearest neighbor points (to sample point F'iThe nearest k sample points) isJ is more than or equal to 1 and less than or equal to k, and k is a value in the range of 20-30; wherein i traverses all grid points in the sample set; let the jth local feature of layer 1 beThe jth local feature of the l-1 th layer isThe feature tensor of the local feature extraction layer of layer 1When l is more than or equal to 2, the characteristic tensor of the l-th local characteristic extraction layer
Structure III: and (5) a characteristic splicing layer. TheGlobal feature X obtained in layer splicing structurelL is not less than 1 and the local feature Y obtained in Structure 2lL is not less than 1 to obtain Fl=concat(Xl+Yl) Where concat () is a feature splicing operation.
Structure iv: combining the structure I, the structure II and the structure III into a characteristic combination layer, wherein three continuous characteristic combination layers are adopted, and a maximum pooling layer is connected behind the three characteristic combination layers to reduce parameters; then, the convolutional layer and the Dropout operation layer are sequentially connected after the max pooling layer.
The invention has the beneficial effects that: according to the method, a large amount of existing multi-inner-hole part region decomposition data suitable for block structured quadrilateral grid generation are learned, and neural grids are trained to identify the structural characteristics in the multi-inner-hole part region; and smooth frame field information of boundary characteristics and internal structure characteristics of the representation geometric model is trained through the neural network, potential singular structure distribution is predicted and identified, and a complete singular structure is extracted from a neural network result, so that rapid automatic region decomposition aiming at a new model is realized, and the method has important significance for rapid and accurate simulation analysis of parts with multiple inner holes.
Drawings
FIG. 1 is a flow chart of the present invention.
FIG. 2 is a frame field and a partial enlarged view of the internal structure of a four-bore part area produced using the present invention.
Fig. 3 is a diagram of a neural network architecture used in the present invention.
FIG. 4 is a diagram of the visualized result of the vector labeling information of all the frames of the four-hole part predicted by the neural network of the present invention.
FIG. 5 is a final singular configuration of a four multiple bore part produced using the present invention.
FIG. 6 is a quadrilateral grid diagram of a four-bore part produced using the present invention.
Detailed Description
The invention will be further explained with reference to the drawings.
As shown in fig. 1, the method for automatically decomposing the two-dimensional structural grid of the multi-inner-hole part based on the neural network comprises the following specific steps:
step 1, making a sample set for neural network learning two-dimensional area decomposition, specifically as follows:
1.1, selecting more than 10 multi-inner-hole parts (four-inner-hole cylindrical parts are adopted in the embodiment) which only change locally, and manufacturing training sample data for neural network learning two-dimensional area decomposition aiming at each multi-inner-hole part; each sample point of the training sample data comprises the characteristics of a frame vector, position information of a grid point where the frame vector is located, the distance between the grid point where the frame vector is located and the nearest boundary, the distance between the grid point where the frame vector is located and the nearest singular point and frame vector labeling information. The manufacturing process of the training sample data comprises the following steps:
firstly, dispersing the multi-inner-hole part into a triangulated mesh and restricting the number of vertexes of the triangulated mesh to be 2020 and 2050; then, a frame field (in the prior art, each frame is composed of four unit vectors, which can be represented by two orthogonal unit vectors, as shown in fig. 2) is generated to depict the internal structure of the multi-bore part region, and region decomposition data (in the prior art) suitable for generating the block-structured quadrilateral mesh, i.e., a singular structure composed of singular lines, is generated based on the frame field. Then, labeling the frame vector on each grid point of the triangulated mesh as follows: for the frame vectors positioned on the grid points through which the singular lines flow, marking the frame vector consistent with the flow direction of the singular lines as 1 and marking the frame vector inconsistent with the flow direction of the singular lines as 0; the frame vectors at grid points where the singular lines do not flow are all labeled 0. And finally, determining the position information of the grid point of each frame vector, the distance between the grid point of each frame vector and the nearest boundary and the distance between the grid point of each frame vector and the nearest singular point, thereby obtaining the characteristics contained in each sample point, and finally obtaining training sample data according to all the sample points.
1.2 in order to obtain a large amount of training data, carrying out grid deformation operation on each multi-inner-hole part (the grid deformation operation is specifically to move the position of an internal grid point on the basis of keeping a boundary unchanged), and making training sample data for the triangulated grid after the grid deformation operation, so that a sample set can be conveniently and quickly expanded.
1.3 put all training sample data into the sample set.
Step 2: training a neural network model through the position information of each grid point in the sample set and the frame vector marking information of each frame, which is as follows:
2.1 As shown in FIG. 3, a neural network model is designed that contains the following main structures:
the structure is that: and a global feature extraction layer. Layer 1 global feature extraction layer X1Obtaining a sample set through convolution operation; when l is more than or equal to 2, the l-th layer global feature extraction layer is obtained by the l-1-th layer feature tensor through convolution operation, and the convolution formula is Xl=conv(Fl-1),XlThe feature tensor representing the l-th global feature extraction layer, conv () representing the convolution operation, Fl-1The feature tensor representing the l-1 th feature extraction layer.
The structure II: a local feature extraction layer. Define ith sample Point F'iK nearest neighbor points (to sample point F'iThe nearest k sample points) isJ is more than or equal to 1 and less than or equal to k, and k is a value in the range of 20-30; wherein i traverses all grid points in the sample set; let the jth local feature of layer 1 beThe jth local feature of the l-1 th layer isThe feature tensor of the local feature extraction layer of layer 1When l is more than or equal to 2, the characteristic tensor of the l-th local characteristic extraction layer
Structure III: and (5) a characteristic splicing layer. Global feature X obtained in the layer splicing structurelL is not less than 1 and the local feature Y obtained in Structure 2lL is not less than 1 to obtain Fl=concat(Xl+Yl) Where concat () is a feature splicing operation.
Structure iv: combining the structure I, the structure II and the structure III into a characteristic combination layer, wherein three continuous characteristic combination layers are adopted, and a maximum pooling layer is connected behind the three characteristic combination layers to reduce parameters; then, the convolutional layer and the Dropout operation layer are sequentially connected after the max pooling layer.
2.2 obtaining a trained neural network model: inputting the multi-inner-hole part sample set into a neural network model to obtain a tensor T with the characteristic of second order, wherein the first order of the tensor T expresses the probability that the frame vector of the grid point is marked as 0, and the second order expresses the probability that the frame vector of the grid point is marked as 1; the first-order index of the tensor T is 0, and the second-order index of the tensor T is 1; then, randomly selecting 80% of data from a multi-inner-hole part sample set as a training set, using 20% of the data as a testing set, setting a training period to be 200, calculating loss amount loss of tensor T relative to labeled information in the sample set in each training, and optimizing neural network parameters through a back propagation algorithm to reduce the loss; and obtaining the trained neural network model after the training period is reached. Wherein, the calculation process of loss is as follows:
loss=0.5*loss0+0.5*loss1,
therein, loss0Through cross entropy loss function calculation, loss1Calculating by a Dice loss function;
loss0=labels*-log(z)+(1-labels)*-log(1-z),
wherein, z is Sigmoid (T), that is, the value of z is the result of using Sigmoid activation function for tensor T, labels is the frame vector labeling information of the sample set, and sum is the summation of each element in the tensor.
And step 3: carrying out neural network prediction on prediction sample data of a multi-inner-hole part of a structural grid to be divided, and specifically comprising the following steps:
3.1 generating prediction sample data without frame vector marking information for the multi-inner-hole part of the structural grid to be divided, which is specifically as follows: dispersing the multi-inner-hole parts of the structural mesh to be divided into triangulated meshes and restricting the number of the vertexes of the triangular meshes to be 2020 and 2050; then, generating a frame marking field (adopting the existing mature technology) for describing the internal structure of the multi-inner-hole part area; and finally, obtaining prediction sample data, wherein each sample point of the prediction sample data comprises the characteristics of a frame vector, position information of a grid point where the frame vector is located, the distance between the grid point where the frame vector is located and the nearest boundary, and the distance between the grid point where the frame vector is located and the nearest singular point.
And 3.2, inputting the prediction sample data into the trained neural network model to obtain a second-order probability vector containing the frame vector labeling information probability at each grid point in the prediction sample data, wherein the index of the element with the maximum probability in the second-order probability vector is the frame vector labeling information predicted by the neural network. The visualization result of all the frame vector labeling information generated by the embodiment is shown in fig. 4.
And 4, step 4: processing the prediction sample data by using the frame vector labeling information predicted by the neural network to obtain a final region decomposition result, which is specifically as follows:
4.1 determining the position of the singular point and the initial flow direction of the singular line. Defining a vector field u (x, y), wherein (x, y) is the two-dimensional coordinates of a grid point; triangulated mesh point (x) of multi-bore part for given structural mesh to be dividedp,yp) If u (x)p,yp) If the grid point is 0, the grid point is a singular point; and then calculating the intersection point of the ray extending from the singular point and the grid edge of the grid where the singular point is located according to the price of the singular point, and taking the vector of the singular point pointing to the intersection point as the initial flow direction vector of the singular line.
4.2 find the discrete points forming the singular line in the triangularized grid of the multi-inner-hole part of the structural grid to be divided, which is as follows:
4.2.1 the last discrete point p of the singular linei1-1Pointing to the current discrete point pi1Vector ofRemoving discrete points p1The current flow direction vector is set to be out of the initial flow direction vector of the singular line, and the other discrete points pi1Current flow direction vector ofI.e. discrete points pi1Frame vector of (2); wherein when i1 is 1, the point p is discrete0To set an imaginary point, a discrete point p1I.e. singular points, discrete points p0To satisfy the following conditions: discrete point p0Pointing to a discrete point p1The vector of (a) is a unit vector collinear with the initial flow direction vector of the singular line; p is to bei1Dividing m nearest neighbor points into n result point sets with frame vectors marked as 1 according to frame vector marking information predicted by neural network And m-n sets of non-result points with frame vectors labeled 0 m is 15; then, P is obtainedi1Vector set of upper frameEach element ofJ1 is more than or equal to 1 and less than or equal to nThe minimum angle between and the element andsum of minimum angles therebetweenP′i1Vector set of upper frameEach element ofJ2 is more than or equal to 1 and less than or equal to nThe minimum angle between and the element andsum of minimum angles therebetweenThen, obtain1 < j1 < ni1And an1 < j2 < n′i1(ii) a If thetai1>θ′i1And thetai1>35 deg., then theta′i1The element in the corresponding set of non-result points as the next discrete point of the singular line willAs the current flow vector for the next discrete point; otherwise select θi1The element in the corresponding result point set is taken as the next discrete point of the singular lineAs the current flow vector for the next discrete point.
4.2.2 repeat step 4.2.1 until all the discrete points making up the whole singular line are determined, thus obtaining the whole singular line.
4.3 repeating steps 4.1 and 4.2 to obtain all singular point positions and all singular lines.
And 4.4, combining repeated singular lines in the multi-inner-hole part of the structural grid to be divided, and smoothing all the singular lines after the combination to obtain a singular structure, as shown in fig. 5. Singular line S0And singular line S1The criterion for determining whether to repeat is as follows: get singular line S0Divided by 2 to get the discrete point q corresponding to the position after roundingi2(i.e., setting the discrete point q)i2As a singular line S0The i2 point above), q is extracted from the discrete point set of all singular linesi2If there are discrete points Q 'in Q, the set of k' nearest neighbor points Q, k 'is 15'j3Q 'of'j3The singular line S1Is a singular line S0End point of, singular line S1Is a singular line S0A starting point of (2), andthen will S0And S1Is a repeating singular line; wherein, q'j3-1As a singular line S1Upper discrete point q'j3The previous discrete point of (a) is,is qi2The normal vector of the grid in which it is located,is q'j3The normal vector of the grid in which it is located.
And 5: and (4) generating a quadrilateral grid of the multi-inner-hole part by using a mapping method on the basis of the singular structure generated in the step (4), as shown in fig. 6.
Claims (2)
1. The neural network-based two-dimensional structure grid automatic decomposition method for the multi-inner-hole part is characterized by comprising the following steps of: the method comprises the following specific steps:
step 1, making a sample set for neural network learning two-dimensional area decomposition, specifically as follows:
1.1, selecting more than 10 multi-inner-hole parts which only change locally, and manufacturing training sample data for neural network learning two-dimensional area decomposition aiming at each multi-inner-hole part; each sample point of the training sample data comprises the characteristics of a frame vector, position information of a grid point where the frame vector is located, the distance between the grid point where the frame vector is located and the nearest boundary, the distance between the grid point where the frame vector is located and the nearest singular point and frame vector labeling information; the manufacturing process of the training sample data comprises the following steps:
firstly, dispersing the multi-inner-hole part into a triangulated mesh and restricting the number of vertexes of the triangulated mesh to be 2020 and 2050; then, generating a frame field for depicting the internal structure of the multi-inner-hole part region, and generating region decomposition data suitable for generating the block structured quadrilateral grids based on the frame field, namely generating a singular structure consisting of singular lines; then, the following labeling information is made for the frame vector positioned on each grid point of the triangulated mesh: for the frame vectors positioned on the grid points through which the singular lines flow, marking the frame vector consistent with the flow direction of the singular lines as 1 and marking the frame vector inconsistent with the flow direction of the singular lines as 0; marking all the frame vectors on the grid points through which the singular lines do not flow as 0; finally, determining the position information of the grid point of each frame vector, the distance between the grid point of each frame vector and the nearest boundary and the distance between the grid point of each frame vector and the nearest singular point, thereby obtaining the characteristics contained in each sample point, and finally obtaining training sample data according to all the sample points;
1.2, carrying out grid deformation operation on the triangular grid of each multi-inner-hole part, and making training sample data on the triangular grid subjected to the grid deformation operation;
1.3, putting all training sample data into a sample set;
step 2: training a neural network model through the position information of each grid point in the sample set and the frame vector marking information of each frame, which is as follows:
inputting the multi-inner-hole part sample set into a neural network model to obtain a tensor T with the characteristic of second order, wherein the first order of the tensor T expresses the probability that the frame vector of the grid point is marked as 0, and the second order expresses the probability that the frame vector of the grid point is marked as 1; the first-order index of the tensor T is 0, and the second-order index of the tensor T is 1; then, randomly selecting 80% of data from a multi-inner-hole part sample set as a training set, using 20% of the data as a testing set, setting a training period to be 200, calculating loss amount loss of tensor T relative to labeled information in the sample set in each training, and optimizing neural network parameters through a back propagation algorithm to reduce the loss; obtaining a trained neural network model after the training period is reached; wherein, the calculation process of loss is as follows:
loss=0.5*loss0+0.5*loss1,
therein, loss0Through cross entropy loss function calculation, loss1Calculating by a Dice loss function;
loss0=labels*-log(z)+(1-labels)*-log(1-z),
wherein, z is Sigmoid (T), that is, the value of z is the result of using Sigmoid to activate the function for tensor T, labels is the frame vector labeling information of the sample set, and sum is the summation of each element in the tensor;
and step 3: carrying out neural network prediction on prediction sample data of a multi-inner-hole part of a structural grid to be divided, and specifically comprising the following steps:
3.1 generating prediction sample data without frame vector marking information for the multi-inner-hole part of the structural grid to be divided, which is specifically as follows: dispersing the multi-inner-hole parts of the structural mesh to be divided into triangulated meshes and restricting the number of the vertexes of the triangular meshes to be 2020 and 2050; then, generating a frame field for depicting the internal structure of the multi-inner-hole part area; finally, obtaining prediction sample data, wherein each sample point of the prediction sample data comprises the characteristics of a frame vector, position information of a grid point where the frame vector is located, the distance between the grid point where the frame vector is located and the nearest boundary, and the distance between the grid point where the frame vector is located and the nearest singular point;
3.2, inputting the prediction sample data into the trained neural network model to obtain a second-order probability vector containing the frame vector labeling information probability at each grid point in the prediction sample data, wherein the index of an element with the maximum probability in the second-order probability vector is the frame vector labeling information predicted by the neural network;
and 4, step 4: processing the prediction sample data by using the frame vector labeling information predicted by the neural network to obtain final region decomposition data, which is specifically as follows:
4.1, determining the position of a singular point and the initial flow direction of a singular line; defining a vector field u (x, y), wherein (x, y) is the two-dimensional coordinates of a grid point; triangulated mesh point (x) of multi-bore part for given structural mesh to be dividedp,yp) If u (x)p,yp) If the grid point is 0, the grid point is a singular point; then, calculating the intersection point of the ray extending from the singular point and the grid edge of the grid where the singular point is located according to the price of the singular point, and taking the vector of the singular point pointing to the intersection point as the initial flow direction vector of the singular line;
4.2 find the discrete points forming the singular line in the triangularized grid of the multi-inner-hole part of the structural grid to be divided, which is as follows:
4.2.1 the last discrete point p of the singular linei1-1Pointing to the current discrete point pi1Vector ofRemoving discrete points p1The current flow direction vector is set to be out of the initial flow direction vector of the singular line, and the other discrete points pi1Current flow direction vector ofI.e. discrete points pi1Frame vector of (2); wherein when i1 is 1, the point p is discrete0In order to set a virtual point of the image,discrete point p1I.e. singular points, discrete points p0To satisfy the following conditions: discrete point p0Pointing to a discrete point p1The vector of (a) is a unit vector collinear with the initial flow direction vector of the singular line; p is to bei1Dividing m nearest neighbor points into n result point sets with frame vectors marked as 1 according to frame vector marking information predicted by neural network And m-n sets of non-result points with frame vectors labeled 0 Then, P is obtainedi1Vector set of upper frameEach element ofAndthe minimum angle between and the element andsum of minimum angles therebetweenP′i1Vector set of upper frameEach element ofAndthe minimum angle between and the element andsum of minimum angles therebetweenThen, obtainMinimum value of thetai1And anMinimum value of (1)'i1(ii) a If thetai1>θ′i1And thetai1> 35 deg. then will be theta'i1The element in the corresponding set of non-result points as the next discrete point of the singular line willAs the current flow vector for the next discrete point; otherwise select θi1The element in the corresponding result point set is taken as the next discrete point of the singular lineAs the current flow vector for the next discrete point;
4.2.2 repeating the step 4.2.1 until all discrete points forming the whole singular line are determined, thereby obtaining the whole singular line;
4.3 repeating the steps 4.1 and 4.2 to obtain all singular point positions and all singular lines;
4.4 merging repeated singular lines in the multi-inner-hole part of the structural grid to be divided, and merging all the singular linesSmoothing the singular line to obtain a singular structure; singular line S0And singular line S1The criterion for determining whether to repeat is as follows: get singular line S0Divided by 2 to get the discrete point q corresponding to the position after roundingi2Extracting q from the set of discrete points of all singular linesi2If there are discrete points Q 'in Q, the set of k' nearest neighbor points Q, k 'is 15'j3Q 'of'j3The singular line S1Is a singular line S0End point of, singular line S1Is a singular line S0A starting point of (2), andthen will S0And S1Is a repeating singular line; wherein, q'j3-1As a singular line S1Upper discrete point q'j3The previous discrete point of (a) is,is qi2The normal vector of the grid in which it is located,is q'j3The normal vector of the grid;
and 5: and (4) generating a quadrilateral mesh of the multi-inner-hole part of the structural mesh to be divided by using a mapping method on the basis of the singular structure generated in the step (4).
2. The neural network-based two-dimensional structural grid automatic decomposition method of the multi-inner-hole part according to claim 1, characterized in that: the neural network model comprises the following main structural designs:
the structure is that: a global feature extraction layer; layer 1 global feature extraction layer X1Obtaining a sample set through convolution operation; when l is more than or equal to 2, the l-th layer global feature extraction layer is obtained by the l-1-th layer feature tensor through convolution operation, and the convolution formula is Xl=conv(Fl -1),XlFeatures representing the ith global feature extraction layerTensor, conv () denotes the convolution operation, Fl-1The characteristic tensor represents the characteristic tensor of the l-1 layer characteristic extraction layer;
the structure II: a local feature extraction layer; define ith sample Point F'iK nearest neighbor points (to sample point F'iThe nearest k sample points) isk is 20-30; wherein i traverses all grid points in the sample set; let the jth local feature of layer 1 beThe jth local feature of the l-1 th layer isThe feature tensor Y of the local feature extraction layer of the layer 11=∑1≤j≤kconv(F′i-F′j i)1When l is more than or equal to 2, the characteristic tensor Y of the l-th local characteristic extraction layerl=∑1≤j≤kconv(F′i-F′j i)l-1;
Structure III: a characteristic splicing layer; global feature X obtained in the layer splicing structurelL is not less than 1 and the local feature Y obtained in Structure 2lL is not less than 1 to obtain Fl=concat(Xl+Yl) Wherein concat () is a feature splicing operation;
structure iv: combining the structure I, the structure II and the structure III into a characteristic combination layer, wherein three continuous characteristic combination layers are adopted, and a maximum pooling layer is connected behind the three characteristic combination layers to reduce parameters; then, the convolutional layer and the Dropout operation layer are sequentially connected after the max pooling layer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011145501.0A CN112257202A (en) | 2020-10-23 | 2020-10-23 | Neural network-based two-dimensional structure grid automatic decomposition method for multi-inner-hole part |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011145501.0A CN112257202A (en) | 2020-10-23 | 2020-10-23 | Neural network-based two-dimensional structure grid automatic decomposition method for multi-inner-hole part |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112257202A true CN112257202A (en) | 2021-01-22 |
Family
ID=74264825
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011145501.0A Pending CN112257202A (en) | 2020-10-23 | 2020-10-23 | Neural network-based two-dimensional structure grid automatic decomposition method for multi-inner-hole part |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112257202A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114462320A (en) * | 2022-04-08 | 2022-05-10 | 中国空气动力研究与发展中心计算空气动力研究所 | Structural grid generating method and device based on neural network |
CN114972687A (en) * | 2022-07-21 | 2022-08-30 | 中汽研(天津)汽车工程研究院有限公司 | Mesh adjusting method based on elimination of triangular mesh pairs |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107818302A (en) * | 2017-10-20 | 2018-03-20 | 中国科学院光电技术研究所 | Non-rigid multi-scale object detection method based on convolutional neural network |
CN108717493A (en) * | 2018-05-21 | 2018-10-30 | 杭州电子科技大学 | A kind of 2 dimensional region automatic classifying method that structure-oriented rectangular mesh generates |
CN108846895A (en) * | 2018-06-05 | 2018-11-20 | 浙江大学 | A kind of mixing quadrangle method based on this Meier complex of Morse-and parametrization |
-
2020
- 2020-10-23 CN CN202011145501.0A patent/CN112257202A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107818302A (en) * | 2017-10-20 | 2018-03-20 | 中国科学院光电技术研究所 | Non-rigid multi-scale object detection method based on convolutional neural network |
CN108717493A (en) * | 2018-05-21 | 2018-10-30 | 杭州电子科技大学 | A kind of 2 dimensional region automatic classifying method that structure-oriented rectangular mesh generates |
CN108846895A (en) * | 2018-06-05 | 2018-11-20 | 浙江大学 | A kind of mixing quadrangle method based on this Meier complex of Morse-and parametrization |
Non-Patent Citations (3)
Title |
---|
任铭 等: "基于八叉树与RBF神经网络的曲面三角网格生成", 中原工学院学报, no. 01, 25 February 2011 (2011-02-25) * |
何寿平 等: "基于矢量场的二维区域全自动四边网格生成", 计算机辅助设计与图形学学报, no. 05, 30 December 2019 (2019-12-30) * |
徐岗 等: "边界简化与多目标优化相结合的高质量四边形网格生成", 中国图象图形学报, no. 01, 16 January 2018 (2018-01-16) * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114462320A (en) * | 2022-04-08 | 2022-05-10 | 中国空气动力研究与发展中心计算空气动力研究所 | Structural grid generating method and device based on neural network |
CN114462320B (en) * | 2022-04-08 | 2022-07-05 | 中国空气动力研究与发展中心计算空气动力研究所 | Structural grid generating method and device based on neural network |
CN114972687A (en) * | 2022-07-21 | 2022-08-30 | 中汽研(天津)汽车工程研究院有限公司 | Mesh adjusting method based on elimination of triangular mesh pairs |
CN114972687B (en) * | 2022-07-21 | 2022-11-15 | 中汽研(天津)汽车工程研究院有限公司 | Mesh adjusting method based on elimination of triangular mesh pairs |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Obayashi et al. | Multi-objective design exploration for aerodynamic configurations | |
CN112257597B (en) | Semantic segmentation method for point cloud data | |
CN111696345A (en) | Intelligent coupled large-scale data flow width learning rapid prediction algorithm based on network community detection and GCN | |
CN110705029B (en) | Flow field prediction method of oscillating flapping wing energy acquisition system based on transfer learning | |
CN112257202A (en) | Neural network-based two-dimensional structure grid automatic decomposition method for multi-inner-hole part | |
CN114091628B (en) | Three-dimensional point cloud up-sampling method and system based on double branch network | |
CN112733273A (en) | Method for determining Bayesian network parameters based on genetic algorithm and maximum likelihood estimation | |
CN114996658B (en) | Projection-based hypersonic aircraft aerodynamic heat prediction method | |
CN108230452A (en) | A kind of model filling-up hole method based on textures synthesis | |
CN111191785A (en) | Structure searching method based on expanded search space | |
CN112182794B (en) | Geometric model modeling method after topological optimization based on spline curve | |
CN116186864B (en) | Deep foundation pit model rapid modeling method and system based on BIM technology | |
CN115620046A (en) | Multi-target neural architecture searching method based on semi-supervised performance predictor | |
CN114494284B (en) | Scene analysis model and method based on explicit supervision area relation | |
CN115578574A (en) | Three-dimensional point cloud completion method based on deep learning and topology perception | |
CN110349265B (en) | Tetrahedral topological mesh generation method and electronic equipment | |
CN115170793A (en) | Small sample image segmentation self-calibration method for industrial product quality inspection | |
Wei et al. | DiffAirfoil: An Efficient Novel Airfoil Sampler Based on Latent Space Diffusion Model for Aerodynamic Shape Optimization | |
Rios et al. | Back to meshes: Optimal simulation-ready mesh prototypes for autoencoder-based 3D car point clouds | |
CN113191486A (en) | Graph data and parameter data mixed partitioning method based on parameter server architecture | |
CN111882543A (en) | Cigarette filter stick counting method based on AA R2Unet and HMM | |
CN112101086A (en) | Face clustering method based on link prediction | |
Jing et al. | A lightweight Transformer‐based neural network for large‐scale masonry arch bridge point cloud segmentation | |
CN115546421B (en) | Point-line double-domain mutual enhancement building geometric contour line reconstruction method | |
CN112381215B (en) | Self-adaptive search space generation method and device oriented to automatic machine learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |