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.
| Layer | Size | What it holds |
|---|---|---|
| Input | 3 | Flowrate, GOR, distance along the pipeline |
| Hidden 1 | 64 | Dense |
| Hidden 2 | 64 | Dense |
| Hidden 3 | 32 | Dense |
| Output | 5 | Pressure, 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:
where yi is the PIPESIM result and ŷi is the surrogate's prediction.
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.
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.
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.