CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   define_on_demand help!! (http://www.cfd-online.com/Forums/fluent/37673-define_on_demand-help.html)

Thiyagarajan August 23, 2005 14:39

define_on_demand help!!
 
Hi all,

iam writing a UDF to calculate the total amount disctrete phase i injected into the domain.The DPC is stored in a user defined memory and i multiply that with the cell volume in the porous zone(zone ID is 2).for this iam using DEFINE_ON_DEMAND macro. but when i compile, iam getting the following error.

..\..\src\inideman2.c(8) : error C2143: syntax error : missing ')' before 'type'

..\..\src\inideman2.c(8) : error C2198: 'Lookup_Thread' : too few actual parameters

..\..\src\inideman2.c(8) : error C2059: syntax error : ')'

the UDF i written is,

/////////////////////////////////////////////////// #include"udf.h"

DEFINE_ON_DEMAND(demand)

{

Domain *domain;

int ID=2;

real mass_tot;

Thread *thread = Lookup_Thread(Domain,ID);

cell_t c;

domain = Get_Domain(1);

/*loop over all cell threads*/

thread_loop_c(thread,domain)

/*computing total amount of dust deposited*/

/*looping over porous medium*/

{

begin_c_loop(c,thread)

{

mass_tot += C_UDMI(c,thread,0) * C_VOLUME(c,thread);

}

end_c_loop(c,thread)

}

CX_Message("Total amount of dust deposited %f \n",mass_tot);

}

////////////////////////////////////////////////////

please help me to overcome this problem.Iam using fluent 6.2.thanks for your time. regards Thiyaga.


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