MortenMB
Mechanical
- Apr 18, 2016
- 4
I am trying to access the Initial holdup composition of a separator in a dynamic simulation. Since it seems that it cannot be done with the VBA functions in Excel, I want to do it with the BackDoorVariable function.
The link to the composition is given by:
FlowSht.1/UnitOpObject.400(V-100)/SepStage.500!:MoleFraction.101.0'
How can I access the separation stage of the separator? My code is:
-------------------------------------------------------------------------------------------------------------------------
Dim hyBD As BackDoor
Dim hyOp As Separator
Dim hyFS As Flowsheet
Set hyFS = Hycase.Flowsheet
Set hyOp = hyFS.Operations.Item("V-100")
Set hyBD = hyOp
Set hyBDvar = hyBD.BackDoorVariable("MoleFraction.101.0").Variable
---------------------------------------------------------------------------------------------------------------------------
It returns -32767, which is the empty value…The composition contains values, so it should return the composition value.
I think the error is in the: Set hyOp = hyFS.Operations(oc_Vessels).Item("V-100") , because it doesn’t have the “SepStage” part…Is there any way to include this?
The link to the composition is given by:
FlowSht.1/UnitOpObject.400(V-100)/SepStage.500!:MoleFraction.101.0'
How can I access the separation stage of the separator? My code is:
-------------------------------------------------------------------------------------------------------------------------
Dim hyBD As BackDoor
Dim hyOp As Separator
Dim hyFS As Flowsheet
Set hyFS = Hycase.Flowsheet
Set hyOp = hyFS.Operations.Item("V-100")
Set hyBD = hyOp
Set hyBDvar = hyBD.BackDoorVariable("MoleFraction.101.0").Variable
---------------------------------------------------------------------------------------------------------------------------
It returns -32767, which is the empty value…The composition contains values, so it should return the composition value.
I think the error is in the: Set hyOp = hyFS.Operations(oc_Vessels).Item("V-100") , because it doesn’t have the “SepStage” part…Is there any way to include this?