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

Fluent does not recognize my UDF for velocity profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2012, 05:37
Default Fluent does not recognize my UDF for velocity profile
  #1
New Member
 
selim
Join Date: Sep 2009
Location: UK
Posts: 19
Rep Power: 16
salihovic is on a distinguished road
Dear all,

I want to impose a velocity at the inlet which is parabolic at the bottom and top and constant in the middle of the inlet. But flunet does not regonize the locations correctly, so what is wrong in my UDF, pls help!!

Here is my udf,


#include "udf.h"
#define S 0.038
#define V1 10.86


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];
if (y<=S)
F_PROFILE(f, thread, index) = 249.384*y*y+249.384*y;

else if (S<=y<=3*S)
F_PROFILE(f, thread, index) = V1;
else if (3*S<=y<=4*S)
F_PROFILE(f, thread, index) = -83.514*y*y-83.514*y+14.6238;


}
end_f_loop(f, thread)
}


Thank you,
-Selim
salihovic is offline   Reply With Quote

Old   September 10, 2012, 06:27
Default
  #2
Senior Member
 
Bionico's Avatar
 
Flavio
Join Date: Sep 2011
Location: Brescia, Italy
Posts: 181
Rep Power: 15
Bionico is on a distinguished road
Hi Selim,
I'm not very expert in programming but I'm doubtful about the logical condition of the IF command: y<=S in the first case, in the other I would put S<y, not S<=y, because when y=S I don't know if Fluent uses the first without error
__________________
Bionico
Bionico 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
Help please! UDF for Temperature profile in 3D subhankar_bhandari Fluent UDF and Scheme Programming 2 August 16, 2010 08:37
UDF in Fluent subha_meter Main CFD Forum 0 October 17, 2009 23:54
Compiling UDF in Fluent 12 jsm FLUENT 1 July 22, 2009 07:40
UDF problem caused by various version of Fluent Yurong FLUENT 3 January 15, 2006 10:57
UDF of Zimont model in fluent Z Main CFD Forum 0 February 17, 2005 03:07


All times are GMT -4. The time now is 03:25.