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] About blockMesh (https://www.cfd-online.com/Forums/openfoam-meshing/243089-about-blockmesh.html)

Young Zhang May 29, 2022 08:28

About blockMesh
 
Hello everyone! I am new to openfoam. I met a problem and have been stuck for several days. Could someone figure me out where the problem is and how should I change it? Many thanks in advance.
Code:

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

convertToMeters 1;


vertices
(
    (0 0 0)              //0
    (0 0.7071 0.7071) 
    (0 -0.7071 0.7071)  //2
    (0 -0.7071 -0.7071)
    (0 0.7071 -0.7071)  //4
    (0 1.4142 1.4142)
    (0 -1.4142 1.4142)  //6
    (0 -1.4142 -1.4142)
    (0 1.4142 -1.4142)  //8
    (10 0.7071 0.7071) 
    (10 -0.7071 0.7071)  //10
    (10 -0.7071 -0.7071)
    (10 0.7071 -0.7071)  //12
    (10 1.4142 1.4142)
    (10 -1.4142 1.4142)  //14
    (10 -1.4142 -1.4142)
    (10 1.4142 -1.4142)  //16
    (10 0 0)
);

blocks
(
    // inlet block
    hex (1 2 3 4 9 10 11 12) (100 10 10) simpleGrading (1 1 1)
    hex (1 5 6 2 9 13 14 10) (100 10 10) simpleGrading (1 1 1)
    hex (2 6 7 3 10 14 15 11) (100 10 10) simpleGrading (1 1 1) 
    hex (3 7 8 4 11 15 16 12) (100 10 10) simpleGrading (1 1 1)
    hex (4 8 5 1 12 16 13 9) (100 10 10) simpleGrading (1 1 1) 
);

edges
(     
    arc 1 2 (0 0 1)
    arc 2 3 (0 -1 0)
    arc 3 4 (0 0 -1)
    arc 4 1 (0 1 0)   
    arc 5 6 (0 0 2)
    arc 6 7 (0 -2 0)
    arc 7 8 (0 0 -2)
    arc 8 5 (0 2 0)
    arc 9 10 (10 0 1)
    arc 10 11 (10 -1 0)
    arc 11 12 (10 0 -1)
    arc 12 9 (10 1 0)   
    arc 13 14 (10 0 2)
    arc 14 15 (10 -2 0)
    arc 15 16 (10 0 -2)
    arc 16 13 (10 2 0)   
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
          (1 2 3 4)
          (1 5 6 2)
          (2 6 7 3)
          (3 7 8 4)
          (4 8 5 1)
         
        );
    }

    outlet
    {
        type patch;
        faces
        (
          (9 12 11 10)
          (9 10 14 13)
          (10 11 15 14)
          (11 12 16 15)
          (12 9 13 16)
        );
    }

    walls
    {
        type wall;
        faces
        (
            (13 14 6 5)
            (14 15 7 6)
            (15 16 8 7)
            (16 13 5 8)
        );
    }
);



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

This is the problem.
Quote:

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 222.

FOAM exiting

Young Zhang May 29, 2022 08:31

1 Attachment(s)
And here is the pipe I tried to mesh.

AtoHM June 2, 2022 01:28

There is an error somewhere. I won't try to track it down. My best suggestion: start over and build one block at a time, execute blockMesh, check it visually, add the next block, ... and so on. Good luck!


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