CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Cannot Execute DEFINE_ON_DEMAND Function via MATLAB ANSYS_aaS Toolbox

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2019, 13:59
Default Cannot Execute DEFINE_ON_DEMAND Function via MATLAB ANSYS_aaS Toolbox
  #1
New Member
 
Alec H.
Join Date: Aug 2018
Posts: 4
Rep Power: 7
ahouse8 is on a distinguished road
I am currently trying to compile a UDF library and execute a function on demand via the MATLAB ANSYS aaS Toolbox. Using the object function ‘doMenuCommand,’ I am able to compile and load the UDF library using the same text commands as if I were writing a Journal file:

iFluentTuiInterpreter.doMenuCommand('define user-defined compiled-functions compile libudf yes Example1.c’);

iFluentTuiInterpreter.doMenuCommand('define user-defined compiled-functions compile libudf_lpm yes n Example2.h’);


However, when attempting to ‘execute on demand,’ an ‘EFluentGenericError’ is thrown. When attempting to run the following line:

iFluentTuiInterpreter.doMenuCommand('define user-defined execute-on-demand MyFunction::libudf’);

The following error results:

Java exception occurred:

AAS_CORBA.EFluentGenericError: IDL:AAS_CORBA/EFluentGenericError:1.0
at
AAS_CORBA.EFluentGenericErrorHelper.read(EFluentGe nericErrorHelper.java:80)
at
AAS_CORBA._ICoFluentSchemeControllerStub.doMenuCom mand(_ICoFluentSchemeControllerStub.java:95)



I have tried multiple variations of the line in question, all of which return the same error. The Fluent aaS manual states “you will be able to execute the full set of TUI commands in the Fluent Remote Console as if you are running Fluent locally.”

Some other interesting points:

After compiling and loading the udf library from MATLAB, the Define on Demand function can be run via the gui and the tui in the local instance of Fluent. However, when running it from the tui, the function in question does not appear in the list. Fluent states: “Execute on demand function name ["none"]”, but entering “MyFunction::libudf” will run the function.

Any help would be appreciated. The only documentation that is referenced is the aaS manual. No separate documentation exists for the ANSYS_aaS toolbox, but the syntax in that manual has to be tweaked slightly to run in MATLAB.
ahouse8 is offline   Reply With Quote

Old   February 24, 2019, 21:01
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
propably you've forgot "

Code:
iFluentTuiInterpreter.doMenuCommand('define user-defined execute-on-demand "MyFunction::libudf" ’);
or
iFluentTuiInterpreter.doMenuCommand('define user-defined execute-on-demand \"MyFunction::libudf\" ’);
best regards
AlexanderZ is offline   Reply With Quote

Old   February 25, 2019, 11:06
Default
  #3
New Member
 
Alec H.
Join Date: Aug 2018
Posts: 4
Rep Power: 7
ahouse8 is on a distinguished road
The second option with the escape character did the trick! Thank you very much!
ahouse8 is offline   Reply With Quote

Reply

Tags
aas, execute on demand, java error, matlab, udf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Execute DEFINE_ON_DEMAND Function via MATLAB ANSYS_aaS Toolbox ahouse8 ANSYS 0 February 22, 2019 13:48
Very small Matlab job: post-processing OpenFOAM (.CSV) results RbBb CFD Freelancers 1 July 11, 2016 09:00
Matlab PDE toolbox help Alej Main CFD Forum 1 July 19, 2006 06:17
Matlab pde toolbox srijit goswami Main CFD Forum 1 January 30, 2001 20:34


All times are GMT -4. The time now is 21:11.