You are on page 1of 8

Extensions 1

Extensions

1
© 2004 AspenTech - All Rights Reserved.
EA1000.32.02
02 Extensions
2 Extensions

Introduction
One of the most powerful features of HYSYS is that users are able to
create and add their own unit operations to the program through
extensibility. In this module, the power of this feature will be
demonstrated, however the process required to build an extension in
HYSYS will not be covered.

If you want to learn more about creating unit operation extensions or


other tools, using the extensibility feature of HYSYS; AspenTech offers
another course that will meet your needs. For more information, ask the
instructor.

With unit operation extensions users can create models for unit
operations that are not available in HYSYS. Unit operations can also be
used to perform calculations, much like the depressuring utility also
examined in this course.

The Virtual Stream extension to be used in this module allows the user
to transfer information from one stream to another, creating a “Live
Link” between them.

Learning Objectives
By completing this module, you will learn how to:

• Register extensions in HYSYS.


• Use a prebuilt extension in a HYSYS simulation.

2
Extensions 3

Registering Extensions
Before extensions can be used in a simulation, they must be registered.

1. Open the Tools menu and select Preferences.


2. Click the Extensions tab.

Figure 1

3. Click the Register an Extension button. The Select an Extension to


be Registered view appears.

3
4 Extensions

4. Navigate to where your extension file is located and double-click it


to register it with the system.

Figure 2

Once an extension is registered, it will appear on the Extensions tab, and


you will be able to use it in your simulation.

Figure 3

5. Close the Session Preferences view.

There is no need to restart your computer, although HYSYS may need to


be restarted.

4
Extensions 5

Adding Extensions to Your Simulations


Extensions are added just like any ordinary unit operation in HYSYS.
The only difference is that they do not have an icon on the Object
Palette.

The simplest way to add an extension to your simulation is to follow the


steps below:

1. Press the <F12> hot key to bring up a menu of unit operations.


2. Select the Extensions radio button from the column on the left. The
extensions that are registered with the system will appear in a
column on the right.
3. Select the desired extensions and click the Add button.

Figure 4

If an extension that has just been registered does not show in the list of
available extensions, then restart HYSYS.

5
6 Extensions

Workshop
In this workshop, you will add the Virtual Stream extension to various
Don’t worry if you haven’t
built the Turbo Expander streams in the Turbo Expander case built in the Getting Started module.
plant case. You can use the
“ADV1_GettingStarted_Soln The files for this extension (VirtualStream.dll, VirtualStream.edf and
.hsc” file.
Virtual Stream User Guide.doc) have been supplied to you on the course
disk. In addition to this extension, there are several others available on
the AspenTech support website (support.aspentech.com).

1. Copy these files to a location on the computer's hard disk.

It is not important where on the hard disk you copy these files, but
remember the location as you will need to find these files in order to
register them with the system.

2. Once the files have been copied to the hard disk, move to the
Extensions tab of the Preferences view. (Accessed through the Tools
menu in the main menu bar.)
3. Click the Register an Extension button, and use the file explorer to
locate the VirtualStream.dll file. Opening this file will register it with
the system and allow you to use it in the simulation.
4. Return to the PFD of the simulation and add the extension using the
procedure described previously.
5. On the extension’s Connections tab, use the drop-down list to select
the Reference stream as Feed Gas, and for the Target Stream create a
new stream called Feed Gas VS.

6
Extensions 7

If the Feed Gas stream doesn't appear in the Reference stream drop-
down then the Allow Multiple Stream Connections option must be set
in the preferences (Tools-Preferences menu).

Figure 5

7
8 Extensions

6. On the Parameters tab, configure the extension to transfer the


Pressure, Molar Flow and Composition, with a specified Target
Vapour Fraction, as below.

Figure 6

Tick checkboxes to transfer Specify Multiplier and Offset


information to Target Stream. for transferred variables.

Type Target value for any remaining


degrees of freedom.

This means that stream Feed Gas VS automatically maintains the same
Pressure, Molar flow, and composition as the Feed Gas stream, but will
always have a vapour fraction of 0. In this way, the temperature of Feed
Gas VS is always the bubble point of stream Feed Gas.

Challenge
Connect to the web and investigate the additional extensions available
within the Sample Macros and Extensions section of the Knowledgebase
on the AspenTech support web page at http:\\support.aspentech.com.
In order to access the Knowledgebase you will need to have previously
registered and obtained a login ID.

These can be downloaded and registered in exactly the same way as the
Virtual Stream extension.

Alternatively you may have some others already stored on your


company network or your computer.

You might also like