/*********************************************************************** vprofile.c UDF for specifying steady-state velocity profile boundary condition Case: AIJ Benchmark test, 2:2:1 model Experiment by Shimizu Corp. ************************************************************************/ #include "udf.h" DEFINE_PROFILE(inlet_y_velocity, thread, position) { 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]; if (z>0.6) F_PROFILE(f, thread, position) = 6.751; else F_PROFILE(f, thread, position) = -7.5335*pow(z,2)+10.962*z+2.9155; } end_f_loop(f, thread) } DEFINE_PROFILE(inlet_k, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; real z; real c; real d; real e; real g; real h; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[2]; if (z>0.6) F_PROFILE(f, thread, position) = 0.106; else F_PROFILE(f, thread, position) =8.1573*pow(z,3)-11.234*pow(z,2)+3.3643*z+0.3671; } end_f_loop(f, thread) } DEFINE_PROFILE(inlet_e, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real y; real z; real i; face_t f; begin_f_loop(f, thread) { F_CENTROID(x,f,thread); y = x[1]; z = x[2]; if (z>0.6) F_PROFILE(f, thread, position) = 0.4372; else F_PROFILE(f, thread, position) = -0.632*log(z) + 0.1144; } end_f_loop(f, thread) }