|
[Sponsors] |
September 7, 2005, 10:26 |
UDF problems 2
|
#1 |
Guest
Posts: n/a
|
Thank you Amir and Ahmed for your help; i solved the problem but now i'm experiencing some other problems, take a look, please:
thread_loop_c(t,domain) { begin_c_loop(c,t) { C_CENTROID(xc,c,t); dist=sqrt(pow((xc[0]-bar[0]),2)+pow((xc[1]-bar[1]),2)+pow((xc[2]-bar[2]),2)); if ( dist < d ) { d=dist; C_CENTROID(xc1,c,t); cid=c; } } end_c_loop(c,t) } printf("cid = %d\n", cid); c_node_loop(cid,t,n) /*line 182*/ { ny=NODE_Y(n); d2=fabs(ny-bar[1]); if (d2>d1) { d1=d2; } } This is only the final part of my udf (too much big to post it all) but is where i have the error: "C:\Fluent.Inc tbin tx86\cpp.exe -IC:\Fluent.Inc\fluent6.2.16/src -IC:\Fluent.Inc\fluent6.2.16/cortex/src -IC:\Fluent.Inc\fluent6.2.16/client/src -IC:\Fluent.Inc\fluent6.2.16/multiport/src -I. -DUDFCONFIG_H="" C:\Fluent.Inc tbin tx86\profili_source.c Error: C:\Fluent.Inc\ntbin\ntx86\profili_source.c: line 182: non-integer subscript expression: unsigned char." But if i cut the c_node_loop he recognize the value for cid and the UDF works correctly writing it on the screen... oops, i forgot to say that it is a "DEFINE_ON_DEMAND" macro (i don't know if it is important). Thank you |
|
September 7, 2005, 13:38 |
Re: UDF problems 2
|
#2 |
Guest
Posts: n/a
|
there is an old post about this, maybe it helps. http://www.cfd-online.com/Forum/flue....cgi/read/1480
|
|
September 7, 2005, 19:05 |
Re: UDF problems 2
|
#3 |
Guest
Posts: n/a
|
Thanks a lot
|
|
|
|
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 |