MATLAB - HYSYS Column feed control

50 views (last 30 days)
junhyo lee
junhyo lee on 4 Oct 2016
Answered: Andrés F. Abril on 14 Nov 2018
I suceed to connect MATLAB(R2015b) - HYSYS(ver7.3). I can control temperature, pressure,etc via MATLAB. I can change total stage number of column and reset/run is also ok to control. BUT I cannot change optional feed stage.
my code is as below.
hCase = h.ActiveDocument;
Column = hCase.Flowsheet.Operations.Item('T-100'); %column name is T-100
Columnflowsheet = Column.ColumnFlowsheet;
ColumnOptionalFeedStage1 = Columnflowsheet.FeedColumnStages.Item(1).StageNumber;
ColumnOptionalFeedStage2 = Columnflowsheet.FeedColumnStages.Item(2).StageNumber;
ColumnOptionalFeedStage1 and 2 are internal real variable.(Library Columnstage)
Command
ColumnOptionalFeedStage1.Value
show me the value. So far good.
I WANT TO CHANGE ITS VALUE. THAT MEANS I WANT TO CHANGE FEED STAGE NUMBER WHICH IS INTEGER.
however,
ColumnOptionalFeedStage1.SetValue(3)
ColumnOptionalFeedStage1.Value = 3
both above does not work.
HOW CAN I CHANGE FEED STAGE?
OR
WHERE CAN I LOOK HYSYS 7.3 LIBRARY? (In MATLAB - Excel interface, navigation through library is possible. I can see all possible sysntax. where in MATLAB?)

Answers (1)

Andrés F. Abril
Andrés F. Abril on 14 Nov 2018
Hi,
Try:
hCase = h.ActiveDocument;
Column = hCase.Flowsheet.Operations.Item('T-100'); %column name is T-100
ColumnOptionalFeedStage1 = Column.ColumnFlowsheet.FeedStreams.Item('1');
ColumnOptionalFeedStage2 = Column.ColumnFlowsheet.FeedStreams.Item('2');
Column.ColumnFlowsheet.Operations.Item("Main_TS").SpecifyFeedLocation(ColumnOptionalFeedStage1, 48); % 48 is the Feed Location
Column.ColumnFlowsheet.Operations.Item("Main_TS").SpecifyFeedLocation(ColumnOptionalFeedStage2, 48); % 48 is the Feed Location
Best Regards.

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!