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/)
-   -   how to get pressure and pressure gradient using UDF (http://www.cfd-online.com/Forums/fluent-udf/102173-how-get-pressure-pressure-gradient-using-udf.html)

Honglin May 24, 2012 06:47

how to get pressure and pressure gradient using UDF
 
Hello every,

I am newer,:). I want to seeking help for UDF.The question is how to get pressure and pressure gradient for Specified boundary or cell adject the boundary after every time steps using UDF. Then setting mass flow rate which it is relation to the pressure and pressure gradien fo next time steps.

First, pressure and pressure gradient using UDF. The fllowing is my UDF code,
but I think it is not correct.

#include"udf.h"
real p ;
real detal p ;

DEFINE_EXECUTE_AT_END
{
Domain *d;

cell_t c;
Thread *t;
face_t f;
d = Get_Domain(1);
t= Lookup_Thread(d, 12);

begin_f_loop(f,t)
{
p = C_P(c,t);
detal p=C(c,t)[i][COLOR="Red"]

}
end_f_loop(f,t)

printf("static pressure = %g\n", p);
printf("pressure gradient= %g\n", detal p)

}


Thanks your help!!!!!!!!!!!!!!!!!


All times are GMT -4. The time now is 08:29.