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

SOLUTION : Cg_motion UDF for a oscillating body

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Atze

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2011, 05:02
Talking SOLUTION : Cg_motion UDF for a oscillating body
  #1
Member
 
Join Date: Apr 2010
Location: Pisa / Italy
Posts: 62
Rep Power: 16
Atze is on a distinguished road
Hope it can help someone

/* in this example a cilynder with CG=(0,0) in loaded by its own wake. A spring of K=15 keeps it in position*/

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

DEFINE_CG_MOTION(oscillazione,dt,vel,omega,time,dt ime)
{

real x[ND_ND];
Thread *t;
face_t f;
real A[ND_ND];
real Ft,Fel, dv;
real Keq= 15;
real m = 0.25;
real s;
real force=0;
real v_prev=0;

t = DT_THREAD(dt);

s=DT_CG(dt)[1];

begin_f_loop(f,t)
{
F_AREA(A,f,t);
force += F_P(f,t) * A[1];
}
end_f_loop(f,t)

Fel=-Keq*s;

Ft=force+Fel;
dv=(Ft/m)*dtime;

vel[1] = DT_VEL_CG(dt)[1]+dv;

}
Grigor Nikolov likes this.
Atze 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
CFL Condition Matt Umbel Main CFD Forum 19 June 30, 2020 08:20
body has to move in positive and negative x-direction (UDF?) bobo FLUENT 0 July 2, 2009 06:41
HELP! HELP! For udf of particle body force!!!! zhaoh FLUENT 0 February 5, 2007 04:10
Any Body got a Free Surface Solution in FIDAP Dr. Ahmed Hassaneen Main CFD Forum 2 November 8, 1999 14:59
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 01:16


All times are GMT -4. The time now is 19:03.