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/)
-   -   CG Motion Absolute coordinates (https://www.cfd-online.com/Forums/fluent-udf/78578-cg-motion-absolute-coordinates.html)

montag dp February 6, 2011 13:03

Quote:

Originally Posted by aamer (Post 293857)
Dear Montag Dp...

in the pdf that you have given in your comments. it mentions an ebook in tht.... will u be kind enough, to send me that ebook.... i want to understand the tranformations in more detail..... my email is aamer58@gmail.com. looking forward to your help.

Sorry aamer, that pdf was given to me by Jakub K, as I said in the post. I don't have the book.

aamer February 8, 2011 02:04

Problem continues
 
dear montag dp....

can you please comment on the problem that i highlighted in previous thread i.e the problem that i am facing in sweeping a wing?????

also , can you tell me any email or other contact of MR. jakub, so that i can request him for the ebook..... or if i can get the title and author of that ebook ?????

montag dp February 8, 2011 12:45

Aamer,

To do a simple wing sweep depends on how exactly you want to do the sweep. If it will be a constant speed, I believe you can use a moving mesh or rotating reference frame approach, but I don't know much about that. If you want the speed to vary, you will have to use dynamic meshing and the define_cg_motion macro.

To do this, you create C code like the ones I have posted in this thread where you write your rotational velocity functions. In Fluent, you go to Define>User-defined>Functions>compiled and select your C code. You must have a C compiler to do this. Then, you enable Dynamic meshing and select whichever zones you want to move and apply your macro to those zones.

I will let Jakub know about this thread and hopefully he will be able to share the e-book with you. For a simple sweep in one dimension, you wouldn't need the coordinate transformation, though.

aamer February 9, 2011 03:01

Dear montag dp...

thanks for the reply.....
let me be elaborative, why i beleive that i need transformation.
i am assuming coordinates of fluent (i.e. x axis in horizontal, y axis in vertical, and z axis in azimuth direction). my wing has to sweep in z direction (i.e about y axis). it has to start from rest and acheive a constant rotational velocity when it reaches pi/9 radians, after that if has to move with constant rotational velocity till it covers pi radians. so the motion is purely semi circle in azimuth. i have used define CG motion and dynamic mesh, and ihave written the udf for sweep.

The required initial position of wing is such that its chord is in y-z plane and its span is on x axis....(this is how insect starts sweeping)
i made a 2D chord in gambit, for validation purpose. so the chord was in x-y plane. now as my ultimate aim was to make a wing, so i swept it in Z direction. hence i got a wing which has chord in X-Y plane and span is on Z axis.....So this is my wing initial position which is picked by udf for sweep. but as i already said that the initial position of the wing that i want should have chord in Y-Z plane and span on X axis. Inorder to get correct sweep, i have to some how rotate my wing by 90 degree. i believe that this can be acheived, if i do coordiante transformation in udf.......

what is your opinion on this issue..... do you have any other idea , how to handle this problem...

my second question is that in your udf you have mentioned that you used a sinosoid for defining phi..... what function did you use for defining theta.... can you give more details of your final explanation related to flapping udf.... may be, it helps me in using the same concept for sweeping...

looking forward to your expert opinion....

montag dp February 9, 2011 12:11

Aamer, if I'm understanding you right, your problem actually has a very simple solution. Since your wing is starting in the wrong orientation, you can just go to Mesh>Rotate and rotate your entire mesh as desired before starting the simulation so that the initial orientation will be correct. Doesn't seem like a big problem to me, though. Couldn't you just rotate it about the z-axis instead of the y-axis if the orientation is different?

As for your second question, I've been using a few different functions for the feathering rotation. The basic function is just a sinusoid:

thdot = Afeath*w*sin(w*t)

I'm also experimenting with another function to relegate the feathering rotation more to the ends of the flapping strokes.

quantum.tejas February 13, 2011 21:58

Hi Dan

I am having the same problem. So do you say the Eulerian angle transformations do not work in FLUENT?The 3rd angle is causing problems for me.Phi(sweep) and alpha (AoA) do not have any problems. When I add theta (elevation) to the equations, FLUENT is doing random motions of the wing.Do you have any suggestions?

montag dp February 13, 2011 22:23

I've been able to do two rotations as well. All I know about the problem is in my last few posts. The Euler rate transformations seem to work in 2 axes but I haven't tried them in 3.

quantum.tejas February 13, 2011 22:49

If it is not too much trouble, could you try 3 angles and let me know?Because I know my Eulerian transformations are correct. But I have no idea as to how FLUENT is reading my omega components. It is terribly confusing.

montag dp February 13, 2011 22:51

Sorry, I'm afraid I don't have more time to troubleshoot this problem in Fluent. I only have the transformation in a simplified version for 2 rotations (assuming the third is 0). Did you say you can get two rotations working at the same time, or independently?

quantum.tejas February 13, 2011 22:56

Thats alright. I have been able to run 2 angles at the same time. The motion, therefore will be in the stroke plane. ( 0 deg in my case). The wing sweeps through the plane (phi) and rotates as well (alpha). The problem comes when there is a 3rd angle and its components. (theta: elevation angle)

montag dp February 13, 2011 22:59

Sounds like the same thing I'm doing then, except I'm just keeping it to two rotations. I wish you luck. Maybe try going through that pdf I posted on the previous page that someone sent me? I haven't looked through it in detail but apparently he was able to do 3 rotations.

quantum.tejas February 13, 2011 23:06

yeah.But that pdf seems a tad unclear with the notations and all that. I was wondering if there is a local global angle( transformation) to the solution of this problem.

davesmith_01 February 14, 2011 05:43

the motion does not work in three axes, you can only rotate about two axes in fluent, hence the reason why many people have used their own codes (written in fortran mainly) to do this as fluent has limited capabilities. Many papers say that personal codes are alot better as fluent is limited.

quantum.tejas February 14, 2011 05:47

Hi Dave

Thanks for the reply. I have been fighting with this problem for so long. I needed that answer.Is there any particular reason FLUENT cannot do it? If it is not too much trouble, could you direct me to the papers where they have said FLUENT is not suitable for 3 angles. I need to prove it to my advisor. :)

davesmith_01 February 14, 2011 12:34

I cannot remember the names of the journals exactly. They said something like commercial software cannot do this. All of the CFD work for this has been done by codes written in fortran etc which can also do many other things, but they have more capabilites and the users have written the codes hence know everything that it can do.

quantum.tejas February 16, 2011 04:33

Hi Dave

Thanks for that. I wanted to confirm something. When i use alpha and phi, it works fine. when i add theta to this or use combinations of theta and phi and theta and alpha it behaves oddly. Is this normal? phi being sweep, alpha is pitch around wing axis and theta elevation above sweep plane.

Thanks

aamer February 17, 2011 03:39

Hi Quantum tejas.....

can you please paste the transformations here ( that you have written for the three motions in fluent). i am working on a similar issue, though my problem is slightly different as it is just restriced to sweep at constant angle of attack (with no rolling).

secondly you have mentioned third motion as elevation. but i think elevation and pitching is same thing. did you mean rolling as the third motion ?

aamer February 17, 2011 04:44

boundary condition for solid body motion
 
Dear Montaq Dp...

Thanks for the thorough discussion on the subject.

for a case of "static" wing in a "moving air", the boundary condition like velocity inlet, outflow and symmetry in 3 D wing are ok. But if the wing is itself doing motion like flapping or sweeping in a "still" air then how the boundary conditions are given. (considering that the wing is moving with a velocity that corresponds to incompressable flow).

i understand that symmetry condition will still hold for the wing but what boundary conditions can be given in the front, in the rear, top and bottom.

aamer March 5, 2011 05:17

Issue of boundary condition
 
Dear Montaq Dp.....

i saw your flapping motion on you tube..... it looks like you moved the wing in still air, so that means that no velocity was given at the inlet.... will you be kind enough to tell me what boundary condition did you use at front, rear, and on the sides......

i couldnt find much detail regarding how to give boundary condition for the case where you are moving a rigid body in still air.... my case is incompressible. and i am using an O type mesh.

montag dp March 8, 2011 18:35

I just use those same boundary conditions. It seems to work okay. I don't think it's extremely important what you use for the boundaries if there is no inlet velocity.


All times are GMT -4. The time now is 18:44.