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

UDF int id;

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 4, 2003, 04:34
Default UDF int id;
  #1
Li Jingping
Guest
 
Posts: n/a
I wrote a UDF for excercise.

#include "udf.h"

DEFINE_ON_DEMAND(my_udf) { Domain *domain; domain=Get_Domain(3); int id; Thread *f_thread=Lookup_Thread(domain, id); }

Once I interrepted it in FLUENT, it told me the syntax error on "int id;". I am confused! Is my UDF right or not? Is it required any other condition to define an integer index?

Thanks in advance!
  Reply With Quote

Old   April 4, 2003, 09:29
Default Re: UDF int id;
  #2
Li Jingping
Guest
 
Posts: n/a
i resolved this problem by myself, though I don't know why.

Change the sequence of the lines and divide the assignment line for thread into two parts as follows:

#include "udf.h"

DEFINE_ON_DEMAND(my_udf) { int idŁ»Thread *f_thread;Domain *domain; domain=Get_Domain(3); f_thread=Lookup_Thread(domain, id); }

UDF can be compiled by FLUENT.

Very confused. Anyone can tell me why?

  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ParaView/Parafoam error when making animation Disco_Caine OpenFOAM Paraview & paraFoam 6 September 28, 2010 09:54
OpenFOAM-1.5-dev svn revision 1438: libOpenFOAM does not compile in SP 4xF OpenFOAM Bugs 3 October 16, 2009 05:35
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Missing math.h header Travis FLUENT 4 January 15, 2009 12:48
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 10:38


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