CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF problems 2

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2005, 10:26
Default UDF problems 2
  #1
Paolo Lampitella
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

  Reply With Quote

Old   September 7, 2005, 13:38
Default Re: UDF problems 2
  #2
YZ
Guest
 
Posts: n/a
there is an old post about this, maybe it helps. http://www.cfd-online.com/Forum/flue....cgi/read/1480
  Reply With Quote

Old   September 7, 2005, 19:05
Default Re: UDF problems 2
  #3
Paolo Lampitella
Guest
 
Posts: n/a
Thanks a lot
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 00:20.