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/)
-   -   someone help me please with my UDF (https://www.cfd-online.com/Forums/fluent-udf/83738-someone-help-me-please-my-udf.html)

ehooi January 10, 2011 02:25

someone help me please with my UDF
 
Hi all.
I have written a UDF that calculates the mean temperature of the outflow that is to be supplied to the inlet (something like a recirculation tank). When I compiled the UDF (UDFtrial.c), the following messages appear:
Error Object: #f
Deleted old libudf\win64\3ddp_host\libudf.dll
libudf\win64\3ddp_node\libudf.dll
1 file(s) copied.
(system "copy "C:\PROGRA~1\ANSYSI~1\v121\fluent"\fluent12.1.4\sr c\makefile_nt.udf libudf\win64\3ddp_host\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3ddp_host")()
# Generating ud_io1.h
(system "copy "C:\PROGRA~1\ANSYSI~1\v121\fluent"\fluent12.1.4\sr c\makefile_nt.udf libudf\win64\3ddp_node\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3ddp_node")()
# Generating ud_io1.h

and not the message as suggested by the UDF manual to be a successful compilation. Loading the library led to this error:

Opening library "libudf"...
Primitive Error at Node 0: open_udf_library: The operation completed successfully.

Primitive Error at Node 1: open_udf_library: The system cannot find the file specified.

Primitive Error at Node 2: open_udf_library: The system cannot find the file specified.

Primitive Error at Node 3: open_udf_library: The system cannot find the file specified.

Error: open_udf_library: The operation completed successfully.
Error Object: #f

I am running FLuent on a Windows 7 64bit system and parallel on a local machine.

Can someone help me with this?

Many thanks.

EH

gearboy January 12, 2011 21:32

Quote:

Originally Posted by ehooi (Post 289810)
Hi all.
I have written a UDF that calculates the mean temperature of the outflow that is to be supplied to the inlet (something like a recirculation tank). When I compiled the UDF (UDFtrial.c), the following messages appear:
Error Object: #f
Deleted old libudf\win64\3ddp_host\libudf.dll
libudf\win64\3ddp_node\libudf.dll
1 file(s) copied.
(system "copy "C:\PROGRA~1\ANSYSI~1\v121\fluent"\fluent12.1.4\sr c\makefile_nt.udf libudf\win64\3ddp_host\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3ddp_host")()
# Generating ud_io1.h
(system "copy "C:\PROGRA~1\ANSYSI~1\v121\fluent"\fluent12.1.4\sr c\makefile_nt.udf libudf\win64\3ddp_node\makefile")
1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3ddp_node")()
# Generating ud_io1.h

and not the message as suggested by the UDF manual to be a successful compilation. Loading the library led to this error:

Opening library "libudf"...
Primitive Error at Node 0: open_udf_library: The operation completed successfully.

Primitive Error at Node 1: open_udf_library: The system cannot find the file specified.

Primitive Error at Node 2: open_udf_library: The system cannot find the file specified.

Primitive Error at Node 3: open_udf_library: The system cannot find the file specified.

Error: open_udf_library: The operation completed successfully.
Error Object: #f

I am running FLuent on a Windows 7 64bit system and parallel on a local machine.

Can someone help me with this?

Many thanks.

EH

Do not put the case and udf source file in the folder with a blank, such as "Program files"

ehooi January 13, 2011 02:02

Hi,
Thanks for your reply but the case file and the udf are in a path that does not contain spaces.

D:\USERS\EHOOI\Fluent\SONO\FLUENT_EH\Fabric_100_10 Jan


I have been trying to solve this issue for some time now and any help will be gratefully appreciated.

gearboy January 13, 2011 10:55

Quote:

Originally Posted by ehooi (Post 290236)
Hi,
Thanks for your reply but the case file and the udf are in a path that does not contain spaces.

D:\USERS\EHOOI\Fluent\SONO\FLUENT_EH\Fabric_100_10 Jan


I have been trying to solve this issue for some time now and any help will be gratefully appreciated.

There is a space in "Fabric_100_10 Jan", right?between "Fabric_100_10" and "Jan".

ehooi January 13, 2011 11:02

Hi,
There is no space there. Sorry for the mistake there. The directory is:

D:\USERS\EHOOI\Fluent\SONO\FLUENT_EH\Fabric_100_10 Jan

which has no space.

I have no idea what is wrong.

gearboy January 13, 2011 20:40

Quote:

Originally Posted by ehooi (Post 290302)
Hi,
There is no space there. Sorry for the mistake there. The directory is:

D:\USERS\EHOOI\Fluent\SONO\FLUENT_EH\Fabric_100_10 Jan

which has no space.

I have no idea what is wrong.

Another possibility is that you install ansys under "Program files", which has a space.

ehooi January 14, 2011 05:20

Hi,
Thanks for your reply. Yes Ansys is installed in

C:\Program Files\ANSYS Inc

There are spaces in Program Files and Ansys Inc. Are you saying that the spaces will cause error when trying to run parallel UDF?

But ANSYS Inc is a default folder created by ansys....does it mean I would have to change that as well?

Thanks.

EH

gearboy January 17, 2011 08:58

Quote:

Originally Posted by ehooi (Post 290404)
Hi,
Thanks for your reply. Yes Ansys is installed in

C:\Program Files\ANSYS Inc

There are spaces in Program Files and Ansys Inc. Are you saying that the spaces will cause error when trying to run parallel UDF?

But ANSYS Inc is a default folder created by ansys....does it mean I would have to change that as well?

Thanks.

EH

I have never try ansys 12. Just give you some idea.

Ehsan-F September 27, 2011 03:01

Please let me know about the outcome
 
Hi,
Ehooi,
I have the same problem with the same error. Ansys is installed in "program file"
please let me know if you could find the answer.
it take me more than 2 weeks but still no progress.
Ehsan

ehooi September 27, 2011 03:09

Quote:

Originally Posted by Ehsan-F (Post 325725)
Hi,
Ehooi,
I have the same problem with the same error. Ansys is installed in "program file"
please let me know if you could find the answer.
it take me more than 2 weeks but still no progress.
Ehsan

You have to install Microsoft Windows SDK 7.1 Command Prompt and run Fluent from there. Also use Microsoft Visual C++ 2010 Express.

Hope this helps

ehooi September 27, 2011 03:14

1 Attachment(s)
Quote:

Originally Posted by Ehsan-F (Post 325725)
Hi,
Ehooi,
I have the same problem with the same error. Ansys is installed in "program file"
please let me know if you could find the answer.
it take me more than 2 weeks but still no progress.
Ehsan

I attached another file containing some help. I couldn't get this to work in mine but maybe it will help in your case. The way I did it was mentioned in my earlier reply to you.

Ehsan-F September 27, 2011 03:33

Thanks for your quick reply,
I will try that and see if helps. have you installed first visual c++ then fluent or it does not any matter? and then install SDK.
Thanks
Ehsan

ehooi September 27, 2011 03:35

Quote:

Originally Posted by Ehsan-F (Post 325731)
Thanks for your quick reply,
I will try that ans see if helps. have you installed first visual c++ then fluent or it does not any matter? and then SDK.
Thanks
Ehsan

Fluent can be installed first, that doesnt matter. But in terms of visual c++ and SDK, I dont remember but I think installing C++ first will make more sense. Just give it a try.

Ehsan-F September 27, 2011 04:07

Hi Ehooi,
thanks for sending pdf; seems it is not working,
I have installed C++ 2010 express edition and SDK 7.1
Thanks , it can be built now but I cannot load it.
the error is:
Error:open_udf_library:The system cannot find the file specified.
have you set environment variables for c++ and fluent before you get them working? what you added to your path?
I have added these three:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\ANSYS Inc\v120\fluent\ntbin\win64
please let me know if you have any comment on that
Many thanks
EHsan

ehooi September 27, 2011 06:15

Quote:

Originally Posted by Ehsan-F (Post 325734)
Hi Ehooi,
thanks for sending pdf; seems it is not working,
I have installed C++ 2010 express edition and SDK 7.1
Thanks , it can be built now but I cannot load it.
the error is:
Error:open_udf_library:The system cannot find the file specified.
have you set environment variables for c++ and fluent before you get them working? what you added to your path?
I have added these three:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\ANSYS Inc\v120\fluent\ntbin\win64
please let me know if you have any comment on that
Many thanks
EHsan

Sorry I can't remember how I did it. But could you give me more information as in where is it that they asked you to set the path for the environment variables? Maybe that will jog my memory.

Ehsan-F September 27, 2011 12:40

Hi,
It works now, I just changed the file name from "gas nozzle" to "nozzle" then it works.
Thanks alot for all your helps
Ehsan

Mohsin November 2, 2011 02:33

Dear Ehsan,

I have got exactly same problem.
Could you tell me which file name you had changed? Case and Data file names? Apparently it seems that they shouldn't have a space between them but mine has no space still i am getting the error. Any suggestion?

Greatly thanks

Ehsan-F November 2, 2011 02:45

1 Attachment(s)
Hi Mohsin,
I have attached a file containing what I have done, see that may help you.
The source file should not have space in its name but your problem maybe different, check the file
Ehsan

Mohsin November 2, 2011 20:53

Dear Ehsan,

Thanks alot. Problem solved.

Kxt908 January 27, 2014 13:07

I encountered the same problem. I made a new workbench case without any spaces in its name and everything seemed to work OK.


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