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

Udf viscous resistance compiling error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 12, 2013, 05:59
Default Udf viscous resistance compiling error
  #1
New Member
 
Join Date: Mar 2013
Posts: 6
Rep Power: 3
CfdMirco is on a distinguished road
Hello,
i have a problem with a Udf for a porous media.
I have to define a time-dependant viscous resistance for a 3d volume, but when i'm going to compile the udf, fluent reports this error:
Error: The UDF library you are trying to load (libudf) is not compiled for 3d on the curent platform (win64).

The code is:

Quote:
#include "udf.h"

DEFINE_PROFILE(porosity, t, i) {

real x[ND_ND];
cell_t c;
real r;
real flow_time=RP_Get_Real("flow-time");

begin_c_loop(c,t)

{

C_CENTROID(x,c,t);

r=x[1];

F_PROFILE(c,t,i)=-(0.6632*exp(-1*((flow_time+4-4.216)/0.3303)*((flow_time+4-4.216)/0.3303))+2.384*exp(-1*((flow_time

+4-3.812)/0.6343)*((flow_time+4-3.812)/0.6343))+0.02211*exp(-1*((flow_time+4-7.055)/0.3902)*((flow_time+4-

7.055)/0.3902))+1.062*exp(-1*((flow_time+4-6.428)/1.673)*((flow_time+4-6.428)/1.673))+(-4.059)*exp(-1*((flow_time+4-

440)/2032)*((flow_time+4-440)/2032))+(-0.02729)*exp(-1*((flow_time+4-8.068)/0.01501)*((flow_time+4-

8.068)/0.01501))+0.5449*exp(-1*((flow_time+4-8.327)/2.103)*((flow_time+4-8.327)/2.103))+3.839*exp(-1*((flow_time+4-

12.16)/7.86)*((flow_time+4-12.16)/7.86)))*(((3.14*(6.25*(10e-6)))/4)/(7.12*10e-5));
}

end_c_loop(c,t) }
Can anyone help me???
Thx
CfdMirco is offline   Reply With Quote

Old   March 12, 2013, 07:44
Default
  #2
Senior Member
 
Stuart Buckingham
Join Date: May 2010
Location: Melbourne, Australia
Posts: 253
Rep Power: 15
stuart23 will become famous soon enough
Surely there must have been a compile error before it loaded?

Did you compile it from within Fluent?
__________________
http://bc247.eng.monash.edu.au
stuart23 is offline   Reply With Quote

Old   March 12, 2013, 09:54
Default
  #3
New Member
 
Join Date: Mar 2013
Posts: 6
Rep Power: 3
CfdMirco is on a distinguished road
It builds the udf, fluent displays this messages after build:

Quote:
Deleted old libudf\win64\3d\libudf.dll
1 file copied.
Copied C:\Users\Public\....\serial/C:\Users\Public\...\Udf poroso.c to libudf\src
(system "copy "C:\PROGRA~1\ANSYSI~1\v140\fluent"\fluent14.0.0\sr c\makefile_nt.udf "libudf\win64\3d\makefile" ")
1 file copied.
(chdir "libudf")()
(chdir "win64\3d")()
Done.
than when i load it it reports the error message:

Quote:
Opening library "C:\Users\Public\...\serial\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 3d on the curent platform (win64).

Can't find the specified file.

C:\Users\Public\....\serial\libudf\win64\3d\libudf .dll
Error Object: #f

Interrupting...
Done.
Yes I compiled it within fluent.
i tried to interpret the udf and it works so it must be a problem of the compiler, but i don't understand what it's wrong because i can compiler other udfs.
CfdMirco is offline   Reply With Quote

Old   March 12, 2013, 12:22
Default
  #4
New Member
 
Bill Wangard
Join Date: Jan 2011
Posts: 20
Rep Power: 5
billwangard is on a distinguished road
You probably compiled the UDF against a different version than you are actually running. For example, you may have compiled 3d double precision, but started 3d single precision, or 3d serial, and you started 3d parallel.
billwangard is offline   Reply With Quote

Old   March 13, 2013, 08:20
Default
  #5
New Member
 
Join Date: Mar 2013
Posts: 6
Rep Power: 3
CfdMirco is on a distinguished road
But i compile the udf within the case, so it should be compiled in the same version of the case, or not?
CfdMirco is offline   Reply With Quote

Old   March 13, 2013, 13:05
Default
  #6
New Member
 
Bill Wangard
Join Date: Jan 2011
Posts: 20
Rep Power: 5
billwangard is on a distinguished road
Yes. You are doing it the correct way.

I am beginning to think that you are not using the 64-bit compiler. Have you ever been able to successfully able to compile any UDF, or is this the only time you've had the problem?
billwangard is offline   Reply With Quote

Old   March 14, 2013, 14:00
Default
  #7
New Member
 
Join Date: Mar 2013
Posts: 6
Rep Power: 3
CfdMirco is on a distinguished road
It's the first time that i have this problem, I have compiled successfully other udf
CfdMirco is offline   Reply With Quote

Reply

Tags
compiling, error, udf, viscous resistance

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Native ParaView Reader Bugs tj22 OpenFOAM Paraview & paraFoam 265 September 16, 2014 10:19
Pressure outlet boundary condition rolando OpenFOAM Running, Solving & CFD 57 August 28, 2014 09:58
polynomial thermophysical properties II sebastian OpenFOAM Running, Solving & CFD 53 April 10, 2014 05:45
Compiling dynamicTopoFvMesh for OpenFOAM 2.1.x Saxwax OpenFOAM Installation 25 November 29, 2013 05:34
POSDAT problem piotka STAR-CD 4 June 12, 2009 08:43


All times are GMT -4. The time now is 21:50.