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

Problem with pitch rotation and translational acceleration in udf

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AlexanderZ
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2020, 06:54
Default Problem with pitch rotation and translational acceleration in udf
  #1
New Member
 
Outside US and Canada
Join Date: Apr 2020
Posts: 11
Rep Power: 6
Rabeyia Manzoor Illahi is on a distinguished road
I have to make a udf of the following two equations but unable to get the movement for omega, if you can please help.

#include "udf.h"
DEFINE_CG_MOTION(air,dt,vel,omega,time,dtime)
{
Thread *t;
face_t f;
real tau,delTau,Tau1, pi, U, c, Taur;
pi = 3.14159265;
U=1;
c=1;

/*time=time+dtime;*/

tau=(time*U)/c;
delTau = (dtime*U)/c; /*(dtime*U)/c*/;
Tau1= (time*U)/c;/*(time1*U)/c*/;
Taur= Tau1-delTau;


vel[0] = 0.5*(1+cos(pi*(tau-Tau1)/delTau));
omega[2] = 77.5*(1-cos(2*pi*(tau-Taur)/delTau));



}
Rabeyia Manzoor Illahi is offline   Reply With Quote

Old   July 17, 2020, 01:52
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
cos(2*pi) = 1

so omega[2] = 77.5*(1- 1) = 0 always

modify your equation
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   July 17, 2020, 02:05
Default
  #3
New Member
 
Outside US and Canada
Join Date: Apr 2020
Posts: 11
Rep Power: 6
Rabeyia Manzoor Illahi is on a distinguished road
Sir thankyou so much for thr reply. But the cos function also involves other terms so it wont be zero.
And I have take these equations from a paper of "Unsteady aerodynamic force generation by a model fruit fly wing in flapping
motion" by Sun and Tang.
If you can please help.
Rabeyia Manzoor Illahi is offline   Reply With Quote

Old   July 17, 2020, 02:13
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
put
Code:
tau=(time*U)/c;
delTau = (dtime*U)/c; /*(dtime*U)/c*/;
Tau1= (time*U)/c;/*(time1*U)/c*/;
Taur= Tau1-delTau;
in
Code:
 omega[2] = 77.5*(1-cos(2*pi*(tau-Taur)/delTau));
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   July 17, 2020, 02:24
Default
  #5
New Member
 
Outside US and Canada
Join Date: Apr 2020
Posts: 11
Rep Power: 6
Rabeyia Manzoor Illahi is on a distinguished road
Sir if I run the omega equation alone, its working but both velocity and omega not working together. If you can please help.
Rabeyia Manzoor Illahi is offline   Reply With Quote

Old   July 17, 2020, 03:40
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
how it could works if omega[2] = 0 ????
check the difference between codes


did you compile UDF? this is must for DEFINE_CG_MOTION macro

for more informaton about dynamic mesh you may check Ansys Fluent Customization manual -> Dynamic Mesh DEFINE Macros chapter
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply


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



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