Engineering notes Engineering

Neural network surrogates for pipeline systems: notes from my SLB talk

At the SLB User Meeting in Abu Dhabi I presented a small experiment: replacing repeated PIPESIM runs with a neural network trained on PIPESIM's own results. These are my notes from that talk, covering the problem, how the surrogate was built and trained, how it compared with the physics model, and where I think it can go.

The problem: re-running the physics, again and again

Physics-based simulations such as PIPESIM are accurate, but they are time consuming. On a project the Basis of Design changes often, and every change means another round of re-runs. That brings rework, room for manual errors, and schedule delays.

The idea: a surrogate model trained on PIPESIM

A surrogate model learns the relationship between a simulator's inputs and outputs, then answers new cases without solving the physics again. Here the surrogate is a neural network trained on PIPESIM results:

  • Synthetic training data was generated with a Python–PIPESIM integration, running the simulator across many cases automatically.
  • The dataset has 3,200 rows covering a wide range of operating scenarios.
  • The network learns weights that predict pipeline behaviour across that whole range.

Model architecture

The network is deliberately small: three inputs, three dense hidden layers, and five outputs that cover the quantities a flow assurance engineer checks first.

Surrogate network architecture Three inputs (flowrate, GOR, distance) feed three dense hidden layers of 64, 64 and 32 neurons, which produce five outputs: pressure, temperature, liquid holdup, gas velocity and erosional velocity ratio. Inputs Dense Dense Dense Outputs 64 64 32 Flowrate GOR Distance ⋮⋮⋮ Pressure Temperature Liquid holdup Gas velocity EVR
Figure 1. Three inputs, three dense hidden layers (64, 64 and 32 neurons) and five outputs. EVR is the erosional velocity ratio.
LayerSizeWhat it holds
Input3Flowrate, GOR, distance along the pipeline
Hidden 164Dense
Hidden 264Dense
Hidden 332Dense
Output5Pressure, temperature, liquid holdup, gas velocity, erosional velocity ratio

Training

The model was trained for 100 epochs with a batch size of 32, holding back 20% of the data for validation. The loss is the mean squared error between PIPESIM's result and the surrogate's prediction:

MSE= 1n ∑i=1n (yi−y^i)2

where yi is the PIPESIM result and ŷi is the surrogate's prediction.

3,200training rows from PIPESIM
100epochs, batch size 32
0.0033final training loss (MSE)
0.0046final validation loss (MSE)
Learning curves over 100 epochs. Left: training and validation loss (MSE) drop from about 0.48 and 0.13 to near zero within roughly 10 epochs and stay flat. Right: training and validation mean absolute error fall from about 0.48 and 0.22 to around 0.02 to 0.03, tracking each other closely.
Figure 2. Training and validation loss (left) and mean absolute error (right) track each other closely, with no sign of overfitting.

The last three epochs from the training log:

Epoch 98/100
65/65 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - loss: 0.0042 - mae: 0.0316 - val_loss: 0.0050 - val_mae: 0.0280
Epoch 99/100
65/65 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - loss: 0.0021 - mae: 0.0217 - val_loss: 0.0059 - val_mae: 0.0242
Epoch 100/100
65/65 ━━━━━━━━━━━━━━━━━━━━ 0s 2ms/step - loss: 0.0033 - mae: 0.0257 - val_loss: 0.0046 - val_mae: 0.0267

The validation loss stays close to the training loss, which suggests the model generalises to cases it has not seen rather than memorising the training set.

Validation: surrogate vs PIPESIM

The real test is whether the surrogate reproduces the simulator. I cross-checked its predictions against raw PIPESIM results along the full length of the line, for all five outputs.

Five plots against horizontal distance from 0 to about 330,000 ft, each comparing the AI prediction (solid line) with PIPESIM (dashed). Pressure falls from about 220 to 115 psia, temperature from about 113 to 76 °F, liquid holdup from about 57 to 42, gas velocity rises from about 10 to 14 ft/s, and erosional velocity ratio rises from about 0.18 to 0.24. The two lines nearly overlap in every plot.
Figure 3. Surrogate predictions (solid) against PIPESIM (dashed) along the pipeline. The match is close for every output, with small deviations in pressure and erosional velocity ratio.

From model to tool

To make the surrogate usable I wrapped it in a small app: set the liquid flowrate, GOR and profile resolution, and it returns full distance-based profiles in milliseconds, with a CSV download of the predicted profile.

Pipeline Profile Surrogate app, Pressure and Temp tab. Inputs on the left: liquid flowrate 50,000 STB/d, GOR 257 scf/STB, 88 profile points, and a Download AI Profile (CSV) button. Charts show pressure falling from about 205 to 115 and temperature from about 113 to 76 along the line.
Figure 4. Pressure and temperature profiles.
Flow Dynamics tab at 50,000 STB/d and GOR 509: gas velocity rises from about 11 to 16 along the line, and liquid holdup falls from about 53 to 37.
Figure 5. Gas velocity and liquid holdup.
Erosion Risk tab at 50,000 STB/d and GOR 509: erosional velocity ratio rises gently from about 0.20 to 0.26, with a safety check message: maximum EVR is 0.26, within limits.
Figure 6. Erosional velocity ratio with an automatic safety check.

What the surrogate brings:

  • Speed: millisecond responses, against minutes for a physics engine.
  • Efficiency: the effort is front-loaded once to create a model that stays useful.
  • Scalability: ready for any scenario inside the trained design envelope.

Where this could go

  • Natural-language queries: use an LLM to ask the surrogate questions in plain language.
  • Real-time alerts: monitor operations continuously and alert operators faster than a physics model could.
  • Agentic workflows: a model that keeps comparing real-time data with expected behaviour and works out the reasons for any inconsistency.

Challenges

  • Generating the training data takes an initial investment of time.
  • It needs both data science and flow assurance knowledge.
  • More complex models need more data and more training power.
  • Validation and quality checks have to be stringent before anyone relies on the results.

The trade is deliberate: front-load the computing and the effort, to save time and reduce the impact of changes in later project stages.

All notes
Back to top