Specifications

Extensibility 3-29
3-29
These previously described interfaces allow a reaction to be
implemented and associated with a HYSYS case through a fluid
package. The Reaction Extension also requires the definition of
two methods in order for the extension to be viable:
Method Description Details
Initialize The Initialize method is
called whenever the
extension is first added
or whenever a case
containing the
extension is reopened.
This is also the
procedure where you
would usually set the
state of the properties
and define the
reactants used.
ByVal Container as
ExtnUnitOperationContainer
The kinetic reaction container object.
ByVal IsRecalling as Boolean
Value related to the state of the extension. False if
created for the first time. True if there is an
existing extension.
Initialize as Long (Return Value)
Return value must be the current HYSYS build. A
constant extnCurrentVersion is provided in the
type library for this purpose.
ReactionRate Called when the
reaction extension is
used. The method is a
function that returns
true when successful
and false if an error
occurs. The calculation
involves returning a
rate value through the
‘Rate’ argument while
the HYSYS solver
iteratively calls the
ReactionRate method.
ByVal hyFluid as Fluid
Fluid based on the input stream to the operation.
ByVal RxnTemperatureInC as Double
Reaction Temperature in HYSYS internal units of
Celsius.
ByVal RxnVolumeInKmolPerM3 as Double
Reaction volume in HYSYS internal units of cubic
meters.
Rate as Double
Rate value, passed by reference, so its value can
manipulated and permanently altered within the
method.
ReactionRate as Boolean
True if rate could be calculated, False if there is an
error.