/*profile.c* B lei/
/*UDF for specifying steady-state velocity profile boundary condi*/
#include"udf.h"
#define zo 10
#define uo 12
DEFINE_PROFILE(inlet_x_velocity,thread,index)
{
real x[ND_ND];
real z;
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);
z=x[2];
F_PROFILE(f,thread,index)=uo*pow((z/zo),0.16);
}
end_f_loop(f,thread)
}
参见fluent的udf manual
恩这个可以用udf编写 我们做过很多