# DEFINE_CG_MOTION for flapping wing UDF

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

September 15, 2016, 08:53
#21
New Member

Giorgio
Join Date: Jun 2016
Posts: 12
Rep Power: 9
Quote:
 Originally Posted by xyzch001 The problem is that when you derive theta to find the angular velocity you lose the constant, so when Fluent integrates the velocity (DEFINE_CG_MOTION requires the angular velocity, not the angle(t)) it loses the constant "-15", giving the symmetrical function 25*sin(2*pi*frequency*t+arcsin(3/5)). But unfortunately I want an asymmetrical function ranging from +10deg to -40deg.
What is the integration scheme used by Fluent to get the angle theta knowing the angular velocity???

I am experiencing some problems because I imply a constant angular velocity in steps but the angle changes after each cycle because of rounding off errors!!!

February 7, 2022, 07:47
UDF for asymmetric motion
#22
New Member

Join Date: Jul 2020
Posts: 8
Rep Power: 5
Quote:
 Originally Posted by xyzch001 Hi pdp.aero! Finally I found the solution: this is the function that gives me the desired flapping angles: theta[t] = 0.8409*sin(w*t - 0.2563) + 0.6643*cos(w*t + 0.7741) - 0.000001868*Sin(0.7629*w*t + 0.1884) +0.3773*cos(-0.000002463*w*t + 2.338) It has no constants so that, when I derive it to find the omega[t] and then Fluent integrates it,Fluent gets back the original theta[t]. I used Matlab "Curve fitting toolbox" to find this function by interpolation of many points. Anyway thank you for your help!

I am learning how to write a UDF for a flapping door, angle is from +50 to -10 degrees, please give me some hints.

 Tags ansys fluent, define_cg_motion, flapping wing, udf