Vous êtes sur la page 1sur 3

How do I set the value of the same variable in a large number of objects in a flowsheet?

Solution ID:143057Product(s):Aspen HYSYSVersion(s):V8.8, V8.6, V8.4, V8.3, V8.2, V8.1,


V8.0Primary subject:Flowsheet Input/OutputLast Modified:26-May-2015Training
Classes:Click here to see the training options for this product
Problem Statement
The user wants to set the same value for a variable in a large number of objects in a flowsheet, and be
able to change this value without opening each object and introducing a new specification. For example,
we may want to set the same value of temperature or pressure in multiple inlet streams to a pipe network.
Then, we may wish to change this value to a different one, and perform a new simulation.

Solution
There are several ways to connect variables in the flowsheet. Assume that we want to specify the same
value of a variable (e.g. temperature) to N objects (e.g. N streams). Consider the following options:
1- Using a Set function between two blocks. This involves introducing and specifying N-1 blocks, where
the first stream may act as the source object, and all others as the target object. This introduces
additional icons and connections in the flowsheet that may be inconvenient (the user may choose to Hide
these objects one by one). Also, it requires definition of 2 connections and choice of variable. The
relationship between the variables is limited to a linear relation (the default will set the same value in the
target object).

2- Exporting the variable value from a Spreadsheet. This requires creating a spreadsheet and defining the
value of the desired variable in one cell (say, B1). Then, introduce formulas in N cells of the type =B1 (or
other expression, if desired). Afterwards, the value in each calculated cell needs to be exported to each
object. This is done by right-clicking on the cell, choosing Export Formula Result, and navigating to the
desired objects, and associating the same variable.

If a new value is to be introduced to study a different scenario, or when performing a flowsheet analysis
(Case Study, Adjust, etc.), only one variable needs to be considered. In this way all objects will have the
updated value, and calculations performed accordingly.
3- Using Data Tables. When first specifying each stream, send the value for the desired value to a Data
Table (to an existing one or to a newly created one, by right-clicking on the variable field and choosing
Send To/Data Tables).

This will create Data Table ProcData1 if none is created so far. Access this table in the Data Tables
folder in the Navigation pane (left side).

Then, in an application like Excel create a column with the desired value for each variable (this can
be done writing the value once and dragging through a number of rows equal to the number of units)
Copy these values and Paste then into the Data Table for the referred variable. The same value will
now be specified into all streams in the Data Table.
Comparing the effort required by these 3 approaches, one can see that while the Set function is adequate
for a couple of objects in the flowsheet, if you have more, using the Spreadsheet is more useful. However,
the most convenient option is the use of the Data Table, an option usually less explored by users.
Ultimately, users will decide which approach is more suitable for their model.

Keywords
Data Table, Input, Flowsheet, Objects, Set, Spreadsheet

Vous aimerez peut-être aussi