15 February 2018 3 808 Report

I've simulated a pitching motion in Ansys Fluent with UDF, a CG_MOTION mocro.The domain is supposed to oscillate but it rotates,judging by animation. The motion is not a pitching one.

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

{

Thread *t;

face_t f;

real NV_VEC(A);

real dv;

/* 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);

/* compute change in velocity, i.e., dv = F * dt / mass

velocity update using explicit Euler formula */

dv = 1.89+0.75 * sin( 0.37 * dtime);

v_prev += dv;

Message("time = %f, x_vel = %f, force = %f\n", time, v_prev);

/* set x-component of velocity */

vel[2] = v_prev;

}

what would be the problem?

More Hanye Azimi's questions See All
Similar questions and discussions