Refinery Crude Oil Supply Chain Simulation

       Crude oil supply chain simulation is a core methodology used to analyze and optimize complex refinery logistics systems across upstream production, transportation networks, storage infrastructure, and downstream processing units. In modern oil and gas operations, refinery logistics require coordinated control of pipeline flows, tank farm inventories, and feedstock allocation to ensure stable and efficient production. By implementing a digital twin of the crude oil supply chain, operators can replicate real-world system behavior in a computational environment, enabling scenario analysis, bottleneck detection, and production planning optimization under dynamic operational constraints. During model validation, generated material flows can be verified using FlowDiscrepancy, a specialized agent of the Petroleum Refining Library designed to evaluate unaccepted material flow passing through the system and quantify the total flow discrepancy. It provides a quantitative measure of the material balance deviation, helping identify inconsistencies in flow generation, routing, or downstream capacity during simulation.
       Planning feedstock deliveries to refineries is a challenging task because hydrocarbon production plans must be aligned with downstream processing capabilities and the capacity constraints of process units and tank farms at the processing facility. Differences in the composition and quality of feedstock supplied from different oil and gas fields further complicate refinery planning and production planning. Learn why changing feedstock changes the feasible operating region.
       Production plan execution is evaluated using PlanCompletionStatus, which provides a standardized interpretation of plan completion and overcompletion. Learn how completion statuses are calculated in the Plan Completion Status article.
       Under these conditions, crude oil supply chain simulation plays an important role in analyzing delivery operations and the behavior of the entire supply network. By representing oil and gas fields, transportation infrastructure, and refineries as interconnected objects within a simulation model, engineers can identify bottlenecks, evaluate the consequences of operational decisions, perform what-if analysis, and address supply chain optimization problems. These optimization decisions are discussed in more detail in our article on Hybrid Simulation and Optimization for Petroleum Refinery Digital Twins. Operational decisions can be coordinated using a request-based production planning mechanism that synchronizes feedstock deliveries, storage, and refinery process units.
       This article discusses approaches to the crude oil supply chain simulation of feedstock deliveries to refineries involving crude oil, natural gas, and unstable gas condensate. It also describes the capabilities required to develop realistic refinery simulation models and support digital twin development for hydrocarbon feedstock supply systems. These capabilities are provided by the Petroleum Refining Library for AnyLogic.
In an integrated refinery supply chain model, monitoring feedstock output helps engineers evaluate production performance and identify changes that may affect downstream transportation, storage, and processing. See Source performance metrics in refinery simulation for the main statistics available for Source elements.
Typical structure of a feedstock supply chain used in crude oil supply chain simulation

Crude Oil Supply Chain Simulation in Refinery Logistics Networks

       Crude oil supply chain simulation is used to model the movement of hydrocarbons from upstream production fields through pipelines, storage terminals, and tank farms into refinery processing units. It enables scenario-based analysis of logistics constraints, capacity bottlenecks, and demand-driven allocation in integrated oil and gas systems. Dynamic feedstock supply conditions may also require runtime flow restrictions, which can be modeled using Source Control in Refinery Simulation.

Challenges of Feedstock Deliveries

       Modern refineries typically receive hydrocarbon feedstock from multiple oil and gas fields. Crude oil, natural gas, and unstable gas condensate are transported through a pipeline network and may pass through storage tanks and tank farms before entering processing facilities. However, configurations in which no upstream tank farm exists, or where buffer storage capacity is intentionally kept to a minimum, are frequently encountered in the oil and gas industry. Under these conditions, accurate planning and assessment of incoming feedstock volumes become essential for ensuring uninterrupted operation of the entire production chain.
       Differences in feedstock properties and processing capabilities further complicate refinery planning. Some units are designed only for light feedstocks, while others require heavy feedstocks or specific blending conditions. As a result, prioritizing feedstock flows from oil and gas fields becomes essential. Certain streams may be assigned higher processing priority because of upstream production constraints or their higher economic value. A typical example is unstable gas condensate, which is commonly co-produced with natural gas. Since gas and condensate production are physically coupled, restricting condensate acceptance can directly limit natural gas production, making such constraints unacceptable for many oil and gas operators. In addition, feedstocks containing higher concentrations of valuable hydrocarbons—including gasoline-, kerosene-, and diesel-range fractions, as well as propane and butane—are often processed preferentially to maximize the recovery of high-value products and optimize overall refinery economics.
       Another important aspect is flow smoothing. Sudden changes in production rates may cause disturbances in pipelines, storage tanks, and refinery units. Excessively rapid flow variations can reduce system stability and result in unrealistic behavior in a simulation model.
       In addition to normal operating conditions, engineers must consider reduced production, field shutdowns, changes in demand for refined products, and other disturbances.

Typical Structure of a Feedstock Supply System for Processing Facilities

       Crude oil, natural gas, and unstable gas condensate are transported through a pipeline network to processing facilities, where they may be accumulated in tank farms before being fed to process units. In a simplified form, the structure of such a feedstock supply chain can be represented as follows:
       Each field has its own production profile, while the pipeline network imposes transportation and blending constraints. Storage tanks provide buffering and flow smoothing, whereas the refinery defines requirements for feedstock quantity and quality. In practice, crude oil supply chain systems are much more complex. They may include multiple oil and gas fields, several pipelines, blending points, intermediate tank farms, and alternative transportation routes. In addition, feedstock prioritization rules, changing production rates, and equipment limitations must be taken into account. Therefore, individual facilities cannot be analyzed in isolation. Dynamic simulation provides an effective way to investigate interactions across the entire feedstock supply chain and support refinery planning and supply chain optimization.

Why Are Spreadsheets Not Enough?

       Feedstock planning is often initially performed using spreadsheets. However, as the number of oil and gas fields and operational constraints increases, the capabilities of static calculations become limited. Spreadsheets typically rely on fixed time intervals, whereas real production systems operate continuously and events occur at arbitrary moments in time, such as changes in process unit operating modes and the filling of storage tanks in tank farms. In addition, spreadsheets are not well suited for multi-scenario analysis and usually allow only a limited number of alternatives to be evaluated.
       In contrast, simulation models support what-if analysis and provide visual representations of oil and gas fields, pipelines, tank farms, and processing facilities, making it easier to identify bottlenecks and understand the behavior of the entire feedstock supply chain. As a result, dynamic simulation is increasingly used for crude oil supply chain simulation and the analysis of feedstock deliveries involving crude oil, natural gas, and unstable gas condensate.

Digital Twin Approach for Oil and Gas Supply Chain Optimization

       A digital twin of the crude oil supply chain connects real operational data with a simulation model, enabling continuous synchronization of production planning, storage levels, and transportation flows across refinery and logistics assets.

How Can Simulation Be Used to Analyze Feedstock Deliveries?

       Simulation represents a feedstock supply system as a set of interconnected objects that reproduce the behavior of real production processes. In addition to flow rates, feedstock streams may be characterized by their composition, type, and physicochemical properties, which are automatically recalculated as the flow passes through different parts of the simulation model. Unlike static calculations, dynamic simulation enables engineers to account for variations in production rates, accumulation and withdrawal from storage tanks, and to perform scenario analysis under different operating conditions. For example, the impact of reduced production, changing demand, or infrastructure constraints can be evaluated.
       Another important advantage is that all elements of the model are interconnected. Constraints arising in one part of the system automatically affect other facilities, eliminating the need to create separate independent models and subsequently reconcile their results.
       Thus, simulation provides a powerful tool for analyzing the dynamic behavior of the entire feedstock supply chain. It supports decision, what-if analysis, and digital twin development for crude oil supply chain simulation, refinery planning, and supply chain optimization.

Modeling Variable Production Rates

       One of the characteristic features of hydrocarbon feedstock supply systems is the variability of crude oil, natural gas, and unstable gas condensate production. Unlike simplified calculations that assume constant flow rates, real production systems operate under continuously changing production conditions.
       Production rates are influenced by well operating modes, maintenance activities, seasonal factors, and constraints in adjacent facilities. As a result, actual feedstock deliveries may vary over time, affecting pipeline utilization, storage tanks and tank farms, as well as refinery throughput.
       Dynamic simulation makes it possible to account for variable production rates by defining feed flows through time-dependent functions, production schedules, or external calculations. This approach supports scenario analysis under different operating conditions and improves the accuracy of digital twin development and decision support systems used in refinery planning and production planning.

Feedstock Prioritization

       In real feedstock supply systems, different oil and gas fields and supply sources often have different priorities. These priorities may be driven by economic considerations, process constraints, feedstock quality, or production planning requirements. For example, a refinery may seek to maximize feedstock deliveries from one field while compensating for shortages with supplies from other sources. In the event of reduced production, the system must automatically redistribute flows among available suppliers to maintain the desired refinery throughput.
       Additional complexity arises when multiple feedstock streams compete for limited transportation or processing capacities. Under such conditions, the order in which available resources are utilized has a significant impact on the performance of the overall feedstock supply chain.
       Simulation models make it possible to represent different feedstock prioritization strategies and evaluate their effects. Depending on the application, fixed priorities, proportional allocation, or more sophisticated control algorithms may be used. Analysis of alternative prioritization strategies helps assess system resilience, evaluate the impact of constraints on refinery operation, and identify more efficient approaches to refinery planning and supply chain optimization.

Flows Smoothing

       Production rates at oil and gas fields often fluctuate, while refineries require a more stable supply of crude oil, natural gas, and unstable gas condensate. Large variations in flow rates may reduce operating efficiency and create additional process constraints.
       The need for flow smoothing is driven not only by real production conditions but also by the structure of input data. In practice, production plans are often available as daily or monthly averages. When such aggregated data are used in detailed simulations, unrealistic flow jumps may appear at the boundaries between periods. Direct use of aggregated data can therefore produce artificial fluctuations in storage levels, pipeline loading, and refinery operation. To address this issue, simulation models incorporate flow smoothing mechanisms that ensure gradual changes in flow rates and improve the realism and stability of calculations. By analyzing different flow smoothing strategies, engineers can evaluate the required storage capacity and better reproduce the behavior of real feedstock supply systems.

Pipeline Constraints and Transportation Flow Allocation

       Pipeline capacity limitations significantly influence crude oil distribution strategies, requiring dynamic allocation rules that balance throughput, storage availability, and refinery feedstock demand. These constraints introduce operational bottlenecks that must be continuously evaluated in relation to upstream production rates, intermediate storage levels, and downstream refinery processing capacities. As a result, transportation planning often shifts from static routing assumptions to adaptive flow allocation mechanisms that respond to real-time system conditions, including pipeline congestion, maintenance windows, and variability in supply composition. In digital twin and simulation-based environments, such as refinery logistics models, these dynamics are typically represented through constraint-driven optimization rules that prioritize delivery stability while minimizing overflow risks and underutilization of pipeline infrastructure.

Tank Farms and Storage Terminal Modeling in Crude Oil Logistics

       Tank farms act as buffering nodes in crude oil supply chains, regulating inflows from pipelines and outflows to refinery units while maintaining operational constraints such as minimum and maximum storage levels. Storage utilization can be further improved using dynamic tank reallocation between refinery tank farms. Maintenance scenarios can be evaluated using tank repair simulation within refinery digital twins.

Scenario Analysis and Decision Support

       One of the major advantages of simulation is the ability to investigate different operating scenarios for a feedstock supply chain. A simulation model can be used to analyze the effects of reduced production at individual oil and gas fields, pipeline capacity constraints, changes in feedstock prioritization, or increased feedstock demand from a refinery. The reverse problem can also be addressed by imposing constraints on feedstock intake, for example due to equipment failures, maintenance activities, or reduced processing capacity. In this case, the model can evaluate how such limitations affect the entire crude oil supply chain, including pipeline utilization, storage tank levels, and production rates at upstream facilities. Thus, simulation provides powerful what-if analysis capabilities, enabling engineers to identify bottlenecks and evaluate alternative operating strategies. The results can be used for production planning, refinery planning, supply chain optimization, and digital twin development. As a result, crude oil supply chain simulation becomes a powerful decision support tool for modern refineries.

Refinery Planning and Production Planning

       One of the most important applications of crude oil supply chain simulation is refinery planning and production planning. Simulation models make it possible to evaluate feedstock deliveries to refineries, analyze equipment and pipeline constraints, and assess the impact of changing production rates and feedstock composition on refinery performance. Such capabilities help engineers identify bottlenecks and support more efficient operation of the entire crude oil supply chain.
       In addition, simulation models provide powerful what-if analysis capabilities for comparing alternative operating strategies and assessing the consequences of equipment outages, reduced feedstock availability, and changing demand. As a result, crude oil supply chain simulation has become an essential tool for refinery planning, production planning, supply chain optimization, and digital twin development in modern refining systems.

Digital Twin Development for Feedstock Supply Systems

       Crude oil supply chain simulation plays an important role in digital twin development for modern feedstock supply systems. By combining operational data with a simulation model, engineers can create a digital twin that reproduces the behavior of oil and gas fields, pipeline infrastructure, storage facilities, and refineries. Such models support refinery planning, production planning, and what-if analysis while providing a realistic representation of feedstock deliveries to refineries.
       Digital twin solutions also enable continuous monitoring, what-if analysis, and supply chain optimization under changing operating conditions. By analyzing alternative scenarios and evaluating the effects of equipment limitations, changing production rates, and feedstock prioritization strategies, engineers can improve the reliability and efficiency of the entire crude oil supply chain. As a result, refinery simulation and digital twin development have become key technologies for modern decision support systems in the oil and gas industry.
       The interaction between supply chain simulation, process simulation, analytical models, and decision support is described in Digital Twin Architecture for Refineries.

Example of Crude Oil Supply Chain Simulation Using Petroleum Refining Library

       The principles discussed above can be implemented in a simulation model describing the interaction between oil and gas fields, pipeline infrastructure, tank farms, and a refinery. Such models can account for variable production rates, feedstock prioritization, flow smoothing, and different operating scenarios. The Petroleum Refining Library (PRL) provides specialized Source component for modeling feedstock deliveries of crude oil, natural gas, and unstable gas condensate. For a complete overview of Source configuration, production planning, flow control, and statistics, see Source in Refinery Simulation: Complete Guide. These components support varying flow rates, stream composition, priorities, and other features of real production systems. This component belongs to the functional object model class described in the refinery digital twin classification.
       An example of such a refinery simulation model based on Petroleum Refining Library is presented in the Solution section. It demonstrates an approach to crude oil supply chain simulation involving feedstock deliveries to refineries from multiple oil and gas fields and illustrates how Petroleum Refining Library can be used for refinery planning, scenario analysis, production planning, and digital twin development.

Conclusion

       Variable production rates, transportation constraints, and feedstock prioritization significantly complicate the management of modern feedstock supply chains. Crude oil supply chain simulation makes it possible to analyze feedstock deliveries to refineries, investigate alternative operating scenarios, and support production planning and refinery planning. As a result, simulation models have become an important tool for supply chain optimization and digital twin development in modern refining systems.

Learn how flow smoothing fits into the complete Crude Oil Supply Chain Simulation workflow.

FAQ

What is crude oil supply chain simulation?
Crude oil supply chain simulation is a modeling approach used to represent feedstock deliveries to refineries and analyze the behavior of oil and gas fields, pipeline networks, tank farms, and processing facilities. Simulation models help engineers investigate system dynamics and evaluate different operating strategies.

Why are spreadsheets insufficient for modeling feedstock deliveries?
Spreadsheets are based on fixed time intervals and are not well suited for representing continuously changing production systems. In contrast, dynamic simulation allows events to occur at arbitrary moments in time and provides powerful what-if analysis capabilities for multi-scenario studies.

What feedstocks can be included in refinery supply chain models?
Simulation models can represent crude oil, natural gas, and unstable gas condensate. In addition to flow rates, they can account for feedstock composition, physicochemical properties, and quality variations occurring throughout the feedstock supply chain.

How can variable production rates be modeled?
Production rates may be defined using schedules, time-dependent functions, statistical distributions, or external calculations. This makes it possible to reproduce changing operating conditions and evaluate their impact on feedstock deliveries to refineries.

What is feedstock prioritization?
Feedstock prioritization is a mechanism that determines the order in which different supply sources are utilized. Simulation models make it possible to investigate fixed priorities, proportional allocation rules, and other strategies affecting refinery planning and production planning.

What is flow smoothing in refinery simulation?
Flow smoothing is used to prevent unrealistic changes in feedstock flow rates and improve the stability of calculations. It helps reproduce the behavior of real production systems and reduce artificial fluctuations caused by aggregated planning data.

How does simulation support refinery planning?
Simulation models support refinery planning by enabling engineers to analyze equipment constraints, evaluate alternative operating scenarios, and perform what-if analysis. This helps improve production planning and supply chain optimization.

How can simulation be used for digital twin development?
Simulation models provide the foundation for digital twin development by combining operational data with dynamic representations of production systems. Digital twins support decision making, scenario analysis, and continuous improvement of refinery operations.

Can Petroleum Refining Library be used for crude oil supply chain simulation?
Yes. Petroleum Refining Library provides specialized components for modeling feedstock deliveries involving crude oil, natural gas, and unstable gas condensate. These components support variable production rates, feedstock prioritization, flow smoothing, and digital twin development.