A vectorization processing and attribute feature semantic reconstruction-based automatic conversion method for foundation pit engineering grid files
By employing vectorization and semantic reconstruction of attribute features, the low efficiency of the conversion interface between Midas GTS NX and FLAC3D was resolved, enabling efficient and automated conversion of foundation pit engineering mesh files. This improved processing speed and memory utilization efficiency, while ensuring the accuracy of element types and material properties.
Patent Information
- Application Number
- CN202611156321.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-24
AI Technical Summary
In existing technologies for numerical simulation of geotechnical engineering, the conversion interface between Midas GTS NX and FLAC3D is inefficient, has long mesh file processing time, large memory consumption, and cannot effectively handle structural elements in complex foundation pit engineering, is prone to errors, and cannot retain grouping information.
A method based on vectorization and semantic reconstruction of attribute features is adopted. Through NumPy arrays and matrix storage, the mesh files of Midas GTS NX are automatically identified and converted to generate FLAC3D structural element modeling command flow, including automatic identification and reconstruction of node information, element type and material properties.
It improves the efficiency and accuracy of mesh file conversion, can process massive amounts of mesh data, automatically identify unit project attributes, generate a complete FLAC3D structural unit modeling command flow, and reduces processing time and memory usage.
Smart Images

Figure CN123159263A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an automated conversion method for foundation pit engineering mesh files based on vectorization processing and semantic reconstruction of attribute features, belonging to the field of underground engineering numerical simulation technology. Background Technology
[0002] In the field of numerical simulation for geotechnical engineering, Midas GTS NX and FLAC3D are two widely used finite element analysis software programs. Midas GTS NX excels in pre-processing modeling and conventional geotechnical analysis, while FLAC3D has significant advantages in handling large deformations, nonlinear problems, and pile-soil interactions. Due to the relatively weak pre-processing capabilities of FLAC3D, modeling is typically performed in Midas GTS NX, followed by pre-processing and conversion via an interface. The existing technology suffers from the following problems: (1) As underground engineering becomes more complex, millions of grid cells are usually required in the pre-processing modeling. Existing conversion interface software uses traditional line-by-line reading and string processing methods, which are extremely inefficient, consume a lot of memory, and take a long time to process or even fail.
[0003] (2) For deep foundation pit engineering, in addition to the cumbersome process of creating mesh files, there are a large number of structural units such as concrete supports, steel supports, prestressed anchor cables and grid piles in the foundation pit. Existing technical solutions often use the method of extracting coordinates to create structural units in FLAC3D using command flow. Determining the coordinates of a large number of foundation pit support structure nodes is complicated and prone to errors.
[0004] (3) In foundation pit engineering, in Midas, it is quite complicated to directly build pile units or anchor cable units with clear physical meaning (especially prestressed anchor cables with anchored sections and free sections). Midas usually uses beam units to simulate lattice piles, but beam units cannot simulate pile-soil coupling effects such as pile side friction and pile end bearing capacity.
[0005] (4) The 1D structural element types in Midas are pile elements, geogrid elements, truss elements, embedded truss elements, beam elements, and embedded beam elements. They cannot be matched one-to-one with the structural elements in FLAC3D, and element type information is easily lost during the conversion process.
[0006] Therefore, there is an urgent need for an efficient and automated mesh file conversion method that can process massive amounts of mesh data, automatically identify unit project attributes, retain grouping information, and automatically generate a complete FLAC3D structural unit modeling command flow. Summary of the Invention
[0007] The purpose of this invention is to address the problems existing in the prior art by providing an automated conversion method for foundation pit engineering mesh files based on vectorization processing and semantic reconstruction of attribute features.
[0008] The technical solution provided by this invention to solve the above-mentioned technical problems is: an automated conversion method for foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction, comprising the following steps: S1. Create a foundation pit mesh file in Midas GTS NX and use 1D structural elements to create support structure elements. After creation, export it as an FPN neutral file. S2. Open the exported FPN neutral file and convert the node list into NumPy data; S3. Read the cell information and cell keywords and store them as NumPy integer arrays. S4. Identify structural unit attributes and establish a mapping dictionary between attribute numbers and FLAC unit types; S5. Extraction of grid grouping information and association of corresponding units within the groups; S6. Create an output directory, write node information, and generate a .f3grid grid file; S7. Structural unit classification extraction and coordinate vectorization query; S8. Automated output of structural unit grouping based on semantic reconstruction of attribute features; S9. Commands for identifying unit type attributes and generating material and mechanical parameters; In S10 and FLAC3D, the import and call commands are used to import meshes and structural elements.
[0009] A further technical solution is that, in step S1, a planar mesh expansion method or a hybrid mesh generation method is used to establish a three-dimensional numerical simulation mesh for the engineering project, and the mesh is grouped according to the simulation type.
[0010] A further technical solution is that in step S1, the support structure unit is generated by dividing the corresponding geometric line segments, and the concrete support and steel support grid is divided by 1D beam unit, the lattice pile grid is divided by 1D embedded truss unit, and the prestressed anchor cable grid is divided by truss unit.
[0011] A further technical solution is that the specific process of step S2 is as follows: S21. Locate the geometric node identifiers and use a list caching method to read all node information in batches. Each node contains a node number and three-dimensional coordinates. S22. Convert the node list into a NumPy array and create a coordinate matrix indexed by the node number; S23. Using NumPy's advanced vectorized indexing capabilities, node numbers are used as row indices to fill all coordinates into the corresponding positions in the coordinate matrix in a single operation.
[0012] A further technical solution is that the specific process of step S3 is as follows: S31. Locate the support structure unit identifier and initialize the unit type dictionary. The unit type dictionary contains the entity unit type and the structural unit type. S32. Parse the cell data line by line, and according to the cell type keyword at the beginning of the line, put the data of that line into the corresponding list of the cell type dictionary; S33. Perform floating-point fault tolerance processing on the cell node number, first converting it to float and then to int; S34. After completing the reading and fault tolerance processing of all units, traverse the unit type dictionary and convert each non-empty unit list into a NumPy integer array to achieve vectorization operation.
[0013] A further technical solution is that the specific process of step S4 is as follows: S41. Locate the material property identifier, locate the beginning of the material property definition section and extract the property ID; S42. Establish a mapping dictionary between attribute numbers and FLAC3D cell types. In the mapping dictionary, PBEAM attribute is mapped to beam cell, PETRUSS attribute is mapped to pile cell, and PTRUSS attribute is mapped to cable cell.
[0014] A further technical solution is that the specific process of step S5 is as follows: S51. Locate the default grid group identifier and parse the group definition line starting with MSET, extracting the group name and the total number of cells contained in the group; S52. Process the cell numbers stored in multiple rows according to the total number of cells and concatenate them into a complete list; S53. Establish the association between group names and unit sets, and store them in Group_list; and filter illegal characters in the group names, replacing illegal characters in the file system with underscores.
[0015] A further technical solution is that the specific process of step S6 is as follows: S61. Create an output directory and use NumPy's savetxt vectorization function to efficiently write the node information extracted in step S2 into the output file. S62. Traverse the entity cells, adjust the node order according to the cell type, and write them to the file in FLAC3D cell format T4, W6, P5 or B8. S63. Write the grouping information segment, use the ZGROUP command to mark the entity cells contained in each group, and retain the mesh grouping information in Midas.
[0016] A further technical solution is that the specific process of step S7 is as follows: S71. Traverse all structural unit types, extract the unit number, attribute number and node number. For one-dimensional structural units, extract the node numbers at index positions 2 and 3. S72. Query the node coordinates through the coordinate matrix and establish a mapping dictionary from the unit number to the array containing the unit type, attribute number and node coordinates.
[0017] A further technical solution is that the specific process of step S8 is as follows: S81. Filter the groups containing structural units to form a list of structural unit groups; S82. Perform semantic reconstruction using existing material element rules, obtain the attribute number of the first element in the group, and determine the FLAC3D element type of the group using a mapping dictionary containing element type, attribute number, and node coordinate array. S83. Traverse all structural units within the group and generate FLAC3D creation commands based on the mapping type. All commands contain complete node coordinates, unit IDs, number of segments, and group names.
[0018] The beneficial effects of this invention are as follows: By employing NumPy arrays and matrix storage, this invention significantly improves processing speed and reduces memory usage compared to traditional line-by-line string processing. Furthermore, through structural unit attribute recognition and semantic reconstruction, it can automatically identify structural units and automatically generate models containing material properties and cross-sectional characteristics. This is particularly suitable for modeling and converting complex meshes and structural units in foundation pit engineering due to the variable excavation environment, achieving both high efficiency in modeling and accuracy in numerical simulation. Attached Figure Description
[0019] Figure 1 This is a flowchart of the present invention; Figure 2 This is a three-dimensional numerical model diagram of the foundation pit provided in this embodiment; Figure 3 This is a three-dimensional structural model of the tunnel support provided in this embodiment. Detailed Implementation
[0020] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] like Figure 1As shown, the present invention provides an automated conversion method for foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction, which specifically includes the following steps: S1. In Midas GTS NX, a 3D numerical simulation mesh for the engineering project is created using either planar mesh expansion or hybrid mesh generation. The mesh is then grouped according to the simulation type to create the foundation pit mesh file. Support structure elements are created using 1D structural elements, specifically by dividing corresponding geometric segments to generate support structure elements. Concrete and steel support meshes are generated using 1D beam elements, lattice pile meshes are generated using 1D embedded truss elements, and prestressed anchor cable meshes are generated using truss elements. After creation, the mesh is exported as an FPN neutral file. S2. Open the exported FPN neutral file and convert the node list into NumPy data; S21. Locate the geometric node identifiers and use a list caching method to read all node information in batches. Each node contains a node number and three-dimensional coordinates (x, y, z). S22. Convert the node list into a NumPy array and create a coordinate matrix indexed by the node number; The coordinate matrix has dimensions of (max_node_id+1, 3), and dynamic expansion is avoided by pre-allocating memory space. S23. Using NumPy's advanced vectorized indexing capabilities, node numbers are used as row indices to fill all coordinates into the corresponding positions in the coordinate matrix in a single operation. S3. Read the cell information and cell keywords and store them as NumPy integer arrays. S31. Locate the support structure unit identifier and initialize the unit type dictionary. The unit type dictionary contains the entity unit type and the structural unit type. S32. Parse the cell data line by line, and according to the cell type keyword at the beginning of the line, put the data of that line into the corresponding list of the cell type dictionary; S33. Perform floating-point error tolerance processing on the unit node number, first convert it to float and then to int to avoid parsing errors caused by decimal point format; S34. After completing the reading and fault tolerance processing of all units, traverse the unit type dictionary and convert each non-empty unit list into a NumPy integer array to achieve vectorization operation. S4. Identify structural unit attributes and establish a mapping dictionary between attribute numbers and FLAC unit types; S41. Locate the material property identifier, locate the beginning of the material property definition section and extract the property ID; S42. Establish a mapping dictionary between attribute numbers and FLAC3D unit types. In the mapping dictionary, PBEAM attribute is mapped to beam unit, PETRUSS attribute is mapped to pile unit, and PTRUSS attribute is mapped to cable unit. S5. Extraction of grid grouping information and association of corresponding units within the groups; S51. Locate the default grid group identifier and parse the group definition line starting with MSET, extracting the group name and the total number of cells contained in the group; S52. Process the cell numbers stored in multiple rows according to the total number of cells and concatenate them into a complete list; S53. Establish the association between group names and unit sets, and store them in Group_list; and filter illegal characters in the group names, replacing illegal characters in the file system with underscores; S6. Create an output directory, write node information, and generate a .f3grid grid file; S61. Create an output directory and use NumPy's savetxt vectorization function to efficiently write the node information extracted in step S2 into the output file. S62. Traverse the entity cells, adjust the node order according to the cell type, and write them to the file in FLAC3D cell format T4, W6, P5 or B8. S63. Write the grouping information segment, use the ZGROUP command to mark the entity cells contained in each group, and retain the mesh grouping information in Midas; S7. Structural unit classification extraction and coordinate vectorization query; S71. Traverse all structural unit types, extract the unit number, attribute number and node number. For one-dimensional structural units, extract the node numbers at index positions 2 and 3. S72. Query the node coordinates through the coordinate matrix and establish a mapping dictionary from the unit number to the array containing the unit type, attribute number and node coordinates; S8. Automated output of structural unit grouping based on semantic reconstruction of attribute features; S81. Filter the groups containing structural units to form a list of structural unit groups; S82. Perform semantic reconstruction using existing material element rules, obtain the attribute number of the first element in the group, and determine the FLAC3D element type of the group using a mapping dictionary containing element type, attribute number, and node coordinate array. S83. Traverse all structural units within the group and generate FLAC3D creation commands based on the mapping type. All commands contain complete node coordinates, unit IDs, number of segments, and group names. S9. Commands for identifying unit type attributes and generating material and mechanical parameters; If it is a beam element, additional material parameters such as elastic modulus, Poisson's ratio, and density, as well as cross-sectional property parameters such as cross-sectional area and moment of inertia are added. If it is a pile element, add pile material parameters and section properties, pile perimeter coupling stiffness (normal coupling stiffness / tangential coupling stiffness), pile side friction parameters (pile side shear interface cohesion, pile side shear interface friction angle), pile end bearing capacity parameters (pile normal interface cohesion, pile normal interface friction angle), and pile top constraint setting command link attach. If it is a cable element, add anchor material parameters and section properties, segmentation properties of free section and anchored section set using FISH function, grout bond strength and stiffness parameters, and prestressing application command. In S10 and FLAC3D, the import and call commands are used to import meshes and structural elements.
[0022] Taking a certain city's open-cut foundation pit project as an example, the excavation depth of this project is 18.5m, with five layers of support. The first and third layers of support are concrete supports, and the second, fourth, and fifth layers of support are steel supports. A lattice pile + bottom skirt reinforcement method is used. The finite element model created in Midas has dimensions of 200×400×60m, containing 1,275,741 solid elements and 1,286,230 nodes. Five layers of support structure (including concrete supports 1z and 3z and steel supports 2z, 4z, and 5z) are divided using 1D beam elements, and their mesh groups are named 1z, 2z, 3z, 4z, and 5z, respectively. Lattice piles are divided using 1D embedded truss elements, and the mesh group is named zhuang. The established neutral file is imported into the exe file packaged with the method of this invention. Steps S2-S6 successfully identify 13 solid element groups and output them as .f3grid mesh files; steps S7-S9 successfully convert the structural elements in the five groups, such as... Figure 2 As shown, the five supporting structures (1z, 2z, 3z, 4z, 5z) were accurately identified as beam elements, and the lattice piles were accurately identified as pile elements. The number of structural elements is consistent with the number of 1D mesh elements created. The generated .f3grid mesh file and .dat command stream file are then imported into FLAC3D software as follows: Figure 3 As shown, the mesh element grouping is consistent with the structural element grouping without any errors. All structural elements automatically have material parameters, cross-sectional properties, and coupling attributes, which can be directly used for subsequent foundation pit excavation simulation analysis without any manual parameter settings.
[0023] This embodiment, running on a standard computer (Intel Core i7-12700 processor, 64GB RAM), completed steps S2-S9 in just 18.4077 seconds, successfully processing the conversion of 1,275,741 entity units and 639 structural units. Compared to traditional line-by-line string processing for the same data conversion, this invention offers significant advantages in processing efficiency and resource consumption.
[0024] The above description is not intended to limit the present invention in any way. Although the present invention has been disclosed through the above embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention are still within the scope of the present invention.
Claims
1. An automated conversion method for foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction, characterized in that, Includes the following steps: S1. Create a foundation pit mesh file in Midas GTS NX and use 1D structural elements to create support structure elements. After creation, export it as an FPN neutral file. S2. Open the exported FPN neutral file and convert the node list into NumPy data; S3. Read the cell information and cell keywords and store them as NumPy integer arrays. S4. Identify structural unit attributes and establish a mapping dictionary between attribute numbers and FLAC unit types; S5. Extraction of grid grouping information and association of corresponding units within the groups; S6. Create an output directory, write node information, and generate a .f3grid grid file; S7. Structural unit classification extraction and coordinate vectorization query; S8. Automated output of structural unit grouping based on semantic reconstruction of attribute features; S9. Commands for identifying unit type attributes and generating material and mechanical parameters; In S10 and FLAC3D, the import and call commands are used to import meshes and structural elements.
2. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 1, characterized in that, In step S1, a three-dimensional numerical simulation mesh for the project is established using a planar mesh expansion method or a hybrid mesh generation method, and the mesh is grouped according to the simulation type.
3. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 1, characterized in that, In step S1, the support structure unit is generated by dividing the corresponding geometric line segments, and the concrete support and steel support grid is divided by 1D beam unit, the lattice pile grid is divided by 1D embedded truss unit, and the prestressed anchor cable grid is divided by truss unit.
4. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 1, characterized in that, The specific process of step S2 is as follows: S21. Locate the geometric node identifiers and use a list caching method to read all node information in batches. Each node contains a node number and three-dimensional coordinates. S22. Convert the node list into a NumPy array and create a coordinate matrix indexed by the node number; S23. Using NumPy's advanced vectorized indexing capabilities, node numbers are used as row indices to fill all coordinates into the corresponding positions in the coordinate matrix in a single operation.
5. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 1, characterized in that, The specific process of step S3 is as follows: S31. Locate the support structure unit identifier and initialize the unit type dictionary. The unit type dictionary contains the entity unit type and the structural unit type. S32. Parse the cell data line by line, and according to the cell type keyword at the beginning of the line, put the data of that line into the corresponding list of the cell type dictionary; S33. Perform floating-point fault tolerance processing on the cell node number, first converting it to float and then to int; S34. After completing the reading and fault tolerance processing of all units, traverse the unit type dictionary and convert each non-empty unit list into a NumPy integer array to achieve vectorization operation.
6. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 1, characterized in that, The specific process of step S4 is as follows: S41. Locate the material property identifier, locate the beginning of the material property definition section and extract the property ID; S42. Establish a mapping dictionary between attribute numbers and FLAC3D cell types. In the mapping dictionary, PBEAM attribute is mapped to beam cell, PETRUSS attribute is mapped to pile cell, and PTRUSS attribute is mapped to cable cell.
7. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 1, characterized in that, The specific process of step S5 is as follows: S51. Locate the default grid group identifier and parse the group definition line starting with MSET, extracting the group name and the total number of cells contained in the group; S52. Process the cell numbers stored in multiple rows according to the total number of cells and concatenate them into a complete list; S53. Establish the association between group names and unit sets, and store them in Group_list; and filter illegal characters in the group names, replacing illegal characters in the file system with underscores.
8. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 4, characterized in that, The specific process of step S6 is as follows: S61. Create an output directory and use NumPy's savetxt vectorization function to efficiently write the node information extracted in step S2 into the output file. S62. Traverse the entity cells, adjust the node order according to the cell type, and write them to the file in FLAC3D cell format T4, W6, P5 or B8. S63. Write the grouping information segment, use the ZGROUP command to mark the entity cells contained in each group, and retain the mesh grouping information in Midas.
9. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 1, characterized in that, The specific process of step S7 is as follows: S71. Traverse all structural unit types, extract the unit number, attribute number and node number. For one-dimensional structural units, extract the node numbers at index positions 2 and 3. S72. Query the node coordinates through the coordinate matrix and establish a mapping dictionary from the unit number to the array containing the unit type, attribute number and node coordinates.
10. The method for automated conversion of foundation pit engineering mesh files based on vectorization processing and attribute feature semantic reconstruction according to claim 9, characterized in that, The specific process of step S8 is as follows: S81. Filter the groups containing structural units to form a list of structural unit groups; S82. Perform semantic reconstruction using existing material element rules, obtain the attribute number of the first element in the group, and determine the FLAC3D element type of the group using a mapping dictionary containing element type, attribute number, and node coordinate array. S83. Traverse all structural units within the group and generate FLAC3D creation commands based on the mapping type. All commands contain complete node coordinates, unit IDs, number of segments, and group names.
