CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   need your help (https://www.cfd-online.com/Forums/fluent/46858-need-your-help.html)

Shin December 18, 2007 00:36

need your help
 
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


saghir December 18, 2007 04:54

Re: need your help
 
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 "{"

Shin December 20, 2007 01:47

Re: need your help
 
Thank you for your kindness, saghir. I'd checked my udf following your advise, and i resolved.



All times are GMT -4. The time now is 03:34.