CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   No motion with CG_MOTION (https://www.cfd-online.com/Forums/fluent-udf/102834-no-motion-cg_motion.html)

Faby June 4, 2012 07:04

No motion with CG_MOTION
 
Hello every one...

I have a problem with using of dynamic mesh...

I'm just trying to apply udf provided by fluent manual to the wall of a particle in a tube fluid flow.

The udf is the following:

* 1-degree of freedom equation of motion (y-direction)
* compiled UDF
************************************************** **********/
#include "udf.h"
static real v_prev = 0.0;
DEFINE_CG_MOTION(particle,dt,vel,omega,time,dtime)
{
Thread *t;
face_t f;
real NV_VEC(A);
real force, 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 pressure force on body by looping through all faces */
force = 0.0;
begin_f_loop(f,t)
{
F_AREA(A,f,t);
force += F_P(f,t) * NV_MAG(A);
}
end_f_loop(f,t)
/* compute change in velocity, i.e., dv = F * dt / mass velocity update using explicit Euler formula */
dv = dtime * force / 0.032986723;
v_prev += dv;
Message ("time = %f, x_vel = %f, force = %f\n", time, v_prev,
force);
/* set x-component of velocity */
vel[1] = v_prev;
}

I have only defined the wall of particle as rigid body, and, in the motion attribute I have chosen the udf library.
obviously the simulation is in transient time.

It's a very simple problem...but my particle doesn't move!!! Why??? Should I define a moving zone surrounding the particle? Should I define any kind of contact regions between particle and fluid?

Could anyone help me?

hippiekyle June 20, 2012 12:10

did you ever figure this out? because I'm having the exact same problem. I even copied the same UDF as you.

Faby June 21, 2012 16:00

No, I'didn't.

I'm using 6DOF solver...


All times are GMT -4. The time now is 14:01.