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

Define velocity profile for cavity

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 4, 2014, 15:28
Default Define velocity profile for cavity
  #1
New Member
 
arrif toufik
Join Date: Apr 2009
Posts: 9
Rep Power: 17
arriftou is on a distinguished road
Hi
I m trying to write a UDF for a velocity profile for a cavity problem. The velocity profile is only in the horizontal direction(x direction) like : =-4340.4Z2+8608.2Z-4267 (see figure attached)
But im new in udf programming
I was found some examples in fluent tutorial like this
/************************************************** ***********************/
/* udfexample.c */
/* UDF for specifying a steady-state velocity profile boundary condition */
/************************************************** ***********************/

#include "udf.h"


DEFINE_PROFILE(inlet_x_velocity, thread, index)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f, thread, index) = 20. - y*y/(.0745*.0745)*20.;
}
end_f_loop(f, thread)
}

But must I applic this code simply?
Please can anyone help me?
arriftou is offline   Reply With Quote

 


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 inlet velocity profile Bollonga Fluent UDF and Scheme Programming 4 June 29, 2021 04:40
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 9 June 25, 2016 19:08
Velocity profile boundary condition Tuca FLOW-3D 1 April 23, 2013 12:02
How to apply an outlet velocity profile to another inlet? siw FLUENT 4 April 10, 2013 11:19
Velocity Profile Jeff FLUENT 1 November 24, 2008 08:21


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