CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

define_on_demand help!!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 23, 2005, 14:39
Default define_on_demand help!!
  #1
Thiyagarajan
Guest
 
Posts: n/a
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.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 08:04.