CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF Compilation Error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2009, 15:22
Default UDF Compilation Error
  #1
Karthik
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.

  Reply With Quote

Old   February 8, 2009, 16:38
Default Re: UDF Compilation Error
  #2
KJ Larsen
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

  Reply With Quote

Old   February 9, 2009, 11:17
Default Re: UDF Compilation Error
  #3
Karthik
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; }
  Reply With Quote

Old   February 9, 2009, 11:38
Default Re: UDF Compilation Error
  #4
KJ Larsen
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

  Reply With Quote

Old   February 9, 2009, 11:42
Default Re: UDF Compilation Error
  #5
Karthik
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.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 10:11.