# 6dof udf

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

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)
{
face_t f;
real NV_VEC(A);
real force0, force1, force2;

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.
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, 123 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!