# UDF for 3D parabolic Inlet Profile

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

 July 18, 2016, 22:27 UDF for 3D parabolic Inlet Profile #1 New Member   Sineth Join Date: May 2016 Location: Dundee, UK Posts: 6 Rep Power: 8 Hi Everyone, I'm trying to create a fully developed inlet parabolic velocity profile, using Poiseuille flow equation v=vmax(1-(r/r)^2). I have created the following UDF, but I'm not quite sure whether it is 100% as I'm quite new to this area. Especially, defining the time. Can someone please correct me if it is wrong or something is missing? It will be a massive help. #include "udf.h"//file that contains definitions for define functions and fluent operations DEFINE_PROFILE(inlet_para_velocity,th,i) { float x[ND_ND]; /* an array for the coordinates */ float xx, y, r; face_t f; /* f is a face thread index */ r = 0.00314; /* inlet radius in m */ begin_f_loop(f,th) { double t = (CURRENT_TIME*2-floor(CURRENT_TIME*2))/2; //t is the local time within each period F_CENTROID(x,f,th); xx = x[0]; /* x coordinate */ y = x[1]; /* y coordinate */ F_PROFILE(f,th,i) = 0.254*(1.-(xx*xx+y*y)/(r*r)); } end_f_loop(f,th) } Regards

July 18, 2016, 22:36
#2
New Member

Sineth
Join Date: May 2016
Location: Dundee, UK
Posts: 6
Rep Power: 8
Actually, I have attached the inlet contour after running the simulation for 0.5s and it is clearly not what I need, I need the maximum velocity at the centre. Hope someone can help.
Attached Images
 2016-07-19.jpg (119.8 KB, 68 views)

 October 2, 2018, 09:57 #3 New Member   ismail demirkıran Join Date: Jul 2017 Posts: 4 Rep Power: 7 F_PROFILE(f,th,i) = 0.254*(1.-(sqrt(xx*xx+y*y))/(r*r)); I think 'sqrt' should be added due to obtain parabolic or pauiseille flow velocity inlet condition.

 Tags 3d flow, parabolic inlet, poiseuille flow, udf