CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   Udf viscous resistance compiling error (http://www.cfd-online.com/Forums/fluent-udf/114498-udf-viscous-resistance-compiling-error.html)

CfdMirco March 12, 2013 05:59

Udf viscous resistance compiling error
 
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

stuart23 March 12, 2013 07:44

Surely there must have been a compile error before it loaded?

Did you compile it from within Fluent?

CfdMirco March 12, 2013 09:54

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.

billwangard March 12, 2013 12:22

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.

CfdMirco March 13, 2013 08:20

But i compile the udf within the case, so it should be compiled in the same version of the case, or not?

billwangard March 13, 2013 13:05

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?

CfdMirco March 14, 2013 14:00

It's the first time that i have this problem, I have compiled successfully other udf :(


All times are GMT -4. The time now is 19:47.