Sie sind auf Seite 1von 16

Using Calc Levels 1

1
Using Calc Levels
1999 AEA Technology plc - All Rights Reserved.
ADV 10.pdf
2 Using Calc Levels
2
Introduction
Calc levels are used to determine the order in which streams and unit
operations are solved in HYSYS. Normally, it is not necessary for the
average user to work with these numbers as HYSYS automatically sets
calc levels that are appropriate for most applications.
However, there are certain situations where the calculation time can be
reduced by specifying the order in which you want HYSYS to solve the
flowsheet.
Before anyone can understand how calc levels function in HYSYS, they
must understand how HYSYS solves a flowsheet. For this reason, this
module will deal with both calc levels and the HYSYS solver; in reality,
these two topics are inseparable.
Learning Objectives
In this module, you will learn how to adjust the calc levels in a
simulation, and you will learn how HYSYS solves a flowsheet. You will
also discover when it makes sense to adjust these values and when it
does not.
Prerequisites
Before beginning this module, you should have a solid understanding
of the HYSYS program, and its interface.
Using Calc Levels 3
3
The HYSYS Solver
The HYSYS solver is responsible for all of the calculations that are
performed in a Steady State simulation. The most important thing to
know about the HYSYS solver is that it is a non-sequential solver.
HYSYS is one of the few simulation packages available with this type of
solver.
This means that calculations do not have to be performed in flowsheet
order. As most users are aware, it is possible to have a solved stream as a
product of an unsolved operation. This is only possible with a
non-sequential solver.
Using a non-sequential solver means that information flows both ways
through the flowsheet; upstream operations can be used in the solving
of preceding streams. Because HYSYS is able to move information
forwards and backwards through a simulation less information has to
be specified before the simulation is able to solve.
HYSYS uses a degrees of freedom analysis to trigger the solving of a unit
operation or stream. Users familiar with the column operations in
HYSYS will be able to relate to the degrees of freedom analysis used by
the steady state solver.
When a column is entered into the flowsheet, the degrees of freedom
are shown, only when the degrees of freedom = 0 is the column able to
solve. While the column operations are the only operations in HYSYS
that show the degrees of freedom, HYSYS is automatically keeping track
of the DOF for each operation and stream in the simulation. Once the
DOF = 0 for any operation or stream the solver is activated.
As operations and streams are added to the simulation, HYSYS tracks
all specified values and all calculated values. All values are "filed"
according to their source; every number in HYSYS knows where it came
from. What the user sees as simply a value, HYSYS sees as a value and a
source. The values source can be either a stream, an operation, or user
specified.
If a change is made to a specified value, HYSYS will examine its list of
calculated values and will "forget" any calculated values that can be
traced back to the specified value that has changed. This is known as
the "forget" pass. If the solver is not in Hold mode, the solver will begin
calculations immediately after the "forget" pass is complete, but not
before. Note that HYSYS will only forget those value that are somehow
The steady state Solver and the
dynamic Integrator are
completely separate and
distinct parts of the HYSYS
program.
The results of the "forget" pass
can be seen by putting the
solver in Hold mode. The
"forget" pass will still
function, but the solver will
not solve.
4 Using Calc Levels
4
related to the value that was changed. It is often difficult for users to see
this relationship.
Once the solver is activated, there are several phases to its operation.
First, it ranks all streams and operations according to their respective
calc levels. The streams/operations with the lowest calc levels are
ranked first. Secondly, it checks the DOF for the first item on the list. If a
solution is possible, it will be solved and the solver will move unto the
next item. If it can not be solved, the solver will remove that item from
the current list and move onto the next item.
The solver will continue through the list until all items are solved or
removed from the list.
If, after an item has been removed from the list, a change has occurred
in that item, it is returned to the list and the solver will again attempt to
solve the operation or stream.
A flowsheet that illustrates the process that occurs after the "forget"
pass and the ranking of the individual items is given here.
Using Calc Levels 5
5
Calc Levels and Subflowsheets
In older versions of HYSYS (2.0 and older) the function of calc levels in
subflowsheets was quite different from their role in the newer versions.
In older versions, calc levels were treated as "global." That means that it
did not matter if a unit operation was in a subflowsheet or in the main
PFD, it would be solved with the main solver.
In newer versions of HYSYS (2.1 and up) the calc levels are considered
"local." Therefore, each subflowsheet has its own solver that is
responsible for solving all streams and operations on that sheet.
The default calc level for subflowsheets is 2500, that means that they
will solve after all solvable streams and ordinary unit operations have
been solved in the flowsheet. Note that simultaneous adjusts and
recycles are still moved to the simultaneous solver and solved only after
all other operations (in all flowsheets) have been solved.
Calc levels can now be used in subflowsheets in exactly the same
manner as they are used in the main flowsheet.
The Simultaneous Solver
The simultaneous solver is another, separate part of the main HYSYS
solver. It is responsible for calculation of all Recycle and Adjust
operations that are designated as simultaneous. This solver will only
run after the main solver has successfully calculated all flowsheets.
When a Recycle or Adjust operation is set to calculate simultaneously, it
is removed from the calculation list that the main solver uses, and is
placed on the list for the simultaneous solver. Once a Recycle or Adjust
operation is placed on the simultaneous solvers list, its calc level
becomes insignificant. It will always be calculated after the main
flowsheet has been solved, and at the same time as the other Recycles
or Adjusts.
When Recycles are set as nested, they are calculated by the main solver
as was discussed previously. Setting the Recycles to calculate
simultaneously helps to speed up convergence if there are interactions
between the multiple recycle operations.
6 Using Calc Levels
6
The Default Calc Levels
As mentioned previously, HYSYS automatically sets the calc levels for
operations and streams based on preset defaults. These default values
will be given here.
As you can see, the default calc levels for logical operations will mean
that these will calculate last.
Item Default Calc Level
Material Streams 500
Energy Streams 500
Ordinary Unit Operations -
Pumps, Heaters, Coolers, Valves, Heat
Exchangers, Separators, LNG Exchangers,
Reactors, Spreadsheets, Mixers, Tees, etc.
500
Column Operations and Subflowsheets -
Distillation Columns, Liquid-Liquid
Extractors, Refluxed Absorbers, Reboiled
Absorbers, etc.
2500
Logical Operations -
Adjusts, Recycles, Sets
3500
For calc level purposes, the
Component Splitter and the
Shortcut Distillation column
are considered ordinary unit
operations and have a calc
level of 500.
Using Calc Levels 7
7
Information Summary
The information presented here is not new; rather this section will
serve as a brief summary of the information presented in this module.
The HYSYS Solver:
Is responsible for all steady state calculations in the HYSYS
program.
Is a non-sequential solver, information can flow forward and
backward through the flowsheet.
Uses a Degrees of Freedom analysis to trigger solving of unit
operations and streams.
Tracks all numerical values in HYSYS according to their
source.
Runs after the "forget" pass that erases any numerical value
that can be traced back to the changed value.
Ranks all streams and unit operations according to their calc
level. The items with the lowest calc level will be solved first, if
possible.
Calc Levels and Subflowsheets
The operation of calc levels in subflowsheets has changed in
the newest versions of HYSYS (2.1 and up). They are now
considered local and operate in a manner identical to their
operation in the main flowsheet.
The default calc level for subflowsheets is 2500.
The Simultaneous Solver
The Simultaneous Solver is a separate and distinct part of the
main HYSYS solver. It is responsible for solving all Recycles
and Adjusts that are specified as simultaneous.
The Simultaneous Solver will only solve after all other streams,
operations, and subflowsheets have been solved.
The calc levels of simultaneous recycles and adjusts are not
considered by the simultaneous solver. They are all solved
simultaneously.
8 Using Calc Levels
8
Exercise
In the flowsheet shown above, all of the user specified information is
shown in the tables. The Adjust is used to set the mass flow rate of
stream 2, so that the mass flow rate of stream 6 is 1 kg/hr (2 lb/hr).
Answer the following questions based on the material presented in this
module.
Which item will be ranked last in the solvers list; i.e. which
item has the highest default calc level? ___________
If this entire simulation is unsolved, which item will be
solved first? Hints: Only one item has DOF = 0. This item
must be solved before any other stream or operation can
solve. ______________
If the solver is in Hold mode, and the pressure drop across
the valve is changed, what six items will be affected?
_______________, _______________, __________________,
_______________, _______________, and ______________.
What will happen if the Adjust operation is assigned a calc
level of 400? ______________________________________
________________________________________________.
Would there be any advantage to setting the calc level for
stream 7 at a level greater than 3500, yes or no ? __________
If yes, what is the advantage? ___________
Using Calc Levels 9
9
Additional Exercise
Main PFD
10 Using Calc Levels
10
Subflowsheet #1
Subflowsheet #2
Subflowsheet #3
Using Calc Levels 11
11
Examine the flowsheets on the previous two pages and answer the
following questions.
If the recycles are set to simultaneous, how many separate
and distinct solvers will this simulation have? ___________
Assuming that the flowsheets will solve from left to right,
will the ADJ-1 in Subflowsheet #3 (calc level = 3500, non-
simultaneous) solve before stream 71 in Subflowsheet #2
(calc level = 500), yes or no? ___________
Why? ______________________________________________
What if the ADJ-1 was set to simultaneous? ____________
Why? ______________________________________________
The two recycles in the main flowsheet are set to calculate
simultaneously. Will the column (T-100) be solved before
the recycles will start their calculation? ___________
If the two recycles were set to Nested rather than
simultaneous, would the ADJ-1 in the third subflowsheet
be solved before the recycles began calculation? __________
Is there any way that the calc levels can be manipulated in
order to speed up the solving of the simulation, yes or no?
_________ How? ____________________________________
Can you foresee any difficulties in solving if a non-
simultaneous adjust operation was added to manipulate
the feed flowrate in order to produce a certain liquid
volume flowrate in stream 20, yes or no? ____________
What will happen? __________________________________
12 Using Calc Levels
12
Optional Exercise
Open the HYSYS case ADV Flowsheet.hsc found on the course disk. Try
to decrease convergence time by manipulating the calc levels for
various streams and operations.
With both recycle operations set to simultaneous, add a non-
simultaneous adjust operation to manipulate the molar flowrate of the
Feed stream to result in a Liq. Vol. Flow of 150 m
3
/h (22,500 bbl/day) in
the columns liquid product stream( #20). Attempt to solve the
flowsheet.
Can you decrease convergence time by manipulating the
calc levels? ______________
What happens when this flowsheet tries to solve? _________
What can be done to prevent and correct this behaviour?
________________
Using Calc Levels 13
13
14 Using Calc Levels
14
Answer Key
First Exercise, Page 8
Which item will be ranked last in the solvers list; i.e. which item has the
highest default calc level? ___________
The Adjust operation (ADJ-1) has the highest default calc level
(3500), and will be ranked last in the solvers list.
If this entire simulation is unsolved, which item will be solved first?
Hints: Only one item has DOF = 0. This item must be solved before any
other stream or operation can solve. ______________
The only item with enough user specified information to solve is
the Stream #1. All other streams or operations require
information from another source before they are able to solve.
If the solver is in Hold mode, and the pressure drop across the valve is
changed, what six items will be affected? _______________,
_______________, __________________, _______________,
_______________, and ______________.
The six affected items are: VLV-100, Stream 5, V-100, Stream
6, Stream 7, and the Adjust (ADJ-1).
What will happen if the Adjust operation is assigned a calc level of 400?
____________________________________________________.
Essentially nothing, it will be ranked first, instead of last, in the
solvers list, but it cannot solve until stream 6 has been solved.
Therefore, nothing will happen to the solving order.
Would there be any advantage to setting the calc level for stream 7 at a
level greater than 3500, yes or no ? __________
If yes, what is the advantage? ___________
Yes, though in this case the advantage is so small it can not be
seen. Setting the calc level for stream 7 at 4000 means that it
will solve after all other operations and streams. This means
that the adjust will have completed its calculations. If this
stream were connected to a large column, then the column
would only have to solve once rather than several times. If this
were the case, the advantage would be much greater.
Using Calc Levels 15
15
Additional Exercise, page 11
If the recycles are set to simultaneous, how many separate and distinct
solvers will this simulation have? ___________
This simulation will use six (6) separate and distinct solvers,
one for the main flowsheet, one for each subflowsheet (4) (do
not forget that the column is a separate subflowsheet), and the
simultaneous solver.
Assuming that the flowsheets will solve from left to right, will the ADJ-1
in Subflowsheet #3 (calc level = 3500, non-simultaneous) solve before
stream 71 in Subflowsheet #2 (calc level = 500), yes or no? ___________
Why? ______________________________________________
Yes; once the solver has entered a subflowsheet, it must be
solved to the highest possible level before exiting.
What if the ADJ-1 was set to simultaneous? ____________ Why?
______________________________________________
If the Adjust were set to simultaneous, then the answer above
will change. All Simultaneous adjusts and recycles must be
solved after all operations and streams in all other solvers have
been solved.
The two recycles in the main flowsheet are set to calculate
simultaneously. Will the column (T-100) be solved before the recycles
will start their calculation? ___________
Yes; according to the answer above, all operations and
streams in all other solvers must be solved before the
simultaneous solver will begin its calculations.
If the two recycles were set to Nested rather than simultaneous, would
the ADJ-1 in the third subflowsheet be solved before the recycles began
calculation? __________
Lets look at the calc levels for these operations, the recycles
calc level is 3500 and the sub flowsheets calc level is 2500.
Therefore, the solver for the subflowsheet will be activated
before the recycles will start calculating. In fact, if possible, all
streams and operations in subflowsheets will be solved before
the solver will move onto the next level. Therefore, yes; the
ADJ-1 operation in the third subflowsheet will be solved before
the recycles will start calculating.
16 Using Calc Levels
16
Is there any way that the calc levels can be manipulated in order to
speed up the solving of the simulation, yes or no? _________
How? ____________________________________
No; changing the calc levels will have little, or no, effect on the
speed of the solver.
Can you foresee any difficulties in solving if a non-simultaneous adjust
operation was added to manipulate the feed flowrate in order to
produce a certain liquid volume flowrate in stream 20, yes or no?
__________What will happen? __________________________________
Adding a non-simultaneous adjust operation to the flowsheet
will cause a severe error in the simulation. The adjust will
change the flowrate of the feed stream, but since the Recycle
operation is not solving yet, the flowrate of stream Rec 2 Out
will not change. If this stream does not change, it is impossible
for the flowrate of stream 20 to change; so the adjust operation
will again change the flowrate of feed, but again the flowrate of
stream 20 will not change. This problem can be corrected
either by setting the adjust to simultaneous, or removing the
simultaneous setting from the recycle operation.

Das könnte Ihnen auch gefallen