CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF - Inlet Velocity Profile (Ansys Fluent) (https://www.cfd-online.com/Forums/fluent-udf/157570-udf-inlet-velocity-profile-ansys-fluent.html)

vinayak4399 August 2, 2015 08:18

UDF - Inlet Velocity Profile (Ansys Fluent)
 
Hi Everyone,
I want to write a UDF at inlet with velocity profile of fully developed flow.
The geometry is 3D, having 25.4 mm inlet diameter & free stream velocity is 1 m/s.

Also in case of pressure inlet or mass flow inlet boundary condition , there is no need to put velocity profile.
Then how we can say that flow is hydrodynamically fully developed.

It would be helpful to me , If any one gives solution.
Thanks.

acalado June 26, 2020 17:04

Check the below

Quote:

/************************************************** *********************
vprofile.c
UDF for specifying steady-state velocity profile boundary condition
************************************************** **********************/

#include "udf.h"

DEFINE_PROFILE(inlet_x_velocity, thread, position)
{
real x[ND_ND]; /* this will hold the position vector */
real y, h;
face_t f;

h = 0.016; /* inlet height in m */

begin_f_loop(f,thread)
{
F_CENTROID(x, f, thread);
y = 2.*(x[1]-0.5*h)/h; /* non-dimensional y coordinate */
F_PROFILE(f, thread, position) = 0.1*(1.0-y*y);
}
end_f_loop(f, thread)
}
https://www.afs.enea.it/project/nept...df/node243.htm

kaboka August 25, 2020 10:27

Quote:

Originally Posted by acalado (Post 776195)


Hello acalado,

I am also working on a Define_Profile velocity, my case is very similar with that problem but I don't get why they define an extra "h" and put that into the definition of "y". Do you know how the code works in that system and do we have to define the position of coordinate vectors like that or is it enough to say y = x [1] and insert that code into inlet boundary condition Does UDF understand where is the [0,0] point of my coordinates? Would be very appreciated if you answer. Thanks.

Best regards,
Bora

acalado August 25, 2020 14:15

Quote:

Originally Posted by kaboka (Post 781295)

Hello acalado,

I am also working on a Define_Profile velocity, my case is very similar with that problem but I don't get why they define an extra "h" and put that into the definition of "y". Do you know how the code works in that system and do we have to define the position of coordinate vectors like that or is it enough to say y = x [1] and insert that code into inlet boundary condition Does UDF understand where is the [0,0] point of my coordinates? Would be very appreciated if you answer. Thanks.

Best regards,
Bora

The y should be x[1] with global system coordinates you have in your geometry but this should be easy to check. The h parameter is just the height of the channel which is used to scale the parabolic velocity profile.


All times are GMT -4. The time now is 00:46.