Execute commands through the AAS Toolbox

  • Last Post 29 April 2019
Xabierenko posted this 10 April 2019


Hi! So I have been trying to add the execution of a couple of commands from Matlab making use of the AAS Toolbox. I basically copied the structure that you input in the TUI command prompt on fluent but when I put it in Matlab it doesn't work. 

 These are the couple of commands that need to be executed which when introduced on the TUI command prompt work perfectly: 

solve/execute-commands/add-edit a 41 "time-step" "define/boundary-conditions/zone-type wall) 7 pressure-outlet"
solve/execute-commands/add-edit b 41 "time-step" "define/boundary-conditions/pressure-outlet mv yes no 1067 no yes yes no no no"


But when I try to do the same on MATLAB i just get an error which in my experience doesn't make any sense since I'm just sending a TUI command to fluent which works properly when directly typing it on Fluent:

iFluentTuiInterpreter.doMenuCommandToString(['solve/execute-commands/add-edit a 41 "time-step" "define/boundary-conditions/zone-type wall) ',num2str(mv),' pressure-outlet"'])
iFluentTuiInterpreter.doMenuCommandToString('solve/execute-commands/add-edit b 41 "time-step" "define/boundary-conditions/pressure-outlet mv yes no 1067 no yes yes no no no"')

Java exception occurred:
AAS_CORBA.EFluentGenericError: IDL:AAS_CORBA/EFluentGenericError:1.0

    at AAS_CORBA.EFluentGenericErrorHelper.read(EFluentGenericErrorHelper.java:80)

    at AAS_CORBA._ICoFluentSchemeControllerStub.doMenuCommandToString(_ICoFluentSchemeControllerStub.java:126)

Thanks for your help!!





Order By: Standard | Newest | Votes
Xabierenko posted this 26 April 2019

No answer in 3 weeks,... Doesn't anybody know anything about this? Isn't supposed to be a easy thing to implement?

Xabierenko posted this 26 April 2019

I have also tried creating a macro on Fluent where my commands are saved. I end up with the following macro:

 '((MitralValve . "(cx-gui-do cx-activate-item \"Execute Commands*PanelButtons*PushButton2(Cancel)\")\n/solve/execute-commands/add-edit a 41 \"time-step\" \"define/boundary-conditions/zone-type wall) 5 pressure-outlet\" \n/solve/execute-commands/add-edit b 41 \"time-step\" \"define/boundary-conditions/pressure-outlet mv yes no 1067 no yes yes no no no\" \n(cx-gui-do cx-activate-item \"Calculation Activities*PushButton7(Create/Edit)\")\n")

So then when I save the macro in a macro.scm file I can load it and execute it from the TUI command prompt. If done directly from the fluent prompt it works perfectly:

/file/read-macro macros.scm
/file/execute-macro mitralvalve

However, once again when I do the exact same thing on MATLAB through the aas toolbox it fails. Any idea of why is this happening? Doesn't make any sense to me... I have tried everything.

iFluentTuiInterpreter.doMenuCommandToString('/file/read-macro macros.scm')
iFluentTuiInterpreter.doMenuCommandToString('/file/execute-macro mitralvalve')
ans =

Warning: An error or interrupt occurred while executing the macro.

Some commands may not have been completed.

Any help is welcomed, I am quite in a hurry at the moment.



spatel posted this 29 April 2019

Perhaps the issue is due to Matlab and Fluent version being used.

Where did you get the Matlab Tool Box from? Did it mention which Matlab version it supports - e.g. MatlabR2014b - 2018b?

And which version of Fluent are you using - 2019R1?