CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   writing a dat file at each time step (https://www.cfd-online.com/Forums/fluent/38017-writing-dat-file-each-time-step.html)

ayapan September 27, 2005 06:33

writing a dat file at each time step
 
hi i am simulating cross flow over cylinder for turb re 3900, i need to write u and v components in a particular plane of wake at every iteration with out stoping iterastion is it possible through udf??, comments plz by apn

Evan Rosenbaum September 27, 2005 12:16

Re: writing a dat file at each time step
 
See autosave in the user's manual.

ayapan September 28, 2005 05:54

Re: writing a dat file at each time step
 
hi in autosave it will save whole case and data or both but i need only in a particular plane that too only some interesting parameter. comments welcome


top.shen September 28, 2005 22:42

Re: writing a dat file at each time step
 
hi: maybe you have to use the macro DEFINE_EXECUTE_AT_END(NAME). THE FOLLOEING IS A SAMPLE FOR U: (SPECIES MODEL WITHOUT REACTION,TO GET THE MASS(index 0) FRACTION)

DEFINE_EXECUTE_AT_END(EAE_WPD) {

Domain *d=Get_Domain(1);

Thread *t;

cell_t c;

real x[ND_ND];

FILE *f;

f=fopen("RESULTdata.txt","W");

if(f==0) printf("\n\ncan NOT open the pointdata file!");

/*LOOP ALL CELL,U HAVE TO CHANGE TO LOOP ON THE FACE YOU CARE ABOUT.*/

thread_loop_c(t,d)

{

begin_c_loop_all(c,t)

{

Cz=C_YI(c,t,0);

fprintf(f,"\t|mass fraction:%ft\n",Cz);

}end_c_loop_all(c,thread)

}

fclose(f); }


ayapan September 30, 2005 01:07

Re: writing a dat file at each time step
 
hi thank you EVAN&SHEN i think i'll get it by trying what you people suggested bye w'll meet again



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