|
[Sponsors] |
February 17, 2014, 16:57 |
UDF for two inlet boundary conditions
|
#1 |
New Member
Diego
Join Date: Jul 2011
Posts: 21
Rep Power: 15 |
Hi!
I need a UDF to define two inlet boundary conditions (mass flowrate and pressure) in a surface. Can anyone help please? |
|
February 18, 2014, 03:22 |
|
#2 |
Senior Member
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14 |
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 |
|
February 19, 2014, 19:49 |
|
#3 |
New Member
Diego
Join Date: Jul 2011
Posts: 21
Rep Power: 15 |
thank you very much! I'll try to create the UDF!
|
|
Tags |
two inlet bc, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implementation of boundary conditions for FVM | Tom | Main CFD Forum | 7 | August 26, 2014 06:58 |
Using Outlet and Inlet Boundary Conditions | tylerplowright | CFX | 8 | January 28, 2014 18:22 |
inlet boundary conditions | newOFuser | OpenFOAM | 1 | January 10, 2013 09:08 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |
Boundary conditions? | Tom | Main CFD Forum | 0 | November 5, 2002 02:54 |