Method and device for acquiring corrosion state of oil well pipeline
By establishing a corrosion rate prediction model based on the depth and partial pressure ratio, the corrosion rate of each monitored position of the oil well pipeline is predicted, the remaining usage time is calculated, and the corrosion state of the oil well pipeline is determined, which solves the problem of inaccurate acquisition of the corrosion rate of the oil well pipeline in the prior art, and achieves rapid and accurate acquisition of the corrosion state.
Patent Information
- Application Number
- CN202510414377.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-03
AI Technical Summary
The prior art is difficult to accurately obtain the corrosion rate of oil well pipelines, resulting in the acquired model being inaccurate enough to quickly and accurately obtain the corrosion state of oil well pipelines.
By obtaining the basic data and corrosion rate influence feature data set of the target oil well pipeline, a corrosion rate prediction model based on the depth and partial pressure ratio is established, the corrosion rate of each monitored location is predicted, and the remaining usage time is calculated based on the maximum corrosion rate and basic data, and the corrosion status of the oil well pipeline is finally determined.
It achieves rapid and accurate acquisition of the corrosion state of the oil well pipeline, ensures the accuracy of the obtained model, and can take anti-corrosion measures in a timely manner to ensure the safe use of the oil well pipeline.
Smart Images

Figure CN119918432A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of petrochemical equipment, and in particular to a method and device for obtaining the corrosion state of an oil well pipeline. Background Art
[0002] Carbon capture, utilization and storage (CCUS) refers to the technology of separating CO2 from industrial production or other emission sources, directly storing it or injecting it into a new production process after processing to achieve the reduction of CO2 emissions. This technology can be applied to the process of oil extraction. The oil recovery effect of CO2 gas injection oil recovery technology has more obvious technical advantages than traditional water drive in improving the utilization rate and recovery rate of low permeability oil fields. However, when CO2 gas injection oil recovery is used, it is easy to cause pipeline corrosion. In addition, the ambient temperature is high during the crude oil extraction process, which has a certain promoting effect on the corrosion rate of CO2 and aggravates the formation of corrosion defects. The corrosion rate of the oil pipe will affect the service life of the oil pipe. The service life of the oil pipe can characterize the status of the oil pipe. According to the status of the oil pipe, the corresponding anti-corrosion measures can be determined to ensure safety. Therefore, accurately knowing the corrosion rate of the oil pipe is the key to ensuring that the status of the oil pipe can be accurately obtained. The patent document (CN103870670A) discloses a method and device for predicting the degree of corrosion of oil pipes. Although the document obtains an oil pipe corrosion prediction model to predict the corrosion rate of the oil pipe, the model in the document does not provide how the corrosion influencing factors used in the model are determined, which may cause the obtained model to be inaccurate. In addition, the relationship between the corrosion prediction rate and the corrosion influencing factors established in the document is only a simple linear relationship, which may also cause the obtained model to be inaccurate. Therefore, how to accurately and quickly obtain the corrosion condition of the oil well pipeline to obtain the status of the oil well pipeline is a topic worth exploring. Summary of the invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is: According to a first aspect of the present invention, a method for obtaining the corrosion status of an oil well pipeline is provided, the method comprising the following steps: S100, obtaining the basic data corresponding to the target oil well pipeline and the corrosion rate influence characteristic data set D={D1, D2, ..., D u , ..., D z}; The basic data includes the inner diameter r of the pipeline and the outer diameter r of the pipeline o , the material yield strength σ of the pipeline and the service life t0 of the oil well pipeline, D u is the uth monitored position P of the target oil well pipeline uThe corresponding corrosion rate influence characteristic data, u has a value of 1 to z, z is the number of monitored positions of the target oil well pipeline; the corrosion rate influence characteristic data at least includes the temperature t of the crude oil medium at the monitored position, the CO2 partial pressure p c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v.
[0004] S200, based on the u-th monitored position P u The corresponding depth h u And the voltage divider ratio F u , obtain the corrosion rate prediction model corresponding to the u-th monitored position, and based on the obtained corrosion rate prediction model and D u Get the uth monitored position P u The corresponding corrosion rate R u ; F u =p c u / p h u , p c u is the uth monitored position P u The corresponding CO2 partial pressure, p h u is the uth monitored position P u Corresponding H2S partial pressure; uth monitored position P u The corresponding depth h u Equal to the uth monitored position P u The distance between the location and the oil wellhead.
[0005] S300, get max(R1, R2, ..., R u , ..., R z ) as the target corrosion rate, and based on the basic data, the uth monitored position P u Corresponding axial force T u and the target corrosion rate, and obtain the remaining service time t of the target oil well pipeline r ; max() means taking the maximum value.
[0006] S400, based on the remaining usage time t of the target oil well pipeline r and a corrosion state value determination model, obtaining the corrosion state value of the target oil well pipeline, and determining the corrosion state of the target oil well pipeline based on the obtained corrosion state value, wherein the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline.
[0007] According to a second aspect of the present invention, a device for obtaining the corrosion status of an oil well pipeline is provided, the device comprising: The data acquisition module is used to obtain the basic data corresponding to the target oil well pipeline and the corrosion rate influence characteristic data set D={D1, D2, ..., D u , ..., D z}; The basic data includes the inner diameter r of the pipeline and the outer diameter r of the pipeline o , the material yield strength σ of the pipeline and the service life t0 of the oil well pipeline, D u is the uth monitored position P of the target oil well pipeline u The corresponding corrosion rate influence characteristic data, u has a value of 1 to z, z is the number of monitored positions of the target oil well pipeline; the corrosion rate influence characteristic data at least includes the temperature t of the crude oil medium at the monitored position, the CO2 partial pressure p c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v.
[0008] The corrosion rate prediction module is used to predict the corrosion rate based on the u-th monitored position P u The corresponding depth h u And the voltage divider ratio F u , obtain the corrosion rate prediction model corresponding to the u-th monitored position, and based on the obtained corrosion rate prediction model and D u Get the uth monitored position P u The corresponding corrosion rate R u ; F u =p c u / p h u , p c u is the uth monitored position P u The corresponding CO2 partial pressure, p h u is the uth monitored position P u Corresponding H2S partial pressure; uth monitored position P u The corresponding depth h u Equal to the uth monitored position P u The distance between the location and the oil wellhead.
[0009] The remaining usage time acquisition module is used to obtain the max (R1, R2, ..., R u , ..., R z ) as the target corrosion rate, and based on the basic data, the uth monitored position P u Corresponding axial force T u and the target corrosion rate, and obtain the remaining service time t of the target oil well pipeline r ; max() means taking the maximum value.
[0010] The corrosion state value determination module is used to determine the remaining service time t of the target oil well pipeline based on the r and a corrosion state value determination model, obtain the corrosion state value of the target oil well pipeline, and determine the corrosion state of the target oil well pipeline based on the obtained corrosion state value, wherein the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline. The present invention has at least the following beneficial effects: The method and device for obtaining the corrosion status of a oil well pipeline provided by an embodiment of the present invention first predict the corrosion rate of a target oil well pipeline based on a corrosion rate prediction model and corrosion rate influencing characteristic data to obtain the predicted corrosion rate of the target oil well pipeline, then obtain the remaining service life of the target oil well pipeline based on the basic data and the predicted corrosion rate; then, obtain the corrosion status value of the target oil well pipeline based on the remaining service life of the target oil well pipeline and the status value acquisition model, and determine the corrosion status of the target oil well pipeline based on the acquired status value. The present invention can quickly and accurately obtain the corrosion status of an oil well pipeline.
[0011] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A flowchart of a method for obtaining the corrosion status of an oil well pipeline provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0016] It should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0017] The present invention aims to provide a method for quickly and accurately obtaining the corrosion status of an oil well pipeline. In an embodiment of the present invention, the oil well pipeline includes an oil pipeline and an oil layer casing. An embodiment of the present invention provides a method for obtaining the corrosion status of an oil well pipeline, such as Figure 1 As shown, the method may include the following steps: S100, obtaining the basic data corresponding to the target oil well pipeline and the corrosion rate influence characteristic data set D={D1, D2, ..., D u , ..., D z}. D u is the uth monitored position P of the target oil well pipeline u The corresponding corrosion rate affects the characteristic data, u has a value of 1 to z, and z is the number of monitored positions of the target oil well pipeline. In the embodiment of the present invention, the specific position and number of monitored positions of the target oil well pipeline can be determined based on actual needs.
[0018] In the embodiment of the present invention, the basic data includes the inner diameter r of the pipeline, the outer diameter r of the pipeline o , the material yield strength σ of the pipeline and the service life t0 of the oil well pipeline. The unit of inner diameter and outer diameter is mm, and the unit of material yield strength is N / mm 2 The unit of the usage time is year. These basic data can be obtained by consulting the manual of the target oil well pipeline. Furthermore, in the embodiment of the present invention, the corrosion rate influence characteristic data at least includes the temperature t of the crude oil medium at the monitored position, the CO2 partial pressure p c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v.
[0019] In an embodiment of the present invention, the corrosion rate influence characteristic data can be obtained by the following steps: Obtain n initial influencing parameters related to the corrosion rate of the oil well pipeline.
[0020] In an embodiment of the present invention, the initial influencing parameters can be obtained by analyzing historical data, and may include the influence of CO2 partial pressure, H2S partial pressure, temperature, pressure, chloride ion concentration, medium flow rate, pH value, water content, liquid viscosity, sulfide content, impurity gas, flow type and other factors.
[0021] M groups of sample data are obtained, wherein each group of sample data includes corresponding actual corrosion rate data of oil well pipelines and corresponding data of n initial influencing parameters.
[0022] In the embodiment of the present invention, m is a number greater than 1, and can be determined based on actual needs. The actual corrosion rate data of the oil well pipeline can be obtained by monitoring an invasive corrosion monitoring sensor installed in the oil pipeline outside the well.
[0023] The m groups of sample data are standardized to obtain the m groups of sample data after the standardized processing.
[0024] In the embodiment of the present invention, the m groups of sample data may be standardized by using an existing dimensionless processing method.
[0025] Based on the standardized m groups of sample data, the weight of each initial influencing parameter and the matrix to be processed M are obtained. The element x in the i-th row and j-th column of the matrix to be processed M is ij =|v 0i -d ij |, v 0j is the actual corrosion rate data in the i-th group of sample data, d ij are the values of the j initial influencing parameters in the i-th group of sample data, i ranges from 1 to m, and j ranges from 1 to n.
[0026] Based on the matrix to be processed M, the correlation set G={G1, G2, …, G j , ..., G n}, G j is the correlation between the jth initial influencing parameter and the corrosion rate, G j =(1 / m)∑ m i=1 w j ×δ ij , where w j is the weight of the jth initial influencing parameter, δ ij is the correlation between the j initial influencing parameters in the i-th group of sample data and the corrosion rate corresponding to the i-th group of sample data, δ ij =(d min +ρ×d max ) / (xij +ρ×d max ), d min is the minimum value in the matrix M to be processed, d max is the maximum value in the matrix M to be processed, and ρ is the preset coefficient.
[0027] In the embodiment of the present invention, w j The following conditions are met: j =h j / ∑ n j=1 h j ;h j is the difference value of the jth initial influencing parameter, h j =-∑ m i=1 z ij lnz ij .z ij is the value of the j-th initial image data in the i-th group of sample data in the m groups of sample data after the standardization process.
[0028] Traverse the association set G, if G j ≥G0, G j The corresponding initial influencing parameter is added to the current intermediate list; the initial value of the current intermediate list is empty; G0 is the preset threshold.
[0029] In the embodiment of the present invention, the preset threshold value may be determined based on actual conditions. In an illustrative embodiment, G0=0.6.
[0030] The initial influencing parameters in the current intermediate list are used as the corrosion rate influencing characteristic data.
[0031] In the embodiment of the present invention, the medium concentration in the oil well pipeline is assumed to be uniform and the medium flows uniformly, so that the temperatures of the monitored locations at different depths are different, but the CO2 partial pressure p c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v can be related to the CO2 partial pressure p measured at the wellhead c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v are the same.
[0032] In the embodiment of the present invention, the temperature at the monitored position can be calculated by the temperature gradient formula, that is, the temperature at the monitored position P u The temperature at t u The following conditions are met: u =T0+Gd×h u Among them, T0 is the wellhead temperature of the oil well pipeline, Gd is the temperature gradient of the target oil well pipeline area, h u Pu Depth.
[0033] In the embodiment of the present invention, the CO2 partial pressure p c and H2S partial pressure p h HCO3 can be measured in oil-water mixture in pipeline - and S 2- The concentration is estimated, and according to Henry's law: p c =(C H ×C H+ ) / (K c ×B c ). Among them, C H HCO3 - The concentration is in mol / L, C H+ Obtained from the pH value of the crude oil medium, C H+ =10 pH , K c is the Henry constant of CO2, in mol / (L×bar), B c is the first dissociation constant of carbonic acid, in mol / L. K can be determined based on the following Table 1 c and B c : Table 1
[0034] p h =(C s ×C H+ ) / (K s ×B s ). Among them, C s For S 2- The concentration is in mol / L, C H+ From pH, C H+ =10 pH , K s is the Henry constant of H2S, in mol / (L×bar), B s is the first dissociation constant of H2S in mol / L. K can be determined based on Table 2 below s and B s : Table 2
[0035] In the embodiment of the present invention, the chloride ion concentration can be directly measured in the oil-water mixture in the pipeline.
[0036] In the embodiment of the present invention, the medium flow rate can be measured by a flow meter.
[0037] S200, based on the u-th monitored position Pu The corresponding depth h u And the voltage divider ratio F u , obtain the corresponding corrosion rate prediction model, and based on the obtained corrosion rate prediction model and D u Get the uth monitored position P u The corresponding corrosion rate R u ; F u =p c u / p h u , p c u is the uth monitored position P u The corresponding CO2 partial pressure, p h u is the uth monitored position P u Corresponding H2S partial pressure.
[0038] In the embodiment of the present invention, the uth monitored position P u The corresponding depth h u Equal to the uth monitored position P u The distance between the location and the oil wellhead.
[0039] In an embodiment of the present invention, the corrosion rate prediction model can be obtained by: First, establish t and p c 、p h , c, v are independent variables, and the corrosion rate R is the dependent variable. Corrosion rate prediction model: R = k × f (t, p c , p h , c, v), k is the coefficient.
[0040] Then, according to the chemical dynamic equilibrium theory, the five influencing factors can be considered independently, and we can get: R = k × f (t) × f (p c )×f(p h )×f(c)×f(v).
[0041] Taking the logarithm of both sides of the above equation, we can obtain: lnR = w × lnf (t) × lnf (p c )×lnf(p h )×lnf(c)×lnf(v), w is the coefficient.
[0042] Then, the relationship between temperature and corrosion rate, the relationship between CO2 partial pressure and corrosion rate, the relationship between H2S partial pressure and corrosion rate, the relationship between chloride ion concentration and corrosion rate, and the relationship between medium flow rate and corrosion rate are determined respectively.
[0043] Specifically, the relationship between temperature and corrosion rate can be obtained as follows: Low temperature stage: When the temperature t is less than the critical temperature t0, the temperature increase will accelerate the dissolution of CO2 and the dissociation of carbonic acid, thereby reducing the pH value and promoting the anodic dissolution reaction of the metal. The corrosion rate decreases with increasing temperature. Based on the Arrhenius equation and the De Waard-Millis model, the relationship between temperature and corrosion rate is: R=A0×e (-(Ea / (d0×t))) ×(p c ) b .
[0044] Among them, A0 is the model coefficient, E a is the activation energy of the chemical reaction, which is related to the material of the pipeline and is about 40~60kJ / mol. d0 is the gas constant, which can be 8.314J / (mol×K). b is a constant. In an exemplary embodiment, b=0.67.
[0045] High temperature stage: If t≥t0, high temperature promotes the nucleation and growth of FeCO3 film, forming a dense protective layer, inhibiting the contact between the metal matrix and the corrosive medium, and the corrosion rate decreases with increasing temperature. The relationship between temperature and corrosion rate is: R=A1×(p c ) b / t. A1 is the model coefficient.
[0046] The relationship between CO2 partial pressure and corrosion rate and the relationship between H2S partial pressure and corrosion rate can be obtained as follows: For the corrosive medium where H2S / CO2 coexists, both will participate in the corrosion. According to the corrosion mechanism proposed by Mishra, it can be known that: When p c / p h When ≥F0, CO2 is the dominant factor of corrosion, and the corrosion rate calculation formula is: lnR=C0+b×[1-exp(1 / p h )]×lnp c When p c / p h When <F0, H2S is the dominant factor of corrosion, and the corrosion rate calculation formula is: lnR=C1+C2×(lnp h ) 2 +C3×lnp h +C4×lnp c F0 is the preset voltage division ratio threshold, which can be 500. C0 to C4 are coefficients.
[0047] The relationship between chloride ion concentration and corrosion rate can be obtained from the empirical model: lnR=k c ×lnc+b c . kc and b c are coefficients respectively.
[0048] The relationship between the medium flow rate and the corrosion rate can be obtained based on the empirical model. The relationship between the flow rate and the corrosion rate satisfies the following conditions: lnR=k v ×v+b v . k v and b v are coefficients respectively.
[0049] According to the above relationship, four corrosion prediction models can be obtained, namely the first corrosion prediction model to the fourth corrosion prediction model. Among them, the first corrosion rate prediction model satisfies the following conditions: lnR1=k1+b×[1-exp(1 / p h )]×lnp c -Ea / d0×b / t×ln(A1×p c )+k1 c ×lnc+k1 v ×v,h<h0,p c / p h ≥F0; where h is the depth of the monitored location, h0 is the preset depth threshold, h0=(T1-T0) / Gd. exp() is an exponential function, k1, A1, k1 c and k1 v is the model parameter of the first corrosion rate prediction model, and R1 is the corrosion rate predicted by the first corrosion rate prediction model.
[0050] The second corrosion rate prediction model satisfies the following conditions: lnR2=k2+a0×(lnp h ) 2 +b1×lnp h +c1×lnp c -Ea / d0×b / t×ln(A2×p c )+k2 c ×lnc+k2 v ×v,h<h0,p c / p h <F0; k2, a0, b1, c1, A2, k2 c and k2 v is the model parameter of the second corrosion rate prediction model, and R2 is the corrosion rate predicted by the second corrosion rate prediction model.
[0051] The third corrosion rate prediction model satisfies the following conditions: lnR3=k3+b×[1-exp(1 / p h )]×lnp c +ln(A3×(p c ) b / t)+k3 c ×lnc+k3 v ×v,h≥h0,p c / p h ≥F0; k3, A3, k3 c and k3 v is the model parameter of the third corrosion rate prediction model, and R3 is the corrosion rate predicted by the third corrosion rate prediction model.
[0052] The fourth corrosion rate prediction model satisfies the following conditions: lnR4=k4+a1×(lnp h ) 2 +b2×lnp h +c2×lnp c +ln(A4×(p c ) b / t)+k4 c ×lnc+k4 v ×v,h≥h0,p c / p h <F0; k4, a1, b2, c2, A4, k4 c and k4 v is the model parameter of the fourth corrosion rate prediction model, and R4 is the corrosion rate predicted by the fourth corrosion rate prediction model.
[0053] That is, if h u <h0, and F u ≥F0,P u The corresponding corrosion rate prediction model is the first corrosion rate prediction model. If h u <h0, and F u <F0,P u The corresponding corrosion rate prediction model is the second corrosion rate prediction model. If h u ≥h0, and F u ≥F0,P u The corresponding corrosion rate prediction model is the third corrosion rate prediction model. If h u ≥h0, and F u <F0,P u The corresponding corrosion rate prediction model is the fourth corrosion rate prediction model. u The corresponding corrosion rate influencing characteristic data is input into the corresponding corrosion rate prediction model to obtain the corresponding corrosion rate.
[0054] It should be noted that, when the target oil well pipeline is an oil pipeline, the depth of all monitored positions of the oil pipeline may be 0, and the temperature of all monitored positions may be the wellhead temperature.
[0055] Furthermore, in an embodiment of the present invention, the model parameters of the corrosion rate prediction model can be obtained by the following steps: S10, obtaining a sample data set, wherein the sample data set includes a plurality of sample data, each sample data including corresponding corrosion rate influencing characteristic data and corrosion rate.
[0056] In the embodiment of the present invention, the sample data set can be obtained based on the aforementioned m groups of sample data.
[0057] S11, inputting the current batch of training sample data into the current corrosion rate prediction model for training to obtain corresponding corrosion rate prediction results.
[0058] S12, based on the corrosion rate prediction results of the current batch and the corresponding actual corrosion rate, obtain the current loss function value of the current corrosion rate prediction model, and determine whether the current loss function value meets the preset model training end condition. If yes, execute step S14, otherwise, execute step S13.
[0059] In an embodiment of the present invention, the loss function value can be calculated based on an existing loss function. The preset model training end condition can be set based on actual needs. For example, the loss is less than or equal to a set loss threshold and remains unchanged within a set time period.
[0060] S13, updating the parameters of the current corrosion rate prediction model based on the current loss function value, and using the next batch of sample data as the training sample data of the current batch, and executing S11.
[0061] S14, using the current corrosion rate prediction model as the trained current corrosion rate prediction model, and using the parameters of the trained current corrosion rate prediction model as the model parameters.
[0062] In an embodiment of the present invention, the corrosion rate prediction model may be a random forest regression model.
[0063] S300, get max(R1, R2, ..., R u , ..., R z ) as the target corrosion rate, and based on the basic data, P u Corresponding axial force T u and the target corrosion rate, and obtain the remaining service time t of the target oil well pipeline r ; max() means taking the maximum value.
[0064] In the embodiment of the present invention, T u The following conditions must be met: T u =p0×g×(1 / 2)×(Lhu )×S-β×E×S×△t; where p0 is the material density of the oil well pipeline, g is the acceleration of gravity, L is the length of the target oil well pipeline, S is the cross-sectional area of the target oil well pipeline, β is the pipe expansion coefficient of the target oil well pipeline, E is the pipe elastic modulus of the target oil well pipeline, and △t is the temperature difference between the operating temperature of the target oil well pipeline and the surface temperature.
[0065] In the embodiment of the present invention, t r The following conditions must be met: σ=4T / π(r o 2 -(r+R(t0+t r ) 2 ), R is the target corrosion rate.
[0066] S400, based on the remaining usage time t of the target oil well pipeline r and a corrosion state value determination model, obtaining the corrosion state value of the target oil well pipeline, and determining the corrosion state of the target oil well pipeline based on the obtained corrosion state value, wherein the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline, and the larger the corrosion state value of the oil well pipeline, the more serious the corrosion degree, and vice versa.
[0067] Furthermore, in an embodiment of the present invention, the corrosion state value determination model satisfies the following conditions: A=q×e / t r ; Wherein, A is the corrosion state value, q is a preset coefficient, which can be an empirical value. In an exemplary embodiment, 0.5≤q≤1.5. e is a constant, which can be an empirical value. In an exemplary embodiment, e=10.
[0068] Furthermore, determining the corrosion state of the target oil well pipeline based on the acquired corrosion state value may specifically include: If A≤A1, the corrosion state of the target oil well pipeline is determined to be the first corrosion state. If A1<A≤A2, the corrosion state of the target oil well pipeline is determined to be the second corrosion state. If A2<A, the corrosion state of the target oil well pipeline is determined to be the third corrosion state. A1 is the first preset threshold value, A2 is the second preset threshold value, A1<A2, wherein the corrosion degrees corresponding to the first corrosion state to the third corrosion state increase successively.
[0069] In the embodiment of the present invention, A1 and A2 may be determined based on actual conditions. In an illustrative embodiment, A1=1, A2=5.
[0070] In actual application, the evaluation cycle of the corrosion state is determined according to the evaluation parameter, i.e., the minimum update frequency parameter in the corrosion rate influence characteristic data, and time alignment is performed. When the corrosion state value of the target oil well pipeline changes between the three corrosion states, corresponding monitoring strategies should be adopted, for example, the specific ones may include: The monitoring strategy adopted for the first corrosion state is: 1) continuously monitor the corrosion rate and environmental parameters (such as temperature, pressure, flow rate, etc.); 2) inject low concentration of corrosion inhibitors (such as amines, imidazolines) to slow down the corrosion rate.
[0071] The monitoring strategy adopted for the second corrosion state is: 1) Optimize the corrosion inhibitor solution: increase the injection concentration and injection volume of the corrosion inhibitor, select a more efficient corrosion inhibitor (such as a film-forming corrosion inhibitor); adjust the corrosion inhibitor formula according to the main corrosion control factors (such as CO2 partial pressure, chloride ion concentration); 2) Process optimization: adjust the gas injection process parameters to reduce CO2 partial pressure and temperature fluctuations. 3) Strengthen the corrosion detection of ground pipelines and equipment to eliminate hidden dangers.
[0072] The monitoring strategy adopted for the third corrosion state is: 1) Inject high-concentration corrosion inhibitors to quickly form a protective film to inhibit corrosion; use composite corrosion inhibitors to simultaneously inhibit CO2 corrosion and chloride ion corrosion. 2) Analyze the process or oil quality to determine whether there are factors that accelerate corrosion and make corrections; if they cannot be changed, re-evaluate the corrosion risk of the oil well and develop an emergency plan to ensure a rapid response when the pipeline fails. 3) Expand the scope of corrosion detection of ground pipelines and equipment, compare the development of recent corrosion rates, evaluate the degree of corrosion of underground pipelines, and develop a shutdown and maintenance plan based on the life of the pipeline. Replacement of severely corroded pipe sections, strengthening anti-corrosion coatings, or upgrading corrosion-resistant materials can be adopted.
[0073] Another embodiment of the present invention provides a device for obtaining the corrosion status of an oil well pipeline, the device comprising: The data acquisition module is used to obtain the basic data corresponding to the target oil well pipeline and the corrosion rate influence characteristic data set D={D1, D2, ..., D u , ..., D z}; The basic data includes the inner diameter r of the pipeline and the outer diameter r of the pipeline o , the material yield strength σ of the pipeline and the service life t0 of the oil well pipeline, D u is the uth monitored position P of the target oil well pipeline u The corresponding corrosion rate influence characteristic data, u has a value of 1 to z, z is the number of monitored positions of the target oil well pipeline; the corrosion rate influence characteristic data at least includes the temperature t of the crude oil medium at the monitored position, the CO2 partial pressure p c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v.
[0074] The corrosion rate prediction module is used to predict the corrosion rate based on the u-th monitored position P u The corresponding depth h u And the voltage divider ratio F u , obtain the corrosion rate prediction model corresponding to the u-th monitored position, and based on the obtained corrosion rate prediction model and D u Get the uth monitored position P u The corresponding corrosion rate R u ; F u =p c u / p h u , p c u is the uth monitored position P u The corresponding CO2 partial pressure, p h u is the uth monitored position P u Corresponding H2S partial pressure; uth monitored position P u The corresponding depth h u Equal to the uth monitored position P u The distance between the location and the oil wellhead.
[0075] The remaining usage time acquisition module is used to obtain the max (R1, R2, ..., R u , ..., R z ) as the target corrosion rate, and based on the basic data, the uth monitored position P u Corresponding axial force T u and the target corrosion rate, and obtain the remaining service time t of the target oil well pipeline r ; max() means taking the maximum value.
[0076] The corrosion state value determination module is used to determine the remaining service time t of the target oil well pipeline based on the r and a corrosion state value determination model, obtain the corrosion state value of the target oil well pipeline, and determine the corrosion state of the target oil well pipeline based on the obtained corrosion state value, wherein the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline. The device can be used to perform Figure 1 Therefore, for the functions that can be realized by each functional module of the device, please refer to Figure 1 The description of the illustrated embodiment is not repeated in detail.
[0077] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the embodiment of the present invention.
[0078] The embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the embodiment of the present invention.
[0079] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.
[0080] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for obtaining the corrosion status of an oil well pipeline, characterized in that: The method comprises the following steps: S100, obtaining the basic data corresponding to the target oil well pipeline and the corrosion rate influence characteristic data set D={D1, D2, ..., D u , ..., D z }; The basic data includes the inner diameter r of the pipeline and the outer diameter r of the pipeline o , the material yield strength σ of the pipeline and the service life t0 of the oil well pipeline, D u is the uth monitored position P of the target oil well pipeline u The corresponding corrosion rate influence characteristic data, u has a value of 1 to z, z is the number of monitored positions of the target oil well pipeline; the corrosion rate influence characteristic data at least includes the temperature t of the crude oil medium at the monitored position, the CO2 partial pressure p c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v; S200, based on the u-th monitored position P u The corresponding depth h u And the voltage divider ratio F u , obtain the corrosion rate prediction model corresponding to the u-th monitored position, and based on the obtained corrosion rate prediction model and D u Get the uth monitored position P u The corresponding corrosion rate R u ; F u =p c u / p h u , p c u is the uth monitored position P u The corresponding CO2 partial pressure, p h u is the uth monitored position P u Corresponding H2S partial pressure; uth monitored position P u The corresponding depth h u Equal to the uth monitored position P u The distance between the location and the wellhead; S300, get max(R1, R2, ..., R u , ..., R z ) as the target corrosion rate, and based on the basic data, the uth monitored position P u Corresponding axial force T u and the target corrosion rate, and obtain the remaining service time t of the target oil well pipeline r ; max() means taking the maximum value; S400, based on the remaining use time t of the target oil well pipeline r and a corrosion state value determination model, obtaining the corrosion state value of the target oil well pipeline, and determining the corrosion state of the target oil well pipeline based on the obtained corrosion state value, wherein the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline.
2. The method according to claim 1, characterized in that The corrosion rate prediction model includes a first corrosion rate prediction model, a second corrosion rate prediction model, a third corrosion rate prediction model and a fourth corrosion rate prediction model; Among them, the first corrosion rate prediction model satisfies the following conditions: lnR1=k1+b×[1-exp(1 / p h )]×lnp c -Ea / d0×b / t×ln(A1×p c )+k1 c ×lnc+k1 v ×v,h<h0,p c / p h ≥F0; where b is a constant, E a is the chemical reaction activation energy, d0 is the gas constant, h is the depth of the monitored location, h0 is the preset depth threshold, exp() is the exponential function, k1, A1, k1 c and k1 v is the model parameter of the first corrosion rate prediction model, R1 is the corrosion rate predicted by the first corrosion rate prediction model, F0 is the preset partial pressure ratio threshold, The second corrosion rate prediction model satisfies the following conditions: lnR2=k2+a0×(lnp h ) 2 +b1×lnp h +c1×lnp c -Ea / d0×b / t×ln(A2×p c )+k2 c ×lnc+k2 v ×v,h<h0,p c / p h <F0; where k2, a0, b1, c1, A2, k2 c and k2 v is a model parameter of the second corrosion rate prediction model, and R2 is the corrosion rate predicted by the second corrosion rate prediction model; The third corrosion rate prediction model satisfies the following conditions: lnR3=k3+b×[1-exp(1 / p h )]×lnp c +ln(A3×(p c ) b / t)+k3 c ×lnc+k3 v ×v,h≥h0,p c / p h ≥F0; among them, k3, A3, k3 c and k3 v is a model parameter of the third corrosion rate prediction model, and R3 is the corrosion rate predicted by the third corrosion rate prediction model; The fourth corrosion rate prediction model satisfies the following conditions: lnR4=k4+a1×(lnp h ) 2 +b2×lnp h +c2×lnp c +ln(A4×(p c ) b / t)+k4 c ×lnc+k4 v ×v,h≥h0,p c / p h <F0; among them, k4, a1, b2, c2, A4, k4 c and k4 v is the model parameter of the fourth corrosion rate prediction model, and R4 is the corrosion rate predicted by the fourth corrosion rate prediction model.
3. The method according to claim 1, characterized in that The corrosion rate influence characteristic data is obtained by the following steps: Obtaining n initial influencing parameters related to the corrosion rate of the oil well pipeline; Obtain m groups of sample data, wherein each group of sample data includes corresponding actual corrosion rate data of oil well pipelines and corresponding data of n initial influencing parameters; Performing standardization processing on the m groups of sample data to obtain the m groups of sample data after standardization processing; Based on the m groups of sample data after standardization, the weight of each initial influencing parameter and the matrix to be processed M are obtained. The element x in the i-th row and j-th column of the matrix to be processed M is ij =|v 0i -d ij |, v 0i is the actual corrosion rate data in the i-th group of sample data, d ij is the value of the j initial influencing parameters in the i-th group of sample data, i ranges from 1 to m, and j ranges from 1 to n; Based on the matrix to be processed M, the correlation set G={G1, G2, …, G j , ..., G n }, G j is the correlation between the jth initial influencing parameter and the corrosion rate, G j =(1 / m)∑ m i=1 w j ×δ ij , where w j is the weight of the jth initial influencing parameter, δ ij is the correlation between the j initial influencing parameters in the i-th group of sample data and the corrosion rate corresponding to the i-th group of sample data, δ ij =(d min +ρ×d max ) / (x ij +ρ×d max ), d min is the minimum value in the matrix M to be processed, d max is the maximum value in the matrix M to be processed, and ρ is the preset coefficient; Traverse the association set G, if G j ≥G0, G j The corresponding initial impact parameter is added to the current intermediate list; the initial value of the current intermediate list is empty; G0 is the preset threshold; The initial influencing parameters in the current intermediate list are used as the corrosion rate influencing characteristic data.
4. The method according to claim 1, characterized in that: The remaining usage time t of the target oil well pipeline r The following conditions must be met: σ=4T / π(r o 2 -(r+R(t0+t r ) 2 ), R is the target corrosion rate.
5. The method according to claim 1, characterized in that The corrosion state value determination model satisfies the following conditions: A=q×e / t r ; Among them, A is the corrosion state value, q is the preset coefficient, and e is a constant.
6. The method according to claim 5, characterized in that The step of determining the corrosion state of the target oil well pipeline based on the acquired corrosion state value specifically includes: If A≤A1, the corrosion state of the target oil well pipeline is determined to be the first corrosion state. If A1<A≤A2, the corrosion state of the target oil well pipeline is determined to be the second corrosion state. If A2<A, the corrosion state of the target oil well pipeline is determined to be the third corrosion state. A1 is the first preset threshold value, A2 is the second preset threshold value, A1<A2, wherein the corrosion degrees corresponding to the first corrosion state to the third corrosion state increase successively.
7. The method according to claim 1, characterized in that T u The following conditions must be met: T u =p0×g×(1 / 2)×(Lh u )×S-β×E×S×△t; Among them, p0 is the material density of the target oil well pipeline, g is the gravitational acceleration, L is the length of the target oil well pipeline, S is the cross-sectional area of the target oil well pipeline, β is the pipe expansion coefficient of the target oil well pipeline, E is the pipe elastic modulus of the target oil well pipeline, and △t is the temperature difference between the operating temperature of the target oil well pipeline and the surface temperature.
8. The method according to claim 1, characterized in that The model parameters of the corrosion rate prediction model are obtained by the following steps: S10, obtaining a sample data set, wherein the sample data set includes a plurality of sample data, each sample data including corresponding corrosion rate influencing characteristic data and corrosion rate; S11, inputting the current batch of training sample data into the current corrosion rate prediction model for training to obtain the corresponding corrosion rate prediction result; S12, based on the corrosion rate prediction results of the current batch and the corresponding actual corrosion rate, the current loss function value of the current corrosion rate prediction model is obtained, and it is determined whether the current loss function value meets the preset model training end condition. If so, step S14 is executed, otherwise, step S13 is executed; S13, updating the parameters of the current corrosion rate prediction model based on the current loss function value, and using the next batch of sample data as the training sample data of the current batch, and executing S11; S14, using the current corrosion rate prediction model as the trained current corrosion rate prediction model, and using the parameters of the trained current corrosion rate prediction model as the model parameters.
9. The method according to claim 8, characterized in that The corrosion rate prediction model is a random forest regression model.
10. A device for obtaining the corrosion status of an oil well pipeline, characterized in that: The device comprises: The data acquisition module is used to obtain the basic data corresponding to the target oil well pipeline and the corrosion rate influence characteristic data set D={D1, D2, ..., D u , ..., D z }; The basic data includes the inner diameter r of the pipeline and the outer diameter r of the pipeline o , the material yield strength σ of the pipeline and the service life t0 of the oil well pipeline, D u is the uth monitored position P of the target oil well pipeline u The corresponding corrosion rate influence characteristic data, u has a value of 1 to z, z is the number of monitored positions of the target oil well pipeline; the corrosion rate influence characteristic data at least includes the temperature t of the crude oil medium at the monitored position, the CO2 partial pressure p c 、H2S partial pressure p h , chloride ion concentration c and medium flow rate v; The corrosion rate prediction module is used to predict the corrosion rate based on the u-th monitored position P u The corresponding depth h u And the voltage divider ratio F u , obtain the corrosion rate prediction model corresponding to the u-th monitored position, and based on the obtained corrosion rate prediction model and D u Get the uth monitored position P u The corresponding corrosion rate R u ; F u =p c u / p h u , p c u is the uth monitored position P u The corresponding CO2 partial pressure, p h u is the uth monitored position P u Corresponding H2S partial pressure; uth monitored position P u The corresponding depth h u Equal to the uth monitored position P u The distance between the location and the wellhead; The remaining usage time acquisition module is used to obtain the max (R1, R2, ..., R u , ..., R z ) as the target corrosion rate, and based on the basic data, the uth monitored position P u Corresponding axial force T u and the target corrosion rate, and obtain the remaining service time t of the target oil well pipeline r ; max() means taking the maximum value; The corrosion state value determination module is used to determine the remaining service time t of the target oil well pipeline based on the r and a corrosion state value determination model, obtaining the corrosion state value of the target oil well pipeline, and determining the corrosion state of the target oil well pipeline based on the obtained corrosion state value, wherein the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline.
Citation Information
Patent Citations
Oil pipe corrosion degree forecasting method and device
CN103870670A
H2S / CO2-containing environment pipeline steel corrosion rate calculation method
CN113343498A
Method for predicting corrosion rate in gas pipeline
CN115859782A
Method for predicting corrosion rate of 13Cr pipe in carbon dioxide environment
CN119069048A
Method for dynamically predicting service life of tubular column based on corrosion logging detection
CN119296665A
Cited By
Method and system for monitoring corrosion state of long-distance pipeline
CN120351463A