CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   Udf viscous resistance compiling error (

CfdMirco March 12, 2013 05:59

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


#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");











end_c_loop(c,t) }
Can anyone help me???

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:


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")()
than when i load it it reports the error message:


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

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 09:47.