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

UDF error

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2003, 10:33
Default UDF error
  #1
Nandu
Guest
 
Posts: n/a
Hi,

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 {

density_grad,

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)

{

begin_c_loop(c,t)

{

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;

domain=Get_Domain(1);

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

{

begin_c_loop(c,t)

{

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

}

end_c_loop(c,t)

} }

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

cheers nandu
  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
Problem with UDF compiling for kTkLW model Wantami FLUENT 0 July 18, 2011 06: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 21:23
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 03:32
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


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