CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   UDF dynamic mesh conditions (

Jiwon Y August 21, 2019 22:46

UDF dynamic mesh conditions
Hello I'm a rookie in udf, dynamic meshing and right now I'm trying to build up a Dynamic Mesh Thread of my geometry going upwards and then downwards which ends on it's initial location.

Down below is my udf thread and I have a little problem with applying this
thread to my geometry. The geometry just goes upwards and does not come back downwards as it's coding is meant to be(going downwards when time reaches 0.0014 sec. and until 0.0033 sec.) so i'm needing help desperatly :(.
Any corrections to the thread and new ways of making my geometry up and down would be a GREAT help to me.

Experts... please help me

#include "udf.h"
DEFINE_CG_MOTION(nozzle, dt, vel, omega, time, dtime)
///////////////////////////time step은 0.000236sec.////////////////////////
/* reset velocities */
NV_S (vel, =, 0.0);
vel[1] = 0.0;
/* compute velocity formula */

if (time < 0.0014)
vel[1] = 0.65;

else if (time = 0.0014)
vel[1] = 0.0;
else if (0.0014 < time <= 0.0033)
vel[1] = -0.43;

vel[1] = 0;

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