Understanding Corrosion in Water Pipelines: A Guide for Pipeline Designers


The 6 Corrosive Components That Can Be Found in Crude Oil

By Raghvendra Gopal
Published: May 9, 2023
Key Takeaways

Some impurities often found in crude oil can cause corrosion in pipelines, vessels and refinery equipment. However, knowing what they are and how to mitigate them can help minimize corrosion. 

Crude oil, as a mixture of all sorts of hydrocarbons, is not corrosive. However, there are some impurities and components often found in crude oil that could cause corrosion in pipelines, vessels and refinery equipment such as atmospheric columns, overhead lines, exchangers and condensers. (More information about preventing corrosion in vessels can be found in the article Introduction to Managing Internal Corrosion in Process Vessels.)


In fact, sometimes the corrosivity of crude oil is so high that extraction and refining that oil in a cost-effective manner becomes impossible. Here we'll take a look at some of the corrosive substances that may be found in crude, and what can be done to mitigate their effects.

1. Brackish Water (Chlorides)

In most cases, brackish water containing chloride salts such as MgCl2, CaCl2 and NaCl is drawn from crude oil wells along with hydrocarbons. While brackish water is not as salty as seawater, it is saltier than fresh water. The concentration of these salts in the crude oil depends on the oil field from which the crude is extracted, but it is usually present within the range of 3 to 300 pounds per barrel. In heavy crude oils, this value tends to be higher.


During preheating, if the crude oil reaches temperatures of more than 248°F (120°C), these chloride salts break down to HCl. The chemical reaction for CaCl2 degradation can be seen here:

CaCl2 + H2O = CaO + 2 HCl

There is a similar reaction for MgCl2. However, NaCl is more stable and is therefore less easily hydrolyzed. By increasing the preheating temperature up to 716°F (380°C), most of the MgCl2 and CaCl2 salts will undergo hydrolysis.


HCl in a gaseous state isn't dangerous in terms of corrosion. However, when it cools down to temperatures lower than the dew point of water, it reacts with moisture (condensing water) to produce hydrochloric acid, which is an extremely corrosive substance. So, the presence of this so-called "sour acid" (H2S) in the system make corrosion more likely. Once HCl reacts with steel, it will react with iron chloride to reproduce HCl. This causes the ongoing corrosion of steel.

CaCl2 + H2O = CaO + 2 HCl


HCl + Fe = FeCl2 + H2

FeCl2 + H2S = FeS + 2 HCl

One of the ways to mitigate the effects of hydrochloric acid is by adding ammonium (NH3) as a basic material to neutralize HCl. Ammonium can react with HCl to form ammonium chloride (NH4Cl). This substance is highly hygroscopic and can even react with water vapor (steam). The water containing NH4Cl is very corrosive for copper-based alloys, such as brass and bronze. (Related reading: Beryllium Copper Alloys vs Steel: Which Metal Works Harder?)

In the other technique used to reduce this type of corrosion, the crude oil is rinsed with water and sent to a desalting vessel to remove brackish water. Despite all of this, a small concentration of remaining chloride salts in crude oil is enough to cause a failure in the upstream units.

2. Carbon Dioxide (CO2)

CO2 corrosion, also known as "sweet corrosion," is a common problem in oil and gas production and transportation facilities. That's because CO2 is one of the main corroding agents in oil and gas production systems. CO2 corrosion can appear in two principal forms:

  1. Pitting (a localized attack that results in rapid penetration and removal of metal in a small discrete area).
  2. Mesa attacks (a form of localized CO2 corrosion under medium-flow conditions).

While dry CO2 gas is not itself corrosive at the temperatures encountered within oil and gas production systems, it becomes corrosive when dissolved in an aqueous phase — through which it can promote an electrochemical reaction between steel and the contacting aqueous phase.

When mixed with water, CO2 forms carbonic acid (H2CO3), making the fluid acidic. The rate of this reaction depends on the temperature and partial pressure of CO2. Generally, when the partial pressure of CO2 is more than 0.5 bars (7 psi), sweet corrosion is expected. It should be mentioned that in some cases, the partial pressure of CO2 in crude oil is considerably more than 400 bars. CO2 corrosion is governed by temperature, increase in pH value, composition of the aqueous stream, the presence of non-aqueous phases, flow condition and metal characteristics and is by far the most observed form of attack encountered in oil and gas production.

Carbonic acid, which is a weak acid that keeps its pH nearly constant in an acidic region, attacks steel and creates iron carbonate, or siderite (FeCO3), as a corrosion product. Detecting the formation of iron carbonate on the surface of steel is one of the ways to recognize sweet corrosion. This corrosion product is usually considered to be a semi-protective layer that can prevent more corrosion. However, dissolved oxygen or high fluid velocity (more than 10 m/s) can remove this layer. In addition, localized corrosion could also occur beneath the corrosion product.

There are two key ways to eliminate or mitigate the sweet corrosion. The first is by adding inhibitors to crude oil. Replacing steel with stainless steels is another way that is becoming more common because adding inhibitors is typically more expensive. (Learn more in the article Why is Stainless Steel Corrosion Resistant?)

3. Phantom Chlorides (Organic Chlorides)

Organic chlorides are sometimes called "undesaltable chlorides" because it is impossible to remove them during the salt separation process in desalting vessels. They decompose into HCl in the preheating process and cause severe corrosion in either overhead or downstream units.

To avoid corrosion, the concentration of organic chlorides in crude oil should be less than 1 mg/L. Despite that, their concentration in most of the crude oils tends to range from 3 to 3,000 mg/L.

4. Organic Acids

Naphthenic acids are a sort of organic acids that can be present in crude oil and cause severe corrosion in certain circumstances. This kind of corrosion, known as naphthenic acid corrosion (NAC), usually occurs at temperatures between 446°F and 752°F (230°C and 400°C) and in the presence of a sufficient quantity of naphthenic acids in the crude oil.

Naphthenic acid corrosion generally happens in refinery distillation units such as furnace tubes, transfer lines, vacuum columns and side cut piping. NAC rarely happens in fluid catalytic units because the temperature at these units is more than 752°F (400°C), which can decompose naphthenic acids. Moreover, in hydrodesulfurizer units, the catalysts can decompose naphthenic acids and eliminate NAC.

Figure 1. A refinery crude oil distiller unit.

Figure 1. A refinery crude oil distiller unit. (Source: "Crude Distiller Unit 1" by terry joyce is licensed under CC BY-SA 2.0)

The proposed chemical formula of naphthenic acid is R(CH2)nCOOH, where R is one or more cyclopentane rings and n is more than 12. Their atomic mass unit is between 120 and 700. The following reaction shows the interaction between naphthenic acids and steel. The product of this reaction is hydrogen and a complex of iron-organic acid, which is soluble in crude oil.

Fe + 2 RCOOH = Fe (RCOO)2 + H2

In the presence of sulfides in crude oil, Fe (RCOO)2 reacts with H2S to create FeS according to following reaction:

Fe (RCOO)2 + H2S = FeS + 2 RCOOH

FeS is insoluble in water and oil and can form a protective layer on steel at low shear stress of fluid, therefore protecting it from further corrosion. As a result, the presence of sulfides in crude oil might decrease the rate of NAC, especially at low temperatures. On the other hand, the reproduced naphthenic acid keeps the corrosion happening.

NAC is considered to be a localized corrosion and is seen in areas where fluid velocity is high and organic acid vapors are present. The lack of corrosion product in the corroded area is another feature of NAC. Many high-resistance steels that are resistant to sulfur corrosion, including high chromium and even high molybdenum steels, could be susceptible to this kind of corrosion.

The concentration of naphthenic acids in crude oil is shown by the total acid number (TAN). TAN is defined as the amount of potassium hydroxide (in milligrams) needed to neutralize one gram of oil. A normal TAN value in crude oils varies in the range of 0.1 to 3.5 mg/gr. Despite that, higher values of TAN, such as 10 mg/g, have been reported in rare cases. TAN is not a constant characteristic in an oilfield, and can change over a period of time during the extraction of crude oil. It is believed that NAC occurs when TAN is more than 0.5 mg/g. However, in some cases, NAC has been reported for TAN values between 0.3–0.5 mg/g.

According to investigations, just 5% of the naphthenic acids present in crude oil are corrosive. In other words, two crude oils with equal TAN values do not necessarily have to show similar naphthenic acid corrosion behavior.

One of the most common ways to reduce NAC in crude oil refining systems is by blending a high TAN crude oil with a crude oil having low TAN. In this condition, the overall TAN value will be reduced to the immune range (less than 0.3 mg/g). The blending process for a new source of crude oil should be done with caution because, as mentioned in the above, adequate concentration of a certain kind of naphthenic acid in a crude oil with low TAN value can cause a high rate of NAC.

Injecting corrosion inhibitors into the crude oil stream is another method to decrease the naphthenic acid corrosion rate. In this case, the economic issues and effects of inhibitors on downstream processes should be considered. Since NAC occurs at high temperatures and iron sulfide deposits are not formed on the surface, traditional filming amine inhibitors are not suitable. Phosphorous and non-phosphorous containing inhibitors are very effective inhibitors to mitigate NAC. Although the phosphorous containing inhibitors have more inhibition efficiency, their effects on the poisoning of catalysts downstream have to be considered.

5. Sulfur

Crude oils usually contain sulfides that can cause corrosion at high temperatures. This is called "sulfidation". It is a well-known corrosion in different units in oil refineries. The amount of total sulfur in a crude oil depends on the type of oil field and it varies from 0.05% to 14%. Of course, sulfur values as low as 0.2% are enough to create sulfidation corrosion in plain steels and low alloy steels. These kinds of steels are often used in several parts of refinery units.

Most of the sulfurs in crude oil are in the form of organic molecules (such as mercaptan, alkyd sulfide, sulfoxide and thiophene), and trace amounts of them are elemental sulfur and hydrogen sulfide (H2S). But not all kinds of sulfur compounds are corrosive; only a fraction can react with metallic compounds to create sulfidation corrosion. These are called "active sulfur" and they include elemental sulfur, H2S and low-molecular mercaptan. Despite that, in the presence of H2 gas, most of the organic sulfides—which are categorized into inactive sulfides—decompose to H2S, an active sulfur that can lead to sulfidation. Therefore, sulfidation becomes more severe in the presence of hydrogen gas. H2 is used in hydrocracking and hydrofining units in oil refineries.

Sulfidation happens at temperatures higher than 446°F (230°C) and its rate accelerates when the temperature is raised to 896°F (480°C). At temperatures higher than 698°F (370°C), H2S decomposes into elemental sulfur, which is the most aggressive sulfur compound. In fact, the sulfidation rate reaches its maximum at around 752°F (400°C).

During sulfidation, a protective iron sulfide scale is formed on the surface of a substrate and reduces the corrosion rate. This scale is known as a diffusion barrier layer and its growth follows parabolic kinetics (d=kt½).

However, some factors can cause FeS malfunction. One of those factors is a high velocity of fluids, which can keep this protective scale separate from the metallic surface. The second factor is related to the presence of naphthenic acids in crude oil. As mentioned above, these acids can react with FeS to create soluble compounds. The third factor is related to hydrogen, which can penetrate into sulfide scale and create a porous iron sulfide scale.

The most common technique to control high temperature sulfidation is to select a suitable material that is resistant to sulfidation. One of the useful tools for selecting proper steel is using McConomy curves. These curves present a variation of sulfidation corrosion rate as a function of temperature and total sulfur content. McConomy curves show that the steels containing more chromium exhibit higher corrosion resistance against sulfidation. Moreover, the corrosion rate increases by increasing the sulfur content and temperature.

In the McConomy curves, the corrosion rate depends on the total sulfur content. However, only active sulfides (such as H2S) can cause sulfidation. In other words, McConomy curves overestimate high corrosion rates. Therefore, the corrosion rates in McConomy curves are decreased by a 2.5 factor, resulting in "Modified McConomy" curves.

Figure 2. Modified McConomy curves displaying the effect of temperature on sulfide corrosion rates of various metals.

Figure 2. Modified McConomy curves displaying the effect of temperature on sulfide corrosion rates of various metals.

The other drawback of McConomy curves is that the effects of fluid velocity and the presence of H2 gas have not been considered in McConomy curves. Therefore, the NACE T-8 committee on Refining Industry Corrosion has introduced the Couper-Gorman curves based on a series of experimental surveys. According to Couper-Gorman curves, iron sulfide is not thermodynamically stable and no sulfidation occurs at very low levels of H2S and temperatures above 519°F (315°C).

It should be noted that estimates achieved from either the McConomy or the Couper-Gorman curves are uniform corrosion rates or thickness loss, while the localized corrosion that usually happens and might occur at a higher rate is not considered when estimating the first leak or corrosion allowance.

6. Bacteria

Microbiologically influenced corrosion (MIC) is an extremely widespread kind of corrosion in oil and gas storage and transportation facilities. (For more information, see Testing For Microbiologically Influenced Corrosion in Pipelines.) Among different types of bacteria, sulfate reduction bacteria (SRB) are the most important kinds of microbes that have caused more than 75% of corrosion failures in oil-producing wells in the U.S. These anaerobic bacteria use sulfate as an acceptor to create sulfide according to the following reaction:

SO42- + H2 = H2S + H2O

Due to the metabolism process, SRB consume hydrogen that is produced by a cathodic reaction. Also, H2S is a by-product of SRB metabolism that can increase the corrosion rate by influencing on anodic reaction. In fact, SRB depolarizes both cathodic reactions and anodic reactions to raise the corrosion rate. It should be mentioned that at temperatures higher than 104°F (40°C), the activity of SRB usually stops. The best method to reduce MIC is by adding biocides.

Corrosion in the Oil and Gas Industry


The total annual cost of corrosion in the oil and gas production industry is over a billion dollars. This figure can be broken down into:

  • $589 million in surface pipeline and facility costs.
  • $463 million in downhole tubing expenses.
  • $320 million in capital expenditures related to corrosion.

It is well-recognized within the oil and gas industry that effective management of corrosion will contribute to cost reduction and compliance with safety, health and environmental policies.

Significant recoverable reserves of oil and gas are mainly concentrated in challenge locations, such as deep-water offshore locations, remote arctic locations and difficult-to-manage reservoirs with unconsolidated sands. Additionally, materials in many oil well encounter aggressive environments — i.e., those with high H2S and/or CO2 contents, high pressures and high temperatures.

Materials and corrosion control technologies used under such demanding conditions and locations must be highly reliable, as the associated costs are excessive for replacement in the event of failure.

The primary concerns for downhole tubulars from a corrosion point-of-view are environmental cracking and uniform or localized corrosion.


The oil and gas industry faces several corrosion-related problems during both refining and transportation.

For one, the aesthetic quality of water can be by affected by pipeline corrosion — which can subsequently cause harm to water heaters and induce premature failure. This can also lead to the failure of plumbing fixtures and systems, resulting in odors and stains.

Secondly, corrosion-induced material loss may lead to inefficient performance in compressed air systems, thereby necessitating the frequent replacement of piping accessories and the replacement of existing compressed air piping. This replacement is very costly.

On top of these issues, corrosion can cause pipes to change in appearance, leak, undergo pressure drop, waste energy and build up loose rust.

Corrosion Inhibitors for Gas, Oil and Water

Corrosion inhibitors are chemical compounds which are usually added to liquid or gas and help in decreasing the corrosion rate of the material.

Corrosion inhibitors work by preventing corrosive substances from coming into contact with the metal. Their effectiveness depends on the fluid composition and quantity of water.

The type and selection of corrosion inhibitor depends largely on the application in question.

Common corrosion inhibitors in the oil and gas industry include:

  • Volatile amines. These are mainly used to reduce the corrosive effect of acid in boilers.
  • Benzotriazole. This is useful in the case of copper surfaces.
  • Zinc phosphate.
  • Hydrogen sulfide. This is a popular corrosive inhibitor for oil refineries.

Corrosion Prevention Methods in the Oil and Gas Industry

Preventing corrosion damage can increase the life of equipment and increase the efficiency of operations. While some corrosion may be difficult to avoid, a whole range of techniques and materials have been developed that can prevent the chemical and electrical reactions that lead to corrosion.

Here are a few:


Painting is a standard way to prevent oxidation corrosion. Maintaining paint coatings on tanks, lines and other equipment is usually a part of regular maintenance. Some materials, such as galvanized steel, stainless steel and nickel-plated pipes need not be painted.

Coatings and Oil

Oil can somewhat protect the inside of pipelines from corrosion, provided it isn’t itself corrosive. Coatings on the inside of pipelines, and some types of tanks, can be used to prevent some types of corrosion. Scale buildup, which can happen as a result of minerals in groundwater, can also act as a lining to protect the insides of lines and tanks.

Insulating Flanges and Sacrificial Anodes

Insulating flanges are used in most cases to prevent the current flow that leads to electrochemical corrosion. Flanges are added to lines above ground-level near the well and the tank battery. Flanges insulate the pipelines, thereby preventing the flow of electricity.

Electrochemical corrosion is caused by a current which removes electrons from metal in one place and deposits them elsewhere. The loss of electrons subsequently leads to rusting, perforation and leakage. The current can either be the result of a natural force, like wind-producing static, or the result of poor grounding and an electrical leak.

A sacrificial anode can also be used to protect against electrochemical corrosion. (For more on electrochemical corrosion in the oil and gas industry, read: AC Induced Corrosion of Buried Pipelines.)


Some impurities often found in crude oil can cause corrosion in pipelines, vessels and refinery equipment. However, knowing what they are and how to mitigate them can help minimize corrosion.

Share This Article

  • Facebook
  • LinkedIn
  • Twitter

Written by Raghvendra Gopal | Founder & Director, Materials Info Consultancy Private Limited

Raghvendra Gopal

Raghvendra Gopal is a post graduate in Industrial Metallurgy from IIT Chennai, India. He holds a bachelor’s degree in Metallurgy from IIT Roorkee, India. Currently he is the owner of Materials Info Consultancy Private Limited in Pune, India, which is mainly involved in materials testing, failure analysis, new product development support, benchmarking and value engineering for the automotive, engineering and manufacturing sectors. Materials Info Consultancy works on corrosion related failures, investigation and simulations, and also works for developing a supplier base for various commodities including castings, forgings with compete inspection and testing as per end client requirements for domestic and international clients.

With over twenty five years of experience in the field of material selection for specific applications, failure analysis and light weight construction, working with engineering, automotive tier 1 and automotive OEMs, Raghvendra’s areas of interest include material selection and evaluation for specific applications, materials data generation, root cause failure analysis and selection of appropriate manufacturing processes.

Raghvendra was instrumental for a surface protection strategy and defining a corrosion warranty while working with an automotive OEM for various components, correlating corrosion life data obtained in the laboratory in comparison to field life.

Related Articles

Go back to top