/*********************************************************************** vprofile.c UDF for specifying steady-state velocity profile boundary condition ************************************************************************/ #include "udf.h" DEFINE_PROFILE(velocity_x, thread, position) { #define D 0.006 #define U_0 0.5 real x[ND_ND]; /* this will hold the position vector */ real y; real z; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[2]; F_PROFILE(f, thread, position) = U_0*(1- (4*(y*y+z*z))/(D*D)); } end_f_loop(f, thread) }