.. _flowsheet: ========== Flowsheets ========== A :term:`flowsheet` is a visual tool that helps you design and manage calculations within Wood InsightsPlatform (WIP). It consists of a grouping of inputs, :term:`function blocks`, and outputs, where function blocks contain the code or logic of the calculations, processing the input values and generating the output values. The architecture of these components are designed in the Flowsheet Manager. For more information, see :ref:`conf.calc.flowsheet`. Flowsheets are executed by the Calculation Service (see :ref:`calculation.service`) during the calculation cycle, which is triggered by scheduled jobs. Below is an example of a flowsheet architecture: | .. image:: images/wip.flowsheet.png | .. _function.block: Function Blocks *************** A function block is a key component within a flowsheet where users input their code or logic. Function blocks are versatile and can be assigned to one or more flowsheets. **Function Block Templates** Each function block represents an instance of a formula block with direct input/output (I/O). They can be derived from or saved to a function block template, which serves as a reference for future use. When a function block is declared “Fixed” to a template, any changes made to the template will cascade down to all fixed function blocks, ensuring consistency across calculations. **Pins - Input/Output Value Sources** Function blocks can have multiple input/output value sources or targets, known as function block pins. Pins are used to connect function blocks to IO objects (input/output), which are then mapped to tags, constants, or element properties. The number of inputs and outputs is configurable, allowing flexibility in design. Inputs can include data service tag values, hierarchy asset property values, constant values, or outputs from other function blocks. Outputs can similarly be data tag values or constants. .. image:: images/wip.functionblock.pins.png **Internal Parameters** Within each function block, internal parameters can be defined. These parameters can be constant values or results from equation formulas. Parameters can be used in the expression as constants with configured units of measure. They are persisted only within the specific calculation (function block instance), providing a localised scope for intermediate values. **Equations and Logic** Function blocks define equations consisting of one or more lines of formula expressions. These equations undergo parsing for validity checks and can include comments for clarity. Optionally, equations can call out to external components, known as black boxes. For function blocks derived from secure templates, equations are obscured to maintain security. The equations can only be viewed or edited with proper credential entry. For information about configuring function blocks, see :ref:`conf.calc.flowsheet.func.block`. Flowsheet Instances ******************* Flowsheet instancing is a mechanism that allows users to create multiple, independent applications of a single flowsheet. This concept is central to scalable and maintainable model design, especially in environments where the same calculation logic must be applied repeatedly across different units, systems, or scenarios. Rather than duplicating entire flowsheets, which can lead to increased maintenance effort and inconsistencies, flowsheet instancing enables the reuse of a common logic structure while allowing each instance to operate with its own data context. Each instance inherits the logic and structure defined in the flowsheet but is distinguished by its IO mappings, which connect the flowsheet's inputs and outputs to specific data points, specifically, WIP tags. For more information, see :ref:`conf.calc.flowsheet.instances`. .. seealso:: - :ref:`conf.calculation` - :ref:`calculation.service` - :ref:`conf.calc.flowsheet.setup`