Corrosion & Scaling Monitor¶
The Corrosion & Scaling Monitor (CSM) evaluates corrosion and scaling risks in pipes, heat exchangers, and metallic equipment from an aqueous DWSIM material stream. It is a unit operation extension: it is attached to a Pipe Segment, a Heat Exchanger or an Advanced Shell-and-Tube Heat Exchanger through Tools \(\rightarrow\) Unit Operation Extension Manager, and it runs each time the host unit operation is calculated. It reads the host’s inlet stream and its calculated temperature, pressure and velocity profiles, and it leaves every stream unchanged. Results are written as extra properties of the host unit operation (keys starting with CSA_) and as a Markdown report in CSA_MarkdownReport, which opens in the Markdown Report Viewer.
The calculation is organised in four sequential modules: (1) ionic speciation; (2) corrosion rates; (3) scaling indices; (4) remaining useful life and inhibitor dosing.
Ionic Speciation¶
Ionic speciation determines the concentrations and activities of ions in solution from the analytical (total) composition of the stream (total carbon, sulfide, sulfate and metal cation concentrations) and the operating conditions \(T\) and \(P\).
Ionic Strength¶
The ionic strength \(I\) (mol kg\(^{-1}\)) is calculated as:
where \(m_i\) is the molality of ion \(i\) (mol kg\(^{-1}\)) and \(z_i\) is its charge number.
Activity Coefficients¶
The Extended Debye–Hückel model (EDHE) is used with individual ionic size parameters \(a_i\) :
The Debye–Hückel parameters \(A\) and \(B\) vary with temperature according to the correlations of :
where \(T\) is temperature in kelvin. For ionic strengths above 0.5 mol kg\(^{-1}\), the Davies model is used as an alternative:
Equilibrium Constants¶
All equilibrium constants are corrected for temperature. The water ionization constant follows :
For the carbonate system, the first and second dissociation constants of carbonic acid are:
and for the sulfide system :
Solution Procedure¶
The electrical charge balance of the solution is:
The pH is determined iteratively by Newton–Raphson until \(|\Delta\mathrm{pH}| < 10^{-8}\) and \(|\Delta I| < 10^{-6}\), recomputing activity coefficients at each iteration. The activity of each species is then:
Table 58 lists the ionic size parameters \(a_i\) and charges \(z_i\) used in the EDHE model.
| Ion | Formula | \(z_i\) | \(a_i\) (Å) |
|---|---|---|---|
| Hydrogen | H\(^{+}\) | 1 | 9.0 |
| Hydroxide | OH\(^{-}\) | -1 | 3.5 |
| Calcium | Ca\(^{2+}\) | 2 | 6.0 |
| Magnesium | Mg\(^{2+}\) | 2 | 8.0 |
| Barium | Ba\(^{2+}\) | 2 | 5.0 |
| Strontium | Sr\(^{2+}\) | 2 | 5.0 |
| Iron(II) | Fe\(^{2+}\) | 2 | 6.0 |
| Iron(III) | Fe\(^{3+}\) | 3 | 9.0 |
| Sodium | Na\(^{+}\) | 1 | 4.0 |
| Potassium | K\(^{+}\) | 1 | 3.0 |
| Chloride | Cl\(^{-}\) | -1 | 3.0 |
| Sulfate | SO\(_{4}^{2-}\) | -2 | 4.0 |
| Bicarbonate | HCO\(_{3}^{-}\) | -1 | 4.0 |
| Carbonate | CO\(_{3}^{2-}\) | -2 | 4.5 |
| Bisulfide | HS\(^{-}\) | -1 | 3.5 |
| Sulfide | S\(^{2-}\) | -2 | 5.0 |
Ionic parameters for the Extended Debye–Hückel model .
Corrosion Rate Models¶
Three corrosion mechanisms are evaluated independently. The total corrosion rate is conservatively estimated as the sum of individual contributions:
Risk is classified according to the thresholds of NACE SP0775 (Table 59).
| Classification | \(\mathrm{CR}_{\mathrm{total}}\) (mm/yr) |
|---|---|
| Negligible | \(<0.025\) |
| Low | \(0.025\)–\(0.1\) |
| Moderate | \(0.1\)–\(0.25\) |
| High | \(0.25\)–\(1.0\) |
| Severe | \(>1.0\) |
Corrosion risk classification .
CO\(_{2}\) Corrosion: de Waard & Milliams Model¶
The CO\(_{2}\) corrosion rate is calculated using the de Waard & Milliams model , extensively validated for oil and gas systems:
where \(T\) is temperature in kelvin and \(p_{\mathrm{CO_{2}}}\) is the CO\(_{2}\) partial pressure in bar. This is the equation behind the de Waard–Milliams nomogram. The result is in mm/yr for bare carbon steel at the reference condition (\(\mathrm{pH} \approx 3.8\), no protective film).
The corrected rate is:
Temperature factor \(f_{T}\): above approximately 60 °C a precipitated FeCO\(_{3}\) layer becomes protective, reducing the corrosion rate. Values are based on NORSOK M-506 (Table 60).
| Temperature (°C) | \(f_{T}\) |
|---|---|
| \(<60\) | 1.00 |
| 60–80 | 0.80 |
| 80–100 | 0.60 |
| 100–120 | 0.30 |
| \(>120\) | 0.15 |
Temperature factor \(f_{T}\) for CO\(_{2}\) corrosion .
pH factor \(f_{\mathrm{pH}}\): correction relative to the reference pH of a CO\(_{2}\)-only solution (no added alkalinity):
The upper limit of 10 prevents pH from reducing the rate by more than one order of magnitude below the reference.
Mass-transfer factor \(f_{m}\): the reaction at the steel surface and the transport of dissolved CO\(_{2}\) to the wall act as resistances in series :
where \(V_{r} = \mathrm{CR}_{\mathrm{base}}\,f_{\mathrm{pH}}\) is the reaction-controlled rate (mm/yr), \(V_{m}\) is the mass-transfer-limited rate (mm/yr), \(U\) is the liquid velocity (m s\(^{-1}\)), \(d\) is the internal diameter (m) and \(p_{\mathrm{CO_{2}}}\) is in bar. The factor approaches 1 when mass transfer is fast (\(V_{m} \gg V_{r}\)) and falls as the flow slows. When no velocity is available the factor is 1.
Material factor \(f_{\mathrm{mat}}\): corrosion-resistant alloys exhibit substantially lower rates than carbon steel (Table 61).
| Material | \(f_{\mathrm{mat}}\) |
|---|---|
| Carbon steel (API 5L X52/X65) | 1.000 |
| 13% Cr martensitic alloy steel | 0.050 |
| Duplex stainless steel 2205 | 0.010 |
| Inconel 625 | 0.001 |
| Titanium Gr. 2 | 0.000 |
Material factor \(f_{\mathrm{mat}}\) for CO\(_{2}\) corrosion.
Dissolved O\(_{2}\) Corrosion¶
Oxygen corrosion is controlled by the cathodic limiting current for O\(_{2}\) reduction:
where \(F = 96485\) C mol\(^{-1}\), \(k_{m,\mathrm{O_{2}}}\) is the O\(_{2}\) mass-transfer coefficient (m s\(^{-1}\)), and \([\mathrm{O_{2}}]\) is the molar concentration (mol L\(^{-1}\)). Conversion to corrosion rate (NACE RP0176 factor for iron, \(n=2\)):
The chloride factor accounts for passive film breakdown:
H\(_{2}\)S Corrosion and SSC Assessment¶
The uniform H\(_{2}\)S corrosion rate follows :
where \(p_{\mathrm{H_{2}S}}\) is in kPa and:
with \(v\) the fluid velocity in m s\(^{-1}\).
Sulfide Stress Cracking (SSC) assessment follows NACE MR0175 / ISO 15156 . The severity index is:
SSC risk is flagged when IS \(>0\), \(p_{\mathrm{H_{2}S}} \geq 0.3\) kPa, hardness exceeds 250 HB (22 HRC) or working stress exceeds 450 MPa, and the material is susceptible (carbon steel or 13% Cr).
Scaling Indices¶
The general saturation index \(\mathrm{SI}_{i}\) for mineral species \(i\) is:
where \(Q_{i}\) is the ionic product computed from ionic activities and \(K_{\mathrm{sp},i}(T)\) is the solubility product. \(\mathrm{SI} > 0\) indicates supersaturation (precipitation risk); \(\mathrm{SI} < 0\) indicates undersaturation.
Solubility Products¶
Temperature-dependent \(K_{\mathrm{sp}}\) values are given in Table 62.
| Mineral | Formula | \(\log_{10}K_{\mathrm{sp}}(T)\) |
|---|---|---|
| Calcite | CaCO\(_{3}\) | \(-171.91 - 0.0780\,T + 2839.3/T + 71.60\log_{10}T\) |
| Gypsum | CaSO\(_{4}{\cdot}2\)H\(_{2}\)O | \(-4.481 + 9.516\times10^{-3}T_{C} - 1.077\times10^{-4}T_{C}^{2}\) |
| Anhydrite | CaSO\(_{4}\) | \(-4.268 - 1.869\times10^{-3}T_{C} + 2.577\times10^{-7}T_{C}^{2}\) |
| Barite | BaSO\(_{4}\) | \(-9.90 - 1.24\times10^{-2}T_{C} + 5.9\times10^{-5}T_{C}^{2}\) |
| Celestite | SrSO\(_{4}\) | \(-6.63 - 6.7\times10^{-3}T_{C}\) |
| Siderite | FeCO\(_{3}\) | \(-10.89 + 3.0\times10^{-3}(T-298.15)\) |
| Mackinawite | FeS | \(-3.60 - 8.0\times10^{-3}(T-298.15)\) |
Solubility product correlations for the main mineral phases.
\(T\) in kelvin; \(T_{C} = T - 273.15\) in °C.
Langelier Saturation Index (LSI)¶
The LSI quantifies the CaCO\(_{3}\) precipitation tendency:
LSI \(> 0\): scale-forming; LSI \(< 0\): corrosive (undersaturated).
Ryznar Stability Index (RSI)¶
The RSI provides better field correlation than LSI:
Interpretation is given in Table 63.
| RSI | Tendency |
|---|---|
| \(<4.5\) | Severe scaling |
| 4.5–5.5 | Heavy scaling |
| 5.5–6.5 | Some scaling |
| 6.5–7.0 | Stable / slight scaling tendency |
| 7.0–8.0 | Stable / slightly corrosive |
| 8.0–9.0 | Corrosive |
| \(>9.0\) | Highly corrosive |
Interpretation of the Ryznar Stability Index .
Stiff–Davis Index (SDI)¶
For high-ionic-strength solutions (\(I > 0.5\) mol kg\(^{-1}\), e.g. seawater and produced brines), the SDI corrects for the salinity effect on calcite solubility:
Remaining Useful Life¶
The Remaining Useful Life (RUL) analysis follows API570 and API 579-1 / ASME FFS-1 .
Retirement Thickness¶
The minimum required thickness per ASME B31.3 §304.1.2 is:
where \(P\) is design pressure (MPa), \(D\) outside diameter (mm), \(S\) allowable stress (MPa), \(E\) weld joint efficiency, and \(Y = 0.4\) for carbon/alloy steel below 482 °C. The retirement thickness is \(t_{\mathrm{ret}} = \max(t_{\min}, t_{\mathrm{req}})\).
Design Corrosion Rate¶
The design rate is the more conservative of the mechanistic model and the inspection-derived rate:
RUL Calculation (API 570 Eq. 6.1)¶
The estimated current thickness is:
and the remaining useful life:
The projected life is capped at 100 years, since a corrosion rate close to zero gives an unbounded value.
Component Basis in the Extension Run¶
When the monitor runs as an extension, the remaining life is evaluated where the corrosion rate is highest: the pipe section with the highest rate, or the exchanger segment with the highest rate. The wall is taken as new at its nominal thickness, since the flowsheet carries no inspection history, and the design pressure is the inlet pressure of the pipe or of the exchanger’s process side. For a pipe, \(t_{\min}\) is a structural minimum by pipe size (1.8 mm up to NPS 2, 2.0 mm for NPS 3, 2.3 mm for NPS 4, 2.8 mm for NPS 6 to 18 and 3.1 mm above), limited to half the nominal wall. For an exchanger tube, \(t_{\min}\) is 60 % of the nominal wall, which corresponds to the usual plugging criterion of 40 % wall loss. When the exchanger has no shell-and-tube geometry, a 19.05 mm \(\times\) 2.11 mm tube is assumed.
MAWP and Inspection Interval¶
The Maximum Allowable Working Pressure at the current thickness (ASME B31.3) is:
If \(\mathrm{MAWP} < P_{\mathrm{design}}\), a de-rating alert is generated.
The inspection interval is set to the lesser of the risk-category maximum and half the RUL :
| Corrosion risk | \(t_{\mathrm{max,cat}}\) (years) |
|---|---|
| Negligible | 15 |
| Low | 10 |
| Moderate | 5 |
| High | 2 |
| Severe | 1 |
Maximum inspection intervals by risk category .
Chemical Inhibitor Dosing¶
In the extension run, the corrosion inhibitor is sized at the point with the highest corrosion rate and the scale inhibitors at the point with the highest LSI. The injection volumes use the liquid volumetric flow of the host’s inlet stream, with the default targets of Table 66.
Corrosion Inhibitor¶
The inhibition efficiency of film-forming amines and phosphates follows the Langmuir adsorption model :
Parameters by inhibitor family are listed in Table 65.
| Type | Application | \(k_{\mathrm{ads}}^{0}\) (L mg\(^{-1}\)) | \(E_{a}\) (K) |
|---|---|---|---|
| Imidazoline + amide | CO\(_{2}\) | 0.060 | 1200 |
| Quaternary imidazoline | CO\(_{2}\)/H\(_{2}\)S | 0.055 | 1500 |
| Zinc salt + phosphate | O\(_{2}\) | 0.040 | — |
| Zinc phosphate film-former | General | 0.050 | — |
Adsorption parameters for the main corrosion inhibitor families .
The required dose and daily product volume are:
where \(Q\) is the fluid flow rate (m\(^{3}\) day\(^{-1}\)) and \(\chi_{\mathrm{active}}\) is the mass fraction of active ingredient in the commercial product.
Scale Inhibitors: Threshold Model¶
Threshold inhibition relies on sub-stoichiometric phosphonate or polymer concentrations to block crystal growth . The threshold dose for CaCO\(_{3}\) is:
where \(c\) is in mg L\(^{-1}\) and \(A = 0.8\) for HEDP (LSI \(< 1.5\)) or \(A = 1.8\) for DTPMP (LSI \(\geq 1.5\)).
For BaSO\(_{4}\) :
When \(\mathrm{SI}_{\mathrm{Barite}} > 2.0\), threshold inhibition alone may be insufficient; sulfate removal by nanofiltration or produced-water dilution should be evaluated.
For CaSO\(_{4}\) (gypsum / anhydrite), ATMP and polyacrylate blends are preferred:
The estimated daily chemical cost is:
where \(c_{\mathrm{unit}}\) is the unit product cost (USD L\(^{-1}\); default: 3.50 USD L\(^{-1}\)).
Incremental Analysis in Heat Exchangers¶
The temperature gradient along a heat exchanger alters local equilibrium constants, saturation indices, and corrosion rates. The CSM divides the exchanger into \(N\) segments (\(N = 20\) by default) with linear interpolation:
In each segment \(i\), speciation is recomputed at the local temperature while keeping the inlet analytical concentrations (no accumulated precipitation), and all corrosion and scaling modules are evaluated at the local wall temperature \(T_{\mathrm{wall},i}\).
The precipitation front is defined as the relative axial position \(x_{f}\) where the LSI crosses zero, indicating the onset of CaCO\(_{3}\) deposition along the tube bundle.
Configuration Parameters¶
All configurable parameters and their defaults are listed in Table 66. When the monitor runs as an extension, the geometry, velocity, pressure and flow come from the host unit operation (Sections 10.4 and 10.5) and the other entries keep their defaults.
| Parameter | Unit | Default | Description |
|---|---|---|---|
| Table 66 (continued) | |||
| Parameter | Unit | Default | Description |
| Continued on next page… | |||
| Internal diameter | m | 0.1016 | Internal pipe diameter |
| Fluid velocity | m s\(^{-1}\) | 1.0 | Mean flow velocity |
| \(p_{\mathrm{CO_{2}}}\) | bar | 0 | CO\(_{2}\) partial pressure (0 = compute) |
| \(p_{\mathrm{H_{2}S}}\) | kPa | 0 | H\(_{2}\)S partial pressure (0 = compute) |
| Dissolved O\(_{2}\) | ppb | 0 | Dissolved oxygen |
| Material | — | C. steel | Material grade |
| Working stress | MPa | 200 | Operating stress |
| Hardness | HB | 200 | Brinell hardness |
| Nominal thickness | mm | 9.53 | Nominal wall thickness |
| Minimum thickness | mm | 3.0 | Minimum allowable thickness |
| Outside diameter | mm | 114.3 | Outside diameter |
| Design pressure | MPa | 5.0 | Design pressure |
| Allowable stress | MPa | 138.0 | Material allowable stress |
| Last meas. thickness | mm | 0 | Last UT inspection thickness |
| Last measurement date | — | — | Date of last UT inspection |
| Previous thickness | mm | 0 | Previous inspection thickness |
| Previous meas. date | — | — | Date of previous inspection |
| Installation date | — | — | Component installation date |
| Fluid flow rate | m\(^{3}\) day\(^{-1}\) | 100 | Total volumetric flow rate |
| Target corr. rate | mm/yr | 0.10 | Corrosion rate target after inhibition |
| Target LSI | — | 0.0 | Langelier index target |
| Chemical cost | USD L\(^{-1}\) | 3.50 | Unit cost of chemical product |
Output Properties¶
After calculation, results are available as ExtraProperties of the host unit operation, accessible through the DWSIM object editor, the IronPython console, and the CAPE-OPEN API (Table 67). A pipe segment also carries per-section keys (CSA_Sec{n}_…) and per-increment profiles (CSA_Inc…); a heat exchanger carries the conditions of its worst corrosion and scaling segments (CSA_WorstCR_…, CSA_WorstLSI_…).
| Property | Unit | Description |
|---|---|---|
CSA_MaxCR_mmyr |
mm/yr | Highest total corrosion rate |
CSA_MaxLSI |
— | Highest Langelier Saturation Index |
CSA_MaxSI_Barite |
— | Highest barite saturation index |
CSA_MaxSI_Gypsum |
— | Highest gypsum saturation index |
CSA_HasSSCRisk |
— | 1 = SSC risk; 0 = no risk |
CSA_RUL_yr |
yr | Remaining useful life |
CSA_CurrentThickness_mm |
mm | Estimated current thickness |
CSA_RetirementThickness_mm |
mm | Retirement thickness |
CSA_MAWP_MPa |
MPa | MAWP at current thickness |
CSA_IntegrityStatus |
— | Integrity status (API 570) |
CSA_NextInspection |
— | Next inspection date |
CSA_CorrInhib_Dose_ppm |
ppm | Corrosion inhibitor dose |
CSA_ChemCost_USD_day |
USD/day | Daily chemical cost |
CSA_TreatmentStrategy |
— | Primary treatment strategy |
CSA_MarkdownReport |
— | Full report (Markdown) |
Main output properties of the Corrosion & Scaling Monitor.