Determination method and device of defoaming agent filling time and electronic equipment
By calculating the downward and upward time of the foaming agent in the gas well, combined with the gas well structural parameters and production capacity data, the defoaming agent injection time is scientifically determined, solving the problem of improper defoaming time affecting foam drainage and gas production, and optimizing the gas well production capacity.
Patent Information
- Application Number
- CN202410315036.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-09-19
AI Technical Summary
The lack of a scientific method to determine the defoaming agent injection time results in the defoaming time being too early or too late, which affects the effect of the foam drainage and gas production process.
By calculating the descending and ascending time of the foaming agent in the gas well and combining it with the gas well structural parameters and production capacity data, the injection time of the defoaming agent can be determined.
The scientific determination of defoamer injection time is achieved, the foam drainage and gas production process effect is optimized, and the gas well production capacity is improved.
Smart Images

Figure CN120671313A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gas reservoir drainage and gas production, and in particular to a method, device and electronic equipment for determining the defoaming agent filling time. Background Art
[0002] Water-producing gas wells will generally produce water in the middle and late stages of their lifespan, leading to bottomhole liquid accumulation and reduced gas well production. Relevant process measures must be implemented to drain the wellbore liquid and restore gas well production. The foam drainage gas recovery process uses a foaming agent to mix with the gas and liquid in the wellbore to form foam, thereby reducing liquid slippage during wellbore flow, improving gas drainage capacity, reducing bottomhole back pressure, and improving or restoring gas well production.
[0003] However, there is currently a lack of methods to determine the defoaming agent injection time. Defoaming that is too early or too late will affect the effect of the foam drainage and gas production process. Therefore, scientifically determining the defoaming agent injection time is extremely important for improving the effect of the foam drainage process. Summary of the Invention
[0004] The present invention provides a method, a device and an electronic device for determining the defoaming agent filling time, so as to realize the determination of the defoaming agent filling time.
[0005] According to one aspect of the present invention, a method for determining a defoaming agent filling time is provided, comprising:
[0006] Calculating the time it takes for the foaming agent to flow from the wellhead to the tubing shoe in the target gas well according to the gas well structure parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well;
[0007] The well section between the wellhead and the tubing shoe in the target gas well is divided into a plurality of well sections to be calculated, and each of the well sections to be calculated is sequentially used as a target well section from bottom to top, and the production capacity data corresponding to the target gas well is calculated when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section;
[0008] determining convergence of the production capacity data, and if the convergence of the production capacity data is convergence, calculating a rise time of the foam from the tubing shoe to the target well section based on the production capacity data;
[0009] The defoaming agent injection time corresponding to the target gas well is determined based on the descending time and the ascending time corresponding to each target well section.
[0010] According to another aspect of the present invention, there is provided a device for determining a defoaming agent filling time, comprising:
[0011] a descending time determination module, configured to calculate the descending time of the foaming agent from the wellhead to the tubing shoe in the target gas well according to the gas well structural parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well;
[0012] a production capacity data determination module, configured to divide the well section between the wellhead and the tubing shoe in the target gas well into a plurality of well sections to be calculated, and sequentially select each of the well sections to be calculated as a target well section from bottom to top, and calculate the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section;
[0013] a rise time determination module, configured to determine the convergence of the production capacity data, and if the convergence of the production capacity data is convergence, calculate the rise time of the foam from the tubing shoe to the target well section based on the production capacity data;
[0014] The injection time determination module is used to determine the defoaming agent injection time corresponding to the target gas well based on the descending time and the ascending time corresponding to each target well section.
[0015] According to another aspect of the present invention, an electronic device is provided, comprising:
[0016] at least one processor;
[0017] and a memory communicatively coupled to the at least one processor;
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for determining the defoaming agent filling time described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining the defoaming agent filling time according to any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention calculates the descending time of the foaming agent from the wellhead to the tubing shoe through the gas well structure parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well; then, the well section between the wellhead and the tubing shoe in the target gas well is divided into multiple well sections to be calculated, and each well section to be calculated is taken as the target well section in turn from bottom to top, and the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section is calculated; finally, the convergence of the production capacity data is judged. If the convergence of the production capacity data is convergent, the rising time of the foam from the tubing shoe to the target well section is calculated based on the production capacity data; based on the descending time and the rising time corresponding to each target well section, the defoaming agent filling time corresponding to the target gas well is determined, so as to solve the problem that the defoaming time is too early or too late and affects the effect of the foam water drainage and gas production process, realize the determination of the defoaming agent filling time, and provide a theoretical basis for the optimization design of the foam water drainage and gas production process.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flow chart of a method for determining the defoaming agent filling time provided in an embodiment of the present invention;
[0024] Figure 2 A schematic structural diagram of a device for determining defoaming agent filling time provided by an embodiment of the present invention;
[0025] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Figure 1 This is a flow chart of a method for determining the defoaming agent injection time provided by an embodiment of the present invention. This embodiment is applicable to the case of determining the defoaming agent injection time for water-producing gas wells. The method can be executed by a device for determining the defoaming agent injection time. The device can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0029] S110 , calculating a descending time of the foaming agent from the wellhead to the tubing shoe in the target gas well according to gas well structural parameters of the target gas well and basic parameters of the foaming agent added to the target gas well.
[0030] Among them, the target gas well can be a water-producing gas well for which the defoaming agent injection time needs to be determined; the structural parameters of the gas well refer to parameters such as the inner diameter, outer diameter and depth of the oil pipe of the target gas well; the basic parameters of the foaming agent refer to parameters such as the injection flow rate, viscosity and density of the foaming agent.
[0031] In an embodiment of the present invention, the calculation of the descent time of the foaming agent from the wellhead to the tubing shoe in the target gas well based on the gas well structural parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well includes: determining the hydraulic equivalent diameter based on the casing inner diameter and the tubing outer diameter of the target gas well, and determining the foaming agent liquid film thickness based on the injection flow rate, viscosity, density and the hydraulic equivalent diameter of the foaming agent; and calculating the descent time of the foaming agent from the wellhead to the tubing shoe based on the tubing depth of the target gas well, the hydraulic equivalent diameter, the foaming agent liquid film thickness and the foaming agent injection flow rate.
[0032] Specifically, the hydraulic equivalent diameter of the target gas well can be calculated using the following formula (1):
[0033]
[0034] In formula (1), Re is the hydraulic equivalent radius, in m; Do is the inner diameter of the casing, in m; Di is the outer diameter of the tubing, in m;
[0035] Then, the foaming agent liquid film thickness is calculated by formula (2):
[0036]
[0037] In formula (2), δ is the thickness of the liquid film, in m; Qf is the injection flow rate of the foaming agent, in m 3 / s; μf is the viscosity of the foaming agent, in Pa·s; ρf is the density of the foaming agent, in kg / m 3 ; g is the acceleration due to gravity, unit is m / s 2 .
[0038] After determining the foaming agent film thickness, the foaming agent film thickness, injection flow rate, hydraulic equivalent diameter and tubing depth are substituted into formula (3) to obtain the foaming agent's descending time from the wellhead to the tubing shoe.
[0039]
[0040] In formula (3), t1 is the time it takes for the foaming agent to descend from the wellhead to the tubing shoe, in seconds; Ht is the tubing depth, in meters.
[0041] S120: Divide the well section between the wellhead and the tubing shoe in the target gas well into multiple well sections to be calculated, and use each of the well sections to be calculated as a target well section in order from bottom to top, and calculate the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section.
[0042] Specifically, based on the length from the wellhead to the tubing shoe of the target gas well, the section between the wellhead and the tubing shoe is divided into multiple equally spaced sections according to pre-set division lengths, with each section serving as the target section. Each section is then selected as the target section from bottom to top, starting with the section closest to the tubing shoe. Once the target section is determined, the production capacity of the target gas well is calculated as the foam formed by the foaming agent, the wellbore gas, and the liquid rises from the tubing shoe to the target section. Furthermore, each section is selected as the target section, and the production capacity of the foam is calculated as it rises to the target section.
[0043] In an embodiment of the present invention, the calculation of the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section includes: determining historical production capacity data of the target gas well before the foam rises from the tubing shoe to the target well section, substituting the historical production capacity data into a gas-liquid flow rate conversion formula to determine the superficial gas flow rate and the superficial liquid flow rate corresponding to the target well section; calculating a target liquid holdup of the target well section based on the superficial gas flow rate and the superficial liquid flow rate, determining a mixing density of the target well section based on the target liquid holdup, and calculating a pressure drop of the target well section based on the mixing density, a friction coefficient, a length of the target well section, and the superficial gas flow rate; calculating a bottomhole flowing pressure of the target gas well based on the pressure drop of the target well section and the pressure drops of each well section to be calculated above the target well section, and determining the production capacity data corresponding to the target gas well when the foam rises from the tubing shoe to the target well section based on the bottomhole flowing pressure and a production capacity calculation formula.
[0044] It should be noted that if the target well section is the first well section to be calculated near the tubing shoe, the corresponding historical production capacity data can be understood as the gas and liquid production of the gas well before the addition of the foaming agent. If the target well section is not the first well section to be calculated near the tubing shoe, the production capacity data of the target gas well is calculated when the foam rises to the previous adjacent target well section, and this is used as the historical production capacity data for the current target well section.
[0045] Specifically, when the foaming agent mixes with the downhole fluid, foam is generated. The height from the tubing shoe to the wellhead is divided into N sections, and the height of each section is ΔH = Ho / N, where Ho is the height from the tubing shoe to the wellhead. In the height ΔH(j) (j = 1), due to the presence of foam, the effect of gas slippage can be ignored. The gas and liquid production at the wellhead is converted to the gas and liquid flow rate downhole by formula (4):
[0046]
[0047] In formula (4), Qg(i) is the gas production of the gas well at the i-th iteration, in m 3 / d; Ql(i) is the liquid production of the gas well in the i-th iteration, in m 3 / d; vsg(i) is the apparent gas velocity of the i-th iteration, in m / s; vsl(i) is the apparent liquid velocity of the i-th iteration, in m / s; Bg(i) is the natural gas volume coefficient of the i-th iteration, in m3 / m3; D is the inner diameter of the oil pipe, in m; Qg(0) is the gas production of the gas well before adding the foaming agent, in m3 / d; Ql(0) is the liquid production of the gas well before adding the foaming agent, in m3 / d; (i=1)
[0048] The natural gas volume coefficient is calculated by formula (5):
[0049]
[0050] In formula (5), psc is the pressure under standard conditions, in MPa; Tsc is the temperature under standard conditions, in K; Zg is the natural gas deviation coefficient; p(i) is the pressure of the target point at the i-th iteration, in MPa; T(i) is the temperature of the target point at the i-th iteration, in K. The pressure of the target point can be understood as the pressure at the target well section, and the temperature of the target point refers to the temperature or average temperature at the target well section.
[0051] Furthermore, by substituting the historical production capacity data into the gas-liquid flow rate conversion formula (4), the superficial gas flow rate and the superficial liquid flow rate of the target well section ΔH(j) can be obtained.
[0052] In this embodiment, the mixture velocity refers to the velocity of the gas-liquid mixture in the target well section, and the mixture density refers to the density of the gas-liquid mixture in the target well section. After obtaining the superficial gas flow rate and liquid flow rate of the target gas well, calculating the target liquid holdup of the target well section based on the superficial gas flow rate and the superficial liquid flow rate may include: calculating a mixed velocity based on the superficial liquid flow rate and the superficial gas flow rate, determining the target liquid holdup based on the ratio of the superficial liquid flow rate to the mixed velocity; and determining the mixed density of the target well section based on the target liquid holdup, the gas phase density, and the liquid phase density of the target well section.
[0053] Specifically, the superficial liquid velocity and the superficial gas velocity are added to obtain the mixing velocity. The ratio of the superficial liquid velocity to the mixing velocity is then used as the target liquid holdup. The mixing density is a function of the liquid holdup. By substituting the target liquid holdup and the gas and liquid densities of the target well section into the functional expression for the mixing density, the mixing density of the target well section can be calculated.
[0054] Liquid holdup within ΔH(j) height: Formula (6):
[0055]
[0056] Wherein, Hlf(i) is the liquid holdup at the height of the foam section ΔH(j), %.
[0057] Then, the mixed density of the target well section is determined based on the target liquid holdup, and the mixed density is calculated using formula (7):
[0058]
[0059] In formula (7), ρg(i) is the gas phase density of the i-th iteration, in kg / m3; ρl(i) is the liquid phase density of the i-th iteration, in kg / m3.
[0060] The gas phase density of the i-th iteration is calculated by formula (8):
[0061]
[0062] Where ρsc is the density of natural gas under standard ground conditions, in kg / m3.
[0063] Further, based on the mixed density, friction coefficient, the length of the target well section, and the superficial gas velocity, the pressure drop of the target well section is calculated, including: substituting the mixed density, friction coefficient, the length of the target well section, and the superficial gas velocity into the pressure drop calculation formula of the target well section to obtain the pressure drop of the target well section. The pressure drop at the height of ΔH(j) is calculated by formula (9):
[0064]
[0065] In formula (9), Δpf(i) is the pressure drop at the height of the foam section ΔH(j), in Pa; ρmf(i) is the density of the mixture in the foam section at the i-th iteration, in kg / m3; fm(i) is the friction coefficient at the i-th iteration, dimensionless; vmf(i) is the velocity of the mixture in the foam section at the i-th iteration, in m3 / s.
[0066] The mixture velocity vmf(i) in the foam section in the i-th iteration is expressed as:
[0067]
[0068] The friction coefficient is calculated using formula (11):
[0069]
[0070] In formula (11), e is the absolute roughness, dimensionless; Reg(i) is the gas phase Reynolds number of the i-th iteration, dimensionless, and its expression is:
[0071]
[0072] Wherein, μg is the gas phase viscosity, in Pa·s.
[0073] Finally, based on the pressure drop of the target well section and the pressure drop of each well section to be calculated above the target well section, the bottomhole flowing pressure of the target gas well is calculated. Based on the bottomhole flowing pressure and the production capacity calculation formula, the production capacity data corresponding to the target gas well when the foam rises from the tubing shoe to the target well section is determined. Specifically, the liquid holdup from the top of ΔH(j) to the wellhead depth is calculated. For values above ΔH(j), gas-liquid two-phase flow occurs. The new liquid holdup model expression for shale gas horizontal wells, established based on experimental testing and theoretical analysis, is:
[0074]
[0075] Where HL(i) is the liquid holdup of the i-th iteration of the gas-liquid two-phase flow at a height above ΔH(j), %;
[0076] The pressure drop from the top of ΔH(j) to the wellhead depth is calculated by formula (14):
[0077]
[0078] Where Δp(i) is the pressure drop of the gas-liquid two-phase flow from the top of ΔH(j) to the wellhead depth in the i-th iteration, in Pa;
[0079] Where, the mixture density ρm(i) and mixture velocity vm(i) from the top of ΔH(j) to the wellhead depth are calculated by the following equations (15) and (16):
[0080]
[0081]
[0082] Where ρm(i) is the density of the mixture from the top of ΔH(j) to the wellhead depth in the i-th iteration, in kg / m3; vm(i) is the velocity of the mixture from the top of ΔH(j) to the wellhead depth in the i-th iteration, in m3 / s;
[0083] Calculate the total wellbore pressure drop:
[0084]
[0085] Where Δptotal(i) is the total wellbore pressure drop, in Pa;
[0086] Calculate bottomhole flowing pressure:
[0087]
[0088] Where pwf(i) is the bottom hole pressure of the i-th iteration, MPa; p0 is the wellhead pressure, MPa;
[0089] The bottom hole gas production is further calculated based on the obtained bottom hole flowing pressure. The average formation pressure of the target block, the measured data of gas well productivity test and the previous production data are collected. Based on the measured data of gas well productivity test, the productivity index J is obtained by fitting using the least squares method. The empirical formula of gas well productivity commonly used in engineering is selected:
[0090]
[0091] Where Qg(i+1) is the gas well production at iteration (i+1) after iteration (i), in m³ / d; J is the gas production index (m³ / (d.MPa)); and pr is the average formation pressure (MPa). Qg(i+1) is the production capacity of the target gas well when the foam rises from the tubing shoe to the target well section.
[0092] S130: Determine the convergence of the production capacity data. If the convergence of the production capacity data is convergence, calculate the rise time of the foam from the tubing shoe to the target well section based on the production capacity data.
[0093] Specifically, if the calculated production capacity data is converged when the foam rises to the target well section, the height of the target well section is directly divided by the mixture velocity, and the resulting value is used as the rise time of the foam from the tubing shoe to the target well section.
[0094] On the basis of the above embodiment, the convergence of the production capacity data is judged. If the convergence of the production capacity data is convergence, the rise time of the foam from the tubing shoe to the target well section is calculated based on the production capacity data, including: determining a target difference between the production capacity data and the historical production capacity data, judging whether the production capacity data is converged based on a ratio of the target difference to the production capacity data and a preset threshold; if so, calculating the rise time of the foam from the tubing shoe to the target well section based on the production capacity data.
[0095] The target difference refers to the difference between the calculated capacity data and the historical capacity data, and the preset threshold refers to a pre-set threshold, for example, the preset threshold is ε below.
[0096] In an embodiment of the present invention, if the convergence of the production capacity data is non-convergence, the following process is repeatedly performed until the production capacity data converges: the production capacity data is corrected based on a preset ratio, and the corrected production capacity data is used as the historical production capacity data, and the production capacity data corresponding to the target gas well when the foam rises from the tubing shoe to the target well section is calculated based on the historical production capacity data.
[0097] Specifically, the convergence of the production capacity data is determined. If it does not converge, the production capacity data is corrected and used as historical production capacity data. The corrected production capacity data is then substituted into formula (4) to calculate the superficial gas velocity and liquid velocity, as well as the liquid holdup, pressure drop, and so on, and finally the new production capacity data is obtained. If the production capacity data converges at this point, it can be directly divided by the mixture velocity to obtain the rise time of the target well section. If it does not converge, the correction is continued until the calculated production capacity data converges.
[0098] It should also be noted that the above is an explanation of the rise time calculation process for one target well section. The remaining target well sections are similar and will not be described in detail here.
[0099] Convergence determination: If |Qg(i+1)-Qg(i)| / Qg(i+1)>ε, set Qg(1)=0.5(Qg(1)+Qg(0)), keep the production gas-liquid ratio unchanged, and repeat the calculation process of production capacity data until |Qg(i+1)-Qg(i)| / Qg(i+1)≤ε; end the iteration, assume that i+1=n at this time, obtain the gas production and liquid production of the gas well at this time, and then calculate the foam height rise time ΔH(j), and calculate the velocity of the mixture by formulas (4), (5), and (10);
[0100] Then, calculate the ΔH(j) height foam rise time t2(j) as:
[0101]
[0102] S140 : Determine a defoaming agent injection time corresponding to the target gas well based on the descending time and the ascending time corresponding to each target well section.
[0103] In an embodiment of the present invention, determining the defoaming agent injection time corresponding to the target gas well based on the downlink time and the rise time corresponding to each target well section includes: determining the target rise time based on the sum of the rise times corresponding to each target well section; and using the sum of the downlink time and the target rise time as the defoaming agent injection time.
[0104] Specifically, the foam rising time at the height of ΔH(j+1) is calculated. At this time, the foam at the height of ΔH(j) has already risen. According to the gas and liquid production after the iteration within the height of ΔH(j), the foam rising time t2(j+1) within the height of ΔH(j+1) is calculated. The solution is solved from bottom to top to the wellhead until j=N. At this time, the time when the foam reaches the wellhead is:
[0105]
[0106] Where t2(2) is the rising time obtained by iteration of the second foam segment, s; t2(N) is the rising time obtained by iteration of the Nth foam segment, s; and t2 is the target rising time. Finally, calculate the defoamer filling time:
[0107] t=t1+t2(22)
[0108] Among them, t is the defoaming agent filling time, and t1 is the descending time.
[0109] The technical solution of the embodiment of the present invention calculates the descending time of the foaming agent from the wellhead to the tubing shoe through the gas well structure parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well; then, the well section between the wellhead and the tubing shoe in the target gas well is divided into multiple well sections to be calculated, and each well section to be calculated is taken as the target well section in turn from bottom to top, and the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section is calculated; finally, the convergence of the production capacity data is judged. If the convergence of the production capacity data is convergent, the rising time of the foam from the tubing shoe to the target well section is calculated based on the production capacity data; based on the descending time and the rising time corresponding to each target well section, the defoaming agent filling time corresponding to the target gas well is determined, so as to solve the problem that the defoaming time is too early or too late and affects the effect of the foam water drainage and gas production process, realize the determination of the defoaming agent filling time, and provide a theoretical basis for the optimization design of the foam water drainage and gas production process.
[0110] Figure 2 Schematic diagram of a device for determining the time of adding defoaming agent provided by an embodiment of the present invention. Figure 2 As shown, the device includes:
[0111] A descending time determination module 210 is configured to calculate the descending time of the foaming agent from the wellhead to the tubing shoe in the target gas well based on the gas well structure parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well;
[0112] The production capacity data determination module 220 is configured to divide the well section between the wellhead and the tubing shoe in the target gas well into a plurality of well sections to be calculated, and sequentially select each well section to be calculated as a target well section from bottom to top, and calculate the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section;
[0113] a rise time determination module 230 for determining the convergence of the production capacity data, and if the convergence of the production capacity data is convergence, calculating the rise time of the foam from the tubing shoe to the target well section based on the production capacity data;
[0114] The injection time determination module 240 is configured to determine the defoaming agent injection time corresponding to the target gas well based on the descending time and the ascending time corresponding to each target well section.
[0115] The technical solution of the embodiment of the present invention calculates the descending time of the foaming agent from the wellhead to the tubing shoe through the gas well structure parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well; then, the well section between the wellhead and the tubing shoe in the target gas well is divided into multiple well sections to be calculated, and each well section to be calculated is taken as the target well section in turn from bottom to top, and the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section is calculated; finally, the convergence of the production capacity data is judged. If the convergence of the production capacity data is convergent, the rising time of the foam from the tubing shoe to the target well section is calculated based on the production capacity data; based on the descending time and the rising time corresponding to each target well section, the defoaming agent filling time corresponding to the target gas well is determined, so as to solve the problem that the defoaming time is too early or too late and affects the effect of the foam water drainage and gas production process, realize the determination of the defoaming agent filling time, and provide a theoretical basis for the optimization design of the foam water drainage and gas production process.
[0116] Optionally, the downlink time determination module 210 includes:
[0117] a foaming agent liquid film thickness determination submodule, configured to determine a hydraulic equivalent diameter according to the inner diameter of the casing and the outer diameter of the oil tubing of the target gas well, and to determine the foaming agent liquid film thickness based on the injection flow rate, viscosity, density of the foaming agent and the hydraulic equivalent diameter;
[0118] The downtime determination submodule is used to calculate the downtime of the foaming agent from the wellhead to the tubing shoe based on the tubing depth of the target gas well, the hydraulic equivalent diameter, the foaming agent liquid film thickness and the foaming agent injection rate.
[0119] Optionally, the production capacity data determination module 220 includes:
[0120] a flow rate determination submodule, configured to determine historical production capacity data of the target gas well before the foam rises from the tubing shoe to the target well section, substitute the historical production capacity data into a gas-liquid flow rate conversion formula, and determine the superficial gas flow rate and the superficial liquid flow rate corresponding to the target well section;
[0121] a pressure drop determination submodule, configured to calculate a target liquid holdup of the target well section based on the superficial gas flow rate and the superficial liquid flow rate, determine a mixture density of the target well section based on the target liquid holdup, and calculate a pressure drop of the target well section based on the mixture density, a friction coefficient, a length of the target well section, and the superficial gas flow rate;
[0122] The production capacity data determination submodule is used to calculate the bottom hole flowing pressure of the target gas well based on the pressure drop of the target well section and the pressure drop of each well section to be calculated above the target well section, and to determine the production capacity data corresponding to the target gas well when the foam rises from the tubing shoe to the target well section based on the bottom hole flowing pressure and the production capacity calculation formula.
[0123] Optionally, the voltage drop determination submodule includes:
[0124] a target liquid holdup calculation unit, configured to calculate a mixing velocity based on the apparent liquid flow rate and the apparent gas flow rate, and determine the target liquid holdup based on a ratio of the apparent liquid flow rate to the mixing velocity;
[0125] The mixed density determination subunit is configured to determine the mixed density of the target well section based on the target liquid holdup, the gas phase density, and the liquid phase density of the target well section.
[0126] Optionally, the voltage drop determination submodule includes:
[0127] The pressure drop determination unit is used to substitute the mixed density, the friction coefficient, the length of the target well section and the superficial gas flow velocity into the pressure drop calculation formula of the target well section to obtain the pressure drop of the target well section.
[0128] Optionally, the rise time determination module 230 includes:
[0129] a convergence judgment submodule, configured to determine a target difference between the production capacity data and the historical production capacity data, and judge whether the production capacity data has converged based on a ratio of the target difference to the production capacity data and a preset threshold;
[0130] If so, the rise time of the foam from the tubing shoe to the target well section is calculated based on the production data.
[0131] Optionally, the device for determining the defoaming agent filling time is further used to:
[0132] If the convergence of the production capacity data is not converged, the following process is repeated until the production capacity data converges:
[0133] The production capacity data is corrected based on a preset ratio, and the corrected production capacity data is used as the historical production capacity data. The production capacity data corresponding to the target gas well when the foam rises from the tubing shoe to the target well section is calculated based on the historical production capacity data.
[0134] Optionally, the refilling time determination module 240 includes:
[0135] a target rise time determination submodule, configured to determine a target rise time based on the sum of the rise times corresponding to each target well section;
[0136] The filling time determination submodule is configured to use the sum of the descending time and the target ascending time as the defoaming agent filling time.
[0137] The device for determining the defoaming agent filling time provided in the embodiment of the present invention can execute the method for determining the defoaming agent filling time provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0138] Figure 3 A schematic diagram of the structure of an electronic device provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0139] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0140] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0141] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for determining the defoaming agent injection time.
[0142] In some embodiments, the method for determining the defoaming agent refill time can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for determining the defoaming agent refill time described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for determining the defoaming agent refill time in any other suitable manner (e.g., via firmware).
[0143] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0144] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0145] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0146] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0147] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0148] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0149] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0150] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for determining the defoaming agent filling time, characterized in that: include: Calculating the time it takes for the foaming agent to flow from the wellhead to the tubing shoe in the target gas well according to the gas well structure parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well; The well section between the wellhead and the tubing shoe in the target gas well is divided into a plurality of well sections to be calculated, and each of the well sections to be calculated is sequentially used as a target well section from bottom to top, and the production capacity data corresponding to the target gas well is calculated when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section; determining convergence of the production capacity data, and if the convergence of the production capacity data is convergence, calculating a rise time of the foam from the tubing shoe to the target well section based on the production capacity data; The defoaming agent injection time corresponding to the target gas well is determined based on the descending time and the ascending time corresponding to each target well section.
2. The method according to claim 1, characterized in that The step of calculating the time it takes for the foaming agent to descend from the wellhead to the tubing shoe in the target gas well based on the gas well structural parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well comprises: Determining a hydraulic equivalent diameter according to the inner diameter of the casing and the outer diameter of the oil tubing of the target gas well, and determining a thickness of the foaming agent liquid film based on the injection flow rate, viscosity, density of the foaming agent and the hydraulic equivalent diameter; The descending time of the foaming agent from the wellhead to the tubing shoe is calculated based on the tubing depth of the target gas well, the hydraulic equivalent diameter, the foaming agent liquid film thickness and the foaming agent injection flow rate.
3. The method according to claim 1, characterized in that The calculation of the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section includes: Determining historical production capacity data of the target gas well before foam rises from the tubing shoe to the target well section, substituting the historical production capacity data into a gas-liquid flow rate conversion formula to determine the superficial gas flow rate and the superficial liquid flow rate corresponding to the target well section; calculating a target liquid holdup of the target well section based on the superficial gas flow rate and the superficial liquid flow rate, determining a mixture density of the target well section based on the target liquid holdup, and calculating a pressure drop of the target well section based on the mixture density, a friction coefficient, a length of the target well section, and the superficial gas flow rate; Based on the pressure drop of the target well section and the pressure drop of each well section to be calculated above the target well section, the bottom hole flowing pressure of the target gas well is calculated, and based on the bottom hole flowing pressure and the production capacity calculation formula, the production capacity data corresponding to the target gas well when the foam rises from the tubing shoe to the target well section is determined.
4. The method according to claim 3, characterized in that Calculating the target liquid holdup of the target well section based on the superficial gas flow rate and the superficial liquid flow rate, and determining the mixing density of the target well section based on the target liquid holdup, comprises: calculating a mixing velocity based on the superficial liquid flow rate and the superficial gas flow rate, and determining the target liquid holdup based on a ratio of the superficial liquid flow rate to the mixing velocity; The mixed density of the target well section is determined based on the target liquid holdup, the gas phase density, and the liquid phase density of the target well section.
5. The method according to claim 3, characterized in that Calculating the pressure drop of the target well section based on the mixed density, the friction coefficient, the length of the target well section, and the superficial gas flow velocity includes: The mixed density, the friction coefficient, the length of the target well section and the superficial gas flow velocity are substituted into the pressure drop calculation formula of the target well section to obtain the pressure drop of the target well section.
6. The method according to claim 3, characterized in that The determining of the convergence of the production capacity data, and if the convergence of the production capacity data is convergence, calculating the rise time of the foam from the tubing shoe to the target well section based on the production capacity data, includes: determining a target difference between the production capacity data and the historical production capacity data, and judging whether the production capacity data has converged based on a ratio of the target difference to the production capacity data and a preset threshold; If so, the rise time of the foam from the tubing shoe to the target well section is calculated based on the production data.
7. The method according to claim 6, characterized in that Also includes: If the convergence of the production capacity data is not converged, the following process is repeated until the production capacity data converges: The production capacity data is corrected based on a preset ratio, and the corrected production capacity data is used as the historical production capacity data. The production capacity data corresponding to the target gas well when the foam rises from the tubing shoe to the target well section is calculated based on the historical production capacity data.
8. The method according to claim 1, characterized in that The determining, based on the descending time and the ascending time corresponding to each target well section, a defoaming agent injection time corresponding to the target gas well includes: Determining a target rise time based on the sum of the rise times corresponding to each target well section; The sum of the descending time and the target ascending time is used as the defoaming agent filling time.
9. A device for determining the time of adding defoaming agent, characterized in that: include: a descending time determination module, configured to calculate the descending time of the foaming agent from the wellhead to the tubing shoe in the target gas well according to the gas well structural parameters of the target gas well and the basic parameters of the foaming agent added to the target gas well; a production capacity data determination module, configured to divide the well section between the wellhead and the tubing shoe in the target gas well into a plurality of well sections to be calculated, and sequentially select each of the well sections to be calculated as a target well section from bottom to top, and calculate the production capacity data corresponding to the target gas well when the foam corresponding to the foaming agent rises from the tubing shoe to the target well section; a rise time determination module, configured to determine the convergence of the production capacity data, and if the convergence of the production capacity data is convergence, calculate the rise time of the foam from the tubing shoe to the target well section based on the production capacity data; The injection time determination module is used to determine the defoaming agent injection time corresponding to the target gas well based on the descending time and the ascending time corresponding to each target well section.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method for determining the defoaming agent filling time according to any one of claims 1 to 8.