MATLAB - HYSYS Column feed control
8 次查看(过去 30 天)
显示 更早的评论
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 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!