Reservoir Park Flowing for Tank Farm Simulation

       Modern refineries operate under continuously changing process conditions, making flow smoothing an essential part of refinery operation. Variations in feedstock supply, process unit performance, and operating conditions create unavoidable fluctuations in intermediate product flows that must be stabilized before reaching downstream units.
Refinery tank farms perform this function by acting as dynamic flow buffers rather than conventional storage facilities. Their primary objective is to maintain a stable outlet flow while keeping inventory (residuals) within safe operating limits.
       The Petroleum Refining Library (PRL) provides the special Reservoir Park Flowing (RpFlowing) agent for realistic smoothing tank farm simulation in refinery digital twin applications. Unlike storage-oriented models, Reservoir Park Flowing dynamically adjusts the outlet flow according to changing inlet conditions and residuals, enabling accurate simulation of flowing tank farms, crude and intermediate storage systems, and other continuous refinery processes.

Why Flow Smoothing Matters?

       Flow fluctuations are an inherent part of the oil and gas industry. Large production volumes, non-uniform field production, multiple upstream feed sources, and long transportation pipelines continuously create variations in flow rates. As these fluctuations propagate through interconnected processing units, refinery tank farms become essential for flow smoothing, ensuring stable downstream operation and realistic tank farm simulation in digital twin applications. To maintain stable downstream operation, many tank farms function as dynamic flow buffers rather than conventional storage facilities. They continuously adjust the outlet flow according to changing inlet conditions while keeping inventory within operational limits.

How It Works?

       The Flowing Reservoir Park acts as a hydraulic buffer between upstream and downstream process units. Its primary purpose is to absorb fluctuations in the incoming product flow while maintaining a stable shipment rate whenever possible. The reservoir park also provides temporary storage when the inlet and outlet flow rates become unbalanced.
Although a real tank farm may consist of multiple tanks operating in different states, the component models the entire facility as a single equivalent storage whose inventory represents the total product stored in all tanks. This simplified representation preserves the hydraulic behavior of the reservoir park while significantly improving simulation performance.
The inventory changes continuously according to the difference between the inlet and outlet flow rates:
  • Inlet flow = Outlet flow — the inventory remains constant.
  • Inlet flow > Outlet flow — the inventory increases.
  • Inlet flow < Outlet flow — the inventory decreases.
When Automatically recalc shipment speed is enabled, the outlet flow is periodically adjusted to keep the inventory close to the target operating level. The calculated shipment speed is limited by the configured minimum and maximum flow rates and changes gradually to prevent abrupt hydraulic disturbances. When automatic regulation is disabled, the reservoir park operates in pumping mode, where the outlet flow is determined only by downstream hydraulic constraints.
This approach provides realistic dynamic behavior while remaining computationally efficient, making it suitable for large refinery digital twin and production planning models.

Tank Farm Flowing Simulation Features

       The Reservoir Park Flowing agent provides a comprehensive set of features for realistic tank farm simulation in refinery digital twin models. It is specifically designed for continuous flow systems where the primary objective is flow smoothing rather than long-term product storage.
       Key capabilities include:
        - dynamic flow control – automatically adjusts outlet flow to changing inlet conditions;
        - flow smoothing – stabilizes downstream flow while maintaining material balance;
        - ideal mixing – simulates homogeneous mixing of incoming and stored products;
        - pump constraints – supports configurable minimum, maximum, and ramp-rate limits;
        - multiple streams – handles multiple inlet streams and single or multiple outlet products;
        - tank maintenance – simulates unavailable tanks and reduced storage capacity;
        - inventory control – automatically tracks inventory and operating levels;
        - process integration – integrates with upstream and downstream refinery units;
        - digital twin ready – fully compatible with AnyLogic and the Petroleum Refining Library.
Reservoir Park Flowing simulates tank farms that stabilize downstream flow by dynamically adjusting the outlet rate to changing inlet conditions.

Principles of flowing reservoir park construction

       The Reservoir Park Flowing agent is configured using the rp_flowing database table, which defines the structure and operating parameters of the tank farm. Unlike individual tank modeling, configuration is performed at the tank group level, where each group of parallel tanks is replaced by a single equivalent tank with the same total storage capacity. The configuration includes:
        - group storage capacity,
        - operating levels,
        - initial inventory,
        - number of parallel group tanks.
       Each Reservoir Park Flowing also includes configurable pump limitations and flow control parameters. Unlike Reservoir Park Accumulative, where tanks alternate between filling and shipment, all active tanks in Reservoir Park Flowing operate continuously in both modes simultaneously. Incoming product is mixed with the existing inventory while the same tanks continuously supply the downstream process.
       Additional process attributes, including auxiliary streams, product losses, and other process-specific parameters, can also be loaded from the database when required. After initialization, the Petroleum Refining Library (PRL) automatically connects the reservoir park to adjacent process units within the refinery model. The component supports one or more incoming streams through the inputFlows[] array (R: Input flows (FluidExit[])) and one or more outgoing streams through the outputFlows[] array (R: Output flows (FluidEnter[])), enabling seamless integration into complex refinery process networks.
Note: The letter R means required; O means optional
       While a single outlet stream is the most common configuration, Reservoir Park Flowing can also generate multiple product streams. In these cases, product distribution is controlled by configurable recipe-based separation rules stored in the rp_modes_separation table. This enables the reservoir park to model simplified phase separation and continuously route feedstock into multiple downstream product streams.
       An optional bypass flow (residualOutputFlow, FluidEnter) allows incoming product to be redirected whenever the reservoir park is unable to accept additional feed. If a bypass is not configured, the inlet flow is automatically blocked once the storage capacity is fully utilized. During initialization, the component also creates maintenance schedules that control the temporary shutdown and return of individual tanks.

Operating modes of RpFlowing

Flow
Correction
Continuously adjusts outlet flow to maintain target inventory and stable downstream operation
Steady
Flow
Monitors inventory periodically while maintaining balanced inlet and outlet flow conditions
Pumping
Down
Gradually reduces outlet flow after inlet flow stops to maximize operating time
Overflow
Protection
Prevents tank overfilling by stopping or bypassing incoming flow when required.
Direct
Flow
Direct transfer of incoming flow without storage participation
       Flow Correction - the primary operating mode that continuously adjusts the outlet flow according to inlet conditions and inventory level. It maintains stable downstream operation during normal refinery operation. Depending on the autoAdjustOutflowSpeed parameter (label: Automatically recalc shipment speed), the outlet flow is either calculated automatically or controlled by an external source.
       Steady Flow - activated when the target inventory has been reached and inlet and outlet flows are balanced. The algorithm periodically monitors the tank farm until operating conditions change.
       Pumping Down - activated when the inlet flow is interrupted. The outlet flow is gradually reduced to the minimum sustainable rate, maximizing downstream operating time.
       Overflow Protection - activated when the maximum operating inventory is reached. Incoming flow is stopped or bypassed until the tank farm returns to a safe operating range.
       DirectFlow - transfers incoming product directly to the outlet without using tank storage or flow regulation. This mode is suitable when intermediate storage and flow smoothing are not required.
       For a detailed description of all operating modes, state transitions, and control algorithms, see the article: Flowing Tank Farm Algorithms.

Typical application areas

       Reservoir Park Flowing is intended for refinery tank farms where the primary objective is flow smoothing rather than long-term storage or shipment scheduling. Typical applications include:
  • Crude tank farms supplying stable feed to atmospheric and vacuum distillation units.
  • Intermediate tank farms balancing flow between successive processing units.
  • Pipeline buffer systems compensating for fluctuations during product transfer.
  • Stabilized condensate storage with continuous transfer to downstream facilities.
  • LPG buffer systems maintaining stable feed and product flow.
  • Blending and transfer systems requiring continuous, well-balanced outlet streams.
These applications are commonly found in refinery digital twin models, where realistic tank farm simulation is essential for accurate production planning and process optimization.
Reservoir Park Flowing supports both individual tank farm models and large-scale refinery flow networks. It dynamically smooths flow fluctuations between interconnected process units while maintaining inventory within operational limits. This functionality enables realistic tank farm simulation for oil refineries, gas processing plants, and Digital Twin applications.

Automatically recalc shipment speed parameters

       When automatically recalc shipment speed (autoAdjustOutflowSpeed) is enabled, the reservoir park automatically adjusts its outlet flow to maintain a stable inventory level and smooth fluctuations in the incoming flow. The shipment speed is periodically recalculated within the configured operating limits and applied gradually to avoid abrupt hydraulic changes. The automatic flow controller is configured using the following parameters:

Example Model: Flowing Tank Farm Simulation in AnyLogic

Reservoir Park Flowing provides a realistic representation of refinery tank farms whose primary purpose is flow smoothing rather than long-term storage or shipment scheduling. By dynamically adjusting the outlet flow according to changing inlet conditions, the component reproduces the behavior of continuous flow systems while maintaining inventory within operational limits.
Integrated into the Petroleum Refining Library (PRL), Reservoir Park Flowing enables accurate tank farm simulation for Digital Twin applications, refinery production planning, and process optimization. Together with Reservoir Park Accumulative, it allows engineers to select the most appropriate tank farm model based on the actual operating philosophy of the facility, improving both simulation accuracy and model efficiency.
Important: This is not a video demonstration! It is a fully interactive digital twin running in AnyLogic Cloud. Feel free to experiment with the model by changing process parameters, reallocating reservoirs, and evaluating different operating scenarios in real time.
A working version of this model is also available on AnyLogic Cloud
Watch the full model walkthrough on our YouTube channel

Petroleum Refining Library free to try version can be download here

Conclusions

Reservoir Park Flowing provides a realistic representation of refinery tank farms whose primary purpose is flow smoothing rather than long-term storage or shipment scheduling. By dynamically adjusting the outlet flow according to changing inlet conditions, the component reproduces the behavior of continuous flow systems while maintaining inventory within operational limits.
Integrated into the Petroleum Refining Library (PRL), Reservoir Park Flowing enables accurate tank farm simulation for Digital Twin applications, refinery production planning, and process optimization. Together with Reservoir Park Accumulative, it allows engineers to select the most appropriate tank farm model based on the actual operating philosophy of the facility, improving both simulation accuracy and model efficiency.

FAQ

1 What is a flowing tank farm?
A flowing tank farm is a storage system designed primarily for flow smoothing rather than long-term product storage. It continuously adjusts the outlet flow to compensate for fluctuations in the incoming flow while maintaining inventory within operational limits.

2 When should Reservoir Park Flowing be used?
Reservoir Park Flowing should be used when the primary objective is to stabilize downstream flow. Typical applications include crude tank farms, intermediate storage systems, pipeline buffers, stabilized condensate storage, and LPG buffer systems.

3 What is the difference between Reservoir Park Flowing and Reservoir Park Accumulative?
Reservoir Park Flowing dynamically regulates the outlet flow according to changing inlet conditions, making it suitable for continuous refinery processes. Reservoir Park Accumulative is designed for storage-oriented operations, where inventory management and shipment scheduling are the primary objectives.

4 Does Reservoir Park Flowing simulate individual tanks?
Yes. The component internally consists of standard Tank objects with configurable physical parameters. During normal operation, all active tanks are filled and discharged simultaneously, maintaining approximately the same inventory level.

5 Can Reservoir Park Flowing simulate multiple products?
Yes. While most applications use a single outlet stream, the component also supports recipe-based separation, allowing multiple product streams to be generated from a common feedstock.

6 Can Reservoir Park Flowing be used in Digital Twin applications?
Yes. Reservoir Park Flowing is specifically designed for Digital Twin models of oil refineries and gas processing plants, where realistic tank farm simulation, flow smoothing, and material balance are required for production planning and operational analysis.
PRL free to try version can be download here