-
-
January 19, 2020 at 12:19 pm
nick1998
SubscriberHi,Â
I am trying to create a UDF tool to change the Energy Prandtl number laterally for k-e Realizable turbulence model. The number needs to follow a 2nd order polynomial equation (only between a certain Z coordinate/ constant(d)) which I created:
Pr_t=Energy Prandtl Number
z= z coordinate [0 -102] mm
d=constant (190mm)
Pr_t(Z/d) = -5(z/d)^2-e-10(z/d)+0.85 for Z/d between -0.3<=(z/d)<=0
I want to create the Pr_t to be valid for 2 statements:Â
If -0.3<=(z/d)<=0 then Pr_t(Z/d) = -5(Z/d)^2-e-10(z/d)+0.85;Â
Else  Pr_t= 0.4Â
I tried to write a UDF tool for it using notepad++
I get a parse error in line 5 and undeclared variable in line 7.Â
I just started using UDF and I am not really sure how to write them. I have used the Ansys Fluent manual which gives a few examples and they work fine but I couldn't find anything specific to my problem.Â
Thank you for your help.Â
NickÂ
-
January 20, 2020 at 5:37 am
DrAmine
Ansys EmployeeHa0ve a look into the documentation and online C courses.
We do not debug routines. Your line 7 is bad better to introduce d then build whatever you want with z and. Z to be retrieved from Fluent check define profile as example.
-
- The topic ‘Laterally Varying Energy Prandtl Number UDF Tool’ is closed to new replies.
-
3597
-
1283
-
1117
-
1068
-
983
© 2025 Copyright ANSYS, Inc. All rights reserved.