CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   failing to load a UDF (https://www.cfd-online.com/Forums/fluent-udf/72672-failing-load-udf.html)

IvanCFD February 13, 2010 16:39

failing to load a UDF
 
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.

IvanCFD February 13, 2010 17:55

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.

coalgas February 14, 2010 03:18

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

IvanCFD February 15, 2010 04:19

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.

anvitaa.sharma February 15, 2010 05:21

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?

coalgas February 15, 2010 06:24

Error, may be due to compiler
 
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 February 15, 2010 06:31

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.

IvanCFD February 15, 2010 06:42

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 February 15, 2010 07:49

Hi Chetan,

it worked!!!!!!!

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

Thanks a looooooooot!

Ivan.

coalgas February 15, 2010 17:29

Have a fun with UDF's
 
Cheers Mate!!
Have a fun with UDF's,
Thats really powerful feature of Fluent where we can communicate with solver.

regards
Chetan

darren_camilleri November 26, 2011 21:18

Loading UDF problems
 
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

coalgas November 28, 2011 00:44

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?

darren_camilleri November 28, 2011 05: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

cici January 20, 2012 15:17

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


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