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

UDF compilation error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2004, 09:37
Default UDF compilation error
  #1
Szabolcs Varga
Guest
 
Posts: n/a
Dear All, I am getting a compilation error of a UDF related (I think)to RP macros. Unfortunatelly I could not find the origin and meening of this error:

Error: G:\fluentwork\trigen\phase3\eforce_szabi.c: line 7: structure reference not implemented

There is almost no documentation on what RP_CELL(&(p->cCell)) and RP_THREAD(&(p->cCell)) are and how to use them correctly. There are a two examples in the fluent manual for the use of these macros, but I could not comile those examples either (4.6.12 Define_DPM_SWITH in the UDF manual). Could you please help me out what the problem might be? I am attaching the UDF below. Szabolcs

#include "udf.h" #include "dpm.h" #include "surf.h"

DEFINE_DPM_BODY_FORCE(force_L_P,p,idir) { cell_t c=RP_CELL(&(p->cCell)); Thread *t=RP_THREAD(&(p->cCell)); real l_force, mp, ex_t, er_t, Elp; real charge_on_p;

int V_x=0, V_r=0, E_x=0, E_r=1, E_magn=2;

mp=P_MASS(p);

charge_on_p= P_DIAM(p)*1.6e-11; /* you have to define real function P_charge() for particle charge*/ ex_t=C_UDMI(c,t,E_x); er_t=C_UDMI(c,t,E_r);

/* user code for x component force (m/s/s) */ if (idir==0) { l_force=ex_t*charge_on_p/mp; /*Fx*/ } /* user code for r component force (m/s/s) */ if (idir==1) { l_force=er_t*charge_on_p/mp; /*Fr*/ } return l_force }
  Reply With Quote

Old   April 2, 2004, 21:42
Default Re: UDF compilation error
  #2
Ajay
Guest
 
Posts: n/a
structure reference not implemented is usually got when you try to "interpret " the UDF's rather than "compiling" them -Ajay
  Reply With Quote

Old   April 6, 2004, 02:09
Default Re: UDF compilation error
  #3
FJ
Guest
 
Posts: n/a
Hi,

Yes,Yes. Ajay is right. We cannot use "interpretted" when we refer to structured variables. Let compile it.

Thank you

FJ
  Reply With Quote

Old   April 11, 2015, 13:49
Exclamation same problem
  #4
bia
New Member
 
nabaouia
Join Date: Aug 2014
Posts: 14
Rep Power: 11
bia is on a distinguished road
I've got the same problem , so I try to compile but I had this text message error :Error: open_udf_library: Le fichier spécifié est introuvable.

Error Object: ()
(the specific folder not found (libudf ) ?
I turn back and unload the libudf and recompile again but always the same problem . please help me
thanks
bia is offline   Reply With Quote

Old   September 14, 2015, 05:27
Default
  #5
New Member
 
shadi
Join Date: Feb 2015
Posts: 3
Rep Power: 11
shadi is on a distinguished road
your udf and your case must be in the same folder
shadi is offline   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
Pressure outlet boundary condition rolando OpenFOAM Running, Solving & CFD 62 September 18, 2017 06:45
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 11:39
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 18:54
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." sega OpenFOAM Community Contributions 12 February 17, 2010 09:30
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07


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