Specifications
3-82 Extension Transition Objects
3-82
when installing an extension for the first time. When a
transition object is installed for the first time, the IsRecalling
parameter is passed to the extension from HYSYS Petroleum
Refining and is used to initialize local parameters one time only.
In the initialize function the extension obtains the user interface
variable usefeedstrmpetprop and is set to 0.
The Execute function contains the heart of the calculations or
manipulations for stream properties, and where the material
and energy balances occur.
In this extension, the MW and a Petroleum Property the Flash
point will be calculated for a subflowsheet product stream
composed of a different component slate then the feed stream
into the subflowsheet. The properties will be ordered based on
the product stream component boiling points.
Inside the “Is Forgetting” block of the Execute function, Property
Vectors must be added using PropertryVectors from a copy of
Public Function Initialize(ByVal Container As
ExtnUnitOperationContainer, _
ByVal IsRecalling As Boolean) As Long
Set hyContainer = Container
With hyContainer
Set usefeedstrmpetprop = .FindVariable("usefeedstreampetprop").Variable
End With
Set hyFeed = hyContainer.FindVariable("Feed").Variable.object
Set hyProduct = hyContainer.FindVariable("Product").Variable.object
If Not IsRecalling Then
usefeedstrmpetprop = 0 ' use petdata.dll
End If
Initialize = extnCurrentVersion
End FunctionExecute