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

UDF - Error loading libudf

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree56Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2013, 19:01
Default udf
  #21
Senior Member
 
christine
Join Date: Jul 2009
Location: europe
Posts: 125
Rep Power: 16
yorelchr is on a distinguished road
hello everyone,

I have a similar problem when trying to build my udf.
My udf is calling another one, in fortran. But when I build the library I have the following error message:

Quote:
Creating library libudf.lib and object libudf.exp
rate_driver.obj : error LNK2019: unresolved external symbol _chemrate_ referenced in function _arm9_rate
libudf.dll : fatal error LNK1120: 1 unresolved externals
chemrate is in the fortran file. How can I help FLUENT find this file?

I have tried this method for compiling (http://www.cfd-online.com/Forums/flu...ndows2000.html)

Quote:
You need visual studio 6 and in order to compile you need to set your environment variables selecting the item from the start menu, ie start -> programs -> Fluent.Inc -> Environment Variables. (or whatever it is)

Then run the vcvars32.bat batch file from the cmd prompt located in the bin folder of c++. Then you can run nmake to compile.

Look at the documentation Fluent have provided! There is a .pdf file which explains this!

Greg
but it does not work.
I launched vcvars32.bat in the C:\Programmi\Microsoft Visual Studio 10.0\VC\bin directory. Is it ok?
then I had the answer "
Quote:
Setting environment for using Microsoft Visual 2010 x86 tools
" .
Then I went to my directory, where I have the .cas, .c and .f and typed nmake, but I obtained:
Quote:
NMAKE : fatal error U1064 : Makefile not found and no taret specified.
Do I have to set environment for the Visual Fortran? I have Compaq Visual Fortran 6.

Thank you for your help.

yorelchr
yorelchr is offline   Reply With Quote

Old   April 11, 2013, 19:21
Default
  #22
New Member
 
Nasser
Join Date: Dec 2012
Posts: 21
Rep Power: 13
nasser is on a distinguished road
Hi friends
my OS is win7 32bit , I need the same tutorall for win7 32 , can anybody help me ?
tnx
nasser is offline   Reply With Quote

Old   May 21, 2013, 09:15
Default
  #23
rou
New Member
 
arough
Join Date: Mar 2013
Location: tunisia
Posts: 24
Rep Power: 12
rou is on a distinguished road
Error [cortex] [time 5/21/13 12:29:14] The UDF library you are trying to load is not compiled for 3d on the curent platform (ntx86).

Le fichier spécifié est introuvable.

Error [cortex] [time 5/21/13 12:33:38]
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.

Error [cortex] [time 5/21/13 12:41:38] 
can any one help me?
rou is offline   Reply With Quote

Old   May 21, 2013, 09:38
Default
  #24
Member
 
laurentb's Avatar
 
Laurent B
Join Date: Jun 2009
Location: Lille, FRANCE
Posts: 70
Rep Power: 16
laurentb is on a distinguished road
Hi rou,

The answer is in the error message : "The UDF library you are trying to load is not compiled for 3d on the curent platform (ntx86)."

Try again after having compiled the library for the right solver (3d) and platform (32 bits)
laurentb is offline   Reply With Quote

Old   May 21, 2013, 12:46
Default
  #25
rou
New Member
 
arough
Join Date: Mar 2013
Location: tunisia
Posts: 24
Rep Power: 12
rou is on a distinguished road
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"
rou is offline   Reply With Quote

Old   July 6, 2013, 09:03
Default
  #26
New Member
 
Rohit Jain
Join Date: Feb 2013
Posts: 13
Rep Power: 13
rohit.jain092 is on a distinguished road
This works. Thank you so so much CFD Online and everyone. )))))))
rohit.jain092 is offline   Reply With Quote

Old   August 6, 2013, 14:07
Default
  #27
Member
 
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 14
shashank312 is on a distinguished road
Hi Laurent,

Are you trying to say that the versions of Fluent, Visual Studio and the Windows platform on my machine must be the same?

Thanks,
Shashank

Quote:
Originally Posted by laurentb View Post
Hi rou,

The answer is in the error message : "The UDF library you are trying to load is not compiled for 3d on the curent platform (ntx86)."

Try again after having compiled the library for the right solver (3d) and platform (32 bits)
shashank312 is offline   Reply With Quote

Old   August 7, 2013, 04:23
Default
  #28
Member
 
laurentb's Avatar
 
Laurent B
Join Date: Jun 2009
Location: Lille, FRANCE
Posts: 70
Rep Power: 16
laurentb is on a distinguished road
Not exactly, if you have compiled a library with Fluent version 32 bits in 2d mode, the library only work for Fluent version 32 bits with 2d mode. It can't work for a 64 bits version or a 3d mode.
laurentb is offline   Reply With Quote

Old   August 7, 2013, 15:30
Default
  #29
Member
 
Shashank
Join Date: Apr 2011
Posts: 74
Rep Power: 14
shashank312 is on a distinguished road
Well, I am still not able to solve it. Do you have any suggestions or ideas on how to do so? I am running Fluent 14 on a 64-bit system and trying to compile a library in 2ddp mode.
shashank312 is offline   Reply With Quote

Old   August 20, 2013, 11:47
Default
  #30
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 12
tranvantrung551987 is on a distinguished road
Quote:
Originally Posted by bshahzamanian View Post
hi friends
i have a problem, when i compile udf source file it builds well but when i load it this error apears:
open_udf_library: The system cannot find the path specified.
i get the same error, did you resolve proplem?. Can you help me ?
thank you verry much
tranvantrung551987 is offline   Reply With Quote

Old   August 22, 2013, 04:50
Default
  #31
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 12
tranvantrung551987 is on a distinguished road
Quote:
Originally Posted by Atze View Post
Hi,

i've succesfully compiled my udf, but when i load it fluent says

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

what can i do ?

I use fluent 13, visual c++ 2008 express and win7 x64

Thank you
i get the same error, do you compiled succesfully ?. can you help me.
thank you
tranvantrung551987 is offline   Reply With Quote

Old   September 18, 2013, 14:05
Default Problem in compiling
  #32
New Member
 
Join Date: Sep 2013
Posts: 1
Rep Power: 0
amirebidarabi is on a distinguished road
Hi
I have a same problem, I installed that programs but my UDF has not work properly yet,What should I do? Can any body help me?
amirebidarabi is offline   Reply With Quote

Old   February 28, 2014, 05:44
Default
  #33
Member
 
Nazim
Join Date: Oct 2013
Posts: 93
Rep Power: 12
shahid nadeem is on a distinguished road
thanks a lot it helped me to solve the problem. one doubt do we always need to give name as working and do we need to always keep it in C folder thank you
shahid nadeem is offline   Reply With Quote

Old   March 14, 2014, 03:54
Default hi
  #34
New Member
 
刘鹤
Join Date: Mar 2014
Posts: 3
Rep Power: 12
liuhehezaizai is on a distinguished road
Quote:
Originally Posted by The_Architect View Post
Hi,

if you have not done it be sure to start Fluent from the VS command prompt.
can you tell me how to start Fluent from the VS command prompt?thank you very much .
liuhehezaizai is offline   Reply With Quote

Old   March 19, 2014, 12:08
Default
  #35
New Member
 
Subodh
Join Date: Sep 2013
Location: Canada
Posts: 24
Rep Power: 12
Subodh21 is on a distinguished road
Thanks a lot it worked for me
Subodh21 is offline   Reply With Quote

Old   May 5, 2014, 00:17
Default would you help me
  #36
New Member
 
刘鹤
Join Date: Mar 2014
Posts: 3
Rep Power: 12
liuhehezaizai is on a distinguished road
Quote:
Originally Posted by laurentb View Post
This ANSYS support note provides all informations necessary to compile UDF for FLUENT 64-bit
hello,would you please tell me how to settle the problem i conquered ?thank you very much.
liuhehezaizai is offline   Reply With Quote

Old   May 5, 2014, 00:34
Default
  #37
New Member
 
刘鹤
Join Date: Mar 2014
Posts: 3
Rep Power: 12
liuhehezaizai is on a distinguished road
Quote:
Originally Posted by laurentb View Post
This ANSYS support note provides all informations necessary to compile UDF for FLUENT 64-bit
hello ,i have read the .pdf but still have a problem,when i "Starting FLUENT using the SDK 7.0 Command Prompt Window",i can not write the right Working directory(c. Change to your Working directory (directory where your .cas, dat and .c file reside)),coule you tell me how to write it correctly? thank you very much .
liuhehezaizai is offline   Reply With Quote

Old   August 19, 2014, 12:08
Default
  #38
New Member
 
Ramin Mortezazadeh
Join Date: Jul 2013
Posts: 3
Rep Power: 12
ramin66m is on a distinguished road
Hi
I am new in UDF, I build my library when I trying to Compile My UDF to calculate the Kelvin Force on a DPM simulation, the following error appear:

The UDF library you are trying to load (libudf) is not compiled for 2ddp on the current platform (win64).
The system cannot find the file specified.

D:\libudf\win64\2ddp\libudf.dll


I try all of the recommendation but, the problem exist yet. in my opinion the problem may be from the UDF that I bring it here:

#include "udf.h"
#include "dpm.h"
#define PI 3.141592654
#define Mu0 12.56637e-7
#define KB 1.38065e-23
#define alpha 0.04
#define I 25
DEFINE_DPM_BODY_FORCE(kelvin_force,p,i)
{
real bforce;
real R;
real U;
real V;
real mp;
real z;
real LL;
real M;
real HY;

U=P_POS(p)[0];
V=P_POS(p)[1]+0.102
R=pow(U,2)+pow(V,2);
mp=212767.59*P_DIAM(p)*P_DIAM(p)*P_DIAM(p);
HY=(I/(2*(PI)))*(pow(R,-0.5));
z=(Mu0*mp*HY)/(KB*P_T(p));
LL=(1/tanh(z))-(1/z);
M=mp*LL;
if (i==0)
{
bforce = (Mu0*M)*(I/(2*PI))*(U)*(pow(R,-1.5));
return (bforce/P_MASS(p));
}
else if (i==1)
{
bforce =(Mu0*M)*(I/(2*PI))*(V)*(pow(R,-1.5));;
return (bforce/P_MASS (p));
}

I'm thankful If one of you pay attention to my problem.
ramin66m is offline   Reply With Quote

Old   October 23, 2014, 12:56
Default Udf
  #39
Member
 
Muhammed Asmail
Join Date: Nov 2009
Location: Iraq
Posts: 43
Rep Power: 16
Muhammed_iraq is on a distinguished road
Quote:
Originally Posted by laurentb View Post
First of all, i recommend you read the Fluent UDF Manual.

If you use a udf you will need to compile your code (.c file) in order to obtain a compiled library (.dll). You don't have to do this if someone give you the library precompiled BUT the library works only for a specific OS (32 or 64bits) and a specific solver (2d or 3d or double precision).

In your case you haven't got a library compiled for your OS (64bits) and your solver (3ddp)
Dear laurentb
What is benefit of Microsoft visual studio for loading UDF IN fluent?
Muhammed_iraq is offline   Reply With Quote

Old   October 23, 2014, 16:39
Default Microsoft Visual Studio
  #40
Member
 
Muhammed Asmail
Join Date: Nov 2009
Location: Iraq
Posts: 43
Rep Power: 16
Muhammed_iraq is on a distinguished road
Hi everyone
Please i finished to install Microsoft visual studio but please how can i use it to load UDF? just SDK is used to load UDF or what?
Muhammed_iraq is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 05:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 02:41.