To call a external program from Fluent using UDF.


Some times, it is necessary to couple a Fluent simulation with an external program, (MATLAB/SIMULINK etc.)
This can be achieved using a UDF macro DEFINE_ADJUST or DEFINE_ON_DEMAND.
External program can be called when Fluent is running through a UDF macro, like DEFINE_ADJUST or DEFINE_ON_DEMAND, etc. Following command can be used in UDF:
system ("gambit identifier &")

The above command is used to fire Gambit from Fluent. Similarly this can be used to invoke any other desired application.
Fluent would wait for that program to complete before continuing to iterate, if DEFINE_ADJUST macro is used.





Show Form
Comments
 
Extremely helpful! Have been trying for a long time to get #include <windows.h> into working to use ShellExecute command to do the same task. Many thanks!
Soheil, Mon Jun 30, 2014