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

compiled udf

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 24, 2003, 06:46
Default compiled udf
  #1
rafat
Guest
 
Posts: n/a
I am trying to get my code compiled using FLUENT 6.1. It seems it does not want to work. I have Microsoft visual C++ @ 6. I included the "udf.h". whenever I try to build the library the message come up: -------------------------------------------------------

1 file(s) copied. (system "move user_nt.udf trial1\ntx86\3d")0 (system "copy C:\FLUENT.INC\fluent6.1\src\makefile_nt.udf trial1\ntx86\3d\makefile") 1 file(s) copied. 0 (chdir "trial1")() (chdir "ntx86\3d")() raf.c # Generating udf_names.c because of makefile raf.obj udf_names.c udf_names.c(7) : error C2059: syntax error : '}' udf_names.c(8) : warning C4034: sizeof returns 0

Done. -------------------------------------------------------

if I ignored this message and tried to build load the library the message come up:

------------------------------------------------------- Opening library "trial1"... Error: open_udf_library: The system cannot find the file specified.

Error Object: () -------------------------------------------------------

I have no clue what so ever what to do. I hope that someone can help me with this. thank you all.
  Reply With Quote

Old   July 24, 2003, 13:03
Default Re: compiled udf
  #2
alex
Guest
 
Posts: n/a
HI

A commun mistake of new CFD users is try to implement there own UDF in their first trial. A better aproach is to make sure your library was set up properly and then implement the UDF that they wrote.

Consequently, I suguest that you 1)copy a UDF example from fluent to your .../libudf/src directory (do not forget to delete the filename and write the new one on the makefile) 2) delete the 2d or 3d directory and create it again, just to ensure that the already compiled files will not cause problems. this directory is under the architecture machine that you are using ...ntx86/3d 3)change your location to the libudf directory and type -- make "FLUENT_ARCH=ntx86" 4) if the example UDF compile properly you can conclude that your UDF has to be improved 5) it seems to my that you have an extra "}" symbol

Good luck

Alex Munoz
  Reply With Quote

Old   July 25, 2003, 01:57
Default Re: compiled udf
  #3
rafat
Guest
 
Posts: n/a
Thanks alex. I followed your advice and I found out the following:

my old code was:

#include "udf.h"

DEFINE_DPM_DRAG(drag, Re, p)

{

float rafat1 = 1000.0;

return (rafat1);

}

Then I have changed "float to real" and the resulted code become:

#include "udf.h"

DEFINE_DPM_DRAG(drag, Re, p)

{

real rafat1;

rafat1 = 1000.0;

return (rafat1);

}

it seems working now. I did not know that "float" is not recognised by the compiler I am using.

Thanks to everyone.
  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
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
I want to use pressure of 1 face in udf that compiled on other face iman_1844 Fluent UDF and Scheme Programming 3 June 10, 2010 12:55
Why udf can not be compiled in my pc? Xinqiang FLUENT 0 June 10, 2009 14:32
difference between udf compiled and udf interprete chandra sekhar FLUENT 2 April 11, 2006 00:04
how to quit compiled or interprited UDF tian FLUENT 0 April 8, 2003 23:53


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