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

need your help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 18, 2007, 00:36
Default need your help
  #1
Shin
Guest
 
Posts: n/a
Hi friends, i use windows and microsoft visual studio .net 2005 on my system. I am trying to get my code compiled using FLUENT 6.3. It seems it does not want to work. whenever I try to build the library the message come up:

udf_names.c(7) : error C2059: syntax error : '}' udf_names.c(8) : warning C4034: sizeof 0

if I ignored this message and tried to build load the library the message come up:

Opening library "C:\Documents and Settings\DEMO\libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: ()

According to previous documents in fluent user forum,i think the source file have any problem. it content is:

#include "udf.h"

/* this function defines velocity of center of gravity for pure plunging motion*/ /* Plunging motion equation is z(t)=h*sin(2*pi*f*t) */

DEFINE_CG_MOTION(rotation, dt, vel, omega, time, dtime) {

Thread *t;

face_t f;

/*reset velocities */

NV_S(vel,=,0.0);

NV_S(omega,=,0.0);

if (!Data_Valid_P())

return; /* Get the thread pointer for which this motion is defined */ /* t=DT_THREAD(dt); */ /* vel[1] is the vertical plunging velocity */ /* These velocity below is for h=0.4c and f=0.993Hz */

omega[2] = 0.05*sin(2*3.14159*time); }

i can not find what to fix.please help me. thank you all.

Shin

  Reply With Quote

Old   December 18, 2007, 04:54
Default Re: need your help
  #2
saghir
Guest
 
Posts: n/a
hi, Copy the file udf.h in your working directory and build your ".c" with udf.h Header Files. Do not forget to return to the line after write DEFINE_CG_MOTION(rotation, dt, vel, omega, time, dtime) to write "{"
  Reply With Quote

Old   December 20, 2007, 01:47
Default Re: need your help
  #3
Shin
Guest
 
Posts: n/a
Thank you for your kindness, saghir. I'd checked my udf following your advise, and i resolved.

  Reply With Quote

Reply


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 22:27.