# CG Motion Absolute coordinates

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

September 22, 2012, 09:15
importance of CG motion
#61
Member

Join Date: Mar 2010
Posts: 58
Rep Power: 13
Quote:
 Originally Posted by sheth Hey JG, I finally got it working. Thanks for all your help. The constants in equation were not the issue, even with the constants it went well. The wing just bends slightly so I think I need to set dynamic parameters so it doesn't happen. For those who are trying here is what to follow: 1. Use Euler angles to define angles (Theta, Phi... etc in Euler Angles) 2. Orient Geometry As it shall be at time t=0. 3. In dynamic mesh, when you define dynamic zone, mention CG properly (Very IMP), In my case I wrote the Cg position x,y,z and I didn't mention the cg orientation when defining dynamic mesh zones. 4. Follow the order X, Y, and then Z, i.e. The first rotation will be about X axis, second will be about Y axis, and third will be about Z axis. 5. The UDF that JR has provided works perfectly, its in this thread itself, so many thanks to JG for that. 6. If your motion is not proper, then play with positive negative sign, I had to do this in my case also. Try changing signs of equations, and you may get proper motion.
Hello.....

hope you are doing fine. you wrote that mentioning CG position and orientation is important. Will you please tell how to give CG position and orientation correctly.

September 22, 2012, 10:55
#62
Senior Member

Join Date: Mar 2011
Location: Germany
Posts: 552
Rep Power: 17
Quote:
 Will you please tell how to give CG position and orientation correctly.
I assume you are using DEFINE_CG_MOTION macro give motion to wing. In Dynamic Mesh zones when you define your wing as "Rigid Body" you also need to define CG location of wing which will be used as a reference point by the wing to perform the desired motion(as instructed to it by the UDF) say for example flapping motion around x-axis(chord axis) was desired for me I gave x and y coordinates of the CG location in CG position tab and wing used these coordinates as reference point to give desired motion, hope it helps you

 March 3, 2014, 07:29 UDF FOR AN OSCILLATING FLAT PLATE (vertical oscillation) #63 New Member   Wisdom Join Date: Oct 2012 Posts: 2 Rep Power: 0 Hi all I am trying to write UDF for a flow over an oscillating flat plate. I have very very little knowledge of C++ so I am a novice, please I will need assistance from anybody that could help. After going through the Fluent Manual I believe I will need to write DEFINE CG_MOTION udf. Please I need your help. This is my personal email mcsagesse@yahoo.com. My major concern to write the udf for the plate oscillating along the y-axis Thanks Wizzy

 July 10, 2015, 15:05 2d moving mesh for piston movement #64 Member   Pradeep Join Date: Nov 2014 Posts: 45 Rep Power: 8 Kindly help me in writing the udf to move a piston profile inside a cylinder to determine the flow pattern and turbulence. Many thanks in advance..

 September 4, 2015, 02:26 #65 New Member   Amit soni Join Date: Jul 2015 Posts: 10 Rep Power: 8 I am not able to see the motion in tech plot, would you help me . I am also working on flapping wing.

 September 4, 2015, 02:52 #66 New Member   Amit soni Join Date: Jul 2015 Posts: 10 Rep Power: 8 I did what is stated but my wing starts rotating a complete circle

May 12, 2016, 07:43
Dynamic mesh flapping wing - Interface problem
#67
Senior Member

Arun raj.S
Join Date: Jul 2011
Posts: 186
Rep Power: 12
Hi everyone,

I am simualting dragonfly motion. I want to use structured mesh around the aerfoil. But i did so many tries but I am not able to succeed using CG-MOTION. It is mainly due to the interface. Shadow of the interface (interface2) stays in the same place but the other interface move with the inner body. Both interface and shadow are not moving together. Please let me know what is the problem. I can give all the details u want.

I am using smoothing, remeshing for the outer domain. My udf is working but I dont knw what to do at the interface.

Smoothing = 0, remeshing accourding to mesh size. I followed the instructions in the tutorial. I dont know how he did, but this video shows that in fluent we can use dynamic mesh and interface

x(t) = (Ao/2)*(1+cos(2*pi*f*t)*(cos(beta))
y)(t) = (Ao/2)*(1+cos(2*pi*f*t)*(sin(beta))
alpha(t) = alphao+B sin(2*pi*f*t)
Ao=2.5 cm
B=pi/4
alphao=pi/4
f=40 Hz
beta = 60 degree

I have differentiated the above function and applied in the udf

vel[0] = - A0/2 * 2*pi*f*cos(beta)*sin(2*pi*f*t)
vel[1] = - A0/2 * 2*pi*f*sin(beta)*sin(2*pi*f*t)
omega[2]= B *2*pi*f*cos(2*pi*f)
Attached Images
 Domain.jpg (63.3 KB, 24 views) Mesh and dynamic mesh settings.jpg (144.5 KB, 33 views)
Attached Files
 second.c (1.1 KB, 19 views)

 May 13, 2016, 00:40 Interface problem #68 New Member   Amit soni Join Date: Jul 2015 Posts: 10 Rep Power: 8 You have to define mesh interface condition in fluent. If you are using ANSYS FLUENT 14.5 or higher version select the matching option in mesh interface condition. For moving the structured mesh use the define zone motion. ( read from manual)

May 13, 2016, 00:50
#69
Senior Member

Arun raj.S
Join Date: Jul 2011
Posts: 186
Rep Power: 12
Hi Amit Soni,

Thank you so much for your reply. Yes when I define interface between two circular domains. I am getting error like "zone surface not able to create sliding interface". I want sliding interface as dynamic mesh works only for sliding interface. So What I tried is that "I created 2 sketches, one for inter domain and other for the outer domain. Now I have 2 different edges. I divided the 2 edges into 2. Basically i did all these things to make the interface to slide. But still it is not working. I am not able to understand your idea. Could you explain more?

The attached figure will give a better idea
Attached Images
 Interface error dynamic mesh.jpg (127.2 KB, 23 views)

 May 13, 2016, 04:18 dynamic mesh problem #70 New Member   Amit soni Join Date: Jul 2015 Posts: 10 Rep Power: 8 In cell zone condition define zone motion is there try that option ( for udf with define zone motion). or You assign udf to both structured grid as well as wing. Try it

May 13, 2016, 12:27
#71
Senior Member

Arun raj.S
Join Date: Jul 2011
Posts: 186
Rep Power: 12
Hi amit,

I have tried so many times but not able to succeed. So I have prepared a pdf (as followed in the below link) containing all the steps I followed for my simulation. I have attached my UDF also. Please take a look. I struggled a lot to prepare this. Because I am in desperate need for the answer. Thank you once again.

Attached Files
 second.c (1.1 KB, 19 views)

 June 2, 2016, 04:32 #72 New Member   Babu Join Date: Jun 2016 Posts: 4 Rep Power: 7 Hi montag dp: Can you please share the UDF file mentioned in your shared pdf:dh_algo.pdf

 June 2, 2016, 04:35 #73 New Member   Babu Join Date: Jun 2016 Posts: 4 Rep Power: 7 Dear Montag Dp... Can you share the UDF file or ebook mentioned in your PDF? my email:babu2440@gmail.com

June 2, 2016, 09:22
Can you send the UDF or ebook?
#74
New Member

Babu
Join Date: Jun 2016
Posts: 4
Rep Power: 7
Can you send the UDF or ebook?

Quote:
 Originally Posted by aamer Hello all..... i am a student of cfd and trying to sweep a simple wing from 0 to pi radians (azimuth angle) and assuming a constant angle of attack. When i make a 2D airfoil in gambit, it is in x-y plane. now if i want to make a wing out of it, i have to extend it in z direction. so the wing is formed in such away that its span is in z direction and airfoil in x-y plane. but in fluent, in order to mimic insect sweeping, i want the same wing to transform its axes in such away that its span is in x direction and airfoil is in y-z plane....... How can this coordinate transformation be achieved in UDF ???? @dear montag Dp...... looking at your previous threads, i think your guidance can serve the purpose. ..... thanks

June 20, 2016, 04:56
#75
New Member

Babu
Join Date: Jun 2016
Posts: 4
Rep Power: 7
Quote:
 Originally Posted by sheth Hey JG, I finally got it working. Thanks for all your help. The constants in equation were not the issue, even with the constants it went well. The wing just bends slightly so I think I need to set dynamic parameters so it doesn't happen. For those who are trying here is what to follow: 1. Use Euler angles to define angles (Theta, Phi... etc in Euler Angles) 2. Orient Geometry As it shall be at time t=0. 3. In dynamic mesh, when you define dynamic zone, mention CG properly (Very IMP), In my case I wrote the Cg position x,y,z and I didn't mention the cg orientation when defining dynamic mesh zones. 4. Follow the order X, Y, and then Z, i.e. The first rotation will be about X axis, second will be about Y axis, and third will be about Z axis. 5. The UDF that JR has provided works perfectly, its in this thread itself, so many thanks to JG for that. 6. If your motion is not proper, then play with positive negative sign, I had to do this in my case also. Try changing signs of equations, and you may get proper motion.
Thanks Sheth. Your guidelines worked for me to sort out kinematics of flapping wing. I have similar equations which are you are solving..

 April 4, 2019, 06:17 #76 New Member   balusu keerthi sree Join Date: Apr 2019 Posts: 4 Rep Power: 4 hie everyone, im trying to rotate a blade with angular velocity of 2000 rpm in y direction. can anyone help me out to write the UDF thanks in advance

 April 23, 2019, 02:08 Base Paper for Azimuth rotating wing #77 New Member   Bilal Join Date: Apr 2019 Posts: 3 Rep Power: 4 Hi everyone I am new to CFD. I am doing a CFD analysis of Azimuth rotating rectangular wing in Ansys Fluent. The wing starts from rest, accelerate through a defined angle and after that, it rotates with constant velocity. I have already written the UDF for this motion but to validate and verify, I am unable to find some good base paper. Can anyone help me by suggesting some good paper for verification and validation of such kind of motion? Thanks