CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Resetting Mass Fraction at Wall (http://www.cfd-online.com/Forums/fluent/50757-resetting-mass-fraction-wall.html)

Mike March 3, 2009 19:57

Resetting Mass Fraction at Wall
 
I am currently trying to re-set a mass-fraction at a wall in my model in terms of the adjacent fluid's mass-fraction using a UDF. My current UDF is:

#include "udf.h" static real tflag = 0.;

DEFINE_PROFILE(no3_conc, thread, position) {

real x[ND_ND]; /* this will hold the position vector */ real y; real t_current = CURRENT_TIME; face_t f;

Message("time = %f, tflag = %f", t_current, tflag);

if (t_current > tflag)

{

tflag = t_current;

begin_f_loop(f, thread)

{

F_CENTROID(x,f,thread);

y = x[1];

F_PROFILE(f, thread, 0) = F_YI(f, thread, 0)*0.99884;

} end_f_loop(f, thread)

}

}

any thoughts or suggestions?



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