|
[Sponsors] |
December 7, 2004, 15:46 |
udfs on linux
|
#1 |
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 |
|
December 7, 2004, 17:36 |
Re: udfs on linux
|
#2 |
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 |
|
December 7, 2004, 18:03 |
Re: udfs on linux
|
#3 |
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. |
|
December 7, 2004, 18:36 |
Re: udfs on linux
|
#4 |
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 |
|
December 7, 2004, 18:38 |
Re: udfs on linux
|
#5 |
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 |
|
December 8, 2004, 05:45 |
Re: udfs on linux
|
#6 |
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 |
|
December 8, 2004, 06:11 |
Re: udfs on linux
|
#7 |
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. |
|
December 8, 2004, 08:58 |
Re: udfs on linux
|
#8 |
Guest
Posts: n/a
|
I have got udfs to work. Thanks to all that responded!!!!!!! Your help is much appreciated.
Mark |
|
|
|
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 10: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 |