|
[Sponsors] |
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" DEFINE_ZONE_MOTION(pitching_blade1,omega,axis,orig in,velocity,time,dtime) { 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] */ radius = 0.5; /* radius of rotor */ 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[0] = radius*cos(theta0+thetap1); origin[1] = radius*sin(theta0+thetap1)-0.5; 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[0] = radius*cos(theta0+thetap1); origin[1] = radius*sin(theta0+thetap1)-0.5; 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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
rotating and pitching UDF - need someone to double-check this | daysley | Fluent UDF and Scheme Programming | 13 | September 11, 2022 12:04 |
UDF for defining a body force in Singel ROtating Reference Frame | teymourj | Fluent UDF and Scheme Programming | 9 | August 18, 2016 16:33 |
Rotating Airfoil | appa | OpenFOAM Running, Solving & CFD | 1 | June 26, 2012 20:45 |
UDF for Airfoil in Circular motion (2D) | sohail_27 | Fluent UDF and Scheme Programming | 4 | October 4, 2010 14:36 |
UDF for a sinusoidal rotation of an airfoil | Lorenzo | FLUENT | 2 | October 10, 2008 11:37 |