CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Using c_face_loop (http://www.cfd-online.com/Forums/fluent/32329-using-c_face_loop.html)

Ajay October 16, 2003 12:10

Using c_face_loop
 
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);

}

qubek October 17, 2003 04:03

Re: Using c_face_loop
 
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.
:)

Ajay October 17, 2003 13:21

Re: Using c_face_loop
 
Thanks a Ton !


All times are GMT -4. The time now is 06:31.