Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Compile and load a UDF automatically when running Fluent on an HPC cluster

    • a.y.al-wardi
      Subscriber
      I have a transient Fluent simulation with a compiled UDF (`decomp_fff1.c`) that has been successfully compiled and loaded on my Windows workstation. The UDF function is `ozone_decomposition_source` and is assigned to the appropriate cell zone.
       
      I now want to run the same case on an HPC cluster (Eddie), where Fluent runs on Linux.
       
      I understand that the Windows `libudf` should not be transferred to the Linux cluster and that the `.c` source file should instead be compiled on Eddie to generate a Linux-compatible `libudf`.
       
      What is the recommended way to include the UDF compilation/loading in a Fluent journal (`.jou`) so that the UDF is automatically compiled and loaded when the case is submitted as a non-interactive HPC job?**
       
      I have recorded the compilation process on Windows, but Fluent generates `cx-gui-do` commands such as: `(cx-gui-do cx-activate-item "Compiled UDFs*Frame8*PushButton2(Build)")` rather than a simple TUI command.
       
      Is there a recommended TUI/journal command for compiling a `.c` UDF on Linux?
       
      Thank you!

       

    • Rob
      Channel Partner

      Use a TUI (console) journal. Click into the console and press to open a menu type it in and hit    To move up a menu level use q (Q).  The Search tool in the top right is also helpful for finding things. 

      The command is likely under /define/user-defined   and always use the full command preceded by the /  

       

    • abhiroy
      Subscriber

      Hello, 

      You can use the following command to compile the UDF 

      /define/user-defined/compiled-functions compile libudf Yes sample_udf.c ""

       

      Then use following command to load the library 

      /define/user-defined/compiled-functions load libudf

       
Viewing 2 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]