Digital Twin for Capacity Analysis of an Oil Pipeline Terminal

by Martin M. Franklin, Kevin R. Hanson

As presented at the 2019 Winter Simulation Conference


Modeling and simulation was key in solving a prominent problem in the oil and gas industry; how to mitigate disruption from stoppages in a single pipeline and keeping customers supplied with minimal interruptions required for sustaining high service levels. The client commenced various expansion projects to add storage capacity to an existing pumping station. Concern was raised about future demand exceeding capacity. The client was interested in identifying the optimal number, size, and arrangement of the tankage at the new terminal in order to obtain the most cost efficient use of capital towards operational gains for their end customer. Benefits of the new terminal were expected to include improvements in the ability to receive mainline inputs to the terminal despite variability in sending batches to end customers, and conversely in the event of upstream upsets, providing consistency and predictability of batch deliveries to their end customers.


The client owned and operated an oil pipeline system in Canada and the United States and as part of a pipeline capacity expansion business case was evaluating inline storage requirements. A series of different configurations and sizes of storage tanks needed to be considered and analyzed, and by employing advanced modeling and simulation, informed decision making was made possible and recognized as best practice. More specifically, a model that considered various mainline batch sequenced inputs and outputs in a first in – first out manner (FIFO), scheduled maintenance, and random service slowdowns or failure events either upstream or downstream of the terminal was desired.

This paper and accompanying presentation provides an overview of the system being modeled, demonstration of the model as developed, and shares some of the best practices and approaches applied in representing the digital twin of the terminal.

Problem Statement

The objective of this simulation study was to evaluate the performance of a proposed future state in-line terminal. A buffering capacity analysis was required to determine if the proposed tankage equipment would meet the future production delivery demands. Identification of capacity constraints, as well as financially feasible solutions for mitigating the impact of upstream and downstream upsets, were of interest. The simulation model also served as a digital twin, with which the client could test different batch scheduling loads and tank usage operating rules and methods.


The client’s preferred simulation software packages were not specified, but based on the short timeframe available, desire of the client to operate the model long-term, and based on the outcome of the initial functional design specification phase, Simio software was selected.

The initial functional design specification provided a detailed system description and identified the model and project assumptions for all stakeholders involved. Furthermore, the model inputs and outputs along with modeling approach were developed, reviewed, refined and approved early on as part of this specification phase, to ensure model development could be executed rapidly without unexpected delays.

MOSIMTEC implemented a combination of both discrete (batch) and continuous flow object logic to represent the products present within various stages along the pipeline and planned storage facility. System demand, or in this case product batches coming from upstream pipeline supply, were designed to be based on user-defined deterministic input schedules or random events. System infrastructure, i.e. tankage and connections, was designed to be configurable in terms of number deployed and related capacity.

The model was designed to allow for expected variability in flow rates at different nodes within the system, given planned and unplanned maintenance, as well as variability because of lateral selection and flow changes between batches. Model outputs visualized the current system status and highlighted system bottlenecks in terms of storage utilization and flow gridlock.

In order to support verification and validation as well as detailed cause and effect analysis, detailed logs were configured to report product flow events through the system as well as changes in the system status.


MOSIMTEC in collaboration with the client was able to both visualize and statistically analyze the planned terminal flow, and more specifically, quantify with a high degree of certainty the expected performance gains and impacts for different design and operating configurations. The dynamic simulation model was better able to represent the unique combination of events and resulting impacts, as opposed to traditional static calculations. More specifically, intermittent and random flow variability within the complex system, in terms of extent and time of event, would have been unable to be accurately represented in a static calculation.

The level of insight the model provided facilitated the depth of analysis required for fully justifying the increased capacity business case, such that the client was able to fully understand the terms under which both supply and delivery needed to operate within – given the engineering decisions they were ultimately making.

The client was able to use the model scenario analysis output to confidently move ahead with recommendations for tankage requirements and operating philosophies to achieve desired levels of service. The model also serves as a solid baseline for future purpose as a digital twin for integration in terms of operational decision support and risk mitigation.