Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Error message when coupling ANSYS Fluent and Rocky

    • jarmouni
      Subscriber

      Hello,
       
      I am currently working on linking ANSYS Fluent and Rocky and have encountered a problem. I have created a User-Defined Function (UDF) for my ANSYS model, which I have successfully compiled in the program. All the necessary files are present in the simulation directory, including the UDF as C code and the CASE file. However, I get an error message when I try to connect the ANSYS model to Rocky. 
       
      Report of the error message can be found in the appendix.
       
      Could you please help me to solve this problem?
       
      Thank you in advance for your help!


       
       
       
       
       
       
       

       

       

    • Lucas Bertollo Baggio
      Ansys Employee

      Hello,

      you .c file is in the correct place (cfd_coupling folder).

      However, I just found a case where the libudf folder (with the compiled UDF) is also inside the cfd_coupling folder.

      You can also check the Rocky User Manual, section 3.5.11.9.1.2.2. Support for UDMs and UDFs.

       

      best regards,

      Lucas

    • jarmouni
      Subscriber
      Hello Lucas, 
       
      Thank you for your feedback.
       
      I have done the same as is written in this section. However, I always get the same error message. 
       
      I don't know if there is an example where Ansys Fluent (with a UDF) is connected to Rocky?
       
      Thank you for your support!
       
      Kind regards 
       
      Noureddine
    • Jackson Gomes
      Ansys Employee

      Hi Noureddine,

      I have a few questions to help diagnose the issue:

      1. Does the problem persist when you remove the UDF from the model, or does it resolve? This can help identify if the UDF is the root cause.

      2. The validation log could provide valuable information. It’s typically located in the user’s temporary directory, for example:
        C:\Users\[YourUser]\AppData\Local\Temp
        Could you check and share the related log file?

      3. Did you manually copy the .c file to the cfd_coupling directory, or did you leave it in the same location as the .cas file?
        It’s important not to manually copy the .c file into cfd_coupling, as this should happen automatically during validation.

      4. I recommend using the already compiled UDF, as Fluent requires a properly configured compiler to handle source code. Are you providing the source code or the compiled library?

      5. Could you confirm whether you’re using Windows or Linux? This affects how Fluent locates the compiler.

      Best regards,

      Jackson Gomes

    • jarmouni
      Subscriber

      Hi Jackson,

      Thank you for your feedback.

      1. without the UDF, the coupling between Ansys and Rocky works smoothly.

      2. in this directory “C:\Users\[YourUser]\AppData\Local\Temp” I have not found a “log” file (see screenshot below).

      3. the copying was done by Rocky. When pairing I got a question if I allow copying from UDF or not. I confirmed the copying.

      4. i use the source code, in my case “mr-fluid.c”

      5. i am using Windows

      In a simulation, the coupling worked, but after a first time step, no update is made, I have more than 20 hours on one update, but nothing happens. See the simulation log below.
       
       
      Thank you for your support

      Best regards,

      Noureddine Jarmouni

       




    • Lucas Bertollo Baggio
      Ansys Employee

      Hello Noureddine,

       

      • Could you check the log to see if the simulation encountered any errors or divergence?
      • Additionally, please try creating a simpler UDF—for example, a basic message like Message("Hello!")—and see if the case runs successfully.

      I hope I can help you further. 

       

      Regards,

      Lucas

       

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