CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   3D velocity inlet UDF (

zumaqiong June 2, 2010 14:20

3D velocity inlet UDF
I have a problem with 3D velocity inlet UDF.
My velocity is parabolic time dependent.
and I write UDF like this:

DEFINE_PROFILE(inlet_y_velocity, thread, position)
real x[ND_ND]; real r; face_t f;
real t;
int n;
real T=1;
real y,z;

begin_f_loop(f, thread)


r=sqrt(pow(y,2)+pow(z,2)); /*radius of cylinder*/


end_f_loop(f, thread)

but if I add #include "surf.h"
at the beginning of this UDF, the velocity is not parabolic. it will be constant changing only with time.

Is there anybody who knows why this will happen?
and what is the meaning of #include "surf.h"?

Thank you!

om1234 June 4, 2010 19:31

as i know, udf.h is used in the beginig of your udf and surf.h is the library that the macros you use in your udf are defined in there. now depending in your importing your udf to fluent, if u use interpret, u dont need to do additional works(and the udf beginig must be udf.h).but when u use compile u must define the library(surf.h) in "add header" next to "add udf"

All times are GMT -4. The time now is 10:40.