# Parabolic velocity profile in 3d with UDF

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

June 29, 2016, 15:12
Parabolic velocity profile in 3d with UDF
#1
New Member

Join Date: Apr 2016
Posts: 5
Rep Power: 10
Hi,
I am trying to get parabolic velocity at circular inlet of the pipe(figures and UDF code attached). Ideally velocity contour at inlet should show maximum velocity at center then decreasing towards outer side. But i am getting that in only one plane. Any suggestions to solve that?
In attachments, image1 is vel contour at inlet, images 2 and 3 are the same at planes perpendicular to each other and in the pipe along its length.
Attached Images
 1.jpg (50.6 KB, 343 views) 2.jpg (62.5 KB, 258 views) 3.jpg (60.8 KB, 206 views)
Attached Files
 UDF.C (409 Bytes, 345 views)

August 21, 2016, 18:35
#2
New Member

Tharanga Jayathungage Don
Join Date: Sep 2014
Location: Auckland
Posts: 25
Rep Power: 11
Quote:
 Originally Posted by mmk3818 Hi, I am trying to get parabolic velocity at circular inlet of the pipe(figures and UDF code attached). Ideally velocity contour at inlet should show maximum velocity at center then decreasing towards outer side. But i am getting that in only one plane. Any suggestions to solve that? In attachments, image1 is vel contour at inlet, images 2 and 3 are the same at planes perpendicular to each other and in the pipe along its length. Thanks in advance.
This should work cheers
#include "udf.h"
#include "math.h"
{
real x[ND_ND]; /* this will hold the position vector */
real y;
real z;
real a;
face_t f;
begin_f_loop(f, thread) /*loops over all faces in the thread passed in the DEFINE macro argument*/
{
y =x[1];
z =x[1];
a = pow((pow(y,2)+pow(z,2)),0.5);
F_PROFILE(f, thread, index) = 2*0.00000491976*(1- (a*a/(0.10214*0.10214)));
}
}
*****Axis is on the X direction

 Tags fluent - udf, velocity profile, workbench 16