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/)
-   -   where is the mistake? (http://www.cfd-online.com/Forums/fluent-udf/79304-where-mistake.html)

mehendis August 19, 2010 06:43

where is the mistake?
 
Hello,

I want to have a static pressure profile at the outlet for a 2D calculation. For the boundary "outlet" there is y=const. when I use the following UDF, I do get a parabolic profile. But the problem is, at starting point (x=0) and end point, I don't have p=0. so that is not the exact curve I am expecting. I always check through "xy plot" afte initializing over inlet.

So, does anybody know where the problem is?

#include "udf.h"

DEFINE_PROFILE(pressure_profile,t,i)
{
real x[ND_ND];
real a;
face_t f;

begin_f_loop(f,t)
{

F_CENTROID(x,f,t);
a = x[0];
F_PROFILE(f,t,i) = 2.435e5 - (a-0.025)*(a-0.025)/(0.025*0.025)*2.435e5;
}
end_f_loop(f,t)
}


All times are GMT -4. The time now is 14:57.