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

UDF for defining a velocity gradient

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 22, 2013, 12:58
Default UDF for defining a velocity gradient
  #1
New Member
 
Musa
Join Date: May 2009
Location: UK
Posts: 25
Rep Power: 8
mozkan26 is on a distinguished road
Dear friends,

I`m trying to simulate an axisymmetric swirl flow in Fluent with a very simple geometry, attached image shows my geometry and boundary conditions.

At the inlet boundary, radial and swirl velocity components are zero and axial velocity gradient is zero.

Gauge pressure is zero at the outlet and there is a wall with a constant rotational speed.

My UDF file for axial velocity gradient is below but I`m not sure if this is correct because I have difficulties with converging and continuity does not satisfy.

********************
#include "udf.h"

DEFINE_PROFILE(Axial_Velocity_Gradient,t,i)
{
real xf[ND_ND], xc[ND_ND];
face_t f;
cell_t c0;
Thread*t0;
begin_f_loop(f,t)
{
F_CENTROID(xf,f,t);
c0=F_C0(f,t);
t0=THREAD_T0(t);
C_CENTROID(xc,c0,t0);
F_PROFILE(f,t,i)=C_U(c0,t0);
}
end_f_loop(f,t)
}
********************

Many thanks in advance.

Musa
Attached Images
File Type: jpg axisymmetric swirl.jpg (21.4 KB, 18 views)
mozkan26 is offline   Reply With Quote

Reply

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
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 07:29
Velocity gradient in previous timestep mateus FLUENT 1 December 13, 2012 14:07
3D UDF Paraboilc Velocity Profile with max velocity johnGo Fluent UDF and Scheme Programming 1 January 4, 2011 22:45
3D velocity inlet UDF zumaqiong Fluent UDF and Scheme Programming 1 June 4, 2010 19:31
why boudary slip velocity is so larte using udf cxzhao FLUENT 0 July 4, 2005 00:06


All times are GMT -4. The time now is 08:13.