CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Equation for a rotating circle outside the origin (https://www.cfd-online.com/Forums/main/144444-equation-rotating-circle-outside-origin.html)

mali28 November 14, 2014 06:38

Equation for a rotating circle outside the origin
 
1 Attachment(s)
Hi,

I am modelling a dynamic CFD model without using the dynamic mesh (as it causes the solution to diverge due to highly complex geometry). The circle is rotating about its own origin as well as the origin of the geometry (x=0,z=0). You can think of it as like the earth orbiting the sun (although I am not modelling the solar system). I am defining the shift in origin of a rotating circle away from the axis (0,0) using define_adjust function.

I am using the following equation:
origin x = 0.22483*cos((39.48864+2700*current_time)*M_PI/180);

origin z = 0.22483*sin(((-39.4886+2700*current_time))*M_PI/180);

But this does not work and the origin keeps changing from the actual origin of the circle.
The UDF is working fine I have no issues in coding. And the origin does shift with iteration, but not at the circle. I think it is more of a mathematical problem rather than CFD one.

The way I derived this equation is that I found the origin of the circle (x,z) and I also know the rate of rotation of the circle about the origin (0,0). So I know how much theta changes with time. Which gives me the above equation.

Am I doing anything wrong?

For rotating the circle about the origin, I just specify the rotation of the fluid zone. So, in reality the circle is rotating about its own origin as well as about the geometry origin (0,0).

Please help.

Thank you.


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