|
[Sponsors] |
February 2, 2009, 15:22 |
UDF Compilation Error
|
#1 |
Guest
Posts: n/a
|
Hello all,
I'm working in a case that needs an udf to control the viscosity of fluid. I compile the udf and the following error message appears, ERROR: Set_material_property: null user defined function name I would be grateful if anybody could help me to solve this problem. Thanks in advance Karthik. K. |
|
February 8, 2009, 16:38 |
Re: UDF Compilation Error
|
#2 |
Guest
Posts: n/a
|
Hello Karthik
As it sounds as if it's complaining about your UDF's name: Try set_material_properties in the name given as an arguments for the (I assume) Define_Property UDF, I do not believe capitals are allowed. Hope it's this simple. Kris |
|
February 9, 2009, 11:17 |
Re: UDF Compilation Error
|
#3 |
Guest
Posts: n/a
|
Hi Kris,
Thanks a lot for the reply. I tried changing the name but it did not work. This is UDF I am using can you please let me know if some thing is wrong with it? #include "udf.h" #define n 0.67 #define alph 1.0 #define mu 0.0042 DEFINE_PROPERTY(power_law_model,cell,thread) { float trace; double visc; float u[3], v[3], w[3]; int j; for(j=0;j<3;j++) { u[j]=C_U_G(cell,thread)[j]; v[j]=C_V_G(cell,thread)[j]; w[j]=C_W_G(cell,thread)[j]; } trace= 0.5*(2*pow(u[0],2)+pow(v[0]+u[1],2)+2*pow(v[1],2)+pow(v[2]+w[1],2)+2*pow(w[2],2)+pow(w[0]+u[2],2)); visc=0.5*mu*pow(1+alph*trace,0.67); return visc; } |
|
February 9, 2009, 11:38 |
Re: UDF Compilation Error
|
#4 |
Guest
Posts: n/a
|
Hello Karthik
I cannot see any immediate problems in that code but it's very difficult without any clues. Surely the error has changed; since Set_material_property is not in this code. Are line numbers given? Kris |
|
February 9, 2009, 11:42 |
Re: UDF Compilation Error
|
#5 |
Guest
Posts: n/a
|
Hi Kris,
It does'nt show the line numbers, but this is the error it shows when I try to compile it, Error: Set_Material_Property: null user-defined-function name Error Object: #f I tried changing the name but it did not work. Any idea of what else can I do? Thanks, Karthik. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf compilation error | sdp | FLUENT | 0 | February 5, 2009 02:58 |
UDF compilation error | Hari | FLUENT | 0 | February 22, 2008 13:40 |
Compilation error | skabilan | OpenFOAM Installation | 1 | September 17, 2007 13:33 |
Compilation error CFX 11 | Beth | CFX | 0 | July 26, 2007 19:36 |
Compilation error | Karthick | FLUENT | 5 | April 16, 2004 13:36 |