ProductMixer Complete Guide for Refinery Product Blending

       ProductMixer is an LP-based refinery product blending component designed for refinery simulation, refinery production planning, and digital twin applications. It automatically optimizes fuel blending while satisfying product product quality specifications and operating constraints. This guide explains ProductMixer architecture, blend optimization algorithms, runtime control, performance metrics, fuel blending properties, and refinery product blending workflows.

What Is ProductMixer

       ProductMixer is a refinery product blending component in the Petroleum Refining Library for AnyLogic refinery process simulation. It combines multiple process streams into finished petroleum products while performing fuel blend optimization using linear programming (LP).
       Unlike conventional process mixers that simply merge incoming flows, ProductMixer performs refinery blend optimization before material reaches the final product. It evaluates every available blending component, allowing either fully automated LP-based optimization or user-defined blending strategies.
       This guide covers everything you need to know about ProductMixer, including its operating modes, optimization algorithms, fuel blending properties, runtime control, performance metrics, and integration into refinery simulation and digital twin models.

Why ProductMixer Is Needed

       Modern petroleum refining and refinery product blending operations require simultaneously satisfying product quality specifications, stream availability, and operational constraints while maximizing production or minimizing additive consumption. Because feedstock properties and operating conditions continuously change, fixed blend recipes quickly become suboptimal.
       ProductMixer addresses this challenge by integrating LP-based blend optimization directly into refinery simulation. It automatically recalculates the optimal blend whenever operating conditions change, ensuring that refinery production remains on specification throughout the refinery simulation.

How ProductMixer Works

       During each refinery simulation optimization cycle, ProductMixer collects the current state of all incoming streams, including flow rates, stream properties of individual blending components, and active product specifications. Based on this information, it either automatically generates and solves an LP optimization model or executes a user-defined blending strategy in Manual Mode. The calculated solution determines the accepted and rejected portions of every inlet stream, after which the simulation immediately resumes using the updated flow distribution.

       The overall workflow consists of five steps:
  1. Collect incoming streams and product specifications.
  2. Build or execute the blending model.
  3. Calculate the optimal blend composition.
  4. Produce the finished product and route rejected streams.
  5. Update performance statistics and wait for the next recalculation.
Learn more: Automatic Product Blending Algorithm, Manual Product Blending Algorithm, and ProductMixer Performance Metrics.

Operating Modes

       ProductMixer supports two operating modes designed for different refinery blending scenarios. Both modes use the same runtime API and performance metrics but differ in how the blend composition is determined.

Automatic Product Blending
In Automatic Mode, ProductMixer automatically generates and solves an LP-based refinery blend optimization model using stream properties, product specifications, and operating constraints. The optimal blend is recalculated whenever operating conditions change, allowing the refinery digital twin to continuously adapt to the current process state.

Learn more: Automatic Product Blending Algorithm.

Manual Product Blending
In Manual Mode, the optimization model is fully defined by the user. Engineers specify the objective function, decision variables, and constraints, enabling ProductMixer to implement custom blending strategies while using the same simulation workflow and runtime interface.

Learn more: Manual Product Blending Algorithm.

Blend Optimization

       At the core of ProductMixer is a linear programming (LP) blend optimization engine for refinery product blending that determines the optimal proportion of each blending component. TThe optimization simultaneously considers stream availability, product quality specifications, and operational constraints to solve a refinery optimization problem.
       Depending on the operating mode, ProductMixer either generates the LP model automatically from the current process conditions or executes a user-defined optimization model. Once the optimization is complete, the calculated blend is immediately applied to the refinery simulation.

The optimization model consists of four main elements:
  • Decision variables representing the flow of each blending component.
  • Objective function defining the optimization goal.
  • Material balance equations ensuring mass conservation.
  • Quality and operational constraints defining the feasible blending region.
Learn more: LP-Based Blend Optimization and Mathematical Formulation of Automatic Product Blend Optimization.

Fuel Blending Properties

       During fuel blending, ProductMixer separates stream properties from finished product specifications, allowing the same blending components to be used for different products and operating conditions. During optimization, every enabled property is converted into a linear constraint that defines the acceptable quality of the final blend.
       Each incoming stream can contain any number of blending properties, such as octane number, sulfur content, density, vapor pressure, cetane number, or refinery-specific quality indicators. Product specifications define the required minimum or maximum limits for these properties and can be organized into multiple specification sets, such as seasonal fuel grades or customer-specific requirements.
       This flexible property model enables ProductMixer to optimize different fuels using the same blending engine without modifying the underlying simulation model.

Learn more: Fuel Blending Properties: Stream and Final Product Characteristics.

Runtime Control

       ProductMixer provides a comprehensive runtime API for controlling refinery product blending during simulation. Engineers can switch between Automatic and Manual modes, update product specifications, trigger optimization manually, modify additive settings, or temporarily disable blending without changing the simulation model.
The component also supports automatic recalculation when operating conditions change, ensuring that the blending solution remains consistent with the current refinery state throughout the simulation.

Learn more: ProductMixer Control in Refinery Simulation.

Performance Metrics

       ProductMixer provides a comprehensive set of performance metrics that describe every stage of the blending process. In addition to inlet and outlet flow rates, the component reports accepted and rejected streams, product quality indicators, additive consumption, and optimization results, giving engineers complete visibility into blending performance. The statistics are organized into five categories: Input Statistics, Product Statistics, Constraint Statistics, Additive Statistics, and Summary Statistics. Together, these metrics support process analysis, optimization validation, production planning, and refinery digital twin dashboards.

Learn more: ProductMixer Performance Metrics in Refinery Simulation.

Typical Applications

       ProductMixer can be applied to a wide range of refinery blending problems, from routine fuel production to advanced digital twin and production planning systems. Its flexible optimization framework allows the same component to support different products, quality specifications, and operating strategies.

Typical applications include:
  • gasoline blending;
  • diesel blending;
  • intermediate product blending;
  • refinery production planning;
  • refinery digital twins;
  • optimization of additive consumption;
  • evaluation of alternative blending strategies.

Key Benefits

       ProductMixer combines refinery simulation and LP-based optimization within a single component, enabling realistic fuel blending without requiring external optimization software. Its flexible architecture supports both predefined and user-defined blending strategies while continuously adapting to changing operating conditions.

Key benefits include:
  • automatic and manual blending modes;
  • integrated LP-based optimization;
  • flexible product quality specifications;
  • dynamic adaptation to changing process conditions;
  • comprehensive runtime API and performance metrics;
  • seamless integration with refinery digital twins and production planning models.

Conclusion

       ProductMixer is a comprehensive refinery product blending and fuel blending optimization solution that combines refinery simulation, process optimization, LP optimization, and process control within a single component. By supporting automatic and manual blending, flexible quality specifications, runtime control, and detailed performance metrics, it enables engineers to build realistic refinery simulation and digital twin models for production planning, optimization, and operational decision support.

FAQ

1. What is ProductMixer?
ProductMixer is a refinery product blending component in the Petroleum Refining Library that combines multiple process streams into finished products using either automatic LP-based optimization or user-defined blending strategies. It supports refinery simulation, production planning, and digital twin applications.

2. How does ProductMixer work?
ProductMixer collects the current state of all incoming streams, evaluates product specifications and operating constraints, calculates the blend composition, distributes material between accepted and rejected streams, and updates the simulation with the new flow distribution.

3. What operating modes does ProductMixer support?
ProductMixer supports Automatic and Manual blending modes. Automatic Mode generates the optimization model internally, while Manual Mode allows users to define their own objective function, variables, and constraints.

4. Does ProductMixer use linear programming?
Yes. In Automatic Mode, ProductMixer automatically formulates and solves a linear programming (LP) model to determine the optimal blend while satisfying all quality and operational constraints.

5. When is the blend recalculated?
The blend is recalculated automatically when inlet flow rates, product specifications, or other operating conditions change. Users can also trigger recalculation manually through the runtime API.

6. What quality properties can ProductMixer optimize?
ProductMixer supports any linear blending property, including octane number, sulfur content, density, Reid Vapor Pressure (RVP), cetane number, benzene concentration, aromatics, oxygen content, and refinery-specific quality indicators.

7. What happens if a blend cannot satisfy all quality constraints?
If no feasible solution exists, ProductMixer automatically prevents the production of an invalid blend. Depending on the operating mode and optimization strategy, incoming streams are redirected to residual outputs or the optimization minimizes quality violations using a penalty-based objective.

8. What are accepted and rejected streams?
Accepted streams are the portions of inlet flows used to produce the final product. Rejected streams are diverted to dedicated residual outlets because including them would violate quality constraints or reduce the optimization objective.

9. Can ProductMixer minimize additive consumption?
Yes. ProductMixer supports optimization objectives that minimize balancing additive consumption while continuing to produce products that satisfy the required quality specifications.

10. Can ProductMixer be integrated into a refinery digital twin?
Yes. ProductMixer is designed for refinery digital twins and integrates directly with simulation models, automatically adapting the blend to changing process conditions throughout the simulation.

11. What statistics does ProductMixer provide?
ProductMixer reports comprehensive performance metrics, including inlet flows, product flows, residual streams, product quality indicators, additive consumption, constraint evaluation, and optimization results through a unified runtime API.

12. What refinery applications is ProductMixer suitable for?
Typical applications include gasoline blending, diesel blending, intermediate product blending, refinery production planning, optimization studies, and refinery digital twin simulations.

13. Does ProductMixer support custom optimization models?
Yes. In Manual Mode, users can define their own optimization model, including decision variables, objective functions, and linear constraints, enabling ProductMixer to solve virtually any refinery blending optimization problem.

14. Does ProductMixer support runtime control?
Yes. The runtime API allows engineers to switch operating modes, update product specifications, modify additive settings, trigger recalculation, and integrate ProductMixer with other Petroleum Refining Library components during simulation.

15. Which optimization objectives are supported?
ProductMixer supports optimization objectives such as maximum product production and minimum additive consumption. The objective can also be changed dynamically during simulation to match current operational requirements.