CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Redefining rotational origin (https://www.cfd-online.com/Forums/fluent-udf/133272-redefining-rotational-origin.html)

daysley April 12, 2014 15:11

Redefining rotational origin
 
Hi everyone

I'm currently having problems redefining the rotational origin when using DEFINE_ZONE_MOTION udf.

I'm unsure whether the way to do it would be either

Origin[1] = function(x)
Origin[2] = function(y)
Origin[3] = 0.0

Or I've seen in the udf manual

E3V_S (origin,=,3.4,4.5,0.0)

Or can I use

X = function x
Y = function y
EV_S(*origin,=,X,Y,0.0)

Thanks in advance I can't seem to find anything about this in the manual or on the forum

zhereal April 13, 2014 15:14

Hi,
I give you my udf.It's about how to change origin position.
just like this

#include "udf.h"
DEFINE_ZONE_MOTION(zgustkz,omega,axis,origin,veloc ity,time,dtime)
{
real a,b,c,d,e,f,g,h,i,j,k,l;
a=20.46;
b=-292.286;
c=292.286;
d=0.01745;
e=3.14159;
f=0.2046*sin(b*time);
g=0.01*a/b;
h=g+(-1)*g*cos(b*time);
i=d*b*cos(b*time+e);
j=sqrt(i*i+b*b);
k=sin(c*time);
l=cos(c*time);
velocity[0]=0.0,velocity[1]=f,velocity[2]=0.0;
origin[0]=0.0,origin[1]=h,origin[2]=0.0;
axis[0]=((-1)*k*i)/j,axis[1]=b/j,axis[2]=(l*i)/j;
*omega=j;
}


All times are GMT -4. The time now is 00:22.