Karthik R
Administrator

Hello,


Since you said you were not able to compile any UDFs from the manual, I'm not sure if it is wise to debug the UDF you've posted here. It is perhaps that your compiler is not working the way it should and therefore, we are seeing the following issue. I'm posting a very simple piece of code here. If compiled properly, you should be able to prescribe a parabolic velocity profile at your inlet. Here is the code. Please copy this code you a text file, name the file - inlet.c and try to compile this. Please let us know your findings here. Depending on this, we should be able to help you better.


Thanks,


Best,


Karthik


Code:


/***********************************************************************
UDF for specifying steady-state parabolic pressure profile boundary
profile for a turbine vane
************************************************************************/

#include "udf.h"

DEFINE_PROFILE(pressure_profile,t,i)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f,t,i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5;
}
end_f_loop(f,t)
}