CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Errors when interpreting UDF (https://www.cfd-online.com/Forums/fluent-udf/79408-errors-when-interpreting-udf.html)

elah599 August 23, 2010 08:27

Errors when interpreting UDF
 
I wrote a udf for thermal conductivity dependent on a temperature.
#include "udf.h"
DEFINE_PROPERTY(cell_thermalconductivity,cell,thre ad)
{
real ktc;
real temp = C_T(cell,thread);
ktc=(0.6*(1+(0.023*((pow(temp,1.2321))/(pow(10,(363.94/(temp-140))))))));
}
when I run fluent,I see this error:
Error: Floating point error: invalid number
Error Object: ()
could you help me?
thanks

coglione August 24, 2010 06:32

Your Define_Property UDF should at least return some value to the solver.
A last line like: return ktc; would do this.
cheers

elah599 August 25, 2010 04:04

thank you so much!
it worked


All times are GMT -4. The time now is 23:39.