We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

I cannot use UDFs that need hooking in RockyDEM 2-way coupling

    • zhou333708124
      Subscriber

      I set 2 UDFs in my case

      One is "DEFINE_EXECUTE_ON_LOADING" type, this UDF can be auto run and it execute correctly.

      The other is "DEFINE_EXECUTE_AT_END" type, this UDF need to be hooked and it cannot execute in calculation process.

      I check the "start_coupled.jou" and "fluent.log" written by RockyDEM, and I found Rocky set its own UDF by "/define/user-defined/function-hooks/execute-at-end "exchange_rocky_fluent_coupling_data::rocky_fluent_coupling" "inject_remove_particles::rocky_fluent_coupling" """

      This command hooks those two UDFs to execute-at-end, my UDF has been replaced or just not get hooked, so I cannot use UDFs that need hooking in coupling. This command is execute automaticly by Rocky.

      As the Rocky coupling start, there are nothing I can do to pause the process or exchange the files, so if there are anyway to hook my UDFs automaticly?

    • Jackson Gomes
      Ansys Employee

      Hi Zhou,

      Rocky automatically sets its own UDFs in execute-at-end, replacing yours. To work around this:

      1. Use a different hook, like DEFINE_ADJUST.
      2. Modify start_coupled.jou before execution to add your UDF.
      3. Append your UDF to the same hook manually if possible.
      • zhou333708124
        Subscriber

         

         

        Thanks Jackson.

        DEFINE_ADJUST cannot be hooked normally. As you can see, execute-at-end, initialization and adjust are all replaced.

        But some of DEFINE_PROFILE UDFs can be executed.

        To modify start_coupled.jou or hook my UDF manually have the same problem that I can’t pause the process, the calculation is automaticlly execute by Rocky, and if I change the .jou file the process will be shut down.

        If there are any option for user to pause the process and adjust the setting manually?

        Best wish for you

         

         

    • Jackson Gomes
      Ansys Employee

      Dear Zhou,

      Which Rocky version are you using? Also, can you check your .cas file in a text editor like Notepad++ and look for udf/execute-at-end-fcns, udf/init-fcns, or udf/adjust-fcns?

       If Rocky is replacing everything, have you tried running Fluent in interactive mode before starting the coupling?

       

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