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

UDF for C.G.Motion in two direction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 9, 2003, 07:16
Default UDF for C.G.Motion in two direction
  #1
ciprian
Guest
 
Posts: n/a
i have a cylinder who has a two direction mouvement. i have this function and i really don't knew what is wrong because after i read it in fluent i receive a mesaje "segmentation violation". if somebody has a fonction for c.g.motion in more then one direction and he can send it to me or can fix this program it will be great. thank you.cip

#include "udf.h" #include "dynamesh_tools.h"

static real v_prev1_x = 0.0; static real v_prev1_y = 0.0; DEFINE_CG_MOTION(cylindre_CIP, dt, vel, omega, time, dtime)

{

Thread *t; face_t f; real NV_VEC (A); real b; real c; real force_ox, force_oy, dv_x, dv_y;

NV_S (vel, =, 0.0); NV_S (omega, =, 0.0);

if(!Data_Valid_P ())

return;

t=DT_THREAD((Dynamic_Thread *)dt);

force_ox = 0.0; force_oy = 0.0; begin_f_loop (f,t)

{

F_AREA (a,f,t);

b = a[0];

force_ox +=F_P (f,t) * b;

c = a[1];

force_oy +=F_P (f,t) * c;

}

end_f_loop (f,t) dv_x=dtime * force_ox /50.0; dv_y=dtime * force_oy /50.0;

v_prev1_x += dv_x; v_prev1_y += dv_y; Message ("time=%f,x_vel =%f,y_vel =%f,force_ox=%f\n,force_oy=%f\n",time,v_prev1_x,v_ prev1_y,force_ox,force_oy);

vel[0] = v_prev1_x; vel[1] = v_prev1_y;

}

  Reply With Quote

Old   May 12, 2003, 02:25
Default Re: UDF for C.G.Motion in two direction
  #2
Alexandre
Guest
 
Posts: n/a
did you use a compiled UDF (ie : not interepreted one )?
  Reply With Quote

Old   May 12, 2003, 02:31
Default Re: UDF for C.G.Motion in two direction
  #3
ciprian
Guest
 
Posts: n/a
yes, i've done the same procedure avec other udf's and works good. only in this case not
  Reply With Quote

Old   August 20, 2009, 21:45
Default
  #4
New Member
 
jiaoyangsong
Join Date: Aug 2009
Posts: 1
Rep Power: 0
sunnysong1984 is on a distinguished road
i have the same problem with u
how did u solve the problem?
sunnysong1984 is offline   Reply With Quote

Reply


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 direction Rowing FLUENT 2 June 17, 2011 08:33
Help please UDF flow direction val17lr FLUENT 2 September 4, 2010 05:30
looping UDF in given direction ak6g08 Fluent UDF and Scheme Programming 0 September 10, 2009 10:13
Help: using udf to define direction Bo FLUENT 1 July 16, 2008 06:47
changing gravity vector direction using UDF Nico FLUENT 0 September 7, 2006 12:00


All times are GMT -4. The time now is 17:29.