|
[Sponsors] |
July 16, 2012, 10:39 |
dynamic mesh
|
#1 |
New Member
x125012
Join Date: Jul 2012
Posts: 9
Rep Power: 13 |
I'm simulating a flapping wing aircraft and have designed a rectangular wing to model that. I have to use dynamic motion to model the flapping motion. However, I am not familiar with dynamic mesh. What I know is that I have to use a UDF code to define the motion. I am using the following UDF code which has been posted by a member on the forum to simulate the motion but everytime I compile the code I get an error.
#include "udf.h" #include "dynamesh_tools.h" DEFINE_CG_MOTION(asymflap, dt, v_cg, omega, time, dtime) { Thread *t; NV_S(v_cg, =, 0.0); NV_S(omega, =, 0.0); if (!Data_Valid_P()) { Message("Wrong\n"); return; } t=DT_THREAD((Dynamic_Thread*)dt); frequency = 3.0; pi = 3.141592654; /* define motion variables */ Ar = 30.0; /*roll amplitude*/ Ap = 5.0; /*pitch amplitude*/ Ay = 0.0; /*yaw amplitude*/ Aroll = Ar*pi/180.0; /*conversion to radians*/ Apitch = Ap*pi/180.0; /*conversion to radians*/ w=2.0*pi*frequency; /*omega (radians)*/ T=1.0/frequency; roll = Aroll*sin(w*time + pi/2); droll = w*Aroll*cos(w*time + pi/2); pitch = Apitch*sin(w*time); dpitch = w*Apitch*cos(w*time); /*euler angles initial frame mod 1*/ omega[0] = droll; omega[1] = dpitch*1.0*cos(roll); omega[2] = dpitch*1.0*sin(roll); Message("time:%f omegax:%f omegay:%f omegaz:%f \n", time, omega[0], omega[1],omega[2]); |
|
July 17, 2012, 13:08 |
|
#2 |
Senior Member
Simon Pereira
Join Date: Mar 2009
Location: Ann Arbor, MI
Posts: 2,663
Blog Entries: 1
Rep Power: 47 |
If you want help with UDF's, I suggest you post your question in the relevant solver forum.
__________________
----------------------------------------- Please help guide development at ANSYS by filling in these surveys Public ANSYS ICEM CFD Users Survey This second one is more general (Gambit, TGrid and ANSYS Meshing users welcome)... CFD Online Users Survey |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh on Pintle type injector. | herntan | FLUENT | 16 | September 4, 2020 08:27 |
pls help. mesh collapsed with dynamic mesh. | wlt_1985 | FLUENT | 2 | May 7, 2020 10:42 |
Incylinder dynamic mesh with volumetric reaction | mas | FLUENT | 4 | May 3, 2012 10:22 |
dynamic mesh on a hexa grid | Manoj Kumar | FLUENT | 0 | August 21, 2007 07:41 |
Dynamic mesh + grid adapt = Crash! (Files included | BillH | FLUENT | 4 | July 24, 2007 15:31 |