CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Check this UDF,please. (

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 13:52.