CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   boundary values (

OFU August 5, 2011 05:10

boundary values

can anybody tell me where the boundary values in OpenFOAM are set? Are the specified in the middle of the boundary cells, in the middle of the surfaces or in the boundary points of the boundary cells or ....? And how can I set there the values for the pressure and the velocity?


m2montazari August 5, 2011 06:56

hi Jennifer,
I dont have enough info about that but I know that values are usually set at boundary faces not cells. however I dont know values are set in boundary nodes or at the middle of boundary faces? I read in a paper that openfoam is cell-based solver. if this is true, values should be set in boundary face centres.

bigbang August 8, 2011 14:37

I am new to openFOAM, but I just wrote a program with some borrowed code from the forum to set up non uniform boundary values.

It is my understanding that the value is stored at the center of each cell face.

Hope this helps.

OFU August 9, 2011 03:43


thanks for your answers, bigbang and m2montazari.

Bigband, is there a possibilty to get the code you wrote from you?


bigbang August 9, 2011 06:27

The thread where I got the code and then troubleshooted it for openfoam 2.0.0 is here:

Good luck

All times are GMT -4. The time now is 07:02.