# Application of HMC-SS Method in Pipeline Reliability Analysis and Residual Life Assessment

Authors: Xin Lin; Guojian Shao
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

In this paper, the reliability analysis and residual life assessment model of gas pipelines with multiple corrosion pits are established. Aiming at the simulation evaluation of small failure probability of gas pipelines, a new method for reliability analysis and residual life assessment of gas pipelines with multiple internal corrosion pits is proposed, which is called the Hamiltonian Monte Carlo subset simulation (HMC-SS) method. Compared with the traditional MCS (Monte Carlo simulation) algorithm, the HMC-SS method has the advantages of less sampling, low cost, and high accuracy. And compared with the random walk SS method, the HMC-SS method can analyze the state space more efficiently and achieve faster convergence. In this paper, the HMC-SS method is applied to the reliability analysis and residual life assessment of gas pipeline engineering, and the sensitivity analysis of the random parameters affecting the failure probability of the pipeline is carried out. The results show that the corrosion rate, the depth of corrosion defects, and the wall thickness of the pipeline have great influence on the residual life of the pipeline, while the yield strength, working pressure, and the length of corrosion pits have no obvious influence on the failure probability and residual life of the pipeline. The analysis shows that the proposed HMC-SS method can be used as a reasonable tool for failure assessment of natural gas pipelines affected by corrosion to determine the remaining life of the pipeline system. This method provides a reliable theoretical basis for the integrity management of the gas pipeline.


---

## Body

## 1. Introduction

Pipeline transportation is an important part of gas production process. With the increasing service time of existing pipelines, the gas pipeline will inevitably be affected by an internal transport medium, external soil medium, and stray current in the long-term operation process, which will cause pipeline corrosion [1]. Corrosion will cause the pipeline wall thickness reduction, perforation, leakage, strength reduction, and cracking; serious cases will cause pipeline leakage or explosion, not only will cause serious casualties and major economic losses but also pollute the environment and cause bad social impacts. Therefore, once the oil and gas pipeline is put into operation for a period of time, the reliability analysis and remaining service life assessment of the pipeline are very important. At present, the assessment of corrosion pipelines mainly includes ASME-B31 G [2], DNV RPF101 [3], API579 [4], and other standards. Many scholars have carried out reliability analysis and residual life assessment of corrosion pipelines through these standards. The most commonly used numerical simulation methods are a second-order moment method and MCS method. Teixeira et al. [5] used the first-order reliability method (FORM) and MCS simulation method to analyze the failure probability of the pipeline affected by internal pressure corrosion; Carr [6] points out that the failure probability obtained by MCS is more accurate and applicable than that obtained by FOSM because MCS is independent of the dimension of random variables and the complexity of limit state function; Li et al. [7] use MCS to evaluate the probability of pipeline instability. Although the first-order reliability method is simple to calculate, the error of the structural function with high nonlinearity increases sharply [8]. The MCS method is widely used in the failure probability analysis of structures and residual life assessment due to its robustness and unbiased calculation results [9]. It can solve any model, especially when the sample size tends to be infinite, the accurate solution can be obtained, and the calculation results are often used as the standard to test the accuracy of other calculation methods. However, the sample size required by MCS is inversely proportional to the failure probability. This means that in order to ensure the accuracy and comprehensiveness of failure probability calculation, a large number of samples are needed when we use MCS to deal with the problem of high-dimensional small failure probability (for example, ≤10–3), and MCS is difficult to accept by the project. The failure analysis and residual life assessment of corrosion pipeline are high-dimensional and small failure probability problems. In order to solve this problem, an accurate and effective method is urgently needed. The improved MCS method, such as the SS simulation method, has obvious advantages in solving high-dimensional and small failure probability problems. The efficiency and robustness of the method are highly praised by many scholars [10–12]. Many researchers have applied the SS method to reliability analysis of bridges, buildings, and other engineering structures [13–16]. In the current practice of subset simulation, the most widely used method is to generate the required condition samples by various MCMC (Markov chain Monte Carlo) algorithms based on random walk. Au and Beck apply this method to the reliability problem of high-dimensional small failure probability, thus improving the calculation accuracy of subset simulation [17]. Miao and Ghosn use the subset simulation method based on MCMC to the safety and reliability analysis of structural systems [18]. Papaioannou et al. believe that the subset simulation method based on MCMC can effectively solve the problem of high-dimensional structural reliability [19]. Wang applies the subset simulation method based on MCMC to the reliability evaluation of steel bridges. The results show that this method is a good choice to solve the fatigue problems of nonlinear and multidimensional LSF [20]. Although this method has many advantages and is widely used, MCMC sampling method based on random walking makes Markov chain converge to the fixed distribution function p (x), and the resulting conditional samples have high autocorrelation, so the accuracy of simulation results is poor and the efficiency is still very low [21]. In order to overcome these shortcomings and solve the practical problems of engineering, a new MCMC algorithm, which is more efficient and accurate, is adopted in this paper. HMC is used to calculate the future state of Markov chain rather than probability distribution by using the concept of dynamics in the physical system [22]. In this way, the state space can be analyzed more efficiently and the convergence can be achieved faster.In recent years, HMC has been widely used and developed rapidly and has made remarkable achievements in various statistical applications [23–25]. The HMC method has been applied to Bayesian analysis and reliability analysis of structural engineering problems perfectly [26–28]. There is no research on this aspect in the reliability analysis and residual life assessment of corrosion pipelines. In this paper, the system reliability analysis method is used to evaluate the pipelines with multiple corrosion pits. The model of reliability analysis and residual life assessment of corrosion pipelines based on HMC-SS method is established. The results based on the HMC-SS method are compared with those of SS and MCS methods.The structure of this paper is as follows. In Section2, the reliability analysis model of the gas pipeline based on reliability theory is established. In Section 3, the SS method based on random walking is reviewed. The fourth section describes the calculation details and flow of HMC-SS algorithm in detail. Section 5 proves the effectiveness of the method by a specific engineering example and further analyzes the sensitivity of the random variables that affect the remaining life of the gas pipeline. The conclusion and prospect are given in Section 6.


## 2. Reliability Analysis Model of Gas Pipelines Based on Reliability Theory

Based on the reliability theory, the state function of pipeline failure due to corrosion can be expressed by the following formula:(1)G=Ff−F0,where Ff is the failure pressure of the corroded pipeline and F0 is the actual operating pressure of the pipeline. The failure probability of corroded pipeline can be expressed by the following formula:(2)Pf=PG=Ff−F0≤0,(3)∅β=1−Pf,where P is the probability of the event, ∅ is the cumulative distribution function, andβ is the reliability index of the structure.For gas pipelines with corrosion defects, according to the revised ASME-B31 G standard measurement, the failure stress formula of corrosion pipeline is as follows:(4)σp=σy1−A/A01−A/A0F,where σy is the flow stress of the pipeline material, A is the projected area of the corrosion defect on the side, A0 is the original cross-sectional area of the pipeline at the corrosion defect, F is the Folias expansion factor, which is related to the corrosion pipe outer diameter D, wall thickness t, and corrosion defect length L, namely:(5)F=1+0.6275L2Dt−0.003375L4D2t2L2Dt≤50,F=0.032L2Dt+3.3L2Dt>50.In equation (4), σy=kσs (σs is the yield stress of pipeline material), where k is the coefficient. For steel tubes, k is usually 1.1 or 1.15, and in this paper, k is 1.15. A0=Lt and A=0.85dL (d is the maximum depth of the corrosion pit and L is the maximum length of the corrosion pit). To predict the strength of a pipe at time T, it is necessary to estimate the corrosion growth rate. In [29, 30], a reasonable linear model is proposed to predict the corrosion growth of steel pipes and estimate the size of corrosion pits at time T.(6)d=d0+νdT−T0,L=L0+νLT−T0.In equation (6), d0,L0 denotes the depth and length of corrosion defects detected in T0, respectively. dandL denote the depth and length of corrosion defects after service T, respectively; νd denotes the radial corrosion rate; and νL denotes the axial corrosion rate. Substituting (6) into (4), the failure pressure Ff of the pipeline with corrosion defects can be obtained as follows:(7)Ff=2tσpD=2.3tσsD×1−d0+νdT−T0/t1−d0+νdT−T0/Ft.Since the failure pressure of the corroded pipeline is relatively independent of the actual operating pressure (F0) of the pipeline, the limit state function G of the corroded pipeline is established based on the reliability theory as(8)G=Ff−F0=2.3tσsD×1−d0+νdT−T0/t1−d0+νdT−T0/Ft−F0.When G>0, the structure is in a reliable state; G<0 indicates that the structure is in a failure state; G=0 means that the structure is in the limit state.


## 3. SS Algorithm Based on Random Walk MCMC Sampling

The basic idea of SS algorithm based on random walk MCMC sampling is to convert the small failure probability into the product of a series of large conditional failure probability events by introducing reasonable intermediate failure events. In the failure region for the functional functionGX: E=GX<b, a series of thresholds can be introduced as b1>b2>⋯>bm=b. Failure events with nested relationships are composed of these thresholds. Ek=GX<bk,k=1,2,…,m, and m is the total number of intermediate events. At this time, E1⊃E2⊃⋯⊃Em=E. According to conditional probability theory, the target failure probability Pf can be obtained as(9)Pf=PEm=PE1∏k=2mPEkEk−1.To facilitate calculation, the intermediate conditional probability is set to a constant valueP0 and then the threshold value bm can be determined by the adaptive method. The traditional subset simulation method has a detailed process description in [31, 32]. The approximate value of the final failure probability can be obtained by the following equation:(10)Pf^=P0m−1NNEm≈Pf,where NEm is the number of samples falling into the last layer.


## 4. Reliability Analysis Model of Gas Pipelines Based on HMC-SS Algorithm

HMC-SS is an improvement on the traditional SS algorithm. This method combines Hamiltonian dynamics with MCMC algorithm and applies it to subset simulation, which has the advantages of faster convergence, higher accuracy, and better efficiency.


### 4.1. Principle of Hamiltonian Dynamics

Hamiltonian dynamics describes the time evolution of the system according to the position vectorq and momentum vector p. The total energy of the system H is a function of q and p, namely:(11)Hq,p=Uq+Kp,where Uq is the potential energy and Kp is the kinetic energy.Hamiltonian dynamics has several important properties: (1) reversibility, (2) conservation of the Hamiltonian, (3) volume preservation, and (4) symplecticness. These properties are the most important conditions for Hamiltonian dynamics to be applied to Markov chain Monte Carlo updating, and the analysis and proof process are described in detail in references [28, 33]. In order to connect the Hamiltonian dynamics with the Markov chain Monte Carlo method, firstly, the random variables x are regarded as q (i.e., x≡q) of the Hamiltonian system and p as independent variables with the same dimension, so x and p together form the extended initial position space; then, the position momentum state space of the Hamiltonian system is obtained. The potential energy function Ux can be determined by the target probability density function πx:(12)Ux=−logπx.In general, the kinetic energy functionKp can be defined as follows:(13)Kp=pTM−1p2,where M is a positive definite, symmetric “mass” matrix, generally taking the scalar product of the unit matrix (the scalar matrix). Equation (11) can be rewritten as follows:(14)Hx,p=Ux+Kp.We use the knowledge of statistical mechanics to connect Hamiltonian functionsHx,p and πx. According to the energy function Eθ, we can define a regular distribution:(15)πθ=1Ze−Eθ,where Z is the regularization coefficient and can guarantee ∫πθdθ=1. Then, Eθ is(16)Eθ=Hx,p=Ux+Kp.Then, the regular distribution of Hamiltonian energy function can be expressed as(17)Px,p∝e−Hx,P∝e−Uxe−KP∝PxPp.It can be seen from equation (14) that Px,p can be decomposed into the product of Px and Pp. It can be seen that these two variables are independent of each other. So, we can sample from the joint probability density function of x and p. In the Hamiltonian system, Hx,p is a constant value, which describes how the kinetic energy and potential energy are transformed into each other in the process of system motion. It can be analyzed quantitatively in the form of differential equation as follows:(18)dxidt=∂H∂pi,dpidt=−∂H∂xi.The rationality and validity of applying Hamiltonian equation to the MCMC method are explained in [32, 34]. The common methods of discrete Hamiltonian equation are Euler method, improved Euler method, jump point method, and so on [34]. These methods have been described in detail in reference [34]. Because the jump point method is simple, reversible, and retains the symplectic structure of the phase space, it has high efficiency and high accuracy in solving Hamiltonian equation. In this paper, the jump point method is used, and the formula is as follows:(19)pit+ε2=pit−ε2∂U∂xixt,xit+ε=xit+εpit+ε/2mi,pit+ε=pit+ε2−ε2∂U∂xixt+ε,where ε is the time step, L=τ/ε, L is the number of iterations, and τ is the length of the path. The efficiency of the jump point method is very dependent on the selection of ε and L. In this paper, when the average acceptance rate is about 65%, the corresponding L and ε are selected. Generally, it is assumed that the value between 60% and 80% is the best, which is determined by dual algorithm. It is described in [34–36] in detail. Hamiltonian function is applied to the MCMC method, which is called HMC algorithm in this paper. HMC algorithm is used to extract samples from conditional probability density function fx/Ek−1. The algorithm flow is as follows:(1)
An initial momentumPinit(where M is the unit matrix) is generated from the normal distribution N0,M.(2)
The initial momentumPinit and the position xinit of the seed sample are used as the initial conditions to generate a new state x∗,p∗ according to equation (16).(3)
Receiving calibration: ifx∗∈Ek and rand<min1,exp−Hx∗,p∗+Hxinit,pinit, where rand∼U0,1, receive the suggested sample x∗ as the next state; otherwise x∗ cannot be the next state, and the next state is still the current state xinit, end.HMC sampling can explore the state space more effectively than random walk MCMC sampling, which greatly improves the computational efficiency. The following is a binary Gaussian distribution, where the mean value of position variable is 0, and the covariance matrix is [1, 0.9; 9, 1], the momentum variable is 0, and the covariance matrix is [1, 0; 0, 1]. At this time, Hamiltonian function can be defined as the following formula:(20)Hx,p=xT∑−1x2+pTp2,∑=10.90.91.From Figures1 and 2, we can see that HMC algorithm has higher probability of accepting samples than traditional random walk sampling methods and can analyze state space more efficiently, thus achieving faster convergence.Figure 1
200 iterations of random walk MH method (acceptance probabilityα=0.87).Figure 2
HMC method with 200 iterations (L=200,ε=0.3) (acceptance probability α=0.97).


### 4.2. The Flow of Hamiltonian Monte Carlo Subset Simulation Algorithm

The flow of Hamiltonian Monte Carlo subset simulation algorithm is as follows:(1)
The total number of samplesN and conditional failure probability P0 are defined. Let Ns=NP0andNt=N−Ns.(2)
According to the probability density function of the model, the Monte Carlo simulation method is directly used to generateN independent samples.(3)
Take the samples into the limit function to get the response value of the corresponding samples and sort them from small to large to getGj1,j=1,2,…,N and the corresponding sample sequence xj1,j=1,2,…,N, respectively.(4)
Takeb1=GNs, then PE1=P0; let k = 2.(5)
Takexjk−1,j=1,2,…,Ns as the “seed” sample and generate Nt groups of new samples xl,l=1,2,…,Nt that meet the conditional probability density function fx/Ek−1 according to the HMC algorithm. Specific steps can be carried out as follows:(a)
Through the “seed” samples, the Hamiltonian jump point method is used to generateNt groups of new samples.(b)
The originalNs groups of “seed” samples and Nt groups of new samples are brought into the limit function to obtain the corresponding response value.(c)
Reorder the response values in ascending order to getGjk,j=1,2,…,N and the corresponding sample sequence xjk,j=1,2,…,N. Take bk=GNsk and get the intermediate conditional probability pk=p0.(6)
If at leastGjk response values in Ns reach the threshold, i.e., GNsk=b, let k=2 go directly to (7); otherwise, let k=k+1 go to (5).(7)
The number of samples falling into the failure domainEm is calculated, i.e.,(21)Pf≈P0m−1NNEm.When a pipeline has multiple corrosion points, the failure occurring at each corrosion point constitutes the total failure of the pipeline. Therefore, the series system is more suitable for the failure assessment of corroded pipelines. The failure probabilityPf,s of pipelines can be estimated by using the reliability method of a series system [37, 38]:(22)LBPf,s=maxPf,i≤Pf,s≤1−∏i=1nPf,i=UBPf,s,where Pf,i represents the failure probability of the ith corrosion pit, which can be calculated by (21). n is the total corrosion points, and LBPf,s and UBPf,s represent the lower and upper ascertainments of the failure probability of the system, respectively. According to the requirements of the geographical location of the pipeline on the risk level, when the failure probability of the corroded pipeline is greater than the acceptable failure probability over time, it is considered the pipeline damage; that is, the remaining life of the corroded pipeline is calculated.


## 4.1. Principle of Hamiltonian Dynamics

Hamiltonian dynamics describes the time evolution of the system according to the position vectorq and momentum vector p. The total energy of the system H is a function of q and p, namely:(11)Hq,p=Uq+Kp,where Uq is the potential energy and Kp is the kinetic energy.Hamiltonian dynamics has several important properties: (1) reversibility, (2) conservation of the Hamiltonian, (3) volume preservation, and (4) symplecticness. These properties are the most important conditions for Hamiltonian dynamics to be applied to Markov chain Monte Carlo updating, and the analysis and proof process are described in detail in references [28, 33]. In order to connect the Hamiltonian dynamics with the Markov chain Monte Carlo method, firstly, the random variables x are regarded as q (i.e., x≡q) of the Hamiltonian system and p as independent variables with the same dimension, so x and p together form the extended initial position space; then, the position momentum state space of the Hamiltonian system is obtained. The potential energy function Ux can be determined by the target probability density function πx:(12)Ux=−logπx.In general, the kinetic energy functionKp can be defined as follows:(13)Kp=pTM−1p2,where M is a positive definite, symmetric “mass” matrix, generally taking the scalar product of the unit matrix (the scalar matrix). Equation (11) can be rewritten as follows:(14)Hx,p=Ux+Kp.We use the knowledge of statistical mechanics to connect Hamiltonian functionsHx,p and πx. According to the energy function Eθ, we can define a regular distribution:(15)πθ=1Ze−Eθ,where Z is the regularization coefficient and can guarantee ∫πθdθ=1. Then, Eθ is(16)Eθ=Hx,p=Ux+Kp.Then, the regular distribution of Hamiltonian energy function can be expressed as(17)Px,p∝e−Hx,P∝e−Uxe−KP∝PxPp.It can be seen from equation (14) that Px,p can be decomposed into the product of Px and Pp. It can be seen that these two variables are independent of each other. So, we can sample from the joint probability density function of x and p. In the Hamiltonian system, Hx,p is a constant value, which describes how the kinetic energy and potential energy are transformed into each other in the process of system motion. It can be analyzed quantitatively in the form of differential equation as follows:(18)dxidt=∂H∂pi,dpidt=−∂H∂xi.The rationality and validity of applying Hamiltonian equation to the MCMC method are explained in [32, 34]. The common methods of discrete Hamiltonian equation are Euler method, improved Euler method, jump point method, and so on [34]. These methods have been described in detail in reference [34]. Because the jump point method is simple, reversible, and retains the symplectic structure of the phase space, it has high efficiency and high accuracy in solving Hamiltonian equation. In this paper, the jump point method is used, and the formula is as follows:(19)pit+ε2=pit−ε2∂U∂xixt,xit+ε=xit+εpit+ε/2mi,pit+ε=pit+ε2−ε2∂U∂xixt+ε,where ε is the time step, L=τ/ε, L is the number of iterations, and τ is the length of the path. The efficiency of the jump point method is very dependent on the selection of ε and L. In this paper, when the average acceptance rate is about 65%, the corresponding L and ε are selected. Generally, it is assumed that the value between 60% and 80% is the best, which is determined by dual algorithm. It is described in [34–36] in detail. Hamiltonian function is applied to the MCMC method, which is called HMC algorithm in this paper. HMC algorithm is used to extract samples from conditional probability density function fx/Ek−1. The algorithm flow is as follows:(1)
An initial momentumPinit(where M is the unit matrix) is generated from the normal distribution N0,M.(2)
The initial momentumPinit and the position xinit of the seed sample are used as the initial conditions to generate a new state x∗,p∗ according to equation (16).(3)
Receiving calibration: ifx∗∈Ek and rand<min1,exp−Hx∗,p∗+Hxinit,pinit, where rand∼U0,1, receive the suggested sample x∗ as the next state; otherwise x∗ cannot be the next state, and the next state is still the current state xinit, end.HMC sampling can explore the state space more effectively than random walk MCMC sampling, which greatly improves the computational efficiency. The following is a binary Gaussian distribution, where the mean value of position variable is 0, and the covariance matrix is [1, 0.9; 9, 1], the momentum variable is 0, and the covariance matrix is [1, 0; 0, 1]. At this time, Hamiltonian function can be defined as the following formula:(20)Hx,p=xT∑−1x2+pTp2,∑=10.90.91.From Figures1 and 2, we can see that HMC algorithm has higher probability of accepting samples than traditional random walk sampling methods and can analyze state space more efficiently, thus achieving faster convergence.Figure 1
200 iterations of random walk MH method (acceptance probabilityα=0.87).Figure 2
HMC method with 200 iterations (L=200,ε=0.3) (acceptance probability α=0.97).


## 4.2. The Flow of Hamiltonian Monte Carlo Subset Simulation Algorithm

The flow of Hamiltonian Monte Carlo subset simulation algorithm is as follows:(1)
The total number of samplesN and conditional failure probability P0 are defined. Let Ns=NP0andNt=N−Ns.(2)
According to the probability density function of the model, the Monte Carlo simulation method is directly used to generateN independent samples.(3)
Take the samples into the limit function to get the response value of the corresponding samples and sort them from small to large to getGj1,j=1,2,…,N and the corresponding sample sequence xj1,j=1,2,…,N, respectively.(4)
Takeb1=GNs, then PE1=P0; let k = 2.(5)
Takexjk−1,j=1,2,…,Ns as the “seed” sample and generate Nt groups of new samples xl,l=1,2,…,Nt that meet the conditional probability density function fx/Ek−1 according to the HMC algorithm. Specific steps can be carried out as follows:(a)
Through the “seed” samples, the Hamiltonian jump point method is used to generateNt groups of new samples.(b)
The originalNs groups of “seed” samples and Nt groups of new samples are brought into the limit function to obtain the corresponding response value.(c)
Reorder the response values in ascending order to getGjk,j=1,2,…,N and the corresponding sample sequence xjk,j=1,2,…,N. Take bk=GNsk and get the intermediate conditional probability pk=p0.(6)
If at leastGjk response values in Ns reach the threshold, i.e., GNsk=b, let k=2 go directly to (7); otherwise, let k=k+1 go to (5).(7)
The number of samples falling into the failure domainEm is calculated, i.e.,(21)Pf≈P0m−1NNEm.When a pipeline has multiple corrosion points, the failure occurring at each corrosion point constitutes the total failure of the pipeline. Therefore, the series system is more suitable for the failure assessment of corroded pipelines. The failure probabilityPf,s of pipelines can be estimated by using the reliability method of a series system [37, 38]:(22)LBPf,s=maxPf,i≤Pf,s≤1−∏i=1nPf,i=UBPf,s,where Pf,i represents the failure probability of the ith corrosion pit, which can be calculated by (21). n is the total corrosion points, and LBPf,s and UBPf,s represent the lower and upper ascertainments of the failure probability of the system, respectively. According to the requirements of the geographical location of the pipeline on the risk level, when the failure probability of the corroded pipeline is greater than the acceptable failure probability over time, it is considered the pipeline damage; that is, the remaining life of the corroded pipeline is calculated.


## 5. Numerical Examples

Taking the secondary high-pressure gas pipeline in a corrosion area as an example, under the assumption of independent random variables, the pipeline has been running for 20 years. The pipe specifications are as follows: 273 × 7, 20# steel, yield strength of 245 MPa, and maximum allowable working pressure of 0.7 MPa. And, one of the sections is sampled. The results show that there are three corrosion pits, and the gas pipeline parameters and geometric features of the corrosion pits are shown in Tables1 and 2.Table 1
Pipeline parameters.
Random variableDistribution typeμStdDiameter,DmmNormal distribution2735.46Wall thickness,t (mm)Normal distribution70.14Pipeline operating pressure,F0MPaNormal distribution0.70.07Pipe yield strength,σsMPaNormal distribution24517.15Radial corrosion rate,νdmm⋅a−1Normal distribution0.2290.0229Axial corrosion rate,νLmm⋅a−1Normal distribution0.2290.0229Table 2
Geometry of pipeline corrosion pits.
Corrosion pit 1Corrosion pit 2Corrosion pit 3Length (mm)Depth (mm)Length (mm)Depth (mm)Length (mm)Depth (mm)Mean1154.641504.02003.6Standard deviation11.50.928150.8200.72According to the target reliability of the API579 standard (see Table3), the geographical location of the pipeline is in the middle risk area and the allowable failure probability of the corroded pipeline is 10−3. When the failure probability of the pipeline is greater than 10−3, the initial time is the remaining life of the pipeline.Table 3
Reliability of pipeline operation target.
Location categoryLow risk area (category I areas)Medium risk area (category II areas)High risk area (category III and IV areas)Acceptable failure probability10−210−310−5In the corrosion failure process of a gas pipeline, the failure probability of the corroded pipeline is calculated by the upper bound of equation (22). To improve the accuracy of the calculation, the sample number of the MCS method is 109 and its result is approximate to the analytical result.According to Figure3, the pipeline runs for another 17 years, if the failure probability is 8.0×10−4; the pipeline continues to run 18 years, if the failure probability is 2.59×10−3; the pipeline residual life is 17 years because the failure probability of the pipeline is over the pipeline allowance of 10−3. The simulation results of SS method and HMC-SS method are also 17 years. The results of the three methods are in good agreement.Figure 3
Curve of failure probability and service life of corroded pipeline.It can be seen from Table4 that the failure probability calculated by the MCS method, SS method, and HMC-SS method for another 18 years of pipeline operation is 5.29×10−3, 1.4×10−3, and 2.08×10−3. The corresponding running time is 1.0561×102 seconds, 13.818 seconds, and 11.281 seconds.Table 4
Comparison of results between HMC-SS, SS, and MC methods.
Simulation methodSample numberElapsed time (s)Probability of failure (pf)Running time (T) (years)MCS1060.915×1024.12×10−318SSp0=0.1100013.8181.4×10−318HMC-SS100011.2812.08×10−318Through the comparative analysis, it can be seen that the MCS calculation for the pipeline with three corrosion pits needs a lot of calculation cost, about0.915×102 seconds. When using SS, HMC-SS algorithm only needs 1% of MC samples to achieve the same accuracy, and the running time is less than 8.49% and 8.77% of MCS algorithm. Therefore, the SS and HMC-SS algorithms can be more easily applied to the system reliability analysis and life prediction with multiple corrosion points.RMSE (root mean square error) is used to measure the deviation between the simulated value and the accurate value. The smaller the RMSE is, the higher the accuracy of the simulation value is. In this paper, the root mean square error between the failure probability of 1000 : 1000 : 5000 (the number of samples is 1000 to 5000, with a step of 1000) and MCS (N=106) is calculated by equation (23), respectively:(23)RMSE=∑i=1mPfMCS−Pfi2m.Among them,PfMCS is the failure probability of MCS (N=106), Pfi is the failure probability calculated by simulation method, and m is the number of simulations.In order to obtain clear observation results, Figure4 takes logarithmic coordinates, and it can be seen from Figure 4 that RMSE of HMC-SS and MCS methods is smaller than that of SS and MCS methods. This shows that compared with the SS method, the HMC-SS method has higher accuracy and more effective calculation failure probability.Figure 4
RMSE of SS method and HMC-SS method compared with MCS method, respectively.It can be seen from Figure5 that with the increase of the working pressure of the gas pipeline, the failure probability of the pipeline increases and the remaining life decreases gradually. When the working pressure increases from 0.25 MPa to 1.25 MPa, the corresponding remaining life decreases from 22 years to 16 years. It can be seen from Figure 6 that the change of corrosion rate has greater influence on the remaining life of the pipeline, when the corrosion rate νd and νl increased from 0.113 mm·a−1 to 0.458 mm·a−1, the service life of gas pipeline is reduced from 23 years to 14 years. Without replacing the gas pipeline, the corrosion treatment should be strengthened actively to delay the corrosion rate of the pipeline and ensure the safety of the gas pipeline.Figure 5
Failure probability at different working pressures.Figure 6
Failure probability at different corrosion rates.It can be seen from Figure7 that the yield strength σs of the gas pipeline has little influence on the remaining life of the pipeline, while it can be seen from Figure 8 that the geometric shape of the gas pipeline has a significant influence on the remaining life of the pipeline. The remaining life of pipe decreases sharply with the decrease of pipe wall thickness, which is also consistent with the actual situation. The thicker the pipe wall is, the stronger the corrosion resistance is, and the less likely it is to fail.Figure 7
Failure probability at different working pressures.Figure 8
Failure probability at different corrosion rates.To make a more detailed and intuitive analysis of the influence of random variables on the failure probability and the remaining service life of gas pipelines, the reliability sensitivity of the mean value of random variables is shown in Figure9. The paper [38] provides the reliability sensitivity computation formula as follows: SX=∂Pf/∂X, from graphics can be very intuitive found that the most important factors affecting the failure probability and remaining service life of the gas pipeline are the corrosion rate, wall thickness, corrosion pit depth, and gas transmission pressure. The yield strength of the pipe material and the length of corrosion pits have almost negligible effects on the failure probability and remaining service life.Figure 9
Average sensitivity curve.


## 6. Conclusions

In view of the characteristics of multimode failure and small failure probability in the residual life of urban gas transmission and distribution pipelines, a reliability residual life calculation model of gas pipelines with multiple corrosion pits is established in this paper. The MCS, SS, and HMC-SS methods are used to calculate the residual life of gas pipelines, and the influence of relevant parameters is discussed.(1)
In the case of a small failure probability problem with multiple corrosion pits, HMC-SS has advantages of less sampling, saving time, and high calculation accuracy.(2)
The analysis of sensitivity shows that the corrosion rate, wall thickness, corrosion defect depth, and gas transportation pressure of the pipeline have obvious influences on the failure probability and the remaining service life of the gas pipeline, while the yield strength of the pipe and the length of the corrosion pit have little influence on the failure probability and the remaining service life of the pipeline.(3)
Considering that the corrosion rate and wall thickness of the pipeline have an obvious influence on the remaining service life of the gas pipeline, it is suggested to select the appropriate pipe type according to the geographical location of the pipeline to meet the safety requirements and make it economical.(4)
According to the sensitivity of factors affecting the remaining life of gas pipelines, it is necessary to prioritize the maintenance or replacement of in-service pipelines and select the materials for laying pipelines to provide theoretical guidance.



---

*Source: 3756441-2021-11-05.xml*