CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Fluent UDF Discontinuous Motion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 5, 2011, 15:26
Default Fluent UDF Discontinuous Motion
  #1
New Member
 
Sebastian
Join Date: Mar 2011
Posts: 2
Rep Power: 0
lequi7 is on a distinguished road
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)
lequi7 is offline   Reply With Quote

Old   November 2, 2011, 00:20
Default
  #2
Member
 
^^
Join Date: Aug 2011
Posts: 70
Rep Power: 15
colopolo is on a distinguished road
Quote:
Originally Posted by lequi7 View Post
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
colopolo is offline   Reply With Quote

Old   November 4, 2011, 00:18
Default
  #3
New Member
 
Sebastian
Join Date: Mar 2011
Posts: 2
Rep Power: 0
lequi7 is on a distinguished road
Quote:
Originally Posted by colopolo View Post
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
lequi7 is offline   Reply With Quote

Reply

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


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF problem: incorrect grid motion Fil FLUENT 5 December 19, 2020 10:16
UDF to record FLUENT Solver variables... mariachi Fluent UDF and Scheme Programming 11 September 24, 2019 01:07
the udf has been hooked to the fluent successfully,but it does not work! hugeforest Fluent UDF and Scheme Programming 1 July 8, 2011 05:31
UDF to record FLUENT solver variables... mariachi FLUENT 1 February 3, 2010 23:18
UDF problem caused by various version of Fluent Yurong FLUENT 3 January 15, 2006 11:57


All times are GMT -4. The time now is 13:00.