CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF for fluxes normal to a wall (http://www.cfd-online.com/Forums/fluent/46783-udf-fluxes-normal-wall.html)

Leverkin December 10, 2007 13:04

UDF for fluxes normal to a wall
 
Hello dear people,

I am trying to hook an execute at end UDF. My UDF is for calculating the fluxes in a portion of a wall in x - direction normal to the wall. I wrote this UDF but it does't work, althougth it has no errors. Can anyone help me?

Thanks in advance!

My UDF:

#include "udf.h"

FILE *fout;

DEFINE_EXECUTE_AT_END(Sherwood)

{

int id;

Domain *d;

Thread *t;

cell_t c;

id = 3;

d = Get_Domain(1);

fout = fopen("Sherwood.out", "w");

t = Lookup_Thread(d,id);

thread_loop_c(t,d)

{

begin_c_loop(c,t)

fprintf(fout, "%f %f\n",C_YI_G(c,t,1)[0]);

end_c_loop(c,t)

}

fclose(fout);

}



All times are GMT -4. The time now is 02:01.