CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Problem with example from the ANSYS UDF MANUAL (http://www.cfd-online.com/Forums/fluent-udf/80353-problem-example-ansys-udf-manual.html)

Wikie September 23, 2010 05:37

Problem with example from the ANSYS UDF MANUAL
 
Hi,

to get use to UDF-programming I start playing arround with the examples mentioned in the ANSYS UDF GUIDE. I copied this example:

#include "udf.h"
DEFINE_DPM_DRAG(particle_drag_force,Re,p)
{
real w, drag_force;
if (Re < 0.01)
{
drag_force=18.0;
return (drag_force);
}
else if (Re < 20.0)
{
w = log10(Re);
drag_force = 18.0 + 2.367*pow(Re,0.82-0.05*w) ;
return (drag_force);
}
else
/* Note: suggested valid range 20 < Re < 260 */
{
drag_force = 18.0 + 3.483*pow(Re,0.6305) ;
return (drag_force);
}
}

But it didn't work. My particles totally disappeared and I got this message. What is wrong with this code??

"chip-exec: particle_drag_force: argument 1: incorrect type (10): pointer expectedchip-exec: particle_drag_force: argument 2: incorrect type (38): int expected"

cheers
Wikie


All times are GMT -4. The time now is 20:27.