A method and device for obtaining the corrosion state of an oil well pipeline
By obtaining the basic data of oil well pipelines and corrosion rate impact characteristic data, a corrosion rate prediction model is established, which solves the problem of inaccurate acquisition of corrosion status in oil well pipelines, and achieves rapid and accurate corrosion status evaluation, ensuring the service life and safety of oil well pipelines.
Patent Information
- Application Number
- CN202510414377.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-04-03
AI Technical Summary
The prior art cannot accurately and quickly obtain the corrosion status of oil well pipelines, resulting in the inability to effectively determine anti-corrosion measures, affecting the service life and safety of oil well pipelines.
By obtaining the basic data of the oil well pipeline and corrosion rate impact characteristic data, a corrosion rate prediction model is established, the corrosion rate is calculated based on the depth and partial pressure ratio, and the remaining usage time and corrosion state value are used to determine the corrosion state of the pipeline.
It achieves rapid and accurate acquisition of the corrosion status of the oil well pipeline, ensures the service life evaluation and safety of the oil well pipeline, and provides effective anti-corrosion measures.
Smart Images

Figure CN119918432B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of petrochemical equipment, and particularly to a method and device for obtaining the corrosion state of oil well pipelines. Background Art
[0002] Carbon capture, utilization and storage technology (CCUS) refers to the technology of separating CO2 from industrial production or other emission sources and directly storing it or injecting it into a new production process after processing to reduce CO2 emissions. This technology can be applied in the process of oil extraction. The oil displacement effect of the CO2 injection oil production process has more obvious technical advantages than traditional water flooding in improving the utilization rate and recovery rate of low-permeability oilfields. However, when using CO2 injection to displace oil, it is easy to cause corrosion of the oil pipe, and the environmental temperature is relatively high during the crude oil extraction process, which has a certain promoting effect on the corrosion rate of CO2 and exacerbates the formation of corrosion defects. The corrosion rate of the oil pipe will affect the service life of the oil pipe. The length of the service life of the oil pipe can characterize the state of the oil pipe. According to the state of the oil pipe, 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 the accurate acquisition of the state of the oil pipe. The patent document (CN103870670A) discloses a method and device for predicting the corrosion degree of an oil pipe. Although this document obtains an oil pipe corrosion prediction model to predict the corrosion rate of the oil pipe, the model in this document does not give how the corrosion influencing factors used by the model are determined, which may lead to an inaccurate model. In addition, the relationship established between the corrosion prediction rate and the corrosion influencing factors in this document is only a simple linear relationship, which may also lead to an inaccurate model. Therefore, how to accurately and quickly obtain the corrosion situation of the oil well pipeline to obtain the state of the oil well pipeline is a topic worthy of discussion. Summary of the Invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is as follows:
[0004] According to a first aspect of the present invention, a method for obtaining the corrosion state of an oil well pipeline is provided. The method includes the following steps:
[0005] S100, obtaining the basic data corresponding to the target oil well pipeline and the corrosion rate influence feature data set D = {D1, D2,..., D u ,..., D z}; the basic data includes the inner diameter r of the pipeline, the outer diameter r o , the material yield strength σ of the pipeline, and the service time t0 of the oil well pipeline. D u is the u-th monitored position P of the target oil well pipeline uCorresponding corrosion rate influence characteristic data, where the value of u ranges from 1 to z, and 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, the CO2 partial pressure p c , the H2S partial pressure p h , the chloride ion concentration c, and the medium flow velocity v.
[0006] S200. Based on the depth h u corresponding to the u-th monitored position P u and the partial pressure 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 obtain the corrosion rate R u corresponding to the u-th monitored position P u ; F u = p c u / p h u , p c u is the CO2 partial pressure corresponding to the u-th monitored position P u , p h u is the H2S partial pressure corresponding to the u-th monitored position P u ; the depth h u corresponding to the u-th monitored position P u is equal to the distance between the position where the u-th monitored position P u is located and the wellhead of the oil well.
[0007] S300. Obtain max(R1, R2,..., R u ,..., R z ) as the target corrosion rate, and based on the basic data, the axial force T u corresponding to the u-th monitored position P u and the target corrosion rate, obtain the remaining service time t r of the target oil well pipeline; max() represents taking the maximum value.
[0008] S400. Based on the remaining service time t r of the target oil well pipeline and the corrosion state value determination model, obtain the corrosion state value of the target oil well pipeline, and based on the obtained corrosion state value, determine the corrosion state of the target oil well pipeline, where the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline.
[0009] According to the second aspect of the present invention, there is provided an oil well pipeline corrosion state acquisition device, the device includes:
[0010] A data acquisition module for acquiring 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, the outer diameter r o , the material yield strength σ of the pipeline, and the service time t0 of the oil well pipeline. D u is the corrosion rate influence characteristic data corresponding to the u-th monitored position Pu u of the target oil well pipeline, where the value of u ranges from 1 to z, and 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, the CO2 partial pressure p c , the H2S partial pressure p h , the chloride ion concentration c, and the medium flow velocity v at the monitored position.
[0011] A corrosion rate prediction module for obtaining the corrosion rate prediction model corresponding to the u-th monitored position Pu u based on the corresponding depth h u and the partial pressure ratio F u , and obtaining the corrosion rate R u corresponding to the u-th monitored position Pu u based on the obtained corrosion rate prediction model and D u ; F u =p c u / p h u , where p c u is the CO2 partial pressure corresponding to the u-th monitored position Pu u , and p h u is the H2S partial pressure corresponding to the u-th monitored position Pu u ; the depth h u corresponding to the u-th monitored position Pu u is equal to the distance between the position where the u-th monitored position Pu u is located and the oil well wellhead.
[0012] A remaining service time acquisition module for obtaining max(R1, R2, ……, R u , ……, R z ) as the target corrosion rate, and obtaining the remaining service time t u of the target oil well pipeline based on the basic data, the axial force T u corresponding to the u-th monitored position Pu r and the target corrosion rate; max() represents taking the maximum value.
[0013] An erosion state value determination module, configured to obtain the erosion state value of the target oil well pipeline based on the remaining service life t of the target oil well pipeline r and an erosion state value determination model, and determine the erosion state of the target oil well pipeline based on the obtained erosion state value, where the erosion state value of the oil well pipeline is used to characterize the degree of erosion of the oil well pipeline. The present invention has at least the following beneficial effects:
[0014] For the method and device for obtaining the erosion state of an oil well pipeline provided by the embodiments of the present invention, first, based on an erosion rate prediction model and erosion rate influence characteristic data, predict the erosion rate of the target oil well pipeline to obtain the predicted erosion rate of the target oil well pipeline. Then, based on the basic data and the predicted erosion rate, obtain the remaining service life of the target oil well pipeline; then, based on the remaining service life of the target oil well pipeline and a state value acquisition model, obtain the erosion state value of the target oil well pipeline, and determine the erosion state of the target oil well pipeline based on the obtained state value. The present invention can quickly and accurately obtain the erosion state of the oil well pipeline.
[0015] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0017] Figure 1 It is a flowchart of the method for obtaining the erosion state of an oil well pipeline provided by the embodiments of the present invention. Detailed Embodiments
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. The terms used in the description of the invention herein are for the purpose of describing specific embodiments only and are not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0020] It should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts depict 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 operations are completed, but there can also be additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0021] The present invention aims to provide a method for quickly and accurately obtaining the corrosion state of an oil well pipeline. In the embodiments of the present invention, the oil well pipeline includes an oil transmission pipeline and an oil layer casing. The embodiments of the present invention provide a method for obtaining the corrosion state of an oil well pipeline, as Figure 1 shown, the method may include the following steps:
[0022] S100, obtain the basic data corresponding to the target oil well pipeline and the corrosion rate influence feature data set D = {D1, D2,..., D u ,..., D z}. D u is the corrosion rate influence feature data corresponding to the u-th monitored position P u of the target oil well pipeline, and the value of u ranges from 1 to z, where z is the number of monitored positions of the target oil well pipeline. In the embodiments of the present invention, the specific positions and the number of monitored positions of the target oil well pipeline can be determined based on actual needs.
[0023] In the embodiments of the present invention, the basic data includes the inner diameter r of the pipeline, the outer diameter r o , the material yield strength σ of the pipeline, and the service time t0 of the oil well pipeline. The units of the inner diameter and the outer diameter are mm, and the unit of the material yield strength is N / mm 2 . The unit of the service time is years. These basic data can be obtained by referring to the manual of the target oil well pipeline. Further, in the embodiments of the present invention, the corrosion rate influence feature data at least includes the temperature t of the crude oil medium, the CO2 partial pressure p c , the H2S partial pressure p h , the chloride ion concentration c, and the medium flow velocity v at the monitored position.
[0024] In the embodiments of the present invention, the corrosion rate influence feature data can be obtained through the following steps:
[0025] Obtain n initial influence parameters related to the corrosion rate of the oil well pipeline.
[0026] In the embodiment of the present invention, the initial influence parameters can be obtained by analyzing historical data, and may include factors such as CO2 partial pressure, H2S partial pressure, temperature, pressure, chloride ion concentration, medium flow rate, pH value, water cut, liquid viscosity, sulfide content, impurity gas, flow pattern, etc.
[0027] Obtain m groups of sample data, where each group of sample data includes the corresponding actual corrosion rate data of the oil well pipeline and the corresponding data of n initial influence parameters.
[0028] 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 with an intrusive corrosion monitoring sensor installed in the external oil pipeline outside the well.
[0029] Perform normalization processing on the m groups of sample data to obtain the m groups of sample data after normalization processing.
[0030] In the embodiment of the present invention, the m groups of sample data can be normalized by existing dimensionless processing methods.
[0031] Based on the m groups of sample data after normalization processing, obtain the weight of each initial influence parameter and the matrix M to be processed. The element x in the i-th row and j-th column of the matrix M to be processed ij =|v 0i -d ij |, where v 0j is the actual corrosion rate data in the i-th group of sample data, and d ij is the value of the j-th initial influence parameter in the i-th group of sample data. The value of i ranges from 1 to m, and the value of j ranges from 1 to n.
[0032] Based on the matrix M to be processed, obtain the set of correlation degrees G = {G1, G2,..., G j ,..., G n} between the initial influence parameters and the corrosion rate. G j is the correlation degree between the j-th initial influence parameter and the corrosion rate. G j = (1 / m) ∑ m i=1 w j ×δ ij , where w j is the weight of the j-th initial influence parameter, and δ ij is the correlation degree between the j-th initial influence parameter 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 a preset coefficient.
[0033] In an embodiment of the present invention, w j satisfies the following condition: w j =h j / ∑ n j=1 h j ; h j is the difference value of the j-th initial influence 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 among the m groups of sample data after normalization processing.
[0034] Traverse the association degree set G. If G j ≥G0, add the initial influence parameter corresponding to G j to the current intermediate list; the initial value of the current intermediate list is empty; G0 is a preset threshold.
[0035] In an embodiment of the present invention, the preset threshold can be determined based on the actual situation. In a schematic embodiment, G0 = 0.6.
[0036] Use the initial influence parameters in the current intermediate list as the corrosion rate influence characteristic data.
[0037] In an embodiment of the present invention, the medium concentration in the oil well pipeline is defaulted to be uniform and the medium is flowing uniformly. Thus, the temperatures at the monitored positions 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 the same as the CO2 partial pressure p c , H2S partial pressure p h , chloride ion concentration c, and medium flow rate v measured at the wellhead.
[0038] In an embodiment of the present invention, the temperature at the monitored position can be calculated by the temperature gradient formula, that is, the temperature t u at the monitored position P u satisfies the following condition: t u =T0 + Gd×h uAmong them, T0 is the wellhead temperature of the oil well pipeline, Gd is the temperature gradient of the area where the target oil well pipeline is located, and h u is the depth of P u .
[0039] In the embodiment of the present invention, the partial pressure p c of CO2 and the partial pressure p h of H2S can be estimated from the HCO3 - and S 2- concentrations measured in the oil-water mixture in the pipeline. According to Henry's law, we can get: p c =(C H ×C H+ ) / (K c ×B c ). Among them, C H is the concentration of HCO3 - , with the unit of mol / L. C H+ is obtained from the pH value of the acidity and alkalinity in the crude oil medium. C H+ =10 pH . K c is the Henry's constant of CO2, with the unit of mol / (L×bar). B c is the first dissociation constant of carbonic acid, with the unit of mol / L. K c and B c can be determined based on Table 1 below:
[0040] Table 1
[0041]
[0042] p h =(C s ×C H+ ) / (K s ×B s ). Among them, C s is the concentration of S 2- , with the unit of mol / L. C H+ is obtained from pH. C H+ =10 pH . K s is the Henry's constant of H2S, with the unit of mol / (L×bar). B s is the first dissociation constant of H2S, with the unit of mol / L. K s and B s can be determined based on Table 2 below:
[0043] Table 2
[0044]
[0045] In the embodiment of the present invention, the chloride ion concentration can be directly measured in the oil-water mixture in the pipeline.
[0046] In the embodiment of the present invention, the medium flow rate can be measured by a flow meter.
[0047] S200. Based on the depth h u corresponding to the u-th monitored position P u and the partial pressure ratio F u , obtain the corresponding corrosion rate prediction model, and based on the obtained corrosion rate prediction model and D u obtain the corrosion rate R u corresponding to the u-th monitored position P u ; F u =p c u / p h u where p c u is the CO2 partial pressure corresponding to the u-th monitored position P u and p h u is the H2S partial pressure corresponding to the u-th monitored position P u .
[0048] In the embodiment of the present invention, the depth h u corresponding to the u-th monitored position P u is equal to the distance between the location where the u-th monitored position P u is located and the wellhead of the oil well.
[0049] In the embodiment of the present invention, the corrosion rate prediction model can be obtained in the following manner:
[0050] First, establish a corrosion rate prediction model with t, p c , p h , c, v as independent variables and the corrosion rate R as the dependent variable: R = k × f(t, p c , p h , c, v), where k is a coefficient.
[0051] Then, according to the chemical dynamic equilibrium theory, the five influencing factors can be considered separately, and we get: R = k × f(t) × f(p c ) × f(p h ).
[0052] Take the logarithm of both sides of the above formula to get: lnR = w × lnf(t) × lnf(p c ) × lnf(p h ), where w is a coefficient.
[0053] Then, determine the relationships between temperature and corrosion rate, between CO2 partial pressure and corrosion rate, between H2S partial pressure and corrosion rate, between chloride ion concentration and corrosion rate, and between medium flow rate and corrosion rate, respectively.
[0054] Specifically, the relationship between temperature and corrosion rate can be obtained in the following manner:
[0055] Low-temperature stage: When the temperature t is less than the critical temperature t0, an increase in temperature 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 an increase in temperature. Based on the Arrhenius equation and the De Waard-Milliams model, the relationship between temperature and corrosion rate is: R = A0 × e (-(Ea / (d0×t))) × (p c ) b .
[0056] Among them, A0 is the model coefficient, E a is the activation energy of the chemical reaction, which is related to the pipeline material and is approximately 40 - 60 kJ / mol. d0 is the gas constant, which can be 8.314 J / (mol×K). b is a constant. In one exemplary embodiment, b = 0.67.
[0057] High-temperature stage: If t ≥ t0, high temperature promotes the nucleation and growth of the FeCO3 film, forming a dense protective layer and inhibiting the contact between the metal matrix and the corrosive medium. The corrosion rate decreases with an increase in temperature. The relationship between temperature and corrosion rate is: R = A1 × (p c ) b / t. A1 is the model coefficient.
[0058] The relationships between CO2 partial pressure and corrosion rate and between H2S partial pressure and corrosion rate can be obtained in the following manner:
[0059] For the corrosive medium with coexisting H2S / CO2, both will participate in the corrosion. According to the corrosion mechanism proposed by Mishra, it can be known that:
[0060] When p c / p h ≥ F0, CO2 is the dominant factor in corrosion, and the corrosion rate calculation formula is: lnR = C0 + b × [1 - exp(1 / p h )] × lnp c . When p c / p h < F0, H2S is the dominant factor in corrosion, and the corrosion rate calculation formula is: lnR = C1 + C2 × (lnp h ) 2+C3×lnp h +C4×lnp c 。F0 is the preset partial pressure ratio threshold, which can be 500. C0 to C4 are coefficients.
[0061] The relationship between chloride ion concentration and corrosion rate can be obtained from an empirical model: lnR = k c ×lnc + b c 。k c and b c are coefficients respectively.
[0062] The relationship between medium flow rate and corrosion rate can be obtained based on an empirical model. The relationship between flow rate and corrosion rate satisfies the following condition: lnR = k v ×v + b v 。k v and b v are coefficients respectively.
[0063] According to the above relationships, 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 position, h0 is the preset depth threshold, h0 = (T1 - T0) / Gd. exp() is the exponential function, k1, A1, k1 c and k1 v are the model parameters of the first corrosion rate prediction model, and R1 is the corrosion rate predicted by the first corrosion rate prediction model.
[0064] 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 vis the model parameter of the second corrosion rate prediction model, and R2 is the corrosion rate predicted by the second corrosion rate prediction model.
[0065] The third corrosion rate prediction model satisfies the following condition: 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 are the model parameters of the third corrosion rate prediction model, and R3 is the corrosion rate predicted by the third corrosion rate prediction model.
[0066] The fourth corrosion rate prediction model satisfies the following condition: 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 are the model parameters of the fourth corrosion rate prediction model, and R4 is the corrosion rate predicted by the fourth corrosion rate prediction model.
[0067] That is, if h u <h0, and F u ≥F0, P u corresponds to the first corrosion rate prediction model. If h u <h0, and F u <F0, P u corresponds to the second corrosion rate prediction model. If h u ≥h0, and F u ≥F0, P u corresponds to the third corrosion rate prediction model. If h u ≥h0, and F u <F0, P u corresponds to the fourth corrosion rate prediction model. By substituting P uInput the corresponding corrosion rate influence characteristic data into the corresponding corrosion rate prediction model, and the corresponding corrosion rate can be obtained.
[0068] It should be noted that when the target oil well pipeline is an oil transmission pipeline, the depth of all monitored positions of the oil transmission pipeline can be 0, and the temperature of all monitored positions can be the wellhead temperature.
[0069] Furthermore, in the embodiments of the present invention, the model parameters of the corrosion rate prediction model can be obtained through the following steps:
[0070] S10, obtain a sample data set, the sample data set includes a plurality of sample data, and each sample data includes corresponding corrosion rate influence characteristic data and corrosion rate.
[0071] In the embodiments of the present invention, the sample data set can be obtained based on the foregoing m groups of sample data.
[0072] S11, input the training sample data of the current batch into the current corrosion rate prediction model for training to obtain the corresponding corrosion rate prediction result.
[0073] S12, obtain the current loss function value of the current corrosion rate prediction model based on the corrosion rate prediction result of the current batch and the corresponding true corrosion rate, and determine whether the current loss function value meets the preset model training end condition. If it meets, execute step S14; otherwise, execute step S13.
[0074] In the embodiments 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 according to actual needs. For example, the loss is less than or less than or equal to a set loss threshold and remains unchanged within a set time period.
[0075] S13, update the parameters of the current corrosion rate prediction model based on the current loss function value, and use the sample data of the next batch as the training sample data of the current batch, and execute S11.
[0076] S14, use the current corrosion rate prediction model as the trained current corrosion rate prediction model, and use the parameters of the trained current corrosion rate prediction model as the model parameters.
[0077] In the embodiments of the present invention, the corrosion rate prediction model can be a random forest regression model.
[0078] S300, obtain max(R1, R2, ……, R u , ……, R z ) as the target corrosion rate, and based on the basic data, P u the corresponding axial force Tu and the target corrosion rate, obtain the remaining service time t of the target oil well pipeline r ; max() represents taking the maximum value.
[0079] In an embodiment of the present invention, T u satisfies the following conditions:
[0080] T u = p0×g×(1 / 2)×(L - h u )×S - β×E×S×Δt; where, p0 is the material density of the oil well pipeline, g is the acceleration due to 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 coefficient of expansion of the pipe material of the target oil well pipeline, E is the elastic modulus of the pipe material of the target oil well pipeline, and Δt is the temperature difference between the operating temperature and the surface temperature of the target oil well pipeline.
[0081] In an embodiment of the present invention, t r satisfies the following conditions:
[0082] σ = 4T / π(r o 2 - (r + R(t0 + t r )) 2 ), and R is the target corrosion rate.
[0083] S400, based on the remaining service time t of the target oil well pipeline r and the 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, where the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline. The larger the corrosion state value of the oil well pipeline, the more serious the corrosion degree, and vice versa.
[0084] Further, in an embodiment of the present invention, the corrosion state value determination model satisfies the following conditions:
[0085] A = q×e / t r ;
[0086] where, A is the corrosion state value, q is a preset coefficient, which can be an empirical value. In a schematic embodiment, 0.5 ≤ q ≤ 1.5. e is a constant, which can be an empirical value. In a schematic embodiment, e = 10.
[0087] Further, the determining the corrosion state of the target oil well pipeline based on the obtained corrosion state value may specifically include:
[0088] If A ≤ A1, determine that the corrosion state of the target oil well pipeline is the first corrosion state; if A1 < A ≤ A2, determine that the corrosion state of the target oil well pipeline is the second corrosion state; if A2 < A, determine that the corrosion state of the target oil well pipeline is the third corrosion state. A1 is the first preset threshold, A2 is the second preset threshold, and A1 < A2. Among them, the corrosion degrees corresponding to the first corrosion state to the third corrosion state increase in sequence.
[0089] In the embodiments of the present invention, A1 and A2 can be determined based on the actual situation. In a schematic embodiment, A1 = 1 and A2 = 5.
[0090] In the actual application process, the evaluation period of the corrosion state is determined according to the evaluation parameter, that is, the minimum update frequency parameter in the corrosion rate influence characteristic data, and time alignment processing is performed. When the corrosion state value of the target oil well pipeline changes among the three corrosion states, corresponding monitoring strategies should be adopted. For example, specifically, it may include:
[0091] 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 corrosion inhibitors (such as amines, imidazolines) to slow down the corrosion rate.
[0092] The monitoring strategy adopted for the second corrosion state is: 1) Optimize the corrosion inhibitor scheme: increase the injection concentration and injection volume of the corrosion inhibitor, and 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 the CO2 partial pressure and temperature fluctuation. 3) Strengthen the corrosion detection of surface pipelines and equipment to eliminate potential hazards.
[0093] The monitoring strategy adopted for the third corrosion state is: 1) Inject high-concentration corrosion inhibitors to quickly form a protective film and inhibit corrosion; adopt a composite corrosion inhibitor to simultaneously inhibit CO2 corrosion and chloride ion corrosion. 2) Analyze the process or oil product quality to determine whether there are factors accelerating corrosion and correct them; if it cannot be changed, re-evaluate the corrosion risk of the oil well and formulate an emergency plan to ensure a quick response when the pipeline fails. 3) Expand the corrosion detection range of surface pipelines and equipment, compare the development of the recent corrosion rate, evaluate the corrosion degree of downhole pipelines, and formulate a shutdown and maintenance plan according to the pipeline life. Measures such as replacing severely corroded pipe sections, strengthening the anti-corrosion coating, or upgrading the corrosion-resistant material can be taken.
[0094] Another embodiment of the present invention provides an apparatus for obtaining the corrosion state of an oil well pipeline, and the apparatus includes:
[0095] A data acquisition module, configured to acquire the basic data corresponding to the target oil well pipeline and the corrosion rate influence characteristic data set D = {D1, D2,..., Du , ……, D z}; The basic data includes the inner diameter r of the pipeline, the outer diameter r o of the pipeline, the material yield strength σ of the pipeline, and the service time t0 of the oil well pipeline, D u is the corrosion rate influence characteristic data corresponding to the u-th monitored position Pu u of the target oil well pipeline, where the value of u ranges from 1 to z, and 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, the CO2 partial pressure p c , the H2S partial pressure p h , the chloride ion concentration c, and the medium flow velocity v at the monitored position.
[0096] The corrosion rate prediction module is used to obtain the corrosion rate prediction model corresponding to the u-th monitored position Pu u based on the corresponding depth h u and the partial pressure ratio F u , and obtain the corrosion rate R u corresponding to the u-th monitored position Pu u based on the obtained corrosion rate prediction model and D u ; F u = p c u / p h u , where p c u is the CO2 partial pressure corresponding to the u-th monitored position Pu u , and p h u is the H2S partial pressure corresponding to the u-th monitored position Pu u ; the depth h u corresponding to the u-th monitored position Pu u is equal to the distance between the position where the u-th monitored position Pu u is located and the oil well wellhead.
[0097] The remaining service time acquisition module is used to obtain max(R1, R2, ……, R u , ……, R z ) as the target corrosion rate, and obtain the remaining service time t u of the target oil well pipeline based on the basic data, the axial force T u corresponding to the u-th monitored position Pu r and the target corrosion rate; max() represents taking the maximum value.
[0098] The corrosion state value determination module is used to determine based on the remaining service time t rAnd a corrosion state value determination model to 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, where the corrosion state value of the oil well pipeline is used to characterize the corrosion degree of the oil well pipeline. This device can be used to execute Figure 1 the method shown in the embodiments shown, therefore, for the functions that can be realized by each functional module of this device, reference can be made to Figure 1 the description of the embodiments shown and will not be elaborated here.
[0099] An embodiment of the present invention also provides an electronic device, including: 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 of the embodiment of the present invention.
[0100] An embodiment of the present invention also provides a computer-readable storage medium storing computer-executable instructions, and the computer instructions are used to execute the method of the embodiment of the present invention.
[0101] It should be understood that various forms of the processes shown above can be used, reordering, adding or deleting 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 solutions disclosed in the present invention can be achieved, and no limitation is made herein.
[0102] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for obtaining the corrosion state of an oil well pipeline, characterized in that, The method includes the following steps: S100. 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, the outer diameter r o , the material yield strength σ of the pipeline, and the service time t0 of the oil well pipeline. D u is the corrosion rate influence characteristic data corresponding to the u-th monitored position P u of the target oil well pipeline. The value range of u is from 1 to z, where 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, the CO2 partial pressure p c , the H2S partial pressure p h , the chloride ion concentration c, and the medium flow velocity v at the monitored position; S200, based on the u-th monitored position P u corresponding depth h u and partial pressure 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 obtain the corrosion rate R corresponding to the u-th monitored position P u ; F u =p u c u / p h u where p c u is the CO2 partial pressure corresponding to the u-th monitored position P u h u and p u is the H2S partial pressure corresponding to the u-th monitored position P u ; the depth h corresponding to the u-th monitored position P u is equal to the distance between the position where the u-th monitored position P u is located and the wellhead of the oil well; S300, obtain max(R1, R2, ……, R u , ……, R z ) as the target corrosion rate, and based on the basic data, the axial force T u corresponding to the u-th monitored position P u and the target corrosion rate, obtain the remaining service time t r of the target oil well pipeline; max() represents taking the maximum value; S400, based on the remaining service life t of the target oil well pipeline r and the 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 corrosion rate prediction model is: ; where b is a constant, E a is the activation energy of the chemical reaction, d0 is the gas constant, h is the depth of the monitored position, h0 is the preset depth threshold, exp() is the exponential function, k1, A1, k1 c , k1 v , k1 c , k2, a0, b1, c1, A2, k2 v , k2 c , k3, A3, k3 v , k3 c , k4, a1, b2, c2, A4, k4 v are all model parameters, F0 is the preset partial pressure ratio threshold, and R is the corrosion rate predicted by the corrosion prediction model.
2. The method according to claim 1, characterized in that, The corrosion rate influencing characteristic data is obtained through the following steps: Obtain n initial influencing parameters related to the corrosion rate of the oil well pipeline; Obtain m groups of sample data, where each group of sample data includes the corresponding actual corrosion rate data of the oil well pipeline and the data of the corresponding n initial influencing parameters; Perform standardization processing on the m groups of sample data to obtain the m groups of sample data after standardization processing; Based on m groups of sample data after standardization processing, obtain the weight of each initial influence parameter and the matrix M to be processed. The element x at the i-th row and j-th column in the matrix M to be processed ij =|v 0i -d ij |, where v 0i is the actual corrosion rate data in the i-th group of sample data, and d ij is the value of the j initial influence parameters in the i-th group of sample data. The value range of i is from 1 to m, and the value range of j is from 1 to n; Based on the matrix \(M\) to be processed, obtain the association degree set \(G = \{G_1, G_2, \ldots, G_{n}\}\) between the initial influence parameters and the corrosion rate, where \(G_j\) is the association degree between the \(j\)-th initial influence parameter and the corrosion rate, and \(G_j=(1 / m)\sum_{i = 1}^{m}w_j\times\delta_{ij}\). Here, \(w_j\) is the weight of the \(j\)-th initial influence parameter, and \(\delta_{ij}\) is the association degree between the \(j\)-th initial influence parameter in the \(i\)-th group of sample data and the corrosion rate corresponding to the \(i\)-th group of sample data. \(\delta_{ij}=(d_{\min}+\rho\times d_{ij}) / (x_{ij}+\rho\times d_{\max})\), where \(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 \(\rho\) is a preset coefficient; j , \ldots, G n \}, G j is the association degree between the \(j\)-th initial influence parameter and the corrosion rate, and \(G j =(1 / m)\sum m i=1 w j \times\delta ij , where \(w j is the weight of the \(j\)-th initial influence parameter, and \(\delta ij is the association degree between the \(j\)-th initial influence parameter in the \(i\)-th group of sample data and the corrosion rate corresponding to the \(i\)-th group of sample data, and \(\delta ij =(d min +\rho\times d max ) / (x ij +\rho\times 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 \(\rho\) is a preset coefficient; Traverse the correlation degree set G. If G j ≥ G0, add the initial influence parameter corresponding to G j to the current intermediate list; the initial value of the current intermediate list is empty; G0 is a preset threshold value. Use the initial influencing parameters in the current intermediate list as the corrosion rate influencing characteristic data.
3. The method according to claim 1, characterized in that The corrosion state value determination model satisfies the following conditions: A = q×e / t r ; Where A is the corrosion state value, q is a preset coefficient, and e is a constant.
4. The method according to claim 3, characterized in that Determining the corrosion state of the target oil well pipeline based on the obtained corrosion state value specifically includes: If A ≤ A1, determine that the corrosion state of the target oil well pipeline is the first corrosion state; if A1 < A ≤ A2, determine that the corrosion state of the target oil well pipeline is the second corrosion state; if A2 < A, determine that the corrosion state of the target oil well pipeline is the third corrosion state. A1 is the first preset threshold, A2 is the second preset threshold, and A1 < A2. Among them, the corrosion degrees corresponding to the first corrosion state to the third corrosion state increase in sequence.
5. The method according to claim 1, characterized in that, T u Meet the following conditions: T u =p0×g×(1 / 2)×(L - h u )×S - β×E×S×△t; Where p0 is the material density of the target oil well pipeline, g is the acceleration due to 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 material expansion coefficient of the target oil well pipeline, E is the pipe material elastic modulus of the target oil well pipeline, and △t is the temperature difference between the operating temperature and the surface temperature of the target oil well pipeline.
6. The method according to claim 1, characterized in that The model parameters of the corrosion rate prediction model are obtained through the following steps: S10, obtain a sample data set, the sample data set includes multiple sample data, and each sample data includes the corresponding corrosion rate influencing characteristic data and corrosion rate; S11, input the training sample data of the current batch into the current corrosion rate prediction model for training to obtain the corresponding corrosion rate prediction result; S12, obtain the current loss function value of the current corrosion rate prediction model based on the corrosion rate prediction result of the current batch and the corresponding true corrosion rate, and determine whether the current loss function value meets the preset model training end condition. If it meets, execute step S14; otherwise, execute step S13; S13, update the parameters of the current corrosion rate prediction model based on the current loss function value, and use the next batch of sample data as the training sample data of the current batch, and execute S11; S14, use the current corrosion rate prediction model as the trained current corrosion rate prediction model, and use the parameters of the trained current corrosion rate prediction model as the model parameters.
7. The method according to claim 6, characterized in that The corrosion rate prediction model is a random forest regression model.
8. An apparatus for obtaining the corrosion state of an oil well pipeline, characterized in that, The device includes: A data acquisition module, configured to acquire 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, the outer diameter r o of the pipeline, the material yield strength σ of the pipeline, and the service time t0 of the oil well pipeline. D u is the corrosion rate influence characteristic data corresponding to the u-th monitored position P u of the target oil well pipeline. The value range of u is from 1 to z, where 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, the CO2 partial pressure p c , the H2S partial pressure p h , the chloride ion concentration c, and the medium flow velocity v at the monitored position; The corrosion rate prediction module is used to obtain the corrosion rate prediction model corresponding to the \(u\)-th monitored location \(P\) based on the corresponding depth \(h\) and the partial pressure ratio \(F\) of u , and obtain the corrosion rate \(R\) corresponding to the \(u\)-th monitored location \(P\) based on the obtained corrosion rate prediction model and \(D\) u ; \(F\) u = \(p\) u c u / \(p\) h u , where \(p\) c u is the partial pressure of CO₂ corresponding to the \(u\)-th monitored location \(P\), and \(p\) h u is the partial pressure of H₂S corresponding to the \(u\)-th monitored location \(P\); the depth \(h\) corresponding to the \(u\)-th monitored location \(P\) u is equal to the distance between the location where the \(u\)-th monitored location \(P\) u is located and the wellhead of the oil well. u corresponding depth \(h\) u and the partial pressure ratio \(F\) u , and obtain the corrosion rate prediction model corresponding to the \(u\)-th monitored location based on the obtained corrosion rate prediction model and \(D\) u u obtain the \(u\)-th monitored location \(P\) u corresponding corrosion rate \(R\) u ; \(F\) u = \(p\) c u / \(p\) h u where \(p\) c u is the partial pressure of CO₂ corresponding to the \(u\)-th monitored location \(P\) u and \(p\) h u is the partial pressure of H₂S corresponding to the \(u\)-th monitored location \(P\); the \(u\)-th monitored location \(P\) u corresponding depth \(h\) u is equal to the distance between the location where the \(u\)-th monitored location \(P\) u is located and the wellhead of the oil well; u Remaining service life acquisition module, configured to obtain max(R1, R2, ……, R u , ……, R z ) as the target corrosion rate, and based on the basic data, the axial force T u corresponding to the u-th monitored position P u and the target corrosion rate, obtain the remaining service life t r of the target oil well pipeline; max() represents taking the maximum value; The corrosion state value determination module is configured to obtain the corrosion state value of the target oil well pipeline based on the remaining service life t of the target oil well pipeline r and the corrosion state value determination model, 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 corrosion rate prediction model is: ; where b is a constant, E a is the activation energy of the chemical reaction, d0 is the gas constant, h is the depth of the monitored position, h0 is the preset depth threshold, exp() is the exponential function, k1, A1, k1 c , k1 v , k2, a0, b1, c1, A2, k2 c , k2 v , k3, A3, k3 c , k3 v , k4, a1, b2, c2, A4, k4 c and k4 v are all model parameters, F0 is the preset partial pressure ratio threshold, and R is the corrosion rate predicted by the corrosion prediction model.
Citation Information
Patent Citations
Oil pipe corrosion degree forecasting method and device
CN103870670A
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