|
[Sponsors] |
February 13, 2010, 17:39 |
failing to load a UDF
|
#1 |
Member
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 17 |
Hi,
I'm a beginner about dealing with UDFs on Windows-based Fluent 2D. When I load the UDF, I get the following message: - "nmake" not recognized as an internal or external command, operable program or batch file. I've seen over there that it is an issue related to the interaction between Fluent and Visual Studio To solve it, during the installation process, one needs to select the "register environment variables" option. However, I haven't seen such option during Fluent installation. This is what I've done step by step: 1) Install full Microsoft Visual Studio 2008. 2) Install Windows-based Fluent. 3) Go to "Start" --> "All Programs" --> "Fluent Inc Products" --> "Fluent 6.3.26" --> "Set Environment" Well, after doing all that, I still can't load my UDF. I hope someone can give me a hint. Many thanks beforehand, Ivan. Last edited by IvanCFD; February 13, 2010 at 17:42. Reason: to include tags |
|
February 13, 2010, 18:55 |
|
#2 |
Member
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 17 |
I downloaded nmake.exe and installed at \Fluent.Inc\fluent6.3.26\ntx86 and also at WINDOWS\system32, I opened a command prompt and executed nmake. After doing all this, back on Fluent I was able to get rid of the nmake error message.
However I now get another error message: Opening library "libudf"... Error: open_udf_library: (...) I installed Visual Studio 2008 and I didn't say at any step whether path to be set or not. But after doing the "Set Enviroment" thing I checked that PATH is at ntx86. Would anyone please let me know what I'm missing? Many thanks beforehand, Ivan. Last edited by IvanCFD; February 13, 2010 at 18:56. Reason: grammar |
|
February 14, 2010, 04:18 |
|
#3 |
Member
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 17 |
Hello Ivan,
are you sure are you opening fluent from command prompt, from your working directory..?? (working directory where your mesh, case and udf files are) C:\workingdirectory fluent 2d |
|
February 15, 2010, 05:19 |
|
#4 |
Member
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 17 |
Hi coalgas,
yes, I open Fluent from the Command Prompt and with the .msh and .c files in the same directory from where I open Fluent. And I keep getting the same message: Opening library "libudf"... Error: open_udf_library: the system cannot find the file specified. Any hint? Thank you very much beforehand, Ivan. |
|
February 15, 2010, 06:21 |
|
#5 |
New Member
anvita
Join Date: Oct 2009
Posts: 3
Rep Power: 17 |
hello everyone,
I want to use the experimantal data points in the udf. How can this be done? How to form the equations in a udf? |
|
February 15, 2010, 07:24 |
Error, may be due to compiler
|
#6 |
Member
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 17 |
hello Ivan,
this error message i reckon due to improper installation of Visual C++ . I came across simillar message when i started working with UDF's Microsoft Visual C++ 2008 Express Edition is available for free and it works good for me. if you are using dot net ? There are different instructions to compile udfs if you are using dot net. i am positive that your problem will be solved once you carefully read the instructions at http://www.fluentusers.com/support/i...udf_serial.htm regards Chetan |
|
February 15, 2010, 07:31 |
|
#7 |
Member
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 17 |
Steps for Building Compiled Windows UDFs using Microsoft Visual C++ 2008 Express Edition
1.Install Microsoft Visual C++ 2008 Express Edition (Refer to the Microsoft Visual C++ 2008 Express Edition Installation Guide for installation instructions.) 2.You will be starting FLUENT from a Command Prompt so you will have to set the FLUENT.INC Environment Variables. 3.Select the Start Menu, Programs, Fluent Inc Products, Fluent 6.3.26), Set Environment. Choose YES to Modify. 4.The installation of Microsoft Visual C++ 2008 Express Edition does not set environment variables necessary to run from a command line, therefore, in order to compile UDF's within FLUENT you will need to set the Visual Studio environment variables. Select the Start Menu, Programs, Visual C++ 9.0 Express Edition, Visual Studio Tools, choose Visual Studio 2008 Command Prompt. 5. In this Command Prompt window change directory to the working directory where the source file (.c) and case and data file are located and launch FLUENT. 6.In FLUENT, Select Define, User Defined, Functions, Compiled. Select the Add button to add your source file. Select Build. Once the UDF is Compiled select the Load button. |
|
February 15, 2010, 07:42 |
|
#8 |
Member
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 17 |
Hi Chetan,
thanks a lot for your reply. Well, yes, I do have Visual Studio 2008.NET The thing is we I installed it, I didn't have to do anything. It installed by itself pretty much. So I guess you recommend me to install Visual Studio Express Edition and follow your 6 steps, don't you? I am going to do it and I'll let you know as soon as possible if I manage to load my UDF. Thanks a lot again, Ivan. |
|
February 15, 2010, 08:49 |
|
#9 |
Member
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 17 |
Hi Chetan,
it worked!!!!!!! I've followed your 6 steps and I've managed to build the compiled UDF!!! Thanks a looooooooot! Ivan. |
|
February 15, 2010, 18:29 |
Have a fun with UDF's
|
#10 |
Member
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 17 |
Cheers Mate!!
Have a fun with UDF's, Thats really powerful feature of Fluent where we can communicate with solver. regards Chetan |
|
November 26, 2011, 22:18 |
Loading UDF problems
|
#11 |
New Member
Darren Cam
Join Date: Nov 2011
Posts: 8
Rep Power: 15 |
Hi Chetan and Ivan,
I am also experiencing problems when I am trying to load the UDF library. The UDF is building with no problems however when I select 'LOAD' the following error appears: The UDF library you are trying to load (libudf) is not compiled for 2d on the curent platform (win64). The system cannot find the file specified. c:\.........\dynamic_mesh\dynamic_mesh\libudf\win6 4\2d\libudf.dll I have tried many things including modifying the fluent inc through setenv from command prompt of MVSE. Can you please explain to me in more detail what you did please? Thanks Darren |
|
November 28, 2011, 01:44 |
|
#12 |
Member
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 17 |
I am guessing you are Compiling your UDF's. have you tried Interpreted UDF's?
Is your udf written for parallel computing? I am wondering about your UDF (64 0r 32 bit), which platform it was written for? |
|
November 28, 2011, 06:15 |
|
#13 |
New Member
Darren Cam
Join Date: Nov 2011
Posts: 8
Rep Power: 15 |
Thanks for your reply chetan,
I managed to solve the problem by editing my C source file because it had a space between DEFINE_CG_MOTION and (vel_comp, dt, vel, omega, time, dtime) where in fact there should be no space. After removing the space, the UDF compiled with no errors and the library loaded successfully. By any chance, have you ever worked on in-cylinder dynamic meshes in fluent please? Regards Darren |
|
January 20, 2012, 16:17 |
|
#14 |
New Member
Join Date: Jul 2011
Posts: 25
Rep Power: 15 |
Hi Chetan,
I am using parallel processing on a window 7 64bit machine, and I have successfully interpreted the UDFs, however, failed to compile them. The error message is like this: The UDF library you are trying to load (libudf) is not compiled for 2d on the curent platform (win64). The system cannot find the file specified. c:\.........\dynamic_mesh\dynamic_mesh\libudf\win6 4\2d\libudf.dll Do you have any idea what is going wrong? Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
try to load a edited UDF | austin | Main CFD Forum | 0 | February 20, 2009 06:25 |
Fluent UDF load and apply inlet velocity b.c. | Knut Lehmann | Main CFD Forum | 2 | June 29, 2007 05:53 |
help on UDF compile and load | Sherry | FLUENT | 5 | October 29, 2005 12:37 |