|
[Sponsors] |
Problem with pitch rotation and translational acceleration in udf |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 16, 2020, 06:54 |
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 |
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)); } |
|
July 17, 2020, 01:52 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
July 17, 2020, 02:05 |
|
#3 |
New Member
Outside US and Canada
Join Date: Apr 2020
Posts: 11
Rep Power: 6 |
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. |
|
July 17, 2020, 02:13 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
put
Code:
tau=(time*U)/c; delTau = (dtime*U)/c; /*(dtime*U)/c*/; Tau1= (time*U)/c;/*(time1*U)/c*/; Taur= Tau1-delTau; Code:
omega[2] = 77.5*(1-cos(2*pi*(tau-Taur)/delTau));
__________________
best regards ****************************** press LIKE if this message was helpful |
|
July 17, 2020, 02:24 |
|
#5 |
New Member
Outside US and Canada
Join Date: Apr 2020
Posts: 11
Rep Power: 6 |
Sir if I run the omega equation alone, its working but both velocity and omega not working together. If you can please help.
|
|
July 17, 2020, 03:40 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
|
|