CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   help me for dynamic mesh (https://www.cfd-online.com/Forums/fluent/36685-help-me-dynamic-mesh.html)

speedcat May 17, 2005 21:32

help me for dynamic mesh
 
Hi I'm having trouble getting the UDF DEFINE_GEOM to work properly. I would like to use the UDF to make the bottom of a rectangular duct with air blowing deform into a different shape over time. I have compiled the UDF properly and have hooked it into fluent as outlined in the UDF user's manual. However, when I view the mesh motion, the bottom does not deform.

I'm having trouble getting the UDF DEFINE_GRID_MOTION to work properly, too. I have compiled the UDF properly and have hooked it into fluent as outlined in the UDF user's manual. However, when I define the zone of the dynamic mesh, an error of ˇ°incorrect geometry udf gg on zone 6 (assuming no geometry )ˇ±. The bottom is zone whose ID is 6.

I would really appreciate your help. My e-mail is sxy_hit@163.com

My project is shown as follow. I will give you some file about my problem and the UDF of DEFINE_GEOM and DEFINE_GRID_MOTION.Thank you!

The bottom of the duct is from (-5,-2.5) to (-5,2.5). the new position is defined by a parabola through (-5,-2.5), (0,-2.4) and (-5,2.5). The parabola is

DEFINE_GEOM: /************************************************** *** * * defining parabola through points (-5,-2.5),(0,-2.4),(5,-2.5) * ************************************************** ***/ #include "udf.h"

DEFINE_GEOM(parabola,domain,dt,position) { /*set y=-0.004x^2-2.4*/ position[1]=-0.004*position[0]*position[0]-2.4; }

DEFINE_GRID_MOTION /************************************************** *** * * defining parabola through points (-5,-2.5),(0,-2.4),(5,-2.5) * ************************************************** ***/ #include "udf.h"

DEFINE_GRID_MOTION(gg, domain, dt, time, dtime) { Thread *tf = DT_THREAD (dt); face_t f; Node *v; int n;

SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));

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

NODE_POS_UPDATED (v);

NODE_Y(v)=-0.004*NODE_X(v)*NODE_X(v)-2.4;

} } } end_f_loop (f, tf); }



All times are GMT -4. The time now is 13:57.