|
[Sponsors] |
July 22, 2012, 06:19 |
Udf --define_profile
|
#1 |
Member
sagila
Join Date: May 2012
Posts: 39
Rep Power: 14 |
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, |
|
July 22, 2012, 09:29 |
|
#2 |
Member
sagila
Join Date: May 2012
Posts: 39
Rep Power: 14 |
Hi all,
I would appreciate if anyone could help me. Thanks. |
|
July 22, 2012, 09:48 |
|
#3 | |
New Member
Patrick
Join Date: Apr 2012
Posts: 28
Rep Power: 14 |
Quote:
else if (0.0755 <= x[2] && x[2]< 0.7327) |
||
July 22, 2012, 12:41 |
|
#4 |
Member
sagila
Join Date: May 2012
Posts: 39
Rep Power: 14 |
Hi Patrick,
Thank you very much for your help. I corrected my UDF file as you told me and it works now |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
Source Term UDF VS Porous Media Model | pchoopanya | Fluent UDF and Scheme Programming | 1 | August 28, 2013 07:12 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 05:01 |