CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Error: get_udf_function (https://www.cfd-online.com/Forums/fluent/30425-error-get_udf_function.html)

Ridha October 23, 2002 13:15

Error: get_udf_function
 
Hi, I've just written up some code compiled UDF, . It compiled OK (which doesn't mean much) but I get an error when fluent tries to call the function:

Error: get_udf_function: function Cell_mass_diffisivity has wrong type: 0 != 2 Error Object: ()

What does this mean and how can I fix it? I am a novice at C programming so it is probably something majorly wrong with the variable and function types I'm using. Here's the code:

#include"udf.h" DEFINE_PROPERTY(Cell_mass_diffisivity,cell,thread)

{

real Ks;

double temp=C_T(cell,thread);

double YI=C_YI(cell,thread,0);

Ks=(0.58+0.03*(temp-273.15)+0.0002*(temp-273.15)*(temp-273.15)+(0.001*YI*YI))*pow(10,-9);*/

return Ks ;

}

yawi October 24, 2002 22:48

Re: Error: get_udf_function
 
your word 'diffissivity' should be 'diffusivity'

why do not you use interpreted udf?

Ridha October 25, 2002 11:27

Re: Error: get_udf_function
 
hi yawi i use diffisivity et nor diffissivity????? i use compiling mode because ia use static in other udfs. thank you

yawi October 26, 2002 03:56

Re: Error: get_udf_function
 
hi

"include" and "DEFINE" can not be on the same line! you should write as follows: #include "udf.h" DEFINE_PROPERTY(Cell_mass_diffisivity,cell,thread)


All times are GMT -4. The time now is 21:32.