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] Why doesn't this simple blockMesh work in v2006? (https://www.cfd-online.com/Forums/openfoam-meshing/230052-why-doesnt-simple-blockmesh-work-v2006.html)

TomWaits September 5, 2020 10:10

Why doesn't this simple blockMesh work in v2006?
 
Hi All,

The following blockMeshDict file (to mesh a cylinder) works perfectly in OpenFOAM-v1812:

Code:

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

// convertToMeters 1;
scale 1.0;

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

        (0.25 0 1) // 4
        (0 0.25 1) // 5
        (-0.25 0 1) // 6
        (0 -0.25 1) // 7
       
        (0 0 0) // 8
        (0 0 1) // 9
 
);

blocks
(
        hex (0 1 8 8 4 5 9 9) (25 25 100) simpleGrading (1 1 1)
        hex (1 2 8 8 5 6 9 9) (25 25 100) simpleGrading (1 1 1)
        hex (2 3 8 8 6 7 9 9) (25 25 100) simpleGrading (1 1 1)
        hex (3 0 8 8 7 4 9 9) (25 25 100) simpleGrading (1 1 1)
);

edges
(
arc 0 1 (0.17677 0.17677 0)
arc 1 2 (-0.17677 0.17677 0)
arc 2 3 (-0.17677 -0.17677 0)
arc 3 0 (0.17677 -0.17677 0)

arc 4 5 (0.17677 0.17677 1)
arc 5 6 (-0.17677 0.17677 1)
arc 6 7 (-0.17677 -0.17677 1)
arc 7 4 (0.17677 -0.17677 1)

);

boundary
(
        inlet
        {

                type patch;
                faces
                (
                        (0 8 8 1)
                        (1 8 8 2)
                        (2 8 8 3)
                        (3 8 8 0)
                );
        }
        outlet
        {
                type patch;
                faces
                (
                        (5 9 9 4)
                        (6 9 9 5)
                        (7 9 9 6)
                        (4 9 9 7)
                );
        }
        slip
        {
                type patch;
                faces
                (
                        (0 1 5 4)
                        (1 2 5 6)
                        (2 3 7 6)
                        (3 0 4 7)
                );
        }

);

mergePatchPairs
(

);

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

However when I try to run blockMesh on OpenFOAM-v2006 I get the following error:

Code:

--> FOAM FATAL ERROR:
Sub-division mismatch between face 3 of block 0(26 101) and face 3 of block 1(26 101)

    From void Foam::blockMesh::calcTopologicalMerge()
    in file blockMesh/blockMeshMergeTopological.C at line 414.

FOAM exiting

Could somebody help explain why this is happening?

Many thanks,

Tom Waits

cfdphind November 10, 2020 04:32

I have not read through your case, but that is a very simple error, just change the number of mesh cells in each direction (X Y Z) so that common faces of two near blocks have the same number of cells and grading. Remember when using multiple blocks, the number of cells and the expansion ratio on common faces must be matching
Concerning the error:
"--> FOAM FATAL ERROR:
Sub-division mismatch between face 3 of block 0(26 101) and face 3 of block 1(26 101)"
That means the number of cells of the common face of block 0 and block 1 is different. You have to draw again your vertex on a paper for better understanding then change cell number and simpleGrading in order that cells on the common face on those two blocks are matched . A very important point that be aware of how coordinate axis created during blockMesh, this usually leads to misunderstanding the x,y,z direction, hence users usually assign a number of cells improperly as they desire

olesen November 12, 2020 06:21

Quote:

Originally Posted by TomWaits (Post 782124)
Code:

--> FOAM FATAL ERROR:
Sub-division mismatch between face 3 of block 0(26 101) and face 3 of block 1(26 101)

    From void Foam::blockMesh::calcTopologicalMerge()
    in file blockMesh/blockMeshMergeTopological.C at line 414.

FOAM exiting

Could somebody help explain why this is happening?

The obvious answer: something incorrect in your definition. But to answer your question about why this didn't show as an error before see the upgrade guide blockMesh.
For degenerate or special cases, revert to geometric merging. You can test on the command-line, and put into your blockMeshDict to be safer.
In most case, the topological merge works well, can be significantly faster and is essential if you have a blockMesh with extremely high aspect ratio cells.

Hope this helps explain what is going on.

olesen November 12, 2020 06:33

Quote:

Originally Posted by TomWaits (Post 782124)
Hi All,

The following blockMeshDict file (to mesh a cylinder) works perfectly in OpenFOAM-v1812:

Code:

...   
edges
(
arc 0 1 (0.17677 0.17677 0)
arc 1 2 (-0.17677 0.17677 0)
arc 2 3 (-0.17677 -0.17677 0)
arc 3 0 (0.17677 -0.17677 0)

arc 4 5 (0.17677 0.17677 1)
arc 5 6 (-0.17677 0.17677 1)
arc 6 7 (-0.17677 -0.17677 1)
arc 7 4 (0.17677 -0.17677 1)
);
...


For these types of geometries I think you will like the newer alternative way to specify an arc specification, which will be in v2012. If you do a before/after comparison you will see that it makes the specification much less complicated.

Chemberleen July 7, 2021 15:12

Did you find the reply to this problem? I am having the same issue. This is my first simulation using OpenFoam.

TomWaits July 7, 2021 16:34

Quote:

Originally Posted by Chemberleen (Post 807738)
Did you find the reply to this problem? I am having the same issue. This is my first simulation using OpenFoam.

Yes, I used "blockMesh -merge-points" to revert to the old point based merging as in https://develop.openfoam.com/Develop...uide#blockmesh


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