# Velocity profile boundary condition at inlet

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

 June 28, 2016, 17:10 Velocity profile boundary condition at inlet #1 Member   Sheikh Ahmed Join Date: Dec 2015 Location: South Carolina, USA Posts: 88 Rep Power: 10 Hello Foamers I have a basic question of which you probably know the answer- suppose I have a radial velocity profile, say a fully-developed parabolic velocity profile, and I want to use this profile as my inlet boundary condition. How can I add this profile as my boundary. This can be by reading magU Vs. Z values from a file, or by reading a parabolic function (z-dependent) or by any other way. I am quite sure someone of us used this or similar boundary in his/her works. Please suggest me to figure out this. Thanks in advance.

June 29, 2016, 03:51
#2
New Member

Justin Wiegmann
Join Date: Aug 2015
Posts: 20
Rep Power: 10
Quote:
 Originally Posted by sahmed Hello Foamers I have a basic question of which you probably know the answer- suppose I have a radial velocity profile, say a fully-developed parabolic velocity profile, and I want to use this profile as my inlet boundary condition. How can I add this profile as my boundary. This can be by reading magU Vs. Z values from a file, or by reading a parabolic function (z-dependent) or by any other way. I am quite sure someone of us used this or similar boundary in his/her works. Please suggest me to figure out this. Thanks in advance.
Hi sahmed,

It is quite easy with groovyBC from swak4Foam package, which you could download here.

The BC could then looks like (parabolic with velocity in x-direction):

Code:
```Inlet
{         type                         groovyBC;
value                        uniform (1 0 0);
variables                    "Um=1; ypos=pos().y; zpos=pos().z; h=-max(pts().z); c1=-Um/(h*h); c2=Um;";
fractionExpression           "1";
valueExpression              "vector(c1 * ((ypos*ypos)+(zpos*zpos)) + c2, 0, 0)"; }```
I think the definition is self-explanatory.

Regards
JW