Material balance becomes most critical in
hybrid refinery digital twins where optimization and simulation operate as tightly coupled layers of the same decision system.
In
Petroleum Refining Library, optimization models (primarily
linear programming) generate target flow allocations across Sources, Process Units, and
Reservoir Parks. These targets define an ideal operating plan that satisfies capacity constraints, production goals, and blending requirements under a simplified mathematical representation of the refinery.
The simulation layer is responsible for executing these plans under physically consistent conditions. It continuously enforces material balance at every node while propagating flows through a dynamic, event-driven system. When
optimized targets cannot be fully realized due to local constraints—such as storage saturation, unit availability, or transient system states—the simulation adjusts actual flows while preserving local conservation rules.
This creates a clear separation of responsibilities:
optimization defines the desired system state, while simulation determines the feasible physical realization of that state. Material balance acts as the coupling mechanism between these layers, ensuring that any deviation between planned and executed behavior remains physically consistent and traceable.
As a result, the digital twin operates as a closed-loop system in which
optimization proposes, simulation validates, and material balance guarantees coherence between planning and real system dynamics.