# cycle boundary condition for OpenFoam

Hello,

I have a simple box for a flow simulation with inlet and outlet normal to x-axis. normal to z-axis there are walls. And the sidewalls normal to the y-axis are supposed to have later in OpenFoam cycle boundary conditions.

OpenFoam needs coincident nodes on both sidewalls for the cycle boundary condition. How can I achieve that in Salome?

Thank you very much!!

/Yato

Sorry. I mean of course **cyclic** boundary conditions.

I still would be glad for some help on this issue....

Hello,

If you need for each node of a face to be in relation to a node on the opposite face, you have to use "Projection 2D" algorithm: http://docs.salome-platform.org/salome_6_5_0/gui/SMESH/projection_algos_page.html

Define a submesh on the opposite face, with the base face as source face. You can leave the other parameters blank.

If the nodes of the faces wires are not in vis-à-vis, you should use "Projection 1D-2D" instead.

Chrys

*--> FOAM FATAL ERROR:*

*For patch side1 there are 244 face centres, for the neighbour patch side2 there are 236*

*alls, inlet, outlet, side1 and side2*.

*side1*and

*side2*are the opposite faces which should be physically related to each other.

*Mesh_1*). Geometry is the block and I use

*Netgen 1D-2D-3D*algorithm.

*side2*; mesh:

*Mesh_1*; algorithm:

*Projection 2D*. in hypothesis construction I picked for face:

*side1*and leave the other blank.

Projection algorithm seems not to work with NETGEN 1D-2D-3D.

Please define the algorithm for each dimension separately:

* 3D: NETGEN

* 2D: NETGEN

* 1D: wire discretisation, local length or number of segments.

Then set the projection 2D submesh as you did.

See attached script for a working example.

You can check the number of faces by calling Mesh information on the two groups of faces.

Chrys

Hello Chrys,

thank you very much for your fast response.

After using cyclic boundary conditions on the box. I tried to set them also on my actual model. There I have the problem, that the faces are displaced and I get following error message in openFoam while running *checkMesh*:

*--> FOAM FATAL ERROR: *

*face 0 area does not match neighbour by 23.7135% -- possible face ordering problem.*

*patch:side1 my area:4.45648e-06 neighbour area:3.51171e-06 matching tolerance:0.0001*

*Mesh face:360585 fc0.0885241 0.114046 0.001)*

*Neighbour fc0.041739 0.0930121 0.00372698)*

I have no idea how to solve this issue. Do you have any suggestions?

yato

You can try to use the OpenFOAM utility createPatch to order the faces as expected by OpenFOAM. A user had a similar issue on http://www.openfoam.org/mantisbt/view.php?id=154

Ok I managed it by using cyclicAMI BCs. They are availabe since OpenFoam v2.1.0 and you don't need exact matching points anymore.

If anyone has a similar problem, this might be helpful:

http://www.cfd-online.com/Forums/openfoam-pre-processing/105531-setting-side-wedge-boundary-condition.html#post378087

Thank you for your help.