You are on page 1of 33

ChE 3G4

HYSYS TUTORIALS

Tutorial 1: Introduction to HYSYS – Not Graded ........................................................ 1


A. Learning Objectives:............................................................................................... 2
B. Defining the Simulation Basis ................................................................................ 2
C. Selecting a Unit Set................................................................................................. 3
D. Adding a Stream ..................................................................................................... 3
E. Flash Calculations................................................................................................... 4
F. Adding Utilities....................................................................................................... 5
G. The Stream Property Value..................................................................................... 5
H. Customizing the Workbook .................................................................................... 5
I. Flash Calculations of a Ethanol-Water Mixture ..................................................... 6
J. Additional Exercises (For Extra Practice using the GasPlant Example) ................ 7
Tutorial 2: Propane Refrigeration Loop – 15 Marks .................................................... 8
A. Learning Objectives ................................................................................................ 8
B. Base Case (5 marks)................................................................................................ 8
C. Manipulating the PFD........................................................................................... 10
D. Manipulating Process Variables (10 marks) ......................................................... 10
E. Printing.................................................................................................................. 11
Tutorial 3: Refrigerated Gas Plant - 10 marks ............................................................ 12
A. Learning Objectives .............................................................................................. 12
B. Building the Simulation ........................................................................................ 12
C. Adding the Balance Operation.............................................................................. 14
D. Adding the Adjust Operation ................................................................................ 15
E. Using the Case Study ............................................................................................ 15
F. Bonus (5 Marks) ................................................................................................... 16
G. Saving the Simulation as a Template.................................................................... 16
Tutorial 4: Recycle Operations - 10 marks.................................................................. 17
A. Learning Objectives .............................................................................................. 17
B. Building the Simulation ........................................................................................ 17
C. Installing the Recycles .......................................................................................... 19
Tutorial 5: Separation Columns – 10 marks ................................................................ 21
A. Learning Objectives .............................................................................................. 21
B. Building the Simulation ........................................................................................ 21
C. Column Sub-Flowsheets (Read Only) .................................................................. 26
Tutorial 6: Optimization in HYSYS – 15 marks.......................................................... 27
A. Learning Objectives .............................................................................................. 27
B. Building the Simulation ........................................................................................ 27
C. The Optimizer ....................................................................................................... 29
D. Bonus ( 3 Marks) .................................................................................................. 33

ChE 3G04 Winter 2004 McMaster University 1


Tutorial 1: Introduction to HYSYS – Not Graded

A. Learning Objectives:

• Define a Fluid Package


• Add streams and a separator
• Perform simple flash calculations

B. Defining the Simulation Basis

1. To start HYSYS go to Course Folders, Chemical Engineering, ceng3g03 and click


on HYSYS.Plant. Start a new case by Selecting File, New, Case.
2. Select the Components tab. This tab allows you to add components to your case.
Select these components: N2, H2S, CO2, C1, C2, C3, i-C4, n-C4, i-C5, n-C5, C6 and
H2O. You can also add components by typing their names (ie. methane rather
then C1) with Match. The components should be listed under Component List-1.
Minimize the window.
3. Select the Hypothetical button under Add Component to add a hypothetical
component to the fluid package. These components can be used to model non-
library components, defined mixtures, undefined mixtures or solids. In this case it
will be used to model the components in the gas mixture heavier then hexane. To
create this component, select the Quick Create a Hypo Comp button.
4. On the ID tab type the name, C7+. Move to the Critical tab. Enter 110oC for its
Normal Boiling Pt. Press Estimate Unknown Props to estimate all the other
properties of the hypothetical component. You should get the following base
property values:
Molecular Wt: 111.00
Ideal Liq Density: 745.38

5. Add the hypothetical component to the current component list by


highlighting/selecting it in the Hypo Components group and then pressing Add
Hypo button.
6. HYSYS contains various Fluid Packages that contain necessary information for
performing flash and physical property calculations. Select the Fluid Pkgs Tab.
Create a fluid package by selecting the Add button and choose Peng-Robinson
Equation of State Model (PR)
7. Change the Name from Basis-1 to GasPlant.
8. The fluid package is now defined and you can now start a simulation. Press Enter
Simulation Environment or the Interactive Simulation Environment in the top
toolbar.

ChE 3G04 Winter 2004 McMaster University 2


C. Selecting a Unit Set

The HYSYS edition in the labs should have the default unit set to SI units. The unit set
can be changed.

1. From the Tools menu, choose Preferences. Switch to the Variables tab and click
on Units.
2. Highlight the units you wish to work with and close the window.

We will use SI units for this tutorial and unless otherwise specified.

D. Adding a Stream

There are several ways to add a stream. We will focus on one and you may try the others
if you have time.

Adding a Stream from the Menu Bar

1. Press F11. The stream property view is displayed. Change the stream name to
Feed 1.
2. Enter the compositions of the components by selecting the Composition. Select
Edit. Click on mole fraction as a basis. Enter the following compositions and
press OK. Close the window.

Component Mole Fraction Component Mole Fraction


N2 0.0025 I-C4 0.0115
H2S 0.0237 N-C4 0.0085
CO2 0.0048 I-C5 0.0036
C1 0.6800 N-C5 0.0021
C2 0.1920 C6 0.0003
C3 0.0710 C7+ 0
H2O 0

The following are other ways to add a stream. Move on to Part E. Work on these after
you have completed the rest of the tutorial.

Adding a Stream from a Workbook

1. To open or display the workbook, press the Workbook icon on the top toolbar.
2. Enter the stream name, Feed 2 in the **New**.

ChE 3G04 Winter 2004 McMaster University 3


3. Double click on the Molar Flow cell and enter the following compositions and
click OK.

Component Mole Fraction Component Mole Fraction


N2 0.0002 I-C4 0.0150
H2S 0.0405 N-C4 0.0180
CO2 0.0151 I-C5 0.0120
C1 0.7250 N-C5 0.0130
C2 0.0815 C6 0.0090
C3 0.0455 C7+ 0.0252
H2O 0

Adding a Stream from the Object Legend (F4 if it is not available)

1. Double click on the materials stream (blue) and change the name to Feed 3.
Enter the following compositions.

Component Mole Fraction Component Mole Fraction


N2 0.0050 I-C4 0.0041
H2S 0.0141 N-C4 0.0075
CO2 0.0205 I-C5 0.0038
C1 0.5664 N-C5 0.0037
C2 0.2545 C6 0.0060
C3 0.0145 C7+ 0.0999
H2O 0

E. Flash Calculations

In this section, simple vapour-liquid equilibrium flash calculations from ChE 3D3 will be
performed. HYSYS can perform three types of flash calculations on streams: Pressure-
Temperature, Vapour fraction-Pressure and Vapour fraction-Temperature. Once the
composition of the stream and two of either T, P or vapour fraction are known, HYSYS
performs a flash calculation on the stream.

Try these on Stream Feed 1

1. P-T flash. Set P = 7500 kPa and T = 10oC. The calculated vapour fraction should
be 0.9879.
2. Perform a dew pt calculation by setting P =7500 kPa and vapour fraction to 1.0.
The dew pt should be 11.43oC.
3. Perform a bubble pt calculation by setting P = 7500 kPa and vapour fraction to
0.0. The bubble pt should be –34.32oC.

ChE 3G04 Winter 2004 McMaster University 4


F. Adding Utilities

The utilities available in HYSYS is a useful tool that interact with your process and
provide additional information or analysis of streams or operations.

1. Double click on stream Feed 1.


2. Select the Attachments tab and then select Utilities. Press Create to access the
utilities window.
3. Select envelope and press Add Utility. The Envelope utility should be displayed
4. The critical temperature, -12.06oC, and pressure, 8980 kPa, for the stream should
be displayed.
5. Select the Performance tab and the Plots tab to view the envelope. By pressing
Table, you can view the envelope data in tabular form.
6. You can also add a utility using the Menu Bar – Tools, Utilities.

G. The Stream Property Value

It is possible to view the properties of the individual phases for any stream.

1. Double click on the stream, Feed 1 and enter the temperature –20oC and a
pressure of 6000 kPa. Move the cursor to the left of the view until the cursor
changes the resizing arrows.
2. Drag the edge of the view until all the phases can be seen (Feed 1, Vapour Phase,
Liquid Phase).

H. Customizing the Workbook

HYSYS will allow you to customize the workbook. You can add additional pages,
change the variables that are displayed on current pages, or change the format of the
values which are displayed.

In this exercise, a new workbook tab containing stream properties, Cp/Cv, Heat of
Vapourization and Molar Enthalpy will be added.

1. Open the workbook by pressing the Workbook icon button on the top toolbar.
2. Select Workbook and Setup from the main menu and the setup window will appear.
Under Workbook Tabs, press Add and in the view which appears select Stream+
and OK.
3. A new workbook tab, Streams will be listed in the workbook pages group.
Highlight this tab. Change the name to Other Properties.
4. In the Variables group, press the Delete button until all the default variables are
removed. Click the Add button to add a new variable to the tab.
5. From the Variables list, select Cp/Cv and click OK. Repeat by adding Heat of
Vaporization and Molar Enthalpy. Press the Close button to return to the
workbook.

ChE 3G04 Winter 2004 McMaster University 5


6. The workbook now contains the tab Other Properties which shows the value of
Cp/Cv, Heat of Vaporization and Molar Enthalpy. If there are no values for these
numbers go back to the Stream tab and enter a temperature and pressure for
stream Feed 1.
7. To print a workbook specsheet just right click and select Print Datasheet.
8. Save this file if you wish to try the other methods of adding streams.

I. Flash Calculations of a Ethanol-Water Mixture

In this exercise, we will take the flash calculations from Part D a step further by adding a
separator. To install a flash separator, the following steps need to be performed:

1. Start a new case. Choose a fluid package. Choose UNIQUAC.


2. Select the components ethanol and water. You will learn later on in the course
that the type of fluid package must be appropriate depending on your flash
components. This means that it might happen that one or some of the desired
components do not appear in the list for a certain fluid package. For ethanol-
water mixture the UNIQUAC fluid package is appropriate.
3. Create a feed stream and name it. For flash calculations we need to fix the
required degrees of freedom (4). A liquid-vapour mixture is necessary to allow
separation. We therefore need to find the dew and bubble points, between which
the 2 phases exist. Select P = 100 kPa, F = 100 kgmol/h and 50-50 mole fraction
for each component. Then to calculate the dew point, set the vapour fraction to
1.0. A green OK should appear which indicates the degrees of freedom have been
specified and a converged solution has been found. You should get Tdew =
84.03oC. Now change the vapour fraction to 0.0 to get a bubble point, which is
Tbubb = 79.41 oC. Remove the specification of the vapour fraction and select a
temperature between the dew and bubble point. The vapour fraction should be
between 0.0 and 1.0.

The following table shows dew and bubble points for the feed stream at different
pressures. Verify these with your case.

Pressure (kPa) Tbubb (oC) Tdew (oC)


100 79.41 84.03
150 90.09 94.79
200 98.13 102.9
250 104.7 109.5

4. Press F12. We want a separator. Choose vessel and then separator. On the
window that pops up enter the name of your feed stream into the Inlet, and name
your vapour and liquid outlet and energy streams (ie. Vap, Liq, Q)
5. A yellow warning should appear indicating unknown duty. We will ignore duty
in this case. Select Parameters and enter 0 for the duty. A green OK should now
appear.

ChE 3G04 Winter 2004 McMaster University 6


6. Try these examples for pressure and temperature and verify these results with
your case. To view the properties of the inlet and outlet streams double click on
the separator and choose the Worksheet tab. To view the composition of the
liquid and vapour streams select Composition.

P = 150 kPa, T = 92oC, F = 100 kgmol/h

Feed vap frac: 0.7147


Liquid Flow: 28.53 kgmol/h
Ethanol mol fraction (liquid) 0.3013
Water mol fraction (liquid) 0.6987
Vapour Flow 71.47 kgmol/h
Ethanol mol fraction (vapour) 0.5793
Water mol fraction (vapour) 0.4206

P = 250 kPa, T = 105oC, F = 100 kgmol/h

Feed vap frac: 0.2137


Liquid Flow: 78.63 kgmol/h
Ethanol mol fraction (liquid) 0.4628
Water mol fraction (liquid) 0.5372
Vapour Flow 21.37 kgmol/h
Ethanol mol fraction (vapour) 0.6368
Water mol fraction (vapour) 0.3632

J. Additional Exercises (For Extra Practice using the GasPlant Example)


Try these exercises, the answers are in bold. You will need to add the other streams in
order to answer some of these questions.

1. The critical pt of Feed 2 -1.11oC, 14431 kPa


2. Cricondenbar (max pressure) for Feed 2 16292 kPa
3. Bubble Pt Temperature for Feed 3 at 6000 kPa -53.57 oC
4. Dew Pt Temperature for Feed 2 at 4000 kPa 98.12 oC
5. Vapour fraction for Feed 1 at 5oC and 8000 kPa 0.9487
o
6. Vapour fraction for Feed 2 at 32 F and 10 bar 0.9245
Note: when entering the pressure and temperature click on the unit drop down box
for the correct units. HYSYS will convert these to the default units

ChE 3G04 Winter 2004 McMaster University 7


Tutorial 2: Propane Refrigeration Loop – 15 Marks

Refrigeration systems are commonly found in the natural gas processing and petroleum
refining industry. Refrigeration is used to cool gas to meet a hydrocarbon dewpoint
specification and to produce a marketable liquid. In this tutorial you will construct, run,
analyze and manipulate a propane refrigeration loop.

A. Learning Objectives

• Adding and connecting unit operations to build a flowsheet


• Adding tables to the PFD
• Printing procedures

B. Base Case (5 marks)

Answer the questions that appear as bold and boxed.

1. Start a new case and add the components and fluid package: propane and ethane
and Peng Robinson (Equation of State). Enter the simulation environment.
2. Install a stream. Double click on the stream and enter the following information.

Name 1
Vapour Fraction 0.0
Temperature 45oC
Basis Mole Fraction
C3 Mole Fraction 1.0
C2 Mole Fraction 0.0

3. Add a second stream and enter the following properties:

Name 3
Vapour Fraction 1.0
Temperature -15 oC

What is the pressure of stream 1 in kPa?

4. There are a variety of ways to add unit operations in HYSYS. Last tutorial we
used F12 and the Unit Operations window to install a separator. In this case you
will add the following operations: valve, chiller, compressor, condenser. The
following are alternate ways to install a unit operation. Use the one you feel most
comfortable with. These instructions will use F12.

ChE 3G04 Winter 2004 McMaster University 8


Workbook Select Tools, Workbook and select View.
Open the workbook and go to UnitOps
tab page then click on Add UnitOp
button. The UnitOp window will be
displayed
Object Legend You can select the unit from the icon of
the operation. If this legend is close press
F4 and it will appear. You can either
double click on the appropriate operation
or right click on it and drag it over to the
simulation environment (PFD).

5. Press F12 and click on Piping Equipment. Select Valve and press the add button.
The valve property window should be displayed. For the Feed stream select 1
and for the Product stream type 2. A J-T valve is being modeled so type J-T as
the Name of the valve. Close the window.
6. The chiller operation in the loop is modeled in HYSYS using a heater operation.
The outlet of the chiller will be at its dewpoint. Press F12 and select Heat
Transfer Equipment. Select Heater and Add. In the property window name the
operation Chiller. The inlet is stream 2 and the outlet is stream 3. Name the
energy stream Chill-Q.
7. Select Parameters. Enter the values 1.50e+6 kJ/h and 5.0 kPa for the Duty and
Pressure Drop of the chiller. A green OK should appear. Close the window.

W What is the flow rate of propane in kgmol/h?


What is the valve pressure drop in kPa?
What is the temperature of the valve outlet in oC?

8. The compressor is used to increase the pressure of the inlet gas stream. Press F12
and select Rotating Equipment. Select Compressor and add it. On the property
view window enter the Name of the unit as Compressor the Inlet stream is 3,
Outlet stream is 4, and Energy stream as Compressor-Q.
9. Select Parameters. Enter the Adiabatic efficiency as 75%.
10. To complete the loop we will add a condenser. It is placed between the
compressor and valve and is modeled as a cooler operation. Press F12 and Heat
Transfer Equipment. Select Cooler and Add.
11. In the property view window enter the Inlet stream as 4, the Outlet stream as 1,
the Name of the unit as Condenser and the Energy stream as Condenser-Q.
12. Select Parameters and enter the Pressure Drop: 30 kPa.
13. If your PFD diagram appears to be small you can zoom in on the PFD by
selecting the magnify glass icon and drawing a box around your PFD.

. What is the compressor duty in hp?


Note: 1 J/s = 1.341 x 10-3 hp

ChE 3G04 Winter 2004 McMaster University 9


C. Manipulating the PFD

HYSYS allows users to view properties and tables and print information for the PFD,
unit operations and streams. Try these exercises to get accustomed to these options.

1. For the PFD, right click the mouse and select Add a Workbook Table. Streams
should be highlighted and click on Select. Material and energy data for all
streams should be displayed in the table on the PFD. You can remove the table
by selecting the table, right click the mouse and select Hide.
2. Add a table for stream 4. Select stream 4 and right click on the mouse. Select
Show Table from the menu. You can remove the table in the same manner as
above.
3. Add a table for the valve. Select the valve using the mouse. Right click on the
mouse and select Show table from the menu.

Each workbook has a unit operations page by default that displays all the unit operation
and their connections in the simulation. You can add additional pages for specific unit
operations to the workbook.

1. Open the workbook. In the Menu bar, select Workbook and then Setup.

2. Highlight Unit Ops and press the Add button in the workbook pages group. From
the New Object Type view, double click on Unit Operations and then select
Compressor. Click Ok. A new page, Compressors, containing only compressor
information is added to the workbook.

D. Manipulating Process Variables (10 marks)

Save your base case using File, Save, Case. After manipulating variables of the base case
for Question 1, you may want to re-open the base case and use it for Question 2.

1. In reality, a plant would not have a pure propane refrigeration cycle. There will
always be a small fraction of impurities. Suppose the plant has a 96/4 (mole %)
propane/ethane blend. What effect, if any, does this new composition have on the
refrigeration loop? Use the base case for comparison.

Base Case: 100% C3 New Case: 4 % C2, 96% C3


Flow (kgmol/h)
Valve Pressure Drop (kPa)
Valve Outlet Temp (oC)
Condenser Q (kJ/h)
Compressor Q (hp)

ChE 3G04 Winter 2004 McMaster University 10


2. In the plant there is no instrumentation that can measure or calculate the chiller
duty. However, you know that the compressor is rated for 250 hp and that it is
running at 90% of maximum and 70% adiabatic efficiency. Assume a pure
propane refrigeration cycle. What is the chiller duty in kJ/h? What is the propane
flow rate in kgmol/h. Explain how you solved this problem.

E. Printing

You can print results through the menu bar, from the PFD and using the report manager.
You do not have to print any tables or PFD for this tutorial. Read these procedures only
to become familiar with the printing procedures.

1. To print from the menu bar select File, Print. All worksheets will be printed.
2. To print your PFD, right click on the PFD and select Print PFD.
3. You can also print worksheets for specific streams or unit operations. Select the
unit operation or stream you wish to have information printed. Right click the
mouse and select Print Datasheet. You can view a Preview of the printout as
well.
4. To print using the report manager, select Tools, Reports. Press Create to add a
new report and open the Report Builder. Press Insert Datasheet to add specsheets
to your report. You can add single or multiple unit operations specsheets to the
report.

ChE 3G04 Winter 2004 McMaster University 11


Tutorial 3: Refrigerated Gas Plant - 10 marks

In this simulation, a simplified version of a refrigerated gas plant is to be modified. The


purpose is to find the LTS (low temperature separator) temperature at which the
hydrocarbon dewpoint target is met. The Sales Gas hydrocarbon dewpoint should not
exceed –15oC at 7000 kPa. The incoming gas is cooled in two stages – first by exchange
with product Gas Sales in a gas-gas exchanger and then in a chiller. A Balance operation
will be used to evaluate the hydrocarbon dewpoint of the product at 6000 kPa.

A. Learning Objectives

• Install and converge heat exchangers


• Understand Logical Operations (Balances and Adjusts)
• Use the Case Study tool to perform case studies on your simulation
• Saving the simulation as a template

B. Building the Simulation

Answer any questions that appear in bold and boxed.

1. Start a new case. Enter the following components: N2, H2S, CO2, C1, C2, C3, i-
C4, n-C4, i-C5, n-C5, C6, H2O and a hypothetical component C7+. For the
hypothetical component, choose 110oC for its normal boiling point and select
Estimate Unknown Parameters to determine all other parameters. Use Peng-
Robinson EOS as a fluid package. Enter the simulation environment.
2. Add a stream. Fill in the following values:

Name: To Refrig Pressure: 6500 kPa


Temperature: 15oC Flow Rate: 1500 kgmole/hr

Component Mole Fraction Component Mole Fraction


N2 0.0066 n-C4 0.0101
H2S 0.0003 i-C5 0.0028
CO2 0.0003 n-C5 0.0027
C1 0.7575 C6 0.0006
C2 0.1709 H2O 0.0
C3 0.0413 C7+ 0.0001
i-C4 0.0068

3. Add a separator. Select F12, Vessels and Separator. Enter the following
information:

Name: Inlet Gas Sep Vapour Outlet: Inlet Sep Vap


Feed: To Refrig Liquid Outlet: Inlet Sep Liq

ChE 3G04 Winter 2004 McMaster University 12


The heat exchanger performs two-sided energy and material balance calculations. The
heat exchanger is capable of solving for temperatures, pressures, heat flows, material
stream flows and UA.

4. Add a heat exchanger. Select F12, Heat Transfer Equipment and Heat
Exchanger. Enter the following information.

Name: Gas-Gas Shell Side Inlet: LTS Vap


Tube Side Inlet: Inlet Sep Vap Shell Side Outlet: Sales Gas
Tube Side Outlet: Gas to Chiller

The heat exchanger models are defined as follows:

Weighted – The heating curves are broken into intervals, which then exchange energy
individually. A log mean temperature difference (LMTD) and UA are calculated to each
interval in the heat curve and summed to calculate the overall exchanger UA. The
weighted method is available only for counter current exchangers.

Endpoint – A single LMTD and UA are calculated from the inlet and outlet conditions.
Can be used for simple problems where there is no phase change and Cp is relatively
constant.

5. Switch to the Parameters tab. Under Heat Exchanger Model, select Exchanger
Design Weighted. Under Individual Heat Curve Details, change the number of
intervals to 10 for both streams. Under Exchanger Parameters enter a Tubeside
Delta P of 30 kPa and Shellside Delta P of 5 kPa.

In order to solve the heat exchanger, unknown parameters are manipulated by the solver.
Each parameter specification will reduce the number of degrees of freedom by one. Two
specifications are needed for this exchanger:

Heat Balance = 0 : this is a duty error specification and is needed to ensure that the heat
equation balances. HYSYS will supply this specification by default.

Min Approach = 5oC – this is the minimum temperature difference between the hot and
cold stream.

6. On the Design tab, select Specs. Deactivate the UA specification. Click on the
Active check box for the specification (the X means the specification is active)
7. To add a specification, press the Add button. In the display window enter the
following. Close the window once entering the information.

Name: Temp Approach Type: Min Approach


Pass: Overall Spec Value: 5 oC
What is the flowrate of stream “Gas to Chiller”in kgmol/h?

ChE 3G04 Winter 2004 McMaster University 13


8. Add a cooler to the simulation. F12, Heat Transfer Equipment, Cooler. Enter the
following information:

Name: Chiller Energy Stream: Chiller Q


Feed Stream: Gas to Chiller Product Stream: Gas to LTS

Under the Parameters tab, add a pressure drop of 40 kPa.

9. Add a separator and provide the following information.

Name: LTS Feed Stream: Gas to LTS


Vapour Outlet: LTS Vap Liquid Outlet: LTS Liq

10. Specify the temperature of the stream Gas to LTS to be –25oC.


• What is the pressure of stream “Sales Gas” in kPa?
• What is the temperature of stream “Sales Gas” in oC?
• What is the current available UA for the Gas-Gas exchanger in kJ/oCh?

C. Adding the Balance Operation

The balance operation provides a general-purpose heat and material balance facility.
There are different balances available in HYSYS:

Mole: an overall balance is performed where only the molar flow of each component is
conserved. Outlet streams will have the same molar flow rate and composition as
the inlet stream, but will contain no vapour fraction, temperature or pressure
values.
Mass: Same as above but only the mass flow is conserved.
Heat: Same as above but only the heat flow is conserved.
Mole and Heat: the mole and heat flow are conserved.

Look at the parameters for Sales Gas. The stream parameters are calculated so
there is no way to force the stream to calculate a dewpoint temperature at 7000 kPa.
Adding a mole balance allows you to create a second steam with the same molar
flowrate and composition but no vapour fraction, temperature or pressure.

11. Select F12, Logicals and Balance. Add the following information:

Inlet stream: Sales Gas Outlet Stream: HC Dewpoint

Select the Parameters tab. For the Balance Type, click on Mole.

12. Specify a pressure of 7000 kPa for the stream HC Dewpoint. Set the vapour
fraction to calculate the dew point temperature.

ChE 3G04 Winter 2004 McMaster University 14


What is the dewpoint temperature in oC?
Assuming the pressure is fixed, what other parameter affects the dewpoint?

How can we change the dewpoint in the simulation (Hint: Keep reading on)?

D. Adding the Adjust Operation

The adjust operation is a logical operation. It will vary the value of one stream
variable (independent variable) to meet a required value or specification (dependent
variable) in another stream. The current HC dewpoint does not meet the
requirement of –15oC.

13. Select F12, Logicals and Adjust. On the display window, press Select Var. in the
Adjusted Variable group. From the Object list select Gas to LTS. From the
Variable list, select Temperature. Press Ok to accept the variable and return to
the Adjust property view.
14. Press the Select Var.. button in the Target Variable group. Select HC Dewpoint
Temperature as the target variable. Enter the value of –15oC in the Specified
Target Value box.
15. Switch to the Parameters tab. When considering step sizes, use larger rather then
smaller sizes. The Secant method works best once the solution has been
bracketed by using a larger step size and a converged solution will be found
faster. For this case leave parameters at the default values.
16. Go back to the Connections tab and press Start to begin calculations. To view the
progress of the Adjust, go to the Monitor tab.

What is the chiller outlet temperature to achieve the dewpoint specification in


o
C?

E. Using the Case Study

The case study tool allows you to monitor the steady state response of key process
variables to changes in your process. You select independent variables to change and
dependent variables to monitor. HYSYS varies the independent variables one at a time
and the dependent variables are calculated. Instead of using the Adjust to find the LTS
feed temperature required to achieve the hydrocarbon dewpoint, you can use the Case
Study to examine a range of LTS temperatures and dewpoints.

17. Open the Adjust view. Check the ignore box in the bottom right hand corner.
This turns off the Adjust function which is required for the Case Study function to
be used.
18. From the Tools menu select Databook. On the Variables tab, press the Insert
button. Select the Gas to LTS Temperature as the first variable. Press the Add
button to add the variable.

ChE 3G04 Winter 2004 McMaster University 15


19. Add a second variable. Select the HC Dewpoint Temperature and press the Add
button. Press the close button to return to the Databook.
20. In the Databook, switch to the Case Studies tab. Press the Add button to add a
new case study. Select the Gas to LTS Temperature as the independent variable
(Ind) and HC Dewpoint Temperature as the dependent variable (Dep.)
21. Press the View button to setup the case study. Enter the values for Low Bound,
High Bound and Step Size of –25oC, 5oC and 5oC respectively. Press the Start
button to begin the calculations.

What Gas to LTS temperature range will satisfy the HC Dewpoint specification
(-15oC)?

Reactivate the Adjust operation by unchecking the ignore box.

SAVE THIS CASE ON A DISK

F. Bonus (5 Marks)

What is the log mean temperature difference (LMTD) for the exchanger with an
minimum approach temperature of 5oC? Double Click on the heat exchanger to find this
information.

Suppose now the available UA for the Gas-Gas exchanger is only 1.5 x 105 kJ/oC h.
Make the necessary modifications to your exchanger design to achieve this UA. What is
the affect on your LMTD and minimum approach temperature? Describe the steps you
took to solve this problem in HYSYS.

G. Saving the Simulation as a Template

HYSYS allows the user to save a simulation as a template. A template is a complete


flowsheet that has been stored to disk with some additional information included that
pertains to attaching the flowsheet as a sub-flowsheet operation. Typically, a template is
representative of a plant process module or portion of a process module. The stored
template can be read from disk and installed as a complete sub-flowsheet operation any
number of times into any number of different simulations. The main advantage of a
template is it can link two or more cases together.

22. Choose Main Properties from the Simulation menu.


23. Press Convert to Template button. Press Yes to convert the simulation case to a
template. Answer No to the question “Do you want to save the simulation case.”
Name your template file.

ChE 3G04 Winter 2004 McMaster University 16


Tutorial 4: Recycle Operations - 10 marks

In this tutorial, a typical application of the recycle operation will be used. Feed gas enters the
compressor station at 40oC and 1725 kPa. The gas is to be delivered at 7500 kPa and it is to
be compressed in two stages. Each stage consists of a knockout drum, a compressor and a
cooler. Liquids from each separator are recycled back to the previous stage, after the
pressure has been reduced.

A. Learning Objectives
• Using the Recycle operation in HYSYS

B. Building the Simulation

1. Start a new case and select the Peng Robinson EOS with the following components:
N2, CO2, C1, C2, C3, i-C4, n-C4, i-C5, n-C5, C6.
2. Add a material stream with the following information:

Name To Compression Temperature 40 oC


Pressure 1725 kPa Molar Flow 7500 kgmol/h
Component Mole Fraction Component Mole Fraction
N2 0.0075 i-C4 0.0652
CO2 0.0147 n-C4 0.0578
C1 0.5069 i-C5 0.0515
C2 0.1451 n-C5 0.0431
C3 0.0725 C6 0.0357

3. Install a mixer (F12, Piping Equipment, Mixer) with the following information:

Name: Mixer Inlet: To Compression


Outlet: To LP Sep

On the Design tab select Parameters and select the pressure assignment as Equalize All.

4. Add a separator with the following information:

Name: LP Sep Vapour Outlet: LP Sep Vap


Feed: To LP Sep Liquid Outlet: LP Sep Liq

5. Add a compressor (F12, Rotating Equipment, Compressor) with the following


information:

Name: Stage 1 Outlet: Stage 1 Out


Inlet: LP Sep Vap Energy: Stage 1 HP

Select the Dynamics tab and enter an adiabatic efficiency of 75%. In the worksheet enter a
pressure of 3450 kPa for stream Stage 1 Out.

ChE 3G04 Winter 2004 McMaster University 17


6. Install a cooler with the following information:

Name: Stage 1 Cooler Outlet: Cooler 1 Out


Inlet: Stage 1 Out Energy: Stage 1 Q

In the Design tab select Parameters and enter a pressure drop of 0 kPa. In the worksheet
enter a temperature of 50oC for stream Cooler 1 Out .

7. Add a mixer operation with the following information:

Name: Mixer 2 Outlet: To IS Sep


Inlet: Cooler 1 Out

For the pressure assignment choose Equalize all.

8. Install a separator with the following information:

Name: IS Sep Vapour Outlet: IS Sep Vap


Feed: To IS Sep Liquid Outlet: IS Sep Liq

9. Add a Valve (F12, Piping Equipment, Valve) with the following information:

Name: LetDown 1 Outlet: LD1 Out


Inlet: IS Sep Liq

In the worksheet enter a pressure of 1725 kPa for stream LD1 Out.

10. Install a compressor with the following information:

Name: Stage 2 Outlet: Stage 2 Out


Inlet: IS Sep Vap Energy: Stage 2 HP

Enter an adiabatic efficiency of 75%. In the worksheet enter a pressure of 7500 kPa for the
stream Stage 2 Out.

11. Install a cooler with the following information:

Name: Stage 2 Cooler Outlet: Cooler 2 Out


Inlet: Stage 2 Out Energy: Stage 2 Q

Enter a pressure drop of 0 kPa. In the worksheet enter a Cooler 2 Out temperature of 50oC.

12. Add a separator with the following information:

Name: HP Sep Vapour Outlet: HP Gas


Feed: Cooler 2 Out Liquid Outlet: HP Sep Liq

ChE 3G04 Winter 2004 McMaster University 18


13. Install a valve with the following information:

Name: LetDown 2 Outlet: LD2 Out


Inlet: HP Sep Liq

In the worksheet enter a pressure of 3450 kPa for stream LD2 Out.

1. What is the duty of the two coolers in kJ/h?

C. Installing the Recycles

A recycle operation is a mathematical unit operation. It has an inlet (calculated)


stream and an outlet (assumed) stream. The recycle installs a theoretical block in
the process stream. The feed into the block is termed the calculated recycle stream
and the product is the assumed recycle stream. The following steps take place
during the convergence process:

• HYSYS uses the conditions of the assumed stream and solves the flowsheet up to the
calculated stream.
• HYSYS then compares the values of the calculated stream to the assumed stream.
• Based on the difference between these values, HYSYS modifies the values in the
calculated stream and passes the modified values to the assumed stream.
• The calculation process iterates until the values of the calculated stream match those of in
the assumed stream within specified tolerances (Sequential Modular).

2. Examine the streams LD1 Out and LD2 Out. Fill in the table of Values:

LD1 Out LD2 Out


o
Temperature ( C)
Flow (kgmole/h)
Vapour Fraction
Is Composition known
(y/n)?

3. Can these be used as a guess for the recycle outlet?Why?

ChE 3G04 Winter 2004 McMaster University 19


14. Add the first recycle. Select F12, Logicals and Recycle. Enter the following
information:

Name: RCY-1 Product: RCY-1 Out


Feed: LD1 Out

15. Click on the Parameters tab. HYSYS allows you to set the convergence criteria or
tolerance for each of the recycle variables. Smaller tolerances result in a tighter
convergence requirement. Leave everything at their default.

16. In the Parameters tab select Numerical. This page contains the options for the two
types of recycles, Nested and Simultaneous. In this case, use Nested Recycles. This
page also displays the convergence information as the calculations are performed
(maximum iterations, acceleration method, number of iterations). Use the Wegstein
acceleration method for this case.

Nested: this type of recycle gets called whenever it is encountered during calculations. Use
this type if you have a single recycle or if you have multiple recycles which are not
connected.
Simultaneous: all recycles set at simultaneous will be called at the same time. Use this
option if your flowsheet has multiple inter-connected recycles.

The recycle worksheet page displays the inlet and outlet stream information. In
this case the inlet and outlet streams should have the same values. This is because
before we installed the recycle, the inlet stream was already calculated by HYSYS.

17. Install the second recycle with the following information:

Name: RCY-2 Product: RCY-2 Out


Feed: LD2 Out

18. The final step to solve the flowsheet is to connect the recycle outlets as inlets to
Mixer 1 and Mixer 2. Double click on Mixer 1 and add RCY-1 Out as a feed.
Repeat with Mixer 2 with RCY-2 Out as a feed. Look at the Worksheet tab for each
recycle. The flowrates should be identical for the inlets and outlets. There may be
small differences (see bonus question).

4. Fill in the following table.


RCY 1 RCY 2
Inlet Vapour fraction
Outlet Vapour fraction

BONUS (2 marks):
The vapour fractions will be slightly different in the recycle inlet and outlet for one
or both streams, but should be identical. What can be done to achieve identical
vapour fractions?

ChE 3G04 Winter 2004 McMaster University 20


Tutorial 5: Separation Columns – 10 marks

Recovery of natural gas liquids (NGL) from natural gas is a common procedure in the gas
processing industry. Recovery is done to produce transportable gas free from heavier
hydrocarbons, meet sales gas specification and to maximize liquid recovery (when liquid
products are more valuable than gas). HYSYS can model diffrent column configurations.
In this NGL plant the following three columns will be modeled: De-Methanizer, De-
Ethanizer and De-Propanizer.

A. Learning Objectives
• Add columns (Absorber and distillation)
• Add extra specifications to columns

B. Building the Simulation

1. Start a new case using Peng Robinson EOS as a fluid package and adding
components: N2, CO2, C1, C2…..C8 and enter the simulation.
2. Add a material stream with the following data:

Name Feed 1 Temperature -95oC


Pressure 2275 kPa Flowrate 1590 kgmol/h
Component Mole Fraction Component Mole Fraction
N2 0.0025 n-C4 0.0085
CO2 0.0048 i-C5 0.0036
C1 0.7041 n-C5 0.0020
C2 0.1921 C6 0.0003
C3 0.0706 C7 0.0002
i-C4 0.0112 C8 0.0001

3. Add a second material stream with the following data:

Name Feed 2 Temperature -85oC


Pressure 2290 kPa Flowrate 215 kgmol/h
Component Mole Fraction Component Mole Fraction
N2 0.0057 n-C4 0.0197
CO2 0.0029 i-C5 0.0147
C1 0.7227 n-C5 0.0102
C2 0.1176 C6 0.0037
C3 0.0750 C7 0.0047
i-C4 0.0204 C8 0.0027

ChE 3G04 Winter 2004 McMaster University 21


4. Add a energy stream (select the red arrow from the legend template) and enter the
following information:

Name: Ex Duty Energy Flow: 2.1 x 106 kJ/h

The De-Methanizer is modeled a reboiled absorber operation with two feed streams
and an energy feed stream which represents a side heater on the column.

5. Add the reboiled absorber (F12, Prebuilt Columns, Reboiled Absorber). Enter the
following column information:

Column Name DC1 Top Stage Feed Feed 1


Optional Feed Feed 2 / 2 Optional Feed Ex Duty / 4
Stream / Feed Stream / Feed
Stage Stage
Ovhd Vapour DC1 Ovhd Reboiler Energy DC1 Reb Q
Product Stream
Bottoms Liquid DC1 Btm C. Tray Top Down
Product Numbering

For the optional feed streams make sure the two streams are being fed to the correct
column stage. Select Next.

6. Enter a Top Stage Pressure estimate of 2275 kPa and Reboiler Pressure of 2310 kPa
and select Next. Enter a temperature estimate for the Top Stage as -88oC and
Reboiler temperature estimate of 27 oC. Select Next. No information is supplied for
the Boilup Ratio so select Done.
7. HYSYS will open up the column property view. Select the Design tab and Monitor.
Activate the Ovhd Prod Rate and specify a value of 1338 kgmol/h. Deactivate the
Btms Prod Rate and Boilup Ratio if they are active. This should give zero degrees
of freedom. Select Run to converge the column. If there is no convergence, ask the
TA.

1. What is the mole fraction of methane in DC1 Ovhd.?

It is not always practical to have flow rate specifications. These specifications can result
in columns which cannot be converged or produce streams with undesirable properties.
An alternative approach is to specify either component fractions or component recoveries
in the column product streams.

ChE 3G04 Winter 2004 McMaster University 22


8. In the Design tab select Specs. Press the Add button and select Component
Fractions from the list that appears. Press the Add Specs button.
9. In the display window that appears enter the following information and close the
window:

Name: Comp Fraction Phase: Vapour


Stage: 1 Spec Value: 0.96
Flow Basis: Mole Fraction Components: Methane

10. Select Monitor from the Design tab. The column shows zero degrees of freedom
even though you just added another specification. This is due to the fact that the
specification was added as an estimate, not as an active specification. Deactivate the
Ovhd Prod Rate and activate the Component Fraction of methane. Once the column
has converged you can view the results in the Performance or Worksheet tab.

2. What is the flowrate of the overhead product, DC1 Ovhd in kgmol/h

11. Install a pump (F12, Rotating Equipment, Pump). The pump is used to move the
De-Methanizer bottom product to the De-Ethanizer. Enter the following
information:

Inlet: DC1 Btm Energy: P-100-hp


Outlet: DC2 Feed

In the worksheet, enter a pressure of 2792 kPa for stream DC2 Feed.

The De-Ethanizer column is modeled as a distillation column with 14 stages. It operates


at a pressure of 2760 kPa. The purpose of this column is to produce a bottoms product
that has a ratio of ethane to propane of 0.01.

12. Install a distallation column (F12, Prebuilt Columns, Distillation) and enter the
following information.

Name DC2 No. of Stages 14


Feed Stage/ Stage DC2 Feed / 6 Condenser Type Partial
Ovhd Vapour DC2 Ovhd Ovhd Liquid DC2 Dist
Product Product (Distillate)
Bottom Product DC2 Btm Reboiler Duty DC2 Reb Q
Condenser Duty DC2 Cond Q

ChE 3G04 Winter 2004 McMaster University 23


Enter the following pressures, temperature estimates and column specifications and press
Run:

Condenser P 2725 kPa Reboiler T 95oC


Condenser Delta P 35 kPa Ovhd Vapour Rate 320 kgmol/h
Reboiler P 2792 kPa Distillate Rate 0 kgmol/h
Condenser T -4oC Reflux Ratio 2.5 (molar)

3. What is the flowrate of C2 and C3 in DC2 Btms in kgmol/h?

4. What is the ratio of C2/C3?

13. In the Design tab, select Specs. Press the Add button and select Component Ratio
from the list of specifications. Enter the following information on the display
window which appears.

Name: C2/C3 Phase: Liquid


Stage: Reboiler Spec Value: 0.01
Flow Basis: Molar Components: ethane, propane

14. Select Monitor and deactivate the Ovhd Vap Rate and activate C2/C3 specification.

5. What is the flowrate of DC2 Ovhd in kgmol/h?

15. Add a valve (F12, Piping Equipment, Valve). A valve is required to reduce the
pressure of the stream DC2 Btm before it enters the De-Propanizer. Enter the
following information:

Inlet: DC2 Btm Outlet: DC3 Feed

Enter a DC3 Feed pressure of 1690 kPa.

The final column to be added is the De-Propanizer. It is modeled as a distillation column


with 24 stages. The purpose of this column is to produce an overhead product that
contains no more then 1.5 mole percent i-C4 and n-C4 as well as a concentration of
propane in the bottoms product that should be less then 2 mole percent.

ChE 3G04 Winter 2004 McMaster University 24


16. Add a distillation column with the following information:

Name DC3 No. of Stages 24


Feed Stream/ Stage DC3 Feed/ 11 Condenser Type Total
Ovhd Liquid DC3 Dist Bottom Product DC3 Btm
Product
Reboiler Duty DC3 Reb Q Condenser Duty DC3 Cond Q

Enter the following pressures, temperature estimates and specifications and run the
column:

Condenser P 1585 kPa Reboiler T 120oC


Condenser Delta P 35 kPa Distillate Rate 110 kgmol/h
Reboiler P 1655 kPa Reflux Ratio 1.0 (molar)
Condenser T 38oC

6. What is the mole fraction of C3 in the overhead and bottoms product?

17. Create two new Component Fraction specifications for the column:

Specification 1:

Name: iC4 and nC4 Phase: Liquid


Stage: Condenser Spec Value: 0.015
Flow Basis: Molar Components: i-butane, n-butane

Specification 2:

Name: C3 Phase: Liquid


Stage: Reboiler Spec Value: 0.02
Flow Basis: Molar Component: propane

18. Deactivate the Distillate Rate and Reflux Ratio specification and activate the iC4
and nC4 and C3 specification.

7. What is the flowrate in kgmol/h of the distillate and bottoms products?

ChE 3G04 Winter 2004 McMaster University 25


C. Column Sub-Flowsheets (Read Only)

The column is a special type of sub-flowsheet in HYSYS. Sub-flowsheets contain


equipment and streams, and exchange information with the parent flowsheet through the
connected streams. From the main environment, the column appears as a single, multi-
feed, multi-product operation. The column sub-flowsheet provides a number of
advantages:

Optional use of different Fluid Packages- HYSYS allows you to specify a unique fluid
package for the column sub-flowsheet. This may be useful in instances when a different
fluid package is better suited for the column or column does not use all the components in
the main flowsheet and by decreasing the number of components you may speed up
convergence.

Isolation of Column Solver- The column sub-flowsheet allows you to make changes and
focus on the column without recalculation of entire flowsheet.

Ability to solve multiple towers simultaneously- The column sub-flowsheet uses a


simultaneous solver whereby all operations within the subflowsheet are solved
simultaneously. The simultaneous solver permits the user to install multiple
interconnected columns within the subflowsheet without the need for recycle blocks.

The column sub-flowsheet can be accessed by pressing the Column Environment button
on the Column Property View. You can return to the main environment by pressing the
Parent Environment button.

ChE 3G04 Winter 2004 McMaster University 26


Tutorial 6: Optimization in HYSYS – 15 marks

In this example, a stabilization scheme is used to separate an oil and gas mixture into a
stabilized oil and saleable gas. This approach is used in many gas plants where liquid
production is small and does not warrant a full distillation column. A simple three-stage
separation with heating between each stage is used. The object of the exercise is to select
the let-down pressure and temperatures such that the products revenue less the utilities
cost is maximized. A special tool in HYSYS, the optimizer, will be used to find the
optimal operating conditions.

A. Learning Objectives

• Use the optimizer tool in HYSYS to optimize flowsheets


• Use the spreadsheet to perform calculations

B. Building the Simulation

1. Start a new case using Peng Robinson EOS as a fluid package and add
components C1,C2….C9.
2. Modify the unit set. For this case the units for molar flow are in m3/d_gas, instead
of kgmol/h and units for liquid volume flow are m3/d rather then m3/h. From the
Tools menu select Preferences and go to the Variables tab. Select the SI unit set
as the default. Click on the Clone button. Rename the cloned set to Optimizer.
Move the cursor to the Flow cell. Select m3/d_gas from the drop down menu.
Move the cursor to the Liquid Volume Flow cell and select m3/d.
3. Add a material stream with the following information:

Name Feed Temperature 10oC


Pressure 4125 kPa Molar Flow 28200 m3/d_gas
Component Mole Fraction Component Mole Fraction
C1 0.316 i-C5 0.053
C2 0.158 n-C5 0.053
C3 0.105 C6 0.027
i-C4 0.105 C7 0.026
n-C4 0.105 C8 0.026
C9 0.026

4. Add 3 heaters to the simulation with the following information

Heater 1

Name: Heater 1 Inlet: Feed


Outlet: HotFeed 1 Energy: Steam 1

Enter a pressure drop of 0 kPa and a Duty of 4.25 x 105 kJ/h.

ChE 3G04 Winter 2004 McMaster University 27


Heater 2

Name: Heater 2 Inlet: Stage1 Liq


Outlet: HotFeed 2 Energy: Steam 2

Enter a pressure drop of 0 kPa and a Duty of 3.15 x 105 kJ/h.

Heater 3

Name: Heater 3 Inlet: Stage 2 Liq


Outlet: HotFeed 3 Energy: Steam 3

Enter a pressure drop of 0 kPa and a Duty of 1.13 x 105 kJ/h.

5. Add 3 separators with the following information:

Separator 1

Name: Stage 1 Liquid Outlet: Stage 1 Liq


Feed: HotFeed 1 Vapour Outlet: Stage 1 Vap

Enter a pressure drop of 0 kPa (should be at this value).

Separator 2

Name: Stage 2 Liquid Outlet: Stage 2 Liq


Feed: HotFeed 2 Vapour Outlet: Stage 2 Vap

Delete the pressure drop value (0 kPa is the default).

Separator 3

Name: Stage 3 Liquid Outlet: Liquid Product


Feed: HotFeed 3 Vapour Outlet: Stage 3 Vap

Delete the pressure drop value (0 kPa is the default).

6. Add 2 compressors with the following information:

Compressor 1

Name: Comp 1 Outlet: Comp 1 Out


Inlet: Stage 2 Vap Energy: Comp 1-hp

Enter an adiabatic efficiency of 75%.

ChE 3G04 Winter 2004 McMaster University 28


Compressor 2

Name: Comp 2 Outlet: Comp 2 Out


Inlet: Stage 3 Vap Energy: Comp 2-hp

Enter an adiabatic efficiency of 75%.

7. Add a mixer with the following information:

Name: Gas Mixer Outlet: Gas Product


Inlets: Stage 1 Vap
Comp 1 Out
Comp 2 Out

Set the pressure assignment to Set Outlet to Lowest Inlet.

8. Make the necessary stream specifications

Stage 2 Vap, Pressure 2050 kPa


Stage 3 Vap, Pressure 350 kPa
Comp 1 Out, Pressure 4125 kPa
Comp 2 Out, Pressure 4125 kPa

The vapour pressure is the pressure of a confined vapour in equilibrium with its liquid at
a specified temperature. It is a measure of a liquid’s volatility. Vapour pressure of
gasoline and other volatile petroleum products is commonly measured as a Reid Vapour
Pressure (RVP). RVP is useful in predicting seasonal gasoline performance (high
volatility is needed in winter, lower volatility in summer), as well as the tendencies of
gasolines and other volatile petroleum products toward evaporative loss and fire hazard.

9. The Reid Vapour Pressure (RVP) of the stream Liquid Product should be
approximately 96.5 kPa to satisfy the pipeline criterion. Create a utility by
selecting Tools and Utility. The RVP for a stream is located in the Cold
Properties utility.
1. What is the current RVP for stream Liquid Product?
C. The Optimizer

C. The Optimizer

HYSYS contains a multi-variable steady state optimizer. Once your flowsheet has been
built and a converged solution has been obtained, you can use the optimizer to find the
operating conditions which minimize or maximize an objective function. The optimizer
contains a spreadsheet for defining the objective function as well as any constraints. The
following are some important terminology when dealing with an optimization problem.

ChE 3G04 Winter 2004 McMaster University 29


Primary Variables: these are flowsheet variables whose values are manipulated in order
to minimize/maximize the objective function. You set the upper and lower bound for the
primary variables, which are used to set the search range.

Objective Function: this is the function which is to be minimized or maximized. The


function has to be defined within the spreadsheet.

Constraint Functions: these are inequality or equality functions that are defined in the
spreadsheet. In solving the objective function, the optimizer must meet these constraint
specifications.

In this case we want to maximize profit while achieving a RVP of Liquid Product less
then 96.5 kPa. The revenues from the plant are the Gas Product and Liquid Product.
The associated operating costs are the steam costs for each heater plus the compression
costs for each compressor.

Profit = Revenue – Cost


Profit = Gas Product + Liquid Product – Steam Costs – Compression Costs
2. Which variable can we change to affect steam cost?

3. How is the compression cost measured?

4. Which variables can we change to affect the compression cost (remember the
compressor outlet pressure is fixed)?

5. What should be the process (adjusted) variables be to maximize profit


(there are five)?

ChE 3G04 Winter 2004 McMaster University 30


10. To load the optimizer, select F5. Select the Variables tab. You can define the
process (adjusted) variables. Press the Add button to add the first variable, Steam
1, Heat Flow. Set the low bound to 0 and the high bound to 1 x 106 kJ/h.
Complete the list of process variables below.

Object Variable Low Bound High Bound


Steam 2 Heat Flow 0 kJ/h 1.0e+6 kJ/h
Steam 3 Heat Flow 0 kJ/h 1.0e+6 kJ/h
Stage 2 Vap Pressure 650 kPa 3500 kPa
Stage 3 Vap Pressure 70 kPa 1000 kPa

The optimizer has its own spreadsheet for defining the objective and constraint functions.
Primary variables may be imported and function defined within the optimizer
spreadsheet.

11. Select the Spreadsheet button on the optimizer view to open the spreadsheet. On
the Parameters tab, increase the number of row form 10 to 15. Make sure your
units set is Optimizer not SI. Move to the Spreadsheet tab.
12. HYSYS allows you to import variables from the simulation into the spreadsheet.
The following variables need to be imported into the spreadsheet. Select the
appropriate cell, right-click on the mouse and choose Import Variable. Select the
appropriate variable. In the spreadsheet you may want to write the variable name
in the next cell beside the value.

Cell Object Variable


B1 Utility-1 Reid VP
Select Utility from the
Navigator Scope
B4 Liquid Product Std Liquid Volume Flow
Select Flowsheet from the
Navigator Scope
B8 Comp 1-hp Heat Flow
B9 Comp 2-hp Heat Flow
B12 Steam 1 Heat Flow
B13 Steam 2 Heat Flow
B14 Steam 3 Heat Flow
D4 Gas Product Molar Flow

ChE 3G04 Winter 2004 McMaster University 31


The following constants should be added to the spreadsheet. Do not include their units.

Cell Comment Value


B2 RVP Specification 96.5 kPa
B6 Oil Price 94.35 $/m3
B10 Compression Cost 0.1 $/kw-h
B15 Steam Cost 0.682 $/kw-h
D6 Gas Price 0.106 $/m3_gas

Conversion factor which you will need: 1 kw-h = 3600 kJ

13. In cells D7, D8 and D9, calculate the Gas Revenue, Oil Revenue and Total
Revenue. Watch your units. To write a formula in a cell you do not have to type
the = sign first. Here are the functions you need to know for this case with an
example of what to type in a cell.

Addition (+): +A1+A2


Subtraction (-): +A1-A2
Multiplication (*): +A1*A2

14. Other functions are available by selecting the Functions Help button. The wrong
units will be displayed when each value is calculated. To make these values
unitless go to Variable Type and scroll down to SG.
15. In cells D12, D13, calculate the Compression and steam costs. In cell D14
calculate your Net Revenue (Profit).
16. The Function tab contains two groups, the objective function and the constraint
functions. Close the spreadsheet window and return to the optimizer window.
Select the Functions tab. Select the objective function cell (D14) and select
maximize. For the constraint function select the Add button. For the LHS cell
select cell B1 (current RVP). Select < for the condition. Select cell B2 (RVP
Specification) for the RHS cell. Leave the penalty function as is.
17. Select the Parameters tab. This is used to select the optimization scheme. Select
SQP (Sequential Quadratic Programming). Use the defaults for tolerance and
number of iterations.
18. Move to the Monitor tab and press Start to begin the optimization.

ChE 3G04 Winter 2004 McMaster University 32


6. Fill in the results. Give a brief summary comparing the base case to the
optimized case.

Base Case B. Optimized Case


Gas Product Flow 25343
m3/d_gas
Liquid Product Flow, 17.25
m3/d
Total Profit $ 361.6
Steam 1 Heat Flow, kJ/h 425000
Steam 2 Heat Flow, kJ/h 315000
Steam 3 Heat Flow, kJ/h 113000
Stage 2 Vap Pressure, kPa 2050
Stage 3 Vap Pressure, kPa 350
RVP of Liquid Product Answer to Question 1
kPa

D. Bonus ( 3 Marks)

The pressure of the Stage 3 Vap has been decreased to 70 kPa which is less than
atmospheric. This is not a desired condition for the inlet of a compressor. The inlet of
the second compressor, Comp 2, cannot be less then 125 kPa. What is the maximum
profit that can be obtained with this additional constraint. Explain how you solved this
problem in HYSYS.

ChE 3G04 Winter 2004 McMaster University 33

You might also like