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/)
-   -   UDF - Error loading libudf (https://www.cfd-online.com/Forums/fluent-udf/85610-udf-error-loading-libudf.html)

99valentine November 22, 2014 15:32

Hello all,

I am finding difficulty loading a UDF file (.c) in ANSYS Fluent 14.5 2d dp. It prompts for the same error :-
The UDF library you are trying to load (libudf) is not compiled for 2ddp on the curent platform (win64).
I am working with Windows 8. And all efforts to make it work have failed. A little more assistance would be nice.

macfly November 22, 2014 17:02

Only 2 steps did the trick for me in order to compile UDFs in Fluent 14.5 or 15 on Windows 8.1:

- Installing Microsoft Visual Studio Express 12 for Windows 8: http://www.microsoft.com/en-ca/downl....aspx?id=30664

- Add the path to nmake.exe in the path environment variable.

99valentine November 23, 2014 02:54

Thanks for the reply macfly. Although the nmake issue has been resolved, I'm still experiencing an error : Cannot find D:\abcdefg..\ libudf.dll.

aayushjain27 February 8, 2015 09:01

hello rou
 
Quote:

Originally Posted by rou (Post 428939)
Hello,
I still have the some problem and I don't know what to do?
a file'cortexerror.log' appear and it write "Le chemin d’accès spécifié est introuvable
D:\ER\E_files\dp0\FFF\Fluent\D:\ER\E_files\dp0\FFF \Fluent\libudf\ntx86\3d\libudf.dll
Error Object: #f"

did you find a solution to above problem? i am too stuck at this error. Please help.

rou February 8, 2015 15:24

sorry but I didn't solve the problem

Falkinho March 18, 2015 05:09

//solved

I am at the very last point c and i want to change the working directory.
Unfortunately the program gives me the following error:

C:\Program Files\Microsoft SDKs\Windows\v7.0>"C:\Users\Julio.Ruben-PC\Desktop\Falko\tut-12-dm-ship-wave\Work_File"
""C:\Users\Julio.Ruben-PC\Desktop\Falko\tut-12-dm-ship-wave\Work_File"" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable.

Translation of last part:
is not recognized as an internal or external command, operable program or batch file.

Please help!

Quote:

Originally Posted by kiran_kumar (Post 342433)
the content of the pdf file :


Compiling and Loading FLUENT 64-bit UDFs using the "FREE" Microsoft Visual Studio 2010 32-bit Express Edition and the 7.0 SDK
IMPORTANT SUPPORT NOTE
: The 2010 Express Edition and the SDK will allow you to compile 64-bit UDFs for FLUENT. However, the installation and use of the Express and the SDK is not “officially” supported so we ask that you get your IT folks involved in
the actual installation.

RESTRICTIONS
: Also, you CANNOT compile UDFs for FLUENT without first opening the SDK Command prompt window and starting FLUENT from this window.

Instructions
Download the Microsoft Visual Studio Express Edition (2010) performing a default installation
http://www.microsoft.com/express/Downloads/#2010-Visual-CPP. Search for the text: Microsoft Visual C++ 2010 Express in your browser window.

7.0 SDK
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
or search for the text: Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 in your browser window.

IMPORTANT NOTE FROM MICROSOFT
: if you are running a 64-bit version of Windows and Visual Studio 2008, please upgrade to Visual Studio 2008 SP1 before installing the Windows 7 SDK. Search for the text: Microsoft Visual Studio 2008 Service Pack 2 in your browser window.

This prevents an issue where some platform configuration choices are unavailable in Visual Studio’s New Project Platform and New Solution Platform dialogs.
Starting FLUENT using the SDK 7.0 Command Prompt Window
1. Open up the SDK Command Window. This is required as this will set the compiler environment variables.
2. Choose the
Start Menu > All Programs > Microsoft Windows SDK v7.0 > CMD Shell
3. Launch FLUENT 13.x from this window. (image below):
(i am not able to paste picture here)
NOTE
: Make sure the CMD window states the following
a. “
Setting SDK Environment relative to C:\Program Files\Microsoft
SDKs\Windows\v7.x

b. Targeting Windows Server 2003
x64 DEBUG

c. Change to your Working directory (directory where your .cas, dat and .c file reside)
d. Launch Fluent: “C:\Program Files\ ANSYS Inc\v130\fluent\ntbin\win64\fluent


you can find this pdf file in fluent users website.

KK


a.elwardany April 10, 2015 07:06

Hi guys,
I followed all steps and still get the same error message:
would you comment on this. I've Teamviewer if anybody wanna check with me.
Error: The UDF library you are trying to load (INC_1) is not compiled for 3ddp on the current platform (win64).
The system cannot find the file specified.
C:\Ahmed\UDF-mansour\INC_1\win64\3ddp\libudf.dll
Error Object: #f

a.elwardany April 12, 2015 08:23

Dear Laurent,

I've followed every single step in the pdf file and I still have the same error message.
could you comment on this.
thanks.
Ahmed

pakk April 13, 2015 05:07

Please give the error that you see when you try to build the udf. Without that information, we can not tell you what went wrong.

vigii April 29, 2015 02:57

Hi,

If someone found the way to overcome this error "The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64).".

Please share the steps that needs to be take care.

Regards,
Vigii

pakk April 29, 2015 03:18

Quote:

Originally Posted by vigii (Post 544222)
Hi,

If someone found the way to overcome this error "The UDF library you are trying to load (libudf) is not compiled for 3d on the current platform (win64).".

Please share the steps that needs to be take care.

Regards,
Vigii

The error says that the udf is not compiled. The solution therefore is to compile the udf.

Probably compiling went wrong. Please give the error that you see when you try to build the udf. Without that information, we can not tell you what went wrong.

vigii April 29, 2015 04:56

Please find the error displayed as below

HTML Code:

Copied C:\Users\vignesh.v\Desktop\gerotor_test/C:\Users\vignesh.v\Desktop\gerotor_test\gerotor.c to libudf\src
Copied C:\Users\vignesh.v\Desktop\gerotor_test/C:\Users\vignesh.v\Desktop\gerotor_test\gerotor_vane_smoothing.c to libudf\src
udf_names.c file in 3ddp is upto date.
(system "copy "C:\PROGRA~1\ANSYSI~1\v145\fluent"\fluent14.5.0\src\makefile_nt.udf "libudf\win64\3ddp\makefile" ")
        1 file(s) copied.
(chdir "libudf")()
(chdir "win64\3ddp")()
# Generating ud_io1.h
gerotor.c
..\..\src\gerotor.c(540) : error C2143: syntax error : missing ';' before 'type'
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(542) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(544) : error C2065: 'i' : undeclared identifier
..\..\src\gerotor.c(544) : error C2065: 'i' : undeclared identifier
gerotor_vane_smoothing.c
Generating Code...

Done.

Opening library "C:\Users\vignesh.v\Desktop\gerotor_test\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 3ddp on the current platform (win64).

The system cannot find the file specified.

C:\Users\vignesh.v\Desktop\gerotor_test\libudf\win64\3ddp\libudf.dll
Error Object: #f


jyothsna k May 18, 2015 03:22

Thanks a lot laurentb. We could however, launch the workbench itself from the sdk command prompt so that all the components of the project are available simultaneously

ludosbiz July 17, 2015 06:41

compiling help
 
Hi guyz, i am new in UDF and C++ language so i'm asking for ur kind help!
I am facing the same problem of above, i am running a x64 fluent v14 and i wanted to try the UDF made by Ankit Gohel(thx soooooooooooo much man u're great!!).
after having installed visual studio and sdk i face the same problem, cos probably i dunno understand properly the compiling part of the issue, where i should create a dll library for a x64 based environment instead of the x86 of Ankit(once again man, big up for u) :D
now the question, somebody a bit more prepared on compiling/interpreting would explain in detail the passages to perform this operation with visual studio, or even directly compile the file in x64 environment and upload it here below?? i think would be of help for a lot of people like me, involved in dynamic mesh problems.
thx for anybody reading, my MS thesis depends upon this file, damn!

pakk July 17, 2015 07:18

Quote:

Originally Posted by ludosbiz (Post 555878)
Hi guyz, i am new in UDF and C++ language so i'm asking for ur kind help!
I am facing the same problem of above, i am running a x64 fluent v14 and i wanted to try the UDF made by Ankit Gohel(thx soooooooooooo much man u're great!!).
after having installed visual studio and sdk i face the same problem, cos probably i dunno understand properly the compiling part of the issue, where i should create a dll library for a x64 based environment instead of the x86 of Ankit(once again man, big up for u) :D
now the question, somebody a bit more prepared on compiling/interpreting would explain in detail the passages to perform this operation with visual studio, or even directly compile the file in x64 environment and upload it here below?? i think would be of help for a lot of people like me, involved in dynamic mesh problems.
thx for anybody reading, my MS thesis depends upon this file, damn!

I can not follow this... What is "the same problem as above"? There have been many problems listed. What is the UDF by Ankit Gohel? I don't see "Ankit" nor "Gohel" anywhere in this thread. What do you mean by x64 and x86?

The 'easiest' way to compile in Fluent is go to the menu, select Define->User-Defined->Functions->Compiled, and choose the file. There might be good reasons to do this differently, but if you don't have such a reason, keep it simple, and do it that way.

Small detail: C++ and C are two different languages, and Fluent UDFs use C, not C++.

ludosbiz July 17, 2015 09:45

Sorry pakk u re right i need to be clearer, thx for the answer thus.
I found somewhere a precompiled udf for cylinder motion that would be really useful in my case of study, a transversal moving cyl in ansys fluent.
When i try to load it on fluent it says:

The UDF library you are trying to load (libudf) is not compiled for 2ddp on the curent platform (win64).

Then i thought i should recompile it with visual studio for x64, am i right??
I copy here the UDF for some advice eventually..

#include "udf.h"
#include "dynamesh_tools.h"

#define p1 22/7
#define f1 0.161

DEFINE_CG_MOTION(cylinder, dt, cg_vel, cg_omega, time, dtime)
{
Thread*t;
face_t f;
real vel_prev;
vel_prev = 0.0;

cg_vel[0] = 0.0;
cg_vel[1] = (1.013)*sin(2*p1*f1*time);
cg_vel[2] = 0.0;

if (!Data_Valid_P())
return;

/* t = DT_OMEGA_CG(dt); */

cg_omega[0] = 0.0;
cg_omega[1] = 0.0;
cg_omega[2] = 0.0;

vel_prev = vel_prev + cg_vel[1];
Message ("time = %f, cg_vel[1] = %f\n", time, vel_prev);
}

ludosbiz July 18, 2015 09:32

Found this step by step walkthrough that may be useful for others, post the link here below.
http://www.simutechgroup.com/CFD/com...5-or-15-0.html

ludosbiz July 18, 2015 13:07

i've solved my issues in compiling the udf, it was a matter of environmental and user variables to be reset, thx also to rizwan for his "http://www.cfd-online.com/Forums/fluent-udf/44201-attn-all-soluton-udf-compile-problem.html"
Now i face another error, the following:
"c:\program files\ansys inc\v140\fluent\fluent14.0.0\src\global.h(10) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory"
is it a big deal, anybody knows something about?

ludosbiz July 21, 2015 15:43

Resolved this issue by simply ctrl+c/ctrl+v of the files from the c:\program files\visual studio\vc\crt\src subdirectories to the same src folder under ansys.

ludosbiz August 3, 2015 15:00

anybody has fluent and sdk and is available for compiling to me an udf??it's a matter of seconds but i cannot figure out why it is not working to me...pls i am stuck in this since weeks...


All times are GMT -4. The time now is 13:34.