CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UFD to report mass fraction at the outlet cells (http://www.cfd-online.com/Forums/fluent/36874-ufd-report-mass-fraction-outlet-cells.html)

Laura June 7, 2005 10:14

UFD to report mass fraction at the outlet cells
 
Hi,

For transient calculations of a non reacting system with 2 inlets (one for gas A and one for gas B) and one outlet for a mixture A+B,

I have to report the mass fraction of B as a function of time step for ALL the cells at the outlet.

Any one know hows to start/writte an UDF to make that possible?

Thanks a lot.

Laura

cg June 7, 2005 20:51

Re: UFD to report mass fraction at the outlet cell
 
There is a text interface command

report/species-mass-flow

You could use this in a journal file and post-process the transcript file.

Laura June 8, 2005 03:32

Re: UFD to report mass fraction at the outlet cell
 
Hi thanks for the answer.

I tried to use the text interface command but I couldn't find how to specifie each cell of the outlet and report it's mass fraction for each time step?

can't we do that with an UDF?

Thanks a lot for the help.

Laura

cg June 9, 2005 17:48

Re: UFD to report mass fraction at the outlet cell
 
Yes, you can use a UDF...

DEFINE_ON_DEMAND(species_mass_flow) { Domain *domain = Get_Domain(1); Thread *t; face_t f; thread_loop_f(t,domain)

if( THREAD_TYPE(t)==THREAD_F_POUTLET )

begin_f_loop (f,t)

{

int species_index = 0;

real smf = F_FLUX(f,t)*F_YI(f,t);

Message("%i %e\n",f,smf);

}

end_f_loop (f,t) }

Laura June 10, 2005 03:42

Re: UFD to report mass fraction at the outlet cell
 
Thanks a lot my friend.

Best regards. ;)


All times are GMT -4. The time now is 11:38.