|
[Sponsors] |
UDF Airfoil SHM flapping motion not executing, rather rotating 360degs |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 4, 2020, 01:59 |
UDF Airfoil SHM flapping motion not executing, rather rotating 360degs
|
#1 |
New Member
AfreedFaizan
Join Date: Dec 2020
Posts: 2
Rep Power: 0 |
I'm working on oscillating airfoils based on flapping wings. In order to do so, I took a simple airfoil and made the geometry. I had no issues while building the "udflib" and the code which I used given below. Once I set the CG location and preview the motion. It is rotating 360 degs at a very fast rpm rather than executing slow shm. I'm pretty sure it's something to do with the software rather than the code. Please help me because this is my uni project.
#include "udf.h" #define Freq 5 % defining flapping frequency i.e 5, 6, 7, 8, 9 and 10Hz #define PI 22/7 #define angular_freq 2.0*PI*Freq % defining angular frequency #define tetmax 30.0*PI/180 % defining angular amplitude DEFINE_CG_MOTION (shm, dt, cg_vel, cg_omega, time, dtime) { real omega; omega = tetmax *angular_freq* cos (angular_freq *time); cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; } |
|
February 18, 2024, 08:11 |
|
#2 |
New Member
johnny simson
Join Date: Nov 2023
Posts: 18
Rep Power: 3 |
hey any fixes? im facing the exact same issue.
|
|
February 18, 2024, 10:06 |
|
#3 | |
New Member
johnny simson
Join Date: Nov 2023
Posts: 18
Rep Power: 3 |
Quote:
1) change the PI macro definition, instead of that you invoke M_PI instead 2) the reason it rotates instead of executing a simple harmonic motion is because the angles are inconsistent. so here's the fixed code: Code:
#define angular_freq 2.0*Freq*M_PI/180 #define tetmax 30.0*PI/180 |
||
Tags |
airfoil pitching 2d, fluent - udf, fluent - udf - parallel, shm not snapping, udf cg motion |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to define movement/deformation relative to a rigid body motion in Fluent by udf? | eagle_001 | Fluent UDF and Scheme Programming | 6 | May 17, 2022 04:41 |
SU2 AOA optimization | 454514566@qq.com | SU2 | 9 | March 7, 2022 17:17 |
trying to write a UDF for rigid body motion | niteshrajput | Fluent UDF and Scheme Programming | 4 | December 17, 2014 01:29 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
UDF for Airfoil in Circular motion (2D) | sohail_27 | Fluent UDF and Scheme Programming | 4 | October 4, 2010 14:36 |