MATLAB - HYSYS Column feed control

9 ビュー (過去 30 日間)
junhyo lee
junhyo lee 2016 年 10 月 4 日
回答済み: Andrés F. Abril 2018 年 11 月 14 日
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?)
  1 件のコメント
Eng
Eng 2017 年 3 月 18 日
any body know that?

サインインしてコメントする。

回答 (1 件)

Andrés F. Abril
Andrés F. Abril 2018 年 11 月 14 日
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.

Community Treasure Hunt

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

Start Hunting!

Translated by