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

UDF for 3D rectangular Inlet velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2015, 14:18
Post UDF for 3D rectangular Inlet velocity
  #1
New Member
 
Mohammed Attya's Avatar
 
Mohammed Attya
Join Date: Jan 2014
Location: Egypt
Posts: 4
Rep Power: 12
Mohammed Attya is on a distinguished road
Hi, I am solving a problem for a 3D duct (rectangular cross-section)
I used this UDF for inlet velocity profile for turbulent flow
mean velocity = 1 m/s
cross section = 40 * 40 mm in (Y & Z)

Code:
#include "udf.h"
#define H 0.04 /*meter*/
#define UMEAN 1. 

DEFINE_PROFILE(inlet_profile,t,i)
{
real x[ND_ND]; 
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
if (y > (H/2))
	F_PROFILE(f, t, position) = UMEAN * 1.224 * pow((H-y)/(H/2.),(1./7.));
else
	F_PROFILE(f, t, position) = UMEAN * 1.224 * pow(y/(H/2.),(1./7.));
}
end_f_loop(f,t)
}
the problem is the velocity profile is uniform in Z-direction (U1 = U2 = U3)
U1 => U at Z = 0
U2 => U at Z = 20
U3 => U at Z = 40
__________________
CFD is my LOVE
Mohammed Attya is offline   Reply With Quote

Reply

Tags
rectangular duct, turbulent, udf code, velocity profile


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 for a 3D inlet velocity profile with wave motion kailingkk Fluent UDF and Scheme Programming 9 May 26, 2021 08:33
UDF paraboloid velocity inlet rosco FLUENT 10 June 2, 2017 09:01
Establishing a UDF for turbulent velocity inlet Sufyan Abushaala Fluent UDF and Scheme Programming 0 July 10, 2014 07:52
Urgent! Help on UDF to set inlet velocity Ray Hong FLUENT 4 December 30, 2005 13:32
UDF for transient inlet velocity sharath FLUENT 2 September 14, 2004 00:37


All times are GMT -4. The time now is 02:36.