CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   return a normal number to solver in double precision mode in udfs (http://www.cfd-online.com/Forums/fluent/69328-return-normal-number-solver-double-precision-mode-udfs.html)

payam_IUST October 20, 2009 00:11

return a normal number to solver in double precision mode in udfs
 
Hi
when we run fluent in double precision mode,how we can return a normal number to solver in double precision mode in udfs?when I return a normal number in udf in double precision mode fllowing error in reported :

original udf :

#include "udf.h"
#include "dpm.h"

DEFINE_DPM_TIMESTEP(payam,p,dt)
{
return 0.01;
}

Error:
"function returning double returns float"
:confused:

SanderD February 13, 2012 08:06

Maybe this works:

#include "udf.h"
#include "dpm.h"

DEFINE_DPM_TIMESTEP(payam,p,dt)
{
real X = 0.01;
return X;
}


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