How to Simulate Crude Oil and Condensate Supply to Refineries?

Refineries and refinery and gas processing facilities receive hydrocarbon feedstocks, including crude oil, unstable gas condensate, natural gas, and other streams, from multiple sources such as oil and gas fields, other processing plants, third-party suppliers, and LNG terminals. Depending on the configuration of the facility, feedstock deliveries may be performed via pipelines, rail transportation, marine terminals, or a combination of these modes, forming a complex petroleum supply chain.

Incoming feedstock streams may differ in volume, composition, and processing priorities. In addition, crude oil blending and feedstock blending can take place either upstream at production sites or within the refinery feedstock reception system itself. Therefore, when developing Digital Twin solutions for refinery planning and refinery feedstock management, it is essential to accurately reproduce not only the processing units but also the real-world feedstock supply configuration and material flow structure. This capability is particularly important for crude oil supply chain simulation, condensate supply simulation, and other oil and gas simulation applications.

Challenges in Modeling Refinery Feedstock Deliveries

  • Support for different planning horizont
    Crude oil, natural gas, and condensate delivery plans may be defined with different time resolutions, such as daily or monthly intervals. In addition, discrete planning data must be automatically loaded from external databases and converted into continuous material flows suitable for crude oil scheduling and refinery feedstock planning.
  • Flow smoothing between adjacent planning periods
    When monthly plans are used, smooth transitions between consecutive periods must be ensured without violating the total planned delivery volumes.
  • Support for multiple feedstock sources and blending schemes
    Feedstocks may originate from several sources and can be blended either upstream before reaching the refinery or within the feedstock reception system itself. Depending on the process configuration, material streams may be treated as either independent or combined, which adds complexity to crude oil blending and feedstock blending operations.
  • Consideration of capacity constraints and feedstock priorities
    The model must account for limitations of refinery reception and processing units and ensure preferential utilization of feedstock streams from the most important sources.
Addressing these challenges requires a specialized simulation library capable of accurately representing refinery feedstock planning, blending operations, and priority management while considering process constraints. Such capabilities are essential for crude oil supply chain simulation, refinery supply chain management, and Digital Twin applications.

Why Not Use AnyLogic Fluid Library Blocks?

The Fluid Source block from Fluid library palette provided by the AnyLogic Fluid Library does not include built-in support for loading feedstock delivery plans from databases. It also lacks mechanisms for flow smoothing, source grouping, and priority-based crude oil blending and feedstock blending.

In contrast, the Petroleum Refining Library (PRL) provides specialized components that significantly simplify the development of Digital Twin solutions for refinery feedstock reception systems. These capabilities support refinery feedstock planning, crude oil scheduling, and crude oil supply chain simulation, making the library particularly suitable for refinery planning and refinery supply chain management applications.

Solution Based on Petroleum Refining Library

The PRL provides a specialized Source component for modeling deliveries of crude oil, condensate, natural gas, and other hydrocarbon streams. Its key capabilities include:
  • Support for daily and monthly delivery plans;
  • Automatic loading of planning data from databases;
  • Conversion of discrete plans into continuous material flows;
  • Flow smoothing between adjacent planning periods;
  • Modeling of multiple feedstock sources;
  • Flexible crude oil blending configurations;
  • Feedstock prioritization and capacity constraints;
  • Support for Digital Twin applications.
These capabilities make PRL well suited for refinery feedstock planning, crude oil scheduling, crude oil supply chain simulation, condensate supply simulation, and refinery supply chain management applications.

Example of Refinery Feedstock Planning and Blending

Consider a refinery receiving crude oil from several oil fields:
- three light crude oil fields;
- one medium crude oil field;
- three heavy crude oil fields.
Production plans are defined for each field. Monthly plans are used for the light and heavy crude oil fields, while daily plans are specified for the medium crude oil field. Using the Source component of the PRL, these production plans can be stored in a database and automatically loaded when the simulation model starts.
This approach enables realistic refinery feedstock planning by converting discrete production plans into continuous material flows. As a result, the model can be used for crude oil supply chain simulation, crude oil scheduling, and Digital Twin applications in refinery planning and refinery feedstock management.

After loading the data, each Source component contains a group of oil fields defined in the database. In the example considered, the light crude oil streams from the three fields in Group 1 (oil fields 1, 2, 3) are combined into a single stream immediately after leaving the fields. In contrast, the heavy crude oil streams from the three fields in Group 3 (oil fields 4, 5, 6) are transported to the refinery through three independent pipelines and are blended only before entering the processing units.
This approach provides flexible configuration of crude oil blending and feedstock blending schemes and enables realistic representation of the refinery feedstock reception system. These capabilities support Digital Twin applications and enable realistic refinery planning and supply chain optimization studies.
Let us examine the smoothing mechanism. The chart shows the flow rate of crude oil supplied from oil and gas field 1 in group 1. During the last six days of the month, the flow rate gradually transitions to the planned value of the next month, preventing abrupt changes at period boundaries.
Despite these temporary changes in instantaneous flow rates, the total monthly delivery volume remains fully consistent with the values specified in the database. This capability improves the accuracy of Digital Twin models and provides a more realistic representation of feedstock reception processes for refinery planning, production planning, and supply chain optimization.
6-day smoothing at 6-hour intervals
When the throughput of primary processing units becomes constrained, the PRL allows priorities to be assigned to individual feedstock sources. For light crude oil streams, prioritization is implemented by adjusting the maximum flow rates. In the example considered, capacity limitations can be applied selectively to Group 1, Group 2, or Group 3 oil fields. This approach makes it possible to maximize the utilization of the most important feedstock sources and evaluate different refinery loading strategies.
Such functionality is particularly valuable for refinery feedstock management, refinery planning, and crude oil scheduling. It also supports scenario analysis and enables more realistic crude oil supply chain simulation and refinery supply chain management studies.

Priority-Based Feedstock Blending

A more flexible feedstock prioritization mechanism is implemented in the lower part of the model. The MixerLight component of the PRL performs priority-based feedstock blending. In the fixed-limit merge mode, feedstock is accepted sequentially according to source priority.

In the example considered, the maximum available volume is first supplied from Field 6. If this volume is insufficient, the deficit is compensated by Field 5 and, if necessary, by Field 4. Such an approach makes it possible to evaluate different feedstock acceptance strategies, analyze the utilization of primary processing units, and verify the feasibility of production plans under various supply scenarios.
As a result, the PRL enables the development of Digital Twin solutions for feedstock supply systems that accurately reproduce real-world blending schemes, refinery capacity constraints, and feedstock prioritization policies. These capabilities support refinery feedstock planning, crude oil supply chain simulation, refinery supply chain management, and scenario analysis applications.
A working version of this model (with sources) is also available on AnyLogic Cloud
PRL free to try version can be download here