Predict CO2 corrosion and the wall a flowline needs

A wet carbon-steel flowline at 1,000 psia and 140 °F with 2 mol% CO₂: the CO₂ partial pressure, the de Waard–Milliams bare-steel corrosion rate, the rate behind an inhibitor from 80 to 98 % efficient, and the wall it eats over a 20-year life.

Open in the workbench

Engineering use cases UC-FA-003 (Assess CO2 Corrosion Risk) and UC-FA-006 (Design Corrosion Mitigation Strategy).

The de Waard–Milliams (1975) correlation: log₁₀ CR = 5.8 − 1710 / T + 0.67 log₁₀ pCO₂, with CR in mm/yr, T in K and pCO₂ in bar, for bare steel with no protective scale, 20–80 °C and 0.1–10 bar. An inhibitor of efficiency e leaves CR (1 − e), and the corrosion allowance is the rate times the design life. The severity bands are NACE SP0775's.

What an engineer learns from it: 2 % CO₂ at 1,000 psia is 20 psi (1.38 bar) of CO₂, and at 140 °F bare steel loses 5.8 mm/yr, 227 mpy: a line of normal wall would not last two years. A 90 % inhibitor brings it to 0.58 mm/yr, still severe, and 11.5 mm over 20 years, far beyond the usual 3–6 mm allowance. Only at 98 % efficiency, which needs the inhibitor injected nearly all the time, does the loss fall to 2.3 mm. That is the arithmetic behind choosing a corrosion-resistant alloy, or 13Cr tubing, for a hot, CO₂-rich line rather than relying on chemicals. The rate roughly doubles every 35 °F and rises as pCO₂^0.67.

Units: psia, psi, °F, mm/yr, mpy, mm, years. The 1975 form has no scale, pH, flow or glycol factor: above about 140–160 °F an iron carbonate scale slows real corrosion, so the hot end of the chart is pessimistic, and the 1991 and 1993 de Waard models or NORSOK M-506 are the design-grade checks. H₂S (sour service) is not covered.

Source

using System;
using System.Linq;
using Team76.Engineering.FA;

public class S : ICalcScript
{
    public ScriptResult Run(ICalcContext ctx)
    {
        // A wet carbon-steel flowline at 1,000 psia and 140 °F carrying a vapour with 2 mol% CO2, 20-year design life.
        const double pressure = 1000;   // psia
        const double temperature = 140; // °F
        const double co2 = 0.02;        // mole fraction
        const double life = 20;         // years

        double partial = Corrosion.Co2PartialPressure(pressure, co2);       // psi
        double bare = Corrosion.Co2RateDeWaard(temperature, partial);       // de Waard-Milliams (1975), mm/yr
        double inhibited = Corrosion.InhibitedRate(bare, 0.90);             // a 90 % efficient film-forming inhibitor
        double allowance = Corrosion.CorrosionAllowance(inhibited, life);   // mm over the design life

        // The bare-steel rate from 68 to 176 °F (the correlation's range) at three CO2 partial pressures.
        var temperatures = new[] { 68.0, 86, 104, 122, 140, 158, 176 };
        var partials = new[] { 5.0, 20, 60 };
        var series = partials.Select(p => new ScriptSeries($"{(int)p} psi CO2", temperatures,
            temperatures.Select(t => Math.Round(Corrosion.Co2RateDeWaard(t, p), 3)).ToArray())).ToArray();
        var efficiencies = new[] { 0.0, 0.80, 0.90, 0.95, 0.98 };
        var rows = efficiencies.Select(e =>
        {
            double rate = Corrosion.InhibitedRate(bare, e);
            return new object[] { e * 100, Math.Round(rate, 3), Math.Round(Corrosion.ToMpy(rate), 1), Math.Round(Corrosion.CorrosionAllowance(rate, life), 1), Corrosion.SeverityClassification(rate) };
        }).ToList();

        return ctx.Result()
            .Set("Bare-steel CO2 corrosion rate", new ScriptChart(series, title: "de Waard-Milliams (1975)", xLabel: "Temperature (°F)", yLabel: "Corrosion rate (mm/yr)", yLog: true))
            .Set("Inhibitor efficiency", new ScriptTable(["Efficiency (%)", "Rate (mm/yr)", "Rate (mpy)", "20-year loss (mm)", "Severity"], rows))
            .Set("CO2 partial pressure (psi)", Math.Round(partial, 2))
            .Set("Bare-steel rate (mm/yr)", Math.Round(bare, 3))
            .Set("Bare-steel rate (mpy)", Math.Round(Corrosion.ToMpy(bare), 1))
            .Set("Severity, bare steel", Corrosion.SeverityClassification(bare))
            .Set("Inhibited rate (mm/yr)", Math.Round(inhibited, 3))
            .Set("20-year wall loss, inhibited (mm)", Math.Round(allowance, 1));
    }
}