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. The mixer uses proportional merge mode when both factors meet the minimum threshold. An inlet whose factor falls below that threshold is closed. When either inlet is closed, the binary merge uses neutral 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(). getMixFactors() returns the configured factors. getMixRatios() returns the effective ratios for the current merge mode and inlet valve states. Call setSelectInput1(true) to select inlet 1 or setSelectInput1(false) to select inlet 2. isFirstOnly() checks for a positive first factor and a zero second factor.
Properties and Events MixerLight uses direct flowchart connectors for two inlets and one outlet. outputProductId identifies the outlet product, and useIniSettings enables loading supported settings from an INI file. The
onAfterInitialize() event is triggered after the component is initialized, while onSpeedChange(double newSpeed) reports the outlet rate in tons per hour when the change exceeds the configured threshold or the rate switches between zero and a positive value.
The deprecated setFixedMerge2(double secondarySpeedLimit) enables flowLimitMergeEnabled and stores the argument in totalFlowLimit. A positive totalFlowLimit caps the combined outlet rate. The calculation assigns the available contribution from inlet 2 first within that cap and uses inlet 1 for the remaining target.