CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Check this UDF,please. (http://www.cfd-online.com/Forums/fluent/39491-check-udf-please.html)

Josh February 2, 2006 12:20

Check this UDF,please.
 
Can anyone check what's wrong with this UDF. When I interpreted it with FLUENT, a syntax error was reported in the third line.

#include "udf.h" #define QM 5e-6 DEFINE_SOURCE(charge_density,c,t,dS,eqn) { real charge_density; cell_t c; charge_density=C_R(c,t)*QM; return charge-density; }

Markus February 2, 2006 14:42

Re: Check this UDF,please.
 
Hi Josh

You don't have to declare cell_t c explicitly in your udf as it is already passed to DEFINE_SOURCE. Maybe this redefinition causes the problem. Max

Josh February 2, 2006 15:02

Thank you. *NM*
 


All times are GMT -4. The time now is 11:58.