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

problem with udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2011, 10:12
Default problem with udf
  #1
New Member
 
Harpreet
Join Date: May 2011
Posts: 21
Rep Power: 15
Harpreet is on a distinguished road
hello,

pls help

i am trying to vary the inlet velocity profile for which i have made a following udf
#include "udf.h"
DEFINE_PROFILE(variable_velocity,t,i)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
y=x[1];
F_PROFILE(f,t,i)=7.36+0.368*y;
}
end_f_loop(f,t)
}
but the problem with it is that it is giving a constant velocity at the inlet that is 7.36. I think that probably it is not taking the coordinate into the equation.

pls help me. its urgent
Harpreet is offline   Reply With Quote

Old   September 8, 2011, 11:32
Default
  #2
Member
 
pranab_jha's Avatar
 
Pranab N Jha
Join Date: Nov 2009
Location: Houston, TX
Posts: 86
Rep Power: 17
pranab_jha is on a distinguished road
Did you check your units? Also, is your inlet parallel to Y-axis or X?
Just suggestions though. I don't know about your case file.
pranab_jha is offline   Reply With Quote

Old   September 8, 2011, 13:59
Default
  #3
New Member
 
Harpreet
Join Date: May 2011
Posts: 21
Rep Power: 15
Harpreet is on a distinguished road
yes i checked the unit, but don't know what effect will the inlet direction would make on the udf. although it is parallel to x axis
Harpreet is offline   Reply With Quote

Old   September 8, 2011, 14:05
Default
  #4
Member
 
pranab_jha's Avatar
 
Pranab N Jha
Join Date: Nov 2009
Location: Houston, TX
Posts: 86
Rep Power: 17
pranab_jha is on a distinguished road
Your profile varies with y and not x. Hence, the result will be a constant on the inlet when the inlet is aligned to the x-direction. Interchange the x and y coordinates.
pranab_jha is offline   Reply With Quote

Old   September 8, 2011, 14:27
Default
  #5
New Member
 
Harpreet
Join Date: May 2011
Posts: 21
Rep Power: 15
Harpreet is on a distinguished road
thank u for ur reply
i tried with interchanging x & y, but still i am getting constant velocity
Harpreet is offline   Reply With Quote

Old   September 8, 2011, 15:13
Default
  #6
New Member
 
Harpreet
Join Date: May 2011
Posts: 21
Rep Power: 15
Harpreet is on a distinguished road
when i try to read the mesh with scaling in M units, it is showing the variation, but when i try to read the file in mm units its showing constant velocity. why it is show
Harpreet is offline   Reply With Quote

Old   September 8, 2011, 15:13
Default
  #7
New Member
 
Harpreet
Join Date: May 2011
Posts: 21
Rep Power: 15
Harpreet is on a distinguished road
when i try to read the mesh with scaling in M units, it is showing the variation, but when i try to read the file in mm units its showing constant velocity. why it is so. pls help me i am new to fluent
Harpreet is offline   Reply With Quote

Old   September 9, 2011, 11:25
Default
  #8
Senior Member
 
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 16
m2montazari is on a distinguished road
hi,
it is a dupplicated thread!
if you have a function 7.36+0.368*y and the variation of y is about 10 mm then the variation of velocity would be about 0.0037 and you may think a constant velocity is set in inlet. but if the variation of y is about 10 m then variation of velocity would be about 0.3 and you will see a linear velocity profile in inlet easily.
just think about that
yours,
mohammad
m2montazari is offline   Reply With Quote

Old   September 11, 2011, 01:51
Default
  #9
New Member
 
Harpreet
Join Date: May 2011
Posts: 21
Rep Power: 15
Harpreet is on a distinguished road
thank you for ur answer. i am obliged
Harpreet 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
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 40 March 18, 2018 07:05
Problem with my udf july Fluent UDF and Scheme Programming 3 June 20, 2010 07:56
UDF problem mansha goraya FLUENT 0 October 29, 2007 01:31
udf compiling problem akr FLUENT 3 August 22, 2007 08:14
UDF problem chiseung FLUENT 4 January 10, 2002 10:58


All times are GMT -4. The time now is 22:08.