|
[Sponsors] |
July 5, 2011, 15: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: 15 |
Quote:
Best Regards |
||
November 4, 2011, 00:18 |
|
#3 | |
New Member
Sebastian
Join Date: Mar 2011
Posts: 2
Rep Power: 0 |
Quote:
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 |
|
|
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 |