Crack surface grid data processing method and system for expanding finite element method
By employing connectivity analysis and feature clustering methods, the problems of component fragmentation in XFEM post-processing and the difficulty in calculating surface indicators were solved, achieving high-precision extraction and quality assessment of cracked surface components, and improving user interactivity and data processing efficiency.
Patent Information
- Application Number
- CN202511620802.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-10
AI Technical Summary
Existing XFEM post-processing tools suffer from fragmented component identification, difficulty in calculating surface parameters, and poor interactivity in processing cracked surface mesh data, making them unable to effectively handle complex geometries and micron-level precision requirements.
Employing a connectivity analysis and feature clustering approach, high-precision component extraction and quality quantification are achieved through topological connectivity segmentation, cluster merging, SVD/manual plane fitting, and GB/T standard evaluation. A GUI interactive interface driven by the PyVista library is also integrated.
It improves the accuracy of crack component identification, achieves standardized surface quality assessment, enhances user interaction experience, and improves data processing efficiency, making it particularly suitable for large-scale simulation data.
Smart Images

Figure CN121503129A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computational mechanics, finite element analysis post-processing, and surface metrology, specifically relating to a method and system for processing crack surface mesh data output from Extended Finite Element Method (XFEM) simulations. Background Technology
[0002] Fatigue crack propagation is a major cause of failure in engineering structures. The Extended Finite Element Method (XFEM), as a numerical simulation technique that does not require remeshing, has been widely used for crack propagation prediction. In existing technologies, XFEM post-processing mainly relies on commercial software such as ANSYS, ABAQUS, or FRANC3D. While these tools support basic crack propagation visualization, they have significant limitations. They only provide the nodal coordinates or integration point coordinates of the mesh representing the crack surface, and cannot obtain the coordinates of the intersection points between the crack surface and the mesh boundary, making it difficult to calculate relevant crack surface morphology parameters such as roughness and smoothness.
[0003] Existing post-processing tools for cracked surfaces are insufficient in surface quality assessment. As a simulation output, cracked surfaces often require quantification of flatness, roughness (Ra), and maximum height difference to conform to national standards GB / T1184-1996 "Form and Position Tolerances - Unspecified Tolerance Values" and GB / T 1031-2009 "Geometric Specifications (GPS) - Nominal Characteristics of Surface Structure by Profile Method." GB / T1184 specifies that flatness tolerances are based on the longer side of the surface or the diameter of a circle (e.g., f-grade 0.2mm), but existing methods such as the level set method only achieve mesh reconstruction and do not integrate the deviation calculation for SVD fitting. For Ra roughness, GB / T 1031 requires the use of multiple sampling lengths (0.08mm to 2.5mm) to calculate the arithmetic mean deviation, but traditional tools such as FRANC3D post-processing only provide visual comparison, which is insufficient in accuracy and cannot handle micron-level engineering requirements.
[0004] Existing simulation post-processing software mainly relies on component identification methods based on mesh connectivity, which have significant shortcomings when processing crack data generated from simulations.
[0005] Limitations of connectivity analysis: Traditional methods segment regions based solely on the topological connectivity of mesh points, failing to effectively handle common crack branching, intersections, and complex geometries encountered in simulations. For example, when the simulated crack mesh contains minute gaps at intersections, the system may incorrectly segment mesh points that should belong to the same crack surface into multiple independent components.
[0006] Lack of geometric feature fusion: Existing methods do not consider the geometric features of the crack surface (such as the centroid location, normal vector direction, area size, etc.), which leads to unstable identification results when dealing with irregular crack structures. The same simulation data may yield completely different component partitioning results under different parameters.
[0007] Fixed threshold parameter: Traditional methods usually use a fixed connection threshold, which cannot be dynamically adjusted according to the characteristics of simulation data, resulting in large fluctuations in recognition accuracy when processing crack models of different complexities.
[0008] These issues necessitate engineers manually segmenting components, correcting planes, and iterating repeatedly during crack analysis, reducing the simulation's engineering applicability. To address these shortcomings, this invention proposes a method and system for processing crack surface mesh data to extend the output of finite element method simulations. It provides a connectivity-driven post-processing method that integrates feature clustering and GUI interaction to achieve automated identification and surface index evaluation. Summary of the Invention
[0009] The purpose of this invention is to overcome the problems of fragmented component identification, difficulty in calculating surface indices, and poor interactivity in existing XFEM post-processing, and to provide a crack surface post-processing method and visualization system based on connectivity and feature clustering. This method achieves high-precision component extraction and quality quantification through topological connectivity segmentation, cluster merging, SVD / manual plane fitting, and GB / T standard evaluation; the system integrates a PyVista-driven GUI, supporting multi-view interaction and parameter adaptation. The technical solution adopted by this invention is as follows:
[0010] Step 1, Mesh Loading: Load the XFEM crack surface mesh from the OBJ file, ensuring that the point coordinates are of type float32.
[0011] Step 2, Initial Connection Determination: The connectivity algorithm is used to extract independent regions (RegionId), filtering out fragments with a number of points less than the minimum number of points in the region (default 30), forming an initial region list. Formula: Regions with a number of points n ≥ the threshold are retained.
[0012] Step 3, Feature Extraction: Calculate the centroid and normal vector N for each region. Then, perform principal component analysis (PCA) to calculate the number of points and area of the initial component. The centroid coordinates (Cx, Cy, Cz) are the average coordinates of all points within the component, and the normal vector (Nx, Ny, Nz) is the average of the normal vectors of the component's facets. The normal vectors are normalized, and the number of points represents the number of grid points within the component.
[0013] Furthermore, based on the above data, a feature vector is constructed, and the centroid coordinates are scaled to the [0,1] interval, i.e., (Cx',Cy',Cz')=(Cx / max(Cx),Cy / max(Cy),Cz / max(Cz)), where max(Cx), max(Cy), and max(Cz) are the maximum values of the centroid coordinates of all initial components, respectively; the normal vector is normalized, i.e., (Nx',Ny',Nz')=(Nx / ||N||,Ny / ||N||,Nz / ||N||), where ||N|| is the magnitude of the normal vector.
[0014] Step 4: Use clustering algorithm and greedy merging: Iterative check, if the centroid distance of the components meets the product condition of distance threshold and average area and the angle between normal vectors is less than the angle tolerance, then merge the crack surface components.
[0015] Furthermore, the output component list contains a surface, the original point cloud, and an automated SVD plane.
[0016] Step 5: Next, the surface parameters are calculated. First, a reference plane is specified. The system provides two methods for specifying the reference plane to adapt to different situations.
[0017] Furthermore, principal component analysis can be used to automatically fit plane equations, making it suitable for batch data processing.
[0018] Furthermore, it allows for the use of manual mode to specify three points to define the plane, enabling precise specification of the reference plane.
[0019] Next, the vertical distance from the point cloud to the reference data is calculated, and the crack surface smoothness, Ra roughness, and maximum height difference are calculated based on this data.
[0020] Step 6: Generate a visual interactive interface: providing three-view (Front / Top / Left) control, isometric view switching, component label highlighting, component show / hide control, real-time coordinate status bar, and surface index result display area, supporting users to conduct in-depth analysis of crack structures through interactive operations.
[0021] The present invention also provides a crack component identification and surface quality assessment system, characterized in that it includes:
[0022] User input module: Used to import crack mesh model files in OBJ format, and set the distance threshold D (0.1-1.0) and angle tolerance θ (5°-30°).
[0023] The core processing module includes an initial connectivity analysis submodule, a feature fusion region merging submodule, and a GB / T surface evaluation submodule. Specifically, the feature fusion region merging submodule performs dynamic feature fusion merging in step 3; and the GB / T surface evaluation submodule performs surface index calculation in step 4.
[0024] Visualization and Interaction Module: Used to render 3D models, display component labels and highlights, and show surface index results.
[0025] The beneficial effects of this invention are:
[0026] Improving the accuracy of crack component identification: This invention effectively solves the identification error problem of traditional connectivity analysis methods when dealing with complex structures such as crack branches and intersections through a two-stage identification method of "connectivity analysis → feature fusion". By introducing dynamic merging rules of centroid distance and angle tolerance, the accuracy of crack component identification is improved to over 95%, significantly improving the reliability of crack analysis.
[0027] Standardized surface quality assessment: Automatic calculation of crack surface flatness, Ra roughness, and maximum height difference is achieved, making the assessment results have a standard basis and providing a reliable basis for the quality control of engineering structures.
[0028] Enhanced user experience: This invention supports dynamic adjustment of distance threshold (0.1-1.0) and angle tolerance (5°-30°), allowing users to view changes in recognition results in real time without reloading data, significantly improving data processing efficiency and user experience. Simultaneously, the system provides three-view control and component label highlighting functions, enabling users to comprehensively analyze crack structures from multiple angles.
[0029] Improved data processing efficiency: This invention supports batch processing, which can continuously load multiple OBJ format crack mesh files for component identification and surface evaluation, significantly improving the efficiency of post-simulation processing, and is particularly suitable for the processing needs of large-scale simulation data. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating a crack surface mesh data processing method and system for the extended finite element method provided by the present invention.
[0031] Figure 2 It is the software interface of the integrated crack surface data grid data processing system.
[0032] Figure 3 It is the result of calculating surface parameters after specifying a reference plane. Detailed Implementation
[0033] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more definite definition of the scope of protection of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0034] This implementation case provides a method and system for processing crack surface mesh data for the extended finite element method. The system is developed based on the Python language, using PyVista as the 3D visualization engine, PyQt5 as the graphical user interface framework, and SciPy and scikit-learn as numerical computing libraries.
[0035] This system includes the following core modules:
[0036] Mesh loading module: Used to load crack mesh model files in OBJ format;
[0037] Initial connectivity analysis module: Performs initial region segmentation based on mesh connectivity;
[0038] Feature fusion region merging module: dynamically merges regions by fusing geometric features;
[0039] GB / T Surface Quality Assessment Module: Calculates surface indicators based on national standards;
[0040] Visualization and Interaction Module: Provides a 3D visualization interface and user interaction functions.
[0041] Step 1, Crack Mesh Model Loading: The system first loads the OBJ format crack mesh model generated by Abaqus software based on the XFEM method. The mesh model contains triangular mesh point cloud data of the crack surface, with each mesh point having three-dimensional coordinates (x, y, z). The system performs type conversion on the loaded mesh point data to ensure that the point coordinates are of type float32 to avoid numerical calculation warnings.
[0042] Step 2, Initial Connectivity Region Segmentation: The system calls the `connectivity` function from the PyVista library to perform initial connectivity analysis on the mesh model and generate an initial component set. The specific implementation is as follows:
[0043] connected=mesh.connectivity(largest=False)
[0044] region_ids=np.unique(connected.cell_data['RegionId'])
[0045] regions = []
[0046] forrid in region_ids:
[0047] mask=connected.cell_data['RegionId']==rid
[0048] sub=connected.extract_cells(mask)
[0049] npts = sub.n_points
[0050] ifnpts>=MIN_POINTS_PER_REGION: # The default value is 30
[0051] regions.append(sub)
[0052] This step ensures that each initial component contains at least 30 grid points to avoid excessively small noise areas affecting subsequent analysis.
[0053] Step 3, Feature Fusion and Region Merging: The system calculates geometric features for each initial component and merges regions based on feature similarity.
[0054] Geometric feature calculation
[0055] For each initial component, the system calculates the following geometric features:
[0056] Centroid coordinates: obtained by calculating the average value of all grid points of the component, i.e.:
[0057]
[0058] Where N is the number of grid points within the component, P i Let be the coordinates of the i-th grid point.
[0059] Normal vector: The average value of the element normal vectors is preferred; if unavailable, Principal Component Analysis (PCA) is used for calculation. The specific implementation is as follows:
[0060]
[0061] Points and Area: The number of points is the total number of grid points within the component, and the area is obtained through PyVista's area property.
[0062] Feature fusion and region merging: The system constructs a normalized feature vector by dividing the centroid coordinates by the overall bounding box size for normalization and scaling the normal vector by multiplying it by 0.2 to form the feature vector.
[0063] feat=[Cx / bbox size,Cy / bbox s ize,Cz / bbox s [ize, 0.2Nx, 0.2Ny, 0.2Nz]
[0064] Then, the regions are merged according to the dynamic merging rules: when the centroid distance between two components is less than the product of the distance threshold (default value is 0.02) and the bounding box size, and the angle between the normal vectors is less than the angle tolerance (default value is 25.0 degrees), the two components are merged into a new component.
[0065] Step 4, Surface index calculation: Calculate the surface index for each merged component.
[0066] The system supports both automatic and manual reference plane fitting modes. Automatic mode: Uses Singular Value Decomposition (SVD) to fit the optimal reference plane, conforming to the GB / T 16596 coordinate system standard. Specifically, the implementation is as follows:
[0067]
[0068] Manual mode: The user specifies three points in the 3D view, and the system uses these three points to determine the reference plane.
[0069] For each grid point within the component, the system calculates its perpendicular distance to the reference plane. Let the normal vector of the reference plane be (a, b, c), and a point on the plane be (x0, y0, z0), then the equation of the reference plane is obtained.
[0070] For any grid point P within the component p =(x p ,y p ,z p Its perpendicular distance δ from the reference plane p The calculation formula is:
[0071] δ p =|ax p +by p +cz p +d|
[0072] The system converts the calculated deviation value into micrometers and calculates the flatness, roughness, and maximum height difference based on the above data.
[0073] The system provides a complete visual interactive interface, including:
[0074] Three-view control: front view (XY plane), top view (XZ plane), side view (YZ plane), and isometric view;
[0075] Component management: Control the display / hidden state of each component via checkboxes, and support component label display and highlighting;
[0076] Mesh line control: Globally controls the display of the main mesh and crack surface mesh lines;
[0077] Coordinate Query: Once enabled, clicking on the model will display the precise coordinates, which will be shown in real time in the status bar.
[0078] Operational functions: Supports functions such as re-identification, surface index calculation, and data export.
[0079] The specific steps are as follows: Import the .obj file. Based on the three views, isometric view, zoom in / out, etc., you can view the shape of the crack surface. In the coordinate query function, right-click to query the coordinates of the corresponding grid points, and you can export the point cloud data of the crack surface. After specifying the reference plane of the crack surface, clicking "Calculate Surface Indicators" will obtain three data points for each component: roughness, flatness, and maximum height difference, which can be exported as a table file. In the visualization interface, you can choose to display crack components, crack surface grid lines, and main grid lines.
[0080] The embodiments described above are merely preferred embodiments of the present invention, and not an exhaustive list of all possible implementations of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles and spirit of the present invention, and these improvements and modifications should all be considered to be included within the scope of protection of the claims of the present invention.
Claims
1. A method and system for crack surface identification and post-processing of surface parameters based on the extended finite element method. Its key innovation lies in solving the problem that crack surfaces formed by the XFEM method originate from within the element, making it difficult to directly obtain the coordinates of the crack surface itself, thus overcoming the limitations of crack surface parameter calculation in Abaqus software. Its features include: Includes the following steps: Load a crack mesh model based on the extended finite element method, wherein the crack mesh model is triangular mesh point cloud data in OBJ format; Initial region division is performed based on grid connectivity to generate an initial component set; Based on the initial component set, regions with the same crack are dynamically merged through feature fusion, including: Calculate the feature vector for each initial component, the feature vector including centroid coordinates, normal vector, number of points, and area; Construct normalized feature vectors, scale the centroid coordinates to the [0,1] interval, and normalize the normal vectors; Components are merged according to the dynamic merging rules: when the centroid distance between two components is less than the product of the distance threshold and the average area, and the angle between their normal vectors is less than the angle tolerance, the two components are merged. Surface parameters are calculated based on the national standard GB / T 1184-1996, including: Fit a reference plane, supporting automatic mode (fitting the plane equation through principal component analysis) or manual mode (user-specified three points to determine the plane); Calculate the vertical distance from the point cloud to the reference plane; Calculate flatness, Ra roughness, and maximum height difference according to GB / T 1184-1996 standard; Generate a visual interactive interface that provides three-view control, component label highlighting, and surface indicator result display.
2. The loading crack network model step according to claim 1, characterized in that... The XFEM method based on Abaqus generated complete crack surface simulation results. In the isosurface display mode, only the crack surface results with Crack_PHILSM=0 are displayed. Crack mesh data in OBJ format is exported according to the actual fracture situation.
3. The component partitioning and merging method according to claim 1, characterized in that, Based on the grid connectivity partitioning component, the distance threshold of the dynamic merging rule ranges from 0.1 to 1.0, the angle tolerance ranges from 5° to 30°, and the merging rule can be manually adjusted.
4. The method according to claim 1, characterized in that, The automatic mode for fitting the reference plane calculates the plane equation through principal component analysis. The plane equation is ax + by + cz + d = 0, where a, b, c, and d are coefficients calculated by principal component analysis based on the centroid coordinates of the initial components.
5. The method according to claim 1, characterized in that, The surface index calculation includes: Flatness = max(distance from point to plane); Ra roughness = (1 / number of points) × Σ|distance from point to plane|; Maximum height difference = max(point to plane distance) - min(point to plane distance), where the point to plane distance is the vertical distance from each point in the grid point cloud to the reference plane.
6. The method according to claim 1, characterized in that, The visual interactive interface includes: a three-view control module (front view, top view, side view), an isometric view switching button, component checkboxes (to control the display / hiding of components), and a real-time coordinate status bar (displaying the mouse position coordinates).
7. A method and system for crack surface identification and surface index post-processing based on the extended finite element method, characterized in that, include: The user input module is used to import crack mesh model files in OBJ format and set distance threshold and angle tolerance parameters. The core processing module includes: an initial connectivity analysis submodule, used for initial region segmentation based on mesh connectivity; The feature fusion region merging submodule is used to perform dynamic feature fusion and merging of regions, including calculating feature vectors, constructing normalized feature vectors, and merging components according to dynamic merging rules; The GB / T Surface Evaluation Submodule is used to calculate surface indices based on the GB / T 12345-2020 standard. The visualization and interaction module is used to render 3D models, display component labels, highlight components, and show surface index results.
8. The system according to claim 7, characterized in that, The core processing module is integrated into the Python development environment and uses the PyVista library to implement mesh loading and 3D rendering.
9. The method according to any one of claims 1 to 5, characterized in that, The point cloud data of the mesh model is a simulation result obtained through the extended finite element method (XFEM).
10. The system according to any one of claims 5 to 7, characterized in that, The system supports continuous processing, enabling it to continuously process multiple mesh files for component identification and surface evaluation.