Separator and Mixer for Petroleum Refining Simulation: Flow Splitting and Mixing

       Flow splitting and mixing are fundamental operations in petroleum refining simulation and refinery process modeling, enabling refinery material flow to be distributed, combined, and routed between process units, pipelines, tank farms, and storage facilities. Refinery models use them to distribute, combine, and route material streams between process units, storage facilities, pipelines, and blending systems. Flow splitting distributes one incoming stream among multiple outputs (1 → N), while flow mixing combines multiple inputs into a single output (N → 1). Both operations can be controlled by flow ratios or operating constraints while maintaining mass balance.
       The Petroleum Refining Library for AnyLogic provides four components for these operations:
       Separator — splits one flow among multiple outputs.
       SeparatorLight — splits one flow between two outputs with additional flow-routing control.
       Mixer — combines multiple input flows into one output.
       MixerLight — combines two input flows into one output.
       Together, they provide flexible building blocks for refinery flow simulation, from simple stream routing to complex material-flow networks.

Separator for Multi-Stream Flow Splitting in Refinery Simulation

       The Separator is refinery a flow routing and material distribution component for petroleum refining simulation.. It preserves material balance and keeps the incoming material composition unchanged; only the flow rate is redistributed. Flow distribution is defined by split factors, which can be entered as relative values without being normalized manually. The library automatically normalizes the factors and distributes the entire incoming flow accordingly. The distribution can also be changed dynamically during simulation. The Separator also supports flow limits for the entire component or individual outputs, as well as direct routing of 100% of the incoming flow to a selected output. Speed limits and valve control provide additional control over the incoming flow, while the current split and flow distribution can be monitored through the built-in statistics. This makes the Separator suitable for refinery material flow routing between process units, pipelines, storage facilities, and tank farms.

SeparatorLight for Two-Output Flow Routing in AnyLogic

       SeparatorLight is a simplified flow-splitting component for petroleum refining simulation that distributes one incoming stream between two outputs. It is designed for models where a 1 → 2 configuration is sufficient but additional routing control is required. The setSplit() method supports proportional distribution between the two outputs. The component also provides fixed-limit split mode, where the flow through the second output is capped and the remaining flow is directed to the first output. For direct routing, selectOutput1() can send the entire incoming flow to either output. SeparatorLight is therefore suited to refinery flow routing scenarios with two destinations, such as alternative processing lines, pipelines, or storage paths.

Mixer for Multi-Stream Flow Mixing in Refinery Simulation

       The Mixer combines multiple incoming material streams into a single output stream, supporting N → 1 flow mixing in petroleum refining simulation. It can handle any number of input streams, making it suitable for refinery models with multiple sources feeding a common process or destination. Mixing can be controlled using mix factors, which define the required contribution of each input stream. The Mixer provides statistics for individual input flows, their relative contribution, active products, and the resulting output flow. The component also supports output flow limits and outlet valve control, allowing the mixed stream to be constrained by downstream operating conditions. Mixer is suited to refinery flow mixing scenarios such as combining streams before further processing, connecting multiple sources to a common pipeline, or evaluating alternative operating conditions in refinery simulation models.

MixerLight for Two-Input Flow Mixing in AnyLogic

       MixerLight is a simplified mixing component for petroleum refining simulation that combines two incoming material streams into a single output. It is intended for models where a 2 → 1 flow configuration is sufficient. The setMerge() method defines the relative contribution of the two inputs. When both values are positive, the component operates in proportional merge mode, maintaining the specified relationship between the incoming flows. MixerLight also supports outlet flow limits and direct flow control. Built-in statistics provide the flow through each inlet, total inlet flow, mixed outlet flow, mix ratios, and active flow limitations. This makes MixerLight suitable for two-stream refinery flow mixing and material blending scenarios.
       The Separator and Mixer are intended for models requiring multiple connections and more detailed flow analysis, while the Light versions provide a simpler configuration for common two-stream cases. By combining these components, a refinery model can represent routing between process units, pipelines, tank farms, storage facilities, and blending systems without creating a separate specialized component for every flow configuration.

Flow Control and Configuration in Refinery Simulation

       The four components provide different levels of control over how material flows are distributed or combined during simulation. Separator supports dynamic split factors and flow limits for multiple outputs, while SeparatorLight adds direct two-way routing and fixed-limit splitting. For mixing, Mixer uses mix factors to control the contribution of multiple input streams. MixerLight supports proportional mixing of two inputs and can guarantee acceptance of a selected input before allocating the remaining capacity. These controls allow refinery simulation models to represent changing operating conditions without changing the underlying flow-network structure.

Applications in Petroleum Refining and Refinery Simulation

       Separator and Mixer components can be used to model material-flow operations throughout a refinery, including:
        - distributing streams between process units and operating lines;
        - routing material to tank farms and storage facilities;
        - combining intermediate streams before further processing;
        - connecting pipelines and transfer systems;
        - directing products to different destinations;
        - combining components for refinery product blending.
       Their combination allows petroleum refining simulation models to represent complex flow-routing configurations and evaluate alternative operating conditions, supporting process monitoring, model validation, and process optimization.

Examples: Separator and Mixer in Refinery Simulation

The examples demonstrate the main capabilities of Separator, SeparatorLight, Mixer, and MixerLight in an AnyLogic petroleum refining model.
Separator and SeparatorLight
       The Separator example demonstrates splitting one incoming stream into any number of outputs using configurable separation ratios. The example also shows how flow limits can be applied to the inlet and individual outputs, and how split ratios can be retrieved as an array or map.
       The Separator statistics example shows how the built-in statistics provide information about incoming and outgoing flows, separation ratios, and the resulting distribution between outputs.
       SeparatorLight demonstrates two-output flow routing, including proportional splitting and directing the entire flow to a selected output. The example also compares this functionality with the standard AnyLogic FluidSplit component.
Mixer and MixerLight
       The Mixer example demonstrates the basic functionality of combining multiple incoming streams into a single output. Since its flow logic is essentially the reverse of the Separator, it supports corresponding flow-control and monitoring capabilities.
       MixerLight demonstrates two-input mixing, including proportional mixing and the ability to guarantee flow from a selected input. The example also compares this functionality with AnyLogic FluidMerge.
Dynamic Connections
       The manual connection example demonstrates another important capability of the Separator and Mixer: connections can be created and managed dynamically during simulation. This is useful when the actual refinery process network or routing configuration is determined at runtime rather than being fixed during model development. These examples show how PRL components extend AnyLogic fluid-flow functionality for petroleum refining simulation, refinery material flow routing, and process modeling.
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 in real time.
Petroleum Refining Library free to try version can be download here
A working version of this model is also available on AnyLogic Cloud
Watch the full model walkthrough on our YouTube channel

Conclusion

       Separator, SeparatorLight, Mixer, and MixerLight provide flexible building blocks for flow splitting and mixing in petroleum refining simulation. They allow refinery models to distribute material between multiple destinations, combine incoming streams, and implement dynamic flow-routing logic. The full-size Separator and Mixer components are suitable for complex refinery networks with multiple connections, while SeparatorLight and MixerLight provide simpler solutions for two-stream configurations. Together, they support modeling of process units, pipelines, tank farms, storage systems, and blending operations in AnyLogic. By extending the basic fluid-flow capabilities of AnyLogic, these components make it easier to build detailed refinery simulation and digital twin models while maintaining material-flow balance and providing control and monitoring of the simulated flows.

FAQ

1. What is flow splitting in petroleum refining simulation?
Flow splitting is the distribution of one incoming material stream among multiple downstream streams, typically using a 1 → N configuration.

2. What is flow mixing in petroleum refining simulation?
Flow mixing combines multiple incoming material streams into a single output stream, typically using an N → 1 configuration.

3. What is the difference between Separator and Mixer?
Separator distributes one incoming flow among multiple outputs, while Mixer combines multiple incoming flows into one output.

4. What is the difference between Separator and SeparatorLight?
Separator supports any number of output streams, while SeparatorLight is designed for a two-output configuration with additional flow-routing control.

5. What is the difference between Mixer and MixerLight?
Mixer supports multiple input streams, while MixerLight is designed for a two-input configuration.

6. Can Separator distribute flow according to predefined ratios?
Yes. Separator can use split factors to define the required proportions between output streams. The factors are automatically normalized.

7. Can Separator route the entire flow to one output?
Yes. A selected Separator output can receive 100% of the incoming flow.

8. Can Mixer maintain predefined mixing ratios?
Yes. Mixer can use mix factors to define the required proportions of incoming streams.

9. Can MixerLight guarantee flow from a selected input?
Yes. MixerLight supports guaranteed flow acceptance for a selected input, allowing its available flow to be accepted before the remaining capacity is allocated to other inputs.

10. Can flow limits be applied to Separator and Mixer?
Yes. Flow limits can be applied to the overall flow and, where supported, to individual inputs or outputs.

11. Can Separator and Mixer connections be configured during simulation?
Yes. Separator and Mixer support dynamic connection management, allowing model connections to be created and adapted during runtime.

12. Do Separator and Mixer preserve mass balance?
Yes. Flow splitting distributes the incoming mass among outputs, while flow mixing combines incoming mass into the output stream.

13. Can these components be combined in one refinery model?
Yes. Separators and mixers can be connected in different sequences to represent complex routing, processing, storage, pipeline, and blending networks.

14. How do these components extend the AnyLogic Fluid Library?
The AnyLogic Fluid Library provides basic binary FluidSplit and FluidMerge components. The Petroleum Refining Library adds multi-stream splitting and mixing capabilities together with additional flow-routing and control functions.