|
[Sponsors] |
December 13, 2006, 05:59 |
Compiling UDF
|
#1 |
Guest
Posts: n/a
|
Hi everybody,
i am trying to compile a UDF into FLUENT. I have checked the different posts in that forum but nothing could really give me the clue. Do I have to copy anything to anywhere? I am doing the following steps: [read] the case -> [define]->[user defined]-> [function] -> compiled -> add source file -> add header file -> click [build] -> [load] but that just results in: Opening library "libudf"... Error: open_udf_library: The system cannot find the specified file. Error Object: () Any further hints? Thanx a lot. Claud |
|
December 13, 2006, 06:40 |
Re: Compiling UDF
|
#2 |
Guest
Posts: n/a
|
Do you use Unix or WinXP? Usually Fluent will take care of all copy operations and give some feedback during compiling/linking like "Working... compiling ... linking ... done." You can do a file search in your working directory to see if the library has been built. The default names are "libudf.dll" for WinXP or "libudf.so" for Unix.
RoM |
|
December 13, 2006, 09:57 |
Re: Compiling UDF
|
#3 |
Guest
Posts: n/a
|
Hi RoM, I am using Windows2000. Up to now I am not getting any feedback regarding working...compiling... At least the library is created after hitting the "build"-button but with a message. During that one it misses the command "nmake". Then I copy the nmake.exe file it into the 2d-folder and then I dont get that message anymore. After hitting the load button I get the earlier mentioned error... Any suggestions? Claud
|
|
December 13, 2006, 10:05 |
Re: Compiling UDF
|
#4 |
Guest
Posts: n/a
|
If the library is built you can load it using the udf library manager (define-> user-defined -> functions ->manage). Type in the full path and click "Load". I am not shure if you have to add the .dll extension to the library name, its a bit try an error.
Good luck, RoM |
|
December 13, 2006, 10:51 |
Re: Compiling UDF
|
#5 |
Guest
Posts: n/a
|
Try copying everything to a directory like c:\fluent.calc and compile from there. Sometimes the error happens when you are using names with whitespaces etc.
Regards, PAD |
|
December 13, 2006, 11:42 |
Re: Compiling UDF
|
#6 |
Guest
Posts: n/a
|
Hi RoM, I finally got it to work. It was a bit tricky. I figured out that I didnt have to copy the nmake.exe... but I had to "convert" the file with the Visual Studio Command Prompt typing "nmake". Then I was able to load it in Fluent... and it seems to work now... Thanx. Claud
|
|
December 13, 2006, 12:19 |
Re: Compiling UDF
|
#7 |
Guest
Posts: n/a
|
I am glad to hear this, happy steamreforming . I will be on my winter vacation for the next 2 weeks so if you have some specific questions about the udf i sent to you it will have to wait until next year. I wish you and all who are reading this post right now a nice december, merry christmas a happy new year. I know its a bit early ....
RoM |
|
December 13, 2006, 18:54 |
Re: Compiling UDF
|
#8 |
Guest
Posts: n/a
|
Hi Claud,
Iam facing the same problem as your's. Can you please how did you get over it. Thanks Regards Jason |
|
December 14, 2006, 03:35 |
Re: Compiling UDF
|
#9 |
Guest
Posts: n/a
|
Hi Jason,
I have performed the following steps: 1) write your UDF and save it as .c 2) save your case/dat/c-file and .h-file (e.g. udf.h) in the same folder 3) open FLUENT and load your case file 4) Define --> User-Defined-Functions --> Compiled 5) Add your source file (ending .c) and add your header file (ending .h) 6) click on "build" --> here I got a message saying that "nmake" is unknown --> "ignore" that since your libudf-folder is being created anyway 7) here I used the Visual Studio .Net 2003 Command Prompt window which I copied into the 2d-folder from the libudf-folder (you could also open that prompt window from any other place but than you have to make sure that you have navigated it into the right folder 8) write "nmake" (without "" of course) into the command window and hit Enter 9) there should come up some lines.... 10) Define --> User-Defined-Functions --> Compiled --> click the "load" button (that should result in lines generated by Fluent like "Opening library "libudf" .... Done") 11) feel happy that you finally overcome that problem! At least I was happy about it Hope that helps you a bit. Best wishes and good luck. Let me know if it worked. The FLuent Guides are not helpful at all regarding that problem. Claud |
|
December 14, 2006, 12:17 |
Re: Compiling UDF
|
#10 |
Guest
Posts: n/a
|
Perhaps I should have posted sooner on this, but this is most probably a configuration problem with your compiler (and thus is not really a Fluent issue, so their docs won't really address it). This is addressed in the Fluent FAQ, but to get things working properly you'll need to fix your compiler configuration. As far as I know, this sort of thing is most likely because the command line version of the compiler is not fully set up. Usually, you'll get some complaints about missing DLL's too, so this might be different.
Jason |
|
December 18, 2006, 17:52 |
Re: Compiling UDF
|
#11 |
Guest
Posts: n/a
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling udf at window Nt(64BIT) | noa | FLUENT | 3 | July 30, 2014 00:01 |
Compiling UDF on a cluster | Adya | FLUENT | 1 | December 14, 2009 12:30 |
UDF compiling problem in Flient 6.3 | jeevan kumar | FLUENT | 2 | February 25, 2009 01:43 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |
On Compiling a UDF | David Chabot | FLUENT | 5 | May 20, 2005 10:13 |