CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

UDF error

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

LinkBack Thread Tools Display Modes
Old   October 20, 2003, 09:33
Default UDF error
Posts: n/a

I am trying to use a UDF to determine the gradient of density for use in generating numerical schlieren images. the following error keeps cropping up despite using a script obtained from the fluent user website.

get_udf_function: function adjust_gradient has wrong type: 9 != 8

the script i am using is the following:

# include "udf.h" # define domain_ID 2

enum {


mag_grad_density };

DEFINE_ADJUST(adjust_gradient, domain) { Thread *t; cell_t c; face_t f;

domain = Get_Domain(domain_ID);

/* Fill UDS with the variable. */ thread_loop_c(t,domain)




real density = C_R(c,t);

C_UDSI(c,t,density_grad) = pow(density,1);


end_c_loop (c,t)

} }

DEFINE_ON_DEMAND(store_gradient) { Domain *domain; cell_t c; Thread *t;


/* Fill the UDM with magnitude of gradient. */ thread_loop_c(t,domain)




C_UDMI(c,t,mag_grad_density) = NV_MAG(C_UDSI_G(c,t,density_grad));



} }

can any one explain to me what this error actually means?

cheers nandu
  Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with UDF compiling for kTkLW model Wantami FLUENT 0 July 18, 2011 05:11
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Accessing phi from a fvPatchField at same patch johndeas OpenFOAM 1 September 13, 2010 20:23
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50

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