Udf --define_profile
Dear all,
I want to define these F_PROFILEs for different Zs. Z F_PROFILE 0.0000 <= z < 0.0755 (z - 63.9902)/(-0.2162) 0.0755 <= z < 0.7327 (z + 195.4362)/(0.6614) 0.7327 <= z < 1.3900 (z + 333.8888)/(1.1283) 1.3900 <= z < 2.0382 (z + 377.9390)/(1.2765) 2.0382 <= z < 2.6775 (z - 2114.1705)/(-7.0954) 2.6775 <= z <= 2.7500 (z + 10.9611)/(0.0458) And, I have writen the UDF file as follows. But, when I check it in FLUENT, it does not work correctly. Could you please help me? #include "udf.h" DEFINE_PROFILE(temp_profile,t,i) { real x[ND_ND]; face_t f; begin_f_loop (f,t) { F_CENTROID(x,f,t); if (0.0000 <= x[2] < 0.0755) F_PROFILE(f,t,i) = (x[2] - 63.9902)/(-0.2162); else if (0.0755 <= x[2] < 0.7327) F_PROFILE(f,t,i) = (x[2] + 195.4362)/(0.6614); else if (0.7327 <= x[2] < 1.3900) F_PROFILE(f,t,i) = (x[2] + 333.8888)/(1.1283); else if (1.3900 <= x[2] < 2.0382) F_PROFILE(f,t,i) = (x[2] + 377.9390)/(1.2765); else if (2.0382 <= x[2] < 2.6775) F_PROFILE(f,t,i) = (x[2] - 2114.1705)/(-7.0954); else F_PROFILE(f,t,i) = (x[2] + 10.9611)/(0.0458); } end_f_loop(f,t) } Thanks in advance. Best, |
Hi all,
I would appreciate if anyone could help me. Thanks. |
Quote:
else if (0.0755 <= x[2] && x[2]< 0.7327) |
Hi Patrick,
Thank you very much for your help. I corrected my UDF file as you told me and it works now :) |
All times are GMT -4. The time now is 22:32. |