Articles in this section

The Calculator Functionality

What is the Calculator Functionality?

Video Tutorial: How to Set Up & Leverage a User-Defined Property

Video Tutorial: How to Set Up & Leverage a Calculator Block

Writing Subexpressions and Final Expressions

Differences in the Property Selection Windows

Recommendations

Calculator Functionality: FAQs

Objective

This article provides a detailed overview of the new Calculator Functionality introduced in Version 12 of OLI Flowsheet: ESP. We will differentiate the global User-Defined Property from the Calculator Block, explain their respective inputs, guide you through creating expressions, and showcase how to apply this functionality using practical examples.

Disclaimer: The user interface, calculations, and results displayed in this article are from OLI Flowsheet: ESP Version 12.0.0. Other software versions may appear different or present slightly distinct results due to continual developments to the software and thermodynamic databanks.

What is the Calculator Functionality?

This functionality allows users to create and monitor custom properties based on existing variables and mathematical expressions, directly in the OLI workspace. The Calculator is a flexible tool that empowers users to develop properties tied to various operational insights, such as economic factors or process-specific parameters.

The functionality is available in two forms:

  1. Global User-Defined Property
  2. Calculator Block

Global User-Defined Property:

This feature enables the creation of a Global Variable, which is applied to all streams in the Flowsheet file.

Video Tutorial: How to Set Up & Leverage a User-Defined Property

[0:07] Create a Global-User Defined Property

[2:03] Leveraging the Global User-Defined Property

[2:10] View the property in stream callouts

[2:34] View the property in stream Report

[2:57] Use the property in defining controller targets

[3:28] Use the property to define Optimizer's objective function

Note: videos can be made full-screen.

  • The variable can be included in stream callouts.
  • It is listed in the report for every stream.
  • It can be specified as a target in controllers, such as the “Value” in a Feed-forward Controller or “Target” in a Feedback Controller.
  • It can be used to define the objective function in an Optimizer run.
  • Subexpressions and final expressions can be defined using the LUA syntax.

Calculator Block:

The Calculator Block is a new unit in the Object Library of Flowsheet: ESP. Like the global User-Defined Property, it supports custom variable creation. Notably, however, the Calculator Block accesses properties tied to individual streams and blocks, thereby creating local variables.

Video Tutorial: How to Set Up & Leverage a Calculator Block

[0:12] Adding a Calculator Block

[1:47] Adding a Sensitivity Analysis to evaluate the Calculator Block outputs

[3:17] View the Calculator Block outputs in a callout box and Report

[3:42] Propagating a Calculator Block output variable to a controller

  • Outputs can be added to the Calculator Block’s callout.
  • Outputs are listed in the report for the Calculator Block.
  • Outputs can be specified as a target in controllers, such as the “Value” in a Feed-forward Controller or “Target” in a Feedback Controller.
    • Note: A Calculator Block can hold up to 10 local variables, but only one variable can be propagated to a controller.
  • Outputs can serve as monitored variables in a Sensitivity Analysis and plotting.
  • Subexpressions and final expressions can be defined using the LUA syntax.

Writing Subexpressions and Final Expressions

Subexpressions and final expressions can be defined using the Lua programming language syntax. You can find more details on Lua mathematical functions and naming conventions in this article here.

Differences in the Property Selection Windows

  • User-Defined Property: Selection options include global OLI-calculated Stream Properties, which are those properties that are calculated for all streams in the file. Therefore, this feature creates a global variable.
  • Calculator Block: The user indexes into an OLI-calculated property corresponding to a specific stream or block, thereby creating local variables.

       

                     a) User-Defined Property                                                  b) Calculator Block

 

Recommendations

  • Ensure that you select the correct units at the stream/block level before configuring the Calculator Functionality.
  • Include the Calculator Block in the Block Calculation Order by navigating to an empty area of the Flowsheet workspace, then selecting “Block Calculation Order” > Edit.

Calculator Functionality: FAQs

Q. Do I need a separate license to access the Calculator Functionality?

A. No, it is included in Flowsheet: ESP Version 12.

 

Q. Is there a limit to the number of variables in a Calculator Block?

A. Yes, each Calculator Block can hold up to 10 output variables.

  • Each output variable can contain:
    • 10 stream properties,
    • 10 block properties, – or –
    • 10 stream + block properties combined.

 

Q. How many global User-Defined Properties can I create?

A. You can create up to 25 User-Defined Properties per Flowsheet file.

 

Q. How does the output from a Calculator Block work in a controller?

A. If an output variable is sent to a Feedback or Feed-forward Controller, it will override the controller’s target or value specifications, respectively.

 

Q. How does a User-Defined Property work in a Controller?

A. It can serve as the “Measured Property” for a Feed-forward or the “Spec. Type” in a Feedback Controller.

       

 

Q. When should I use a User-Defined Property vs. a Calculator Block?

A. Use a User-Defined Property for variables that should apply to all streams in the file. Use a Calculator Block for localized calculations, such as calculating costs tied to individual streams.

 

Q. Can User-Defined Properties be accessed in a Calculator Block?

A. Yes, as they are considered Global Variables.

 

Q. Can variables from a Calculator Block be accessed in User-Defined Properties?

A. No; variables created in a Calculator Block are local to the block itself.

 

Q. Can the outputs from one Calculator Block feed into another?

A. No; variables created in a Calculator Block are local to the respective block.

 

Was this article helpful?
1 out of 1 found this helpful