UDF problem- DEFINE_PROFILE
Dear Friends,
I realize that under the UDF example given for "Parabolic Velocity Inlet Profile in a Turbine Vane", the calculation of velocity boundary profile starts from the center of the "inlet" edge. I am trying to write an UDF for boundary profile using power law profile but it doesn't seem to work. I noticed that Fluent again treat the center of the inlet as 0.0 and resulted a symmetrical boundary profile at the inlet. The following is my code: The domain I am simulating is simply a 3D rectangular cube with the left and right faces as inlet and outlet flow while the rest are walls. /*================================================= ========*/ #include "udf.h" #define A1 0.728 #define B2 2 DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); F_PROFILE(f,thread,index) = A1*pow(x[2],B2); } end_f_loop(f,thread) } /*================================================= =====*/ Does this happened due to the use of Macro F_CENTROID? Please help me. Thanks in advance for any of your kind help to fine tune my UDF. |
All times are GMT -4. The time now is 09:55. |