How Tanks Are Modeled: Accumulative and Flowing Tank Farms

Tank Representation in Simulation Models

       Tank representation in simulation models defines how physical storage systems are mapped into computational objects that reproduce both structural properties and dynamic operational behavior within process and logistics systems. In refinery and oil & gas modeling, this abstraction transforms real-world storage units—such as tank farms, reservoirs, and buffer tanks—into state-based simulation entities capable of interacting with flows, constraints, and scheduling logic.
       Within refinery digital twin and tank farm simulation models, this representation is used to capture key operational mechanisms product flow accumulation, discharge processes, capacity limitations, and state transitions. Unlike static storage assumptions, modern simulation frameworks such as AnyLogic-based PRL models treat tanks as dynamic objects that continuously update their state based on inflow/outflow conditions, production planning rules, and pipeline or loading constraints.
       This modeling approach enables accurate representation of refinery logistics systems, supporting tasks such as production planning, feedstock balancing, and supply chain optimization. As a result, tank representation becomes a foundational element in oil and gas digital twin architectures, ensuring that storage behavior is consistently aligned with real operational dynamics and decision-making processes.
       Tank farms are a key element of refinery logistics, providing a buffer between production, transportation, and processing units. They stabilize system operations by decoupling continuous refinery processes from discrete supply and shipment activities, reducing the impact of flow fluctuations and scheduling mismatches. Tank farms are a core layer in refinery simulation systems, acting as dynamic buffers between different elements such as production units, pipeline networks, storage systems and others.
       In refinery imitation modeling, a tank is not just a storage vessel but a dynamic object that regulates balance across the supply chain. It tracks residual levels, manages inflow and outflow, and enforces constraints such as capacity limits, maximum and minimum volumes. This makes tanks essential components in refinery simulation and digital twin systems.
       In simulation models, tank farms are usually represented in two main configurations: flowing tanks, which handle continuous inflow/outflow dynamics, and accumulative tanks, which are more tightly linked to production plans and shipment scheduling. This distinction allows accurate modeling of both operational behavior and planning-level constraints in refinery systems.
Tank representation in simulation models defines how physical storage systems are abstracted into computational objects that capture dynamic behavior, state transitions, and flow interactions within process and logistics networks, enabling accurate modeling of flow product accumulation, dispatch operations, and system-level constraints in digital twin environments.

Tank as a Dynamic Object vs Static Storage Unit

       In refinery imitation simulation and digital twin models, a reservoir tank should be treated as a stateful dynamic object rather than a passive storage capacity. Its behavior is defined not only by resuals, but also by operational states that control how product enters, is processed, and leaves the tank within the overall logistics system.
       The tank lifecycle can typically represented as a "state machine", where each state corresponds to a specific operational mode. The diagram below illustrates a structured workflow that governs tank transitions between filling, shipment preparation and maintenance activities in imitation model.

Tank StateChart Model

       All tank states in imitation model can be classified into two main groups based on their functional role in the system. The first group is the active operational cycle, reflecting the standard operational flow of material within the tank farm. The second group consists of inactive or auxiliary states, namely which temporarily exclude the tank.
       Initial – tank initialization state, where the object is created and prepared for operation.
       Filling – active inflow state, where flow is accumulated in the tank.
       Awaiting passportzation – intermediate state where the tank is full or ready for shipment but requires validation or specification confirmation.
       Passportization – processing state where product characteristics are formalized (quality, specification, certification).
       Shipment – dispatch state where product is withdrawn according to logistics or production plans.
       Repair – maintenance state where the tank is temporarily unavailable due to technical servicing.
       Reserve – standby state used for idle capacity.

Note: In the PRL, the “reserve” state is assigned to tanks that have been temporarily transferred to other tank farms as part of a “wandering mechanism”.
       Interaction with input and output flows defines how the tank integrates into the overall refinery material balance. Incoming streams drive accumulation dynamics and trigger transitions into filling and subsequent operational states, while outgoing streams are controlled by shipment rules, production planning, and product availability.

       In accumulative tank farms, operational logic is typically constrained so that only one tank valve is open at any given time—either the inlet or the outlet—ensuring strict separation between filling and discharge phases. In contrast, in flowing tank farm configurations, both inlet and outlet valves may be open simultaneously, enabling continuous and balanced flow exchange without discrete phase switching.

Dynamic behavior in simulation context

       This state-based representation allows the tank to behave as a decision-driven system element, where transitions are triggered not only by residual thresholds but also by operational rules such as:
       - availability of shipment orders,
       - completion of quality or passportization procedures,
       - maintenance scheduling and others.
       As a result, the tank becomes an integrated part of refinery logistics logic, directly interacting with production planning, storage optimization, and shipment scheduling within a digital twin environment.

Accumulative vs Flowing Tanks Comparison

       Accumulative and flowing tanks represent two fundamentally different paradigms for imitation modeling storage systems in refinery simulation, differing in flow control logic, operational behavior, and integration with planning systems.

Representation of Tanks in PRL (Petroleum Refining Library)

       In the PRL tanks are initialized at the beginning of the model execution with a predefined set of attributes from database that define both their physical properties and operational behavior.
       For accumulative tanks in a tank farm from rp_accumulatives database table, the following properties are defined at model start:
        - tank name (identifier);
        - minimum allowable fill level;
        - maximum allowable fill level;
        - total capacity;
       - initial inventory (starting fill level);
       - initial operational state (e.g., filling, reserve, shipment-ready).
       These parameters define how each tank behaves within the accumulative logic, including its participation in scheduling, passportization and shipment processes.
       For flowing tanks in a tank farm from rp_flowing database table, the representation is structured at the level of a tank group rather than individual tanks. In this case, the following attributes are initialized:
        - group name (identifier);
        - minimum allowable fill level for the group;
        - maximum allowable fill level for the group;
        - total group capacity;
        - initial residual level;
        - number of tanks in the group.
       This dual representation in PRL allows the simulation to accurately model both discrete, state-driven accumulation behavior and aggregated continuous-flow behavior within refinery tank farm systems.

Role of Tank Farms in Refinery Digital Twins

       In a refinery digital twin, tank farms represent a critical layer of storage and logistics abstraction, connecting production units, pipelines, and downstream shipment systems into a unified simulation environment. Within refinery logistics simulation and oil and gas digital twin models, tank farms act as dynamic buffering nodes that stabilize fluctuations between continuous production and discrete shipment operations.
       A tank farm in this context is not just a physical storage facility, but a modeled system element used for production planning, inventory balancing, and flow synchronization. It enables accurate representation of hydrocarbon storage dynamics, including inflow from process units, outflow to pipelines or loading racks, and internal state changes driven by operational constraints.
In tank farm simulation models (e.g., AnyLogic-based PRL models), reservoirs allowing engineers to evaluate how storage capacity, pipeline constraints, and demand variability affect overall refinery performance. This is essential for feedstock management, supply chain optimization, and what-if analysis in digital twin environments.
       By integrating tank farms into a digital twin of refinery operations, the model gains the ability to simulate realistic residuals propagation effects, reduce bottlenecks in crude oil supply chain simulation, and improve decision-making in production scheduling and logistics planning.

Conclusion

       The analysis of flowing and accumulative tank farms demonstrates that refinery storage systems cannot be reduced to a single modeling abstraction without losing essential behavioral distinctions. These two structures represent fundamentally different operational regimes in refinery logistics: flow stabilization versus product planning.
       Flowing systems function as dynamic buffers that mitigate short-term fluctuations between process units and ensure continuous, stable transport. In contrast, accumulative systems represent structured product-handling nodes where hydrocarbons are accumulated, conditioned, and released according to operational schedules and logistical constraints.
       From a digital twin perspective, separating these paradigms is essential for preserving the accuracy of flow dynamics, storage behavior, and system-wide coordination. The combined use of both approaches enables the construction of realistic hybrid models that capture both real-time process behavior and higher-level planning logic within refinery networks.

FAQ

1. What is the role of a tank in refinery simulation?
       A tank acts as a dynamic object that buffers flows between production, pipelines, and processing units. It stabilizes operational variability and enables coordination between continuous production and discrete logistics operations.

2. What is the difference between accumulative and flowing tank farms?
       Accumulative tank farms operate with discrete storage logic, where tanks are filled and emptied sequentially. Flowing tank farms allow simultaneous inflow and outflow, enabling continuous flow exchange and group-level balancing.

3. Why is a tank considered a dynamic object and not just storage capacity?
       Because its behavior depends on operational states (filling, shipment, repair, reserve) and flow-driven transitions. It actively participates in decision logic, planning, and logistics coordination.

4. How are tank states organized in the PRL?
       All states are divided into two groups:
Active cycle: Filling → AwaitingPassportization → Passportization → Shipment
Inactive/auxiliary states: Repair, Reserve
This structure defines whether a tank participates in flow or is temporarily excluded.

5. How do input and output flows interact with a tank?
       In accumulative systems, only one flow direction is active at a time (either inlet or outlet). In flowing systems, both directions can operate simultaneously, enabling continuous exchange.

6. How are tanks initialized in PRL models?
       At simulation start, each tank is defined with: name, minimum and maximum fill levels, capacity, initial inventory, initial state (e.g., filling or reserve)

7. How are flowing tank farms represented in PRL?
       They are modeled as tank groups, defined by: group name, min/max fill limits, total capacity, initial inventory, number of tanks in the group. This abstraction supports aggregated continuous-flow behavior.

8. Why is tank modeling important for digital twin systems?
       Because tanks determine residual dynamics, bottleneck formation, and synchronization between production, storage, and transportation. Accurate modeling directly impacts planning and optimization quality in refinery digital twins.

9. What happens if a tank reaches capacity limits?
       Operational constraints prevent overfilling. The system may redirect flow, block input, or trigger alternative routing depending on the simulation logic and planning rules.

Last updated on 25.06.2026