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

Using c_face_loop

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2003, 13:10
Default Using c_face_loop
  #1
Ajay
Guest
 
Posts: n/a
I am trying to write a UDF which print outs the area vectors of the boundary faces could somebody point out why i am getting non -integer subscript expression : unsigned char error when i try interpretting my udf ?the line number where the error occurs is in marked with ******'s Thanks , Ajay

DEFINE_ON_DEMAND(area_on_demand_calc)

{ int index;

real cell_cordi[ND_ND],a[ND_ND];

Thread *t;

Thread *tf;

cell_t c;

face_t face;

d = Get_Domain(1); /* Get the domain using Fluent utility */

if ((fpt3=fopen("mean_shear.dat","w"))==NULL)

{

printf("Cannot open the file\n");

return;

}

/* Loop over all cell threads in the domain */

thread_loop_c(t,d)

{

/* Loop over all cells */

begin_c_loop(c,t)

{

********** c_face_loop(c,t,index)

{

tf = C_FACE_THREAD(c,t,index);

if (BOUNDARY_FACE_THREAD_P(tf)== TRUE)

{

F_AREA(a,face,tf);

fprintf(fpt3,"%d ",index);

}

}

fprintf(fpt3,"\n ");

}

end_c_loop(c,t)

} fclose(fpt3);

}
  Reply With Quote

Old   October 17, 2003, 05:03
Default Re: Using c_face_loop
  #2
qubek
Guest
 
Posts: n/a
I have the same problem and I found the solution searching this forum. The problem is that if you use c_face_loop you can't interpret your UDF but you have to compile it.
  Reply With Quote

Old   October 17, 2003, 14:21
Default Re: Using c_face_loop
  #3
Ajay
Guest
 
Posts: n/a
Thanks a Ton !
  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



All times are GMT -4. The time now is 23:21.