CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   DEFINE_INIT problem (http://www.cfd-online.com/Forums/fluent/103910-define_init-problem.html)

highhopes June 28, 2012 20:42

DEFINE_INIT problem
 
Dear Fluent users,

I have a very frustrating problem. Basically, I cannot apply DEFINE_INIT function on only one of the interior zones. The last method I have used is as you can see below. See I have been trying to assign 0.9 to the mass fraction of species 1 in one region, again 0.9 to the mass fraction of species 2 in the other region. I have prepared the grid in icem cfd. The geometry is divided into 2 volumes.

Thank you in advance

DEFINE_INIT(get_initialized,d)
{
Thread *t, *t_1, *t_2;
cell_t c;
t_1=Lookup_Thread(d, 14);
t_2=Lookup_Thread(d, 15);

thread_loop_c(t,d)
{
if(THREAD_ID(t)==THREAD_ID(t_1))
{
begin_c_loop(c,t)
{
C_YI(c,t,0)=0.9;
}
end_c_loop(c,t)
}
if(THREAD_ID(t)==THREAD_ID(t_2))
{
begin_c_loop(c,t)
{
C_YI(c,t,1)=0.9;
}
end_c_loop(c,t)
}
}


}


All times are GMT -4. The time now is 18:59.