CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   define_on_demand help!! (

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"



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*/


/*computing total amount of dust deposited*/

/*looping over porous medium*/




mass_tot += C_UDMI(c,thread,0) * C_VOLUME(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 22:49.