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

Log Profile UDF for FLUENT

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2016, 13:53
Default Log Profile UDF for FLUENT
  #1
New Member
 
U.S
Join Date: Jan 2016
Posts: 16
Rep Power: 10
sariug is on a distinguished road
Hello everyone. For my wind analysis I am trying to implant an udf for inlet boundry condition. However its not working as i expected. I expected a log profile but its constant. Can anyone see the bug ? Thanks in advance.





#include "udf.h"
/* BOUNDARY PROFILES FOR WIND SPEED Uref = 10 m/s */
/* ROUGHESS LENGTH yo= 0.5 m */
real v = 10;
real uf = 1.38;
real yo = 0.5;
/* CALCULATION OF THE PROFILE FOR HORIZONTAL WIND SPEED */
DEFINE_PROFILE(vel, thread, nv) /* function name, thread and variable number */
{ face_t f;
real x[ND_ND];
real y;
begin_f_loop (f,thread)
{
F_CENTROID(x,f,thread);
y=x[1];
F_PROFILE(f,thread,nv) = (uf/(0.42))*log((y+11+yo)/yo);
}
end_f_loop(f,thread)
}
/* CALCULATION OF THE PROFILE FOR TURBULENT KINETIC ENERGY */
DEFINE_PROFILE(tke, thread, nv) /* function name, thread and variable number */
{
face_t f;
real x[ND_ND];
real y;
begin_f_loop (f,thread)
{
F_CENTROID(x,f,thread);
y=x[1];
F_PROFILE(f,thread,nv) = 3.33*(uf*uf);
}
end_f_loop(f,thread)
}
/* CALCULATION OF THE PROFILE FOR TURBULENCE DISSIPATION RATE */
DEFINE_PROFILE(eps, thread, nv) /* function name, thread and variable number */
{
face_t f;
real x[ND_ND];
real y;
begin_f_loop (f,thread)
{
F_CENTROID(x,f,thread);
y=x[1];
F_PROFILE(f,thread,nv) = (uf*uf*uf)/(0.42*(yo+x[2]+11));
}
end_f_loop(f,thread)
}
sariug is offline   Reply With Quote

Old   August 9, 2016, 01:45
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
Can you replace
Code:
real v = 10;
real uf = 1.38;
real yo = 0.5;
With the following and try again
Code:
#define v  10
#define uf 1.38
#define yo 0.5
vasava is offline   Reply With Quote

Old   August 15, 2016, 05:58
Default
  #3
New Member
 
U.S
Join Date: Jan 2016
Posts: 16
Rep Power: 10
sariug is on a distinguished road
It did not work. Do you have any other suggestion ?
sariug is offline   Reply With Quote

Reply

Tags
fluent, udf


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
Accessing profile data from a UDF ral007 Fluent UDF and Scheme Programming 1 October 14, 2015 09:21
Read profile file from UDF DonQuijote Fluent UDF and Scheme Programming 0 February 18, 2013 11:56
udf for velocity profile in a geometry having two inlets shubham208011 Fluent UDF and Scheme Programming 0 April 6, 2009 15:13
UDF :Unsteady concentration profile umesh FLUENT 4 July 13, 2003 17:07
UDF update profile ramesh FLUENT 0 June 29, 2003 14:14


All times are GMT -4. The time now is 16:32.