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] Error in BlockMesh: inconsistent number of faces (https://www.cfd-online.com/Forums/openfoam-meshing/79296-error-blockmesh-inconsistent-number-faces.html)

pc1 August 19, 2010 03:48

Error in BlockMesh: inconsistent number of faces
 
1 Attachment(s)
Hi there,
I'm trying to develop a trapezoidal-shaped channel in BlockMesh, consisting of 2 three-sided prism and in between a normal cuboid. In the attached PDF-file you can find a sketch of the geometry.
Below the blockMesh is posted.

My problem is that when I'm trying to define different number of cells in x and in y direction like for example:

blocks
( hex (3 2 2 3 7 6 5 4) (1300 50 10) simpleGrading (1 1 1)
hex (3 9 8 2 7 11 10 6) (1300 50 10) simpleGrading (1 1 1)
hex (8 9 9 8 10 11 15 14) (1300 50 10) simpleGrading (1 1 1))
);


I get the following error:

[...]
Inconsistent number of faces between block pair 0 and 1

From function blockMesh::createMergeList()
in file createMergeList.C at line 196.

FOAM exiting

If I define the mesh as follows:

blocks
( hex (3 2 2 3 7 6 5 4) (100 100 10) simpleGrading (1 1 1)
hex (3 9 8 2 7 11 10 6) (
100 100 10) simpleGrading (1 1 1)
hex (8 9 9 8 10 11 15 14) (
100 100 10) simpleGrading (1 1 1))
);


everything works fine.
Can anyone tell me how to solve this problem? I don't know what I have to change to get this working.

I'm thankful for any advice.
Regards,
pc1


my BLOCKMESH:

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

convertToMeters 1.;

vertices
(
(0 0 0) // 0
(0 40 0) // 1
(0.48 40 0) // 2
(0.48 0 0) // 3
(0 0 0.16) // 4
(0 40 0.16) // 5
(0.48 40 0.16) // 6
(0.48 0 0.16) // 7
(1.72 40 0) // 8
(1.72 0 0) // 9
(1.72 40 0.16) // 10
(1.72 0 0.16) // 11
(2.2 40 0) // 12
(2.2 0 0) // 13
(2.2 40 0.16) // 14
(2.2 0 0.16) // 15
);

blocks
(
hex (3 2 2 3 7 6 5 4) (1 1 1) simpleGrading (1 1 1) // p
hex (3 9 8 2 7 11 10 6) (1 1 1) simpleGrading (1 1 1) //q
hex (8 9 9 8 10 11 15 14) (1 1 1) simpleGrading (1 1 1) // r
);

edges
(
);

patches
(
//left: Prism p

wall xminp
(
(4 5 2 3)
)
patch yminp
(
(3 7 4 3)
)
patch ymaxp
(
(2 5 6 2)
)
patch zminp
(
(3 2 2 3)
)
patch zmaxp
(
(4 7 6 5)
)

// middle: cuboid q

patch yminq
(
(7 11 9 3)
)
patch ymaxq
(
(6 2 8 10)
)
wall zminq
(
(2 3 9 8)
)
patch zmaxq
(
(11 7 6 10)
)

// right: Prism r

wall xmaxr
(
(15 9 8 14)
)
patch yminr
(
(15 11 9 15)
)
patch ymaxr
(
(14 8 10 14)
)
patch zmaxr
(
(15 14 10 11)
)
patch zminr
(
(8 9 9 8)
)


);

mergePatchPairs
(
);

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

MartinB August 19, 2010 06:11

Hi pc1,

there are numbering problems in your blockMeshDict.

Try this one:
Code:

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

convertToMeters 1.;

vertices
(
(0 0 0) // 0
(0 40 0) // 1
(0.48 40 0) // 2
(0.48 0 0) // 3
(0 0 0.16) // 4
(0 40 0.16) // 5
(0.48 40 0.16) // 6
(0.48 0 0.16) // 7
(1.72 40 0) // 8
(1.72 0 0) // 9
(1.72 40 0.16) // 10
(1.72 0 0.16) // 11
(2.2 40 0) // 12
(2.2 0 0) // 13
(2.2 40 0.16) // 14
(2.2 0 0.16) // 15
);

blocks
(
hex (4 3 2 5 4 7 6 5) (1300 50 10) simpleGrading (1 1 1) // p
hex (3 9 8 2 7 11 10 6) (1300 50 10) simpleGrading (1 1 1) //q
hex (9 15 14 8 11 15 14 10) (1300 50 10) simpleGrading (1 1 1) // r

);

edges
(
);

patches
(
//left: Prism p

wall xminp
(
(4 3 2 5)
)
patch yminp
(
(4 3 7 4)
)

patch ymaxp
(
(2 6 5 2)
)

//patch zminp
//(
//(3 2 2 3)
//)
patch zmaxp
(
(4 7 6 5)
)

// middle: cuboid q

patch yminq
(
(3 9 11 7)
)
patch ymaxq
(
(2 8 10 6)
)
wall zminq
(
(3 9 8 2)
)
patch zmaxq
(
(7 11 10 6)
)

// right: Prism r

wall xmaxr
(
(9 15 14 8)
)
patch yminr
(
(9 15 15 11)
)
patch ymaxr
(
(14 10 8 14)
)
patch zmaxr
(
(11 15 14 10)
)

//patch zminr
//(
//(8 9 9 8)
//)


);

mergePatchPairs
(
);

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

I removed the interior walls, too.

Martin

pc1 August 19, 2010 09:19

Same error occured again
 
Hello Martin,
thanks for your reply. I just tested to turn the numbers as you proposed and removed the "interior" walls. Unfortunately I still get the same Error:

Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time


Creating block mesh from
    "*********/mesh/constant/polyMesh/blockMeshDict"


Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty
--> FOAM Warning :
    From function polyMesh::polyMesh(... construct from shapes...)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 577
    Found 2 undefined faces in mesh; adding to default patch.

Check block mesh topology

    Basic statistics
        Number of internal faces : 2
        Number of boundary faces : 14
        Number of defined boundary faces : 14
        Number of undefined boundary faces : 0

    Checking patch -> block consistency

Creating block offsets

Creating merge list

Inconsistent number of faces between block pair 0 and 1

    From function blockMesh::createMergeList()
    in file createMergeList.C at line 196.

FOAM exiting



The first Warning appears because of the removed walls, which are not really walls but rather edges. In a test with a single three-sided prism I found out that I have to define them.
The shifting of the numbers doesn't have any effect on the result.

The biggest problem is the inconsistent number of faces between the blocks. Still have no idea how to solve it.
Any proposals?
Regards,
pc1

MartinB August 19, 2010 09:40

Hi,
after adding
Code:

empty dummies
(
  (4 5 5 4)
  (15 14 14 15)
)

to the patches definition, the warning disappears... however the command
Code:

checkMesh -allTopology -allGeometry
gives under-dermined cells :-(

Does it run anyway?

Martin

MartinB August 19, 2010 09:45

And did you really tried my blockMeshDict? I don't have the inconsistent number of faces problem here...

pc1 August 19, 2010 13:12

tried your BlockMeshDict and checkMesh, both failed
 
Hi,
I did try your BlockMeshDict, but unfortunately BlockMesh aborted because of the inconsistent number of cells. Don't know why you don't have the same problem with the BlockMesh?:confused:
My CheckMesh also failed.

Is there an other possibility to define such a geometry in the BlockMeshDict?

Or does anyone else have some advice for me?
Tomorrow I'll continue searching for the reason of this error...:(

pc1

MartinB August 19, 2010 17:37

What about this idea:
Code:

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

convertToMeters 1.;

vertices
(
(0 0 0) // 0
(0 40 0) // 1
(0.48 40 0) // 2
(0.48 0 0) // 3
(0 0 0.16) // 4
(0 40 0.16) // 5
(0.48 40 0.16) // 6
(0.48 0 0.16) // 7
(1.72 40 0) // 8
(1.72 0 0) // 9
(1.72 40 0.16) // 10
(1.72 0 0.16) // 11
(2.2 40 0) // 12
(2.2 0 0) // 13
(2.2 40 0.16) // 14
(2.2 0 0.16) // 15
(0.6 0 0.08) // 16
(0.6 40 0.08) // 17
(1.6 0 0.08) // 18
(1.6 40 0.08) // 19

);

blocks
(

hex (5 6 7 4 2 17 16 3) block1 (11 1300 10) simpleGrading (1 1 1) // p
hex (2 17 16 3 8 19 18 9) block2 (11 1300 50) simpleGrading (1 1 1) //q
hex (17 6 7 16 19 10 11 18) block3 (10 1300 50) simpleGrading (1 1 1) // r
hex (10 14 15 11 19 8 9 18) block4 (11 1300 10) simpleGrading (1 1 1) // s

);

edges
(
);

patches
(

patch xFront
(
  (4 3 16 7)
  (3 9 18 16)
  (9 15 11 18)
  (16 18 11 7)
)
patch xBack
(
  (5 2 17 6)
  (2 8 19 17)
  (17 19 10 6)
  (8 14 10 19)
)
patch yLeft
(
  (3 2 5 4)
)
patch yRight
(
  (8 9 15 14)
)
patch zBottom
(
  (3 9 8 2)
)
patch zTop
(
  (4 7 6 5)
  (7 11 10 6)
  (11 15 14 10)
)

);

mergePatchPairs
(
);

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

The patch names and patch shapes are different to your first solution... but no warnings and no checkMesh problems...

Martin

pc1 August 20, 2010 06:24

Great!
That one works fine! Thank you for your help!!!
Regards,
pc1


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