Tank Farm Management in Refinery Simulation

Introduction

       Tank farm management in refinery simulation depends on the role a refinery tank farm plays within the overall production and logistics system. Depending on its position within the refinery, a tank farm can be used for. product transfer, flow smoothing, temporary storage, or accumulating products for subsequent shipment. These objectives determine how the tank farm should operate within the refinery simulation model. Its behavior is also defined by the structure of the tank farm itself, including the number of storage tanks, their operational states, filling levels, and available storage capacity. These factors are central to effective storage tank management in a refinery simulation. In addition, the connections with other process and refinery logistics components —such as production units, pipelines, loading racks, and shipment nodes—affect how material enters and leaves the tank farm. The intensity and variability of inlet and outlet flows are also important factors. The structure and operating logic of a refinery tank farm are described in more detail in the article on tank farm modeling and configuration.
       All these conditions determine the appropriate tank farm configuration and control logic in a refinery simulation. This article describes the main settings that define tank farm operation and control and explains how they affect tank farm behavior during refinery simulation.

Defining the Tank Farm’s Primary Purpose

Flowing Tank Farm — Flow Smoothing

       When Flowing tank farm is used to smooth outgoing product flows, the simulation model must define how the tank farm flow control algorithm regulates the outlet rate. The configuration depends on whether the outlet flow is controlled automatically or manually. In the Petroleum Refining Library, this operating mode is configured using the autoAdjustOutflowSpeed parameter, which determines whether the outlet flow rate is adjusted automatically by the tank farm.
       With automatic flow control, the model should define the operating limits and pumping capacity of the pumping equipment, including the minimum and maximum pumping rates. It is also necessary to specify the pumping-rate adjustment step, which determines how quickly the outlet flow can be increased or decreased during the simulation. These parameters should be selected based on the actual refinery pumping system and its operating capabilities, rather than being treated solely as mathematical constraints within the simulation model. For a detailed description of the automatic flow control algorithm and its operating logic, see the dedicated article on flow smoothing in refinery simulation.
       With manual flow control, the tank farm itself does not impose a specific limitation on the outlet flow. In this case, the outlet speed can be set to an effectively unlimited value, while the actual flow rate is determined by the capacities and operating conditions of the downstream components connected to the tank farm.

Accumulative Tank Farm — Product Transfer

       When RpAccumulative is used primarily as a product transfer point, its purpose is to receive product, hold it temporarily in storage tanks, and then pump it to another tank farm or downstream process unit as part of the refinery's product transfer and logistics system. This operating mode is enabled by setting the useForPumping parameter to true. Such transfer-oriented tank farms are typically located within the refinery and form part of the internal product-transfer system. In this case, no additional specialized control settings are generally required. The tank farm operates according to its configured structure, storage tank states, available storage capacity, and the specified pumping rate, without requiring additional shipment-management logic. Product is received into the available tanks, stored temporarily, and subsequently transferred downstream at the configured outlet rate. Thus, for a transfer-oriented RpAccumulative, the main configuration parameters are primarily related to the physical structure of the tank farm and its pumping capacity rather than to shipment planning or accumulation targets.

AccumulativeTank Farm — Accumulation for Shipment

       A different operating mode (useForPumping = false) is required when RpAccumulative is used to accumulate products for subsequent shipment. In this case, the tank farm does not simply transfer incoming material downstream. It accumulates product in its storage tanks and manages available storage capacity to satisfy shipment planning and product storage requirements. As described in the related article, the tank farm uses an ABCD priority system to determine which incoming volume requests should be satisfied first. These priorities define the main objectives of product accumulation:
        - A — Current-month shipment plan: satisfy the requirements of the current shipment plan.
        - B — Next-month shipment plan: accumulate product required for the following month's shipment plan.
        - C — Minimum volume for passportization: fill the next tank to the minimum level required to make it available for shipment.
        - D — User-defined volume: accumulate an additional volume specified by the user.
       This priority system provides the basic logic for tank inventory management and product accumulation.
       Shipment requirements can be managed through the Shipment Node, which defines product shipment plans and provides the downstream requirements used by the tank farm.

Fill All Tanks

       One important setting is Fill All Tanks (forceFillMode = true). When this option is enabled, the inlet valve remains open even after all ABCD accumulation requests have been satisfied. Fill All Tanks determines whether the park should continue accepting product after those requests have been satisfied, allowing the model to manage available storage capacity and residual product volumes.
       This behavior is particularly relevant when the refinery continuously receives feedstock or intermediate products that must remain available for subsequent processing or shipment. In such situations, stopping the incoming flow immediately after the planned accumulation requests have been completed would not necessarily represent actual refinery operations.
       The effectiveness of this setting, however, depends strongly on the relationship between the incoming and outgoing flows. If the incoming flow is relatively small, storage tanks may fill very slowly, increasing the time required for tank preparation and subsequent shipment. This can create a specific simulation problem: after the current shipment requirements have been satisfied, the final tank may continue receiving product for a long time while also containing the residual volume required for the current shipment plan. If the tank is not released for shipment quickly enough, the corresponding shipment plan may not be completed within the required period.

Force Last Tank Passportization

       To address this situation, the tank farm can use the forceLastTankPassportization parameter . When enabled, the last tank required for the current accumulation process can be transferred to the passportization state as soon as it reaches the minimum volume required for shipment. This allows the tank to become available for pumping earlier instead of waiting for further filling. The setting is particularly useful when the incoming flow is relatively low and the tank would otherwise require a significant amount of simulation time to reach a higher filling level. By releasing the tank earlier, the model can start the shipment process sooner and reduce the risk of failing to complete the current-month shipment plan.

Force Passportization by Level

       A more flexible approach is provided by forcePassportizationByLevel paramter. This setting is intended for situations where a tank farm receives product at a relatively low rate and shipment volumes are large enough that waiting for the normal tank-filling sequence may significantly delay shipment. When this option is enabled, a storage tank can be transferred to passportization once its tank filling level reaches a predefined threshold, provided that the tank is not currently being pumped. For example, the threshold may be configured at 30% of the tank's usable volume.
       This allows the tank to enter the shipment process earlier instead of waiting for the complete accumulation cycle. The resulting behavior can significantly accelerate product transfer and better represent refinery operations where tanks are released for shipment as soon as a sufficient operational volume becomes available.
       These additional settings make the behavior of RpAccumulative more flexible and allow the simulation model to account for the relationship between incoming flow rate, tank filling time, storage capacity, and shipment requirements. They are especially important when the incoming flow is relatively low compared with the required shipment volume, because the standard accumulation sequence may otherwise produce unrealistically long delays in the simulation.
       The two settings serve different purposes: Force Last Tank Passportization is associated with the last tank required to fulfill the current shipment plan, while Force Passportization by Level is triggered by the tank reaching a predefined filling-level threshold.

Direct Flow Mode

       Both types of tank farms can be operated in a Direct Flow Mode when storage and shipment processes are not relevant to the simulation objective. This mode is particularly useful for long-term or high-level tank farm simulations where the model focuses primarily on production rather than detailed material storage and refinery logistics.
       In Direct Flow Mode, the tank farm effectively behaves like a pipeline connection between the upstream and downstream components. The model does not account for storage delays, tank capacity limitations, filling sequences, or shipment-related operations. Product can therefore pass directly through the tank farm without being accumulated in storage.
       This approach can significantly simplify and accelerate long-term petroleum refining simulation runs when detailed tank farm behavior is outside the scope of the analysis. The tank farm can essentially be replaced by a direct flow connection while preserving the overall material flow through the refinery model.

Conclusion

       Effective tank farm management in refinery simulation requires selecting the appropriate operating mode and tank farm configuration according to its role within the production and logistics system.The main considerations include the purpose of the tank farm, its storage tank configuration, connected flows, pumping capabilities, storage capacity, and shipment requirements within the refinery logistics system.
       RpFlowing is suitable for flow smoothing, while RpAccumulative can be used either for product transfer or for accumulating products for subsequent shipment. For shipment-oriented tank farms, the ABCD priority system provides the basic accumulation logic, while settings such as Fill All Tanks, Force Last Tank Passportization, and Force Passportization by Level allow the model to reproduce different real-world operating conditions.
       Both tank farm types can also operate in Direct Flow Mode when detailed storage, tank capacity, and shipment processes are outside the scope of the simulation. This provides a higher level of abstraction and can simplify long-term refinery simulation runs. Ultimately, tank farm management in refinery simulation should reflect the actual operational purpose of the tank farm and the relationship between production, storage, pumping, and shipment processes. Proper configuration allows the simulation model to reproduce realistic tank farm behavior while maintaining an appropriate level of modeling detail.

FAQ

1. What is tank farm management in refinery simulation?
Tank farm management in refinery simulation involves configuring and controlling storage tanks and tank farm operations according to their operational purpose, connected flows, storage capacity, pumping capabilities, and shipment requirements.

2. What is the difference between RpFlowing and RpAccumulative?
RpFlowing is primarily used for smoothing incoming or outgoing product flows. RpAccumulative is used when products need to be temporarily stored, transferred, or accumulated for subsequent shipment.

3. When should RpAccumulative be used for product transfer?
RpAccumulative can be used as an internal refinery transfer tank farm when product is received, temporarily stored, and subsequently pumped to another tank farm or downstream process unit.

4. How does the ABCD priority system work in RpAccumulative?
The ABCD priority system determines which accumulation requests should be satisfied first. It covers the current-month shipment plan, the next-month shipment plan, the minimum volume required for passportization, and a user-defined volume.

5. What is the Fill All Tanks setting used for?
Fill All Tanks allows the tank farm to continue receiving product after the ABCD accumulation requests have been satisfied. This allows additional residuals to accumulate in the available storage capacity.

6. What is Force Last Tank Passportization used for?
Force Last Tank Passportization allows the last tank required for the current shipment plan to enter passportization as soon as it reaches the minimum required volume, helping to start pumping earlier.

7. What is Force Passportization by Level?
Force Passportization by Level allows a tank to enter passportization when it reaches a predefined filling-level threshold, provided that the tank is not currently being pumped. This can accelerate product shipment when incoming flows are relatively low.

8. What is Direct Flow Mode in a tank farm simulation?
Direct Flow Mode allows both RpFlowing and RpAccumulative to operate as a direct flow connection between upstream and downstream components without modeling storage delays, tank capacity limitations, or shipment operations.

9. When should Direct Flow Mode be used?
Direct Flow Mode is useful for long-term or high-level refinery simulations when the primary focus is production and detailed tank storage and shipment processes are outside the scope of the analysis.