CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   help, a problem about C_UDSI_M1 (http://www.cfd-online.com/Forums/fluent/102998-help-problem-about-c_udsi_m1.html)

huntergold June 8, 2012 03:12

help, a problem about C_UDSI_M1
 
Hello, guys, I am modeling adsorption bed, and have to calculate the adsorption mass as:q(n)=q(n-1)+k*(C-q(n-1))*dt, the code is:

DEFINE_ADJUST(q_adsorption,domain)
{
Thread *t;
cell_t c;
thread_loop_c(t,domain)
{
if(NULL!=THREAD_STORAGE(t,SV_UDS_I(q_ads))&&NULL!= T_STORAGE_R_NV(t,SV_UDSI_M1(q_ads)))
{
begin_c_loop(c,t)
{
real physical_dt;
physical_dt=RP_Get_Real("physical-time-step");
C_UDSI(c,t,q_ads)=C_UDSI_Ml(c,t,q_ads)+0.001*physi cal_dt*(0.5-C_UDSI_Ml(c,t,q_ads));
}
end_c_loop(c,t)
}
}
}


but there is an error:
C_UDSI_Ml: undeclared variable

could anyone help me? thank you very much!

er.mkumar September 30, 2012 17:02

I think there is a typo error the macro for getting property in previous time-step is C_UDSI_M1(c,t,0) and not C_UDSI_Ml(c,t,0).


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