Artificial Neural Network and Gaussian Process Regression approach in Mechanistic Modeling of Wax-Mediated CO₂ Corrosion in Oil Pipelines

Internal CO2 corrosion and paraffin wax deposition are two of the most operationally significant challenges facing crude oil pipeline infrastructure in the Niger Delta and globally. While wax deposition is conventionally regarded as a flow assurance problem, its role as a natural corrosion inhibitor forming a protective physisorbed film on the inner pipe wall has received limited quantitative attention, particularly in the context of data-driven predictive modelling. This study presents an integrated experimental, mathematical, and machine learning framework to model the concentration effect of wax deposition on CO2 corrosion rate in a Niger Delta waxy crude oil pipeline at a fixed flow rate of 10.21 L/min across five temperature conditions (15–35°C). A customized flow loop system was fabricated and corrosion rates were measured using the linear polarization resistance (LPR) technique at six-time intervals over 18 minutes. A MATLAB mathematical model based on eigenfunction expansion of the wax concentration equation provided a deterministic simulation baseline. Two machine learning models, feedforward Artificial Neural Network (ANN) and Gaussian Process Regression (GPR) were trained and validated against experimental measurements. The ANN achieved R² = 0.973, RMSE = 0.0412 mpy, and MAE = 0.0334 mpy, while GPR achieved R² = 0.961, RMSE = 0.0498 mpy, and MAE = 0.0401 mpy, both substantially outperforming the classical MATLAB model (R² = 0.847). Critically, the GPR model provided posterior uncertainty quantification revealing that prediction confidence is governed primarily by the consistency of experimental data across the temperature domain rather than temporal behaviour, with highest uncertainty concentrated in the 20–30°C range where wax film behaviour is most physically erratic. Results confirm that paraffin wax deposition reduced corrosion rate by up to 77.9% at 15°C over 18 minutes, with inhibition efficiency ranking as 15°C > 20°C > 35°C > 25°C > 30°C. This study demonstrated that GPR as a machine learning algorithm offered a robust and interpretable framework for corrosion rate prediction in thermally sensitive, waxy crude pipeline systems where deterministic models are insufficient.

Keywords: Wax; MATLAB; CO2 Corrosion; ANN; Uncertainty; GPR; Machine Learning; Pipeline