Mixer Simulation: Dynamic Material Flow Mixing and Composition Calculation

       The Petroleum Refining Library (PRL) Mixer is a component for combining multiple material flows in process simulation. It supports mixer simulation by merging incoming streams into a single output flow while preserving mass balance and calculating the resulting material composition. The output mass flow is determined by the combined mass flow rates of all incoming streams, while the composition of the mixed material is calculated based on the contribution of each input flow. The Mixer can be used as an independent component or internally by other Petroleum Refining Library components, for example, to combine material flows from multiple Process Units, Tank Farms, pipelines, and other process streams in refinery simulation, oil and gas process simulation, refinery production planning, and process simulation models. Mixer provides extensive statistics for monitoring and analyzing multiple input streams, flow ratios, mix factors, output flow, and valve state during process simulation.
       Learn more about flow splitting and mixing components in the Petroleum Refining Library.
The Petroleum Refining Library Mixer differs from the standard AnyLogic Fluid Merge by supporting dynamic mixing of multiple material flows while preserving mass balance and calculating the resulting material composition.

How the Mixer Combines Material Flows

       Unlike MixerLight, which combines two incoming flows, the Mixer can combine an arbitrary number of incoming streams into a single material flow. The total output mass flow is calculated from the incoming flows allowed by the current merge configuration. The resulting material composition is determined from the mass contribution and composition of each participating input stream.

Multiple Input Flows and Dynamic Mixing

       The Mixer supports an arbitrary number of input flows. Input flows are defined through the FluidEnter[] inputFlows array, where each array element represents one input connection. The number of input flows is defined by the inputFlows array and cannot be changed during simulation. However, the mass flow rates and material composition of the existing input flows can change dynamically during simulation. The resulting output flow is continuously updated based on the combined incoming mass flows and their respective material compositions, ensuring mass conservation throughout the mixing process. This makes the Mixer suitable for dynamic material flow modeling in AnyLogic refinery and oil and gas simulation models.

Mixer API

       The Petroleum Refining Library Mixer API provides methods for flow connection, material flow mixing, throughput control, and dynamic Mixer configuration during simulation.
       Connecting Flows
The connect() method is particularly useful when connectAfterStart is enabled and the flow connections must be created programmatically after model initialization.
       Managing Merge Factors
       Merge factors control how individual input flows contribute to the resulting mixed flow. They can be configured for all input flows using an array of factors, specified by product ID, or used to select a single product flow. When setMerge(int productId) is used, the specified product flow is assigned 100% of the available input.
       Managing Mixer Throughput
       The Mixer throughput can be controlled using an overall flow limit or individual limits applied to specific input flows. These flow constraints can be used in refinery production planning and process optimization scenarios.
       Managing Mixer State
       The Mixer state can be controlled dynamically during simulation. It can be closed to completely stop the flow or reset to restore its default operating state.

Conclusion

       The Petroleum Refining Library Mixer provides a flexible approach to mixer simulation and dynamic material flow mixing in process simulation. It combines multiple incoming flows into a single output while preserving mass balance and calculating the resulting material composition. Merge factors can be changed dynamically, flow limits can be applied to the entire Mixer or individual input flows, and the Mixer can be closed or reset during simulation. These capabilities make the Mixer suitable for refinery simulation, petroleum refining, oil and gas process simulation, production planning, process optimization, logistics, and digital twin models, including models that combine flows between Process Units, Tank Farms, storage systems, and pipelines.

FAQ

1. What is the Petroleum Refining Library Mixer?
The Petroleum Refining Library Mixer combines multiple incoming material flows into a single output flow while preserving mass balance and calculating the resulting material composition.

2. How does the Mixer combine material flows?
The Mixer combines the mass flow rates of all incoming streams into a single output flow. The resulting material composition is calculated based on the mass flow and composition of each input stream.

3. Does the Mixer preserve mass balance?
Yes. The Mixer preserves mass balance by combining the incoming mass flows into a single output flow.

4. Can the Mixer combine flows with different material compositions?
Yes. The Mixer can combine multiple incoming flows with different material compositions. The resulting output composition is calculated from the contribution of each input flow.

5. Can the Mixer have multiple input flows?
Yes. The Mixer supports an arbitrary number of input flows defined through the inputFlows array.

6. What are merge factors?
Merge factors control how the configured input flows contribute to the resulting output flow. They can be configured for all input flows or using product IDs as input identifiers.

7. Can merge factors be changed during simulation?
Yes. Merge factors can be changed dynamically during simulation using the setMerge() methods.

8. Can a single product flow be selected for mixing?
Yes. The setMerge(int productId) method configures the Mixer so that 100% of the specified product flow is allowed to enter the Mixer.

9. Can flow limits be applied to the Mixer?
Yes. A maximum flow rate can be applied to the entire Mixer or to individual input connections.

10. What happens when the Mixer is closed?
When the Mixer is closed, it blocks material flow. The Mixer can be reopened dynamically during simulation.

11. Can the Mixer be used in refinery production planning?
Yes. The Mixer can be used to combine material flows from multiple Process Units, Tank Farms, storage systems, pipelines, and other process streams in refinery production planning, refinery simulation, and oil and gas process simulation models.

12. Can the Mixer be used in digital twin models?
Yes. The Mixer is suitable for digital twin models of refinery and oil and gas operations, including dynamic process simulation, material flow modeling, production planning, logistics, and refinery optimization.

13. Can the Mixer be used for product blending?
Yes. The Mixer can be used to model the combination of material streams with different flow rates and compositions, making it suitable for product blending, blending simulation, and other material flow mixing scenarios in refinery and petroleum refining simulation.