A method and system for detecting drainage performance of foam drainage agent
By collecting and analyzing downhole temperature and pressure data, calculating the foam liquid carrying coefficient and stability coefficient, and combining clustering algorithms to evaluate the foam quality, the problem of detection error of foam drainage agent in the existing technology is solved, and the accuracy of detection is improved and applicability.
Patent Information
- Application Number
- CN202411523621.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing foam drainage performance detection methods fail to fully consider the impact of temperature and pressure on foam performance, resulting in detection errors and cannot meet the accuracy requirements of actual production.
By collecting downhole temperature, wellhead temperature, foam liquid carrying capacity, fluid pressure, wellhead oil pressure, gas flow and liquid flow data, the gas well temperature difference, foam liquid carrying coefficient, fluid pressure fluctuation trend and drainage stability coefficient are calculated, combined with the clustering algorithm Evaluate the quality of the foam and improve the accuracy of the inspection.
It improves the accuracy of foam liquid carrying capacity and stability judgment, can be more suitable for actual production environment, reduces detection errors, and enhances the drainage performance evaluation of foam drainage agents.
Smart Images

Figure CN119044419B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of foam drainage agent performance detection, and in particular to a method and system for detecting drainage performance of a foam drainage agent. Background Art
[0002] During the natural gas extraction process, the gas well production will decrease due to the problem of liquid accumulation in the gas well, and even affect the safe progress of production activities. Therefore, it is necessary to take drainage and production stabilization measures. Foam drainage has become the most important drainage and gas production method for water-producing gas wells in gas fields due to its low cost, quick effect and simple process. The foam drainage method is to inject the foam drainage agent into the well. After it comes into contact with the water at the bottom of the well, a large amount of low-density water-containing foam is generated under the stirring of the natural gas flow. These foams are carried to the ground with the air flow, thereby effectively removing the liquid at the bottom of the well. Therefore, the drainage performance of the foam drainage agent has become the key.
[0003] The existing testing of the drainage performance of foam drainage agents does not fully consider the impact of temperature and pressure fluctuations on foam, and cannot ensure that the prerequisites for testing are fully met. Temperature and pressure have a great impact on the performance of foam, so there are still certain errors in the existing methods when testing the drainage performance of foam drainage agents. Therefore, how to more accurately measure the impact of temperature and pressure changes and further improve the accuracy of the drainage performance test of foam drainage agents is an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide a method and system for detecting the drainage performance of a foam drainage agent. The technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for detecting drainage performance of a foam drainage agent, the method comprising the following steps:
[0006] Collect various monitoring data at each moment when the foam drainage agent is used for drainage, including downhole temperature, wellhead temperature, foam liquid carrying capacity, bottom hole fluid pressure, wellhead oil pressure, natural gas flow rate and downhole liquid flow rate;
[0007] The gas well temperature difference at each moment is calculated based on the downhole temperature and the wellhead temperature at each moment; a first correlation is constructed based on the correlation between the gas well temperature difference and the liquid carrying amount, and a foam liquid carrying coefficient is constructed in combination with the change of the liquid carrying amount relative to the gas well temperature difference;
[0008] Based on the change trends of the fluid pressure data and the wellhead oil pressure data, a monotonic trend degree of the fluctuation of the fluid pressure and the wellhead oil pressure data is constructed; based on the correlation between the gas flow rate and the fluid pressure, a second correlation degree is constructed; based on the monotonic trend degree, the second correlation degree, the disorder degree of the liquid flow data, and the foam liquid carrying coefficient, a drainage stability coefficient is constructed;
[0009] The foam quality is calculated based on the drainage stability coefficient and the liquid carrying capacity of the foam; clustering is performed based on the foam qualities of multiple known foam drainage agents and the foam drainage agent currently to be tested, and the drainage performance of the foam drainage agent currently to be tested is evaluated based on the clustering results.
[0010] In one embodiment, the gas well temperature difference at each moment is: the difference between the downhole temperature and the wellhead temperature at each moment.
[0011] In one embodiment, the process of obtaining the first correlation is:
[0012] The sequence composed of gas well temperature differences at all times is recorded as a gas well temperature difference sequence, and the sequence composed of liquid carrying volume at all times is recorded as a liquid carrying volume sequence. The correlation between the gas well temperature difference sequence and the liquid carrying volume sequence is calculated by a correlation algorithm and recorded as the first correlation.
[0013] In one embodiment, the process of obtaining the foam liquid carrying coefficient is:
[0014] In a rectangular coordinate system with the gas well temperature difference as the horizontal coordinate and the liquid carrying volume as the vertical coordinate, coordinate points consisting of the gas well temperature difference and the liquid carrying volume at each moment are obtained; all the coordinate points are respectively subjected to linear fitting and polynomial fitting to obtain the fitting linear equation and the fitting curve equation respectively;
[0015] The integral area of the fitting curve equation is calculated, recorded as S; the slope of the fitting straight line equation is calculated, recorded as k; the foam liquid carrying coefficient is recorded as A, and the expression of A is: , where P is the first correlation.
[0016] In one embodiment, the process of obtaining the monotonic trend of the fluid pressure and wellhead oil pressure data fluctuations is as follows:
[0017] The fluid pressure at all times is used as the input of the curve fitting algorithm, and the output is the fluid pressure fitting curve; the wellhead oil pressure at all times is used as the input of the curve fitting algorithm, and the output is the wellhead oil pressure fitting curve; the number of times when the slope is greater than 0 and the number of times when the slope is less than 0 on the fluid pressure fitting curve are obtained respectively, and are recorded as and ; The monotonic trend of fluid pressure data fluctuation is recorded as , The expression is: ;
[0018] Based on the wellhead oil pressure fitting curve, the monotonic trend degree of the wellhead oil pressure data fluctuation is obtained by adopting the same acquisition method as that of the monotonic trend degree of the fluid pressure data fluctuation.
[0019] In one embodiment, the process of obtaining the second correlation is:
[0020] The sequence of gas flow at all times is recorded as a gas flow sequence, and the sequence of fluid pressure at all times is recorded as a fluid pressure sequence. The correlation between the gas flow sequence and the fluid pressure sequence is calculated by a correlation algorithm and recorded as the second correlation.
[0021] In one embodiment, the drainage stability coefficient is expressed as:
[0022] , where is the drainage stability coefficient, is the monotonic trend of the fluid pressure data fluctuation, is the monotonic trend of the wellhead oil pressure data fluctuation, is the foam liquid carrying coefficient, is the variance of the liquid flow data at all times, J is the second correlation, is an exponential function with base e.
[0023] In one embodiment, the foam quality is expressed as:
[0024] , where is the foam quality, is the mean of the amount of liquid carried at all times, is the drainage stability coefficient, It is the normalized parameter of the preset drainage stability coefficient.
[0025] In one embodiment, the drainage performance of the foam drainage agent to be tested is obtained in the following manner:
[0026] Collect various monitoring data of N kinds of foam drainage agents and the foam drainage agent to be tested, and based on the monitoring data of each foam drainage agent and the foam drainage agent to be tested, use the above-mentioned foam quality calculation method to calculate the foam quality of each foam drainage agent and the foam drainage agent to be tested; cluster the foam qualities of the N kinds of foam drainage agents and the foam drainage agent to be tested by a clustering algorithm to obtain two clusters;
[0027] Calculate the mean foam quality of all foam drainage agents in each cluster. If the foam drainage agent to be detected is in a cluster with a large foam quality mean, the drainage performance of the foam drainage agent to be detected is good; if the foam drainage agent to be detected is in a cluster with a small foam quality mean, the drainage performance of the foam drainage agent to be detected is poor.
[0028] In a second aspect, an embodiment of the present application further provides a drainage performance detection system for a foam drainage agent, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned methods when executing the computer program.
[0029] The embodiments of the present application have at least the following beneficial effects:
[0030] The present application calculates the foam liquid carrying coefficient based on the correlation between the gas well temperature difference and the liquid carrying volume, and the change of the liquid carrying volume relative to the gas well temperature difference. This index helps to improve the accuracy of measuring the foam liquid carrying capacity; based on the monotonic trend of the fluctuation of fluid pressure and wellhead oil pressure data, the correlation between gas flow data and fluid pressure data, the degree of confusion of liquid flow data, and the foam liquid carrying coefficient, a drainage stability coefficient is constructed to measure the foam changes caused by the fluctuation of production conditions, thereby improving the accuracy of judging the foam stability characteristics; based on the drainage stability coefficient and the foam liquid carrying volume, the foam quality is calculated to judge the drainage performance of the foam drainage agent; based on the foam qualities of multiple known foam drainage agents and the current foam drainage agent to be tested, clustering is performed, and the drainage performance of the current foam drainage agent to be tested is evaluated based on the clustering results, which not only considers the liquid carrying capacity of the foam, but also considers the changes in the foam liquid carrying capacity and stability of the foam with the change of production conditions, so that the drainage performance detection method of this foam drainage agent can be more suitable for actual production, and the accuracy of the drainage performance detection of the foam drainage agent is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 A flowchart of a method for detecting drainage performance of a foam drainage agent provided in one embodiment of the present application;
[0033] Figure 2 It is a schematic diagram of the fitting curve of gas well temperature difference-liquid carrying capacity;
[0034] Figure 3 Schematic diagram of the process of obtaining the foam liquid carrying coefficient. DETAILED DESCRIPTION
[0035] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the drainage performance detection method and system of a foam drainage agent proposed in the present application, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0036] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0037] The following is a detailed description of a method and system for detecting drainage performance of a foam drainage agent provided by the present application in conjunction with the accompanying drawings.
[0038] See also Figure 1 , which shows a flow chart of the steps of a method for detecting the drainage performance of a foam drainage agent provided by an embodiment of the present application, the method comprising the following steps:
[0039] Step S1, collecting various monitoring data at each moment when the foam drainage agent is performing drainage operation, including downhole temperature, wellhead temperature, foam liquid carrying volume, bottom hole fluid pressure, wellhead oil pressure, natural gas gas flow rate and downhole liquid flow rate.
[0040] Collect various monitoring data when the foam drainage agent is used for drainage operation, specifically:
[0041] The downhole temperature data and the wellhead temperature data are collected respectively through the thermometers installed downhole and at the wellhead;
[0042] The liquid carrying volume data of the foam is collected through the liquid metering tank installed at the wellhead;
[0043] The fluid pressure data at the bottom of the well is collected by a downhole pressure gauge installed at the bottom of the well;
[0044] The wellhead oil pressure data, i.e. the gas pressure data at the wellhead, is collected through the pressure sensor installed at the wellhead;
[0045] Collect gas flow data of natural gas through a gas flow meter installed at the wellhead;
[0046] The liquid flow data in the well is collected through the electromagnetic flowmeter installed in the well.
[0047] Since the amount of liquid carried in the foam is limited and is continuously injected into the liquid metering tank at the wellhead, if the collection time is too short, the difference between adjacent liquid carrying amounts is not obvious. Therefore, in the embodiment of the present application, 20 seconds is used as a stable period for liquid carrying amount collection, and the liquid carrying amount at each collection moment is the total amount of liquid carried within 20 seconds before each collection moment; for other monitoring data, data is also collected every 20 seconds, and the total collection time is 1 hour. In other embodiments of the present application, the implementer can set the data collection time interval and data collection time according to the actual situation.
[0048] The various monitoring data collected are normalized using the maximum and minimum value normalization method to eliminate the dimension effect.
[0049] Step S2, calculating the gas well temperature difference at each moment based on the downhole temperature and the wellhead temperature at each moment; constructing a first correlation based on the correlation between the gas well temperature difference and the liquid carrying capacity, and constructing a foam liquid carrying coefficient in combination with the change of the liquid carrying capacity relative to the gas well temperature difference.
[0050] In actual production, due to the uncontrollability of production conditions, the test results of the Rochemill pouring method or the airflow method are not sufficient to fully judge the performance of the foam drainage agent. When the production conditions change, if the drainage stability of the foam drainage agent is greatly affected, even if the liquid carrying capacity measured by these two commonly used methods is strong, it may not be suitable for actual production. Therefore, when testing the drainage performance of the foam drainage agent in actual production, it is necessary to consider both the liquid carrying capacity of the foam drainage agent and the fluctuation of the liquid carrying capacity and foam stability of the foam drainage agent when the production conditions change, so as to make the drainage performance test of the foam drainage agent more accurate and more suitable for actual production.
[0051] In order to measure the liquid carrying capacity of the foam drainage agent, the foam liquid carrying coefficient is calculated based on the change of the temperature difference between the downhole temperature and the wellhead temperature, as well as the change of the liquid carrying amount:
[0052] Under normal circumstances, the liquid carrying capacity of the foam drainage agent should be relatively stable; however, changes in temperature will change the gas pressure in the foam, and then change the pressure on the liquid film, affecting the stability of the foam and thus the liquid carrying capacity of the foam drainage agent. For example, when the temperature rises, the gas pressure in the foam increases, and the pressure on the liquid film increases, making the foam more likely to break and the liquid carrying capacity weakened.
[0053] Secondly, in actual production, with the increase of depth, the formation temperature usually rises gradually. At the same time, different types of rocks have different thermal conductivity, which will affect the temperature distribution in the wellbore. The closer to the top of the gas well, the greater the impact of the external environment. Therefore, when the foam drainage agent works in the entire gas well, there will be obvious temperature changes, and these temperature changes will pose a great threat to the stability of the foam, thereby affecting the liquid carrying capacity. Therefore, measuring the impact of temperature changes on the foam liquid carrying capacity is one of the important criteria for evaluating the liquid carrying capacity of the foam drainage agent.
[0054] First, the difference between the downhole temperature and the wellhead temperature at each moment is calculated and recorded as the gas well temperature difference; the gas well temperature difference is used as the horizontal coordinate and the liquid carrying volume is used as the vertical coordinate to construct a rectangular coordinate system to obtain the coordinate points composed of the gas well temperature difference and the liquid carrying volume at each moment; the coordinate points at all moments are used as the input of the least squares method, and the least squares method is used to perform linear fitting and polynomial fitting respectively to obtain the fitted linear equation and the fitted curve equation respectively. Among them, the least squares method is a well-known technology, and the specific process will not be repeated.
[0055] It should be noted that for the straight line fitting and polynomial fitting of the coordinate points, the present application only provides one straight line fitting and polynomial fitting method. There are many existing straight line fitting and polynomial fitting methods. Implementers can also use other straight line fitting algorithms and polynomial fitting algorithms to perform straight line fitting and polynomial fitting of coordinate points respectively. The present application does not make any specific restrictions.
[0056] Then, the sequence of gas well temperature differences at all times in ascending time order is recorded as the gas well temperature difference sequence, and the sequence of liquid carrying volume at all times in ascending time order is recorded as the liquid carrying volume sequence. The Pearson correlation coefficient between the gas well temperature difference sequence and the liquid carrying volume sequence is calculated, recorded as the first correlation degree P, and P measures the degree of correlation between the gas well temperature difference and the liquid carrying volume; the integral area of the fitting curve equation is calculated, recorded as S, and S measures the downward trend of the liquid carrying volume relative to the gas well temperature difference; the slope of the fitting straight line equation is calculated, recorded as k, and k measures the severity of the liquid carrying volume relative to the temperature change.
[0057] It should be noted that, for the calculation of the first correlation, this application only provides a method for calculating the correlation. There are many existing methods for calculating the correlation. The implementer may also use other correlation algorithms to calculate the first correlation, and this application does not make any specific restrictions.
[0058] Finally, the foam liquid carrying coefficient is calculated based on the first correlation, the integral area of the fitting curve equation and the slope of the fitting straight line equation, and the expression is:
[0059] , where is the foam liquid carrying coefficient.
[0060] If the temperature change has a more dramatic effect on the foam liquid carrying capacity, it means that the foam's liquid carrying capacity is worse, and the negative relationship between the gas well temperature difference and the liquid carrying capacity is stronger, so P is smaller and closer to -1; secondly, as the temperature changes, the more the liquid carrying capacity decreases rapidly, the more dramatic the effect of temperature on the liquid carrying capacity, and the relatively worse the liquid carrying capacity is, that is, k is a negative number and the smaller it is, S is a positive number and the smaller it is, the schematic diagram of the fitting curve of the gas well temperature difference-liquid carrying capacity is as follows: Figure 2 As shown, Figure 2 Curve 1 in the middle represents the gas well temperature difference-liquid carrying capacity fitting curve of the foam drainage agent with relatively good liquid carrying capacity, and curve 2 represents the gas well temperature difference-liquid carrying capacity fitting curve of the foam drainage agent with relatively poor liquid carrying capacity. The shaded area represents the difference between the integral areas of the two fitting curves; therefore, when the temperature change has a more drastic effect on the liquid carrying capacity and the liquid carrying capacity is worse, the foam liquid carrying coefficient A is greater. Conversely, when the temperature change has a smaller effect on the liquid carrying capacity and the liquid carrying capacity is better, the foam liquid carrying coefficient A is smaller.
[0061] Step S3, constructing a monotonic trend of the fluctuation of the fluid pressure and wellhead oil pressure data based on the changing trends of the fluid pressure data and the wellhead oil pressure data; constructing a second correlation based on the correlation between the gas flow rate and the fluid pressure; constructing a drainage stability coefficient based on the monotonic trend, the second correlation, the degree of disorder of the liquid flow data, and the foam liquid carrying coefficient.
[0062] The foam liquid carrying coefficient only measures the effect of temperature change on the amount of liquid carried, but does not consider the stability of the foam in the production environment. Therefore, there are still limitations in testing the drainage capacity of foam drainage agents based only on the foam liquid carrying coefficient. In addition to the amount of liquid carried, the drainage performance of foam drainage agents must also consider the stability of the foam.
[0063] Since the liquid carrying volume is the total amount of liquid carried during a period of time, it is impossible to determine the change in the liquid carrying volume at each moment; and the liquid carrying volume determined in this way is also related to the gas flow rate in the gas well. When the gas flow rate is large, the liquid carrying volume will be larger, and this large liquid carrying volume is not caused by the strong liquid carrying performance of the foam drainage agent. When the gas flow rate decreases, the liquid carrying volume will decrease significantly. Therefore, if only the changes in the collected liquid carrying volume are considered, there will be errors in the final judgment of the drainage performance. For example, due to the complexity of the downhole production conditions, changes in production conditions will affect the gas flow rate. For example, when the downhole pressure is high, the flow rate will increase, and these changes may affect the stability of the foam. However, since the increase in gas flow rate makes the liquid carrying volume higher, if only the liquid carrying volume is judged, the foam drainage agent will be judged to have a good liquid carrying capacity, but in fact, the foam stability may be poor and the liquid carrying performance may also be poor.
[0064] When the foam bursts, the liquid it carries will flow along the wall of the oil pipe into the gas well, causing the liquid level in the wellbore to fluctuate. The more foam bursts, the more it will flow into the gas well, causing the liquid level in the wellbore to fluctuate more violently. Secondly, when there is liquid accumulation at the bottom of the well, the liquid accumulation will cause the fluid pressure at the bottom of the well to increase, and the oil pressure at the wellhead will also decrease due to the increase in flow resistance. When the foam drainage agent works effectively, the liquid accumulation at the bottom of the well is discharged, the fluid pressure at the bottom of the well decreases, and the oil pressure at the wellhead increases. However, when the foam bursts on the way up, and there is still foam at the bottom of the well that continues to be generated, the fluid pressure at the bottom of the well and the oil pressure at the wellhead will fluctuate repeatedly.
[0065] In order to avoid the influence of the above problems on the detection of the drainage performance of the foam drainage agent, first, the fluid pressure data at all times are used as the input of the curve fitting algorithm, and the output is the fluid pressure fitting curve; the wellhead oil pressure data at all times are used as the input of the curve fitting algorithm, and the output is the wellhead oil pressure fitting curve. Preferably, in one embodiment of the present application, the least squares method is used to perform curve fitting on the fluid pressure data and the wellhead oil pressure data respectively. As other embodiments of the present application, the implementer may also use other curve fitting algorithms to perform curve fitting on the fluid pressure data and the wellhead oil pressure data.
[0066] Then, the sequence composed of the gas flow data at all moments in ascending time order is recorded as the gas flow sequence, and the sequence composed of the fluid pressure data at all moments in ascending time order is recorded as the fluid pressure sequence. The Spearman correlation coefficient between the gas flow sequence and the fluid pressure sequence is calculated and recorded as the second correlation degree J, which is used to analyze the correlation between the gas flow sequence and the fluid pressure sequence.
[0067] It should be noted that, for the calculation of the second correlation, this application only provides a method for calculating the correlation. There are many existing methods for calculating the correlation. The implementer may also use other correlation algorithms to calculate the second correlation, and this application does not make any specific restrictions.
[0068] Secondly, the number of moments when the slope of the fluid pressure fitting curve is greater than 0 is obtained, which is recorded as ; Get the number of moments when the slope of the fluid pressure fitting curve is less than 0, recorded as ; The calculation expression of the monotonic trend of fluid pressure data fluctuation is:
[0069] , where is the monotonic trend of the fluid pressure data fluctuation; based on the wellhead oil pressure fitting curve, the monotonic trend of the wellhead oil pressure data fluctuation is obtained in the same way as the monotonic trend of the fluid pressure data fluctuation, and is recorded as .
[0070] Finally, in order to measure the stability of the foam drainage agent, based on the above analysis, the drainage stability coefficient is calculated, and the expression is:
[0071] , where is the drainage stability coefficient, , They are the monotonic trend of the fluctuation of fluid pressure data and wellhead oil pressure data, is the foam liquid carrying coefficient, is the variance of the liquid flow data at all times, J is the second correlation, is an exponential function with e as the base. The purpose of the exponential function is to increase the influence weight of the foam liquid carrying coefficient.
[0072] It is understandable that when the stability of the foam is poor, the liquid carried by the broken foam flows back to the bottom of the well, causing the fluctuation of the liquid level at the bottom of the well, thereby increasing the fluctuation of the liquid flow at the bottom of the well, that is, At the same time, it will cause the fluctuation of the fluid pressure at the bottom of the well and the oil pressure at the wellhead to increase, so that the monotonicity of each point on the fitting curve fluctuates, that is, , At the same time, it will affect the production of natural gas, that is, the more serious the foam rupture, the greater the bottom hole fluid pressure, the worse the effect of removing accumulated liquid, and the lower the natural gas production. Therefore, the gas flow sequence of natural gas and the bottom hole fluid pressure sequence show a negative correlation, that is, J is a negative number and small; at the same time, when the foam liquid carrying coefficient is large, the liquid carrying capacity is poor, and it can be determined that the drainage capacity of the corresponding foam drainage agent is poor; therefore, when the foam stability is poor, the drainage stability coefficient is small. On the contrary, when the foam stability is better, the drainage stability coefficient is larger.
[0073] Step S4, calculating the foam mass according to the drainage stability coefficient and the liquid carrying capacity of the foam; clustering is performed based on the foam masses of multiple known foam drainage agents and the foam drainage agent currently to be tested, and the drainage performance of the foam drainage agent currently to be tested is evaluated based on the clustering results.
[0074] Testing the drainage performance of foam drainage agents is essentially testing the quality of the foam generated by the foam drainage agents. The key to evaluating the quality of foam lies in the total amount of liquid that the foam can carry and the stability and quality of the foam, so the foam quality can be evaluated and calculated in combination with these two aspects. Among them, the total amount of liquid that the foam can carry can be measured by the collected liquid carrying data, and the stability and quality of the foam is to measure the changes in the liquid carrying capacity and stability of the foam caused by changes in production conditions, that is, it can be measured by the drainage stability coefficient.
[0075] First, based on the liquid carrying capacity and drainage stability coefficient of the foam, the foam mass is calculated to measure the drainage performance of the foam drainage agent. The calculation expression of the foam mass is:
[0076] , where is the foam quality, is the mean of the liquid carrying volume data at all times, is the drainage stability coefficient, It is the normalized parameter of the preset drainage stability coefficient. The larger the value is set, the higher the requirements for the foam's liquid carrying capacity and stability, that is, the higher the requirements for the drainage stability coefficient, so that the change in the drainage stability coefficient has a greater impact on the foam quality. Preferably, in one embodiment of the present application, The value of is set to 1. In other embodiments of the present application, The implementer can set the value according to the actual situation.
[0077] When the drainage performance of the foam drainage agent is stronger, the foam quality is better, and the total amount of liquid carried by the foam is larger, that is, Secondly, the better the foam quality, the less the foam is affected by changes in production conditions, that is, the liquid carrying capacity and stability of the foam change less with changes in production conditions, that is, the drainage stability coefficient Larger, The larger the Therefore, the stronger the drainage performance of the foam drainage agent, the better the foam quality. On the contrary, the weaker the drainage performance of the foam drainage agent, the greater the foam quality. The smaller.
[0078] Then, various monitoring data of N commonly used foam drainage agents and the foam drainage agent currently to be tested are collected, and based on the monitoring data of each foam drainage agent and the foam drainage agent currently to be tested, the foam quality of each foam drainage agent and the foam drainage agent currently to be tested is calculated using the above-mentioned foam quality calculation method. Preferably, in one embodiment of the present application, the type N of foam drainage agents is set to 50. In other embodiments of the present application, the implementer can set the value of N according to actual conditions.
[0079] Finally, the foam qualities of N kinds of foam draining agents and the foam quality of the foam draining agent that currently needs to be tested are used as inputs of the k-means clustering algorithm, wherein, in the embodiment of the present application, the number of cluster centers is set to 2, and the output is each clustering cluster. In other embodiments of the present application, the implementer can set it according to the actual situation. As k-means clustering is a well-known technology, the specific process will not be repeated. Since the smaller the foam quality, the weaker the drainage performance of the foam draining agent, the mean of the foam quality of all foam draining agents in each clustering cluster is calculated respectively, and the foam draining agent in the clustering cluster with the largest mean of foam quality is marked as a foam draining agent with good drainage performance, and the foam draining agent in the clustering cluster with the smallest mean of foam quality is marked as a foam draining agent with poor drainage performance. According to the clustering cluster where the foam draining agent that currently needs to be tested is located, the drainage performance of the foam draining agent that currently needs to be tested is evaluated.
[0080] The schematic diagram of the process of obtaining the foam liquid carrying coefficient is as follows: Figure 3 shown.
[0081] Based on the same inventive concept as the above method, an embodiment of the present application also provides a drainage performance detection system for a foam drainage agent, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned methods for detecting the drainage performance of a foam drainage agent when executing the computer program.
[0082] In summary, the embodiment of the present application provides a method for detecting the drainage performance of a foam drainage agent. The foam liquid carrying coefficient is calculated based on the correlation between the gas well temperature difference and the liquid carrying amount, and the change of the liquid carrying amount relative to the gas well temperature difference. This index helps to improve the accuracy of measuring the foam liquid carrying capacity; based on the monotonic trend of the fluctuation of the fluid pressure and wellhead oil pressure data, the correlation between the gas flow data and the fluid pressure data, the degree of confusion of the liquid flow data, and the foam liquid carrying coefficient, a drainage stability coefficient is constructed to measure the foam changes caused by the fluctuation of the production conditions, thereby improving the accuracy of the judgment of the foam stability characteristics; based on the drainage stability coefficient and the foam liquid carrying amount, the foam quality is calculated to judge the drainage performance of the foam drainage agent; based on the foam quality of multiple known foam drainage agents and the current foam drainage agent to be detected, clustering is performed, and the drainage performance of the current foam drainage agent to be detected is evaluated based on the clustering results, which not only considers the liquid carrying capacity of the foam, but also considers the changes in the foam liquid carrying capacity and stability of the foam with the change of production conditions, so that the drainage performance detection method of the foam drainage agent can be more suitable for actual production, and the accuracy of the drainage performance detection of the foam drainage agent is improved.
[0083] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0084] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0085] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting drainage performance of a foam drainage agent, characterized in that: The method comprises the following steps: Collect various monitoring data at each moment when the foam drainage agent is used for drainage, including downhole temperature, wellhead temperature, foam liquid carrying capacity, bottom hole fluid pressure, wellhead oil pressure, natural gas flow rate and downhole liquid flow rate; The gas well temperature difference at each moment is calculated based on the downhole temperature and the wellhead temperature at each moment; a first correlation is constructed based on the correlation between the gas well temperature difference and the liquid carrying amount, and a foam liquid carrying coefficient is constructed in combination with the change of the liquid carrying amount relative to the gas well temperature difference; Based on the change trends of the fluid pressure data and the wellhead oil pressure data, a monotonic trend degree of the fluctuation of the fluid pressure and the wellhead oil pressure data is constructed; based on the correlation between the gas flow rate and the fluid pressure, a second correlation degree is constructed; based on the monotonic trend degree, the second correlation degree, the disorder degree of the liquid flow data, and the foam liquid carrying coefficient, a drainage stability coefficient is constructed; The foam quality is calculated according to the drainage stability coefficient and the liquid carrying capacity of the foam; the foam quality of multiple known foam drainage agents and the foam drainage agent to be tested is clustered, and the drainage performance of the foam drainage agent to be tested is evaluated based on the clustering results; The process of obtaining the foam liquid carrying coefficient is as follows: In a rectangular coordinate system with the gas well temperature difference as the horizontal coordinate and the liquid carrying volume as the vertical coordinate, coordinate points consisting of the gas well temperature difference and the liquid carrying volume at each moment are obtained; all the coordinate points are respectively subjected to linear fitting and polynomial fitting to obtain the fitting linear equation and the fitting curve equation respectively; The integral area of the fitting curve equation is calculated, recorded as S; the slope of the fitting straight line equation is calculated, recorded as k; the foam liquid carrying coefficient is recorded as A, and the expression of A is: , where P is the first correlation; The process of obtaining the monotonic trend of the fluid pressure and wellhead oil pressure data fluctuations is as follows: The fluid pressure at all times is used as the input of the curve fitting algorithm, and the output is the fluid pressure fitting curve; the wellhead oil pressure at all times is used as the input of the curve fitting algorithm, and the output is the wellhead oil pressure fitting curve; the number of times when the slope is greater than 0 and the number of times when the slope is less than 0 on the fluid pressure fitting curve are obtained respectively, and are recorded as and ; The monotonic trend of fluid pressure data fluctuation is recorded as , The expression is: ; Based on the wellhead oil pressure fitting curve, the monotonic trend of the wellhead oil pressure data fluctuation is obtained in the same way as the monotonic trend of the fluid pressure data fluctuation; The expression of the drainage stability coefficient is: , where is the drainage stability coefficient, is the monotonic trend of the fluid pressure data fluctuation, is the monotonic trend of the wellhead oil pressure data fluctuation, is the foam liquid carrying coefficient, is the variance of the liquid flow data at all times, J is the second correlation, is an exponential function with e as base; The expression of the foam quality is: , where is the foam quality, is the mean of the amount of liquid carried at all times, is the drainage stability coefficient, It is the normalized parameter of the preset drainage stability coefficient.
2. A method for detecting drainage performance of a foam drainage agent according to claim 1, characterized in that: The gas well temperature difference at each moment is: the difference between the downhole temperature and the wellhead temperature at each moment.
3. The method for detecting drainage performance of a foam drainage agent according to claim 1, characterized in that: The process of obtaining the first correlation is: The sequence composed of gas well temperature differences at all times is recorded as a gas well temperature difference sequence, and the sequence composed of liquid carrying volume at all times is recorded as a liquid carrying volume sequence. The correlation between the gas well temperature difference sequence and the liquid carrying volume sequence is calculated by a correlation algorithm and recorded as the first correlation.
4. A method for detecting drainage performance of a foam drainage agent according to claim 1, characterized in that: The process of obtaining the second correlation is as follows: The sequence of gas flow at all times is recorded as a gas flow sequence, and the sequence of fluid pressure at all times is recorded as a fluid pressure sequence. The correlation between the gas flow sequence and the fluid pressure sequence is calculated by a correlation algorithm and recorded as the second correlation.
5. The method for detecting drainage performance of a foam drainage agent according to claim 1, characterized in that: The method for obtaining the drainage performance of the foam drainage agent to be tested is: Collect various monitoring data of N kinds of foam drainage agents and the foam drainage agent to be tested, and based on the monitoring data of each foam drainage agent and the foam drainage agent to be tested, use the above-mentioned foam quality calculation method to calculate the foam quality of each foam drainage agent and the foam drainage agent to be tested; cluster the foam qualities of the N kinds of foam drainage agents and the foam drainage agent to be tested by a clustering algorithm to obtain two clusters; Calculate the mean foam quality of all foam drainage agents in each cluster. If the foam drainage agent to be detected is in the cluster with the largest foam quality mean, the drainage performance of the foam drainage agent to be detected is good; if the foam drainage agent to be detected is in the cluster with the smallest foam quality mean, the drainage performance of the foam drainage agent to be detected is poor.
6. A drainage performance detection system for a foam drainage agent, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method for evaluating performance of foam drainage agent of horizontal gas well
CN107422084A
Filling method and device of foam drainage agent and foam drainage ball for device
CN113006753A
Cited By
Method and system for detecting performance of foam drainage agent of horizontal gas well
CN120102807A
A method and system for detecting the performance of a horizontal gas well foam drainage agent
CN120102807B