CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF, back and forth motion (https://www.cfd-online.com/Forums/fluent/39301-udf-back-forth-motion.html)

Young O'Nel January 18, 2006 23:42

UDF, back and forth motion
 
Dear All, please help me,I try to write UDF let Plate(block)moving by back and forth.

I had let plate moving at +X direction successful,but I don't know how to modify UDF for both +X and -X motion,Reciprocating.

--------------------- please help me to fix the UDF code,thanks. ---------------------

#include "udf.h" #include "dynamesh_tools.h"

DEFINE_CG_MOTION(transwall, 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.01; }

----------------------- Best Regards,

Young O'Nel.


All times are GMT -4. The time now is 02:41.