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.

Turbulent viscosity for transitional SST model in ANSYS Fluent.

    • Bovinille Anye Cho
      Subscriber

      Hello all, how can one access the turbulent viscosity for transitional SST model in a UDF for further calculations? This is needed in my investigation to estimate the turbulent diffusivity for later solving a specie transport equation.

      Although the turbulent viscosity is visible in the GUI, I have tried the macro C_MU_T(c,t) in a User Define Memory (UDM) but it doesn’t work as seen the attached picture. It seems this macro only works for the k-e and k-w models.

      I tried storing in UDMs other variables such as turbulent kinetic energy (with C_K(c,t)), specific dissipation rate (with C_O(c,t)) and strain rate magnitude (with C_STRAIN_RATE_MAG(c,t)), to calculate it according to Menter’s work. However, only the former macro works as the others (i.e., C_O(c,t) and C_STRAIN_RATE_MAG(c,t)) didn’t work.

      Also, I can create a custom field function for turbulent viscosity in the GUI but how does one access this within a UDF? Is there way to pass custom field functions into UDM for UDF calculations?

    • Mark Owens
      Ansys Employee

      Hi, it should work. It works here in testing, at least back to version 2022R2. C_MU_T is the turbulent viscosity for k-e, k-w and transition SST models. Have you hooked your UDF function into the meaterial properties for the UDS diffusivity? You could add the line

      Message("c_mu_t = %e \n", C_MU_T(c,t));

      to your UDF and run for 1 iteration to see what is happening. Only macros documented in the Customization manual are supported.

    • Bovinille Anye Cho
      Subscriber

      Hello Mark,

      Thanks for your reply. I'm running on an ealier version (2022R1), my UDF is hooked into the material property, tried a few iterations and it doesn't work. 

      Nonetheless, I have been able to use the custom feild function and patch it into a user define memory, and then read the UDM within the UDF, it works. Thanks. 

       

    • Mark Owens
      Ansys Employee

      OK, great. I am glad you have a workaround. However, it also works for me in 2022R1 so I can't be sure that upgrading would resolve your issue. No matter what I try, I cannot reproduce what you are seeing. "mut" is a predefined variable so maybe your compiler is doing something strange there. You could try renaming it to udf_mut. If that doesn't work then it would require a deeper investigation that we cannot provide through the forum.

Viewing 3 reply threads
  • The topic ‘Turbulent viscosity for transitional SST model in ANSYS Fluent.’ is closed to new replies.