|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Mohammed Attya
Join Date: Jan 2014
Location: Egypt
Posts: 4
Rep Power: 12 ![]() |
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) } U1 => U at Z = 0 U2 => U at Z = 20 U3 => U at Z = 40
__________________
![]() ![]() |
|
![]() |
![]() |
![]() |
Tags |
rectangular duct, turbulent, udf code, velocity profile |
|
|
![]() |
||||
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 07:33 |
UDF paraboloid velocity inlet | rosco | FLUENT | 10 | June 2, 2017 08:01 |
Establishing a UDF for turbulent velocity inlet | Sufyan Abushaala | Fluent UDF and Scheme Programming | 0 | July 10, 2014 06:52 |
Urgent! Help on UDF to set inlet velocity | Ray Hong | FLUENT | 4 | December 30, 2005 12:32 |
UDF for transient inlet velocity | sharath | FLUENT | 2 | September 13, 2004 23:37 |