Method for extracting and digital modeling of micro-fractures in reservoirs based on flow field simulation

By using flow field simulation methods, the problems of automated extraction and digital modeling of micro-fractures were solved, generating a three-dimensional fracture network model suitable for seepage simulation, thus improving the efficiency and accuracy of reservoir micro-fracture research.

CN122199821APending Publication Date: 2026-06-12SHAANXI YANCHANG PETROLEUM GRP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAANXI YANCHANG PETROLEUM GRP
Filing Date
2026-04-23
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies, the geometric structure of microcracks is difficult to extract automatically, the crack contours are complex, the widths are uneven, the skeleton lines are prone to offset or redundant branches, and two-dimensional cracks are difficult to expand into three-dimensional models, making them unsuitable for direct use in seepage simulation.

Method used

Based on the flow field simulation method, this method achieves automated and accurate digital modeling of cracks through image preprocessing, crack region mask extraction, morphological closing operation, distance transformation matrix calculation, skeleton image optimization, neighborhood connectivity analysis, and construction of a three-dimensional crack network model.

Benefits of technology

It enables automated and precise extraction of fracture regions, generating a smooth and complete three-dimensional fracture network model that meets the needs of seepage simulation and improves the efficiency and accuracy of reservoir micro-fracture research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199821A_ABST
    Figure CN122199821A_ABST
Patent Text Reader

Abstract

The present application relates to oil and gas exploration technology field, disclose a kind of reservoir microcrack extraction and digital modeling method based on flow field simulation, the method comprises the following steps: preprocessing original image, extracting and optimizing to obtain pure crack mask;The minimum distance of pixel point and boundary in mask is calculated to generate distance conversion matrix, combined with flow velocity threshold extraction and optimization skeleton, construct skeleton point sequence;Calculate the tangent vector of skeleton point, normal vector, solve three-dimensional corner point coordinate, combination forms three-dimensional fracture network model.The method solves the problems of low automation, skeleton offset redundancy and two-dimensional to three-dimensional conversion in the prior art, realizes accurate and automatic extraction of fractures, constructs a three-dimensional model that can be directly used for fluid seepage numerical simulation, and improves the efficiency and accuracy of reservoir microcrack research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas exploration technology, specifically to a method for extracting and digitally modeling micro-fractures in oil reservoirs based on flow field simulation. Background Technology

[0002] In unconventional oil and gas, tight reservoirs, and shale reservoir studies, the geometry of micro-fractures significantly influences fluid seepage behavior. Current techniques typically acquire two-dimensional images of micro-fractures through microscopy or CT scans, relying heavily on manual interpretation or semi-automatic extraction of fracture geometry features. This makes it difficult to effectively convert two-dimensional fracture morphology into digital fracture models suitable for numerical simulation. In particular, the automatic extraction and geometric parameterization of fracture skeleton lines still present challenges: 1. Complex fracture contours and uneven widths; 2. Skeleton lines are prone to offset or redundant branches; 3. Two-dimensional fractures are difficult to expand into three-dimensional models, making them unsuitable for direct seepage simulation. Therefore, a highly automated, geometrically clear, and directly applicable digital fracture processing method for numerical simulation is urgently needed. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method for extracting and digitally modeling reservoir micro-fractures based on flow field simulation, so as to solve the technical problems mentioned in the prior art.

[0004] A method for extracting and digitally modeling reservoir microfractures based on flow field simulation includes the following steps: S1. Obtain the original image containing crack information; S2. Extract a crack region mask from the original image based on a preset crack region extraction threshold, and perform a morphological closing operation on the crack region mask to obtain a clean crack mask. S3. Identify the boundary contour of the pure crack mask, calculate the minimum geometric distance between each pixel in the pure crack mask and its boundary contour, and generate a distance transformation matrix. S4. Map the distance transformation matrix onto the clean crack mask, and remove pixels in the clean crack mask whose flow velocity exceeds a preset flow velocity threshold to obtain a skeleton image. S5. Define a neighborhood connectivity function, calculate the number of connected points of each pixel in the skeleton image in the 8-neighborhood or 4-neighborhood, and obtain the corresponding pixel length; traverse all pixels in the skeleton image, delete short branches whose pixel length is less than the set branch length threshold, and obtain the optimized crack skeleton. S6. Extract the two-dimensional coordinates of all pixels in the optimized crack skeleton and arrange them sequentially according to the preset arrangement rules to form a skeleton point sequence. S7. Calculate the tangent vector direction of each pixel in the skeleton point sequence; S8. Calculate the corresponding normal vector according to the tangent vector direction of each pixel in the skeleton point sequence, and calculate the coordinates of several corner points of the three-dimensional crack sheet corresponding to each pixel in the skeleton point sequence in combination with the preset crack width parameter and crack half height parameter. S9. Combine the coordinates of several corner points of the three-dimensional crack sheet corresponding to each pixel in the skeleton point sequence to construct a three-dimensional crack network model.

[0005] Optionally, step S1 further includes preprocessing the original image, specifically including: The original image is converted from the BGR color space to the RGB color space, and then from the RGB color space to the HSV color space, Lab color space, or YCbCr color space for color feature analysis.

[0006] Optionally, in step S2, a crack region mask is extracted from the preprocessed original image using the Zhang-Suen thinning algorithm or a centerline extraction algorithm based on the Voronoi diagram. The crack region extraction threshold is a red dual-interval threshold, in which: The hue range of the first interval is 0~10°; The hue range of the second interval is 160~180°; The saturation range for both the first and second intervals is 40~255°; The brightness range of both the first and second intervals is 40~255°; The cv2.inRange function is used to generate red crack masks located in the first and second intervals in the preprocessed original image, respectively. The red crack masks in the first and second intervals are then merged into a crack region mask by a logical OR operation.

[0007] Optionally, the method for performing morphological closing operations on the crack region mask in step S2 specifically includes: The tiny voids inside the initial crack region mask are filled with elliptical structural elements with a kernel size of 3×3, and the broken crack segments are connected to obtain a complete crack region mask. Perform connected component analysis, calculate the area of ​​each connected region in the complete crack region mask, and delete connected regions with an area smaller than a preset area threshold to obtain a pure crack mask; The preset area threshold is 200~500 pixels.

[0008] Optionally, in step S3, an outer contour extraction algorithm is used to identify the boundary contour of the pure crack mask.

[0009] Optionally, in S3, the minimum geometric distance between each pixel in the pure crack mask and its boundary contour is calculated using the Euclidean distance transformation algorithm.

[0010] Optionally, in step S5, the set branch length threshold is 10 to 50 steps.

[0011] Optionally, in step S6, the row and column coordinates of all pixels with positive pixel values ​​in the optimized crack skeleton are extracted, and the np.column_stack function is used to combine the extracted row and column coordinates of each pixel into a two-dimensional point set to form a skeleton point sequence.

[0012] Optionally, in step S7, the method for calculating the tangent vector of each pixel in the skeleton point sequence specifically includes: The backward difference algorithm is used to calculate the corresponding tangent vector for the first pixel in the skeleton point sequence; The forward difference algorithm is used to calculate the corresponding tangent vector for the tail pixels in the skeleton point sequence; The corresponding tangent vector is calculated for the remaining pixels in the skeleton point sequence using a forward difference algorithm, a center difference algorithm, or a backward difference algorithm; The tangent vectors of each pixel in the skeleton point sequence are normalized to obtain a unit tangent vector array with consistent pixel length.

[0013] Optionally, in step S8, the tangent vectors of each pixel in the skeleton point sequence are rotated by 90 degrees to obtain the corresponding normal vectors; Based on the actual simulation requirements, the crack width parameter and crack half height parameter are set, and the two-dimensional coordinates of each pixel in the skeleton point sequence and the coordinates of 3, 4 or 6 corner points of its normal vector are calculated. The adjacent coordinates of each pixel are sequentially connected to generate the geometric shape of the three-dimensional crack sheet. The geometric shape is a triangular structure, a quadrilateral structure or a hexagonal structure.

[0014] The beneficial effects that this invention can produce include: 1. The reservoir micro-fracture extraction and digital modeling method based on flow field simulation provided by this invention removes image interference and clarifies color features through original image preprocessing combined with multi-color space conversion. Then, through fracture region mask extraction combined with precise algorithms, red dual-interval thresholding, morphological closing operations, and connected component analysis, a pure fracture mask can be accurately extracted and optimized. Finally, boundary contour recognition and distance transformation combined with outer contour extraction algorithms and Euclidean distance transformation algorithms provide quantitative support for skeleton extraction. These technical features rely on their synergistic relationship to form a complete path of image preprocessing, mask extraction, and distance quantization, completely solving the defects of complex fracture contours, large extraction deviations, and reliance on manual methods in existing technologies. This achieves automated and precise extraction of fracture regions and improves the stability of the entire processing flow.

[0015] 2. This invention, based on a pure crack mask and a distance transformation matrix, initially purifies the skeleton image through flow velocity thresholding to meet the needs of seepage simulation. Then, it eliminates redundant short branches through neighborhood connectivity analysis and short branch deletion combined with branch length thresholding. Finally, it transforms the skeleton image into a standardized digital coordinate sequence through skeleton point sequence construction combined with coordinate extraction and combination methods. The above technical features rely on their synergistic relationship to form the path for initial skeleton purification, redundant branch deletion, and digital transformation, effectively solving the problems of skeleton line offset and disorder, resulting in a smooth, complete, and optimized skeleton that closely matches the actual crack morphology. This achieves a standardized digital representation of the crack skeleton, providing a reliable foundation for subsequent 3D modeling.

[0016] 3. This invention, based on a standardized skeleton point sequence, obtains accurate unit tangent vectors through tangent vector calculation combined with differentiated difference algorithms and normalization processing. Then, by combining normal vector calculation with 3D corner point coordinate solving, tangent vector rotation, adjustable fracture parameters, and diverse fracture sheet geometries, the two-dimensional skeleton points are transformed into 3D corner point coordinates. Finally, a 3D fracture network model is constructed, combining all 3D fracture sheets to form a complete model. The above technical features rely on their synergistic relationship to form the technical path of tangent vector calculation, 3D corner point solving, and network model construction, breaking down the 2D-to-3D conversion barrier. This results in a 3D fracture network model with clear geometric structure, quantifiable parameters, and adaptability to different seepage simulation needs. It completely solves the core defect in existing technologies where digital models cannot be directly used for seepage simulation, improving the efficiency and accuracy of reservoir microfracture research. Attached Figure Description

[0017] Figure 1 This is a flowchart of the reservoir micro-fracture extraction and digital modeling method based on flow field simulation of the present invention. Figure 2 This is a schematic diagram illustrating the principle of the crack skeleton extraction algorithm of the present invention; Figure 3This is a schematic diagram of the crack recognition and skeleton extraction effect of the present invention; where A is the original microscopic crack image to be extracted, B is a schematic diagram of the crack contour extraction effect, and C is a schematic diagram of the crack flow velocity field construction and flow velocity threshold filtering effect. Figure 4 This is a schematic diagram illustrating the crack branch tracking and noise reduction effect of the present invention; Figure 5 This is a schematic diagram illustrating the construction effect of the three-dimensional crack network model of the present invention. Detailed Implementation

[0018] The technical solutions of 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 some embodiments of the present invention, and 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.

[0019] Please see Figure 1 As shown, this invention provides a method for extracting and digitally modeling reservoir microfractures based on flow field simulation. This method includes the following steps: Step S1: Acquire the original image containing crack information using an image acquisition device. The original image can be stored in formats such as RGB or BGR. Preprocess the original image, specifically including: The original image is converted from the BGR color space to the RGB color space for easier display, and then from the RGB color space to the HSV, Lab, or YCbCr color spaces for color feature analysis. In this embodiment, the HSV color space is preferred. The HSV color space divides color into three components: hue (H), saturation (S), and value (V). The hue component can effectively distinguish the red crack from the background, laying the foundation for subsequent thresholding.

[0020] Step S2: Extract a crack region mask from the preprocessed original image based on a preset crack region extraction threshold, and perform morphological closing operation on the crack region mask to obtain a clean crack mask.

[0021] Specifically, in the preprocessed original image, the Zhang-Suen thinning algorithm or a centerline extraction algorithm based on the Voronoi diagram is used to extract the crack region mask. Pixels within a preset crack region extraction threshold range are used as the crack region mask. The crack region extraction threshold is a red dual-interval threshold. Since red spans the boundaries of 0 degrees and 360 degrees on the color wheel, two intervals need to be set to completely cover the red range. In this red dual-interval threshold: The hue range of the first interval is 0~10°; The hue range of the second interval is 160~180°; The saturation range for both the first and second intervals is 40~255°; The brightness range of both the first and second intervals is 40~255°; The cv2.inRange function is used to generate red crack masks corresponding to the first and second intervals in the preprocessed original image, respectively. The red crack masks corresponding to the first and second intervals are then merged into a crack region mask by a logical OR operation.

[0022] Furthermore, the method for performing morphological closing operations on the mask of the crack region specifically includes: The tiny voids inside the initial crack region mask are filled with elliptical structural elements with a kernel size of 3×3, and the broken crack segments are connected to obtain a complete crack region mask. Perform connected component analysis, calculate the area of ​​each connected region in the complete crack region mask, and delete connected regions with an area smaller than a preset area threshold to obtain a pure crack mask; The preset area threshold is 200~500 pixels.

[0023] Step S3: An outer contour extraction algorithm, such as the `cv2.findContours` function, is used to identify the boundary contour of the clean crack mask. The Euclidean distance (L2 distance) transformation algorithm is then used to calculate the minimum geometric distance between each pixel within the clean crack mask and its boundary contour, generating a distance transformation matrix. This distance transformation matrix is ​​equivalent to the flow velocity field within the crack. According to fluid mechanics principles, the flow of fluid within the crack conforms to Poiseuille's law; the flow velocity `v` in the crack is proportional to the square of the distance `r` from the crack wall. That is, the wider the crack (the farther from the edge), the greater the "flow velocity" at the center, while the tiny capillary branches, due to their extremely small width, have extremely low "flow velocities." Based on this principle, the distance from each pixel to the nearest background (crack boundary contour) is calculated, and then the distance is calculated using the formula v=r. 2 The relative flow velocity is calculated, and a relative flow velocity field of the virtual fluid is constructed.

[0024] Step S4: Map the distance transformation matrix onto the clean crack mask, and remove pixels in the clean crack mask whose flow velocity exceeds a preset flow velocity threshold to obtain a skeleton image. Specifically, since the width of the small branches of the crack is extremely small, their relative flow velocity value is extremely low. Therefore, based on this physical characteristic, a minimum relative flow velocity threshold can be set to remove pixels in the clean crack mask whose flow velocity value is lower than the minimum relative flow velocity threshold, thereby stripping away the small branches that are not the main trunk and obtaining the main trunk feature contour of the crack—the skeleton image.

[0025] Step S5: Define a neighborhood connectivity function, calculate the number of connected vertices in the 8-neighborhood or 4-neighborhood of each pixel in the skeleton image, and obtain the corresponding pixel length; for example... Figure 2 As shown, all pixels in the skeleton image are traversed, and points with a connectivity of 1 are counted as endpoints. A branch tracing function is defined, and the skeleton is traced step by step from the endpoints, recording the branch paths. During the tracing process, backtracking is avoided, and the process terminates when a branch point is reached (e.g., connectivity greater than 2) or the maximum tracing length is reached. A branch length threshold is set to 10-50 steps, with a preferred value of 30 steps. Short branches with pixel lengths less than the set threshold are deleted, retaining the main crack skeleton, resulting in the optimized crack skeleton.

[0026] Step S6: Extract the two-dimensional coordinates of all pixels in the optimized crack skeleton and arrange them sequentially according to a preset arrangement rule to form a skeleton point sequence. Specifically, extract the row and column coordinates of all pixels with positive pixel values ​​in the optimized crack skeleton, and use the np.column_stack function to combine the extracted row and column coordinates of each pixel into a two-dimensional point set. The row and column coordinates of each pixel in the two-dimensional point set are arranged sequentially according to the image scanning order to form a one-to-one skeleton point sequence, which is used to reflect the spatial direction of the crack.

[0027] Step S7, calculate the tangent vector direction of each pixel in the skeleton point sequence, specifically including: For the first pixel in the skeleton point sequence, the backward difference algorithm is used to calculate the corresponding tangent vector; for the last pixel in the skeleton point sequence, the forward difference algorithm is used to calculate the corresponding tangent vector; for the remaining pixels in the skeleton point sequence, the forward difference algorithm, center difference algorithm, or backward difference algorithm is used to calculate the corresponding tangent vector; for example, for the i-th point in the skeleton point sequence, when i is the first pixel (starting point), the tangent vector is p. [i+1] -p [i] When i is the tail pixel (termination point), the tangent vector is p. [i] -p [i-1] For the intermediate point, the tangent vector is p. [i+1] -p [i-1] , where p [i] p is the tangent vector of the current pixel. [i+1] p is the tangent vector of the adjacent preceding pixel. [i-1] This is the tangent vector of the next adjacent pixel. The tangent vectors of each pixel in the skeleton point sequence are normalized to obtain a unit tangent vector array with a consistent pixel length (e.g., all pixels having a length of 1).

[0028] Step S8: Calculate the corresponding normal vector based on the tangent vector direction of each pixel in the skeleton point sequence. Combined with preset crack width and crack half-height parameters, calculate the coordinates of several corner points of the three-dimensional crack sheet corresponding to each pixel in the skeleton point sequence. Specifically, rotate the tangent vector of each pixel in the skeleton point sequence by 90 degrees to obtain the corresponding normal vector. Set the crack width and crack half-height parameters according to the actual simulation requirements, and calculate the two-dimensional coordinates (x, y) of each pixel in the skeleton point sequence and the coordinates of 3, 4, or 6 corner points of its normal vector. Connect adjacent coordinates of each pixel in turn to generate the geometric shape of the three-dimensional crack sheet. This geometric shape can be a triangle, quadrilateral, or hexagonal structure. In this embodiment, the preferred geometric shape of the three-dimensional crack sheet is a quadrilateral structure, i.e., a set of quadrilateral crack sheets is generated by constraining the coordinates of the four corner points of each pixel.

[0029] Step S9: Combine the coordinates of several corner points of the three-dimensional crack patch corresponding to each pixel in the skeleton point sequence to construct a three-dimensional crack network model. In this embodiment, as shown... Figure 5 As shown, each three-dimensional crack segment is a quadrilateral structure in space, and the set of these quadrilateral crack segments represents the geometry of the three-dimensional crack network.

[0030] In the above methodological steps, from the perspective of image processing theory, the HSV color space can effectively separate color information, and red thresholding, based on the periodic characteristics of hue components, can accurately identify red crack regions. Morphological closing operations, through a combination of dilation and erosion, can fill the tiny voids inside the cracks and connect the broken segments, maintaining the basic shape of the cracks. Connected component analysis, based on the connected component algorithm in graph theory, can effectively remove isolated noise regions.

[0031] Reference Figures 2-5 As shown, the experimental results indicate that the present invention uses a flow field simulation method to extract the reservoir micro-fracture skeleton, which breaks the limitations of purely geometric morphological processing. Based on physical laws, the extraction of reservoir micro-fractures is driven, and the extraction results satisfy the fluid flow law in the fractures and can be directly coupled with seepage simulation.

[0032] The feasibility of the above method and steps is verified from a geometric perspective. The calculation of the tangent vector and normal vector is based on curve theory in differential geometry. The central difference method approximates the calculation of the derivative of the curve, which can accurately reflect the direction of the curve at each point. The rotation transformation of the normal vector ensures that the normal of the crack plate is perpendicular to the crack direction, which conforms to the physical morphological characteristics of the crack. The four corner points of the crack plate are obtained by offsetting the normal vector, ensuring that the crack plate has a uniform thickness and a specified height.

[0033] The feasibility of the above methods and steps is verified from an engineering application perspective, such as... Figure 5As shown, the three-dimensional DFN model generated by this invention adopts a polyhedral set representation, which is compatible with the data format of mainstream numerical simulation software and can be directly imported for analysis of seepage, stress, stability, etc. The crack width and height parameters can be set according to actual exploration data, making the model closer to real geological conditions. It should be noted that: the DNF model refers to a disjunctive normal form logical expression, which is composed of multiple conjunctions connected by a logical OR, and is essentially an interpretable set of Boolean rules.

[0034] In a preferred embodiment of the present invention, the resolution of the image to be processed is 1024×768 pixels, and the red threshold is set as follows: H[0, 10], S[40, 255], V[40, 255] in the first interval; H[160, 180], S[40, 255], V[40, 255] in the second interval, and the connected component area threshold is 300 pixels; the crack contour recognition effect obtained by processing according to steps S1 to S3 of the above method is shown in the figure. Figure 3 As shown.

[0035] In the above method steps, the maximum branch tracing length is set to 1000 steps, the branch length threshold is set to 30 steps, and steps S4 to S5 are used to process the data to obtain the following results: Figure 4 The diagram shows the skeleton denoising optimization effect.

[0036] In the above method steps, the crack width is set to 0.002 meters, the crack half-height is set to 25 meters, and steps S8 to S9 are used to generate the following... Figure 5 The diagram shows a three-dimensional crack effect.

[0037] Processing time test: In the three-dimensional crack network model constructed in this invention, the number of endpoints is 28, the number of three-dimensional crack segments is 1845, and the model generation time is 11.5 seconds.

Claims

1. A method for extracting and digitally modeling reservoir microfractures based on flow field simulation, characterized in that, Includes the following steps: S1. Obtain the original image containing crack information; S2. Extract a crack region mask from the original image based on a preset crack region extraction threshold, and perform a morphological closing operation on the crack region mask to obtain a clean crack mask. S3. Identify the boundary contour of the pure crack mask, calculate the minimum geometric distance between each pixel in the pure crack mask and its boundary contour, and generate a distance transformation matrix. S4. Map the distance transformation matrix onto the clean crack mask, and remove pixels in the clean crack mask whose flow velocity exceeds a preset flow velocity threshold to obtain a skeleton image. S5. Define a neighborhood connectivity function, calculate the number of connected points of each pixel in the skeleton image in the 8-neighborhood or 4-neighborhood, and obtain the corresponding pixel length; traverse all pixels in the skeleton image, delete short branches whose pixel length is less than the set branch length threshold, and obtain the optimized crack skeleton. S6. Extract the two-dimensional coordinates of all pixels in the optimized crack skeleton and arrange them sequentially according to the preset arrangement rules to form a skeleton point sequence. S7. Calculate the tangent vector direction of each pixel in the skeleton point sequence; S8. Calculate the corresponding normal vector according to the tangent vector direction of each pixel in the skeleton point sequence, and calculate the coordinates of several corner points of the three-dimensional crack sheet corresponding to each pixel in the skeleton point sequence in combination with the preset crack width parameter and crack half height parameter. S9. Combine the coordinates of several corner points of the three-dimensional crack sheet corresponding to each pixel in the skeleton point sequence to construct a three-dimensional crack network model.

2. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, S1 further includes preprocessing the original image, specifically including: The original image is converted from the BGR color space to the RGB color space, and then from the RGB color space to the HSV color space, Lab color space, or YCbCr color space for color feature analysis.

3. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, In step S2, the crack region mask is extracted from the preprocessed original image using the Zhang-Suen thinning algorithm or the centerline extraction algorithm based on the Voronoi diagram. The crack region extraction threshold is a red dual-interval threshold, in which: The hue range of the first interval is 0~10°; The hue range of the second interval is 160~180°; The saturation range for both the first and second intervals is 40~255°; The brightness range of both the first and second intervals is 40~255°; The cv2.inRange function is used to generate red crack masks located in the first and second intervals in the preprocessed original image, respectively. The red crack masks in the first and second intervals are then merged into a crack region mask by a logical OR operation.

4. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 2, characterized in that, The method for performing morphological closing operations on the crack region mask in step S2 specifically includes: The tiny voids inside the initial crack region mask are filled with elliptical structural elements with a kernel size of 3×3, and the broken crack segments are connected to obtain a complete crack region mask. Perform connected component analysis, calculate the area of ​​each connected region in the complete crack region mask, and delete connected regions with an area smaller than a preset area threshold to obtain a pure crack mask; The preset area threshold is 200~500 pixels.

5. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, In step S3, an outer contour extraction algorithm is used to identify the boundary contour of the pure crack mask.

6. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, In step S3, the Euclidean distance transformation algorithm is used to calculate the minimum geometric distance between each pixel in the pure crack mask and its boundary contour.

7. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, In step S5, the set branch length threshold is 10 to 50 steps.

8. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, In step S6, the row and column coordinates of all pixels with positive pixel values ​​in the optimized crack skeleton are extracted, and the np.column_stack function is used to combine the extracted row and column coordinates of each pixel into a two-dimensional point set to form a skeleton point sequence.

9. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, In step S7, the method for calculating the tangent vector of each pixel in the skeleton point sequence specifically includes: The backward difference algorithm is used to calculate the corresponding tangent vector for the first pixel in the skeleton point sequence; The forward difference algorithm is used to calculate the corresponding tangent vector for the tail pixels in the skeleton point sequence; The corresponding tangent vector is calculated for the remaining pixels in the skeleton point sequence using a forward difference algorithm, a center difference algorithm, or a backward difference algorithm; The tangent vectors of each pixel in the skeleton point sequence are normalized to obtain a unit tangent vector array with consistent pixel length.

10. The method for extracting and digitally modeling reservoir microfractures based on flow field simulation according to claim 1, characterized in that, In step S8, the tangent vectors of each pixel in the skeleton point sequence are rotated by 90 degrees to obtain the corresponding normal vectors. Based on the actual simulation requirements, the crack width parameter and crack half height parameter are set, and the two-dimensional coordinates of each pixel in the skeleton point sequence and the coordinates of 3, 4 or 6 corner points of its normal vector are calculated. The adjacent coordinates of each pixel are sequentially connected to generate the geometric shape of the three-dimensional crack sheet. The geometric shape is a triangular structure, a quadrilateral structure or a hexagonal structure.