CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

SOLUTION : Cg_motion UDF for a oscillating body

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

Like Tree1Likes
  • 1 Post By Atze

LinkBack Thread Tools Display Modes
Old   March 9, 2011, 06:02
Talking SOLUTION : Cg_motion UDF for a oscillating body
Join Date: Apr 2010
Location: Pisa / Italy
Posts: 62
Rep Power: 9
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);


force += F_P(f,t) * A[1];



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

Grigor Nikolov likes this.
Atze is offline   Reply With Quote


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
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 05:10
CFL Condition Matt Umbel Main CFD Forum 14 January 12, 2001 15:34
Any Body got a Free Surface Solution in FIDAP Dr. Ahmed Hassaneen Main CFD Forum 2 November 8, 1999 15:59
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 02:16

All times are GMT -4. The time now is 15:43.