MATLAB - HYSYS Column feed control

조회 수: 6 (최근 30일)
junhyo lee
junhyo lee 2016년 10월 4일
댓글: 启航 2024년 7월 5일
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.
  댓글 수: 1
启航
启航 2024년 7월 5일
Hi,
I want to know what is the "Main_TS"

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Call C++ from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by