
2-44 Key HYSYS Objects
2-44
accessed to determine the type of phase.
The example below, enumerates through the FluidPhases of a
Fluid and displays the phase type for each fluid in a property
view.
2.4.6 Operation Objects
A majority of the unit operations in HYSYS are accessible as
Automation objects. Operations can be accessed through the
flowsheet object. Each operation typically has a characteristic
set of properties and methods.
Syntax: FluidPhase(s)
Through Collection
Set hyFluidPhase = hyFluid.FluidPhases.Item(0)
HeavyLiquidPhase
Set hyFluidPhase = hyFluid.HeavyLiquidPhase
LightLiquidPhase
Set hyFluidPhase = hyFluid.LightLiquidPhase
VapourPhase
Set hyFluidPhase = hyFluid.VapourPhase
Example: FluidPhase
Dim i As Integer
Dim hyCase As SimulationCase
Dim hyfluid As Fluid
Dim hystream As ProcessStream
Dim hyPhase As FluidPhase
Dim hyPhases As FluidPhases
Set hystream = hyCase.Flowsheet.MaterialStreams.Item(0)
Set hyfluid = hystream.DuplicateFluid
Set hyPhases = hyfluid.FluidPhases
i = 1
For Each hyPhase In hyPhases
If hyPhase.PhaseType = ptVapourPhase Then
MsgBox “Phase “ & i & “ is the vapour phase”
i = i + 1
End If
Next
Komentáře k této Příručce