# UDF for pitching and rotating airfoil

 Register Blogs Members List Search Today's Posts Mark Forums Read

November 20, 2014, 09:32
UDF for pitching and rotating airfoil
#1
New Member

Select One
Join Date: Oct 2014
Posts: 1
Rep Power: 0
hi all, my problem is that the UDF that i'm using doesn't work:

#include "udf.h"

{
real theta0, thetap1, omegaair, omegarot, radius;

omegaair = 10*sin(time) ; /* arbitrary sine function*/
omegarot = 5.4 ; /* velocity of rotor [radians/s] */
theta0 = M_PI/2; /* initial angular position of blade origin [radians] */
thetap1 = omegarot*(time+dtime); /* angular change from initial position at t+dt */
*omega = omegaair; /* pitching velocity of blade */

/* time-varying origin of the local rotor zone coordinates in meters */
origin[2] = 0.0;
}

i'm trying to make the airfoil on top (see picture) (i assume that his initial position is pi/2 rads (i'm right?))rotate around the centre of rotation of the ring, that is (0;-0.5), and ,at the same time, rotate around a moving-centre-of-rotation (the centre of the circular zone in which the airfoil is).
so, the fixed centre of rotation is (0;-0.5), the moving-centre-of-rotation is the point that i'm trying to define with:

origin[2] = 0.0;

unfortunately, when i do "preview mesh motion", i see that the airfoil "rotates away" from his hole in the rotating ring.
i tried to use "relative specification" and "link" the airfoil to the ring, but it rotates away again.
well, i hope that some one can answer me.
P.S. i take this UDF from another post, and the person who received this udf get the same problem, so i think that the UDF is wrong, but it seems perfect: what miss?

P.P.S even if its not visible (due to image quality) the interface beetween the "airfoil-zone" and the ring is present.
Attached Images
 Immagine1.jpg (43.5 KB, 78 views) Immagine2.jpg (14.5 KB, 73 views)