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

UDF for 3d inlet parabolic velocity profile ?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By dust_2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2011, 07:52
Question UDF for 3d inlet parabolic velocity profile ?
  #1
New Member
 
snowman
Join Date: Apr 2011
Posts: 15
Rep Power: 15
shahzeb irfan is on a distinguished road
hi every body......

i want to use a udf which gives me parabolic velocity profile at inlet.
my case is a pipe flow and i have made a model with its face at X-Z face and its length extends in the + ive y direction.

can anybody please help me on this ?
shahzeb irfan is offline   Reply With Quote

Old   June 17, 2011, 09:28
Default
  #2
New Member
 
Johney Grey
Join Date: May 2011
Posts: 6
Rep Power: 14
dust_2 is on a distinguished road
The UDF manual has a 2D parabolic inlet example. You just need to change that example a little bit.
dust_2 is offline   Reply With Quote

Old   June 18, 2011, 18:10
Default
  #3
Member
 
Nuno Gomes
Join Date: May 2009
Location: Portugal
Posts: 39
Rep Power: 16
Dinocrack is on a distinguished road
I try to find in manual, but didnt appear.

How could be when your inlet face is not coincident with the axis?

How it works for the case on picture?for example, for and angle of 50º...

i want to understand how works the x[ND_ND] vector....or array

any help

Plz!!!
Attached Images
File Type: jpg ex.jpg (10.0 KB, 247 views)
Dinocrack is offline   Reply With Quote

Old   June 19, 2011, 10:43
Default
  #4
New Member
 
Johney Grey
Join Date: May 2011
Posts: 6
Rep Power: 14
dust_2 is on a distinguished road
Quote:
Originally Posted by Dinocrack View Post
I try to find in manual, but didnt appear.

How could be when your inlet face is not coincident with the axis?

How it works for the case on picture?for example, for and angle of 50º...

i want to understand how works the x[ND_ND] vector....or array

any help

Plz!!!
This the manual example:

#include "udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
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];
F_PROFILE(f, thread, position) = 20. - y*y/(.0745*.0745)*20.;
}
end_f_loop(f, thread)
}


For 2D case, the X[ND_ND] has X[0] for axis x and X[1] for axis y.
For 3D case, the X[ND_ND] has X[0] for axis x, X[1] for axis y and X[2] for axis z.

If your inlet is not coincident with the axis you need to calculate the distance between certain point on the inlet surface and inlet center.
dust_2 is offline   Reply With Quote

Old   June 22, 2011, 11:27
Default
  #5
Member
 
Nuno Gomes
Join Date: May 2009
Location: Portugal
Posts: 39
Rep Power: 16
Dinocrack is on a distinguished road
thank for your reply. So you telling me that we need to know the position point of inlet center?
Dinocrack is offline   Reply With Quote

Old   June 23, 2011, 08:28
Default
  #6
New Member
 
Johney Grey
Join Date: May 2011
Posts: 6
Rep Power: 14
dust_2 is on a distinguished road
You need coordinate transformation at first then you can process it as the inlet face coincident with the axis.

wiki page for coordinate transformation:
http://en.wikipedia.org/wiki/Coordin...dinate_systems
dust_2 is offline   Reply With Quote

Old   June 23, 2011, 16:40
Default
  #7
Member
 
Nuno Gomes
Join Date: May 2009
Location: Portugal
Posts: 39
Rep Power: 16
Dinocrack is on a distinguished road
thank again for your answer.

I already solve the problem. Was a geometric construction of the reactor.

But to solve this kind of UDF's we need to rotate the axis and then see see the coordinates.

Thank again
Dinocrack is offline   Reply With Quote

Old   December 6, 2015, 07:36
Default
  #8
New Member
 
Mr Saba
Join Date: Nov 2015
Posts: 2
Rep Power: 0
Mr.Saba is on a distinguished road
Quote:
Originally Posted by Dinocrack View Post
thank again for your answer.

I already solve the problem. Was a geometric construction of the reactor.

But to solve this kind of UDF's we need to rotate the axis and then see see the coordinates.

Thank again
Hi Dino, Actually it is about 7 years after you post but I exactly need the UDF for the parabolic laminar velocity inlet in an Inclined tube exactly as yours probably only with difference in slope! As I am really in hurry, if by any chance you have the UDF code for it, and it is OK for you to give me the code that I can modify it, it would be awesome! Unfortunately I have only a simple Experience with UDF.

Thanks in advance
Mr.Saba is offline   Reply With Quote

Old   December 7, 2015, 07:52
Default
  #9
Senior Member
 
Bruno
Join Date: Mar 2009
Location: Brazil
Posts: 277
Rep Power: 21
brunoc is on a distinguished road
If you're in a hurry and you have no experience in UDF, what you should do instead is write a profile for the velocity based on (x,y,z) positions and use that as a boundary condition.

Fluent has a few tutorials explaining how to use profiles. The documentation will also help you.

Cheers
brunoc is offline   Reply With Quote

Old   March 24, 2016, 05:36
Default
  #10
New Member
 
Yu Lu
Join Date: Jul 2015
Location: England
Posts: 26
Rep Power: 10
yulu is on a distinguished road
Quote:
Originally Posted by brunoc View Post
If you're in a hurry and you have no experience in UDF, what you should do instead is write a profile for the velocity based on (x,y,z) positions and use that as a boundary condition.

Fluent has a few tutorials explaining how to use profiles. The documentation will also help you.

Cheers
Hi Bruno, sorry to dig this ancient post, I actually encountered this problem that I want a 3D parabolic velocity inlet but I don't have any experience using UDF, can you please where to find the the tutorials you mentioned about writing velocity profile based on positions ?Thanks a lot.
yulu is offline   Reply With Quote

Old   March 28, 2016, 15:00
Default
  #11
Senior Member
 
Bruno
Join Date: Mar 2009
Location: Brazil
Posts: 277
Rep Power: 21
brunoc is on a distinguished road
Hi yulu,
Visit the ANSYS Customer Portal and search for "fluent udf tutorial" in there.
brunoc 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
(ask) how to create UDF for inlet velocity profile sincity Fluent UDF and Scheme Programming 83 May 16, 2022 13:04
FSI- Pipe- uniform velocity profile inlet Absy Main CFD Forum 0 April 6, 2010 03:01
non uniform velocity profile at inlet hiba FLUENT 2 July 25, 2006 03:32
UDF problem : inlet velocity in cyl. coord. system Jongdae Kim FLUENT 0 June 15, 2004 11:21
inlet velocity profile in Polyflow srinu FLUENT 0 January 16, 2003 20:25


All times are GMT -4. The time now is 11:14.