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/)
-   -   Problem with a compiled ADJUST (https://www.cfd-online.com/Forums/fluent-udf/70189-problem-compiled-adjust.html)

kash November 17, 2009 01:57

Problem with a compiled ADJUST
 
Dear all,
Using DEFINE_ADJUST, I am trying to limit the solution value of UDS(0) below a certain value. But the macro (listed below) is not adjusting the UDS as requested. Please lend me your experience on how to solve the problem

DEFINE_ADJUST(adjust1,d)
{
Thread* tc;
face_t f;
cell_t c;
Thread* tf;
real c_max=0.0;
c_max=24.00;
thread_loop_c(tc,d)
{
{
begin_c_loop(c,tc)
{
if(C_UDSI(c,tc,0) > c_max) {C_UDSI(c,tc,0)=c_max;}
}
end_c_loop(c,tc);
}
}

thread_loop_f(tf,d)
{
if (THREAD_TYPE(tf)==THREAD_F_WALL)
{
begin_f_loop(f,tf)
{
if(F_UDSI(f,tf,0)> c_max) {F_UDSI(f,tf,0)=c_max;}
}
end_f_loop(f,tf);
}
}
}

dmoroian November 25, 2009 07:47

What error do you get?


All times are GMT -4. The time now is 07:19.