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

udfs on linux

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 7, 2004, 16:46
Default udfs on linux
  #1
Mark
Guest
 
Posts: n/a
Hi,

I am trying to understand udfs. I have these questions:

What is a header file? How do you make a .so file? What is a .so file? With respect to the file tree described in the fluent documentation, where do you save your .cas file?

I would really appreciate an answer to any of these questions, as the fluent documentation assumes knowledge of some issues.

Mark
  Reply With Quote

Old   December 7, 2004, 18:36
Default Re: udfs on linux
  #2
ap
Guest
 
Posts: n/a
A header file is a file containing function prototypes and variables declarations. Such a kind of files are widely used in C, and their extension is .h.

If you write UDFs, you just need the udf.h header file, which have to be included with the command:

#include "udf.h"

at the beginning of your UDF C source file.

What version of FLUENT are you using?

In FLUENT 6.1, you just have to save the cas and the .C file source in the same directory. Then, you can manage the compilation process through FLUENT graphical interface.

Regards,

ap :-D
  Reply With Quote

Old   December 7, 2004, 19:03
Default Re: udfs on linux
  #3
Rob Hart
Guest
 
Posts: n/a
A .so file is equivalent to a .dll on windows - essentially it is a library of functions, that can be loaded by a program.

It contains your UDFs in a form that is ready to run by Fluent.
  Reply With Quote

Old   December 7, 2004, 19:36
Default Re: udfs on linux
  #4
Mark
Guest
 
Posts: n/a
Hi again,

Thanks for the response. In

Define|User-Defined|Functions|Compiled

it asks me for two sets of files, sources files (.c files) and header files (.h files). Where do I go to get the .h file I need, udf.h, and where in my simulation directory should I put this?

Here is my directory tree (found this on another website):

libudf|(Makefile, src, lnx86)

src|(makefile, my_udf.c)

lnx86|2ddp|(makefile, my_udf.c, libudf.so)

i.e. Makefile, src, and lnx86 are files and directories in the 'libudf' directory...

Mark

  Reply With Quote

Old   December 7, 2004, 19:38
Default Re: udfs on linux
  #5
Mark
Guest
 
Posts: n/a
So this .so file is made by Fluent or do I make this? Just so this is clear, I am trying to use compiled udfs.

Thanks again, Mark
  Reply With Quote

Old   December 8, 2004, 06:45
Default Re: udfs on linux
  #6
Rob Hart
Guest
 
Posts: n/a
It depends which version of fluent you are using.

In older versions you had to create it outside fluent, but it looks like the latest version has included some GUI stuff to do it for you. It is all explained in the UDF manual...

Rob
  Reply With Quote

Old   December 8, 2004, 07:11
Default Re: udfs on linux
  #7
Andrew Garrard
Guest
 
Posts: n/a
If you put

#include "udf.c"

as the first line of your source code: my_udf.c in your case, you do not need to supply a header file in the fluent gui. Just go to

Define|User-Defined|Functions|Compiled

Add the source file, which must be in the same dir as your .cas file click "build" and this will create all the directory tree and files in the libudf directory. Then click "Load" to load your UDF so that you can access the macros.
  Reply With Quote

Old   December 8, 2004, 09:58
Default Re: udfs on linux
  #8
Mark
Guest
 
Posts: n/a
I have got udfs to work. Thanks to all that responded!!!!!!! Your help is much appreciated.

Mark
  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
Dual Boot Windows and Linux and Go Open Source andyj Main CFD Forum 2 October 21, 2010 16:49
Unsteady and Flux UDFs for UDSs tom FLUENT 0 February 13, 2009 11:27
Open Source, Linux, Visit, Code-Saturne,openFOAM.. Ahmed Main CFD Forum 9 October 18, 2008 10:20
Linux to Windows (dual boot system) Alex Main CFD Forum 9 May 3, 2007 03:36
Compiling UDF's Under Linux OS Yasser Nabavi FLUENT 2 April 24, 2006 19:59


All times are GMT -4. The time now is 14:32.