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

problem with printf and Massage

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 5 Post By Bruno Machado

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2016, 06:00
Default problem with printf and Massage
  #1
D.M
Member
 
Davoud Malekian
Join Date: Jan 2016
Posts: 53
Rep Power: 10
D.M is on a distinguished road
hi guys,
im writing a UDF that should be compiled and not interpret, and i know that when i want to print something to consol i should use "Massage" instead of "printf" , but the problem is when i use "Massage" i face with an unsuall error by compiler that says:

newmotion.obj : error LNK2019: unresolved external symbol Massage referenced in ...
libudf.dll : fatal error LNK1120: 1 unresolved externals

but when i use printf there is no such error when compiling but nothing is shown in the consol,
Does anyone have any idea to help me get around this problem,
tnx

here is the udf just in case it may help:

#include "udf.h"
#include "sg.h"
static real y = 0;
static int i = 0;
real avg;

DEFINE_CG_MOTION(Disk, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f;
real x[ND_ND];
NV_S(vel, =, 0);
NV_S(omega, =, 0);
t = DT_THREAD(dt);

begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = y + x[1];
i = i + 1;
}
end_f_loop(f,t)

avg = y * (1./i);
Massage("dis: %g \n",avg);

if (avg > -0.0645)
vel[1] = (-1)*time*9.81;
else
vel[1] = 0;
}
D.M is offline   Reply With Quote

Old   July 3, 2016, 08:31
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
Bruno Machado is on a distinguished road
Massage is something people do to relief muscular pain or something like that. Try to use Message instead, I think it will work.
ghost82, D.M, myaghoobi2 and 2 others like this.
Bruno Machado is offline   Reply With Quote

Old   July 7, 2016, 12:01
Default
  #3
Senior Member
 
ghost82's Avatar
 
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27
ghost82 will become famous soon enough
Great!
ghost82 is offline   Reply With Quote

Reply

Tags
udf error printf massage


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



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