CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Problem with interpreting UDF (http://www.cfd-online.com/Forums/fluent-udf/70856-problem-interpreting-udf.html)

Boris Kloser December 8, 2009 07:51

Problem with interpreting UDF
 
Hi, I am trying to write a UDF to define a temperature gradient along a boundary. When I try to interpret my UDF a message appears saying "line 7: parse error." which is the DEFINE_PROFILE(temperature_profile,t,i) line of my UDF shown below. I am relatively new to UDFs and can't see what is wrong with it. Can anybody help? Thank you.

#inlcude "udf.h"
#define TMAX 400.0
#define TATM 300.0
#define A 0.00001
DEFINE_PROFILE(temperature_profile,t,i)
{
face_t f;
real x[ND_ND];
real r, k ,h;

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
k = x[0];
h = x[1];
r = sqrt(k*k+h*h);
F_PROFILE(f,t,i) = (TMAX-TATM)*(exp(-(A/3)*r*r))+TATM;
}
end_f_loop(f,t)
}

jsm December 30, 2009 00:48

Quote:

Originally Posted by Boris Kloser (Post 239109)
Hi, I am trying to write a UDF to define a temperature gradient along a boundary. When I try to interpret my UDF a message appears saying "line 7: parse error." which is the DEFINE_PROFILE(temperature_profile,t,i) line of my UDF shown below. I am relatively new to UDFs and can't see what is wrong with it. Can anybody help? Thank you.

#inlcude "udf.h"
#define TMAX 400.0
#define TATM 300.0
#define A 0.00001
DEFINE_PROFILE(temperature_profile,t,i)
{
face_t f;
real x[ND_ND];
real r, k ,h;

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
k = x[0];
h = x[1];
r = sqrt(k*k+h*h);
F_PROFILE(f,t,i) = (TMAX-TATM)*(exp(-(A/3)*r*r))+TATM;
}
end_f_loop(f,t)
}

Hi,

This is typing mistake. Change #inlcude "udf.h" to #include "udf.h"

That all.:)


All times are GMT -4. The time now is 16:42.