CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   HELP!!!about species transfer (http://www.cfd-online.com/Forums/fluent/50292-help-about-species-transfer.html)

Bo January 15, 2009 07:54

HELP!!!about species transfer
 
now I am using species transfer. but there are a problem with it. the mass fraction is suppose to smaller than 0.5,but the running result is always bigger than 0.5. I try to write UDF to fix the value. but fluent always show me mistake. I hope anyone can give me a help for this problem.

Thanks very much.

#include "udf.h"

DEFINE_PROFILE(mass_fraction, thread, position) { real y; face_t f; Thread *t; cell_t c; int i;

y = C_YI(c,t,i); if (y < 0.5) y = y; if (y>0.5) y = 0.5;

begin_f_loop(f, thread)

{

F_PROFILE(f, thread, position) = y;

} end_f_loop(f, thread) }



All times are GMT -4. The time now is 15:52.