/*********************************************************************** vprofile.c UDF for specifying steady-state velocity profile boundary condition ************************************************************************/ #include "udf.h" DEFINE_PROFILE(inlet_x_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f, thread, position) = (10 + y/12.5)*cos(5.0/180.*3.1415927); } end_f_loop(f, thread) } DEFINE_PROFILE(inlet_y_velocity, thread, position) { /* insert your own code here*/ }