CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   compiling my UDF (http://www.cfd-online.com/Forums/fluent/39576-compiling-my-udf.html)

Seyed Farid Hosseinizadeh February 9, 2006 21:14

compiling my UDF
 
Hi everyone: I wrote a program that it's needed compiling it as a UDF in Fluent. I add my source file and click on Load. When I compile the program (click on Load bottom) the Fluent sends me this error: "Error: open_udf_library: The system cannot find the file specified". I tried to add UDF.H file manually on the Header box and click on Build bottom to building the UDF library but it sends another error: "Error: open_udf_library: The system cannot find the path specified." At the end my Case and Data file together my Source file are in the same directory.

Best Regards, Farid,


mAx February 10, 2006 01:28

Re: compiling my UDF
 
Hi, You have to add your source file, and then to build it. After that, you click on load.


Seyed Farid Hosseinizadeh February 10, 2006 01:47

Re: compiling my UDF
 
Hi Max: Thanks for your favor. I do your guides but still Fluent sends me this error: "c:/seyedfaridhosseinizadeh/fluentrun"

Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: ()"

I'm looking forward to hearing from you. Regards, Farid,

mAx February 10, 2006 02:15

Re: compiling my UDF
 
ok, look in your workink directory if you have a libudf folder. If yes, then you have to unload your libudf, with define/user-defined/functions/manage and then re-add your source, build and load (define/user-defined/functions/compiled)

Seyed Farid Hosseinizadeh February 10, 2006 02:38

Re: compiling my UDF
 
Hi. I did them but still I have a problem. As you know I don't do anything with Header file. Maybe my problem is this. I don't know and really I'm confused. "c:/seyedfaridhosseinizadeh/fluentrun"

Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: ()

Regards, Farid,

mAx February 10, 2006 02:57

Re: compiling my UDF
 
be sure, c++ compiler is installed on your machine

HVN February 10, 2006 04:24

Re: compiling my UDF
 
There are some specific compilers to use following your os

sagga February 10, 2006 05:54

Re: compiling my UDF
 
Hi Seyed. I think you should change the name of source code for example " Code1 " . Do not allow the name has space or symbol.

byebye

Venkatesh.V February 10, 2006 09:18

Re: compiling my UDF
 
--> Go to UDF manage menu and if any library is already loaded unload them. Then save the case file.

--> If libudf folder is there in you directory delete it.

--> now try to compile and load the library.

--> Still getting error, check directory has write file access.

--> Still getting error, check for correctness of c Compiler installation.


Tania February 10, 2006 11:50

Re: compiling my UDF
 
Hi Seyed, are you working on windows???

Seyed Farid Hosseinizadeh February 10, 2006 16:30

Re: compiling my UDF
 
Yes I'm working on windows. Thanks Bye

Seyed Farid Hosseinizadeh February 10, 2006 16:34

Re: compiling my UDF
 
Ok. Thanks I do it but it doesn't work. Thanks, Bye

Seyed Farid Hosseinizadeh February 10, 2006 16:36

Re: compiling my UDF
 
Hi: Thanks for your favor. I did anything that you said me. But I still see this error. " 1 file(s) copied. (system "copy C:\FLUENT.INC\fluent6.2.16\src\makefile_nt.udf libudf\ntx86\2ddp\makefile") 1 file(s) copied. 0 (chdir "libudf")() (chdir "ntx86\2ddp")()

Done. "c:/seyedfaridhosseinizadeh/fluentrun"

Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: () "

Thanks , Bye,

Tania February 10, 2006 16:48

Re: compiling my UDF
 
I got the same problem as yours when I run fluent in Linux. But in windows, every thing worked fine. But of course, I had to install visual C++.

After your built your Udf, do you find a folder named "liduf" in your working directory???

And you should also check that your fluent case is in the same folder as your UDF.

when you built your UDF, do you get any error message???


Seyed Farid Hosseinizadeh February 10, 2006 16:56

Re: compiling my UDF
 
Hi, Yes exactly. I installe Microsoft Visual Studio .Net 2003 that knows C++. I did anysteps that you figured out. At the end, I still recieve this error: " 1 file(s) copied. (system "copy C:\FLUENT.INC\fluent6.2.16\src\makefile_nt.udf libudf\ntx86\2ddp\makefile") 1 file(s) copied. 0 (chdir "libudf")() (chdir "ntx86\2ddp")()

Done. "c:/seyedfaridhosseinizadeh/fluentrun"

Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: () " Best Regards, farid,

Josh February 13, 2006 11:37

Re: compiling my UDF
 
I have the same prolem. When I interprete my udf, it works will, but when I compile it, it showed the same problem: "Error: open_udf_library: The system cannot find the file specified".

Can any one with UDF experience explain this? Thanks a lot!

Seyed Farid Hosseinizadeh February 13, 2006 13:08

Re: compiling my UDF
 
Hey Man, Me too, If I find my answer I will send to you.

Take Care, Best Regards, Farid,

Josh February 13, 2006 13:21

Re: compiling my UDF
 
Thank you. I am waiting for your good news!

Ravi Duggirala February 13, 2006 16:18

Re: compiling my UDF
 
Hi Guys,

If you are working on WINDOWS and installed Microsoft Visual studios.NET then,

STEP 1: Place the source file in the folder which contain case & data file (place it in C-Drive) [Create a new folder in C-Drive and place the case and data files and the Source file (.c file)]

STEP 2: Start --> All Programs --> Microsoft Visual Studio .NET 2003 --> Visual Studio .NET Tools --> Visual Studio .NET 2003 Command Prompt (it opens a command prompt)

STEP 3: In the command prompt browse the folder in which the case & data files and the source files are placed

STEP 4: Type "fluent 2ddp &" (it opens FLUENT console)

STEP 5: File --> Read --> Case & Data Files (browse for the case and data files)

STEP 6: Define --> User-Defined --> Functions --> Compiled

STEP 7: Add the source files and click BUILD and then click LOAD

Hope this will solve the problem for you people. If you have still some problems please feel free to contact me at duggirk@auburn.edu.

Ravi

Josh February 13, 2006 23:10

Re: compiling my UDF
 
Hi, Ravi,

Thank for your information. The situation to me is that I work in a network computer where everything is installed by the system administrater.

when I build my UDF, the following messege appears:

---------------------------------------------------- Deleted old libudf\ntx86\2ddp\libudf.dll

1 file(s) copied. (system "copy C:\Fluent.Inc\fluent6.2.16\src\makefile_nt.udf libudf\ntx86\2ddp\makefile") 1 file(s) copied. 0 (chdir "libudf")() (chdir "ntx86\2ddp")() 'nmake' is not recognized as an internal or external command, operable program or batch file. 'nmake' is not recognized as an internal or external command, operable program or batch file.

Done. -----------------------------------------------------

When I load it, the following messege appears:

---------------------------------------------- "h:/szhao22/nozzle010-1"

Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: ()

Hope you can point out where the problem is. Thank you very much!


All times are GMT -4. The time now is 15:25.