-
-
December 25, 2018 at 10:04 am
ashiadarsh
SubscriberI have 10 set of data points...Y vs X...How can i Define this data as an Variable/Expression in CFD Post?
-
December 25, 2018 at 2:39 pm
raul.raghav
SubscriberThis is not something that one would normally do. Can you explain why you want to define a specific data set as an expression or variable?
If you want to define them as an expression, you can use the nested “if” function. For eg., if your X data is var2 and Y data is var1, then define expression for var2 as:
if(var1=yValue1, xValue1, if(var2=yValue2, xValue2, if(var3=yValue3, xValue3, 0)))
If your intention is to create a plot, then you can use the table. -
December 26, 2018 at 3:43 am
ashiadarsh
SubscriberI have to calculate the heat transfer coefficient..in my problem the wall temperature varies in the flow direction.
-
December 26, 2018 at 1:29 pm
raul.raghav
SubscriberDid you define the variable wall temperature in your simulation setup? If it has been setup in your simulation, you don't have to define it again in CFD-Post.
-
December 27, 2018 at 4:12 am
ashiadarsh
SubscriberHi Raul,
I defined the wall temp as profile file in ANSYS FLUENT....I fitted the variation in temp to GAUSS function and incfreased the density of points...now I am facing convergence issue in the solver...the solution converged for the case of constant wall temp,other conditions including the mesh resolution remains the same..any suggestions?
-
January 2, 2019 at 10:46 am
Rob
Forum ModeratorHow are you defining the profile? Ie is it a profile file or did you use a polynomial within a UDF?
-
January 2, 2019 at 4:48 pm
ashiadarsh
SubscriberProfile file with more data points...But i also wanted to know how to write the UDF for a polynomial function ...say for example thermal conductivity variation as a funtion of temperature...if you could send a template for that will be really helpful.
Thank You
Adarsh
-
January 2, 2019 at 5:05 pm
-
January 2, 2019 at 7:11 pm
ashiadarsh
SubscriberDear Rahul,
Thank You for the reply.......That option I Used in my problem...I Just wanted to know about UDF..for example if I wanted to input a variable temperature as boundary condition(I know the functional relationship) i need to write UDF file or I have to the use profile file.
I have one question on the above...If i know the property variation as an exponential function of temp, how can i input the values?for that do i need to write UDF?
Adarsh
-
January 3, 2019 at 5:29 pm
raul.raghav
SubscriberProfile file is easier to use and implement, while a UDF provides you the capability to do a lot more but involves quite a bit of learning in coding and implementing it. However, you can always start with the templates provided by Ansys in the UDF Manual and modify them to your needs. Refer the following UDF template for defining thermal conductivity as a function of temperature.
#include "udf.h"
DEFINE_PROPERTY(k_function,c,t)
{
real kay;
real y, x[ND_ND];
C_CENTROID(x,c,t);
y = x[1];
real temp = C_T(c,t);
kay = /*define your function k(T)*/;
return kay;
}
-
January 4, 2019 at 8:39 am
Amine Ben Hadj Ali
Ansys EmployeeThe customization manual contains several examples like the one shared by Rahul. If you question is now answered please mark this thread as solved. Thanks.
-
- The topic ‘Defining Expressions in CFD Post’ is closed to new replies.
-
4858
-
1587
-
1386
-
1242
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.

