Fluent does not recognize my UDF for velocity profile
Dear all,
I want to impose a velocity at the inlet which is parabolic at the bottom and top and constant in the middle of the inlet. But flunet does not regonize the locations correctly, so what is wrong in my UDF, pls help!! Here is my udf, #include "udf.h" #define S 0.038 #define V1 10.86 DEFINE_PROFILE(inlet_x_velocity, thread, index) { 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]; if (y<=S) F_PROFILE(f, thread, index) = 249.384*y*y+249.384*y; else if (S<=y<=3*S) F_PROFILE(f, thread, index) = V1; else if (3*S<=y<=4*S) F_PROFILE(f, thread, index) = -83.514*y*y-83.514*y+14.6238; } end_f_loop(f, thread) } Thank you, -Selim |
Hi Selim,
I'm not very expert in programming but I'm doubtful about the logical condition of the IF command: y<=S in the first case, in the other I would put S<y, not S<=y, because when y=S I don't know if Fluent uses the first without error |
All times are GMT -4. The time now is 22:26. |