|
[Sponsors] |
August 12, 2005, 11:55 |
UDF problems
|
#1 |
Guest
Posts: n/a
|
Hi,
I am trying to calculate the intersection angle between the velocity and the gradient of the temperature using UDF. My short code is as follows: #include "udf.h" DEFINE_ADJUST(Angle,domain) { Thread *thread; cell_t c; float TX,TY,TZ,TG; float U,V,W,Vel; thread_loop_c(thread,domain) { begin_c_loop(c, thread) { TX = C_T_G(c,thread)[0]; TY = C_T_G(c,thread)[1]; TZ = C_T_G(c,thread)[2]; TG = sqrt(pow(TX,2.0)+pow(TY,2.0)+pow(TZ,2.0)); U = C_U(c,thread); V = C_V(c,thread); W = C_W(c,thread); Vel = sqrt(pow(U,2.0)+pow(V,2.0)+pow(W,2.0)); C_UDMI(c,thread,0) = acos((U*TX+V*TY+W*TZ)/TG/Vel); } end_c_loop(c, thread) } } The compile was good but when I calculated for several iterations and tried to plot the result, the values are zero everywhere. Can anyone please please help me with this program or give me some advice? Thank you so much. I am nearly exhausted by this problem. Winnie |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
parse error while interpreting udf | Kristin | Fluent UDF and Scheme Programming | 3 | March 15, 2012 06:43 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
problems with UDF to set contact angle | poiuy219 | Main CFD Forum | 0 | April 30, 2009 10:43 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 11:29 |