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

6dof udf

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

Like Tree1Likes
  • 1 Post By assac

Reply
 
LinkBack Thread Tools Display Modes
Old   March 3, 2012, 21:41
Unhappy 6dof udf
  #1
New Member
 
Join Date: Jan 2012
Posts: 2
Rep Power: 0
assac is on a distinguished road
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
File Type: jpg problem.jpg (91.4 KB, 151 views)
joy2000 likes this.
assac is offline   Reply With Quote

Old   March 6, 2012, 14:38
Red face solution
  #2
New Member
 
Join Date: Jan 2012
Posts: 2
Rep Power: 0
assac is on a distinguished road
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!
assac is offline   Reply With Quote

Old   January 23, 2014, 10:19
Default help!
  #3
New Member
 
majid
Join Date: Mar 2011
Posts: 8
Rep Power: 7
majidmng is on a distinguished road
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.
majidmng is offline   Reply With Quote

Reply

Tags
access violation error, moving body, moving mesh, sixdofrigidbody, sixdofsolver

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with 6DOF udf rafasdo Fluent UDF and Scheme Programming 2 August 9, 2014 10:39
would someone give me a example of udf for 6DOF? conan FLUENT 3 January 24, 2011 22:10
sharing the directory for parallel 6DOF UDF... usman naseer Main CFD Forum 1 September 6, 2010 04:09
parallel 6DOF UDF.... usman naseer FLUENT 1 February 18, 2010 15:56
6DOF UDF: Obtain CG velocity NRD FLUENT 0 February 27, 2008 12:36


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