CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Help! UDF Compile Error (https://www.cfd-online.com/Forums/fluent/29245-help-udf-compile-error.html)

Michael January 15, 2002 08:37

Help! UDF Compile Error
 
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); }


sivakumar January 18, 2002 16:24

Re: Help! UDF Compile Error
 
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


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