CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Moving wall with sin function (https://www.cfd-online.com/Forums/fluent/47034-moving-wall-sin-function.html)

Malik January 16, 2008 11:09

Moving wall with sin function
 
Hi,

I summarize my problem. I would like to move the upper wall along Y axis with a sin function type by using UDf. V1 is the wall velocity in the x direction. scheme below

___________________________ V1=10m/s (upper wall)

___________________________ V2=0m/s (lower wall)

^Y | |___>X

thank you!!!!

Malik January 17, 2008 08:14

Re: Moving wall with sin function
 
Hi,

/************************************************** ********** * * wall motion * ************************************************** **********/

#include "udf.h"

DEFINE_GC_MOTION(rotor,dt,vel,time,dtime) {

/* a est l'amplitude,Y la periode,u rotor velocity along x*/

double a; double W; double t; double dt; double u;

a=0.2; Y=10; u=100; t=CURRENT_TIME; dt=CURRENT_TIMESTEP;

/* set velocity along Y v = a*sin(2Pi*dt/T) */

vel[1] = a*sin((2*3,14159265*t/W)+dt); vel[0]= u;

}

Can you tell me if it's good....?

My best regards,...malik.


All times are GMT -4. The time now is 11:14.