Integrated CO2-H2S corrosion-erosion modeling in gas production tubing and pipeline by considering passive layer activity

Corrosion and erosion are the common pipe-integrity issues that occur when carbon dioxide, hydrogen sulfide and sand exist in the gas stream at the same time. Corrosion is developed by the reaction among carbon dioxide, hydrogen sulfide and iron, while erosion by the physical damage through flowing sand. When it comes to the prediction model which could accommodate both events, complex phenomena related to physics, chemistry and metallurgy should be put into account. In this paper, we develop a new-integrated corrosion-erosion model which can calculate the corrosion-erosion rate by considering the interactions among type of passive layer (mackinawite and siderite), formation and removal rate of passive layer, and surface reaction rate. The integrated model consists of fluid flow in pipes equation, kinetics of reaction, fundamental diffusion law, empirical erosion equation and fundamental Faraday’s law. Corrosion-erosion rate is obtained through iteration scenario after establishing pressure and temperature from fluid flow in pipes equation. Pipe dimension used in the simulation has tubing ID 2.992 in for vertical pipe and flowline ID 2.992 in for horizontal pipe. Simulations were conducted using hypothetic gas field data with variation of hydrogen sulfide and carbon dioxide composition. In constant erosion rate, when the hydrogen sulfide percentage is significantly greater than carbon dioxide, corrosion is more dominant than passive layer formation. However, when the carbon dioxide percentage is greater than that of hydrogen sulfide, the passive layer tends to form, resulting in scaling. These results can be explained by the faster formation rate of siderite than mackinawite. Finally, the proposed model can explain clearly the phenomena of corrosion-erosion and scaling by simplifying the complex phenomena occurred.


Introduction
Corrosion is a common phenomenon occurred during oil and gas production, which is also related to integrity and safety issues. Popoola (2013) describes pipelines ruptured due to corrosion, causing oil spillages environmental pollution. Kermani and Morshed (2003) discuss a design methodology for corrosion risks and corrosion allowance. Perez (2013) explains H2S corrosion environmental impact: weight loss corrosion in sour service conditions, localized corrosion, sulfide stress cracking (SSC). SSC safety impact high will cause crack propagation. It is described as the material removal by the means of reaction between iron and corroding agents, such as carbon dioxide, hydrogen sulfide, and other corroding agents under the existence of electrolyte, such as water and acidic solution. Bellarby (2009) explains clearly the phenomenon of corrosion as an electrochemistry process where corroding agent, such as hydrogen sulfide or carbon dioxide, becomes the supplier of hydrogen ion at the cathode and triggers the dissolution of iron at the anode (see Fig. 1).
Therefore, it can be inferred from the statement that in the gas production pipes, there should be a diffusion process of the corroding agents from the bulk gas stream to the wallstuck electrolyte droplets (as the result of condensation) to start the corrosion reaction.
When sand grain is introduced to the gas stream (as the companion of corroding agents), corrosion-erosion phenomenon occurs (Davis 2000). Erosion is described as the material removal through physical impingement. The term corrosion-erosion depicts the co-existed phenomena of chemical 1 3 corrosion and physical erosion at the same time. Erosion will remove the passive layer, which is able to protect the metal from further corrosion, while corrosion reaction occurs (see Fig. 2). Therefore, these combined phenomena give more severe result than corrosion or erosion alone.
The development of corrosion-erosion prediction model is started from the development of corrosion and erosion model itself. Corrosion model was first developed by considering only a type of corroding agent. Then, it was evolved to accommodate more than one corroding agent and passive layer activity. Erosion model was developed by considering the effect of solid and liquid in the stream. Then, in recent years, several authors have realized that the occurrence of corrosion and erosion at the same time is very critical that corrosion and erosion at the same time are very critical. Thus, they developed the prediction model that accommodated both phenomena. Table 1 summarizes several selected models to predict the corrosion, erosion and corrosion-erosion rate that are used as the inspirations to develop our proposed model.
From the summary in Table 1, it can be concluded that there are at least five issues which are needed to be considered to construct the prediction model for corrosion-erosion phenomenon in gas pipes: 1. How corrosion reaction is described and related to material removal. Corrosion phenomenon can be defined through several ways: electrochemical model, kinetic reaction model or empirical relation 2. How corrosion rate is described to be reduced by introducing passive layer activity. Reduction in corrosion rate can be covered using diffusion model or electrochemical model 3. How corrosion rate is described to be reduced by fluid flow. Reduction in corrosion rate due to fluid flow can be described using diffusion-convection model or empirical relation toward partial pressure. 4. What kind of passive layer will be formed when more than one corroding agent exist in the stream. The competition of each corroding agent to react with iron inside the pipe will influence the type of passive layer formed and the interaction between more than one passive layers. 5. How erosion is described and related to material removal. Erosion can be described using mechanistic, statistical or empirical model. Erosion can enhance the corrosion rate when the passive layer does not exist. On the other hand, erosion can only remove the passive layer.
In this paper, we developed a semi-mechanistic model to accommodate a corrosion-erosion phenomenon in wet and retrograde gas pipes. The model covers the sour corrosion, sweet corrosion and erosion by solid particles, such as sand. The model is built using diffusion-convection, kinetic of reaction, electrochemical and fluid flow in pipes model. Through the model, one can calculate the corrosion-erosion rate, corrosion or scaling tendency and passive layer thickness.

Model's description
In this model, corrosion is described as a multi-stage diffusion process. Before the corrosion reaction occurs, aqueous environment should be ready as the main requirement for the reaction. This aqueous environment is produced from the condensation of liquid (commonly water and condensate) at certain pressure and temperature from the gas stream. This liquid droplet will later wet the iron surface and become the media for corrosion reaction (see Fig. 3).
After the environment is set, the corroding agents start to diffuse through to the gas stream (convection process). Then, the corroding agents dilute in the water and become ions. These ions react with the iron surface and start to form passive layer which is useful to protect the iron from further corrosion. However, when the solid particles exist in the gas stream, it could eliminate the passive layer or directly hit the iron surface (together with corrosion reaction). Therefore, this combined process will double the impact compared to each process's impact (see Fig. 4).
Referring to the five components phenomena, there will be six major equations which are later combined to form the proposed model: 1. Fluid flow in pipes equation. This part will produce pressure, temperature, flowing properties and thickness of condensed liquid layer to become inputs for the other calculation 2. Convection equation. This part will produce concentration of corroding agents in the "top" surface layer of the condensed liquid.
3. Condensed-liquid-diffusion equation. This part will produce concentration of corroding agents in the "top' surface layer of passive layer (if the passive layer exists). 4. Porous-passive-layer-diffusion equation. This part will produce concentration of corroding agents for the surface reaction and thickness of passive layer after erosion happens 5. Surface reaction equation. This part determines the corrosion rate, thickness of passive layer and change in fluid flow properties 6. Erosion equation. This part determines the amount of material removal (either iron or passive layer).

Setting-Up corrosion environment
Before proceeding to the prediction of corrosion-erosion rate, calculating the corrosion and erosion environment comes first. This calculation is conducted using multiphase flow in pipe equation (Alves 1992), which is mathematically expressed as where dP dl : pressure gradient, M L −2 T −2 , : density, M L −3 , g: gravitational acceleration, L T −2 , g c : conversion factor, : pipe inclination toward horizontal axis, degree, v: velocity, L T −1 , f: friction factor, d: pipe diameter, L subscription, m: mixture.
Numerous empirical correlation can be used to calculate this pressure loss (Eq. 1): (Dukler 1964 andEaton 1967) Correlation for Dukler and Eaton is for two phase fluids. Dukler estimates pressure drop in 2 phase flow. Holdup prediction uses Eaton in pressure drop equation  (1), diffusion through condensed liquid (2), diffusion through passive layer (3), surface reaction (4) and passive layer/material removal by solid particles erosion (5) 1 3 1967) uses modified Griffith and Wallis method using the Duns-Ros instead of Martinelli since it is more accurate for pressure drop. This developed empirical correlation added a parameter to account for 1) liquid distribution among liquid slug, liquid fil, entrained liquid in gas bubble 2) liquid holdup at higher velocities. Better approximate friction losses and flowing density. Brill 1973 andBeggs 1991), etc.

Stage-1 diffusion: convective diffusion
At certain pressure and temperature, due to concentration gradient and momentum from the flow stream, corroding agents undergo convective diffusion (Wang 2003). This phenomenon can be expressed mathematically as where F: molar flux, N T −1 L −2 , k cd : convective-diffusion coefficient, L T −1 , c: concentration, N L −3 subscription, bulk: bulk gas stream, 1: first stage diffusion, i: type of corroding agent.
Using calculated pressure, temperature and flow properties from fluid flow calculation, convective-diffusion coefficient can be calculated using several empirical correlations and analogies: Reynold analogy (Geankoplis 1993), (Chilton and Cholburn analogy 1934), etc.

Stage-2 diffusion: diffusion through condensed liquid
When condensed liquid exists and wets the pipe surface, the corroding agents can diffuse and dissolve into it, which will develop the ions form. This condition can be formulated as (Nesic 2008): where D: diffusivity coefficient in specific liquid, L 2 T −1 , : thin film (condensed liquid) thickness, L subscription, liquid: type of condensed liquid (e.g., water), 2: second stage diffusion.
Using the same inputs as in the first stage diffusion, diffusivity coefficient can be calculated using several approaches: Stoke's law (Geankoplis 1993), Wilke-Chang (Geankoplis 1993), etc. Thickness of diffusion thin film can be calculated from the liquid hold-up with an assumption of uniform distribution.

Stage-3 diffusion: diffusion through passive layer
After long-time exposure by corroding agents, there exists passive layer as the result of corrosion reactions. (2) This passive layer is deposited at the pipe surface and it protects the pipe from further corrosion reactions. This phenomenon is evaluated using where : porosity of passive layer, : tortuosity of passive layer subscription, layer: type of passive layer, 3: third stage diffusion.
The value of diffusivity coefficient in this stage is the same as in the second stage.
The complicated issue in this stage is the type of passive layer which later affects the value of the passive layer thickness, porosity and tortuosity. In order to determine the type of passive layer in CO 2 -H 2 S environment, solubility product expression is used, which is put in the log-log plot, log partial pressure of CO 2 vs log partial pressure of H 2 S (Woollam et al. 2011;Santoso et al. 2016a). The assumptions of Eq. 5 -7 are to determine the key factors influencing CO2-H2S corrosion: partial pressure of CO2 and H2S, temperature, pH, concentration of species in each chemical reaction. Three equations used to construct the plot can be expressed mathematically as: where P: partial pressure, M L −1 T −2 , K sp : solubility product coefficient, N 2 L −6 , CR: corrosion rate, L T −1 , A: inner pipe area, L 2 , MW: molecular weight, HU: liquid hold-up, V: volume, L 3 , Δt : exposure time, T, K: reaction coefficient subscription, H 2 S: hydrogen sulfide gas, CO 2 : carbon dioxide gas, FeS: mackinawite, FeCO 3 : siderite, H + (aq): hydrogen ions, metal: type of metal, pipe: type of pipe, a: dissolution process, b: first dissociation process, c: second dissociation process.
The solubility product and reaction coefficient can be calculated using numerous empirical correlations (Santoso et al. 2016a, b). After the type of passive layer is determined, its thickness can be evaluated from the reaction activity and erosion rate. Reaction adds the thickness of passive layer over time, while erosion reduces it. Therefore, the material balance can be simply expressed as where FR: formation rate, L T −1 , ER: erosion rate, L T −1 . The porosity and tortuosity of the passive layer are determined through experiments or trial-error process. Several literatures have stated the value for these parameters, such as (Nesic et al. 2008), etc.
Empirical correlations for predicting the formation rate of mackinawite and siderite can be seen at (Santoso et al. 2016b). The erosion rate can be calculated using empirical correlations, such as (Salama 1998), (Parsi et al. 2016) etc. The common and simple model for erosion evaluation in petroleum industry is (Salama 1998), which is expressed as where S m : geometry dependent constant, W: sand rate, M T −1 , D: sand diameter, L However, when erosion rate is bigger than the formation (which leads to negative layer thickness) or at initial time, the third stage is neglected.

Stage-4 diffusion: reactive diffusion at pipe surface
The last process to describe corrosion process is reactive diffusion. The corrosive agents (ion form) diffuse and experience surface reaction in the pipe surface. This reaction determines the removal rate of iron in the pipe and formation rate of passive layer. The most sufficient reactant will produce passive layer which is deposited in the iron surface. The reactive diffusion process (first-order reaction) can be expressed mathematically as where k rd : reactive-diffusion coefficient, L T −1+ , subscription, 4: fourth stage diffusion.
The reactive diffusion coefficient can be calculated through experimental data, such as provided by (Wang et al. 2014) and (Yean et al. 2008).

Final model
A simple formula for predicting corrosion rate is obtained by combining first to fourth diffusion process. The proposed model is expressed mathematically as When the passive layer does not exist, the corrosion-erosion rate (CR − ER) is calculated using However, when passive layer exists, the erosion rate is used to evaluate the thickness of the passive layer. Thus, it could be said that the corrosion rate value has accommodated the erosion rate value.
The additional result after executing the proposed model is scaling tendency prediction. This parameter can give a glimpse of explanation about the dominant phenomenon at specific time, scale formation or corrosion rate. It can be expressed mathematically as Finally, the proposed model is calculated using algorithm presented in Fig. 5. There are several ground assumptions in using this proposed model: constant inlet composition of gas stream over time and uniform distribution.

Simulation cases and results
There are four cases used for the simulation. The four cases have similar completion scheme but different hydrogen sulfide and carbon dioxide composition. The completion scheme and fluid properties are presented at Table 2, 3 and 4.
The fluid flow in pipes simulation was conducted using Schlumberger Pipesim® 2017 with Beggs & Brill correlation. Then, the pressure, temperature and hold-up profile are used for inputs for the corrosion-erosion model simulation. The formation rate of mackinawite inside the simulation was calculated using empirical correlation by Harmandas and Koutsoukos (1996), while the siderite was calculated using empirical correlation by Greenberg and Tomson (1992).

Case-1 Result
The pressure, temperature and hold-up profile for tubing and flowline flow are presented at Fig. 6. From the pipe flow simulation, the gas rate was estimated to be 13.18 MMSCFD. The corrosion-erosion rate profile for tubing and flowline flow is presented at Fig. 7.
There is no different in corrosion-erosion rate profile over time in tubing and flowline. Simulation results also indicate the type of passive layer is mackinawite. However, due to erosion, there is no scale thickness on the pipe surface over time. Zero scale thickness creates zero scaling tendency, which means the corrosion dominate the material removal process.

Case-2 Result
The case-2 fluid flow in pipes results is shown at Fig. 8. 13.24 MMSCFD was obtained for the gas rate. The corrosion-erosion profile for tubing and flowline flow is shown at Fig. 9.
There exist slight differences in corrosion-erosion rate profile over time in tubing and flowline. There is no scale on the pipe surface, due to higher erosion rate than formation rate. Thus, corrosion rate dominates the process than scaling (zero scaling tendency).

Case-3 Result
The pressure, temperature and hold-up profile in tubing and flowline are shown at Fig. 10. From the simulation, the gas rate was 13.19 MMSCFD. Figure 11 depicts the corrosionerosion rate profile in tubing and flowline.
There are significant differences in corrosion-erosion rate over time in tubing and flowline. This results are supported by scaling tendency profile in tubing and flowline, see Fig. 12.
Significant growth in scale thickness results in reduction of corrosion-erosion rate over time in tubing and flowline. Scaling tendency increase over time is also supported the results that scale formation dominates the process. Figure 13 depicts the pressure, temperature and holdup profile in tubing and flowline. 13.26 MMSCFD was  Pipe type API-5L X-65 Sand production 10 ppm 7

Case-4 Result
Sand grain size 0.25 mm 8 Geometry constant (erosion) 5.5 1 3 obtained for the gas rate through pipe simulation. The corrosion-erosion rate profile in tubing and flowline is presented at Fig. 14.
From the simulation results, it is shown that there is no scale thickness in the pipe surface, which means the erosion rate is bigger than the formation rate of scale.

Discussions
The four-case fluid flow in pipe simulation results show slight differences in pressure profile (0.1-2%), temperature profile (± 1%) and hold-up profile (0.1-0.5%) caused by  1-hr exposure 12-hr exposure 1-day exposure variation in contaminants (CO 2 and H 2 S) percent mole. Increasing percent mole of molecules with high molecular weight results in decreasing system pressure, therefore, also affects temperature and hold-up distribution. The erosion rate profile also follows the pressure and temperature distribution as it follows the relation in Eq. 9. The model validation was conducted using steps from (Santoso 2016b). It can be seen from the simulation results that the corrosion-erosion rate increases as the temperature and pressure increase. It compromises with the nature of reaction and diffusion where in relatively high temperature, reaction becomes faster and resistance to diffuse becomes lower.
Higher pressure provides more dissolved contaminant gasses which also supports the corrosion reaction.
From the simulation results, it can also be observed that the percent mole of hydrogen sulfide in the gas stream gives significant impact to the corrosion-erosion rate value. When the ratio of percent mole of carbon dioxide toward hydrogen sulfide less than 1,000, the corrosion-erosion rate tends to be high and reaction with hydrogen sulfide gives more contribution. When the percent mole of carbon dioxide becomes thousand times greater than hydrogen sulfide, the reaction with carbon dioxide contributes most at corrosion-erosion rate value. It is in-line with the fact that ion S 2− is more reactive toward iron than ion CO 3 2− (see Fig. 15). 1-hr exposure 12-hr exposure 1-day exposure When the percent mole ratio of carbon dioxide and hydrogen sulfide is below 1,000, the mackinawite scale is formed as the reaction with ion S 2− is more dominant. When the reaction with ion CO 3 2− is more significant, the siderite scale exists. Moreover, the interesting result obtained from the simulations related to scale is the thickness. When the mackinawite scale is produced, it is always swept away by the erosion due to low formation rate; therefore, the corrosion-erosion rate does not reduce over time. However, when the siderite scale is produced, it can grow fast due to high formation rate; therefore, the corrosion-erosion rate decreases over time. The same results have been found similarly by Anderko (2000). Anderko (2000) has explained that in low concentration of hydrogen sulfide compared to carbon dioxide, siderite scale grows significantly and reduces the corrosion rate, which later triggers scaling issue.
The scaling tendency (ST) profile follows the scale thickness along the tubing and flowline. Scaling tendency is only found in case-3 where carbon dioxide percent mole is significantly larger than hydrogen sulfide. Siderite formation tends to create scaling issue (Anderko 2000).

Conclusions
An integrated model to predict corrosion-erosion rate in tubing and flowline has been successfully developed. The model covers the prediction of corrosion-erosion rate by 1-hr exposure 12-hr exposure 1-day exposure considering the type of passive layer and thickness of passive layer. The scaling tendency prediction is also available. The corrosion-erosion rate increases as the pressure and temperature increase. It is in-line with the fact that a reaction becomes faster when pressure and temperature increase.
When the percent mole of carbon dioxide is extremely bigger (more than 1,000 times greater) than hydrogen sulfide, the reaction between iron and carbonate ions dominates the corrosion-erosion process. It leads to growing of siderite layer which can reduce the corrosion-erosion rate over time and trigger scaling issue.
When the percent mole of carbon dioxide is less than 1,000 times than hydrogen sulfide, the reaction between iron and sulfide ions dominates the corrosion-erosion process. It leads to high corrosion-erosion rate, zero mackinawite scale thickness and no scaling issue.  1-hr exposure 12-hr exposure 1-day exposure Acknowledgements Writers want to say thank Mr. Iqbal Fauzi for the valuable discussions.
Funding The author declare that no known competing financial interests.

Ethical Statement
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/. 1-hr exposure 12-hr exposure 1-day exposure Comparison between iron + carbonate ions and iron + sulfide ions kinetic reaction. Iron + carbonate ions kinetic reaction data are adopted from Yean et al. (2008) and iron + sulfide ions from Wang et al. (2014)