# 6dof udf

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Search this Thread Display Modes
March 3, 2012, 21:41
6dof udf
#1
New Member

Join Date: Jan 2012
Posts: 2
Rep Power: 0
Hi, I have a question:
I wanna calculate the movement of a 3d rigid body due to the pressure and shear forces of the flow with Fluent. The problem is a 3d flow in a tube with a rigid body that is free to move inside that tube (I've added an image below).
I wrote this UDF (It's my first UDF!!!! :-S ):

DEFINE_SDOF_PROPERTIES(six_degs_of_frdom1, prop, dt, time, dtime)
{
Thread *t;
face_t f;
real NV_VEC(A);
real force0, force1, force2;

t = DT_THREAD(dt);
force0 = 0.0;
force1 = 0.0;
force2 = 0.0;

begin_f_loop(f,t)
{
F_AREA(A,f,t);
force0 += F_P(f,t) * A[0] + F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[0];
force1 += F_P(f,t) * A[1] + F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[1];
force2 += F_P(f,t) * A[2] + F_STORAGE_R_N3V(f,t,SV_WALL_SHEAR)[2];
}
end_f_loop(f,t)

prop[SDOF_MASS] = 50;
prop[SDOF_LOAD_F_X] = force0; /* external force */
prop[SDOF_LOAD_F_Y] = force1; /* external force */
prop[SDOF_LOAD_F_Z] = force2; /* external force */

but Fluent stamp an error :

Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f

Can somebody help me??!?!?!??!?!
Thanks!

[IMG][img=http://s16.postimage.org/51n8m75sl/problem.jpg] png image hosting[/IMG]
Attached Images
 problem.jpg (91.4 KB, 197 views)

 March 6, 2012, 14:38 solution #2 New Member   Join Date: Jan 2012 Posts: 2 Rep Power: 0 Hi, I've added this header: storage.h and the "ACCESS_VIOLATION" problem was solved!! (many thanks to Amir for that!). But there is now a new problem... the 3d object doesn't move at all... does anyone have any idea what might be wrong? Thanks!

 January 23, 2014, 10:19 help! #3 New Member   majid Join Date: Mar 2011 Posts: 8 Rep Power: 12 Hi assac im using 6dof for calculate force and moving body my udf is: #include "udf.h" DEFINE_SDOF_PROPERTIES(stage, prop, dt, time, dtime) { Thread *t; face_t f; real NV_VEC(A); real force0, force1, force2; t = DT_THREAD(dt); force0 = 0.0; force1 = 0.0; force2 = 0.0; begin_f_loop(f,t) { F_AREA(A,f,t); force0 += F_P(f,t) * A[0]; force1 += F_P(f,t) * A[1]; force2 += F_P(f,t) * A[2]; } end_f_loop(f,t) prop[SDOF_MASS] = 50; prop[SDOF_LOAD_F_X] = force0; prop[SDOF_LOAD_F_Y] = force1; prop[SDOF_LOAD_F_Z] = force2; printf ("\nstage: updated 6DOF properties"); } but it doesnt work and fluent messege is: FLUENT received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: () please help me.

 Thread Tools Search this Thread Search this Thread: Advanced Search 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 Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post rafasdo Fluent UDF and Scheme Programming 2 August 9, 2014 11:39 conan FLUENT 3 January 24, 2011 22:10 usman naseer Main CFD Forum 1 September 6, 2010 05:09 usman naseer FLUENT 1 February 18, 2010 15:56 NRD FLUENT 0 February 27, 2008 12:36

All times are GMT -4. The time now is 22:27.

 Contact Us - CFD Online - Privacy Statement - Top