Method for calculating water seal gas critical pressure gradient based on scanning electron microscope picture data
By binarizing and vectorizing scanning electron microscope image data and combining it with boundary layer theory, the critical pressure gradient of water-sealed gas is calculated, which solves the problem of lack of quantitative evaluation of the critical pressure gradient of water-sealed gas in the existing technology and improves the efficiency of gas reservoir development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PETROCHINA CO LTD
- Filing Date
- 2022-06-28
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies lack quantitative evaluation methods for the critical pressure gradient of water-sealed gas, which limits the effectiveness of gas reservoir development and makes it impossible to effectively eliminate the water-sealed gas effect.
Based on scanning electron microscope (SEM) image data, this paper calculates the critical pressure gradient of water-sealed gas through binarization processing and vector graphics analysis, combined with boundary layer theory, and provides a quantitative evaluation method.
This study enabled the quantitative evaluation of the critical pressure gradient of water-sealed gas, providing theoretical support for the efficient development of gas reservoirs and improving the recovery rate.
Smart Images

Figure CN117350181B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of gas reservoir engineering technology, and specifically relates to a method for calculating the critical pressure gradient of water-sealed gas based on scanning electron microscope image data. Background Technology
[0002] Currently, most gas reservoirs under development in my country produce water to varying degrees, with 40%-50% of them having active edge and bottom water. Water intrusion significantly reduces the effectiveness of gas reservoir development, and a large amount of natural gas reserves cannot be extracted due to the water-sealing effect. Therefore, there is an urgent need to propose theories and methods to effectively eliminate the water-sealing effect in gas reservoirs.
[0003] To address the problem of water-sealed gas, in the past decade or so, scholars at home and abroad have conducted relevant experiments and theoretical calculations on reservoir water-locking and water-sealed gas phenomena caused by water intrusion. Experimental aspects: (1) Scanning electron microscopy, CT imaging, high-pressure mercury intrusion, low-temperature nitrogen adsorption and percolation experiments were conducted on rocks to compare the hydration characteristics of different types of rocks (such as montmorillonite and illite) and to analyze the main factors affecting the release of water blockage by hydration time; (2) A transparent microscopic glass plate physical model was made by using laser etching technology to observe three microscopic seepage phenomena of water channeling, flow around and blockage of gas and water phases in fractured strata; (3) Adsorption experiments of nanoemulsions on rock surfaces were conducted to measure the fluid flow in porous media under different characteristic lengths, interfacial tensions and displacement pressure gradients; (4) Gas-water centrifugation experiments were conducted to obtain the lower limit of the effective seepage throat radius of gas reservoirs; (5) Nuclear magnetic resonance T2 spectroscopy, nuclear magnetic imaging and other means were used to obtain quantitative and visual characterization methods for the self-absorption water-locking damage of sandstone capillaries. Numerical calculations: (1) Numerical simulation of water locks using capillary effect and Jamin effect; (2) Numerical simulation of water locks using phase hysteresis, capillary force hysteresis and permeation; (3) Simulation of single-pore single-permeability and multi-pore multi-permeability reservoirs; (4) Consideration of artificial fracturing and the influence of edge and bottom water; (5) Simulation of new concepts such as water seal critical value, thermodynamic water lock and dynamic water lock.
[0004] Existing experimental studies mainly involve the observation of phenomena, and the macroscopic or microscopic mechanisms of water-sealed gas are summarized through the analysis of experimental phenomena. In terms of numerical calculations, capillary and Jamin effects from the 1950s and 1960s are mainly used, and there is currently a lack of quantitative evaluation methods for the critical pressure gradient of water-sealed gas. Summary of the Invention
[0005] To address the above problems, this invention proposes a method for calculating the critical pressure gradient of water-sealed gas based on scanning electron microscope (SEM) image data, comprising the following steps:
[0006] Step S1: Obtain thin section images of the rock in the water-sealed gas formation using a scanning electron microscope;
[0007] Step S2: Extract rock thin section image data and perform binarization processing on the rock thin section image to obtain a binarized image of the rock thin section;
[0008] Step S3: Convert the binary image of the rock thin section into a vectorized image of pores and throats, analyze the vectorized image of pores and throats, characterize the microstructure of pores and throats, and obtain the structural parameters of pores and throats.
[0009] Step S4: Establish the relationship between pore-throat structural parameters and flow parameters using boundary layer theory to obtain the critical pressure gradient of water-sealed gas.
[0010] Furthermore, step S2 specifically includes:
[0011] Step S2.1: Obtain the width w and height h of a scanning electron microscope image of a rock thin section, and simultaneously generate a threshold T using random numbers;
[0012] Step S2.2: For the pixel data P(i,j) of the scanning electron microscope image of each rock thin section, where i is the row and j is the column, divide the pixel data P(i,j) into object pixel data F and background pixel data B according to the threshold map.
[0013] Step S2.3: Calculate the average value of the object pixel data F as F1 and the average value of the background pixel data B as B1, thereby obtaining a new threshold T' = (F1 + B1) / 2;
[0014] Step S2.4: Repeat steps S2.2-S2.3, using the new threshold to continue decomposing each pixel data P(i,j) to obtain object and background pixel data, until the calculated new threshold is equal to the average value T of the previous threshold. Ave ;
[0015] Step S2.5: Scan the value of each pixel in all images and obtain the threshold T by combining it with the value obtained in step S2.4. Ave Comparison; greater than T Ave Defined as white, otherwise black, thus obtaining a binarized image of the rock thin section scanning electron microscope image.
[0016] Furthermore, step S2 is programmed using Matlab, and the Matlab programming code is as follows:
[0017] (1) Read the scanning electron microscope image of a rock thin section: I = imread('image file name');
[0018] (2) Automatically determine the binarization threshold: thresh = graythresh(I);
[0019] (3) Obtain the binary image of the rock thin section scanning electron microscope by gray level calculation: A = im2bw(I, thresh); thresh = 0.5 means that all pixels with a gray level below 128 are turned into black, and all pixels with a gray level above 128 are turned into white.
[0020] Furthermore, step S3 specifically includes:
[0021] Step S3.1: Determine the resolution R of the scanning electron microscope image of the rock thin section;
[0022] Step S3.2: On the binary image of the scanning electron microscope image of the rock thin section, compare pixels P(i,j) and P(i+1,j). If P(i,j) is black and P(i+1,j) is white, then P(i,j) is a point on the throat or pore boundary line and is defined as L(i,j).
[0023] Step S3.3: Based on the image width w and height h in step S2, first fix the height and then fix the width, and perform a double loop on step S3.2 to obtain the throat or pore boundary line L;
[0024] Step S3.4: Convert the pixels on the throat or pore boundary line L into actual size using the formulas: x = R × i / w; y = R × j / h, to extend the binary image to a vector image.
[0025] Step S3.5: Given a height, scan the binary image of the rock thin section, record all line segments that pass through the black area in the scan line, and record the endpoint pixel value of each line segment; traverse the entire height of the binary image of the rock thin section to obtain the pore-throat morphology.
[0026] Furthermore, step S4 specifically includes:
[0027] Step S4.1: Simplify the pore-throat morphology and obtain an ideal pore-throat model to get the throat half-width;
[0028] Step S4.2: Based on boundary layer theory, obtain the gas-water two-phase distribution diagram according to molecular dynamics simulation, and establish the relationship between boundary layer thickness, friction resistance and pore structure.
[0029] Step S4.3: Determine the critical pressure gradient of the water seal gas based on the relationship between the throat half-width and the boundary layer thickness.
[0030] Furthermore, in step S4.1, the pore-throat model is as follows: large pores are connected to multiple throats, and the throats are long and slender, serving as channels connecting the pores.
[0031] Furthermore, in step S4.2, the relationship between boundary layer thickness, friction resistance, and pore structure is as follows: δ represents the boundary layer thickness, L is the tortuous length in the porous medium; μ is the fluid viscosity; ρ is the fluid density; U ∞ It is the velocity of the gas flow at the throat inlet.
[0032] Furthermore, in step S4.2, the critical condition for water-sealed gas is that the boundary layer thickness equals half the throat width, i.e.:
[0033] b represents the width of the throat.
[0034] Furthermore, in step S4.2, the inlet gas velocity U of the throat is... ∞ for:
[0035] Furthermore, in step S4.3, the critical pressure gradient of the water seal gas... Δp is the pressure difference across the throat; according to the principle of conservation of energy, the kinetic energy of the gas inlet is equal to the pressure difference acting across the throat, that is:
[0036]
[0037] The present invention also provides a computer-readable storage medium having a computer program thereon, the computer program being executable by a processor to implement the steps of the above method.
[0038] In addition, the present invention also provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being executed by the processor to implement the steps of the above method.
[0039] This invention, based on molecular simulations of rock and gas-water two-phase flows, reveals that in porous media with microcracks, water is adsorbed on the rock surface while gas resides in the middle, and the water-gas accumulation and flow resemble a free shear layer of two different fluids. Therefore, based on scanning electron microscopy images of the rock, boundary layer theory is used to determine the critical pressure gradient of the water-sealed gas. Quantitatively evaluating the critical pressure gradient parameters for gas to overcome water lock provides a theoretical and methodological basis for removing the water-locked gas effect in gas reservoirs, which is of great significance for the efficient development of water-bearing gas reservoirs and improving recovery rates.
[0040] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating the method for calculating the critical pressure gradient of water seal gas based on scanning electron microscope image data in an embodiment of the present invention.
[0043] Figure 2a This is a scanning electron microscope image of a thin section of rock in an embodiment of the present invention; Figure 2b This is a binarized electron microscope scan of a rock thin section image in an embodiment of the present invention; Figure 2c This is a vector diagram of the topological structure of a rock thin section image in an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram illustrating the resolution of a scanning electron microscope image of a rock thin section in an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of a pore-throat characterization model for a binary image of a rock thin section.
[0046] Figure 5a A partial structural schematic diagram of the pore-throat characterization model for a binary image of a rock thin section; Figure 5b A schematic diagram of a simplified model for representing the pore-throat channel in a rock thin section image;
[0047] Figure 6 This is a gas-water two-phase distribution diagram obtained from molecular dynamics simulations;
[0048] Figure 7a A simplified diagram of the gas-water interface in a single throat with a gas passage where the boundary layer thickness at the outlet end is less than half the throat slit width. Figure 7b A simplified diagram of the gas-water interface in a single throat, where the boundary layer thickness at the outlet end is equal to half the slit width, representing the critical condition for water-sealed gas. Figure 7c A simplified diagram of a single-throat air-water interface to form an air-sealed water system, where gas in the void cannot pass through the throat flow; Figure 7d The actual pore size is a simplified diagram of a single-throat air-water interface where the tortuous length is used instead of the throat length.
[0049] Figure 8 This is a schematic diagram of the Blasius theoretical curve for the boundary layer. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0051] A first aspect of this invention provides a method for calculating the critical pressure gradient of water-sealed gas based on scanning electron microscope (SEM) image data, such as... Figure 1 As shown, the method includes the following steps: Step S1, acquiring thin-section images of rocks in the water-sealed gas formation using a scanning electron microscope; Step S2, extracting the thin-section image data and binarizing the thin-section images to obtain a binarized image of the thin-section; Step S3, converting the binarized image of the thin-section into a vectorized graph of pores and throats, analyzing the vectorized graph of pores and throats, characterizing the microstructure of pores and throats, and obtaining pore-throat structure parameters; Step S4, establishing the relationship between pore-throat structure and flow parameters using boundary layer theory to obtain the critical pressure gradient of the water-sealed gas.
[0052] The formula for calculating the critical pressure gradient of the water seal gas is:
[0053]
[0054] In equation (1), G is the critical pressure gradient of the water-sealed gas, in Pa / m; L is the characteristic length of the object, which can be expressed as the tortuous length in the porous medium, in m; b is the throat width, in m; μ is the gas viscosity under formation conditions, in Pa·s; and ρ is the gas density under formation conditions, in kg / m³. 3 .
[0055] The above step S2 specifically includes: Step S2.1, obtaining a scanning electron microscope image of a thin rock section (e.g., Figure 2a The width (w) and height (h) of the rock thin section scanning electron microscope image are calculated, and a threshold T is generated by random number generation. Step S2.2: For the pixel data P(i,j) of each rock thin section scanning electron microscope image (where i is the row and j is the column), the pixel data P(i,j) is divided into object pixel data F and background pixel data B according to the threshold map. Step S2.3: The average value of object pixel data F is calculated as F1, and the average value of background pixel data B is calculated as B1, thereby obtaining a new threshold T' = (F1 + B1) / 2. Step S2.4: Steps S2.2-S2.3 are repeated, and the new threshold is used to continue to decompose each pixel data P(i,j) to obtain object and background pixel data, until the calculated new threshold is equal to the average value of the previous threshold (called T). AveStep S2.5: Scan every pixel value of all images (double loop, first height then width), and obtain the threshold T with the result from step S2.4. Ave Comparison; greater than T Ave Defined as white, otherwise black, thus obtaining a binarized image of the core scan, such as... Figure 2b As shown.
[0056] In this embodiment of the invention, step S2 can also be implemented using Matlab programming, which is easier to do. The following is the Matlab programming code:
[0057] (1) Read the scanning electron microscope image of a rock thin section: I = imread('image file name'); The image file name can be of type JPG, BMP, PNG, etc.
[0058] (2) Automatically determine the binarization threshold: thresh = graythresh(I);
[0059] (3) Obtain the binary image of the rock thin section scanning electron microscope by gray level calculation: A = im2bw(I, thresh); thresh = 0.5 means that all pixels with a gray level below 128 are turned into black, and all pixels with a gray level above 128 are turned into white.
[0060] The above step S3 specifically includes: Step S3.1, determining the resolution R of the rock thin section scanning electron microscope image: such as Figure 3 As shown, there is a line segment labeled "1μm", which represents 56 pixels, and its resolution is 1000nm / 56; Figure 3 In the image, 225.6nm, 176.5nm, and 449.4nm represent the width of the cracks at the double arrows in the image. Step S3.2: On the binary image of the rock thin section scanning electron microscope image, compare pixels P(i,j) and P(i+1,j). If P(i,j) is black and P(i+1,j) is white, then P(i,j) is a point on the throat or pore boundary line, and is defined as L(i,j). Step S3.3: Based on the image width (w) and height (h) in step S2, first fix the height (corresponding to the "column" j of the matrix) and then fix the width (corresponding to the "row" i of the matrix), performing a double loop on step S3.2 to obtain the throat or pore boundary line L. Step S3.4: Convert the pixels on the throat or pore boundary line L to their actual size using the formulas: x = R × i / w; y = R × j / h, to extend the binary image to a vector image. Figure 2c As shown; Step S3.5, Characterization of pores or fissures: Given a height (corresponding to column j of the matrix), scan the binary image of the rock thin section, record all line segments that pass through the black area in the scan line, and record the endpoint pixel value of each line segment. For example... Figure 4The image shown is a binarized image of a rock scan thin section, depicting the pore-throat characterization. Figure 4 The lines shown have three segments that pass through the black area. The pixel coordinates of the two endpoints of each segment passing through the black area are (8, 197)-(50, 197), (136, 197)-(182, 197) and (228, 197)-(242, 197), respectively. The pore-throat morphology is obtained by traversing the height of the entire binary image of the rock thin section.
[0061] The above step S4 specifically includes: Step S4.1, pore-throat model characterization method: Through analysis of a large number of rock scanning electron microscope thin sections and binary images of rock thin sections, it was found that in most cases, a large pore is connected to multiple throats (e.g. Figure 5a (As shown). Therefore, this invention simplifies this type of structure as follows: Figure 5b The simplified model of the pore-throat representation under ideal conditions is shown. Figure 5b In the core, the pores have relatively large spaces, and the throats are long and narrow, serving as channels connecting the pores; Step S4.2, Boundary Layer Theory Calculation and Analysis: Through molecular dynamics simulation of the microscopic pores in the core, it was found that water, due to its polarity, is generally adsorbed on the solid surface. When gas flows in the water-bearing channels, an interface between different fluids is formed, and the shape of the interface is similar to that of a boundary layer (e.g., Figure 6 (As shown). Due to the low viscosity and high output of the gas, the gas velocity in the pipe is much greater than the water velocity in the boundary layer. Therefore, the throat can be abstracted as... Figures 7a-7d The flowing pattern shown. Figure 7a This indicates that the boundary layer thickness at the outlet end is less than the width of the throat half-slit, indicating the presence of a gas passage. Figure 7b This indicates that the boundary layer thickness at the outlet end is equal to half the gap width, which is the critical condition for water seal gas. Figure 7c This indicates the formation of an air-sealed water structure, where gas in the gaps cannot flow through the throat. Figure 7d This indicates that the actual pore size is represented by the tortuous length instead of the throat length. Based on... Figures 7a-7d The ideal model is given, and a detailed derivation of the calculation formula for the critical pressure gradient of the water-sealed gas in this invention is presented; Step 4.3, interfacial flow of the two fluids: Since the viscosity of gas is hundreds of times smaller than that of water, the gas output is much higher than that of water, resulting in a gas flow velocity much higher than that of water. When the gas flows, a flow interface is generated between the water and gas. Figure 6 The results of molecular dynamics simulations show that boundary layer theory can be used for this study.
[0062] According to the Navier-Stokes equations, considering the viscous forces of the fluid, the flow equation of the fluid can be written as follows:
[0063]
[0064] In equation (2), p is the pressure in Pa; μ is the fluid viscosity in Pa·s; and ρ is the fluid density under formation conditions in kg / m³. 3 ; It is a Kroneker quantity, and its component is δ. ij ; It is the pressure exerted on the fluid; The fluid velocity vector, with units of m / s, can be decomposed in two-dimensional space into v x and v y t represents time, measured in seconds (s). It is the Hamiltonian operator.
[0065] Considering that the boundary layer thickness is much smaller than the characteristic length L of the object (the characteristic length L can be understood as the tortuous length for porous media) and the flow reaches a steady state, the momentum conservation equation in two-dimensional space can be written as shown in equation (3):
[0066]
[0067] The mass conservation equation in two-dimensional space can be written as:
[0068]
[0069] Introducing the tortuous length L, in meters; and the characteristic velocity u, in meters per second, dimensionless the physical quantities in equations (3) and (4):
[0070]
[0071] L is the tortuosity length in the porous medium; U ∞ It is the inflow velocity of the gas at the throat inlet, measured in m / s.
[0072] Dimensionless equations can be written as:
[0073]
[0074]
[0075] In equation (5),
[0076] Order-of-magnitude analysis of each parameter: v' y ~δ', v' y ~δ;
[0077] Meanwhile, considering that the boundary layer is inviscid in the y-direction, equations (5) and (6) can be simplified to:
[0078]
[0079]
[0080]
[0081] The boundary conditions (boundary layer theory assumptions) are as follows:
[0082] When y = 0, v x =v y =0 (10)
[0083] When y→∞, v x =U ∞ (11)
[0084] Introducing Stream Functions Since the boundary is very thin, the pressure can be assumed to be constant, so equation (7) becomes:
[0085]
[0086] The boundary conditions become:
[0087] When y = 0,
[0088] When y→∞,
[0089] The solutions to the boundary layer equation (12) have similarity, that is, the dimensionless velocity is a function of the dimensionless distance.
[0090]
[0091] For throats in porous media There exists a functional relationship, which is given by the experimental data curves of (J. Nikuradse). The J curve shows that the curves coincide for different Re numbers (e.g., Figure 8 (As shown).
[0092] From equation (15), we get u = U ∞ f'(η) (16)
[0093] Displacement boundary layer thickness
[0094] In equation (16), x is the coordinate position along the tortuous length in the porous medium, in meters; μ is the fluid viscosity, in Pa·s; and ρ is the fluid density, in kg / m³. 3 ;U ∞ It is the inlet gas velocity of the throat, in m / s. The relationship between η and f(η) is given in Figure 7.
[0095] When the displacement boundary layer thickness at the outlet is equal to the throat half-width b / 2, it is the critical condition for water seal gas, and equation (17) can be rewritten as follows:
[0096] The inlet gas velocity U of the throat can be obtained from equation (18). ∞ :
[0097]
[0098] This is the kinetic energy of the gas inlet. According to the principle of conservation of energy, this kinetic energy is the pressure difference Δp acting on both ends of the throat. Therefore, the critical pressure gradient of the water seal gas is:
[0099]
[0100] In this embodiment of the invention, the relevant test parameters are shown in Table 1.
[0101] Table 1 Test Parameters
[0102]
[0103] In the binary representation of a rock thin section, select a throat, such as... Figure 5a The throat within the Chinese box has a tortuous length L of 83 μm and a throat width b of 24 μm. Substitute the parameters from Table 1 into formula (1):
[0104] The throat tortuosity length L is 83 μm, the throat width b is 24 μm, and the critical pressure gradient of the water seal gas of 100% methane at a formation pressure of 30 MPa and a formation temperature of 100 °C is 0.0485 MPa / m.
[0105] A second aspect of the present invention provides a computer-readable storage medium having a computer program thereon, the computer program being executable by a processor to implement the steps of the above-described method.
[0106] A third aspect of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being executed by the processor to implement the steps of the above-described method.
[0107] In summary, the method for calculating the critical pressure gradient of water-sealed gas designed in this invention, based on scanning electron microscopy images of rocks, uses boundary layer theory to obtain the critical pressure gradient of water-sealed gas, quantitatively evaluates the critical pressure gradient parameters for gas to break through water lock, and provides a theory and method for relieving the water-sealed gas effect in gas reservoirs. This is of great significance for the efficient development of water-bearing gas reservoirs and improving recovery rates.
[0108] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for calculating the critical pressure gradient of water-sealed gas based on scanning electron microscope (SEM) image data, comprising the following steps: Step S1: Obtain thin section images of the rock in the water-sealed gas formation using a scanning electron microscope; Step S2: Extract rock thin section image data and perform binarization processing on the rock thin section image to obtain a binarized image of the rock thin section; Step S2 specifically includes: Step S2.1: Obtain the width w and height h of a scanning electron microscope image of a rock thin section, and simultaneously generate a threshold T using random numbers; Step S2.2: Pixel data of scanning electron microscope images of each rock thin section. ;in, For the purpose of action, For columns, pixel data are sorted by threshold map. It is divided into object pixel data F and background pixel data B; Step S2.3: Calculate the average value of the object pixel data F as F1 and the average value of the background pixel data B as B1, thereby obtaining a new threshold. ; Step S2.4: Repeat steps S2.2-S2.3, using the new threshold to continue processing each pixel data. The process involves decomposing the data to obtain the pixel data of the object and the background, continuing until the calculated new threshold equals the average of the previous threshold. ; Step S2.5: Scan the value of each pixel in all images and obtain the threshold value from step S2.
4. Compare; greater than Defined as white, otherwise black, thus obtaining a binarized image of the rock thin section scanning electron microscope image; Step S3: Convert the binary image of the rock thin section into a vectorized image of pores and throats, analyze the vectorized image of pores and throats, characterize the microstructure of pores and throats, and obtain the structural parameters of pores and throats. Step S3 specifically includes: Step S3.1: Determine the resolution of the scanning electron microscope image of the rock thin section. ; Step S3.2: Compare pixels on the binary image of the rock thin section scanning electron microscope image. and ,if It is black and It is white. It is a point on the boundary line of the throat or pore, and is defined as follows: ; Step S3.3: Based on the image width w and height h in step S2, first fix the height and then fix the width, and perform a double loop on step S3.2 to obtain the throat or pore boundary line L; Step S3.4: Convert the pixels on the throat or aperture boundary line L to their actual size using the formula: ; This enables the extension of binary images to vector graphics; Step S3.5: Given a height, scan the binary image of the rock thin section, record all line segments that pass through the black area in the scan line, and record the pixel value of the endpoint of each line segment; traverse the entire height of the binary image of the rock thin section to obtain the pore-throat morphology. Step S4: Establish the relationship between pore-throat structural parameters and flow parameters using boundary layer theory to obtain the critical pressure gradient of water-sealed gas; Step S4 specifically includes: Step S4.1: Simplify the pore-throat morphology and obtain an ideal pore-throat model to get the throat half-width; Step S4.2: Based on boundary layer theory, obtain the gas-water two-phase distribution diagram according to molecular dynamics simulation, and establish the relationship between boundary layer thickness, friction resistance and pore structure. Step S4.3: Determine the critical pressure gradient of the water seal gas based on the relationship between the throat half-width and the boundary layer thickness.
2. The method according to claim 1, wherein, Step S2 uses Matlab programming. The Matlab programming code is as follows: (1) Read the scanning electron microscope image of a rock thin section: I=imread('image file name'); (2) Automatically determine the binarization threshold: thresh=graythresh(I); (3) Obtain the binary image of the rock thin section scanning electron microscope by gray level calculation: A=im2bw(I,thresh); thresh=0.5 means that all pixels with gray level below 128 are turned into black, and all pixels with gray level above 128 are turned into white.
3. The method according to claim 1, wherein, In step S4.1, the pore-throat model is as follows: large pores are connected to multiple throats, and the throats are long and narrow, serving as channels connecting the pores.
4. The method according to claim 1, wherein, In step S4.2, the relationship between boundary layer thickness, friction resistance, and pore structure is as follows: , Indicates the boundary layer thickness. The tortuous length in a porous medium; μ For fluid viscosity; ρ For fluid density; It is the velocity of the gas flow at the throat inlet.
5. The method according to claim 4, wherein, In step S4.2, the critical condition for water-sealed gas is when the boundary layer thickness equals half the throat width, i.e.: b is the width of the throat.
6. The method according to claim 5, wherein, In step S4.2, the inlet gas velocity of the throat is... for: .
7. The method according to claim 5, wherein, In step S4.3, the critical pressure gradient of the water seal gas. , Let be the pressure difference across the throat; according to the principle of conservation of energy, the kinetic energy of the gas inlet is equal to the pressure difference acting across the throat, that is: .
8. A computer-readable storage medium, wherein, It contains a computer program that can be executed by a processor to implement the steps of the method according to any one of claims 1 to 7.
9. A computer device, wherein, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being executed by the processor to perform the steps of the method according to any one of claims 1 to 7.