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

UDF for two inlet boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2014, 15:57
Default UDF for two inlet boundary conditions
  #1
New Member
 
Diego
Join Date: Jul 2011
Posts: 21
Rep Power: 14
Diegoesteban is on a distinguished road
Hi!
I need a UDF to define two inlet boundary conditions (mass flowrate and pressure) in a surface. Can anyone help please?
Diegoesteban is offline   Reply With Quote

Old   February 18, 2014, 02:22
Default
  #2
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14
A CFD free user is on a distinguished road
Hi,
You can do it using a DEFINE_PROFILE macro. First, flag the thread you want to define these two B.C and apply a f_loop macro over all the faces in the thread and finally prescribe your own formulas employing a predefined F_PROFILE macro. Have a look at the examples provided by Fluent. They can be useful.
Not complicated.

Here's an example:

#include "udf.h"
DEFINE_PROFILE(pressure_profile, t, i)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
face_t f;
begin_f_loop(f, t)
{
F_CENTROID(x,f,t);
y = x[1];
F_PROFILE(f, t, i) = 1.1e5 - y*y/(.0745*.0745)*0.1e5;
}
end_f_loop(f, t)
}
__________________
Regard yours
A CFD free user is offline   Reply With Quote

Old   February 19, 2014, 18:49
Default
  #3
New Member
 
Diego
Join Date: Jul 2011
Posts: 21
Rep Power: 14
Diegoesteban is on a distinguished road
thank you very much! I'll try to create the UDF!
Diegoesteban is offline   Reply With Quote

Reply

Tags
two inlet bc, 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
Implementation of boundary conditions for FVM Tom Main CFD Forum 7 August 26, 2014 05:58
Using Outlet and Inlet Boundary Conditions tylerplowright CFX 8 January 28, 2014 17:22
inlet boundary conditions newOFuser OpenFOAM 1 January 10, 2013 08:08
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 01:54


All times are GMT -4. The time now is 05:33.