HYSYS Optimization
HYSYS Optimization
Ahmad M. Mokhtar
2016
This page intentionally left blank
HYSYS Optimizer
Introduction: -
Optimization, in general, can be defined as the process, or methodology of making something (as a design,
system, or decision) as fully perfect, functional, or effective as possible; specifically: the mathematical
procedures (as finding the maximum of a function) involved in this.
That’s mean, we try - in optimization - to find the operating conditions which minimize (or maximize) an
Objective Function. This objective function expresses (Mathematically) the intended purpose behind the
process of Optimization.
For example, if we want to achieve the highest profit, it means that we want to reach the perfect (Optimum)
value of the operating conditions which achieve the highest profit without affecting the required quality thus,
the Objective function here is the equation that expresses the profit, any variable whose values are
manipulated in order to minimize (or maximize) the objective function are called Primary Variable, and
the required quality specification is a Constrain on the extent of change in the allowable values of the
variables.
So, Objective Function is created by studying the whole process with its all variables, conditions, and
constrains, and studying their relation with the desired goal of the optimization process.
HYSYS contains a multi-variable steady state Optimizer, the object-oriented design of HYSYS makes the
Optimizer extremely powerful, since it has access to a wide range of process variables for your optimization
study.
Notes:
- There’re many different models of optimization, each differ in the method and algorithm that is used
in solving the optimization, we will go through the default model which is the “Original” model.
- The Optimizer is available for steady state calculations only. The operation does not run in Dynamic
mode.
In the functions tab we specify the following (according to the above numbering in the picture):
1- Specify the cell in the Spreadsheet that represent the Objective Function.
2- Choose whether we need to maximize or minimize that objective function.
3- Specify the cells in the Spreadsheet that represent the Constrains Function.
Any constrain function is represented in the form of
Left hand side condition Right Hand Side
a. Click Add to add a new constrain. (a new constrain row will be added).
b. Under LHS Cell, select the cell from the spreadsheet that represent the Left side of the
constrain function.
c. Under Cond, select the proper condition between the right side and left side (e.g. >, =, <)
d. Under RHS Cell, select the cell from the spreadsheet that represent the Right side of the
constrain function.
→ Connections Tab:
You can import virtually any variable in the simulation into the Spreadsheet, and you can export a cell's
value to any specifiable field in your simulation.
There are two methods of importing and exporting variables to and from the Spreadsheet:
1. Using the Variable Navigator:
a. On the Connections tab, click the Add Import or Add Export button.
b. Then using the Variable Navigator, select the variable you want to import or export.
2. Dragging Variables:
Simply right-click the variable value you want to import, and drag it to the desired location in
the Spreadsheet. If you are exporting the variable, drag it from the Spreadsheet to an
appropriate location.
After importing variables, In the Cell column, type or select from the drop-down list the Spreadsheet cell to
be connected to that variable. When you move to the Spreadsheet tab, that variable appears in the cell you
specified. (see previous figure).
→ Parameters Tab:
On the Parameters tab of the Spreadsheet property view, you can set the dimensions of the Spreadsheet and
choose a Unit Set.
→ Formulas Tab:
The Formulas tab displays a summary of all the formulas included in your spreadsheet. The table lists the
name of the cell the formula is located in, the formula and the result of the formula.
→ SpreadSheet Tab:
The Spreadsheet tab is similar to conventional Spreadsheets (e.g. MS Excel).
The Current Cell group displays information specific to the contents of the highlighted cell.
- If the Cell contain an imported value: The object and variable from which the contents of the
current cell were imported are shown. You cannot change the Variable name, since it is a HYSYS
default.
- If the Cell contain a specifiable value: The Variable Type and Variable Name are shown. You can
choose a new Variable Type from the drop-down list, and you can edit the Variable name.
The HYSYS Spreadsheet has extensive mathematical and logical function capability.
The Available Expressions and Functions property view contains the following tabs:
- Mathematical Expressions
- Logical Expressions
- Mathematical Functions
Note: All functions must be preceded by “+” (straight math) or “@” (special functions like logarithmic,
trigonometric, logical, and so forth).
To view the available Spreadsheet Functions and Expressions, click the Function Help button to open the
Available Expressions and Functions property view.
sin @sin()
cos @cos()
tan @tan()
sinh @sinh()
cosh @cosh()
tanh @tanh()
Ln @ln()
Log @log()
Exponential @exp()
Absolute Value @ABS()
Calculates
Unconstrained Constrained Problems: Constrained Problems:
Method Derivatives
Problems Inequality Equality
BOX X X
Mixed X X X
SQP X X X X
Fletcher-
X X
Reeves
Quasi-
X X
Newton