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/)
-   -   UDF for inlet mass flow rate (http://www.cfd-online.com/Forums/fluent-udf/80204-udf-inlet-mass-flow-rate.html)

rahulsuresh89 September 18, 2010 12:33

UDF for inlet mass flow rate
 
I need help to write a UDF to vary the inlet mass flow rate (step input)..I need a step input..Is it possible? I just know the macros to be used is DEFINE_PROFILE for the boundary conditions. Please help me out with the UDF code.

amir_yousefi October 16, 2010 17:06

Hi
You can see the examples of FLUENT 6.3 UDF manual about DEFINE_PROFILE. It's easy. for example, below is a code that define parabolic profile for inlet.

#include "udf.h"
DEFINE_PROFILE(Re270_art_profile,t,i)
{
real x[ND_ND]; /* this will hold the position vector */
real xcor,ycor;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);

xcor=x[1];
ycor = x[2];
F_PROFILE(f,t,i) = 0.13883*(1 - ((xcor)*(xcor)+(ycor)*(ycor))/(0.004*0.004));
}
end_f_loop(f,t)
}

Best


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