1 Introduction

Natural gas, a clean energy source, is now the primary fuel for the implementation of low-carbon, environmentally friendly development around the globe. Underground gas storage is the best option for natural gas peaking and natural gas resource storage, which is the key strategy for guaranteeing a reliable supply of natural gas. Underground gas storages are currently being constructed both domestically and internationally in great numbers, and they are progressively growing in importance and becoming an essential component of the world's energy supply (Ref 1, 2, 3). However, during operation, the gas injection/withdrawal pipeline of underground gas storage is affected by the residual drilling fluid, condensate, CO2, and H2S in the ground for a long time. These corrosive gases have the potential to interact electrochemically with the pipeline components, leading to corrosion on the surface of the pipe. Surface corrosion will lead to stress concentration and raise the danger of stress corrosion since the gas injection/withdrawal pipeline operates under pressure (Ref 4). To increase the service life of gas injection/withdrawal pipelines and ensure the secure and reliable operation of gas storage reservoirs, it is necessary to analyze the corrosion behavior of gas injection/withdrawal pipelines under an acidic corrosive gas environment.

Regarding the corrosion of natural gas pipelines, CO2 corrosion and CO2-H2S corrosion are two frequent types. As early as the 1990 s, Nesic's team began to work on the corrosion mechanism of CO2 in gas transport systems and the corrosion inhibition of mild steel. They concluded that the flow rate and the corrosion product film formed on the material surface during the corrosion process are the determining factors of the corrosion rate and corrosion morphology (Ref 5,6,7,8,9). At the same time, the temperature also has an important effect on the corrosion rate, but the temperature is more expressed in the corrosion product film density, which leads to changes in the corrosion rate (Ref 10,11,12). According to research conducted by Rihan et al. Ref 13 on the corrosion behavior of X52 in a corrosive environment with a high CO2 partial pressure, the corrosion rate of X52 significantly increased as CO2 partial pressure increased. The aforementioned studies have significant guiding value for understanding CO2 corrosion mechanisms and protecting natural gas pipelines. In the CO2-H2S coexistence system, the corrosion rate is mainly affected by temperature, partial pressure, and corrosion product film. Among them, the CO2/H2S partial pressure ratio is the main reason to control corrosion in the CO2-H2S environment. Since the 2010 s, Perdomo et al. Ref 14 had researched the corrosion behavior of X52 in a CO2-H2S environment. They found that, for an established partial pressure of H2S, increasing the partial pressure of CO2 enhanced the corrosion rate of the material. Concerning research conducted by Asadian et al. on the corrosion behavior of carbon steel of ASTM A-106A grade in a CO2-H2S environment, the corrosion rate of carbon steel was higher in a CO2-H2S coexistence environment than it was in a CO2 environment, and the corrosion rate rises as the solution temperature rises. The corrosion product film of ferric carbonate and iron sulfide mixture is less stable at high temperatures, and it is difficult to form a uniform product film on the metal surface (Ref 15). Even though the aforementioned studies made significant advancements, the majority of them have concentrated on using methane or nitrogen in place of natural gas in high-temperature, high-pressure reactors in either a pure CO2 atmosphere or a CO2-H2S environment. In fact, natural gas pipelines often contain methane, ethylene, nitrogen and hydrogen, and other combustible gas mixtures, if methane or nitrogen is used in the high-temperature and high-pressure reactor for corrosion testing instead of natural gas, it is difficult to truly reflect the impact of other media in natural gas pipelines and natural gas coexistence conditions on the corrosion of the pipeline. As a result, it is crucial to consider how pipeline corrosion works under actual natural gas conditions.

However, there is a lack of research on the corrosion behavior of natural gas pipelines under the coexistence of other media and natural gas. Therefore, in this paper, L245NS steel and L360QS steel, which were commonly used in gas injection/withdrawal pipelines of underground gas storage, were selected to test and analyze the corrosion products under real natural gas conditions by means of SEM, EDS, XRD, XPS, and GC-MS to reveal the corrosion mechanism of L245NS and L360QS steel of gas injection/withdrawal pipelines of underground gas storage in a different acidic environment, which provides theoretical guidance for the corrosion and protection of gas injection/withdrawal pipelines of underground gas storage.

2 Experimental Materials and Measurement Methods

2.1 Experimental Materials

2.1.1 Composition of Pipe Steel

The steel used in this paper, L245NS steel and L360QS steel, was the sections of field pipe cut from the gas injection/withdrawal pipeline of the No.1 and No.2 underground gas storages. The No.1 underground gas storage belongs to the dry gas reservoir, and the No.2 underground gas storage belongs to the sulfur-type dry gas reservoir. L245NS-Φ219 × 7 was the steel used for the gas injection/withdrawal pipeline of the No.1 underground gas storage facility, and the steel used for the gas injection/withdrawal pipeline of the No.2 underground gas storage facility was L360QS-Φ168 × 9, the chemical composition of which is shown in Table 1.

Table 1 Chemical composition of L245NS and L360QS steel, wt.%

2.1.2 Gas Composition of Pipeline Transportation

The gas injection/withdrawal pipeline of the No.1 underground gas storage had an average operating pressure of 5.4 MPa, an operating temperature of 30-40 °C, and a running time of 840d. The gas injection/withdrawal pipeline of the No.1 underground gas storage had an average operating pressure of 10 MPa, an operating temperature of 30-40 °C, and an operating time of 840d. Table 2 shows the major gas components carried by its pipeline, and the pipeline contains a portion of the condensate, and the chemical constituents of its water quality are shown in Table 3.

Table 2 The main gas components of the gas injection/withdrawal pipeline of No.1 and No.2 underground gas storages
Table 3 Water-bearing water quality components of the gas injection/withdrawal pipeline of No.1 and No.2 underground gas storages

2.2 Measurement Methods

2.2.1 Measurement of Corrosion Rate

Due to the different lengths of the pipe sections cut down, the corrosion-sensitive areas of the gas injection/withdrawal pipelines of No.1 underground gas storage and No.2 underground gas storage were divided into 3 rings and 5 rings, respectively. Each ring was divided into 12 equal parts. Therefore, the number of wall thickness measurement points was 36 and 60, respectively. The straight pipe section detection rings and detection points are shown in Fig. 1. To ensure the accuracy of the measurement, after removing the corrosion products on the inner wall of the pipeline at the detection point, the wall thickness at the detection point was measured by a penetrating ultrasonic thickness gauge.

Fig. 1
figure 1

Straight pipe section detection ring belt and detection points

The wall thickness of the pipe is measured before and after the corrosion of the pipe. In the unit time, the corrosion rate is calculated by the amount of wall thickness thinning, as shown in Eq 1. The corrosion of the pipe is described by the maximum wall thickness reduction, the minimum reduction, and the average reduction.

$${V}_{\mathrm{c}}=\frac{365({d}_{1}-{d}_{2})}{T}$$
(1)

where \({V}_{\mathrm{c}}\) represents the corrosion rate, mm/a; d1 represents the thickness of the tube wall before corrosion, mm; d2 represents the thickness of the pipe wall after corrosion, mm; 365 represents the number of days a year of pipe operation, d; and T represents the pipe running time, d.

2.2.2 Measurement of SEM and EDS

According to the requirements of the measurement, the areas with severe steel corrosion of L245NS and L360QS steel were selected (Fig. 2) and cut into 4 samples, respectively, which were divided into two 10 mm × 10 mm × 10 mm and two 5 mm × 5 mm × 3 mm rectangular samples. One of the 10 mm × 10 mm × 10 mm × 10 mm samples was not processed. The surface morphology of corrosion products before cleaning can be observed by SEM measurement. The other 10 mm × 10 mm × 10 mm sample was soaked and cleaned with low-concentration solution prepared by hydrochloric acid, etc., and then washed with deionized water. The repeated operation was carried out until the corrosion products on the sample surface were removed and the metal matrix itself in the pipeline can be observed, and then the vacuum dryer was used for drying at a temperature of 80 °C, and finally, the SEM measurement was carried out. The morphology of the metal matrix in the pipeline after cleaning the corrosion products can be observed by SEM measurement. In this experiment, the instrument model was the German ZEISS Sigma 300 scanning electron microscope. The corrosion product film and the metal matrix of the sample were amplified by 100 to 20000 times, respectively. Imaging in HV mode, the working distance was adjusted to around 8.5 mm, and the acceleration voltage was 2.0-5.0KV.

Fig. 2
figure 2

L245NS and L360QS steel and inner pipe wall attached with gum. (a) L245NS steel (b) L360QS steel (c) gum

The elemental composition of the corrosion products can be detected by EDS measurement on the 10 mm × 10 mm × 10 mm sample without cleaning the corrosion product film. In this experiment, a ray spectrometer produced by Zeiss, Germany, was used for testing. The instrument model was OXFORD Xplore 30.

2.2.3 Measurement of XRD and XPS

Since the gas injection/withdrawal pipeline of No.1 underground gas storage was relatively dry, the 5 mm × 5 mm × 3 mm sample could be directly tested by XRD and XPS. However, due to the influence of the conveying medium of the gas injection/withdrawal pipeline of No.2 underground gas storage, there was a thick gel layer attached to the corrosion layer on the inner surface of the pipeline. Direct testing would affect the test instrument (Fig. 2). Therefore, it was necessary to deal with it, using a scraper to scrape out the corrosion products in the pipeline, and then placing in acetone solution cleaning, ultrasonic cleaning machine for vibration, repeated cleaning, until the solution becomes clear, and the use of deionized water cleaning, filtering, and then using vacuum drying box for drying, drying temperature of 80 °C, grinding the dried corrosion powder. Finally, an x-ray diffractometer (XRD) and x-ray photoelectron spectroscopy (XPS) were used to analyze the composition of the corrosion products. In this experiment, the model of the x-ray diffractometer was Japanese Rigaku Smartlab 9kw, the wavelength was 0.15406 nm, the voltage was 40KV, the current was 40 mA, the specific scanning angle range was 5-80°, and the scanning speed is 2°/min. The model of the x-ray photoelectron spectrometer was Thermo Scientific K-Alpha, the spot size was 400 μm, the working voltage was 12 kV, and the filament current was 6 mA. The full spectrum scanning pass energy was 150 eV, and the step size was 1 eV, the narrow spectrum scanning energy was 50 eV and the step size was 0.1 eV.

2.2.4 Measurement of the Gum Composition

The composition of the gum was unclear, so it was not possible to determine whether it had an impact on the corrosion of the pipe, so it was necessary to detect the composition of the gum, the gum attached to the inner wall of the pipeline was removed by a scraper (Fig. 2), and the composition of the gum was determined by x-ray diffraction and gas phase mass spectrometry (GC-MS) as well as testing methods in according with SY/T7550 national standard.

3 Results

3.1 Corrosion Rate

As shown in Table 4, the minimum corrosion rate of the L245NS steel in the CO2 environment was 0.0130 mm/a, the maximum corrosion rate was 0.2520 mm/a, and the average corrosion rate was 0.0937 mm/a. The minimum corrosion rate of the L360QS steel in the CO2-H2S environment was 0.0043 mm/a, the maximum corrosion rate was 0.2607 mm/a, and the average corrosion rate was 0.0886 mm/a.

Table 4 Wall thickness and corrosion rate of L245NS and L360QS steel

3.2 Analysis of Gum Composition

Table 5 shows that the gum was mainly composed of CaCO3, MgCO3, Fe2O3, CaF2, etc. It also contained some asphaltenes, small amounts of alkanes, benzene, and esters. Among them, CaCO3, MgCO3, Fe2O3, CaF2, and other oxides were corrosion products in the pipeline, while the components of engine oil and lubricating base oil were generally alkanes (generally heavy hydrocarbons above C17), cycloalkanes (monocyclic, bicyclic, polycyclic), synthetic esters, phosphates, and asphaltenes, and tetracosane was a typical component of engine oil and lubricating base oil. As a result, the gum was likely to contain engine oil and lubricating oil components, and the substances detected by the gum were not corrosive.

Table 5 Composition of gum

3.3 SEM and EDS Analysis

The surface morphology of corrosion products of L245NS steel in a CO2 environment is shown in Fig. 3(a), (b) and (c), where the corrosion products were granular and lumpy distribution, with looser corrosion product film and larger porosity, which made it easy for aggressive substances to penetrate the corrosion product film and will further accelerate the corrosion of the metal substrate. The surface morphology of corrosion products of L360QS steel in a CO2-H2S environment is shown in Fig. 4(a), (b) and (c) . There was a thick layer of gum accumulated on the surface of corrosion products, which made the corrosion product film more compact and played a good protective role for steel. The metallic matrix morphology of L245NS steel and L360QS steel after removing corrosion products is shown in Fig. 5. In the CO2 environment, Fig. 5(a) and (b) shows that there were a large number of etching pits on the surface of L245NS steel and the diameter and depth of the pits were large and deep. In the CO2-H2S environment, Fig. 5(c) and (d) shows that the number of pits on the surface of L360QS steel was low, as well as the diameter and depth of the pits were small and shallow.

Fig. 3
figure 3

SEM and EDS results of corrosion products of L245NS steel in CO2 environment

Fig. 4
figure 4

SEM and EDS results of corrosion products of L360NS steel in CO2-H2S environment

Fig. 5
figure 5

Metal matrix morphology of L245NS and L360QS steels after removal of corrosion products. (a), (b) L245NS steel (c), (d) L360QS steel

The areas A-C of Fig. 3 and D-E of Fig. 4 were chosen for EDS analysis to further study the elemental composition of corrosion products of L245NS and L360QS steels, where the elemental composition of corrosion products is shown in Table 6, Fig. 3(d), and 4(d). The results show that the main elements of corrosion products in the A, B, and C regions were Fe, C, and O elements, in addition to a small amount of Ca and Cl elements, whose atomic percentages were all without obvious patterns. The main elements of corrosion products in the D and E regions were Fe, C, and O elements which also contained small amounts of Ca, S, and Cl elements. The atomic percentages of elements C and O in the E region were about 3:1, and \({\mathrm{CO}}_{3}^{2-}\) maybe present. According to the above analysis, it can be seen that the corrosion product composition was more complex, as well as the method had certain limitations, it can only indicate the elemental composition at the point, without representing which corrosion products. To confirm the corrosion medium and mechanism, it was also necessary to analyze with the help of XRD and XPS results.

Table 6 The weight and atomic composition of corrosion products in different environments of L245NS and L360QS steels

3.4 XRD and XPS Analysis

The XRD results of corrosion products of L245NS steel in a CO2 environment are shown in Fig. 6. The main components of the corrosion product film were CaCO3, FeOOH, FeO, and Fe3O4. The XRD results of corrosion products of L360QS steel in a CO2-H2S environment are shown in Fig. 7. The main components of the corrosion product film were CaCO3, FeOOH, Fe7S8, BaSO4, and FeS2. It should be noted that the characteristic peaks of iron-oxygen compounds such as FeCO3 and Fe2O3 do not appear in either spectrum, indicating that they may not be present or their content is so small that they cannot be detected by x-ray diffraction. However, because the composition of the products in various gas environments was rather complex, x-ray photoelectron spectroscopy was employed to get a more precise analysis. Figure 8 shows that the elements of corrosion products of L245NS steel and L360QS steel were mainly Fe, C, O, Ca, and Cl. In addition, the corrosion products of L360QS steel also contain S elements.

Fig. 6
figure 6

XRD results of corrosion products of L245NS steel

Fig. 7
figure 7

XRD results of corrosion products of L360QS steel

Fig. 8
figure 8

Full spectrum of XPS of corrosion products of L245NS and L360QS steels

In the CO2 environment (Fig. 9 and Table 7), the products on the Fe2p energy spectrum of L245NS steel were Fe2O3/FeOOH (711 eV) (Ref 16, 17). The products on the C1s energy spectrum were mainly indeterminate and residual carbon (284.74, 286.4, and 288.54 eV) (Ref 18), with a small amount of CaCO3 (289.74 eV) (Ref 19). The products on the O1s energy spectrum were mainly Fe2O3 (529.86 eV) and CaCO3/FeOOH (531.62 eV) (Ref 20,21,22,23) and the rest were impurities. The products on the Ca2p energy spectrum were mainly CaCO3 (347.40 eV), which was consistent with the XRD analysis. Therefore, it can be concluded from the combination of XRD and XPS results that the corrosion products of L245NS steel in a CO2 environment included substances such as FeO, Fe2O3, Fe3O4, CaCO3, and FeOOH, whose corrosion was controlled by CO2.

Fig. 9
figure 9

XPS fine spectrum of corrosion products of L245NS steel

Table 7 Results of high-resolution XPS energy spectrum analysis of corrosion products of L245 NS and L360 QS steels

In the CO2-H2S environment (Fig. 10 and Table 7), the products on the Fe2p energy spectrum of L360QS steel were FeS2 (707.6 eV) (Ref 16) and Fe2O3 /FeOOH (711.39 eV) (Ref 16, 17). The products on the S2p energy spectrum were FeS2 (162.98 eV) (Ref 20, 21, 24) and BaSO4 (168.60 eV) (Ref 25). According to XRD analysis, there should be a small number of iron sulfides present between FeS and FeS2, such as Fe7S8, but they were not detected by XPS testing. This was because XPS can only analyze the composition at depths above 6 nm on the surface, which cannot be detected by x-ray photoelectron spectroscopy due to its small amount of deposition under the product film. This was because XPS can only analyze components at depths above 6 nm on the surface, which were undetectable by x-ray photoelectron spectroscopy due to their small content or deposition under the product film. The products on the O1s energy spectrum were mainly Fe2O3 (530.08 eV) (Ref 19), Ca(OH)2, and SiO2 (532 eV), indicating that the pipe contains a small number of sand particles, and the products on the Ca2p energy spectrum are mainly Ca(OH)2 (347.95 eV). Therefore, it can be concluded from the combination of XRD and XPS results that the corrosion products of L360QS steel in a CO2-H2S environment include substances such as Fe2O3, CaCO3, FeS2, Fe7S8, BaSO4, and FeOOH, whose corrosion was controlled by H2S.

Fig. 10
figure 10

XPS fine spectrum of corrosion products of L360QS steel

Fig. 11
figure 11

Diagram of corrosion mechanism. (a) L245NS steel in CO2 environment (b) L360QS steel in CO2-H2S environment

4 Discussion

4.1 Corrosion Mechanism of L245NS Steel in CO2 Environment

Figure 11(a) shows that in the CO2 environment, CO2 was an acidic gas, which was dissolved in water and formed an acidic liquid film on the metal surface. When the acidic liquid film was ionized to generate \({\mathrm{HCO}}_{3}^{-}\) and \({\mathrm{CO}}_{3}^{2-}\), the cathodic reaction is shown in Eq 2-4 (Ref 26,27,28). L245NS steel was in an acidic environment and subject to an electrochemical corrosion reaction, and the anodic reaction is shown in Eq 5 (Ref 29). The concentration of Fe2+ in the solution rises as corrosion occurs continuously. When the concentration of \({\mathrm{CO}}_{3}^{2-}\) and Fe2+ reached the solubility product of FeCO3, FeCO3 will deposit on the steel surface by reacting with carbonate and bicarbonate, as shown in Eq 6, 7 (Ref 30,31,32). While the fact that XRD and XPS analyses of the corrosion product film show that FeCO3 was not present in the corrosion product. On the one hand, it was because FeCO3 starts to decompose to CO2 and FeO at temperatures below 100 °C, as shown in Eq 8 (Ref 33, 34). On the other hand, it lay in the partial dissolution of the generated FeCO3 under this acidic condition, as shown in Eq 9 (Ref 16). In addition, FeCO3 was oxidized in contact with air to generate Fe2O3, as shown in Eq 10 (Ref 35), making the amount of FeCO3 in the corrosion product film small or non-existent. As a result, FeO and Fe2O3, which were the byproducts of a subsequent reaction involving FeCO3, were found in both XRD and XPS testing.

As the pipe was cut down and exposed to air for a long time, Fe2+ in the presence of oxygen generated Fe(OH)2, as shown in Eq 11, 12 (Ref 36, 37), while its stronger oxidizing properties oxidize the low-valent Fe compounds to oxides of high-valent Fe, oxidizing the Fe2+ and Fe(OH)2 substances on the product surface to Fe(OH)3, as shown in Eq 13, 14 (Ref 38). Fe(OH)3 was dehydrated to produce Fe2O3 and FeOOH after the dehydration reaction, as shown in Eq 15, 16 (Ref 38). The FeOOH generated will be further dehydrated to produce the poorly protected Fe2O3, as shown in Eq 17 (Ref 38), resulting in a layer of loose and porous granular corrosion products on the surface of the corrosion products. Furthermore, Fig. 6 shows that the product contains a certain amount of Fe3O4 as a result of the interaction of Fe(OH)3 with Fe(OH)2, as shown in Eq 18 (Ref 39). Meanwhile, the pipeline conveying medium contained Ca2+ ions, and Ca2+ reacted with carbonate or bicarbonate to also produce CaCO3, as shown in Eq 19, 20.

$${\mathrm{CO}}_{2}+{\mathrm{H}}_{2}\mathrm{O}\to {\mathrm{H}}_{2}{\mathrm{CO}}_{3}$$
(2)
$${2\mathrm{H}}_{2}{\mathrm{CO}}_{3}+2\mathrm{e}\to {\mathrm{H}}_{2}+{2\mathrm{HCO}}_{3}^{-}$$
(3)
$${2\mathrm{HCO}}_{3}^{-}+2\mathrm{e}\to {\mathrm{H}}_{2}+{2\mathrm{CO}}_{3}^{2-}$$
(4)
$$\mathrm{Fe}\to {\mathrm{Fe}}^{2+}+2{\mathrm{e}}^{-}$$
(5)
$$\mathrm{Fe}+{\mathrm{HCO}}_{3}^{-}\to {\mathrm{FeCO}}_{3}+{\mathrm{H}}^{+}+2{\mathrm{e}}^{-}$$
(6)
$$\mathrm{Fe}+{\mathrm{CO}}_{3}^{2-}\to {\mathrm{FeCO}}_{3}+2{\mathrm{e}}^{-}$$
(7)
$${\mathrm{FeCO}}_{3}\to \mathrm{FeO}+{\mathrm{CO}}_{2}$$
(8)
$${\mathrm{FeCO}}_{3}\to {\mathrm{Fe}}^{2+}+{\mathrm{CO}}_{3}^{2-}$$
(9)
$${\mathrm{FeCO}}_{3}+{\mathrm{O}}_{2}+{4\mathrm{H}}_{2}\mathrm{O}\to 2{\mathrm{Fe}}_{2}{\mathrm{O}}_{3}+4{\mathrm{H}}_{2}{\mathrm{CO}}_{3}$$
(10)
$${\mathrm{O}}_{2}+{\mathrm{H}}_{2}\mathrm{O}+4{\mathrm{e}}^{-}\to 4{\mathrm{OH}}^{-}$$
(11)
$${\mathrm{Fe}}^{2+}+{\mathrm{OH}}^{-}\to \mathrm{Fe}{\left(\mathrm{OH}\right)}_{2}$$
(12)
$$4{\mathrm{Fe}}^{2+}+{\mathrm{O}}_{2}+10{\mathrm{H}}_{2}\mathrm{O}\to 4\mathrm{Fe}{\left(\mathrm{OH}\right)}_{3}+8{\mathrm{H}}^{+}$$
(13)
$$4\mathrm{Fe}{\left(\mathrm{OH}\right)}_{2}+{\mathrm{O}}_{2}+2{\mathrm{H}}_{2}\mathrm{O}\to 4\mathrm{Fe}{\left(\mathrm{OH}\right)}_{3}$$
(14)
$$4\mathrm{Fe}{\left(\mathrm{OH}\right)}_{3}\to {\mathrm{Fe}}_{2}{\mathrm{O}}_{3}+3{\mathrm{H}}_{2}\mathrm{O}$$
(15)
$$4\mathrm{Fe}{\left(\mathrm{OH}\right)}_{3}\to \mathrm{FeOOH}+{\mathrm{H}}_{2}\mathrm{O}$$
(16)
$$2\mathrm{FeOOH}\to {\mathrm{Fe}}_{2}{\mathrm{O}}_{3}+{\mathrm{H}}_{2}\mathrm{O}$$
(17)
$$\mathrm{Fe}{\left(\mathrm{OH}\right)}_{2}+2\mathrm{Fe}{\left(\mathrm{OH}\right)}_{3}\to {\mathrm{Fe}}_{3}{\mathrm{O}}_{4}+4{\mathrm{H}}_{2}\mathrm{O}$$
(18)
$${\mathrm{Ca}}^{2+}+2{\mathrm{HCO}}_{3}^{-}\to {\mathrm{CaCO}}_{3}+{\mathrm{CO}}_{2}+{\mathrm{H}}_{2}\mathrm{O}$$
(19)
$${\mathrm{Ca}}^{2+}+{\mathrm{CO}}_{3}^{2-}\to {\mathrm{CaCO}}_{3}$$
(20)

As a result, there was a condition of uneven distribution of a few coverage products on the steel surface, which provided a channel for corrosive media to reach the metal substrate surface and promotes the occurrence of corrosion. At the same time, the small radius of \({\mathrm{Cl}}^{-}\), which was extremely penetrating, easily penetrates through the product film to reach the metal substrate surface to participate in the reaction (Ref 40), resulting in corrosion defect pits.

4.2 Corrosion Mechanism of L360QS Steel in CO2-H2S Environment

Figure 11(b) shows that H2S can be rapidly dissolved in solution and ionized into \({\mathrm{HS}}^{-}\) and S2- when H2S was added to the CO2 environment, as shown in Eq 20, 21 (Ref 26, 28), S2- ionized from H2S in the cathodic reaction reacts with Fe2+ generated from the anodic reaction to form iron sulfide, as shown in Eq 23 (Ref 16). Iron sulfide will appear in polycrystalline forms in the corrosion products, including troilite (FeS), pyrite (FeS2), and magnetic pyrite (Fe7S8). Their structural characteristics such as composition, morphology, and crystal structure are primarily influenced by various factors such as pH, temperature, and soaking time (Ref 41,42,43,44,45). However, FeS has not been detected in the XRD and XPS analysis results since the generated FeS further formed a more stable FeS2 with \({\mathrm{HS}}^{-}\) and S2- as shown in Eq 24, 25 (Ref 46). Porous iron oxides such as Fe2O3 and FeOOH are generated through a series of oxidation and hydrolysis reactions as shown in Eq 11, 17. In addition, CaCO3 and BaSO4 are also produced since the pipeline transport medium comprises Ca2+, Ba2+, and \({\mathrm{SO}}_{4}^{2-}\) ions, as shown in Eq 18, 19, 26.

$${\mathrm{H}}_{2}\mathrm{S}\to {\mathrm{HS}}^{-}+{\mathrm{H}}^{+}$$
(21)
$${\mathrm{HS}}^{-}\to {\mathrm{S}}^{2-}+{\mathrm{H}}^{+}$$
(22)
$${\mathrm{Fe}}^{2+}+{\mathrm{S}}^{2-}\to \mathrm{FeS}$$
(23)
$$\mathrm{FeS}+{\mathrm{S}}^{2-}\to {\mathrm{FeS}}_{2}+2{\mathrm{e}}^{-}$$
(24)
$$\mathrm{FeS}+{\mathrm{HS}}^{2-}\to {\mathrm{FeS}}_{2}+{\mathrm{H}}^{+}+2{\mathrm{e}}^{-}$$
(25)
$${\mathrm{Ba}}^{2+}+{\mathrm{SO}}_{4}^{2-}\to {\mathrm{BaSO}}_{4}$$
(26)

The surface of the inner wall of the pipeline was attached to the gum. The gum encapsulated the corrosion products and corrosion scales to form a dense protective film. The gum encapsulates the corrosion products and corrosion scales to form a dense protective film, which inhibits the corrosion of the pipeline.

5 Conclusions

  1. 1.

    In CO2 environment, the corrosion products of L245NS steel include FeO, Fe2O3, Fe3O4, CaCO3 and FeOOH, and the corrosion is controlled by CO2.

  2. 2.

    In CO2-H2S environment, the corrosion products of L360QS steel include Fe2O3, CaCO3, FeS2, Fe7S8, BaSO4, and FeOOH. The corrosion of L360QS steel is controlled by H2S.

  3. 3.

    The results show that Fe2O3, Fe3O4, and CaCO3 with poor protection were formed on the surface of L245NS steel, which provided a channel for the corrosive medium to contact the surface of the metal matrix and accelerated the corrosion rate of the pipeline. Meanwhile, \({\mathrm{Cl}}^{-}\) had a small radius and strong penetrability, which was easy to pass through the product film to reach the surface of the metal matrix to participate in the reaction, resulting in corrosion defect pits.

  4. 4.

    The inner wall of L360QS steel was attached with gum, forming a dense protective film on the inner surface of the pipeline, and it was difficult for corrosive substances to enter the metal matrix, which played a role in inhibiting the corrosion of the pipeline.