How to close Fluent from Matlab after a specific time frame?

6 ビュー (過去 30 日間)
Mehdi Areski
Mehdi Areski 2018 年 2 月 18 日
回答済み: SorMun 2023 年 11 月 16 日
Hello, I need some help with matlab/fluent interface. I'm not an expert with matlab. I'm doing a turbomachinery optimization and sometimes when I open fluent with matlab, the program (fluent) keeps working without giving any response. My objective is to program Matlab to automatically close Fluent after a specific time frame in case of error in the program. I launch fluent from matlab with this command: ([status,cmdout])=system(['"C:\Program Files\ANSYS Student\v182\fluent\ntbin\win64\fluent.exe" 2ddp -g -i Journal_Fluent.jou']); but I don't know how to set a working time for fluent, after which it has to close. I tried with the commands tic-toc and timer, but I don't know how to relate them to the command: system(['kill' cmdout]).
Thank you

回答 (2 件)

Mohammed
Mohammed 2022 年 11 月 15 日
編集済み: Mohammed 2022 年 11 月 15 日
hello Mehdi
I am tring to call fluent from matlab and I used c:\program...... but it is not working with me. my issue how can create Journal file ?

SorMun
SorMun 2023 年 11 月 16 日
Hi Mehdi
you can use the Matlab aas toolbox
The toolbox is now availabe for download from Mathworks File Exchange at
This is an example code running a Fluent journal from Matlab.
This symplistic journal would have two lines:
-------------------------------------------------------
report system proc-stats
exit
--------------------------------------------------------
orb=initialize_orb;
load_ansys_aas;
iCoFluentUnit=actfluentserver(orb,'aaS_FluentId.txt');
iFluentTuiInterpreter=iCoFluentUnit.getSchemeControllerInstance();
fluentResult=iFluentTuiInterpreter.doMenuCommandToString('report system proc-stats')
fluentResult=iFluentTuiInterpreter.doMenuCommandToString('aaS.terminate')

カテゴリ

Help Center および File ExchangeComputational Fluid Dynamics (CFD) についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by