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

3d velocity profile

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By blackmask

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2018, 18:43
Default 3d velocity profile
  #1
New Member
 
mehran mohammadi
Join Date: Aug 2016
Posts: 13
Rep Power: 10
mehran.mo is on a distinguished road
hi all

I'm working on curvature inlet that upload its picture below .i want to define 3d velocity profile for inlet. my flow is turbulence and my udf is written below

#include "udf.h"
#define ymin 0.03031
#define ymax 0.03500
#define umean 12.5
#define B 1/7

DEFINE_PROFILE(x_velocity,t,i)
{
real x[ND_ND],y,h_y,del_y,ufree;
face_t f;
h_y=ymax-ymin;
del_y=h_y*0.5;
ufree=umean*(B+1);
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y = x[1];
if((y-ymin)<=del_y)
F_PROFILE(f,t,i)= -1*(ufree*pow((y-ymin)/del_y,B));
else
F_PROFILE(f,t,i)= -1*(ufree*pow((h_y-(y-ymin))/del_y,B));
}
end_f_loop(f,t)
}
i chose a component type for velocity inlet and give this udf as a x velocity profile and set 0 for other component but fluent set a profile that upload its picture blow ( my profile vector must be in x direction but it is not)

I was wondering if someone could point me in the right direction on implementing this function for this particular case
Untitled.jpg

geom.jpg

profile.jpg
mehran.mo is offline   Reply With Quote

Old   August 27, 2018, 02:03
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
You inlet boundary is parallel to z-axis, why do you assign x-velocity instead of z-velocity? Another problem is in the implementation. In C language if you do two integers division 1/7 you will get an integer 0, which might not what you have intended. Please use floating point division (1.0/7) instead.
mehran.mo likes this.
blackmask is offline   Reply With Quote

Old   September 10, 2018, 06:29
Default
  #3
New Member
 
mehran mohammadi
Join Date: Aug 2016
Posts: 13
Rep Power: 10
mehran.mo is on a distinguished road
hi black mask thank you for replying it has been working
mehran.mo is offline   Reply With Quote

Reply


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] Relative coordinates in logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 25 July 13, 2017 03:44
InterFoam - Validation for velocity profile in simple channel me.ouda OpenFOAM Running, Solving & CFD 0 October 19, 2015 06:42
Logarithmic velocity profile cfdworker Fluent UDF and Scheme Programming 0 April 23, 2009 19:09
[boundary condition] logarithmic velocity profile cfdworker FLUENT 2 April 17, 2009 23:36
Prescribed inflow velocity profile - how to? Alan Main CFD Forum 10 October 28, 2005 12:14


All times are GMT -4. The time now is 23:24.