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 macro not compliled (https://www.cfd-online.com/Forums/fluent-udf/125064-udf-macro-not-compliled.html)

KITetima October 18, 2013 04:53

UDF macro not compliled
 
Hi everybody,


When I compiling UDFs, I can build "libudf", but I can't load it. So could anyone can help me or to explain why?

Opening library "c:\users\gxu2\desktop\vof\libudf"...
Error: The UDF library you are trying to load (libudf) is not compiled for 2d on the curent platform (ntx86).


I have put the file "vitesse.c" in the libudf file.

And here is my UDF macro :

/************************************************** *********************
vprofile.c
UDF for specifying steady-state velocity profile boundary condition
************************************************** **********************/
#include "udf.h"

DEFINE_PROFILE(x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, position) = 5;
}
end_f_loop(f, thread)
}


Thank you very much!


tranvantrung551987 October 22, 2013 05:20

do you meet error in the fluent ?

KITetima October 22, 2013 05:24

Yes actually, I have tried with just "interpreting " and as select my UDF for the moving wall I got the error
"ERROR : incorrect grid motiom UDF x-velocity on zone 7"

and I donīt know what it means

tranvantrung551987 October 22, 2013 06:00

can I see your udf ?

KITetima October 22, 2013 06:14

For the moment I just want to try to have a constant velocity on the moving wall. I want to test af first my model. So here is my UDF

/************************************************** *********************
vprofile.c
UDF for specifying steady-state velocity profile boundary condition
************************************************** **********************/
#include "udf.h"

DEFINE_PROFILE(x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, position) = 5;
}
end_f_loop(f, thread)
}

tranvantrung551987 October 22, 2013 06:32

your udf report velocity but i don't see to report it. your udf report presssure. Do you use complied or interpret ?

KITetima October 22, 2013 06:34

I interpret my UDF.

tranvantrung551987 October 22, 2013 06:51

I have check your udf. it is correct. after you interpret , you go to boundary condition to report udf.

KITetima October 22, 2013 07:06

Thank you for your answer. and thank you for checking my UDF.

After I interpret, I go to boundary condition.
Then I select my moving wall. Should I select moving wall in Momentum ?
after if I want to report the udf it is not possible. I can go to profile and then I can t even read my UDF profile.

I can only load and find my UDF in the dynamic mesh (dynamic Mesh zone) but after I have got a fatal error.

tranvantrung551987 October 22, 2013 07:47

if you report wall moving, you can't do as a such. to report wall moving, you have to use dynamic mesh and use complied.
- download SDK command prompt
- start fluent by sdk.
- then complied udf

KITetima October 22, 2013 08:05

I actually have no admin right to try that immediatly and download Visual Studio, but thank you very much for your answer. I would let you know if it is working.

tranvantrung551987 October 23, 2013 03:09

you can download free in the internet

KITetima October 23, 2013 09:13

Hello,

I have download the software following this way ;

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
3. Launch FLUENT 14.5 from this window. (and chose 2D configuration)

I add my working directory (directory where my .c file reside) and then I launch Fluent.

I try then to compile my UDF (define/userdefine/functions/compiles/add and then load)

and I got this error-message :

>
Opening library "C:\Users\...ex_files\dp0\FFF\Fluent\libudf\ntx86\ 2d\libudf"
Error : The UDF library you are trying to load (libudf) is not compiled for 2d on the current plattform (Win64)

+
I have a nmake error
+
The system can t find the data.

http://www.cfd-online.com/Forums/dat...AAAElFTkSuQmCC


Do you have any idea where does it come from?


All times are GMT -4. The time now is 16:32.