Intelligent overflow well leakage diagnosis method based on multiphase flow mechanism

By constructing an intelligent overflow well leakage diagnosis method based on multiphase flow flow mechanism, and using multiphase flow model and neural network model to analyze drilling data, the problem of inaccurate overflow well leakage diagnosis in the existing technology is solved, timely and accurate diagnosis of overflow well leakage is achieved, and drilling safety and economicality are improved.

CN119514395APending Publication Date: 2025-02-25PETROCHINA CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311069472.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately and timely diagnose overflow well leakage during drilling, resulting in an increase in the risk of blowout accidents, and traditional methods are prone to misjudgment or misjudgment.

Method used

An intelligent overflow well leakage diagnosis method based on multiphase flow flow mechanism is adopted. By pre-processing and feature screening of drilling data, a multiphase flow model and neural network model are constructed, drilling conditions are analyzed in real time, and the wellbore pressure and risk coefficient are calculated to achieve accurate judgment of overflow well leakage.

Benefits of technology

It realizes timely and precise diagnosis of overflow well leakage, reduces false alarm rates and misjudgment rates, and improves drilling safety and economy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514395A_ABST
    Figure CN119514395A_ABST
Patent Text Reader

Abstract

The invention provides an intelligent overflow well leakage diagnosis method based on a multiphase flow mechanism, and belongs to the technical field of oil-gas exploration and development. According to the method, eight well drilling working condition characteristic expression forms including downward drilling, pulling-out, redressing, back redressing, circulation, drilling, drilling stopping and single connecting / unloading are analyzed and judged according to a data set formed by field logging data and well site data, and key parameters of the method include the hanging load and the trend thereof, the bit pressure, the rotating speed, the torque, the pumping pressure, the drill bit depth trend and the well depth trend. On-site noise interference is considered, a least square method is used for judging the trend of variables, calculating the slope of the variables within half a minute, averaging is carried out, threshold values are set according to different variables, the threshold values are increased when larger than the threshold values, the threshold values are decreased when smaller than the threshold values, and the rest are unchanged. And finally, by inputting the key parameters and utilizing a multiphase flow model to restrain the result, the drilling working condition is judged in real time, and timely and accurate judgment, timely early warning and low false alarm rate of overflow well leakage are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of oil and gas exploration and development, and in particular to an intelligent overflow well leakage diagnosis method based on multiphase flow mechanism. Background Art

[0002] With the continuous exploitation of crude oil in my country, the field of oil and gas exploration and development is shifting from conventional oil and gas resources to deep, ultra-deep layers and deep ocean waters, facing challenges such as resource degradation and exploration diversification. During the drilling process, the bottom hole pressure is higher than the fracture pressure or lower than the formation pressure, causing the wellbore fluid to flow into the formation or the formation fluid to flow into the wellbore, resulting in the risk of spills. Some formations lose too much drilling fluid, which reduces the bottom hole pressure and causes overflow blowouts. When overflow occurs, if it is not discovered in time or handled too late, it is likely to cause a blowout accident. The risk of spills will lead to problems with on-site drilling safety and economic losses. According to relevant data, during the drilling process, about 6%-8% of the time is used to deal with underground complexities and accidents.

[0003] Well leakage often occurs suddenly without any signs, and it is very complicated and difficult to deal with. At present, the commonly used method for well leakage diagnosis in China is the comprehensive logging method. The accuracy and effectiveness of this method largely depend on whether the engineer's own ability and quality level are strong and whether he is rich in experience. In the case of complex data and huge scale, coupled with the influence of human subjective factors, traditional diagnostic methods are prone to misjudgment or missed judgment. At the same time, facts have proved that when overflow occurs, it will cause more serious blowout accidents within 10 minutes at the fastest and 10 to 30 minutes at the slowest, causing serious consequences such as equipment damage, casualties, environmental pollution, and scrapping of oil well projects. Therefore, overflow is also one of the high-frequency and high-hazard accidents in drilling. Domestic and foreign countries have successively used the difference in inlet and outlet flow, the change in drilling fluid property parameters, and the change in bottom hole parameters as the basis for judging overflow warning, and responded to overflow by means of manual sitting, etc., but due to the many factors affecting overflow and the complex change rules, there are still problems such as early warning lag and high false alarm rate. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the present invention provides an intelligent overflow well leakage diagnosis method based on the multiphase flow mechanism. Through the data set composed of field logging data and well site data, eight drilling conditions including drilling, pulling out of the drill, reaming, reverse reaming, circulation, drilling, stopping drilling and connecting / unloading single roots are analyzed. The key parameters are hanging weight and its trend, drilling pressure, rotation speed, torque, pump pressure, drill bit depth trend, and well depth trend. Considering the interference of field noise, the least squares method is used to judge the trend of variables. The slope of the variable within half a minute is calculated and the average value is taken. The threshold is set according to different variables. If it is greater than the threshold, it is rising, if it is less than the threshold, it is falling, and the rest are unchanged. Finally, by inputting the above key parameters and using the multiphase flow model to constrain the results, the drilling conditions can be judged in real time, and the overflow well leakage can be judged timely and accurately, with timely warning and low false alarm rate.

[0005] The present invention provides an intelligent overflow well leakage diagnosis method based on multiphase flow mechanism, comprising the following steps:

[0006] Steps to divide drilling conditions:

[0007] The hanging weight trend, drill bit depth trend and well depth trend are calculated by the least square method, and the hanging weight trend, drill bit depth trend and well depth trend as well as hanging weight, drilling pressure, rotation speed, torque and pump pressure are input into the drilling condition identification model based on logical reasoning to divide the drilling conditions;

[0008] Preprocessing steps for drilling data:

[0009] Fill missing data, remove abnormal data, screen for well leakage and overflow related features, and establish well leakage and overflow data sets;

[0010] Steps to construct a drilling circulation pressure risk calculation model based on multiphase flow mechanism:

[0011] Based on the mass conservation equation, momentum equation and drift flow model, combined with the wellbore structure, a drilling circulation pressure risk calculation model based on multiphase flow mechanism of pump-drill pipe-annulus-outlet is constructed;

[0012] Steps to build an intelligent overflow well leakage diagnosis model:

[0013] Divide the drilling data set and use neural networks to build intelligent overflow well leakage diagnosis models under different working conditions:

[0014] Select drilling data under different working conditions to form drilling data sets under different working conditions;

[0015] The orthogonal test method is used to optimize the hyperparameters in the neural network and establish an intelligent overflow well leakage diagnosis model under different working conditions.

[0016] Overflow well leakage diagnosis steps:

[0017] The wellbore pressure is obtained by combining the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well leakage diagnosis model under different working conditions;

[0018] Calculate the overflow risk coefficient and the well leakage risk coefficient, and diagnose the drilling overflow and well leakage risks through the overflow risk coefficient, the well leakage risk coefficient and the wellbore pressure.

[0019] Preferably, filling in the missing data specifically includes: analyzing the importance, quantity and quality of the missing data, dividing the importance into high, medium and low, dividing the quantity into many, medium and few, and dividing the quality into high, medium and low according to preset standards, and using different preset strategies to process the missing data according to the importance of the missing data, the quantity to be filled in, and the quality level.

[0020] Preferably, filling the missing data includes: when the amount of data to be supplemented is small, the missing data is filled in by calculating the median or average of the values ​​in the column and filling it into the missing position.

[0021] Preferably, filling the missing data includes: when the number of missing data is medium, for the missing data with high and medium importance and high and medium quality, using existing data and random forest to complete the data.

[0022] Preferably, the standard deviation method, box plot, outlier detection based on neighbor degree, density-based anomaly detection and isolation forest method are used for comparative analysis, with drilling log data as the standard and an error limit of 10%. The most suitable outlier judgment method for the current situation is selected and the outlier data is deleted. Since the effects vary from well to well and equipment to equipment, comparative analysis is required to select the best method. These are commonly used and have strong robustness.

[0023] Preferably, the screening of lost circulation and overflow related features specifically includes:

[0024] The variance of each feature is calculated using variance selection, and based on the threshold of each feature, the feature whose variance is greater than the threshold of each feature is selected;

[0025] Through the Pearson correlation coefficient, Kendall correlation coefficient and Spearman correlation coefficient, the same correlation coefficient threshold is used as the judgment threshold, and the feature connection analysis is performed by adding the results of the three coefficients to delete duplicate features;

[0026] From the remaining features after deleting duplicate features, the features related to lost circulation and overflow risks are selected to obtain the input features of the intelligent overflow lost circulation diagnosis model.

[0027] Due to differences in wells and equipment, the effects vary, and at the same time, the repeatability of repeated features is cumulatively amplified, and the non-repeatability of non-repeatable features is reduced.

[0028] Preferably, the judgment threshold is set to 0.6.

[0029] Preferably, data preprocessing further includes standardizing the data by comparing minimum and maximum value standardization, Z-Score standardization and fuzzy quantization method, and then selecting the best standardization method to standardize the data in the lost circulation and overflow data set.

[0030] Preferably, the drilling data set is divided, and a neural network is used to construct an intelligent overflow well leakage diagnosis model under different working conditions, specifically including:

[0031] All data were divided into working conditions, and the data set was divided into training set and test set based on the well. Based on the amount of overflow risk data under different working conditions, an equal amount of non-risk data before and after the overflow was selected as the training set;

[0032] Combined with the working condition characteristics, the model input parameters under different working conditions are preprocessed;

[0033] The model input parameters under different working conditions are reselected from the preprocessed data to form a drilling condition data set.

[0034] Preferably, the orthogonal test method is used to optimize the hyperparameters in the neural network including the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer, and the orthogonal test parameter combination is set by an arithmetic progression. The accuracy, precision, recall rate, missed alarm rate and false alarm rate are used as evaluation indicators. The model effect is tested using a test data set, and the optimal hyperparameters are selected according to the comparison results to establish an intelligent overflow well leakage diagnosis model under different working conditions based on a neural network.

[0035] Preferably, in the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet, the spatial node parameters are divided according to the wellbore structure, the drilling fluid is used as the flow calculation parameter, and the wellhead pressure and displacement are used as boundary conditions.

[0036] Preferably, the wellbore-formation heat transfer temperature calculation method is formed by the cylinder wall energy conservation equation, and the wellbore temperature distribution is calculated in real time using the following formula:

[0037]

[0038] In the formula,

[0039] λ f Represents the thermal conductivity of the material, W / (m·K);

[0040] r represents the heat transfer radius, m;

[0041] T f represents the temperature of the heat transfer surface of the wellbore, K;

[0042] z represents the axial heat transfer distance, m;

[0043] ρ f Represents the density of the heat transfer material, kg / m 3 ;

[0044] C p,f represents the specific heat capacity of the heat transfer material, J / (kg·K);

[0045] t represents the heat transfer time, s.

[0046] Preferably, for the input data set including the wellbore structure and drilling fluid parameters, the determined wellhead pressure and injection flow rate are used as boundary conditions, and the following equation group consisting of the mass conservation equation, momentum equation and drift flow model is solved in combination with the working conditions to calculate the wellbore node pressure:

[0047]

[0048]

[0049] v g =C0v m +v gr

[0050] In the formula,

[0051] ρ m Represents fluid density, kg / m 3 ;

[0052] v m represents the fluid velocity, m / s;

[0053] P represents the node pressure, which includes the sum of flow pressure and fluctuation pressure, Pa;

[0054] g represents acceleration, m / s 2 ;

[0055] θ represents the well inclination angle, °;

[0056] F f Represents the pressure drop per unit length, Pa / m;

[0057] t represents time, s;

[0058] x represents length, m;

[0059] v g Represents the real gas flow rate, m / s;

[0060] C0 represents the distribution parameter between the gas phase and the liquid phase;

[0061] v gr represents the gas phase slip velocity, m / s;

[0062] The fluctuation pressure calculation model and temperature calculation model are embedded in the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet to calculate the wellbore pressure and bottom hole pressure in real time. The fluctuation pressure calculation formula is as follows:

[0063]

[0064] In the formula,

[0065] G S represents the fluctuating pressure, Pa;

[0066] K represents the fluid consistency coefficient, Pa·S n ;

[0067] n represents the power-law fluid index, K;

[0068] represents the dimensionless pressure gradient;

[0069] R represents the inner radius of the fixed outer tube, m;

[0070] V p Represents the speed of the pipe string, m / s;

[0071] L represents the distance between the string running start point and the calculated position, m;

[0072] The wellbore pressure is calculated based on the node pressure and the actual initialization conditions during the drilling process.

[0073] Preferably, the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well leakage diagnosis model under different working conditions are integrated, and a linear network layer is added to make a comprehensive judgment on the risk results:

[0074] p=w1·P1+w2·P2

[0075] in,

[0076] p is the probability of the network layer output;

[0077] w1 and w2 are neurons, which are solved by model gradient descent;

[0078] P1 represents the wellbore pressure calculated by the drilling circulation pressure risk calculation model based on the multiphase flow mechanism, MPa;

[0079] P2 represents the formation pressure, which is replaced by the adjacent well parameters, MPa.

[0080] Preferably, the wellbore pressure distribution is compared with the formation fracture pressure of the open hole section to preliminarily calculate the well leakage risk, and the formula is as follows:

[0081]

[0082] In the formula,

[0083] —For all spatial nodes i, take the maximum value of the calculated results;

[0084] R l —Lost circulation risk index;

[0085] P i —Pressure at wellbore node i, MPa;

[0086] P if —Fracturing pressure at wellbore node i, MPa;

[0087] A—coefficient, here it is 0.02.

[0088] Preferably, for an oil, gas and water open hole layer, the overflow risk index is calculated using the following formula:

[0089]

[0090] In the formula,

[0091] —For all spatial nodes i, take the maximum value of the calculated results;

[0092] R k —Overflow risk index;

[0093] P i —Pressure at wellbore node i, MPa;

[0094] P ip —Open hole formation pressure at wellbore node i, MPa;

[0095] B—coefficient, here it is 0.001.

[0096] Preferably, the overflow risk factor, the well leakage risk factor and the wellbore pressure are used to diagnose the drilling overflow and well leakage risk, which specifically includes:

[0097] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1 and the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 0;

[0098] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 1;

[0099] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 2;

[0100] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 3;

[0101] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 1;

[0102] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 2;

[0103] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 3;

[0104] When the overflow risk coefficient is 0.1<or the well leakage risk coefficient is ≤0.5, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 4;

[0105] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 2;

[0106] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 3;

[0107] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 4;

[0108] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 5;

[0109] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 3;

[0110] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 4;

[0111] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 5;

[0112] When 1.0<overflow risk coefficient or well leakage risk coefficient, and the overflow and well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 6.

[0113] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0114] (1) The present invention utilizes drilling data, especially mainly ground drilling parameters, requires little additional equipment, has low cost, and is easy to promote and use in field tests.

[0115] (2) The present invention performs overflow warning based on a neural network, which facilitates subsequent model maintenance and later updates combining the model with deep learning.

[0116] (3) The present invention realizes real-time analysis of drilling conditions and helps to record drilling data on site.

[0117] (4) The present invention utilizes the multiphase flow mechanism to calculate the wellbore pressure in real time, thereby taking into account the effects of drilling conditions and wellbore temperature and heat transfer on the pressure calculation.

[0118] (5) The present invention optimizes the model by considering the subdivision of drilling conditions and combines the multiphase flow model to optimize the network structure. Compared with other algorithms, the robustness and accuracy of the model are enhanced, the output is relatively stable, and overflow well leakage warning can be carried out quickly and accurately, laying the foundation for the future development of intelligent overflow well leakage prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0119] Figure 1 This is a smart overflow well leakage diagnosis method based on multiphase flow mechanism of the present invention;

[0120] Figure 2 It is a schematic diagram of the combination of the drilling condition and the intelligent model of the present invention;

[0121] Figure 3 It is a schematic diagram of the intelligent risk W&D model combined with multiphase flow results under a certain working condition of the present invention;

[0122] Figure 4 The invention provides an idea for constructing an intelligent overflow well leakage warning model based on the multiphase flow mechanism. DETAILED DESCRIPTION

[0123] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.

[0124] The present invention provides an intelligent overflow well leakage diagnosis method based on multiphase flow mechanism, comprising the following steps:

[0125] Steps to divide drilling conditions:

[0126] The hanging weight trend, drill bit depth trend and well depth trend are calculated by the least square method, and the hanging weight trend, drill bit depth trend and well depth trend as well as hanging weight, drilling pressure, rotation speed, torque and pump pressure are input into the drilling condition identification model based on logical reasoning to divide the drilling conditions;

[0127] Preprocessing steps for drilling data:

[0128] Fill missing data, remove abnormal data, screen for well leakage and overflow related features, and establish well leakage and overflow data sets;

[0129] Steps to construct a drilling circulation pressure risk calculation model based on multiphase flow mechanism:

[0130] Based on the mass conservation equation, momentum equation and drift flow model, combined with the wellbore structure, a drilling circulation pressure risk calculation model based on multiphase flow mechanism of pump-drill pipe-annulus-outlet is constructed;

[0131] Steps to build an intelligent overflow well leakage diagnosis model:

[0132] Divide the drilling data set and use neural networks to build intelligent overflow well leakage diagnosis models under different working conditions:

[0133] Select drilling data under different working conditions to form drilling data sets under different working conditions;

[0134] The orthogonal test method is used to optimize the hyperparameters in the neural network and establish an intelligent overflow well leakage diagnosis model under different working conditions.

[0135] Overflow well leakage diagnosis steps:

[0136] The wellbore pressure is obtained by combining the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well leakage diagnosis model under different working conditions;

[0137] Calculate the overflow risk coefficient and the well leakage risk coefficient, and diagnose the drilling overflow and well leakage risks through the overflow risk coefficient, the well leakage risk coefficient and the wellbore pressure.

[0138] According to a specific implementation scheme of the present invention, filling in missing data specifically includes: analyzing the importance, quantity and quality of the missing data, dividing the importance into high, medium and low, dividing the quantity into many, medium and few, and dividing the quality into high, medium and low according to preset standards, and adopting different preset strategies to process missing data according to the importance of the missing data, the quantity to be filled in and the quality level.

[0139] According to a specific embodiment of the present invention, filling missing data includes: when the amount of data to be supplemented is small, the missing data is filled in by calculating the median or average of the values ​​in the column and filling it into the missing position.

[0140] According to a specific embodiment of the present invention, filling missing data includes: when the number of missing data is medium, for missing data with high and medium importance and high and medium quality, using existing data and random forest to complete the data.

[0141] According to a specific implementation scheme of the present invention, a comparative analysis is performed using the standard deviation method, box plot, outlier detection based on neighbor degree, density-based anomaly detection and isolation forest method, with drilling log data as the standard and an error limit of 10%, to select the most suitable outlier judgment method for the current situation and delete the outlier data. Since the effects vary from well to well and equipment to equipment, a comparative analysis is required to select the best method. These methods are commonly used and have strong robustness.

[0142] According to a specific embodiment of the present invention, screening for lost circulation and overflow related features specifically includes:

[0143] The variance of each feature is calculated using variance selection, and based on the threshold of each feature, the feature whose variance is greater than the threshold of each feature is selected;

[0144] Through the Pearson correlation coefficient, Kendall correlation coefficient and Spearman correlation coefficient, the same correlation coefficient threshold is used as the judgment threshold, and the feature connection analysis is performed by adding the results of the three coefficients to delete duplicate features;

[0145] From the remaining features after deleting duplicate features, the features related to lost circulation and overflow risks are selected to obtain the input features of the intelligent overflow lost circulation diagnosis model.

[0146] Due to differences in wells and equipment, the effects vary, and at the same time, the repeatability of repeated features is cumulatively amplified, and the non-repeatability of non-repeatable features is reduced.

[0147] According to a specific embodiment of the present invention, the judgment threshold is set to 0.6.

[0148] According to a specific embodiment of the present invention, data preprocessing also includes standardizing the data by comparing minimum and maximum value standardization, Z-Score standardization and fuzzy quantization method, and then selecting the optimal standardization method to standardize the data in the well leakage and overflow data set.

[0149] According to a specific embodiment of the present invention, the drilling data set is divided, and a neural network is used to construct an intelligent overflow well leakage diagnosis model under different working conditions, which specifically includes:

[0150] All data were divided into working conditions, and the data set was divided into training set and test set based on the well. Based on the amount of overflow risk data under different working conditions, an equal amount of non-risk data before and after the overflow was selected as the training set;

[0151] Combined with the working condition characteristics, the model input parameters under different working conditions are preprocessed;

[0152] The model input parameters under different working conditions are reselected from the preprocessed data to form a drilling condition data set.

[0153] According to a specific implementation scheme of the present invention, the orthogonal test method is used to optimize the hyperparameters in the neural network including the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer. The orthogonal test parameter combination is set by an arithmetic progression. The accuracy, precision, recall rate, missed alarm rate and false alarm rate are used as evaluation indicators. The model effect is tested using a test data set. The optimal hyperparameters are selected according to the comparison results, and an intelligent overflow well leakage diagnosis model under different working conditions based on a neural network is established.

[0154] According to a specific embodiment of the present invention, in the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet, the spatial node parameters are divided according to the wellbore structure, the drilling fluid is used as the flow calculation parameter, and the wellhead pressure and displacement are used as boundary conditions.

[0155] According to a specific embodiment of the present invention, a method for calculating the heat transfer temperature between the wellbore and the formation is formed by the cylinder wall energy conservation equation, and the wellbore temperature distribution is calculated in real time using the following formula:

[0156]

[0157] In the formula,

[0158] λ f Represents the thermal conductivity of the material, W / (m·K);

[0159] r represents the heat transfer radius, m;

[0160] T f represents the temperature of the heat transfer surface of the wellbore, K;

[0161] z represents the axial heat transfer distance, m;

[0162] ρ f Represents the density of the heat transfer material, kg / m 3 ;

[0163] C p,f represents the specific heat capacity of the heat transfer material, J / (kg·K);

[0164] t represents the heat transfer time, s.

[0165] According to a specific embodiment of the present invention, for the input data set including the wellbore structure and drilling fluid parameters, the determined wellhead pressure and injection flow rate are used as boundary conditions, and the following equation group consisting of the mass conservation equation, momentum equation and drift flow model is solved in combination with the working conditions to calculate the wellbore node pressure:

[0166]

[0167]

[0168] v g =C0v m +v gr

[0169] In the formula,

[0170] ρ m Represents fluid density, kg / m 3 ;

[0171] v m represents the fluid velocity, m / s;

[0172] P represents the node pressure, which includes the sum of flow pressure and fluctuation pressure, Pa;

[0173] g represents acceleration, m / s 2 ;

[0174] θ represents the well inclination angle, °;

[0175] F f Represents the pressure drop per unit length, Pa / m;

[0176] t represents time, s;

[0177] x represents length, m;

[0178] v g Represents the real gas flow rate, m / s;

[0179] C0 represents the distribution parameter between the gas phase and the liquid phase;

[0180] v gr represents the gas phase slip velocity, m / s;

[0181] The fluctuation pressure calculation model and temperature calculation model are embedded in the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet to calculate the wellbore pressure and bottom hole pressure in real time. The fluctuation pressure calculation formula is as follows:

[0182]

[0183] In the formula,

[0184] Gs represents the fluctuating pressure, Pa;

[0185] K represents the fluid consistency coefficient, Pa·S n ;

[0186] n represents the power-law fluid index, K;

[0187] represents the dimensionless pressure gradient;

[0188] R represents the inner radius of the fixed outer tube, m;

[0189] V p Represents the speed of the pipe string, m / s;

[0190] L represents the distance between the string running start point and the calculated position, m;

[0191] The wellbore pressure is calculated based on the node pressure and the actual initialization conditions during the drilling process.

[0192] According to a specific embodiment of the present invention, the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well leakage diagnosis model under different working conditions are integrated, and a linear network layer is added to make a comprehensive judgment on the risk results:

[0193] p=w1·P1+w2·P2

[0194] in,

[0195] p is the probability of the network layer output;

[0196] w1 and w2 are neurons, which are solved by model gradient descent;

[0197] P1 represents the wellbore pressure calculated by the drilling circulation pressure risk calculation model based on the multiphase flow mechanism, MPa;

[0198] P2 represents the formation pressure, which is replaced by the adjacent well parameters, MPa.

[0199] According to a specific embodiment of the present invention, the wellbore pressure distribution is compared with the formation fracture pressure of the open hole section, and a preliminary calculation is made.

[0200] The formula for calculating the risk of lost circulation is as follows:

[0201]

[0202] In the formula,

[0203] —For all spatial nodes i, take the maximum value of the calculated results;

[0204] R l —Lost circulation risk index;

[0205] P i —Pressure at wellbore node i, MPa;

[0206] P if —Fracturing pressure at wellbore node i, MPa;

[0207] A—coefficient, here it is 0.02.

[0208] According to a specific embodiment of the present invention, for an oil, gas and water open hole layer, the overflow risk index is calculated using the following formula:

[0209]

[0210] In the formula,

[0211] —For all spatial nodes i, take the maximum value of the calculated results;

[0212] R k —Overflow risk index;

[0213] P i —Pressure at wellbore node i, MPa;

[0214] P ip —Open hole formation pressure at wellbore node i, MPa;

[0215] B—coefficient, here it is 0.001.

[0216] According to a specific embodiment of the present invention, the overflow risk factor, the well leakage risk factor and the wellbore pressure are used to diagnose the drilling overflow and well leakage risk, which specifically includes:

[0217] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1 and the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 0;

[0218] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 1;

[0219] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 2;

[0220] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 3;

[0221] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 1;

[0222] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 2;

[0223] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 3;

[0224] When the overflow risk coefficient is 0.1<or the well leakage risk coefficient is ≤0.5, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 4;

[0225] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 2;

[0226] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 3;

[0227] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 4;

[0228] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 5;

[0229] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 3;

[0230] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 4;

[0231] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 5;

[0232] When 1.0<overflow risk coefficient or well leakage risk coefficient, and the overflow and well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 6.

[0233] Example 1

[0234] According to a specific embodiment of the present invention, the intelligent overflow well leakage diagnosis method based on the multiphase flow mechanism of the present invention is described in detail below.

[0235] The present invention provides an intelligent overflow well leakage diagnosis method based on multiphase flow mechanism, comprising the following steps:

[0236] Steps to divide drilling conditions:

[0237] The hanging weight trend, drill bit depth trend and well depth trend are calculated by the least square method, and the hanging weight trend, drill bit depth trend and well depth trend as well as hanging weight, drilling pressure, rotation speed, torque and pump pressure are input into the drilling condition identification model based on logical reasoning to divide the drilling conditions;

[0238] Preprocessing steps for drilling data:

[0239] Fill missing data, remove abnormal data, screen for well leakage and overflow related features, and establish well leakage and overflow data sets;

[0240] Steps to construct a drilling circulation pressure risk calculation model based on multiphase flow mechanism:

[0241] Based on the mass conservation equation, momentum equation and drift flow model, combined with the wellbore structure, a drilling circulation pressure risk calculation model based on multiphase flow mechanism of pump-drill pipe-annulus-outlet is constructed;

[0242] Steps to build an intelligent overflow well leakage diagnosis model:

[0243] Divide the drilling data set and use neural networks to build intelligent overflow well leakage diagnosis models under different working conditions:

[0244] Select drilling data under different working conditions to form drilling data sets under different working conditions;

[0245] The orthogonal test method is used to optimize the hyperparameters in the neural network and establish an intelligent overflow well leakage diagnosis model under different working conditions.

[0246] Overflow well leakage diagnosis steps:

[0247] The wellbore pressure is obtained by combining the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well leakage diagnosis model under different working conditions;

[0248] Calculate the overflow risk coefficient and the well leakage risk coefficient, and diagnose the drilling overflow and well leakage risks through the overflow risk coefficient, the well leakage risk coefficient and the wellbore pressure.

[0249] Example 2

[0250] According to a specific embodiment of the present invention, the intelligent overflow well leakage diagnosis method based on the multiphase flow mechanism of the present invention is described in detail below.

[0251] The present invention provides an intelligent overflow well leakage diagnosis method based on multiphase flow mechanism, comprising the following steps:

[0252] Steps to divide drilling conditions:

[0253] The hanging weight trend, drill bit depth trend and well depth trend are calculated by the least square method, and the hanging weight trend, drill bit depth trend and well depth trend as well as hanging weight, drilling pressure, rotation speed, torque and pump pressure are input into the drilling condition identification model based on logical reasoning to divide the drilling conditions;

[0254] Preprocessing steps for drilling data:

[0255] Fill missing data, remove abnormal data, screen for well leakage and overflow related features, and establish well leakage and overflow data sets;

[0256] Steps to construct a drilling circulation pressure risk calculation model based on multiphase flow mechanism:

[0257] Based on the mass conservation equation, momentum equation and drift flow model, combined with the wellbore structure, a drilling circulation pressure risk calculation model based on multiphase flow mechanism of pump-drill pipe-annulus-outlet is constructed;

[0258] Steps to build an intelligent overflow well leakage diagnosis model:

[0259] Divide the drilling data set and use neural networks to build intelligent overflow well leakage diagnosis models under different working conditions:

[0260] Select drilling data under different working conditions to form drilling data sets under different working conditions;

[0261] The orthogonal test method is used to optimize the hyperparameters in the neural network and establish an intelligent overflow well leakage diagnosis model under different working conditions.

[0262] Overflow well leakage diagnosis steps:

[0263] The wellbore pressure is obtained by combining the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well leakage diagnosis model under different working conditions;

[0264] Calculate the overflow risk coefficient and the well leakage risk coefficient, and diagnose the drilling overflow and well leakage risks through the overflow risk coefficient, the well leakage risk coefficient and the wellbore pressure.

[0265] Among them, the steps of constructing a drilling circulation pressure risk calculation model based on multiphase flow mechanism and constructing an intelligent overflow well leakage diagnosis model are not in particular order.

[0266] Among them, filling in the missing data specifically includes: analyzing the importance, quantity and quality of the missing data, dividing the importance into high, medium and low, dividing the quantity into many, medium and few, and dividing the quality into high, medium and low according to preset standards, and using different preset strategies to handle missing data according to the importance of the missing data, the quantity to be filled in, and the quality level.

[0267] Among them, filling in the missing data includes: when the amount of data to be supplemented is small, the missing position is filled in by calculating the median or average of the values ​​in this column.

[0268] Among them, filling in missing data includes: when the number of missing data is medium, for missing data with high and medium importance and high and medium quality, data completion is achieved using existing data and random forests.

[0269] Among them, the standard deviation method, box plot, outlier detection based on neighbor degree, density-based anomaly detection and isolation forest method are used for comparative analysis. The drilling log record data is used as the standard, and the error limit is 10%. The most suitable outlier judgment method for the current situation is selected and the outlier data is deleted. Due to different wells and equipment, the effects are different, so comparative analysis is needed to select the best method. These are commonly used and have strong robustness.

[0270] Among them, the characteristics related to screening lost circulation and overflow include:

[0271] The variance of each feature is calculated using variance selection, and based on the threshold of each feature, the feature whose variance is greater than the threshold of each feature is selected;

[0272] Through the Pearson correlation coefficient, Kendall correlation coefficient and Spearman correlation coefficient, the same correlation coefficient threshold is used as the judgment threshold, and the feature connection analysis is performed by adding the results of the three coefficients to delete duplicate features;

[0273] From the remaining features after deleting duplicate features, the features related to lost circulation and overflow risks are selected to obtain the input features of the intelligent overflow lost circulation diagnosis model.

[0274] Among them, the judgment threshold is set to 0.6.

[0275] Among them, data preprocessing also includes standardizing the data by comparing the minimum and maximum value standardization, Z-Score standardization and fuzzy quantization method, and then selecting the optimal standardization method to standardize the data in the well leakage and overflow data set.

[0276] The drilling data set is divided and a neural network is used to build an intelligent overflow well leakage diagnosis model under different working conditions, including:

[0277] All data were divided into working conditions, and the data set was divided into training set and test set based on the well. Based on the amount of overflow risk data under different working conditions, an equal amount of non-risk data before and after the overflow was selected as the training set;

[0278] Combined with the working condition characteristics, the model input parameters under different working conditions are preprocessed;

[0279] The model input parameters under different working conditions are reselected from the preprocessed data to form a drilling condition data set.

[0280] Among them, the orthogonal experimental method is used to optimize the hyperparameters in the neural network including the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer. The orthogonal experimental parameter combination is set by arithmetic progression. The accuracy, precision, recall rate, missed alarm rate and false alarm rate are used as evaluation indicators. The model effect is tested using a test data set. The optimal hyperparameters are selected according to the comparison results, and an intelligent overflow well leakage diagnosis model under different working conditions based on neural network is established.

[0281] Among them, in the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet, the spatial node parameters are divided according to the wellbore structure, the drilling fluid is used as the flow calculation parameter, and the wellhead pressure and displacement are used as boundary conditions.

[0282] Among them, the calculation method of the heat transfer temperature between the wellbore and the formation is formed by the energy conservation equation of the cylinder wall, and the wellbore temperature distribution is calculated in real time using the following formula:

[0283]

[0284] In the formula,

[0285] λ f Represents the thermal conductivity of the material, W / (m·K);

[0286] r represents the heat transfer radius, m;

[0287] T f represents the temperature of the heat transfer surface of the wellbore, K;

[0288] z represents the axial heat transfer distance, m;

[0289] ρ f Represents the density of the heat transfer material, kg / m 3 ;

[0290] C p,f represents the specific heat capacity of the heat transfer material, J / (kg·K);

[0291] t represents the heat transfer time, s.

[0292] Among them, for the input data set including wellbore structure and drilling fluid parameters, the determined wellhead pressure and injection flow rate are used as boundary conditions, and the following equation group consisting of the mass conservation equation, momentum equation and drift flow model is solved in combination with the working conditions to calculate the wellbore node pressure:

[0293]

[0294]

[0295] v g =C0v m +v gr

[0296] In the formula,

[0297] ρ m Represents fluid density, kg / m 3 ;

[0298] v m represents the fluid velocity, m / s;

[0299] P represents the node pressure, which includes the sum of flow pressure and fluctuation pressure, Pa;

[0300] g represents acceleration, m / s 2 ;

[0301] θ represents the well inclination angle, °;

[0302] F f Represents the pressure drop per unit length, Pa / m;

[0303] t represents time, s;

[0304] x represents length, m;

[0305] v g Represents the real gas flow rate, m / s;

[0306] C0 represents the distribution parameter between the gas phase and the liquid phase;

[0307] v gr represents the gas phase slip velocity, m / s;

[0308] The fluctuation pressure calculation model and temperature calculation model are embedded in the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet to calculate the wellbore pressure and bottom hole pressure in real time. The fluctuation pressure calculation formula is as follows:

[0309]

[0310] In the formula,

[0311] G Srepresents the fluctuating pressure, Pa;

[0312] K represents the fluid consistency coefficient, Pa·S n ;

[0313] n represents the power-law fluid index, K;

[0314] represents the dimensionless pressure gradient;

[0315] R represents the inner radius of the fixed outer tube, m;

[0316] V p Represents the speed of the pipe string, m / s;

[0317] L represents the distance between the string running start point and the calculated position, m;

[0318] The wellbore pressure is calculated based on the node pressure and the actual initialization conditions during the drilling process.

[0319] Among them, the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well loss diagnosis model under different working conditions are integrated, and a linear network layer is added to make a comprehensive judgment on the risk results:

[0320] p=w1·P1+w2·P2

[0321] in,

[0322] p is the probability of the network layer output;

[0323] w1 and w2 are neurons, which are solved by model gradient descent;

[0324] p1 represents the wellbore pressure calculated by the drilling circulation pressure risk calculation model based on the multiphase flow mechanism, MPa;

[0325] p2 represents the formation pressure, which is replaced by the adjacent well parameters, MPa.

[0326] Among them, the wellbore pressure distribution is compared with the formation fracture pressure of the open hole section to preliminarily calculate the well leakage risk. The formula is as follows:

[0327]

[0328] In the formula,

[0329] —For all spatial nodes i, take the maximum value of the calculated results;

[0330] R l —Lost circulation risk index;

[0331] P i —Pressure at wellbore node i, MPa;

[0332] P if —Fracturing pressure at wellbore node i, MPa;

[0333] A—coefficient, here it is 0.02.

[0334] Among them, for the oil, gas and water open hole layer, the overflow risk index is calculated as follows:

[0335]

[0336] In the formula,

[0337] —For all spatial nodes i, take the maximum value of the calculated results;

[0338] R k —Overflow risk index;

[0339] P i —Pressure at wellbore node i, MPa;

[0340] P ip —Open hole formation pressure at wellbore node i, MPa;

[0341] B—coefficient, here it is 0.001.

[0342] Among them, the overflow risk coefficient, well leakage risk coefficient and wellbore pressure are used to diagnose the drilling overflow and well leakage risks, including:

[0343] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1 and the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 0;

[0344] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 1;

[0345] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 2;

[0346] When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 3;

[0347] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 1;

[0348] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 2;

[0349] 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 3;

[0350] When the overflow risk coefficient is 0.1<or the well leakage risk coefficient is ≤0.5, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 4;

[0351] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 2;

[0352] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 3;

[0353] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 4;

[0354] 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 5;

[0355] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 3;

[0356] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 4;

[0357] 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 5;

[0358] When 1.0<overflow risk coefficient or well leakage risk coefficient, and the overflow and well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 6.

[0359] Taking the data of a well site in this embodiment as an example, the results show that there are 224,216 data items in 33 risks, the average accuracy rate of the experiment is 89.58%, the missed alarm rate is 19.66%, and the false alarm rate is 7.39%.

[0360] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An intelligent overflow well leakage diagnosis method based on multiphase flow mechanism, characterized in that: The steps include: Steps to divide drilling conditions: The hanging weight trend, drill bit depth trend and well depth trend are calculated by the least square method, and the hanging weight trend, drill bit depth trend and well depth trend as well as hanging weight, drilling pressure, rotation speed, torque and pump pressure are input into the drilling condition identification model based on logical reasoning to divide the drilling conditions; Preprocessing steps for drilling data: Fill missing data, remove abnormal data, screen for leakage and overflow related features, and establish leakage and overflow data sets; Steps to construct a drilling circulation pressure risk calculation model based on multiphase flow mechanism: Based on the mass conservation equation, momentum equation and drift flow model, combined with the wellbore structure, a drilling circulation pressure risk calculation model based on multiphase flow mechanism of pump-drill pipe-annulus-outlet is constructed; Steps to build an intelligent overflow well leakage diagnosis model: Divide the drilling data set and use neural networks to build intelligent overflow well leakage diagnosis models under different working conditions: Select drilling data under different working conditions to form drilling data sets under different working conditions; The orthogonal test method is used to optimize the hyperparameters in the neural network and establish an intelligent overflow well leakage diagnosis model under different working conditions. Overflow well leakage diagnosis steps: The wellbore pressure is obtained by combining the calculation results of the drilling circulation pressure risk calculation model based on the multiphase flow mechanism and the intelligent overflow well leakage diagnosis model under different working conditions; Calculate the overflow risk coefficient and the well leakage risk coefficient, and diagnose the drilling overflow and well leakage risks through the overflow risk coefficient, the well leakage risk coefficient and the wellbore pressure.

2. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: Filling in the missing data specifically includes: analyzing the importance, quantity and quality of the missing data, dividing the importance into high, medium and low, dividing the quantity into many, medium and few, and dividing the quality into high, medium and low according to preset standards, and using different preset strategies to handle missing data based on the importance of the missing data, the quantity to be filled in, and the quality level.

3. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 2 is characterized in that: Completing missing data includes: when the amount of data to be supplemented is small, the missing data can be completed by calculating the median or average of the values ​​in this column and filling it into the missing position.

4. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 2 is characterized in that: The missing data are filled in when the number of missing data is medium, and for the missing data with high and medium importance and high and medium quality, the existing data and random forest are used to complete the data.

5. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: The standard deviation method, box plot, outlier detection based on nearest neighbor degree, density-based anomaly detection and isolation forest method were used for comparative analysis. The drilling log record data was used as the standard with an error limit of 10%. The outlier judgment method most suitable for the current situation was selected and the outlier data was deleted.

6. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: Screening for lost circulation and overflow related features include: The variance of each feature is calculated using variance selection, and based on the threshold of each feature, the feature whose variance is greater than the threshold of each feature is selected; Through the Pearson correlation coefficient, Kendall correlation coefficient and Spearman correlation coefficient, the same correlation coefficient threshold is used as the judgment threshold, and the feature connection analysis is performed by adding the results of the three coefficients to delete duplicate features; From the remaining features after deleting duplicate features, the features related to lost circulation and overflow risks are selected to obtain the input features of the intelligent overflow lost circulation diagnosis model.

7. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: Data preprocessing also includes standardizing the data by comparing the minimum and maximum value standardization, Z-Score standardization and fuzzy quantization method, and then selecting the optimal standardization method to standardize the data in the well leakage and overflow data set.

8. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: The drilling data set is divided and a neural network is used to build an intelligent overflow well leakage diagnosis model under different working conditions, including: All data were divided into working conditions, and the data set was divided into training set and test set based on the well. Based on the amount of overflow risk data under different working conditions, an equal amount of non-risk data before and after the overflow was selected as the training set; Combined with the working condition characteristics, the model input parameters under different working conditions are preprocessed; The model input parameters under different working conditions are reselected from the preprocessed data to form a drilling condition data set.

9. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 8 is characterized in that: The orthogonal test method is used to optimize the hyperparameters in the neural network, including the number of hidden layers, the number of neurons, the activation function, the loss function and the optimizer. The orthogonal test parameter combination is set by arithmetic progression. The accuracy, precision, recall rate, missed alarm rate and false alarm rate are used as evaluation indicators. The model effect is tested using a test data set. The optimal hyperparameters are selected according to the comparison results, and an intelligent overflow well leakage diagnosis model under different working conditions based on neural network is established.

10. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: In the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet, the spatial node parameters are divided according to the wellbore structure, the drilling fluid is used as the flow calculation parameter, and the wellhead pressure and displacement are used as boundary conditions.

11. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 10 is characterized in that: The calculation method of the heat transfer temperature between the wellbore and the formation is formed by the energy conservation equation of the cylinder wall. The wellbore temperature distribution is calculated in real time using the following formula: In the formula, λ f Represents the thermal conductivity of the material, W / (m·K); r represents the heat transfer radius, m; T f represents the temperature of the heat transfer surface of the wellbore, K; z represents the axial heat transfer distance, m; ρ f Represents the density of the heat transfer material, kg / m 3 ; C p,f represents the specific heat capacity of the heat transfer material, J / (kg·K); t represents the heat transfer time, s.

12. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 10 is characterized in that: For the input data set including wellbore structure and drilling fluid parameters, the determined wellhead pressure and injection flow rate are used as boundary conditions. The following equation group consisting of the mass conservation equation, momentum equation and drift flow model is solved in combination with the working conditions to calculate the wellbore node pressure: v g =C0v m +v gr In the formula, ρ m Represents fluid density, kg / m 3 ; v m represents the fluid velocity, m / s; P represents the node pressure, which includes the sum of flow pressure and fluctuation pressure, Pa; g represents acceleration, m / s 2 ; θ represents the well inclination angle, °; F f Represents the pressure drop per unit length, Pa / m; t represents time, s; x represents length, m; v g Represents the real gas flow rate, m / s; C0 represents the distribution parameter between the gas phase and the liquid phase; v gr represents the gas phase slip velocity, m / s; The fluctuation pressure calculation model and temperature calculation model are embedded in the drilling circulation pressure calculation model of pump-drill pipe-annulus-outlet to calculate the wellbore pressure and bottom hole pressure in real time. The fluctuation pressure calculation formula is as follows: In the formula, G S represents the fluctuating pressure, Pa; K represents the fluid consistency coefficient, Pa·S n ; n represents the power-law fluid index, K; represents the dimensionless pressure gradient; R represents the inner radius of the fixed outer tube, m; V p Represents the speed of the pipe string, m / s; L represents the distance between the string running start point and the calculated position, m; The wellbore pressure is calculated based on the node pressure and the actual initialization conditions during the drilling process.

13. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to any one of claims 10 to 12, characterized in that: Based on the calculation results of the drilling circulation pressure risk calculation model based on multiphase flow mechanism and the intelligent overflow well loss diagnosis model under different working conditions, a linear network layer is added to make a comprehensive judgment on the risk results: p=w1·P1+w2·P2 in, p is the probability of the network layer output; w1 and w2 are neurons, which are solved by model gradient descent; P1 represents the wellbore pressure calculated by the drilling circulation pressure risk calculation model based on the multiphase flow mechanism, MPa; P2 represents the formation pressure, which is replaced by the adjacent well parameters, MPa.

14. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: Compare the wellbore pressure distribution with the formation fracture pressure of the open hole section to preliminarily calculate the well leakage risk. The formula is as follows: In the formula, —Take the maximum value of the calculated results for all spatial nodes i; R l —Lost circulation risk index; P i —Pressure at wellbore node i, MPa; P if —Fracturing pressure at wellbore node i, MPa; A—coefficient, here it is 0.

02.

15. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 14 is characterized in that: For oil, gas and water open hole layers, the overflow risk index is calculated using the following formula: In the formula, —Take the maximum value of the calculated results for all spatial nodes i; R k —Overflow risk index; P i —Pressure at wellbore node i, MPa; P ip —Open hole formation pressure at wellbore node i, MPa; B—coefficient, here it is 0.

001.

16. The intelligent overflow well leakage diagnosis method based on multiphase flow mechanism according to claim 1 is characterized in that: The overflow risk factor, well leakage risk factor and wellbore pressure are used to diagnose the risk of drilling overflow and well leakage, including: When the overflow risk coefficient or well leakage risk coefficient is ≤0.1 and the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 0; When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 1; When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 2; When the overflow risk coefficient or well leakage risk coefficient is ≤0.1, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 3; 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 1; 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 2; 0.1<overflow risk coefficient or well leakage risk coefficient≤0.5, and the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 3; When the overflow risk coefficient is 0.1<or the well leakage risk coefficient is ≤0.5, and the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 4; 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 2; 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 3; 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 4; 0.5<overflow risk coefficient or well leakage risk coefficient≤1.0, and when the overflow well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 5; 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.00 and 0.25, the corresponding risk level is 3; 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.25 and 0.50, the corresponding risk level is 4; 1.0<overflow risk coefficient or well leakage risk coefficient, and when the overflow well leakage calculation result is between 0.50 and 0.75, the corresponding risk level is 5; When 1.0<overflow risk coefficient or well leakage risk coefficient, and the overflow and well leakage calculation result is between 0.75 and 1.00, the corresponding risk level is 6.

Citation Information

Cited By

  • Well leakage risk early warning method and device

    CN120804920A