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

Udf for a fully developed velocity profile atinlet

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By AYOUB
  • 1 Post By vicarious
  • 1 Post By `e`

Reply
 
LinkBack Thread Tools Display Modes
Old   May 15, 2006, 13:55
Default Udf for a fully developed velocity profile atinlet
  #1
philip meppen
Guest
 
Posts: n/a
I need to specify a boundary condition at the inlet region of a square duct. At the inlet i want to specify a fully developed velocity profile. I know i need to use a UDF. The fluent manual gives examples of a fully developed velocity profile at the inlet for a 2d example but not 3d. Has anybody ever done this. would you be willing to send me your c code if you have?
  Reply With Quote

Old   May 16, 2006, 04:10
Default Re: Udf for a fully developed velocity profile ati
  #2
houston
Guest
 
Posts: n/a
Hi, meppen, I have met a question, it seems that you could help me.I don't know where can I find an example of a fully developed velocity profile at the inlet for a 2d example using UDF.Thanks in advance. sincerely, houston
  Reply With Quote

Old   May 26, 2006, 14:06
Default Re: Udf for a fully developed velocity profile ati
  #3
Colin
Guest
 
Posts: n/a
Philip,

click the following link:

http://www.cfd-online.com/Search/cgi...cfd-online.com%2FForum%2Ffluent;exclude=;config=htdig;method=and ;sort=score;words=velocity%20profile;page=1

and then read the post titled as:

Re: problem in 3d parabolic velocity profile****

You will get some ideas about the C code for 3D.

By the way, could you send me the c code for 2D fully developed velocity profile?

  Reply With Quote

Old   November 7, 2012, 05:47
Default Re: Udf for a fully developed velocity profile ati
  #4
New Member
 
Ayoub
Join Date: Nov 2012
Posts: 7
Rep Power: 6
AYOUB is on a distinguished road
Quote:
Originally Posted by philip meppen
;132225
I need to specify a boundary condition at the inlet region of a square duct. At the inlet i want to specify a fully developed velocity profile. I know i need to use a UDF. The fluent manual gives examples of a fully developed velocity profile at the inlet for a 2d example but not 3d. Has anybody ever done this. would you be willing to send me your c code if you have?
Hi, I need the UDF for 2D. would you pleas give me?
mustafa2iraq likes this.
AYOUB is offline   Reply With Quote

Old   November 7, 2012, 07:33
Default
  #5
Member
 
vicarious's Avatar
 
Pedram Mojtabavi
Join Date: Apr 2011
Location: Iran
Posts: 66
Rep Power: 7
vicarious is on a distinguished road
Send a message via Yahoo to vicarious
Example of a parabolic velocity profile in 2D:
************************************
#include "udf.h"
DEFINE_PROFILE(x_velocity,thread,index)
{
real x[ND_ND];
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)
}
*********************************************
Ref. : FLUENT UDF manual.
Mahesh7238 likes this.
vicarious is offline   Reply With Quote

Old   November 7, 2012, 10:49
Default thernall fully developed
  #6
New Member
 
Ayoub
Join Date: Nov 2012
Posts: 7
Rep Power: 6
AYOUB is on a distinguished road
thank you, but is it suitable to reach thermal fully developed?if not what is your suggestion?
AYOUB is offline   Reply With Quote

Old   November 7, 2012, 15:30
Default
  #7
Member
 
vicarious's Avatar
 
Pedram Mojtabavi
Join Date: Apr 2011
Location: Iran
Posts: 66
Rep Power: 7
vicarious is on a distinguished road
Send a message via Yahoo to vicarious
Quote:
Originally Posted by AYOUB View Post
thank you, but is it suitable to reach thermal fully developed?if not what is your suggestion?
I'm not exactly sure about the thermal boundary layer, but since the parabolic profile is suitable for the laminar flow boundary layer (for Re lower than 1000), I suppose it is correct to use it in a numerical procedure.
vicarious is offline   Reply With Quote

Old   October 8, 2015, 09:52
Default
  #8
New Member
 
Join Date: May 2012
Posts: 8
Rep Power: 6
CaptainCombo is on a distinguished road
Quote:
Originally Posted by vicarious View Post
Example of a parabolic velocity profile in 2D:
************************************
#include "udf.h"
DEFINE_PROFILE(x_velocity,thread,index)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f,thread)
{
F_CENTROID(x,f,thread);
y = x[1];
F_PROFILE(f,thread,index) = y;
}
end_f_loop(f,thread)
}
*********************************************
Ref. : FLUENT UDF manual.
I build this code and loaded it then I initialized this profile for inlet velocity but when I plot it by using Solution XY Plot(before solving, just initialization) I get uniform velocity profile. Velocity values don't change along y axis. What is the problem?

Here are values;
Quote:

(title "X Velocity")
(labels "Position" "X Velocity")

((xy/key/label "inlet")
5.73798 0
4.78165 2.86899
3.82532 2.86899
2.86899 2.86899
1.91266 2.86899
0.95633 2.86899
0 0
)

Last edited by CaptainCombo; October 8, 2015 at 13:16. Reason: Adding information
CaptainCombo is offline   Reply With Quote

Old   October 8, 2015, 15:17
Default
  #9
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 797
Rep Power: 9
`e` is on a distinguished road
Quote:
Originally Posted by CaptainCombo View Post
I build this code and loaded it then I initialized this profile for inlet velocity but when I plot it by using Solution XY Plot(before solving, just initialization) I get uniform velocity profile. Velocity values don't change along y axis. What is the problem?

Here are values;
Try solving at least one iteration and then checking the inlet velocity profile. If 2.86899 m/s is your average inlet velocity (and the previous step worked) then perhaps the Fluent initialisation applies this value, and then the profile is called at the start of each iteration.
CaptainCombo likes this.
`e` is offline   Reply With Quote

Old   October 12, 2015, 04:17
Default
  #10
New Member
 
Join Date: May 2012
Posts: 8
Rep Power: 6
CaptainCombo is on a distinguished road
Results after one iteration;

(title "Velocity Magnitude")
(labels "Position" "Velocity Magnitude")

((xy/key/label "inlet")
5.73798 0
4.78165 4.78165
3.82532 3.82532
2.86899 2.86899
1.91266 1.91266
0.95633 0.95633
0 0
)

It requires at least one iteration to update.
CaptainCombo is offline   Reply With Quote

Old   November 3, 2015, 16:56
Default udf
  #11
New Member
 
abdi mohamed
Join Date: Oct 2015
Location: algeria
Posts: 1
Rep Power: 0
abdi mohamed1 is on a distinguished road
I*need UDF velocity profile fully developed turbulent flow for cylinder 3d please.
abdi mohamed1 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF error - parabolic velocity profile - 3D turbine Zaqie Fluent UDF and Scheme Programming 9 June 25, 2016 19:08
Fully developed 3d velocity profile: Square inlet! Taru FLUENT 6 September 14, 2015 08:38
3D UDF Paraboilc Velocity Profile with max velocity johnGo Fluent UDF and Scheme Programming 1 January 4, 2011 22:45
udf for velocity profile in a geometry having two inlets shubham208011 Fluent UDF and Scheme Programming 0 April 6, 2009 15:13
UDF for square wave velocity profile..pls help Frederik FLUENT 0 May 8, 2006 06:48


All times are GMT -4. The time now is 10:09.