Monitoring and Preventing Failures of Transmission Pipelines at Oil and Natural Gas Plants

: In recent years, the increase in energy prices and demand has been driven by the post-pandemic economic recovery. Of the various energy sources, oil and natural gas remain the most important source of energy production and consumption after coal. Oil and gas pipelines are a key component of the overall energy infrastructure, transporting oil and gas from mines to end users, so the reliability and safety of these pipelines is critical. The oil and gas industry incurs large expenses for the removal of failures related to, among others, corrosion of pipelines caused by the presence of Hg, CO 2 H 2 S, carbonates and chlorides in reservoir waters. Therefore, pipeline operators must constantly monitor and prevent corrosion. Corrosion failure losses are a major motivation for the oil and gas industry to develop accurate monitoring models using non-destructive NDT meth-ods based on test results and failure frequency observations. Observing the locations of frequent pipeline failures and monitoring and applying corrosion protection to pipelines play an important role in reducing failure rates and ultimately increasing the economic and safety performance of pipelines. Monitoring and prevention eﬀorts support the decision-making process in the oil and gas industry by predicting failures and determining the timing of maintenance or replacement of cor-roded pipelines. We have presented methods of prevention through the use of corrosion inhibitors in crude oil and natural gas transmission pipelines, as well as various factors that inﬂuence their application. In this article, a review of corrosion rate monitoring systems is conducted, and a range of control and monitoring scenarios is proposed. This knowledge will aid scientists and practitioners in prioritizing their policies, not only to choose the appropriate monitoring technique but also to enhance corrosion protection eﬀectiveness.


Introduction
The intention of this article is to provide several examples highlighting that the future of technological challenges depends on investments in research and development in the field of materials, surface protection and its monitoring.Progress in these areas is necessary to protect existing industrial installations and future steel installations.
An innovative approach will determine whether corrosion protection efficiency can be improved by introducing continuous monitoring and preventing pipeline failures in mines.
Failures resulting from the progressive, uncontrolled corrosion of industrial installations have a negative impact not only on mine operations, but also on the safety of the crew operating the installations and the environment.Corrosion of construction materials of pipelines and industrial installations, caused by the aggressive action of extracted reservoir fluids, is an inherent element of crude oil and natural gas extraction.Industrial installations for the preliminary preparation of crude oil or natural gas for transportation are exposed to both general and localized corrosion.It is not uncommon for the walls of process installations and pipelines to perforate, leading to uncontrolled oil or gas leaks that lead to environmental contamination and fire hazards, and are the cause of failures that increase production costs.To meet the challenges that corrosion prevention specialists face on a daily basis, research methods have been used and developed over the years to understand and prevent corrosion.Solving the problem by using corrosion-resistant materials or applying an effective anti-corrosion technique is often not feasible due to technical reasons or, in some cases, lacks economic justification.Remedial actions related to the inevitable occurrence of corrosion phenomena often involve monitoring the progress of corrosion.
Currently, several corrosion monitoring methods are available, primarily focused on monitoring the progress of general corrosion.Such corrosion occurs when the construction material undergoes uniform degradation throughout the area in contact with the aggressive corrosive medium.Figure 1 illustrates several examples of general corrosion.Various methods and measurement techniques for corrosion are advanced enough that monitoring general corrosion is considered solved.Greater difficulties are encountered in monitoring pi ing corrosion, which, due to the random nature of material damage location using conventional corrosion rate measurement methods, is challenging to locate, let alone monitor.Figure 2 shows an example of pi ing corrosion.Due to the problem of pi ing corrosion, which is difficult to locate today, the main focus in the field of corrosion management in the oil and gas extraction industry should be on research allowing identification of such corrosion threats.A comprehensive understanding of the mechanisms of pi ing corrosion in a given steel grade and identification of potential synergies between aggressive factors present in oil or natural gas should provide answers regarding the application of a monitoring system for such corrosion.Current knowledge and measurement techniques should include the development of advanced methods for monitoring pi ing corrosion, with an emphasis on early detection of corrosion foci.
Monitoring also allows for determining the extent of corrosion threats.Non-destructive testing (NDT) is a very important aspect of corrosion monitoring, enabling assessment of the effectiveness of applied corrosion protection technologies [1][2][3].For users of the installation, it is crucial to understand the actual corrosion rate of pipelines.Knowledge of corrosion locations allows for the application of optimal corrosion protection methods.Methods such as corrosion protection using dosed inhibitors or modifiers, as well as cathodic protection, are used [4].The problem of monitoring corrosion to increase the safety of pipelines and industrial installations requires a new perspective and new actions.

Monitoring and Prevention of Pipeline Failures-Research Activities and New Approaches
The operation of pipelines transporting crude oil and natural gas from the well to the mine, like any other pipeline system, is fraught with risks associated with the possibility of damage, both through corrosion processes and the actions of third parties.While it is difficult to predict mechanical interference, processes related to the interaction of pipelines with corrosion factors can be anticipated.With the currently available technical means, it is quite easy to monitor the progression of corrosion, predict ongoing processes, and future conditions.The most effective method of minimizing risk is to prevent failures that could lead to disaster or environmental contamination.Diagnostic assessment of the operational pipelines' technical condition is an important factor [5].
Worldwide, various types of measurement techniques and technologies have been developed, utilizing various physical phenomena to assess pipeline conditions [6].One method allowing for non-invasive testing is ultrasonic testing.
Ultrasonic testing is one of the non-destructive volume testing (NDT) techniques, meaning that it allows for the detection of defects throughout the volume of the tested material [7][8][9][10].The technique is based on the phenomenon of ultrasonic wave propagation in the tested materials, introduced through an ultrasonic transducer.Ultrasonic testing is based on observing registered impulses received from material discontinuities and reflections from the bo om of the tested element or the boundaries of media with different wave propagation velocities [11][12][13][14][15].
Information about the size of the encountered damage is analyzed, as well as various parameters of the ultrasonic field (such as intensity, wave propagation direction, and the time of passing through the material).Depending on the parameters chosen for this field, it is possible to detect internal defects as well as surface and subsurface discontinuities [16].
Detailed 3D imaging of pipeline damage can be obtained using the Total Focusing Method (TFM) [17][18][19], which is based on image reconstruction techniques.In this method, a multi-element device emits pulsating ultrasonic waves [20,21].The processing of primary and secondary signal envelopes provides a high-resolution image of the damage [22][23][24].
Ultrasonic methods for detecting destructive processes caused by the interaction of hydrogen with the mechanical-electrochemical properties of metals and alloys are also known [25,26].Such methods include a test method for detecting hydrogen corrosion of equipment and systems exposed to hydrogen at elevated temperatures above 200 °C (known as high-temperature hydrogen a ack, HTHA) [27].As a result, this mechanism of damage development can be detected in the early phase, when it is most significant.
Ultrasonic testing can be conducted manually, semi-automatically, or in a fully automated manner (e.g., automated quality control systems on production lines).It is a universally accepted and reliable method for monitoring the corrosion of pipelines.The key element is the distribution of measurement points.The selection of these points is based on the analysis of the construction of the pipelines, changes in direction, and flow velocity.This method allows for cost optimization in the performance of the aforementioned tasks and non-invasively examines the technical condition of the pipeline while maintaining continuous flow.To obtain a comprehensive picture of the pipeline's technical condition, multiple different measurement techniques need to be combined, complementing each other [28].
In the case of pipelines, the quality and accuracy of measurements play a significant role.The ability to operate ultrasound equipment is very important, as is experience in such testing.Testing enables the assessment of the pipeline's technical condition and often allows for the early detection of defects in the pipeline wall.Monitoring pipelines at an early stage helps evaluate their technical condition, determine plans for subsequent inspections, and take rational preventive measures [29][30][31][32].Wireless non-invasive corrosion monitoring is essential in maintenance departments, helping to continuously track the progress of corrosion, assess the condition, and enable the optimization of operations while maximizing safety.
In the oil industry, in the exploration and exploitation of oil and gas fields, the economic and environmental losses caused by corrosion damage to the metal equipment used in the aforementioned works are mainly due to its prolonged exposure to the very aggressive conditions in which they operate.Among the most important tasks in corrosion prevention are ensuring reliable operation and extending the lifespan of equipment, which translates directly into real economic benefits [33].In most cases, corrosion or erosion inspections and tests are performed manually at longer intervals.In hard-to-reach parts of installations and particularly hazardous areas, the inspection process can only take place during installation downtime.Such situations result in the lack of possibility for the operator to react earlier if a change in process parameters accelerates the loss of material from the wall of the pipeline or tank.In comparison to one inspection per year, monitoring corrosion using an ultrasonic sensor mounted on the pipeline yields a large amount of data for analysis.
There are various types of corrosion in the oil industry: uniform, non-uniform pi ing, intergranular, subsurface and punctate.Electrochemical corrosion and corrosion result from chemical factors, i.e., the presence of oxygen, water, hydrogen sulfide or carbon dioxide [34][35][36][37][38][39].The effects of corrosion processes, particularly pi ing corrosion, can be the cause of failure, resulting from damage to the pipe at the site of deep pi ing [40][41][42][43].Failures can also arise from intergranular corrosion, which weakens the mechanical properties of metal elements [44].Protective coatings, so-called surface layers (corrosion inhibitors), whose primary function is to isolate the protected metal from the environment, can be applied.By selecting the chemical composition of the inhibitor, these layers effectively protect the metal from corrosion [45].High-quality corrosion inhibitors and their proper selection make it possible to significantly extend the life of the pipelines or equipment in operation and, consequently, to extend the service life and prevent its failure.Appropriately selected inhibitors will form a durable protective layer on the pipe surface, preventing the formation of pi ing and causing passivation of existing pi ing [46][47][48].
Special a ention should be paid to corrosion protection techniques from the very beginning of pipeline construction, starting with the selection of steel, the chemical treatment of the steel used, the coating that protects the pipe, and the use of monitoring and application of corrosion protection [49].A corrosion monitoring system using a probe and ultrasonic waves is illustrated in Figure 3.
The economic benefits of implementing a comprehensive corrosion prevention strategy have long been recognised by the owners of facilities (mines).Corrosion prevention costs have been adopted in these industries with the belief that they typically represent one-tenth or less of the cost of replacing pipelines and operating equipment [34,50].A 10:1 return on investment is rarely seen in business-however, it reflects the undeniable economic benefits of employing modern anti-corrosion technologies, such as the use of chemicals (inhibitors) or cathodic protection of pipelines and the plant [51].

Inhibitors Used for Corrosion Protection
Corrosion inhibitors for intermi ent use Corrosion inhibitors for periodic use, when applied correctly, form a dense coating on the pipe walls that provides a physical and chemical barrier to protect the pipe from both general and localized corrosion [52].This layer is washed away over time, so the inhibitor should be applied regularly to maintain corrosion protection [53,54].
Corrosion inhibitors for continuous use The purpose of continuous use corrosion inhibitors is to form a consistent protective coating on the pipe walls [55].In practice, this means that if any inhibitor molecule breaks away from the pipe surface, another inhibitor molecule will take its place.New gaps are constantly forming in the inhibitor layer, which are immediately filled.For this reason, it is crucial to ensure a minimum level of the substance and to ensure that an adequate supply is always available to fill gaps in the coating [56,57].

Materials and Research Methods
The purpose of the study was to determine the surface condition of the samples, the chemical composition of the scale, and the micro-structure of the scale and steel substrate.A section of pipe cut from an installation at a natural gas mine in the Polish Lowlands was tested for the corrosion inhibitor layer.
In order to achieve the goal, the following activities and tests were carried out: 1. SEM-EDS scanning microscope photographs of the sample surface were taken.2. Analysis of the chemical composition on the surface of the sample was performed using an X-ray microanalyzer.3. Transverse metallographic micro-sections were taken from the test specimens (Figure 1) to study the micro-structure of the corrosion scale and the substrate.
An important aspect of water testing is the assessment of its corrosive properties.Most metals are thermodynamically unstable in the water environment, and the lack of stability, apart from the type of metal or material, is determined by the type and concentration of water chemical components, which determine the values of water quality indicators, such as:


concentration of dissolved oxygen and other oxidants,  degree of mineralization (mainly the concentration of chlorides and sulphates),  pH value and the concentration of aggressive CO2 associated with it,  water alkalinity,  content of Ca2 + and Mg2 + ions implying water hardness.
Generally, soft and acidic waters containing dissolved oxygen and high concentrations of dissolved substances are characterized by aggressiveness towards metals.All these factors contribute to the course of corrosion.
However, in the case of this specific well under investigation, we are dealing with extreme operating conditions (high temperature and pressure, high gas flow rate, solid particles), which are the cause of rapid corrosion (Figure 4).Microstructure and chemical composition analysis of the pipe segment was conducted.
In Figure 5, on the inner surface of the pipe arch segment, which had contact with formation water (Table 1), there is an adhesive, compact, smooth, ma e layer of corrosion products with a dark ashy color.In this part of the pipe segment, its wall is of actual thickness, except for occasional localized pi ing.The rest of the surface is unevenly covered with deep pi ing with a dark silvery ma e color, as shown in the photograph (Figure 5 points Native steel (1), Part (2), Boundary section (3), Corroded (4)).Due to advancing pi ing corrosion, the wall in this part of the pipe segment has undergone significant metal loss.The advancing corrosion process in this part eventually leads to perforation of the pipe.

Results and Discussion
A highly varied progression of corrosion has been observed along the inner circumference of the pipe.The most degraded part is the outer part of the pipe's arch, where its wall thickness is about four times smaller than the rest of the pipe.In the most degraded part of the pipe, its surface has almost no corrosion products, is "polished" and is characterized by deep pi ing.The layers of scale were removed systematically during operation by particles carried by the gas.The next areas around the most damaged middle part of the pipe are an area of slightly less degradation with visible remnants of corrosion layers.The molecular composition of this surface layer showed a large amount of carbon and oxygen characteristic of the presence of carbonates.The remainder (about 70%) of the inner surface of the pipe's arch has a wall thickness close to its original size, mostly covered with uniform corrosion and visible cracks and flakes under a microscope, as well as occasional deep pits.
As can be seen from Table 2, where the compositions of the corrosion layers are listed in relation to the composition of the steel, the most natural assumption would be the loss of iron, but it would have been difficult to expect that this would occur to such an extent.The second observation is the high amount of oxygen and carbon, which suggests the presence of carbonates whose content does not correspond stoichiometrically to any iron compounds.The excess amount of carbonates is also not stoichiometrically consumed by the other components of the analyzed samples.The next component in terms of quantity is mercury.The results of measurements from various locations of the corroded pipe segment show mercury content in the corrosion scale reaching several dozens of percent in terms of weight.
The aforementioned components present in the corrosion scale (carbonates, mercury) are linked to their presence in natural gas and can be explained by various corrosion processes.Figure 6 shows a gap between the markings of samples 1 and 2, which may be due to hydrogen corrosion.In the hydrogen-saturated near-surface layers of iron alloys, deoxidation and decarburization processes occur.Soft, spongy ferrite is formed, which easily transfers onto the composite.As a result of hydrogen accumulation at the front of the cracking, cyclic deformations caused by friction of the surface layer lead to the formation and development of numerous micro-cracks (Figure 7).They weaken the crystalline structure of the metal and cause chipping [34].Transverse to the surface, the metallographic micro-sections of Figure 7 show the microstructure of the steel substrate of the sample segment and a layer of corrosion products.In the upper part, in addition to visible pi ing, there is a black layer of corrosion products.The layer is porous, uneven and cracked.Through the unevenness, pores and cracks, the corrosion medium has access to the steel substrate.In some places, white inclusions can be seen, which is the precipitated salt crystal, which have built into the corrosion scale.Most of the test sample is covered with scale, uniform corrosion and visible under the microscope are single deep pits with a depth of 40 to 65 µm (Figure 7).
The presence of elements like silicon, aluminum, chromium and sulfur in the corrosion microlayer is more difficult to explain.Justifying their elevated concentrations compared to the concentrations in the steel substrate by suggesting the leaching of iron from the steel (from 99% to several dozen percent) does not adhere to logic.Even if we consider this scenario-that the concentrations assuming this variant, then even if the concentrations of these elements could increase fivefold (because that is how much the iron content of the corrosion layer in the pipe arch sample decreased on average) the actual concentrations of Al, S and Cr are much higher.The only explanation is the external (in this case, deposit-related) origin of these elements, which became embedded in the corrosion scale.
In PT conditions of pipes near the wellhead, gas carries solid particles originating from the deposit, or additionally supplemented by particles of corrosion products from the lower parts of the extraction pipes or accumulated at their bo om.The carried solid particles, at high gas flow rates, result in the "abrasion" of the external part of the pipe arch.
Linear velocities of the gas.
The following parameters were adopted: According to the material certificate: pipe Ø 60.3 × 8 (inner diameter 44.3 mm) Gas flow rate: 7500 m 3 /h, Pressure 168 bar, temperature 55.9 °C.With the PVTsim program, based on this data and analysis of the gas composition under normal conditions, the actual gas flow parameters were calculated.The more important calculations are summarized in the Table 3. 1 Nm 3 gas under real conditions has a volume of 6.82 dm 3 .The calculated actual linear velocity of the gas is 16.97 m/s.The linear flow velocity calculated by the computer program allows us to conclude the possibility of grinding of the outer parts of pipe arches by formation water contained in the natural gas (Figure 5).The large amount of carbonates in the microstructure of the corrosion layer indicates that the content of carbonic acid (bicarbonates) in the formation water is important and initiates the entire corrosion process.PT conditions in the pipeline and the composition of the gas make it possible to conclude that a reaction is taking place: These reactions take place according to the equations: Fe → Fe ++ + 2e − (anode reaction) (1) The general reaction equation is as follows: The amount of carbonate ions can increase with growth solution pH-until conditions are reached, promoting the precipitation of iron carbonate, leading to the reaction: The solubility of iron carbonate (which reduces with increasing temperature) and consequently its precipitation is a significant evaluation indicator of corrosivity.Carbon dioxide easily combines with water, forming carbonic acid.
During corrosion caused by the presence of dissolved CO2, the following reaction takes place: When dissolved in water, CO2 acts as an acid; therefore, with an increase in its partial pressure, the acidity of the solution and the rate of corrosion increase.
However, this typical reaction of carbonate corrosion combined with hydrogen corrosion does not entirely explain the size and speed of catastrophic pipeline destruction.Additionally, dosed inhibitors for this type of corrosion would further slow down this process.It should be presumed that there are other causes for the observed phenomena.
One of these is mercury corrosion.Under stable equilibrium conditions, elemental mercury in both liquid and vapor form generally does not form compounds and amalgams when in contact with iron.However, when there are existing corrosion foci and traces of mercury compounds in the formation water, mercury corrosion becomes highly probable.The mechanisms are different if a corrosion layer is formed on the metal surface, and different when mercury is present in the form of compounds (Hg +1 and Hg +2 ) most often dissolved in the formation water.Here we are dealing with a synergy of different corrosion processes.The predominant mechanism of mercury corrosion is the process described below.Mercury vapors at high pressures adsorb in the corrosion layer of steel formed as a result of carbonate corrosion and the associated hydrogen corrosion.Mercury atoms penetrate into the corrosion structure and combine there into larger agglomerates.In steel, about 1% of the composition consists of admixtures, half of which react or form amalgams with mercury.Areas form where the bond between corrosion products and the steel substrate becomes loose (Figure 8).The second mechanism, of much lesser significance, is the development of corrosion related to the presence of methylmercury compounds and mercury ions in the formation water.In contact with steel, regardless of the form of the mercury compound, reduction reactions (electrochemical redox reactions) can occur: Fe + Hg ++ → Fe ++ + Hg o (7) at water pH < 5: for corrosion products: The reduced form of mercury remains within the corroded steel structure.At the same time, the nascent form of this type of mercury is very active (more active than the gaseous form of mercury) and its penetration into the deeper layers of the steel microstructure is very likely.
As can be seen from the description of the two basic types of corrosion, carbonate and mercury corrosion, and their synergistic interaction, it leads to the deep destruction of the surface layer.With normally (typically) designed and operated gas production, from a well-cleaned well, these layers adhere quite strongly to the steel substrate and the corrosion loss, although higher than with corrosion based on a single mechanism, could be acceptable.
The corrosion monitoring conducted over recent years has made it possible to detect failures early, and the application of inhibitors limited the progress of corrosion in pipelines, installations and equipment, resulting in extended intervals for the replacement of extraction pipes, transmission pipes, and equipment at mines.
As mentioned earlier, inhibitors can be used for corrosion protection.Below, in Figures 9 and 10, the results of probe measurements are presented, both without corrosion protection and after the application of an inhibitor.The inhibitor test was initiated by acquiring background data without dosing the inhibitor, resulting in a corrosion rate of 157 µm/year.Subsequently, the inhibitor test was conducted, with more significant data presented in Table 4, where a reduction in corrosion progress to 8.05 µm/year was obtained.Following the completed inhibitor test, an inspection of the pipeline below was possible.Figures 11 and 12 show a segment of the pipe after the corrosion inhibitor test at the mine.After corrosion inhibitor test A, an inspection of the pipeline was carried out, as illustrated in Figure 11, which shows the inhibitor layer.
In one place, the inhibitor layer protruded from the pipe surface-Figure 11 is marked with a red square.Then, these layers were examined with a scanning microscope, Figures 12 and 13.The thickness of the protruding coating layer (film) (shown in Figure 12) of the corrosion inhibitor, measured with a scanning microscope, is 256.24 µm.Elsewhere in this sample, it is thicker or thinner.
Pictured below in Figures 14 and 15 are the inhibitor layer on the metal surface and the metal without the inhibitor.In Figure 14, the inhibitor layer is shown to be closely adhering to the metal surface.It is compact and uniformly covers the metal.
Figure 15 shows a view of the metal substrate without the inhibitor.The smooth structure of the metal can be seen.

Analysis of the Obtained Results
Based on the obtained results, it was determined that electrochemical corrosion with a tendency for pi ing corrosion is present on the tested samples.The cause of this corrosion is the presence of CO2, H2S, NaCl and Hg from the formation water.The thickness of the layer of corrosion products, the roughness of the surface, as well as the number and depth of pits, decrease after the application of inhibitors.
The process of pi ing corrosion is related to the action of a localized cell that forms between the large passivated surface of the steel, which is the cathode, and a local depassivated zone, which is the anode.The rate of metal dissolution on the anode is very high, resulting in rapid perforation (penetration) within a very short time, with li le mass loss outside the a acked area.Pi ing corrosion of steel occurs most often in aqueous environments containing halide ions, i.e., chloride, bromine and iodine ions, with its intensity depending mainly on the concentration of these ions and temperature.It mostly appears on all kinds of internal metal inhomogeneities (non-metallic inclusions, discharge, deformations) and external (edges, scratches, dents, residual scale, deposits, etc.).On the surface of the metal, a hard, thin, quite adherent layer of corrosion products is formed.Oxygen, chlorine and mercury were found in the corrosion layer.The chemical composition of the corroded layer both on the surface and in the cross-section is not uniform.The rate of corrosion is affected by the type of product that forms on the surface of the metal.Steel corrodes with the formation of a semi-protective layer of magnetite (Fe3O4) on the surface, which slows the corrosion rate.
In this case, a well-selected inhibitor reduces the corrosion progression by 95% using 0.008% of the substance, and by 90% using 0.004% of the substance.Usually, the effectiveness of the substance depends on various factors: pressure, temperature, flow rate, surface area and the composition and quantity of factors causing corrosion (water, CO2, H2S, NaCl, Hg, etc.) [34,35].The pipe fragment illustrated in Figure 4 is from a mine in the Polish Lowlands.The red rectangle marks the location of the protective layer thickness test, which shows that the corrosion inhibitor covered the surface of the pipe, and the layer thickness was 256.24 µm.The tested layer was of rubber-like consistency, was ductile, and displayed strong adhesion to the surface.Continuous dosing of the corrosion inhibitor into the formation water showed that the corrosion rate was reduced from 0.0129 mm/year to 0.0046 mm/year.The effectiveness of the inhibitors was, therefore, 53% and 64% compared to the environment without the inhibitor.Research on effectiveness in crude oil environments demonstrated that following the application of inhibitors, corrosion rate was reduced from 0.0142 mm/year to 0.0023 mm/year.The efficacy was thus 83% relative to the environment without the inhibitor [29].
As studies of the two basic types of corrosion, carbonate and mercury, have shown, their synergistic interactions lead to deep destruction of the surface layer.
Preventively and for slowing down corrosion, dosed inhibitors of carbonate-type corrosion can be employed.However, for mercury corrosion, it would be advisable to use a more stainless steel with an increased chromium content, pending further research.For this purpose, a series of laboratory studies as well as industrial trials with various types of steel should be conducted.The impact of hydrogen corrosion as well as the operating parameters have a great influence on its rate and can be reduced by using inhibitors.The use of inhibitors in aggressive environments reduces the corrosion rate.The corrosion retarding effect is explained by the formation of hardly soluble barrier layers on the metal.The results of previous works indicate that the corrosion rate of steel in CO2-saturated brine is initially high, but over time, it decreases due to the formation of a layer of siderite (iron II carbonate), FeCO3, on the surface [58,59].The studies were conducted by measuring the loss of mass over time.Studies revealed that a microscopically thin layer of oxides formed on the steel surface practically inhibits the release of iron.The formed compounds, such as FeOH + , undergo adsorption to drive dissolution at a rate that changes over time, as well as the reduction of H2CO3 and H + occurring simultaneously at a slower pace; however, extensive and deep pi ing corrosion has been observed.This is a specific type of corrosion characterized by localized steel mass loss [29].The process of pi ing corrosion is related to the action of a localized cell that forms between the large passivated surface of the steel, which is the cathode, and a local depassivated zone, which is the anode.The metal dissolution rate at the anode is very high, consequently leading to rapid perforation in a very short time, without much mass loss outside the affected area [60].Pi ing corrosion of steel most commonly occurs in aqueous environments containing halide ions, i.e., chloride, bromide and iodide ions, with its intensity primarily dependent on the concentration of these ions [61].It mostly appears on all kinds of internal metal inhomogeneities (non-metallic inclusions, discharge, deformations) and external (edges, scratches, dents, residual scale, deposits, etc.).In cases where the metal undergoing corrosion is iron (the main component of steel), the role of the metal causing corrosion is fulfilled by carbon present in the steel in the form of graphite grains or iron carbide [62,63].

Conclusions
To protect pipelines, it is important to select an appropriate corrosion inhibitor to prevent pipeline deterioration.The use of inhibitors effectively slows down the corrosion process.Inhibitors can be divided into two groups: periodic use and continuous use.Inhibitors coat the steel pipeline with a protective layer, forming a so-called "film."The tested layer was 256.24 µm thick and had a rubber-like texture, was ductile, and adhered well to the steel surface.Tests on steel samples show that the inhibitor reduced the corrosion rate.Corrosion inhibitors used continuously, as well as periodically, meet the criteria for use in the oil and gas production industry [64,65].Their use results in the prevention of uniform corrosion by covering the pipeline with a coating that forms a protective layer, preventing the formation of pits and causing the passivation of existing ones.The use of inhibitors reduces the cost of replacing extraction pipes, transmission pipes and equipment in mines and reduces failures, increasing human and environmental safety.
Implementing corrosion monitoring to determine corrosion losses allows for early detection of the risk of failures and assessment of corrosion protection measures used to extend the operational lifespan of pipelines, installations and equipment [66][67][68].The use of ultrasonic measuring equipment allows for non-invasive thickness measurements, detection of hydrogen corrosion, thickness measurements through the coating and testing of the coating thickness itself, which makes it possible to assess the condition of pipelines, installations and equipment.
By conducting corrosion monitoring, we can create a database of information about the condition of pipelines that can be used by artificial intelligence models.This model can help identify high-risk pipelines and prioritize inspection and maintenance activities, leading to cost savings and improved safety [69,70].Monitoring and artificial intelligence can be used by individuals responsible for pipeline management to prevent pipeline damage, reduce environmental impact and efficiently utilize resources.
There are many experienced corrosion specialists, using innovative and proven technologies, who can effectively counter corrosion.It is important to monitor the progress of corrosion and engage in research and development activities aimed at further reducing the effects of corrosion that impact the safety of people, property and the environment.

Figure 1 .
Figure 1.Pipe fragments illustrating general and pi ing corrosion.

Figure 3 .
Figure 3. Corrosion monitoring system using a probe and ultrasonic waves.

Figure 4 .
Figure 4. Corrosion areas in the I-1 well zone.

Figure 5 .
Figure 5.A segment of an elbow from the I-1 well zone with visible pi ing and general corrosion.

Figure 6 .
Figure 6.Topography of the surface of the pipe segment in the form of flakes where the mercury content is 33.7%.

Figure 7 .
Figure 7. Microstructure of the steel substrate and scale of the sample (magnification 250×).Visible fine-grained pearlite-ferrite structure in the substrate and numerous signs of deep pi ing corrosion.

Figure 8 .
Figure 8.The layer of corrosion products adheres to the metal substrate.

Figure 9 .
Figure 9. Probe readings at site I during the test without an inhibitor (background).

Figure 10 .
Figure 10.Probe readings at site I during inhibitor dosing (test).

Figure 11 .
Figure 11.Segment of the extraction pipe using a corrosion inhibitor, with the location of the protective layer thickness test marked.

Figure 12 .
Figure 12.An image from a scanning electron microscope of the surface of corrosion products and the corrosion inhibitor layer.

Figure 14 .
Figure 14.Image of inhibitor layer A.

Figure 15 .
Figure 15.Metal substrate without the inhibitor.

Author Contributions:
Conceptualization, D.B.; formal analysis, D.B.; resources, D.B.; writingoriginal draft preparation, D.B.; writing-review and editing, D.B. and T.S.All authors have read and agreed to the published version of the manuscript.

Table 1 .
Composition of formation water from the I-1 well in the mine in the Polish Lowlands.

Table 2 .
Contents (weight percentages) of elements in steel and the examined corrosion layers marked in Figure5.

Table 3 .
Calculations of gas flow velocity using the PVTsim program module.

Table 4 .
List of probe readings during the corrosion inhibitor test.