A method for automatically identifying structural boundaries and arranging them in an orderly manner
Through the Python language, the tire structure boundaries are automatically recognized and arranged in an orderly manner, which solves the problem of cumbersome and errors in automatic extraction of contour changes in tire design, and achieves efficient and accurate contour analysis.
Patent Information
- Application Number
- CN202210704589.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-06-21
AI Technical Summary
In the prior art, in tire design, the automatic extraction profile change process is complicated and there are measurement errors, so it is impossible to intuitively quantify the contour changes before and after inflation.
The python language is used to automatically recognize structural boundaries and arrange them in an orderly manner. By reading the finite element analysis file, calculating the adjacent angle of nodes, identifying the contour boundary nodes, and generating a dxf file.
It improves data processing efficiency and accuracy, can automatically extract the contours of any complex structure, reduce human errors, and realize quantifiable contour analysis.
Smart Images

Figure CN115048723B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of tire design, and particularly relates to a method for automatically identifying structural boundaries and arranging them in an orderly manner. Background Art
[0002] The finite element analysis of the force on an object is a relatively common method in the research and development process of engineering industries and manufacturing. By applying a force to the object to cause deformation and obtaining the contour diagrams of the object before and after deformation, the contour changes of the object before and after deformation can be analyzed more intuitively. And automatically extracting the structural contour of the object will save more time and improve efficiency.
[0003] Taking a tire as an example, the change of the tire cross-section contour before and after inflation has important guiding significance for tire design. Therefore, in the initial stage of tire structure design, a finite element simulation of the two-dimensional inflation process of the tire is carried out to analyze the change of the two-dimensional contour before and after inflation. Using commercial software to compare the contour changes before and after is not intuitive. Therefore, to visually and quantitatively analyze the contour changes before and after, it is necessary to measure the coordinates of each node before and after the change, which not only has a large workload, is cumbersome to operate, but also has measurement errors. Summary of the Invention
[0004] The purpose of the present invention is to solve the above problems existing in the prior art, and proposes a method for automatically identifying structural boundaries and arranging them in an orderly manner. This method uses the Python language to automatically extract the structural contour, improving the data processing efficiency and accuracy.
[0005] The technical solution of the present invention is as follows:
[0006] A method for automatically identifying structural boundaries and arranging them in an orderly manner, comprising the following steps:
[0007] (1) Read the odb file, extract all elements and nodes, and establish dictionaries ND, ED, and CD;
[0008] (2) Read any node number in the dictionary ND, find the adjacent nodes to this node by reading the dictionary ED, read the coordinates of these adjacent nodes in the dictionary CD, calculate the sum of all the included angles with this node, and calculate the sum of the angles of all the elements around each node accordingly;
[0009] (3) When the sum of the angles of the node calculated in step (2) is less than 360°, this node is a contour boundary node, and all the boundary nodes are obtained accordingly, and a set NT1 is established;
[0010] (4) Sequentially determine the first node, the second node and the remaining boundary nodes in the set NT1, and sort and connect all the boundary nodes into a contour curve.
[0011] Further, in step (1), the odb file completed by abaqus calculation is read using the python language, the numbers of all elements and nodes of the structure are read, and three dictionaries ND, ED, and CD are established.
[0012] Further, the key of the dictionary ND is the number of all nodes in the structure, and the value of each key is the number of the elements adjacent to this node; the key of the dictionary ED is the number of all elements in the structure, and the value of each key is the number of the nodes shared by this element; the key of the dictionary CD is the number of all nodes in the structure, and the value of each key is the coordinate of the node.
[0013] Further, in step (2), there are 1, 2, 3, 4 or more elements adjacent to each node in the structure. Read any node number in the dictionary ND, find all the adjacent nodes, calculate the included angle between two vectors according to the coordinates of each node, and sum all the included angles adjacent to this node; calculate the sum of the angles of all adjacent nodes in the same element around each node according to the above method.
[0014] Further, in step (3), if the calculated sum of the angles is less than 360°, this node is the contour boundary node. Loop accordingly until the numbers of all contour boundary nodes are found, establish a set NT1, and at the same time output the numbers of the elements where the boundary nodes are located, and establish a set ET1.
[0015] Further, in step (4), use the python language to select the first node in the set NT1, find the boundary elements shared with this node, and judge the number of shared boundary elements. If the number is equal to 2, this node is used as the first node. If the number is not equal to 2, select the second node in the set NT1, and loop until the number equal to 2 is found, which is the first node;
[0016] Judge the boundary elements shared with the first node, find the boundary nodes adjacent to the first node in the element, and select the boundary node in the counterclockwise direction from the first node as the second node;
[0017] Judge the boundary elements shared with the second node and the boundary nodes included in the element except the shared nodes and the previously existing nodes, judge the number of nodes, and find the same element to which these nodes belong according to whether the number of nodes is greater than or equal to 1. Sort counterclockwise starting from the shared node, and the node adjacent to the shared node in the counterclockwise direction is the next node. Loop accordingly to judge all the boundary nodes.
[0018] Further, in step (4), using the Python language, select the first node in set NT1 with node number N0, find the boundary elements shared with N0, and determine the number n of shared boundary elements. If n equals 2, then node N0 is used as the first node N1. If n does not equal 2, then select the second node in set NT1 with node number N0, and loop according to the above method until a node with n equal to 2 is found as the first node N1;
[0019] Read the boundary elements shared by dictionary ND and N1, read the nodes adjacent to N1 in the boundary elements of dictionary ED, determine whether N1 and these two boundary nodes are in the counterclockwise direction, and select the boundary node in the counterclockwise direction as the second node N2;
[0020] Determine the boundary elements shared with N2 and the boundary nodes in the elements excluding the shared nodes and the previously existing node N1. Determine the number m of nodes. If m equals 1, then this node is N3. If m does not equal 1, find the element shared by the m nodes, sort the nodes in the counterclockwise direction, and define the node adjacent to N2 in the counterclockwise direction as N3. In the next step, find the number m of boundary nodes other than the shared nodes and the previously existing nodes in the element adjacent to N3, determine the value of m, and loop in this way. Sort the remaining boundary nodes in sequence according to the above method.
[0021] Further, in step (4), connect the sorted boundary node numbers in sequence to draw a DXF file and output it.
[0022] Advantages of the present invention:
[0023] (1) The method provided by the present invention mainly uses the computer programming language Python to extract the two-dimensional structure contour of the finite element pre- and post-processing, automatically extract nodes and form a closed contour to directly generate a DXF file. According to the contour curves before and after deformation, quantitative parameter analysis can be performed on the deformation of the structure before and after deformation; moreover, by automatically reading the finite element structure file to automatically generate a two-dimensional contour curve, the data extraction time is greatly reduced, and the errors caused by manual data extraction are reduced.
[0024] (2) Compared with the existing extraction methods, the method of the present invention has a high degree of automation, is not limited to the case where the boundary nodes are shared by three or fewer elements, is suitable for extracting the boundary contours of any complex structure mesh, and has high accuracy. Description of the Drawings
[0025] Figure 1 It is a schematic flowchart of the method provided by the present invention;
[0026] Figure 2 It is a mesh division diagram of the geometric structure provided by the present invention;
[0027] Figure 3 The contour connection diagram provided by the present invention for automatic extraction. Specific embodiments
[0028] To further understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0029] As Figure 1 shown, the present invention provides a method for automatically identifying the structural boundary and arranging it in an orderly manner. The steps are as follows:
[0030] The odb file completed by finite element calculation contains the element and node information of the structure. Use a python program to read all the nodes and the element information of the shared nodes, and establish a dictionary ND, a dictionary ED, and a dictionary CD. As Figure 2 shown, the dictionary ND is
[0031] {1:
[108] ,8:[105,106],2:[108,109,112],3:
[112] ,4:[107,106,111,110],5:[107,108,109,110],6:[108,107,104],7:[106,107,104,105],9:[101,102,104],10:[103,105],11:[102,103,105,104],12:[106,111],13:[111,110,109,112],14:
[103] ,15:[102,103],16:[101,102],17:
[101] }
[0032] The dictionary ED is
[0033] {101:[9,16,17],102:[9,11,15,16],103:[11,10,14,15],104:[6,7,11,9],105:[11,7,8,10],106:[4,12,8,7],107:[5,4,7,6],108:[2,5,6,1],109:[2,13,5],110:[5,13,4],111:[4,13,12],112:[2,3,13]}
[0034] The dictionary CD is
[0035] {1: [x1, y1], 8: [x8, y8], 2: [x2, y2], 3: [x3, y3], 4: [x4, y4], 5: [x5, y5], 6: [x6, y6], 7: [x7, y7], 9: [x9, y9], 10: [x10, y10], 11: [x11, y11], 12: [x12, y12], 13: [x13, y13], 14: [x14, y14], 15: [x15, y15], 16: [x16, y16], 17: [x17, y17]}
[0036] Use the Python program to read the node numbers and adjacent element numbers in the dictionary ND, read the nodes adjacent to this node from the dictionary ED according to the element numbers, read the coordinate values of the nodes in the dictionary CD, calculate the included angles of adjacent node vectors, and sum the included angles of vectors adjacent to each node. For example Figure 2 As shown, taking node 11 as an example, read the 4 elements around node 11 in the dictionary ND, element 102, element 103, element 105, and element 104. Read the nodes adjacent to node 11 (A) in element 102 in the dictionary ED as node 9 (C) and node 15 (D). Read the coordinates of node 11, node 9, and node 15 in the dictionary CD, calculate the included angles between vector AC and vector AD, and similarly calculate the included angles between vector AB and vector AC, between vector AD and vector AE, and between vector AE and vector AB. The sum of the four included angles is 360°. Therefore, the sum of the angles of non-boundary nodes is all 360°. The sum of the angles of the elements adjacent to the boundary nodes is less than 360°. For example Figure 2 Node 13 in is a boundary node. According to this condition, obtain all the boundary node sets NT1, that is, (1, 8, 2, 3, 6, 9, 10, 12, 13, 14, 15, 16, 17). Obtain the boundary element set ET1 where the boundary nodes are located according to the boundary nodes, that is, (108, 112, 104, 106, 105, 101, 102, 111, 110, 109, 103).
[0037] After obtaining the boundary node numbers, sort them. Select the first node number N0 in the set NT1, that is, node 1. Read the number n of elements shared with node 1 (that is, element 108) in ET1 as 1, and n is not equal to 2. Therefore, select the second node number N0 in the set NT1, that is, node 8. Read the number of elements shared with node 8 (that is, elements 105 and 106) in ET1 as 2, then node 8 is used as the first node N1 in the sorting.
[0038] Next, find the second node N2. It is determined that the boundary elements shared by N1 (i.e., node 8) in ET1 are element 105 and element 106. The boundary nodes adjacent to N1 in element 105 and element 106 are 10 and 12. Node 8 and node 10 are arranged counterclockwise, so node 10 is selected as the second node N2.
[0039] It is determined that the boundary elements shared by N2 (i.e., node 10) in ET1 are element 103 and 105. The boundary nodes in element 103 and 105 except the shared nodes are node 8, 14, and 15. Since node 8 already exists, it is deleted. The remaining nodes are node 14 and node 15, that is, m equals 2. It is determined that node 14 and node 15 belong to element 103. Sorting counterclockwise with the shared node 10 as the starting point gives node 10, node 14, node 15, node 11. The node adjacent to node 10 is node 14, so node 14 is the next node, that is, node N3. The boundary element shared by N3 (i.e., node 14) in ET1 is element 103. The only boundary node in element 103 except the shared node 14 and the previously existing nodes 10 and 11 is node 15. m equals 1, then node 15 is the next node N4. According to the above loop method, the remaining nodes are sorted in turn. It is obtained that N5 is node 16, N6 is node 17, N7 is node 9, N8 is node 6, N9 is node 1, N10 is node 2, N11 is node 3, N12 is node 13, N13 is node 12, and the sorting of N1 - N13 is completed.
[0040] After the sorting is completed, connect the sorted points into a curve and output it in dxf format, and the outline as shown in Figure 3 the bold part is obtained.
[0041] The above method for automatically identifying the structural boundary and arranging it in an orderly manner provided by the present invention mainly automatically identifies the boundary elements and node numbers through the python language, automatically sorts them, and writes the extracted contour information into a dxf file to more intuitively compare the deformation diagrams of the structures.
[0042] The above description is only the preferred embodiment of the present invention and is not a limitation of the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, modifications, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for extracting a tire cross-sectional profile, characterized in that, It includes the following steps: (1) Read the odb file, read the numbers of all elements and nodes of the structure, and establish dictionaries ND, ED, and CD; the key of the dictionary ND is the number of all nodes in the structure, and the value of each key is the number of the element where this node is located; the key of the dictionary ED is the number of all elements in the structure, and the value of each key is the number of the nodes of this element; the key of the dictionary CD is the number of all nodes in the structure, and the value of each key is the coordinate of the node. (2) Read any node number in the dictionary ND, find the adjacent nodes in the element where this node is located by reading the dictionary ED, read the coordinates of these nodes in the dictionary CD, calculate the included angles of all adjacent nodes in the element where this node is located, and calculate the angle sum of each element where the node is located accordingly. (3) When the angle sum of the nodes calculated in step (2) is less than 360°, this node is a contour boundary node, and all boundary nodes are obtained accordingly, and a set NT1 is established. (4) Select the nodes that meet the condition that the number of shared boundary elements is 2 as the first node, sequentially determine the second node and the remaining boundary nodes in the set NT1, and sort and connect all boundary nodes into the contour curve of the tire cross-section.
2. The method according to claim 1, wherein In step (1), use the python language to read the odb file completed by abaqus calculation, read the numbers of all elements and nodes of the structure, and establish three dictionaries ND, ED, and CD.
3. The method according to claim 1, wherein In step (2), each element where a node in the structure is located has 1, 2, 3, 4 or more. Read any node number in the dictionary ND, find all adjacent nodes in the element where it is located, calculate the included angle between two vectors according to the coordinates of each node, and sum all the included angles; calculate the angle sum of each element where the node is located according to the above method.
4. The method according to claim 1, wherein In step (3), if the calculated angle sum is less than 360°, this node is the contour boundary node, and loop until the numbers of all contour boundary nodes are found, establish a set NT1, and at the same time output the numbers of the elements where the boundary nodes are located, and establish a set ET1.
5. The method according to claim 1, wherein In step (4), use the python language to select the first node in the set NT1, find the shared boundary elements with this node, judge the number of shared boundary elements. If the number is equal to 2, this node is used as the first node. If the number is not equal to 2, select the second node in the set NT1, and loop until the number equal to 2 is found, which is the first node. Judge the shared boundary elements with the first node, find the boundary nodes adjacent to the first node in the element, and select the boundary node in the counterclockwise direction from the first node as the second node. Judge the shared boundary elements with the second node and the boundary nodes included in the element except the shared nodes and the previously existing nodes, judge the number of nodes, find the same element to which these nodes belong according to whether the number of nodes is greater than or equal to 1, sort counterclockwise with the shared node as the starting point, and the node adjacent to the shared node in the counterclockwise direction is the next node, and loop to judge all boundary nodes accordingly.
6. The method according to claim 5, wherein In step (4), using the Python language, select the first node in set NT1 with the node number N0, find the boundary elements shared with N0, and determine the number n of shared boundary elements. If n is equal to 2, then node N0 is used as the first node N1. If n is not equal to 2, then select the second node in set NT1 with the node number N0, and loop according to the above method until a node with n equal to 2 is found as the first node N1; Read the boundary elements shared by dictionary ND and N1, read the nodes adjacent to N1 in the boundary elements in dictionary ED, determine whether N1 and these two boundary nodes are in the counterclockwise direction, and select the boundary node in the counterclockwise direction as the second node N2; Judge the boundary elements shared with N2 and the boundary nodes in the elements except the shared nodes and the previously existing node N1. Determine the number m of nodes. If m is equal to 1, then this node is N3. If m is not equal to 1, find the element shared by the m nodes, sort the nodes in the counterclockwise direction, and define the node adjacent to N2 in the counterclockwise direction as N3. Next, find the number m of boundary nodes in the element adjacent to N3 except the shared nodes and the previously existing nodes, judge the value of m, and loop in this way. Sort the remaining boundary nodes in sequence according to the above method.
7. The method according to claim 1, characterized in that, In step (4), connect the sorted boundary node numbers in sequence to draw a dxf file and output it.
Citation Information
Patent Citations
Method for extracting structure outlines orderly
CN103268384A
Coupling method based on ABAQUS finite element and boundary element
CN111159951A