# Fluent UDF Discontinuous Motion

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

 July 5, 2011, 14:26 Fluent UDF Discontinuous Motion #1 New Member   Sebastian Join Date: Mar 2011 Posts: 2 Rep Power: 0 Hello you all Iīm programming Fluent for a flapping-wing simulation. After problems with the UDF compilation, VS-Fluent interaction, UDF programming and motion previewing (all solved thanks to this forum) I finally got it working (its 1DOF for now). When I preview the prescribed motion, something wierd happens: While the angular velocity is OK (sine motion), the angle is discontinuous. What I mean is that, when the angular velocity changes sign, the angle leaps to another position, where the velocity continues as it should. That is, when changing direction, the wing jumps right into another position, and then is does change direction and continues normally, until it has to change itīs direction again, just to jump again. Here is the UDF: #include "udf.h" #include "dynamesh_tools.h" DEFINE_CG_MOTION(unGDLsin20,dt,vel,omega,time,dtim e) { real w, a, pi; /* w es frecuencia Hz, a, es amplitud grados*/ pi=3.141592654; a = 20*pi/180; /* 20 degree flapping amplitude */ w = 2*pi*2; /* 2 Hz frequency */ /* speed initialisation */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); /* error message */ if (!Data_Valid_P ()) { Message("Not good at all!\n"); return; } omega[0] = 0; omega[1] = a*w*sin(w*time); omega[2] = 0; } I donīt know if the problem is in the UDF programming, or if itīs a compilation problem, or the way fluent calculates position with the angular velocity provided, or what at all. Any advice is welcome (I really need to finish my thesis)

November 2, 2011, 00:20
#2
Member

^^
Join Date: Aug 2011
Posts: 70
Rep Power: 7
Quote:
 Originally Posted by lequi7 Hello you all Iīm programming Fluent for a flapping-wing simulation. After problems with the UDF compilation, VS-Fluent interaction, UDF programming and motion previewing (all solved thanks to this forum) I finally got it working (its 1DOF for now). When I preview the prescribed motion, something wierd happens: While the angular velocity is OK (sine motion), the angle is discontinuous. What I mean is that, when the angular velocity changes sign, the angle leaps to another position, where the velocity continues as it should. That is, when changing direction, the wing jumps right into another position, and then is does change direction and continues normally, until it has to change itīs direction again, just to jump again. Here is the UDF: #include "udf.h" #include "dynamesh_tools.h" DEFINE_CG_MOTION(unGDLsin20,dt,vel,omega,time,dtim e) { real w, a, pi; /* w es frecuencia Hz, a, es amplitud grados*/ pi=3.141592654; a = 20*pi/180; /* 20 degree flapping amplitude */ w = 2*pi*2; /* 2 Hz frequency */ /* speed initialisation */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); /* error message */ if (!Data_Valid_P ()) { Message("Not good at all!\n"); return; } omega[0] = 0; omega[1] = a*w*sin(w*time); omega[2] = 0; } I donīt know if the problem is in the UDF programming, or if itīs a compilation problem, or the way fluent calculates position with the angular velocity provided, or what at all. Any advice is welcome (I really need to finish my thesis)
I have same problem. Please let me know if you solve this problem

Best Regards

November 4, 2011, 00:18
#3
New Member

Sebastian
Join Date: Mar 2011
Posts: 2
Rep Power: 0
Quote:
 Originally Posted by colopolo I have same problem. Please let me know if you solve this problem Best Regards
Colopolo
I messed with it a lot and couldnīt solve it...
Then I switched to another, linux based, computer and it worked like a charm. Compiling was so easy.
I believe my original UDF got messed up along the long way in the Windows *thorny* compiling process.

Hope that helps

 Tags cg_motion, discontinuity, dynamic mesh, flapping motion, udf

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Fil FLUENT 4 January 3, 2015 14:14 hugeforest Fluent UDF and Scheme Programming 1 July 8, 2011 04:31 mariachi Fluent UDF and Scheme Programming 9 February 19, 2010 13:25 mariachi FLUENT 1 February 3, 2010 23:18 Yurong FLUENT 3 January 15, 2006 11:57

All times are GMT -4. The time now is 16:29.