
Customization FAQ A-13
A-13
A.2.2 Unit Operation
Extensions
1. What is the Container for a unit operation extension?
Ans: The ExtnUnitOperationContainer is the Container object
for unit operation extensions. It contains the properties and
methods which are available to them. You can view this
object with an object browser (such as is contained in Visual
Basic) or you can read the extension help file (xhysys.hlp)
which is installed in the HYSYS directory when the extension
SDK is installed.
2. What is the calculation sequence for an extension?
Ans: When a change is made to a variable which affects the
extension, HYSYS performs a Forgetting pass and two
Calculation passes. The Forgetting pass is used to identify
the streams, unit operations, etc. affected by the change.
The first Calculation pass is used to allow the extension to
complete its internal calculations. The second Calculation
pass is made so that external references made by the
extension use correct values. If the extension makes no
external references, then the second pass can be bypassed
using the SolveComplete method of the Container object.
3. How do I prevent the second Calculation pass?
Ans: Add the following near or at the end of the Execute
code.
This method of the Container object prevents the second
Calculation pass from occurring. SolveComplete should only
be used when the extension does not make an external
reference to a product stream. If the extension makes no
external references, then it is recommended that this line be
included to increase efficiency and prevent other calculation
hyContainer.SolveComplete
where:
hyContainer = an object reference to the Container object
made in the Initialize function
Komentáře k této Příručce