CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Problem related with UDF for dynamic mesh (http://www.cfd-online.com/Forums/fluent/33491-problem-related-udf-dynamic-mesh.html)

Ryan April 16, 2004 05:48

Problem related with UDF for dynamic mesh
 
I am now learning how to use UDF to describe a dynamic mesh. I adopt a very simple situation just as below. Wall III moves at a constant x-velocity (i.e., 0.4m/s). Here, wall I and II is defined as deforming, and wall III is defined as rigid body motion. Is it OK for both definition?

I --------------- | | | | | <-- | III | | ---------------

II

Then I wrote a UDF to define wall III's motion as below. It is also very simple and compiled successfully. But using this UDF, I can not preview the expected motion of wall III (wall III doesn't move at all and no dynamic mesh appears). Could anyone check this UDF and tell me the reason? Thanks a lot.

#include "udf.h"

DEFINE_CG_MOTION(translation, dt, vel, omega, time, dtime) { /* reset velocities */ NV_S(omega, =, 0.0);

if(!Data_Valid_P())

return;

/* set x-component of velocity */ vel[0]=-0.4; }


Ryan April 16, 2004 06:05

Please omit this one and find the next paste.
 


All times are GMT -4. The time now is 17:21.