CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

failing to load a UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2010, 16:39
Default failing to load a UDF
  #1
Member
 
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 16
IvanCFD is on a distinguished road
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 16:42. Reason: to include tags
IvanCFD is offline   Reply With Quote

Old   February 13, 2010, 17:55
Default
  #2
Member
 
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 16
IvanCFD is on a distinguished road
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 17:56. Reason: grammar
IvanCFD is offline   Reply With Quote

Old   February 14, 2010, 03:18
Default
  #3
Member
 
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 16
coalgas is on a distinguished road
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
coalgas is offline   Reply With Quote

Old   February 15, 2010, 04:19
Default
  #4
Member
 
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 16
IvanCFD is on a distinguished road
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.
IvanCFD is offline   Reply With Quote

Old   February 15, 2010, 05:21
Default
  #5
New Member
 
anvita
Join Date: Oct 2009
Posts: 3
Rep Power: 16
anvitaa.sharma is on a distinguished road
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?
anvitaa.sharma is offline   Reply With Quote

Old   February 15, 2010, 06:24
Default Error, may be due to compiler
  #6
Member
 
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 16
coalgas is on a distinguished road
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
coalgas is offline   Reply With Quote

Old   February 15, 2010, 06:31
Default
  #7
Member
 
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 16
coalgas is on a distinguished road
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.
coalgas is offline   Reply With Quote

Old   February 15, 2010, 06:42
Default
  #8
Member
 
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 16
IvanCFD is on a distinguished road
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.
IvanCFD is offline   Reply With Quote

Old   February 15, 2010, 07:49
Default
  #9
Member
 
Ivan
Join Date: Aug 2009
Posts: 63
Rep Power: 16
IvanCFD is on a distinguished road
Hi Chetan,

it worked!!!!!!!

I've followed your 6 steps and I've managed to build the compiled UDF!!!

Thanks a looooooooot!

Ivan.
IvanCFD is offline   Reply With Quote

Old   February 15, 2010, 17:29
Default Have a fun with UDF's
  #10
Member
 
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 16
coalgas is on a distinguished road
Cheers Mate!!
Have a fun with UDF's,
Thats really powerful feature of Fluent where we can communicate with solver.

regards
Chetan
coalgas is offline   Reply With Quote

Old   November 26, 2011, 21:18
Default Loading UDF problems
  #11
New Member
 
Darren Cam
Join Date: Nov 2011
Posts: 8
Rep Power: 14
darren_camilleri is on a distinguished road
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
darren_camilleri is offline   Reply With Quote

Old   November 28, 2011, 00:44
Default
  #12
Member
 
chétan
Join Date: May 2009
Location: Australia
Posts: 55
Rep Power: 16
coalgas is on a distinguished road
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?
coalgas is offline   Reply With Quote

Old   November 28, 2011, 05:15
Default
  #13
New Member
 
Darren Cam
Join Date: Nov 2011
Posts: 8
Rep Power: 14
darren_camilleri is on a distinguished road
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
darren_camilleri is offline   Reply With Quote

Old   January 20, 2012, 15:17
Default
  #14
New Member
 
Join Date: Jul 2011
Posts: 25
Rep Power: 14
cici is on a distinguished road
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
cici is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
try to load a edited UDF austin Main CFD Forum 0 February 20, 2009 05:25
Fluent UDF load and apply inlet velocity b.c. Knut Lehmann Main CFD Forum 2 June 29, 2007 04:53
help on UDF compile and load Sherry FLUENT 5 October 29, 2005 11:37


All times are GMT -4. The time now is 16:17.