CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF help (https://www.cfd-online.com/Forums/fluent/34488-udf-help.html)

Doris August 26, 2004 22:31

UDF help
 
hi all

i wrote a udf to obtain the coordinates and the secondary phase vof for a specified thread and i have had the data, the coordinates is right data but the vof is wrong, compared with the export data from fluent.

below is my udf,please help me to check the udf. thanks

DEFINE_ADJUST(print_vof,mix_domain) {

Thread *mix_thread;

Thread **pt;

int i=0;

int k;

Thread *t;

real FC[ND_ND];

mp_thread_loop_c(mix_thread,mix_domain,pt)

{

cell_t c;

int kount=0;

t = Lookup_Thread(mix_domain,4);

begin_c_loop(c,t)

{

kount++;

F_CENTROID(FC,c,t);

printf("kount=%d cell volume fraction = %e ",kount,C_VOF(c,pt[1]));

for (k = 0; k < ND_ND; k++)

printf("%e ",FC[k]);

printf("\n");

} end_c_loop(c,t)

i++;

}

printf("********* i = %d ***********\n",i); }


All times are GMT -4. The time now is 08:45.