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

Parabolic velocity profile in 3d with UDF

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By mmk3818
  • 2 Post By Tharanga

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2016, 15:12
Post Parabolic velocity profile in 3d with UDF
  #1
New Member
 
Join Date: Apr 2016
Posts: 5
Rep Power: 10
mmk3818 is on a distinguished road
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.
Attached Images
File Type: jpg 1.jpg (50.6 KB, 343 views)
File Type: jpg 2.jpg (62.5 KB, 258 views)
File Type: jpg 3.jpg (60.8 KB, 206 views)
Attached Files
File Type: c UDF.C (409 Bytes, 345 views)
amirlachraf likes this.
mmk3818 is offline   Reply With Quote

Old   August 21, 2016, 18:35
Default
  #2
New Member
 
Tharanga Jayathungage Don
Join Date: Sep 2014
Location: Auckland
Posts: 25
Rep Power: 11
Tharanga is on a distinguished road
Send a message via Skype™ to Tharanga
Quote:
Originally Posted by mmk3818 View Post
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"
DEFINE_PROFILE(inlet_x_velocity, thread, index)
{
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*/
{
F_CENTROID(x,f,thread);
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)));
}
end_f_loop(f, thread)
}
*****Axis is on the X direction
MilkyRickie and TrevorLS like this.
Tharanga is offline   Reply With Quote

Reply

Tags
fluent - udf, velocity profile, workbench 16


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 3d inlet parabolic velocity profile ? shahzeb irfan Fluent UDF and Scheme Programming 10 March 28, 2016 15:00
unable to get parabolic velocity profile with pimplefoam houkensjtu OpenFOAM 4 October 8, 2012 04:41
Parabolic Inlet velocity UDF parse error Musa Fluent UDF and Scheme Programming 1 August 29, 2012 01:37
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 11:21
UDF component in Cyliderical Velocity? Hongchan Kim FLUENT 3 April 24, 2001 12:20


All times are GMT -4. The time now is 07:37.