CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   UDF, back and forth motion (

Young O'Nel January 19, 2006 00: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 13:07.