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

[UDF] Relative coordinates in logarithmic velocity profile

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 19, 2009, 12:31
Default [UDF] Relative coordinates in logarithmic velocity profile
  #1
New Member
 
Join Date: Apr 2009
Posts: 14
Rep Power: 17
cfdworker is on a distinguished road
Hello, I have a problem with the definition of a boundary condition with UDF to simulation of the wind in a terrain. I have to define a velocity inlet in a 3d domain; this condition is a logarithmic velocity profile. I can define the logarithmic velocity profile with UDF, like this:



#include "udf.h"

DEFINE_PROFILE(log_velocity,thread,index)
{
real x[ND_ND];
real z;
face_t f;

begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);
z = x[2];
F_PROFILE(f,thread,index) = 3*log(z/0.01)/log(10/0.01);
}
end_f_loop(f,thread)
}


My domain is this:



I have to impose the logarithmic profile in the front face that is shown in figure.
My question is how I define in the UDF so that the velocity in bottom of the face is equal 0.
My problem is the coordinates that I use in UDF are absolute and I don’t know how to define relative coordinates, in order to the z in the equation that defines the velocity profile, is the height relatively to the bottom of the face and not the absolute height.

I would appreciate any suggestions.

Last edited by cfdworker; April 23, 2009 at 20:39.
cfdworker 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
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 12 August 7, 2017 06:25
[boundary condition] logarithmic velocity profile cfdworker FLUENT 2 April 17, 2009 23:36
maintaining a logarithmic velocity distribution Morten Andersen CFX 1 January 8, 2007 11:37
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 02:13
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 15:12.