UDF for velocity profile
Hi,
I'm trying to write a UDF for an inlet velocity boundary condition. I want my velocity profile varies vertically and transversally. I know how to write a function for each case but not for both at the same time. x = longitudinal coordinate, y = vertical coordinate, z = transversal coordinate. U(z) = 1.0 + sen((2*pi/750)*z); horizontal velocity as a function of z-coordinate. U(y) = U(z)*(y/12.8)^0.142857 The center of my channel inlet is at (x,y,z)=(0,0,0), and the contours extent to z = +-175 and y = +-15. For the vertical velocity profile I wrote the following function: DEFINE_PROFILE(Velocity, t, i) { real x[ND_ND]; /* this will hold the position vector */ real y; face_t f; begin_f_loop(f, t) /* loops over all faces in the thread passed in the DEFINE macro argument */ { F_CENTROID(x,f,t); y = x[1]; y = y+15; F_PROFILE(f, t, i) = 2*pow((y/(12.8)),0.142857); } end_f_loop(f, t) } But how can I iclude in the function the tranversal variation of velocity??? Any help will be appreciated!! Regards |
All times are GMT -4. The time now is 15:53. |