CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   UDF for species-mass-fraction gradient at outlet (http://www.cfd-online.com/Forums/fluent/44978-udf-species-mass-fraction-gradient-outlet.html)

sisir June 9, 2007 02:40

UDF for species-mass-fraction gradient at outlet
 
Hi, I am modeling species transport in high temp in steady state. In this model I have used the species CO,CO2,H,H2....etc. I want to set the gradient of the species-mass fraction =0.0 instead of mass-fraction = 0.0 at the pressure outlet boundary for species. For this i have written an UDF which is given below.

#include "udf.h"

DEFINE_SOURCE(species_grad,cell,thread,dS,eqn)

{

float source=0.0;

begin_c_loop(cell, thread)

{

C_YI_G(cell,thread,1)[0]=0.;

source=C_YI_G(cell,thread,1)[0];

/*dS[eqn]=0.;*/

}

end_c_loop(cell,thread)

return source;

}

After compiling the file when I am trying to HOOK it the UDF file is not displaying in the species-mass-fraction at the pressure outlet . But I check the UDF file is available at the Boundary Condtion-Fluid-Source term for species.

Anybody can help to solve this problem?

I will be greatful to you for your help.

Thanking you.

sisir


All times are GMT -4. The time now is 00:22.