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

Help! UDF Compile Error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2002, 09:37
Default Help! UDF Compile Error
  #1
Michael
Guest
 
Posts: n/a
Hi,

I am now developing a new drag model by using the UDF. This model needs the gas variables in the location of tracked particles. But I always met the

Error" Reference Structure not implemented" in the following lines

cell_t c = RP_CELL(&p->cCell);

Thread *t = RP_THREAD(&p->cCell);

tf = C_T(c,t);

(My own UDF code is attached below.)

Then, I try the example in Fluent Manual. Even for

#include "udf.h"

DEFINE_DPM_OUTPUT(melting_output, header, fp, p, thread, plane)

{ real d;

d = P_DIAM(p);

d = p->state.diam;

}

The error" Reference Structure not implemented" still shows up at the line of

d = p->state.diam;

It seems that something wrong with the structure decalaration. I really apprecaite it if you once experienced similar problem and can give me some advices.

Michael

#include "udf.h"

#include "surf.h" /* not included in udf.h so must include here */

/* include surf.h for macros: * RP_Cell() & RP_Thread() */

#define GAMMA 2077. //He

DEFINE_DPM_DRAG(udf_drag_force, Re, p)

{ real xmach, tf, tp, vf, vp, rho, xmu, dp, Cd;

real vsound, tr, sr, gamma, Cdone, Cd175;

real drag_force;

cell_t c = RP_CELL(&p->cCell); /* Get Cell and Thread from */

Thread *t = RP_THREAD(&p->cCell); /* Particle Structure */

tp = P_T(p);

dp = P_DIAM(p);

tf = C_T(c,t);

Cd = ...; /* equations for computing Cd */

drag_force = 18.*Cd*Re/24.;

return (drag_force); }

  Reply With Quote

Old   January 18, 2002, 17:24
Default Re: Help! UDF Compile Error
  #2
sivakumar
Guest
 
Posts: n/a
hi,

are u trying to use interpreted UDF? if so u can't use structure variables with it. u will have to use the compiled UDF to use these variables. if not,im sorry, i dont know why. all the best. siva
  Reply With Quote

Reply


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: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 19:54
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 21:11
[Netgen] Installation of Netgen in SuSE Linux 92 edvardsenpriv OpenFOAM Meshing & Mesh Conversion 23 January 16, 2009 07:12
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 06:07
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


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