-
-
October 22, 2023 at 12:54 am
Bovinille Anye Cho
SubscriberHello 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?
-
October 24, 2023 at 4:07 pm
Mark Owens
SubscriberHi, 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.
-
October 25, 2023 at 11:49 am
Bovinille Anye Cho
SubscriberHello 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.
-
October 25, 2023 at 12:56 pm
Mark Owens
SubscriberOK, 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.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- Suppress Fluent to open with GUI while performing in journal file
- error: Received signal SIGSEGV
-
8768
-
4658
-
3151
-
1678
-
1456
© 2023 Copyright ANSYS, Inc. All rights reserved.