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

(??) sinusoidal motion for DEFINE_CG_MOTION

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2010, 02:34
Question (??) sinusoidal motion for DEFINE_CG_MOTION
  #1
New Member
 
ji-ho
Join Date: Mar 2010
Posts: 3
Rep Power: 16
salzini is on a distinguished road
I'm testing with a simple UDF for sinusoidal angular velocity motion but it has a problem.

macro [DEFINE_CG_MOTION] presents [omega] for angular velocity variable and [time] to passes time variable, so try this to describe a pseudo-vibrating cantilever.

omega is time dependant variable and displacement(angle) is intergation of the omega over the time passed. so I assumed if I put some intergand of the time into UDF, Fluent will reflect its integration to the moving boundary.

Few graphs were ploted for investigation

(http://yfrog.com/51graphbj)

and equations are...

w_1=sin(2*pi*t)
F_1 = INTEGRAL(w_1, t)

w_2=sin(2*pi*t + pi/2)
F_2 = INTEGRAL(w_2, t)

w_3=sin(2*pi*t - pi/2)
F_3 = INTEGRAL(w_3, t)

I choosed blue one(w_2) and its UDF code were...

DEFINE_CG_MOTION(move, dt, vel, omega, time, dtime)
{
NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);
omega[2]=sin(2*M_PI*time + M_PI/2);
}


my desired output was correct y position of lever though, it only moves over y=0 but y>0 and vise versa (no alternation of -+. just up and down under y=0 or over y=0).

I have no idea for [dtime] and [accumulater+= valiable] form to the that situation. So I put integrand in the UDF and hope the Fluent updates position of that intergrand for the time, but it seemed not that explictly

SO... It seems obiously there are stupid assumption or mis-understanding of UDF. Can I recieve a wise solution?

Last edited by salzini; November 8, 2010 at 02:48. Reason: refine
salzini is offline   Reply With Quote

Old   December 10, 2010, 04:47
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
First of all, I don't see why F_1 is always positive in your picture (http://yfrog.com/51graphbj).
If angular velocity is:
1. \omega = sin(2{\pi}t)
then the integral of it should be:
\theta = -\frac{1}{2\pi}cos(2{\pi}t)
which alternates between \left[-\frac{1}{2\pi};+\frac{1}{2\pi}\right]
2. \omega = sin(2{\pi}t+\frac{\pi}{2})
then the integral of it should be:
\theta = -\frac{1}{2\pi}cos(2{\pi}t+\frac{\pi}{2})
which again alternates between \left[-\frac{1}{2\pi};+\frac{1}{2\pi}\right]

My suggestion is to check around which origing you define this omega!
dmoroian is offline   Reply With Quote

Reply

Tags
define_cg_motion, sinusoidal, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for non sinusoidal or varying amplitude motion with respect to time lalit kumar FLUENT 1 November 13, 2010 16:58
Sinusoidal motion udf urmazda Fluent UDF and Scheme Programming 6 July 30, 2010 11:44
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09
tank motion on boat Tim FLUENT 0 May 23, 2007 11:50
Airfoil Sinusoidal Motion - How? Andrew FLUENT 1 April 8, 2005 19:42


All times are GMT -4. The time now is 16:40.