|
[Sponsors] |
April 17, 2010, 07:03 |
Flapping Wing motion
|
#1 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
I am doing a CFD analysis of flapping wing motion in FLUENT . For the same I have written a UDF which looks like :
Code:
#include "udf.h" DEFINE_CG_MOTION(myudf, dt, v_cg, omega, time, dtime) { Thread *t; real c=0.2; real omega_t=6.28; NV_S(v_cg, =, 0.0); NV_S(omega, =, 0.0); t=DT_THREAD((Dynamic_Thread *)dt); v_cg[1]=2*3.14*c*cos(omega_t*time); omega[2]=3.14*3.14*sin(omega_t*time)/4; Message("time:%f vx_cg:%f vy_cg:%f omegaz:%f \n",time, v_cg[0],v_cg[1],omega[2]); } Also another option is actually defining the path taken by the CG in time ..... writing a profile file .... . How does one actually write a profile file ??? |
|
August 3, 2010, 03:13 |
rotation about z axis
|
#2 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
hi dear balkrishna...
long ago you were studying a case that contained flapping wing motion, now i'm working on something like that,i sent you two images that both of them are kind of peristaltic pump,i want to rotate two/one small cylinder about z axis,i should write an udf,i've written an udf for this but does not work;I will be thankful if you could help me out looking forward to ur help. |
|
August 3, 2010, 03:14 |
rotation about z axis
|
#3 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
sorry I forgot to attach images;
|
|
August 3, 2010, 03:17 |
|
#4 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
Yes write a UDF ... it will be simpler ... please attach the UDF ... or paste the code ....
|
|
August 3, 2010, 03:29 |
rotation about z axis
|
#5 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
dear balkrishna,it's kind of you to reply my post
i use the following udf # include "udf.h" # include "dynamesh_tools.h" DEFINE_CG_MOTION(pump,dt,vel,omega,time,dtime) { Thread *t; real freq_t; NV_S(vel,=,0.0); NV_S(omega,=,0.0); if(!Data_Valid_P()) return; freq_t = 4.0; t= DT_THREAD((Dynamic_Thread*)dt); vel[0] = 0.0; vel[1] = 0.0; vel [2] = 0.0; omega [0] = 0.0; omega [1] = 0.0; omega [2] = freq_t; } in your opinion is that what i want,if yes what's the problem that it does not work,if not plz help me write an appropriate udf... |
|
August 3, 2010, 03:31 |
|
#6 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
what doesnt work in this ... the udf is fine .... what are the errors you are getting ?
are you getting negative volumes in the mesh ? Also use cg_vel and cg_omega for the variables vel and omega ..... |
|
August 3, 2010, 03:34 |
rotation about z axis
|
#7 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
no i mean the small circle does not rotate about center of bigger circle,i have problem in motion!
|
|
August 3, 2010, 03:35 |
|
#8 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
yes ... i faced a similar problem .... use cg_vel instead of vel and cg_omega instead of omega
|
|
August 3, 2010, 03:39 |
rotation about z axis
|
#9 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
plz explain it more, how should i do it in udf,how can cg_vel rotate small circle about z axis???
|
|
August 3, 2010, 03:41 |
|
#10 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
try this udf ....
Code:
# include "udf.h" # include "dynamesh_tools.h" DEFINE_CG_MOTION(pump,dt,cg_vel,cg_omega,time,dtime) { Thread *t; real freq_t; NV_S(vel,=,0.0); NV_S(omega,=,0.0); if(!Data_Valid_P()) return; freq_t = 4.0; t= DT_THREAD((Dynamic_Thread*)dt); 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] = freq_t; } |
|
August 3, 2010, 03:54 |
|
#11 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
yes it can ....
|
|
August 3, 2010, 04:50 |
rotation about z axis
|
#12 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
dear balkrishna...
i compiled ur udf and three images that i sent u are results,as u can see small cylinder changes its position so small, i want to move center of the cylinder on the inner edge of bigger cylinder,how can i do this large displacement?? Attachment 4299 Attachment 4300 http://www.4shared.com/file/R2SbkdqT...ltic-pump.html |
|
August 3, 2010, 04:55 |
|
#13 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
i have dans guardian banning the attachment download .... read the documentation for larger displacement .... ....
|
|
August 3, 2010, 07:08 |
|
#14 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
i did not understand ur post,i had another post in mind
|
|
August 3, 2010, 07:10 |
|
#15 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
check the fluent docs ....
|
|
November 1, 2012, 10:20 |
|
#16 |
Member
Vidit Sharma
Join Date: Aug 2012
Location: Delhi, India
Posts: 32
Rep Power: 14 |
hi,
I am trying to move a 2d cylinder in y direction by using UDF:- # include "udf.h" # include "dynamesh_tools.h" DEFINE_CG_MOTION(pump,dt,cg_vel,cg_omega,time,dtim e) { Thread *t; real freq_t; NV_S(cg_vel,=,0.0); if(!Data_Valid_P()) return; freq_t = 0.01; t= DT_THREAD((Dynamic_Thread*)dt); cg_vel[0] = 0.0; cg_vel[1] = freq_t; } But I am having a problem while compiling it in Visual Studio Command Prompt. While executing nmake command to compile an error is appearing which is saying NMAKE : fatal error U1077: "sed" :return code '0X1' can anybody tell how to eliminate this error???? Thank You Regards Vidit Sharma |
|
November 1, 2012, 10:34 |
|
#17 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
try interpreting it .... do not compile it.
|
|
November 1, 2012, 10:41 |
|
#18 |
Member
Vidit Sharma
Join Date: Aug 2012
Location: Delhi, India
Posts: 32
Rep Power: 14 |
||
April 13, 2016, 05:16 |
flapping wings
|
#19 |
Member
mohamed
Join Date: Apr 2016
Posts: 34
Rep Power: 10 |
I am doing a CFD analysis of flapping wing motion in FLUENT and I need udf code to define the motion I do not know how to write it can any one help me with it thanks
|
|
April 13, 2016, 16:42 |
CFD udf code fluent
|
#20 |
Member
mohamed
Join Date: Apr 2016
Posts: 34
Rep Power: 10 |
[QUOTE=moh_zain;594803]I am doing a CFD analysis of flapping wing motion in FLUENT and I need udf code to define the motion I do not know how to write it can any one help me with it thanks
|
|
Tags |
flapping, fluent, profile, udf, wing |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Modelling flow around a flapping wing | balkrishna | Main CFD Forum | 1 | February 19, 2010 00:32 |
ask help about flapping wing UDF | aeropeng | Fluent UDF and Scheme Programming | 0 | December 24, 2009 23:09 |
Flapping wing by moving frame | loogtaan | FLUENT | 1 | October 11, 2007 03:48 |
Help on the flapping wing | Kearney | Main CFD Forum | 1 | May 28, 2003 10:50 |