CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Why my UDF doesn't work when I activate the non-premixed combustion species model? (https://www.cfd-online.com/Forums/fluent-udf/112801-why-my-udf-doesnt-work-when-i-activate-non-premixed-combustion-species-model.html)

TMorgado February 5, 2013 14:09

Why my UDF doesn't work when I activate the non-premixed combustion species model?
 
I have a furnace with two slabs in it and I wrote an UDF with the purpose of changing the temperature of the slabs ( interior cells and walls).
If I setup my problem without activating any type of species model, my udf works fine, but when I activate the non-premixed combustion model, only the temperature of the walls change.
Can anyone provide an explanation for this strange event?

#include "udf.h"

DEFINE_ON_DEMAND(my_init)
{
Domain *d= Get_Domain(1);
int i,j, Temp=400;
cell_t c;
face_t f;
Thread *t;

int zone_ID[3][2]={{7,6},
{5,4},
{18,10}};
i=0;
j=0;

for (j=0; j<=2; j++)
{
for ( i=0; i<=1; i++ )
{
if(I_AM_NODE_ZERO_P)
{
if (j==0)
{

t = Lookup_Thread(d,zone_ID[j][i]);
begin_c_loop(c,t)
{
C_T(c,t)=Temp;
}
end_c_loop(c,t)
}
else
{
t = Lookup_Thread(d,zone_ID[j][i]);
begin_f_loop(f,t)
{
F_T(f,t)=Temp;
}
end_f_loop(f,t)
}
}
if(I_AM_NODE_ONE_P)
{
if (j==0)
{

t = Lookup_Thread(d,zone_ID[j][i]);
begin_c_loop(c,t)
{
C_T(c,t)=Temp;
}
end_c_loop(c,t)
}
else
{

t = Lookup_Thread(d,zone_ID[j][i]);
begin_f_loop(f,t)
{
F_T(f,t)=Temp;
}
end_f_loop(f,t)
}
}
}
}
}


All times are GMT -4. The time now is 03:33.