CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   dynamic mesh for flow induced vibration on circular cylinder.... (http://www.cfd-online.com/Forums/fluent/110345-dynamic-mesh-flow-induced-vibration-circular-cylinder.html)

rishitosh December 9, 2012 05:11

dynamic mesh for flow induced vibration on circular cylinder....
 
hii...

i m working on flow induced vibration (due vortex shedding) on circular cylinder...
for dis, i need udf for dynamic meshing....
following udf i m using:

# include "udf.h"
# include "dynamesh_tools.h"


static real v_prev = 0.0;


DEFINE_CG_MOTION(osc,dt,vel,omega,time,dtime)

{

Thread *t;
Domain *d = Get_Domain(6);

real x_cg[3], force[3], moment[3];

real accl, dv;

real mass = 0.2;

real wn = 12.0;

real k= mass * wn*wn;

real c = 2*mass*wn*0.00;

int i;


NV_S(vel, =, 0.0);

NV_S(omega, =, 0.0);

t = DT_THREAD(dt);

for(i=0;i<3;i++)

x_cg[i]=DT_CG(dt)[i];


Compute_Force_And_Moment (d, t, x_cg, force, moment, TRUE);

force[1] += -k*x_cg[1] - c*vel[1];


accl = force[1]/mass;
dv = accl*dtime;

v_prev+=dv;
vel[1] = v_prev;

printf("Computed force: %g \n", force[1]);

printf("Velocity: %g\n", vel[1]);

}



DEFINE_CG_MOTION(osc_inert,dt,vel,omega,time,dtime )

{

vel[0] = 0.0;

vel[1] = v_prev;

}



but while compiling following error is being seen... :(

>>>>motion.obj : error LNK2019: unresolved external symbol

__imp__Compute_Force_And_Moment referenced in function _osc

>>>>motion.obj : error LNK2019: unresolved external symbol __imp__Get_Domain

referenced in function _osc
libudf.dll : fatal error LNK1120: 2 unresolved externals

wht may be d error in udf..?? i m not getting....


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