|
[Sponsors] |
October 23, 2001, 21:47 |
Problem with UDF
|
#1 |
Guest
Posts: n/a
|
Hi, I have developed a code for finding the centroids of each individual cells in a fluid zone.But I run into the error when i try to print out the centroids of the cells, if remove that part from the code the code runs fine.If any body could help me with tis problem would greatly be appreciated. The code runs this way: # include "udf.h" FILE *fout; int id =5;//id of the fluid domain extern Domain *domain; DEFINE_ON_DEMAND(get_coords) {
cell_t c; face_t f; real x[ND_ND]; double vol; int i; Thread *thread = Lookup_Thread(domain,id); fout = fopen("coordinate.out","w"); i=0; fprintf(fout,"thread id %d\n",id); /*if(fout==NULL) { printf("error"); }*/ thread_loop_c(thread,domain) { i = i+1; begin_c_loop(c,thread) { C_CENTROID(x,c,thread); fprintf(fout,"%d %g \n",i,x[0]); i =i+1; } end_c_loop(c,thread) } fclose(fout); } Thanks in advance, Murthy |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 06:05 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 06:56 |
UDF problem | mansha goraya | FLUENT | 0 | October 29, 2007 00:31 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 07:14 |
UDF problem | chiseung | FLUENT | 4 | January 10, 2002 09:58 |