Fluids

Fluids

Using Fluent UDFs on Linux Cluster

    • LukeM
      Subscriber

      Hello,


      I am running some Fluent simulations involving UDFs, but the computational expense on my computer is large. To overcome this issue, I would like to submit my simulations to a cluster after starting the simulation on my computer. From what I've seen online, I cannot simply load the case/data file on the cluster and run it because the UDFs will not work. Instead, I will need to compile, load, and hook the UDFs from the cluster. While these extra steps are manageable for one simulation, I plan to perform numerous simulations, and performing these extra steps for each simulation will consume a significant amount of time. This concern leads to the following questions:


      1)  Since the UDFs will not change between simulations, can I compile the UDFs once, requiring only loading and hooking the UDFs for subsequent simulations? 


      2)  Is it possible to load a previously-compiled UDF? This step would be necessary if 1) is possible, but it might also be necessary if only certain nodes on the cluster can compile. 


      3)  Using a GUI on my cluster is very inconvenient, so I am trying to only use TUI commands. Is there a simple way to hook the DEFINE_DIFFUSIVITY and DEFINE_SOURCE UDFs through the TUI? The options through /define/user-defined/function-hooks/ do not seem to include those type of UDFs. Also, is there a way to load UDFs through TUI commands? 


      4) Is there a simpler approach to hand this whole issue? I'm sure I'm not the first person to have this problem. 


      A few notes: First, my computer uses Windows while the cluster uses Linux. Second, simply sharing the folder containing my UDF files on my computer is not possible with my cluster -- all files have to be located on the cluster.


      As always, I apologize if these questions are addressed in the user manual. I search through it but could have missed relevant articles. If I did, I would appreciate the names of those articles. 


      Thanks in advance,


      Luke

    • DrAmine
      Ansys Employee
      You need to compile for the version you are deploying in parallel and you can load that library for every Fluent case sharing the same dimension (2d,3d) and same precision.
      All that can be steered thourgh batch journaling.

      The function hooks are for general purpose macros. All others like sources and properties can be selected similarly to setting up a normal case from TUI.
    • LukeM
      Subscriber

      Hi Amine,


      I'm happy to hear that compiled UDFs can be loaded by other simulations and through journal files. After some searching and experimentation, I discovered the define/user-defined/compiled-functions TUI and the necessary inputs. The full address (including the folder name) should be given to the folder created from the "Build" process. 


      For the hooking process, can you provide more information on hooking the source and property UDFs using TUI? Perhaps an article name in the manual? I am having trouble finding the proper commands. 


      Luke


       

    • DrAmine
      Ansys Employee

      I cannot provide an article name but I recommend following.


      You navigate in TUI to the boundary or material or cell zone you want to set. Example to setup a UDF source term for cell zone. You go (in TUI) to define boundary-conditions provide the zone name and go through the contextual menu.


       


    • LukeM
      Subscriber

      Thanks, Amine. This is what I was looking for. 

Viewing 4 reply threads
  • You must be logged in to reply to this topic.