I am interested in considering nonuniform boundary conditions in my computations (e.g., a laminar Blasius boundary layer inflow condition along the free stream flow condition). Please can you specify the file name you described and how to use it?

This thread actually belongs in preprocessing. Anyway, Chen actually describes the basics of how to set your boundary conditions. It is however a bit difficult to understand for a beginner. Let me, as a slightly more than beginner try to help you in a more detailed way (there might be other solutions also):

It is unlikely that there is such a boundary condition already implemented and distributed in OpenFoam. You will have to implement it yourself. This goes at least for less common bc's.

A suggestion on how to implement the steady bc (reads 0 and overwrites 0):

Step 1:
Copy the source directory of the particular solver that you want to use to your personal applications directory. For instance:
mkdir ~/OpenFOAM/hani-1.2/applications (if you don't have it)
cp -r OpenFOAM/OpenFOAM-1.2/applications/solvers/incompressible/simpleFoam ~/OpenFOAM/hani-1.2/applications/

Step 2:
Rename your copied directory to something that makes sence, for instance:
mv ~/OpenFOAM/hani-1.2/applications/simpleFoam ~/OpenFOAM/hani-1.2/applications/blasiusBC
Rename the .C-file in your blasiusBC directory to blasiusBC.C
Edit blasiusBC.C: Insert correct descriptions for Application and Description in the header of the file, for clarity. Remove everything in the main function except the include statements in the beginning. You may later on check which ones you actually need by commenting them and try to compile. The compiler error messages will guide you.

Step 3:
Implement your bc's using the directives that Chen gave you. This should be located after the include statements in the main function.
Write out the variables you have changed at the end of the main function:
// Force the write
U.write();
k.write();
epsilon.write();
phi.write();

> * Finaly if I want to read an experimental profile of the x component
> of the velocity Ux=f(y) which is in a file and interpolate those
> values on the mesh to apply them on the x component of my inlet
> boundary velocity field. Is it easy or not ?

This may not be the easiest or most accurate solution -
you could create a 1d mesh with cell centres at the locations of your experimental profile. The Ux data could then be the experimental data

you could then create another case with a 1d mesh the same as your boundary of your (2d?) case
you could then use mapFields to interpolate from the first mesh to the second

then copy the interpolated data to the boundary condition of your 2d case (assuming the mesh is numbered in the same way for both - you'll have to make sure of this when you generate the 1d mesh)

> PS: more a C++ question, please don't laugh !!!
> Why is there sometimes an & (like after VectorField) and sometimes
> not (like scalarField)

Now this is a REALLY good question. One it took me AGES to understand
when there is an & after a name of a class it means that you are not creating a new one, you are just referring to one that all ready exists. It is therefore a reference

Hello!
I'm trying to implement non uniform bc at the inlet, following the step by step method of Håkan (thank you, by the way )
i compile with wmake, it seems to work
then the command rehash doesn't exist
and finaly, when i do step7, it doesn't change the values in the 0 directory
i suppose it's due to many mistake in c++
so i will be happy if one of you could take time to help me and check it

here is what i wrote in the main of the .c file, after all the include

Some time ago already, however I am experiencing the same problem. The error from Fabian is however caused by the fact that (probably) the 0/U file has non-uniform and three lines of vectors in it already, while the field is supposed to have 2438 faces and thus 2438 entries.
I think you have to include initContinuityErrs.H
However, even after this I am still not able to get things work. Changes are made to the internalFieldValues but not to boundary patches.

Ok, I finally get it working. A small utility that is able to set nonuniform boundary conditions. For my case it is programmed to set gamma at 1 if Z coordinate is <0>0. However, users will be able to modify themselve.
The code is based on snippets found on this forum and very much resembles snippets in this thread. however 1 to 1 copying failed in my case. So here the full directory. hope it is useful for others.

But it seems that refers to cell volume values. I need the face values. Searching in the files (solvers) I found something like that: fvVectorMatrix divR = turbulence->divDevReff(U);
and I think that what I'm looking for is something like this.

I have a simple geometry, which I model as a 2-phase liquid flow with interFoam solver. So far I have set boundary conditions manually using a text editor but it's just easier to have a function via command line at hand in order to do so.

Thus I followed the thread by on setBoundaryGamma and worked myself through it:

I have the experience that similar error messages can be due to very stupid small writing errors, either in filenames or e.g. patch names, or files being in the wrong place. Maybe it's something like this... Though it can be something completly else as well.