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

UDF macro not compliled

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

Like Tree2Likes
  • 1 Post By tranvantrung551987
  • 1 Post By tranvantrung551987

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2013, 05:53
Default UDF macro not compliled
  #1
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 13
KITetima is on a distinguished road
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!

KITetima is offline   Reply With Quote

Old   October 22, 2013, 06:20
Default
  #2
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 13
tranvantrung551987 is on a distinguished road
do you meet error in the fluent ?
tranvantrung551987 is offline   Reply With Quote

Old   October 22, 2013, 06:24
Default
  #3
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 13
KITetima is on a distinguished road
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
KITetima is offline   Reply With Quote

Old   October 22, 2013, 07:00
Default
  #4
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 13
tranvantrung551987 is on a distinguished road
can I see your udf ?
tranvantrung551987 is offline   Reply With Quote

Old   October 22, 2013, 07:14
Default
  #5
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 13
KITetima is on a distinguished road
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)
}
KITetima is offline   Reply With Quote

Old   October 22, 2013, 07:32
Default
  #6
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 13
tranvantrung551987 is on a distinguished road
your udf report velocity but i don't see to report it. your udf report presssure. Do you use complied or interpret ?
tranvantrung551987 is offline   Reply With Quote

Old   October 22, 2013, 07:34
Default
  #7
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 13
KITetima is on a distinguished road
I interpret my UDF.
KITetima is offline   Reply With Quote

Old   October 22, 2013, 07:51
Default
  #8
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 13
tranvantrung551987 is on a distinguished road
I have check your udf. it is correct. after you interpret , you go to boundary condition to report udf.
KITetima likes this.
tranvantrung551987 is offline   Reply With Quote

Old   October 22, 2013, 08:06
Default
  #9
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 13
KITetima is on a distinguished road
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.
KITetima is offline   Reply With Quote

Old   October 22, 2013, 08:47
Default
  #10
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 13
tranvantrung551987 is on a distinguished road
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 likes this.
tranvantrung551987 is offline   Reply With Quote

Old   October 22, 2013, 09:05
Default
  #11
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 13
KITetima is on a distinguished road
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.
KITetima is offline   Reply With Quote

Old   October 23, 2013, 04:09
Default
  #12
New Member
 
tran trung
Join Date: Aug 2013
Posts: 23
Rep Power: 13
tranvantrung551987 is on a distinguished road
you can download free in the internet
tranvantrung551987 is offline   Reply With Quote

Old   October 23, 2013, 10:13
Default
  #13
New Member
 
Marie
Join Date: Oct 2013
Location: Knk
Posts: 24
Rep Power: 13
KITetima is on a distinguished road
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.




Do you have any idea where does it come from?
KITetima 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
what does FLUID_THREAD_P(t) macro do in udf? borhan_sd@yahoo.com Fluent UDF and Scheme Programming 2 June 10, 2013 06:49
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 02:29
need help whith hooking UDF and DEFINE_INIT macro cax FLUENT 3 June 6, 2006 13:35
-What udf macro for boiling - thomas FLUENT 6 January 19, 2004 08:31
DEFINE_DPM_OUTPUT macro UDF HELP Puneet FLUENT 3 November 28, 2003 11:55


All times are GMT -4. The time now is 14:39.