View Issue Details

IDProjectCategoryView StatusLast Update
0002711OpenFOAMBugpublic2017-10-09 23:51
ReporterAny Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSMintOS Version18.1
Fixed in Versiondev 
Summary0002711: BlockMesh not able to produce an indenpendent tangential resolution for two connected prism blocks
DescriptionTwo prism blocks representing have a coincident side which makes them to form a opening angle of a triangular domain. BlockMesh is not able to assign an independent tangential resolution of the two prism blocks resulting in an inconsistency error.
The tangential resolution (1st. argument) of one of the blocks could theoretically be changed independently of the the other block and the mesh still be of the type structured. But in this setup blockMesh only accepts if the number of cells are equal for the two blocks.

Similar problem has been reported before:
https://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/125998-blockmesh-gives-inconsistent-point-locations-axisymmetric-problem.html

https://www.cfd-online.com/Forums/openfoam-solving/121328-inconsistent-grading-caused-simple-translation.html
Steps To ReproduceIn the uploaded blockMeshDict two prism blocks forms a domain. The 1st, 2nd, and 3rd cell number arguments are the tangential-, axial-, and radial-direction respectively.

The tangential resolution (1st. argument) of one of the blocks could theoretically be changed independently of the the other block, but in this setup blockMesh only accepts if the number of cells are equal for the two blocks.
TagsblockMesh

Activities

Any

2017-10-04 12:54

reporter  

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

convertToMeters 0.001;

vertices
(
    (0 0 0)
    (1 0 0)
    (1 1 0)
    (0 1 0)
    (0 0 1)
    (1 0 1)
    (1 1 1)
    (0 1 1)

    (2 0 0)
    (2 1 0)
    (2 0 1)
    (2 1 1)
);

blocks
(
    hex (0 1 2 3 5 5 6 6) (1 1 1) simpleGrading (1 1 1) // tangential, axial, radial
    hex (1 8 9 2 5 5 6 6) (1 1 1) simpleGrading (1 1 1)// tangential, axial, radial
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
        );
    }
    outlet
    {
        type patch;
        faces
        (
        );
    }
    upperWall
    {
        type wall;
        faces
        (
        );
    }
    lowerWall
    {
        type wall;
        faces
        (
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
blockMeshDictBUGREPORT (1,651 bytes)   

henry

2017-10-06 10:19

manager   ~0008821

Do you have a patch which provides support for this particular block arrangement?

Any

2017-10-06 13:06

reporter   ~0008822

Hi Henry
I am not sure about what you mean with your question, but if you ask for numbering of the patches in the blockMeshDict, then I have created a new one here specifying inlet, outlet etc.
Are you able to reproduce the problem?
blockMeshDictBugReport2 (1,796 bytes)   
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

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

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

blocks
(
    hex (0 1 2 3 5 5 6 6) (1 1 1) simpleGrading (1 1 1) // tangential, axial, radial direction
    hex (1 8 9 2 5 5 6 6) (1 1 1) simpleGrading (1 1 1) // tangential, axial, radial direction
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        ((1 8 5 5)
	(1 5 5 0)
        );
    }
    outlet
    {
        type patch;
        faces
        ((2 6 6 9)
	(2 3 6 6)
        );
    }
    upperWall
    {
        type wall;
        faces
        ((9 6 5 8)
	(0 5 6 3)
        );
    }
    lowerWall
    {
        type wall;
        faces
        ((9 8 1 2)
	(2 1 0 3)
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
blockMeshDictBugReport2 (1,796 bytes)   

henry

2017-10-06 13:13

manager   ~0008823

Can you provide a patch to OpenFOAM which resolves the problem?

henry

2017-10-06 17:04

manager   ~0008828

Both the blockMeshDicts you provided mesh fine in OpenFOAM-dev.

Any

2017-10-09 11:00

reporter   ~0008837

Hi Henry
Here is a blockMeshDict that does not mesh, but gives the error:
--> FOAM FATAL ERROR:
Inconsistent number of faces between block pair 0 and 1

    From function void Foam::blockMesh::calcMergeInfo()
    in file blockMesh/blockMeshMerge.C at line 217.

FOAM exiting

The only difference between this blockMeshDict-file and the two other is, that the tangential resolution (1st cell number argument) for the two blocks are not equal:

blocks
(
    hex (0 1 2 3 5 5 6 6) (2 1 1) simpleGrading (1 1 1) // tangential, axial, radial direction
    hex (1 8 9 2 5 5 6 6) (1 1 1) simpleGrading (1 1 1) // tangential, axial, radial direction
);
 
On my computer with OF ver. 4.x this blockMeshDict does not work. Are you able to run this blockMeshDict?
blockMeshDictDifferentTangentialCellNumber (1,796 bytes)   
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

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

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

blocks
(
    hex (0 1 2 3 5 5 6 6) (2 1 1) simpleGrading (1 1 1) // tangential, axial, radial direction
    hex (1 8 9 2 5 5 6 6) (1 1 1) simpleGrading (1 1 1) // tangential, axial, radial direction
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        ((1 8 5 5)
	(1 5 5 0)
        );
    }
    outlet
    {
        type patch;
        faces
        ((2 6 6 9)
	(2 3 6 6)
        );
    }
    upperWall
    {
        type wall;
        faces
        ((9 6 5 8)
	(0 5 6 3)
        );
    }
    lowerWall
    {
        type wall;
        faces
        ((9 8 1 2)
	(2 1 0 3)
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
        );
    }
);

mergePatchPairs
(
);

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

henry

2017-10-09 11:31

manager   ~0008838

This blockMeshDict reproduces the problem, if you remove the check indicated:

    From function void Foam::blockMesh::calcMergeInfo()
    in file blockMesh/blockMeshMerge.C at line 217.

it meshes OK.

Any

2017-10-09 13:43

reporter   ~0008840

Hi Henry
It worked! Thanks, I guess the statement at line 217 could be left out to avoid this bug in future OF versions.

henry

2017-10-09 13:53

manager   ~0008841

The statement at line 217 is VERY useful and not possible in earlier versions of blockMesh as it does a topology consistency check and is definitely NOT a bug! All block mesh descriptions must be topologically consistent however the mesh you are generating is not topologically consistent at the point of this test but may be consistent later as a consequence of geometric and/or topological point merging. The only easy way around this is to add a switch in the blockMeshDict to switch-off the topology consistency check and require the user to be more careful in the creation of the blockMeshDict if they disable this test.

henry

2017-10-09 23:51

manager   ~0008845

Resolved by commit e61590cbcf513807c4de17cf10b934752048c40c

Issue History

Date Modified Username Field Change
2017-10-04 12:54 Any New Issue
2017-10-04 12:54 Any File Added: blockMeshDictBUGREPORT
2017-10-04 12:54 Any Tag Attached: blockMesh
2017-10-06 10:19 henry Note Added: 0008821
2017-10-06 13:06 Any File Added: blockMeshDictBugReport2
2017-10-06 13:06 Any Note Added: 0008822
2017-10-06 13:13 henry Note Added: 0008823
2017-10-06 17:04 henry Note Added: 0008828
2017-10-09 11:00 Any File Added: blockMeshDictDifferentTangentialCellNumber
2017-10-09 11:00 Any Note Added: 0008837
2017-10-09 11:31 henry Note Added: 0008838
2017-10-09 13:43 Any Note Added: 0008840
2017-10-09 13:53 henry Note Added: 0008841
2017-10-09 23:51 henry Assigned To => henry
2017-10-09 23:51 henry Status new => resolved
2017-10-09 23:51 henry Resolution open => fixed
2017-10-09 23:51 henry Fixed in Version => dev
2017-10-09 23:51 henry Note Added: 0008845