CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   outlet pressure (

om1234 June 21, 2010 09:11

outlet pressure
Hi all
i'm going to analysis 2d centrifugal outlet line,i try to define static pressure in a single face of grid. i use this udf. but it doesn't work correctlly.


DEFINE_PROFILE(pressure_outlet, t, i) * this macro is used to define values in BCs*/
real pr;
face_t f;
int j;
real p;
int k;
real y;
real x[ND_ND];
if(!Data_Valid_P()) /*check for the availability of data*/
p=F_P(f,t); /*F_P read the pressure of each face and assign it to p*/
F_UDMI(f,t,k)= p; /*this macro is used to store/access the values of the user-defined memory on the face.the outlet boundary is devided to 12 i set the number of memory 12.define>user deine>memory*/


begin_f_loop(f, t)
y=x[0]; /* the outlet line is horizontal and i need the x coordinate*/
if (y<-0.027) /* there is a face centroid in this interior*/
F_PROFILE(f,t,i)=100000; /*desired value of the defined face cell*/
pr=F_UDMI(f,t,j); /* access to stored values for each face*/
F_PROFILE(f, t, i) = pr;
end_f_loop(f, t)

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