|
[Sponsors] |
January 15, 2002, 09:37 |
Help! UDF Compile Error
|
#1 |
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); } |
|
January 18, 2002, 17:24 |
Re: Help! UDF Compile Error
|
#2 |
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 |
|
|
|
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 |