MixerLight Simulation in Petroleum Refining

       A MixerLight is a Anylogic-based Petroleum Refining Library simulation element used for mixer simulation in petroleum refining to combine two incoming material flows into a single output. The mixed flow can be routed to downstream process units, pipelines, storage, or other elements of a petroleum refining model. Mixer simulation in petroleum refining supports controlled material flow mixing within refinery process models and digital twin systems. The MixerLight is part of the broader group of separation and mixing simulation elements. Unlike MixerLight, the Mixer can combine multiple input flows into a single output flow.
The MixerLight component was specifically developed to ensure guaranteed material flow from a selected input, allowing the model to prioritize one inlet when combining flows.
       The priority mechanism in the standard AnyLogic FluidSplit and FluidMerge components does not guarantee that a higher-priority flow will be accepted or transferred in full. Although these components support neutral, proportional, and priority-based allocation algorithms, the priority mode represents a preference rather than a strict allocation rule.
       The configured priority coefficients are incorporated into the objective function of the underlying linear programming (LP) flow-network model as penalty or benefit factors. As a result, in complex networks, the LP solver may allocate flow from a lower-priority connection if this produces a more advantageous overall solution.
       The Petroleum Refining Library Mixer provides a different mechanism: guaranteed flow acceptance. A designated input can be treated as mandatory, ensuring that its available flow is accepted in full before the remaining capacity is allocated among other inputs.

Controlling Mixer Simulation in Petroleum Refining

       In petroleum refining simulation, the MixerLight provides several methods for controlling how two incoming material flows are combined into a single output.

       Setting the Mix Ratios
       The setMerge() method sets the relative flow values for the first and second inputs. The values do not need to be normalized. When both values are positive, the mixer uses proportional merge mode. The mix can be specified as two individual values or as a two-element array: [firstInput, secondInput].

       Other Flow Controls
       The MixerLight provides direct control of the incoming flows and the resulting mixed stream. The setSpeedLimit() method limits the maximum outlet flow rate, while getSpeedLimit() and resetSpeedLimit() allow the current limit to be read or reset. The resetState() method removes active flow restrictions and restores the mixer to its default operating state. Output valve can be controlled with setClosed() and checked with isClosed(). The current mix ratios can be obtained using getMixFactors() or getMixFactorsMap() and getMixRatios(). The isAllFromFirst() method checks whether the entire input flow is received from the first input, allowing you to determine whether the mixer is currently operating exclusively with the first input stream.

       Properties and Events
       The connectAfterStart property defines whether the MixerLight connections are established after the simulation starts.The inputFlows and outputFlow properties provide references to the Mixer input and output flows, allowing the component to establish connections with external flow nodes. The onAfterInitialize() event is triggered after the component is initialized, while onSpeedChange() is triggered when the flow rate changes and provides the new flow rate.

MixerLight Statistics

       The MixerLight provides statistics for monitoring material flows, mix ratios, and flow limitations in refinery simulation models. The statistics interface is divided into input and output statistics, providing access to flow values and formatted summaries. Unlike MixerLight, Mixer provides a comprehensive set of statistics for analyzing its operation, including individual input flows, flow ratios, active products, mix factors, total output flow, maximum flow rate, and outlet valve state. Access to the mixer light statistics is provided through the internal statistics variable.

       Input Statistics
       The input statistics object provides methods for monitoring the flow from both mixer inlets and their combined flow. The Input statistics class of MixerLight implements the InputFlowsProvider interface.
       Output Statistics
       The output statistics object provides methods for monitoring the resulting mixed flow and any active outlet flow limitation. The output statistics object implements the SingleFlowProvider interface and provides methods for monitoring the resulting mixed flow and any active outlet flow limitation.

Conclusion

       Mixer simulation in petroleum refining allows two incoming material flows to be combined into a single output stream. MixerLight supports proportional mixing, flow-limited merge operation, inlet flow control, and outlet flow limits. Built-in statistics provide information about individual and total inlet flows, the resulting outlet flow, mix ratios, and active flow limitations, supporting monitoring and analysis within refinery simulation and digital twin models.

FAQ

1. What is MixerLight in petroleum refining simulation?
MixerLight is a simulation element that combines two incoming material flows into a single output stream.

2. How does MixerLight control the mixing of two flows?
The incoming flows can be combined using configurable mix factors and proportional merge mode.

3. Can MixerLight limit the flow from one input?
Yes. Flow-limited merge mode can limit the flow from the second input while allowing material to continue flowing from the first input.

4. Can the outlet flow be limited?
Yes. The maximum outlet flow rate can be controlled using setSpeedLimit(). The current limit can be obtained with getSpeedLimit() and removed with resetSpeedLimit().

5. Can the output be opened or closed?
Yes. The MixerLight has a single output flow that can be controlled using setClosed(). Its current valve state can be checked using isClosed().

6. What statistics are available?
MixerLight provides statistics for individual and total inlet flows, outlet flow, inlet contribution percentages, mix ratios, flow-limited merge mode, and outlet flow limitations.