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/)
-   -   Problem with using DEFINE_GRID_MOTION (https://www.cfd-online.com/Forums/fluent-udf/95658-problem-using-define_grid_motion.html)

raghu mohan December 27, 2011 16:01

Problem with using DEFINE_GRID_MOTION
 
I am using this UDF on a wall but I don't see any motion in the zone(wall):

#include "udf.h"

DEFINE_GRID_MOTION(beam,domain,dt,time,dtime)
{
Thread *tf = DT_THREAD(dt);
face_t f;
Node *v;
real NV_VEC(axis);
real disp;
int n;

/* set deforming flag on adjacent cell zone */
SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));


Message ("time = %f", time);

disp = dtime + time;
NV_D(axis, =, 0.0, 1.0, 0.0);

begin_f_loop(f,tf)
{
f_node_loop(f,tf,n)
{
v = F_NODE(f,tf,n);

/* update node if x position is greater than 0.02
and that the current node has not been previously
visited when looping through previous faces */

if (NODE_POS_NEED_UPDATE (v))
{
/* indicate that node position has been update
so that it's not updated more than once */
NODE_POS_UPDATED(v);


NV_VS(NODE_COORD(v), +=, axis, *, disp);
}
}
}
end_f_loop(f,tf);
}

Actually I am using layering method of dyn meshing technique. compiled and loaded this UDF. Attached this UDF to a wall through user-defined Type in dynamic zones panel. And gave time step as .01 and no.of steps as 500 in Zone motion panel but there is no motion in zone.

Can you please let me know what the mistake I am doing.
If you need any other information about what steps I am following please let me know.

Thank You,
Raghu


All times are GMT -4. The time now is 09:43.