-
-
October 22, 2023 at 12:54 amBovinille Anye ChoSubscriber
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?
-
October 24, 2023 at 4:07 pmMark OwensAnsys 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.
-
October 25, 2023 at 11:49 amBovinille Anye ChoSubscriber
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.Â
Â
-
October 25, 2023 at 12:56 pmMark OwensAnsys 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.
-
- The topic ‘Turbulent viscosity for transitional SST model in ANSYS Fluent.’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Script error Code: 800a000d
- Cyclone (Stairmand) simulation using RSM
- Fluent fails with Intel MPI protocol on 2 nodes
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
-
1236
-
543
-
523
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.