CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

CG Motion Absolute coordinates

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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   September 22, 2012, 09:15
Exclamation importance of CG motion
  #61
Member
 
Aamer Shahzad
Join Date: Mar 2010
Posts: 58
Rep Power: 8
aamer is on a distinguished road
Quote:
Originally Posted by sheth View Post
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.
aamer is offline   Reply With Quote

Old   September 22, 2012, 10:55
Default
  #62
Senior Member
 
Join Date: Mar 2011
Location: Germany
Posts: 420
Rep Power: 12
cfd seeker is on a distinguished road
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
cfd seeker is offline   Reply With Quote

Old   March 3, 2014, 08:29
Default UDF FOR AN OSCILLATING FLAT PLATE (vertical oscillation)
  #63
New Member
 
Wisdom
Join Date: Oct 2012
Posts: 2
Rep Power: 0
mcsagesse is on a distinguished road
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
mcsagesse is offline   Reply With Quote

Old   July 10, 2015, 15:05
Default 2d moving mesh for piston movement
  #64
New Member
 
Pradeep
Join Date: Nov 2014
Posts: 24
Rep Power: 3
pradeep6890 is on a distinguished road
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..
pradeep6890 is offline   Reply With Quote

Old   September 4, 2015, 02:26
Default
  #65
New Member
 
Amit soni
Join Date: Jul 2015
Posts: 9
Rep Power: 3
Amit soni is on a distinguished road
I am not able to see the motion in tech plot, would you help me . I am also working on flapping wing.
Amit soni is offline   Reply With Quote

Old   September 4, 2015, 02:52
Default
  #66
New Member
 
Amit soni
Join Date: Jul 2015
Posts: 9
Rep Power: 3
Amit soni is on a distinguished road
I did what is stated but my wing starts rotating a complete circle
Amit soni is offline   Reply With Quote

Old   May 12, 2016, 07:43
Default Dynamic mesh flapping wing - Interface problem
  #67
Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 72
Rep Power: 7
arunraj is on a distinguished road
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

https://www.youtube.com/watch?v=01hOD68DxrM

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
File Type: jpg Domain.jpg (63.3 KB, 3 views)
File Type: jpg Mesh and dynamic mesh settings.jpg (144.5 KB, 5 views)
Attached Files
File Type: c second.c (1.1 KB, 3 views)
arunraj is offline   Reply With Quote

Old   May 13, 2016, 00:40
Default Interface problem
  #68
New Member
 
Amit soni
Join Date: Jul 2015
Posts: 9
Rep Power: 3
Amit soni is on a distinguished road
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)
Amit soni is offline   Reply With Quote

Old   May 13, 2016, 00:50
Default
  #69
Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 72
Rep Power: 7
arunraj is on a distinguished road
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
File Type: jpg Interface error dynamic mesh.jpg (127.2 KB, 7 views)
arunraj is offline   Reply With Quote

Old   May 13, 2016, 04:18
Default dynamic mesh problem
  #70
New Member
 
Amit soni
Join Date: Jul 2015
Posts: 9
Rep Power: 3
Amit soni is on a distinguished road
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
Amit soni is offline   Reply With Quote

Old   May 13, 2016, 12:27
Default
  #71
Member
 
Arun raj.S
Join Date: Jul 2011
Posts: 72
Rep Power: 7
arunraj is on a distinguished road
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.

https://drive.google.com/file/d/0B7L...ew?usp=sharing
https://drive.google.com/file/d/0B7L...ew?usp=sharing
Attached Files
File Type: c second.c (1.1 KB, 7 views)
arunraj is offline   Reply With Quote

Old   June 2, 2016, 04:32
Default
  #72
New Member
 
Babu
Join Date: Jun 2016
Posts: 4
Rep Power: 2
babu2440@gmail.com is on a distinguished road
Hi montag dp: Can you please share the UDF file mentioned in your shared pdf:dh_algo.pdf
babu2440@gmail.com is offline   Reply With Quote

Old   June 2, 2016, 04:35
Default
  #73
New Member
 
Babu
Join Date: Jun 2016
Posts: 4
Rep Power: 2
babu2440@gmail.com is on a distinguished road
Dear Montag Dp...

Can you share the UDF file or ebook mentioned in your PDF? my email:babu2440@gmail.com
babu2440@gmail.com is offline   Reply With Quote

Old   June 2, 2016, 09:22
Default Can you send the UDF or ebook?
  #74
New Member
 
Babu
Join Date: Jun 2016
Posts: 4
Rep Power: 2
babu2440@gmail.com is on a distinguished road
Can you send the UDF or ebook?



Quote:
Originally Posted by aamer View Post
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
babu2440@gmail.com is offline   Reply With Quote

Old   June 20, 2016, 04:56
Default
  #75
New Member
 
Babu
Join Date: Jun 2016
Posts: 4
Rep Power: 2
babu2440@gmail.com is on a distinguished road
Quote:
Originally Posted by sheth View Post
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..
babu2440@gmail.com is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Specify radial mesh motion in CFX Jonas CFX 2 April 23, 2008 02:54
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
tank motion on boat Tim FLUENT 0 May 23, 2007 11:50
large scale mesh motion sb FLUENT 1 April 27, 2007 22:23


All times are GMT -4. The time now is 15:50.