Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum Lesson 5 – FATAL ERROR: face 4 in patch 2 vertices 4 does not have neighbour

• # Lesson 5 – FATAL ERROR: face 4 in patch 2 vertices 4 does not have neighbour

Posted by on July 11, 2023 at 8:35 am

Hey, guys
I need help to better understand BlockMesh logic. The 2D case with radius 2 hole at the end of Lesson 5 is very interesting.
But I confess, that I need help to be able to move forward, could you help me to identify my mistake?

/*——————————–*- C++ -*———————————-*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: http://www.openfoam.com |
| \\/ M anipulation | |
\*—————————————————————————*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale 0.1;

vertices
(
(0 0 0)
(10 0 0)
(10 4 0)
(0 4 0)
(12 4 0)
(12 2 0)
(14 0 0)
(24 0 0)
(24 4 0)
(14 4 0)
(0 0 1)
(10 0 1)
(10 4 1)
(0 4 1)
(12 4 1)
(12 2 1)
(14 0 1)
(24 0 1)
(24 4 1)
(14 4 1)
);

blocks
(
hex (0 1 2 3 10 11 12 13) (20 20 20) simpleGrading (1 1 1)
hex (1 5 4 2 11 15 14 12) (20 20 20) simpleGrading (1 1 1)
hex (5 6 9 4 15 16 19 14) (20 20 20) simpleGrading (1 1 1)
hex (6 7 8 9 16 17 18 19) (20 20 20) simpleGrading (1 1 1)
);

edges
(
arc 1 5 (10.585786 1.414214 0)
arc 11 15 (10.585786 1.414214 1)
arc 5 6 (13.414214 1.414214 0)
arc 15 16 (13.414214 1.414214 1)

);

boundary
(
movingWall
{
type wall;
faces
(
(3 13 12 2)
(2 12 14 4)
(4 14 19 9)
(9 19 18 8)
);
}
fixedWalls
{
type wall;
faces
(
(0 10 13 3)
(0 1 11 10)
(1 5 15 11)
(5 6 16 15)
(6 7 17 16)
(7 8 18 17)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(10 11 12 13)
(1 2 4 5)
(11 15 14 12)
(2 4 9 6)
(15 16 19 14)
(6 9 8 7)
(16 17 18 19)
);
}
);

// ************************************************************************* //

–> FOAM FATAL ERROR: (openfoam-2306)
face 4 in patch 2 vertices 4((10 4 0) (12 4 0) (14 4 0) (14 0 0)) does not have neighbour cell face: 4(2 4 9 6)

From Foam::labelList Foam::polyMesh::facePatchFaceCells(const faceList&, const labelListList&, const faceListList&, Foam::label) const
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 119.

2 Members · 3 Replies
• 3 Replies
• ### Raphael

Member
July 11, 2023 at 8:51 am

This is the scheme to follow to solve the problem.

• ### Raphael

Member
July 11, 2023 at 3:14 pm

Hey guys.
With a few more hours I was able to move forward and understand.
But I changed the vertex numbering scheme to follow a logic that for me was more sequential, aiming to build and compile one block at a time and observe the result.
It was an excellent puzzle and I think I started to understand BlockMesh a little more. Excellent exercise.

/*——————————–*- C++ -*———————————-*\
| ========= Â  Â  Â  Â  Â  Â  Â  Â  | Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  |
| \\ Â  Â  Â / Â F ield Â  Â  Â  Â  | OpenFOAM: The Open Source CFD Toolbox Â  Â  Â  Â  Â  |
| Â \\ Â  Â / Â  O peration Â  Â  | Version: Â v2306 Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  |
| Â  \\ Â / Â  Â A nd Â  Â  Â  Â  Â  | Website: Â www.openfoam.com Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â |
| Â  Â \\/ Â  Â  M anipulation Â | Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  |
\*—————————————————————————*/
FoamFile
{
version Â  Â  2.0;
format Â  Â  Â ascii;
class Â  Â  Â  dictionary;
object Â  Â  Â blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale Â  0.1;

vertices
(
(0 0 0)
(10 0 0)
(10 4 0)
(0 4 0)
(0 0 1)
(10 0 1)
(10 4 1)
(0 4 1)
(12 2 0) //8
(12 4 0) //9
(12 2 1) //10
(12 4 1) //11
(14 0 0) //12
(14 4 0) //13
(14 0 1) //14
(14 4 1) //15
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
hex (1 8 9 2 5 10 11 6) (20 20 20) simpleGrading (1 1 1)
hex (8 12 13 9 10 14 15 11) (20 20 20) simpleGrading (1 1 1)
);

edges
(
arc 1 8 (10.585786 1.414214 0)
arc 5 10 (10.585786 1.414214 1)
arc 8 12 (13.414214 1.414214 0)
arc 10 14 (13.414214 1.414214 1)

);

boundary
(
movingWall
{
type wall;
faces
(
(3 7 6 2)
(2 6 11 9)
(9 11 15 13)
);
}
fixedWalls
{
type wall;
faces
(
(0 4 7 3)
//(8 9 11 10)
(1 5 4 0)
(1 8 10 5)
(8 12 14 10)
);
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(5 6 7 4)
(1 2 9 8)
(10 11 6 5)
(8 9 13 12)
(10 14 15 11)
);
}
);

// ************************************************************************* //

• ### BarÄ±ÅŸ Bicer

Moderator
July 11, 2023 at 8:06 pm

Great to hear that Rapheal.

Keep up hard working ðŸ™‚