Compiling Fluent UDF DLL lib outside of Fluent GUI (perhaps using Visual Studio GUI or CLI tools?)

    • MikeFair

      We are developing a fairly non-trivial UDF which will likely be including a few of its own external library packages and reused in many Ansys Fluent simulations.

      Compiling and debugging this UDF, using the tools within the Fluent GUI, is quickly becoming tiresome and we'd prefer to use a Visual Studio project to manage the code development, compilation, and testing iterations of the UDF DLL as much as we can.  Especially since there will be multiple people collaborating on the code development itself (e.g. sharing source code via some source code management repository).

      What needs to be done to make this possible?

      Given the makefile, use of nmake, and directory structure the Fluent GUI seems to be using, it seems like with a couple appropriately configured settings in a Visual Studio Build Configuration, this could be fairly direct and straight forward to configure.

      Specifically, we'd like at a minimum to be able to use Visual Studio for the DLL recompilation to manage code syntax and build errors.  We can then use the Fluent GUI to unload/reload the DLL library as we work on it.  We've also proven that by turning on the Debugging symbols and attaching to the Fluent process id, we can get dropped into the Debugger to step through the code (so that's good ).

      Is there a command line build and working directory we can set up in a VS Project?  Has Ansys already created a template project we can modify?  Any assistance to get us going in the right direction on how to get this done would be greatly appreciated.  We can't imagine we're the only/first people using Fluent in the Ansys community to have wanted/wished/considered doing this, and surprisingly it doesn't seem like this question has been asked before.

      In the ideal situation, we could identify a Fluent Case directory to the Visual Studio project and use the Visual Studio "Build/Debug/Run" commands to manage as much of the unloading, rebuilding, reloading of the DLL, and restarting the Solve Calculation in Fluent straight from Visual Studio; I'm not expecting this can be done, but since I'm posting the question, might as well describe the whole scope, in case someone out there actually does have a solution for it.





    • Rob
      Ansys Employee

      I believe it is possible, as a colleague does this on LINUX, however the "how" isn't something I understand or can outline on here.  Assuming you've got a University licence please contact the local support team. 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.