CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] face 0 in patch 0 does not have neighbour (https://www.cfd-online.com/Forums/openfoam-meshing/89292-face-0-patch-0-does-not-have-neighbour.html)

gregjunqua June 8, 2011 23:23

face 0 in patch 0 does not have neighbour
 
Hi everybody
I had search the rule for create a blockMeshDict. but i am facing this problem

face 0 in patch 0 does not have neighbour cell face: 4(0 1 2 3)

I want to know exactly the meaning of it because right now i am programming a script for creating automatically the blockMeshDict.
I had see that there is a same prob in this forum but I didn't understood clearly ...

Is there any documentation about it?

by the way i am trying to put a topography in fluent... but i didn t find a software able to do it.... if somebody know one i would be happy to know it and try

best regards

Greg

niklas June 9, 2011 02:57

it means that the points 0 1 2 3 does not lie on the same patch.

go to tutorials/incompressible/icoFoam/cavity

and look at blockMeshDict

change the patch definition from

Code:

    wall movingWall
    (
        (3 7 6 2)
    )

to ...lets say
Code:

    wall movingWall
    (
        (4 7 6 2)
    )

run blockMesh and you will get the same message, meaning here that point 4 does not belong to the
movingWall patch

Tanay June 12, 2011 01:02

Yeah, I got the same problem with my meshing.
Still, Niklas, if 0 1 2 3 are key-points connecting two surfaces of the geometry, they'll have to lie on two different patches, right? Like take an edge of a cube for exapmle. Suppose the 2 faces it connects (for which it's the common side) are different patches (maybe inlet and wall), the end-points of that edge will have to lie on two different patches. So, what do we do now?

Tanay June 12, 2011 01:10

In fact check this out if anyone's interested,

It's a blockMeshDict file to create a U-shaped reactor with diverging and converging sections in between. I'm getting an error message saying

FOAM FATAL ERROR:
face 0 in patch 0 does not have neighbour cell face: 4(0 2 3 1)

with some more negative cell volumes.
What may be happening? I appreciate all the help :-)


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

convertToMeters 1;

vertices
(
(0 0 0) //0
(0 1 0) //1
(0 0 1) //2
(0 1 1) //3

(1 0 0) //4
(1 1 0) //5
(1 0 1) //6
(1 1 1) //7

(2 0 0) //8
(2 3 0) //9
(2 0 1) //10
(2 3 1) //11

(4 0 2) //12
(4 3 2) //13
(3 0 2) //14
(3 3 2) //15

(2 0 4) //16
(2 3 4) //17
(2 0 3) //18
(2 3 3) //19

(1 0 4) //20
(1 1 4) //21
(1 0 3) //22
(1 1 3) //23

(0 0 4) //24
(0 1 4) //25
(0 0 3) //26
(0 1 3) //27
);

blocks
(
hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)
hex (4 5 6 7 8 9 10 11) (10 10 10) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) (10 10 10) simpleGrading (1 1 1)
hex (12 13 14 15 16 17 18 19) (10 10 10) simpleGrading (1 1 1)
hex (16 17 18 19 20 21 22 23) (10 10 10) simpleGrading (1 1 1)
hex (20 21 22 23 24 25 26 27) (10 10 10) simpleGrading (1 1 1)
);

edges
(
arc 10 18 (3 0 2)
arc 11 19 (3 3 2)
arc 8 16 (4 0 2)
arc 9 17 (4 3 2)
);

patches
(
patch flowInlet
(
(0 2 3 1)
)
patch flowOutlet
(
(24 26 27 25)
)
wall bottomSurf
(
(0 2 6 4)
(4 6 10 8)
(8 10 14 12)
(12 14 18 16)
(16 18 22 20)
(20 22 26 24)
)
wall innerSurf
(
(2 3 7 6)
(6 7 11 10)
(10 11 15 14)
(14 15 19 18)
(18 19 23 22)
(22 23 27 26)
)
wall topSurf
(
(1 3 7 5)
(5 7 11 9)
(9 11 15 13)
(13 15 19 17)
(17 19 23 21)
(21 23 27 25)
)
wall outerSurf
(
(0 1 5 4)
(4 5 9 8)
(8 9 13 12)
(12 13 17 16)
(16 17 21 20)
(20 21 25 24)
)
);

mergePatchPairs();
//End

MartinB June 12, 2011 05:52

3 Attachment(s)
Hi Tanay,

there are problems in your block's numbering. To hunt down the problem you can
- comment out the patches definition, afterwards you can have a look at the mesh in Paraview (screenshot 1)
- control the topology with pyFoamDisplayBlockMesh (screenshot 2)
- modify the block's numbering one by one, with patch definition still off, until no errors remain
- include the patch definition again

Corrected blockMeshDict is in attachment.

Martin

niklas June 12, 2011 07:12

Quote:

Originally Posted by Tanay (Post 311632)

FOAM FATAL ERROR:
face 0 in patch 0 does not have neighbour cell face: 4(0 2 3 1)

with some more negative cell volumes.
What may be happening? I appreciate all the help :-)

This is another error, that yields the same message.
Your points are not in the correct order. If you 'follow' the trace the points make
with your fingers on your right hand, the thumb should point out from the volume,
if the order is correct
0 2 3 1 - there's no order at all here.
Should probably be: 0 1 2 3. (if not its 3 2 1 0)

EDIT: Just loooked at the screenshot from martinB and realized that your block is defined wrong (not the face)

Tanay June 12, 2011 12:34

Thanks a lot Martin, Niklas! So naive of me, I didn't realize that block numbering has a specific pattern, sorry :-) Everything works fine now.
That utility which drew the the wrong mesh was so awesome! How did you draw it? I tried pyFoamDisplayBlockMesh out of interest and nothing happened.

MartinB June 12, 2011 12:44

Quote:

How did you draw it?
For the first image remove the definition for patches, so only a single entry for patches is left:
Code:

patches
 ();

Then call blockMesh and finally paraFoam.

For the second image: call
Code:

pyFoamDisplayBlockMesh constant/polyMesh/blockMeshDict
Of course the pyFoam utilities must be installed.

Martin

Tanay June 13, 2011 01:40

Thanks Martin!

gregjunqua June 13, 2011 03:59

I had solve the problem, I mean I still don't get it,

I feel you can't create point and block in the order your want.
So i change my program create the blockMeeshDict as the exemple.
Now it work well

Tanay June 13, 2011 06:00

Yes, Greg, that's because there 'is' a specific pattern to numbering points defining a block. Watch the solved example and learn. The 1st 4 points are of a 'cubic' face in order and the next 4 are the opposite face in exactly the same order.

gregjunqua June 13, 2011 07:18

Yes I saw that. now it work well :) Thank you

goen June 16, 2011 14:05

Hi Nordin

Please help me.. I have same problem
My blockMesh:

convertToMeters 0.01; // todo en cm

vertices
(
(1.09 0 0) //0
(2.09 0 0) //1
(0 2.09 0) //2
(0 1.09 0) //3
(1e-10 0 0.7) //4
(0.2 0 0.7) //5
(2.79 0 0.7) //6
(0 2.79 0.7) //7
(0 0.2 0.7) //8
(0 1e-10 0.7) //9
(1e-10 0 1.469) //10
(0.2 0 1.469) //11
(2.79 0 1.469) //12
(4.65 0 1.469) //13
(0 4.65 1.469) //14
(0 2.79 1.469) //15
(0 0.2 1.469) //16
(0 1e-10 1.469) //17
(1e-10 0 10.669) //18
(0.2 0 10.669) //19
(2.79 0 10.669) //20
(4.65 0 10.669) //21
(0 4.65 10.669) //22
(0 2.79 10.669) //23
(0 0.2 10.669) //24
(0 1e-10 10.669) //25
(1.09 0 0.7) //26
(2.09 0 0.7) //27
(0 2.09 0.7) //28
(0 1.09 0.7) //29
(1.09 0 1.469) //30
(2.09 0 1.469) //31
(0 2.09 1.469) //32
(0 1.09 1.469) //33
(1.09 0 10.69) //34
(2.09 0 10.69) //35
(0 2.09 10.69) //36
(0 1.09 10.69) //37
) ;

blocks
(
hex (0 0 3 3 5 26 29 8) (20 20 20) simpleGrading (1 1 1)
hex (0 1 2 3 26 27 28 29) (20 20 20) simpleGrading (1 1 1)
hex (1 1 2 2 27 6 7 28) (20 20 20) simpleGrading (1 1 1)
hex (4 5 8 9 10 11 16 17) (5 5 20) simpleGrading (1 1 1)
hex (5 26 29 8 11 30 33 16) (20 20 20) simpleGrading (1 1 1)
hex (26 27 28 29 30 31 32 33) (20 20 20) simpleGrading (1 1 1)
hex (27 6 7 28 31 12 15 32) (20 20 20) simpleGrading (1 1 1)
hex (10 11 16 17 18 19 24 25) (5 5 20) simpleGrading (1 1 10)
hex (11 30 33 16 19 34 37 24) (20 20 20) simpleGrading (1 1 10)
hex (30 31 32 33 34 35 36 37) (20 20 20) simpleGrading (1 1 10)
hex (31 12 15 32 35 20 23 36) (20 20 20) simpleGrading (1 1 10)
hex (12 13 14 15 20 21 22 23) (20 20 20) simpleGrading (1 1 10)



);

edges
(
arc 0 3 (1.97282792 1.97282792 0)
arc 1 2 (0.77074639 0.77074639 0)
arc 5 8 (0.14142136 0.14142136 0.7)
arc 6 7 (1.97282792 1.97282792 0.7)
arc 12 15 (1.97282792 1.97282792 1.469)
arc 13 14 (3.288046533 3.288046533 1.469)
arc 21 22 (3.288046533 3.288046533 10.669)
);

patches
(
wall piston
(
(4 9 8 5)
(0 3 8 5)
(0 3 2 1)
(1 2 7 6)
(12 15 14 13)
)

wall cylinderHead
(
(18 25 24 19)
(19 24 37 34)
(34 37 36 35)
(35 36 23 20)
(20 23 22 21)


)

wall liner
(
(13 14 22 21)
(6 7 15 12)
(4 9 17 10)
(10 17 25 18)
)

cyclic cyclic
(
(0 0 26 5)
(0 1 27 26)
(1 1 6 27)
(4 5 11 10)
(5 26 30 11)
(26 27 31 30)
(27 6 12 31)

(10 11 19 18)
(11 30 34 19)
(30 31 35 34)
(31 12 20 35)
(12 13 21 20)

(2 2 28 7)
(2 3 29 28)

(3 3 8 29)
(8 9 17 16)
(29 8 16 33)
(28 29 33 32)
(7 28 32 15)
(16 17 25 24)
(33 16 24 37)
(32 33 37 36)
(15 32 36 23)
(14 15 23 22)

)
);

mergePatchPairs
(
);

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


and the problem is:
face 0 area does not match neighbour 12 by 23.8994% -- possible face ordering problem.
patch:cyclic my area:0.3115 neighbour area:0.245 matching tolerance:0.001
Mesh face:30 vertices:4((1.09 0 0) (1.09 0 0) (1.09 0 0.7) (0.2 0 0.7))
Neighbour face:42 vertices:4((0 2.09 0) (0 2.09 0) (0 2.09 0.7) (0 2.79 0.7))
Rerun with cyclic debug flag set for more information.

From function cyclicPolyPatch::calcTransforms()
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 150.

FOAM exiting


Please help me..

MartinB June 16, 2011 15:29

Hi Gunawan,

some fixes, changes are marked with " // <--- explanation":

Code:

/*--------------------------------*- C++ -*----------------------------------*\
 | ========= | |
 | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
 | \\ / O peration | Version: 1.7.1 |
 | \\ / A nd | Web: www.OpenFOAM.com |
 | \\/ M anipulation | |
 \*---------------------------------------------------------------------------*/
 FoamFile
 {
 version 2.0;
 format ascii;
 class dictionary;
 object blockMeshDict;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.01; // todo en cm

 vertices
 (
 (1.09 0 0) //0
 (2.09 0 0) //1
 (0 2.09 0) //2
 (0 1.09 0) //3
 (1e-10 0 0.7) //4
 (0.2 0 0.7) //5
 (2.79 0 0.7) //6
 (0 2.79 0.7) //7
 (0 0.2 0.7) //8
 (0 1e-10 0.7) //9
 (1e-10 0 1.469) //10
 (0.2 0 1.469) //11
 (2.79 0 1.469) //12
 (4.65 0 1.469) //13
 (0 4.65 1.469) //14
 (0 2.79 1.469) //15
 (0 0.2 1.469) //16
 (0 1e-10 1.469) //17
 (1e-10 0 10.669) //18
 (0.2 0 10.669) //19
 (2.79 0 10.669) //20
 (4.65 0 10.669) //21
 (0 4.65 10.669) //22
 (0 2.79 10.669) //23
 (0 0.2 10.669) //24
 (0 1e-10 10.669) //25
 (1.09 0 0.7) //26
 (2.09 0 0.7) //27
 (0 2.09 0.7) //28
 (0 1.09 0.7) //29
 (1.09 0 1.469) //30
 (2.09 0 1.469) //31
 (0 2.09 1.469) //32
 (0 1.09 1.469) //33
 (1.09 0 10.69) //34
 (2.09 0 10.69) //35
 (0 2.09 10.69) //36
 (0 1.09 10.69) //37
 ) ;

 blocks
 (
 hex (0 0 3 3 5 26 29 8) b0 (20 20 20) simpleGrading (1 1 1)
 hex (0 1 2 3 26 27 28 29) b1 (20 20 20) simpleGrading (1 1 1)
 hex (1 1 2 2 27 6 7 28) b2 (20 20 20) simpleGrading (1 1 1)
 hex (4 5 8 9 10 11 16 17) b3 (5 20 20) simpleGrading (1 1 1) // <--- changed n elems from (5 5 20) to (5 20 20)
 hex (5 26 29 8 11 30 33 16) b4 (20 20 20) simpleGrading (1 1 1)
 hex (26 27 28 29 30 31 32 33) b5 (20 20 20) simpleGrading (1 1 1)
 hex (27 6 7 28 31 12 15 32) b6 (20 20 20) simpleGrading (1 1 1)
 hex (10 11 16 17 18 19 24 25) b7 (5 20 20) simpleGrading (1 1 10) // <--- changed n elems from (5 5 20) to (5 20 20)
 hex (11 30 33 16 19 34 37 24) b8 (20 20 20) simpleGrading (1 1 10)
 hex (30 31 32 33 34 35 36 37) b9 (20 20 20) simpleGrading (1 1 10)
 hex (31 12 15 32 35 20 23 36) b10 (20 20 20) simpleGrading (1 1 10)
 hex (12 13 14 15 20 21 22 23) b11 (20 20 20) simpleGrading (1 1 10)



 );

 edges
 (
 arc 1 2 (1.97282792 1.97282792 0) // <--- error here: not 0 3, but 1 2
 arc 0 3 (0.77074639 0.77074639 0) // <--- and here: not 1 2, but 0 3
 arc 5 8 (0.14142136 0.14142136 0.7)
 arc 6 7 (1.97282792 1.97282792 0.7)
 arc 12 15 (1.97282792 1.97282792 1.469)
 arc 13 14 (3.288046533 3.288046533 1.469)
 arc 21 22 (3.288046533 3.288046533 10.669)
 );

 patches
 (
 wall piston
 (
 (4 9 8 5)
 (0 3 8 5)
 (0 3 2 1)
 (1 2 7 6)
 (12 15 14 13)
 )

 wall cylinderHead
 (
 (18 25 24 19)
 (19 24 37 34)
 (34 37 36 35)
 (35 36 23 20)
 (20 23 22 21)


 )

 wall liner
 (
 (13 14 22 21)
 (6 7 15 12)
 (4 9 17 10)
 (10 17 25 18)
 )

 patch cyclic
 (
 (0 0 26 5)
 (0 1 27 26)
 (1 1 6 27)
 (4 5 11 10)
 (5 26 30 11)
 (26 27 31 30)
 (27 6 12 31)

 (10 11 19 18)
 (11 30 34 19)
 (30 31 35 34)
 (31 12 20 35)
 (12 13 21 20)

 (2 2 28 7)
 (2 3 29 28)

 (3 3 8 29)
 (8 9 17 16)
 (29 8 16 33)
 (28 29 33 32)
 (7 28 32 15)
 (16 17 25 24)
 (33 16 24 37)
 (32 33 37 36)
 (15 32 36 23)
 (14 15 23 22)

 )
 );

 mergePatchPairs
 (
 );

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

checkMesh is still complaining, you may have to tune your topology a little bit...

Good luck

Martin

goen June 24, 2011 14:06

Hi Martin.. Thank you very much.. Thanks for your help..

goen July 19, 2011 09:42

How dieselEngineFoam work?
 
hai all
im still newbie in openfoam
I really need your helps

I was trying to make a simulation with dieselenginefoam for my final project
but I'm still not master it yet

I have some questions here:
1. Is injected fuel considered as liquid or gas?
2. does dieselenginefoam care about ignition delay or not?
3. Is there any spesific tutorial about dieselEngineFOAM?

thanks for your answer..

sorry for my bad english

pratiek November 29, 2013 22:19

Nevermind! I found my mistake...

pratiek November 30, 2013 19:24

Well, found my mistake myself...I had missed out the block 4! yaay!

krishtej23 February 12, 2014 18:46

I have the same problem with creating axis
 
I am trying to create an axisymmetric domain with wedge condition and the angle is 2 degrees. I tried to correct the ordering of vertices but I end up in getting an error as "face 0 in patch 1 does not have neighbour cell face: 4(1 1 4 2)"
I want to create an axis of symmetry on x axis. Please help me.

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0 0) //0
(0.018 0 0) //1
(0.018 0.034744 0.001256) //2
(0 0.034744 0.001256) //3
(0.018 0.034744 -0.001256) //4
(0 0.034744 -0.001256) //5
);

blocks
(
hex (0 1 1 0 2 3 4 5) (80 240 240) simpleGrading (20 1 1)
);

edges
(
);

boundary
(
axis
{
type empty;
faces
(
(0 1 1 0)
);
}

atmosphere
{
type wall;
faces
(
(1 1 4 2)
);
}
bottom
{
type wall;
faces
(
(0 3 5 0)
);
}
walls
{
type wall;
faces
(
(4 5 3 2)
);
}
front
{
type wedge;
faces
(
(1 2 3 0)
);
}
back
{
type wedge;
faces
(
(4 1 0 5)
);
}

);

mergePatchPairs
(
);

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

snak February 13, 2014 06:31

hi,

The local coordinate system is defined by the order in which the vertices are presented in the block definition. Please refer to UserGuide 5.3.
Using the following blocks will create mesh without error.

blocks
(
hex (5 4 2 3 0 1 1 0) (80 1 240) simpleGrading (1 1 1)
);


All times are GMT -4. The time now is 12:45.