CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Problem with blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By cshsgy
  • 1 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2017, 07:15
Unhappy Problem with blockMesh
  #1
New Member
 
Chen Sihe
Join Date: Sep 2017
Posts: 26
Rep Power: 9
cshsgy is on a distinguished road
Hi guys
I have written a blockMesh file and the error continuously comes out:

Code:
--> FOAM FATAL IO ERROR: 
"ill defined primitiveEntry starting at keyword 'boundary' on line 55 and ending at line 125"

file: /home/francisco/Escritorio/horno/constant/polyMesh/blockMeshDict at line 125.

From function primitiveEntry::readEntry(const dictionary&, Istream&)
in file lnInclude/IOerror.C at line 132.

FOAM exiting
I clearly know that it can be something like a Compilation error happening here. However, I have compared my code with the "standard" codes, only to find nothing wrong here.
Can anyone help to have a look at the error here? Thanks a lot!

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

convertToMeters 0.001;

vertices
(
    (149.857 -6.543 0)
    (149.857 -6.543 450)
    (74.929 -3.271 450)
    (74.929 -3.271 0)
    (149.857 6.543 0)
    (149.857 6.543 450)
    (74.929 3.271 450)
    (74.929 3.271 0)
    (9.990 -0.436 0)
    (9.990 -0.436 450)
    (0 0 450)
    (0 0 0)
    (9.990 0.436 0)
    (9.990 0.436 450)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (12 1 35) simpleGrading (1 1 1)
    hex (3 2 9 8 7 6 13 12) (18 1 70) simpleGrading (1 1 1)
    hex (8 9 10 11 12 13 10 11) (23 1 1000) simpleGrading (1 1 1)
);

edges
(
    arc 3 7  (75 0 0)
    arc 2 6  (75 0 450)
    arc 8 12 (10 0 0)
    arc 9 13 (10 0 450)
    arc 0 4  (150 0 0)
    arc 1 5  (150 0 450)
);

boundary
(
    inletAnnular
    {
        type patch;
        faces
        (
            (7 4 0 3)
        );
    }

    inletCentral
    {
        type patch;
        faces
        (
            (8 11 11 12)
        );
    }

    outlet
    {
        type patch;
        faces
        (
            (1 5 6 2)
            (2 6 13 9)
            (9 13 10 10)
        );
    }

    bottom
    {
        type symmetryPlane;
        faces
        (
            (0 1 2 3)
            (3 2 9 8)
            (8 9 10 11)
        );
    }

    top
    {
        type symmetryPlane;
        faces
        (
            (4 5 6 7)
            (7 6 13 12)
            (12 13 10 11)
        );
    }

    bluffBody
    {
        type wall;
        faces
        (
            (2 6 13 9)
            (7 3 8 12)
        );
    }

    centerLine
    {
        type empty;
	faces
	(
	    (10 11 11 10)
	);
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
vighnesh.j likes this.
cshsgy is offline   Reply With Quote

Old   October 2, 2017, 06:41
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Hi,

You probably had a stray invisible character somewhere in the text file. Delete blockMeshDict, make a new one and do a copy-paste from the above.

blockMesh runs for me, but you still have problems with the mesh (not surprising):
Code:
temple*9-> blockMesh 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     4.0                                |
|   \\  /    A nd           | Web:         http://www.foam-extend.org         |
|    \\/     M anipulation  | For copyright notice see file Copyright         |
\*---------------------------------------------------------------------------*/
Build    : 4.0-f0c05c478cb3
Exec     : blockMesh
Date     : Oct 02 2017
Time     : 10:39:11
Host     : temple
PID      : 14516
CtrlDict : "/home/hjasak/foam/hjasak-4.0/run/support/test/system/controlDict"
Case     : /home/hjasak/foam/hjasak-4.0/run/support/test
nProcs   : 1
SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).
SetNaN   : Initialising allocated memory to NaN (FOAM_SETNAN).

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


Creating block mesh from
    "/home/hjasak/foam/hjasak-4.0/run/support/test/constant/polyMesh/blockMeshDict"

Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -73538.1 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -36763.4 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 202
    negative volume block : 0, probably defined inside-out
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -31862.3 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -4247.01 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 202
    negative volume block : 1, probably defined inside-out
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -653.346 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 202
    negative volume block : 2, probably defined inside-out


--> FOAM FATAL ERROR: 
Trying to specify a boundary face 4(2 6 13 9) on the face on cell 1 which is either an internal face or already belongs to some other patch.  This is face 0 of patch 5 named bluffBody.

    From function polyMesh::setTopology
(
    const cellShapeList& cellsAsShapes,
    const faceListList& boundaryFaces,
    const wordList& boundaryPatchNames,
    labelList& patchSizes,
    labelList& patchStarts,
    label& defaultPatchStart,
    label& nFaces,
    cellList& cells
)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 357.

FOAM aborting (FOAM_ABORT set)


#0  Foam::error::printStack(Foam::Ostream&) at ~/foam/foam-extend-4.0/src/OSspecific/POSIX/printStack.C:238
#1  Foam::error::abort() at ~/foam/foam-extend-4.0/src/foam/lnInclude/error.C:225
#2  Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/foam/foam-extend-4.0/src/foam/lnInclude/errorManip.H:86 (discriminator 4)
#3  Foam::polyMesh::setTopology(Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<int>&, Foam::List<int>&, int&, int&, Foam::List<Foam::cell>&) at ~/foam/foam-extend-4.0/src/foam/meshes/polyMesh/polyMeshFromShapeMesh.C:364 (discriminator 3)
#4  Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::PtrList<Foam::dictionary> const&, Foam::word const&, Foam::word const&, bool) at ~/foam/foam-extend-4.0/src/foam/meshes/polyMesh/polyMeshFromShapeMesh.C:868
#5  Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ~/foam/foam-extend-4.0/src/mesh/blockMesh/blockMesh/blockMeshTopology.C:546 (discriminator 4)
#6  Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) at ~/foam/foam-extend-4.0/src/mesh/blockMesh/blockMesh/blockMesh.C:39 (discriminator 2)
#7  
 at ~/foam/foam-extend-4.0/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C:159
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  
 at ??:?
Abort
cshsgy likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 2, 2017, 12:46
Default
  #3
New Member
 
Chen Sihe
Join Date: Sep 2017
Posts: 26
Rep Power: 9
cshsgy is on a distinguished road
Quote:
Originally Posted by hjasak View Post
Hi,

You probably had a stray invisible character somewhere in the text file. Delete blockMeshDict, make a new one and do a copy-paste from the above.

blockMesh runs for me, but you still have problems with the mesh (not surprising):
Code:
temple*9-> blockMesh 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     4.0                                |
|   \\  /    A nd           | Web:         http://www.foam-extend.org         |
|    \\/     M anipulation  | For copyright notice see file Copyright         |
\*---------------------------------------------------------------------------*/
Build    : 4.0-f0c05c478cb3
Exec     : blockMesh
Date     : Oct 02 2017
Time     : 10:39:11
Host     : temple
PID      : 14516
CtrlDict : "/home/hjasak/foam/hjasak-4.0/run/support/test/system/controlDict"
Case     : /home/hjasak/foam/hjasak-4.0/run/support/test
nProcs   : 1
SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).
SetNaN   : Initialising allocated memory to NaN (FOAM_SETNAN).

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


Creating block mesh from
    "/home/hjasak/foam/hjasak-4.0/run/support/test/constant/polyMesh/blockMeshDict"

Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -73538.1 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -36763.4 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -55150.8 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 202
    negative volume block : 0, probably defined inside-out
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -31862.3 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -4247.01 for face 3
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -18054.7 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 202
    negative volume block : 1, probably defined inside-out
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 0
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 1
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -653.346 for face 2
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 4
--> FOAM Warning : 
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -326.673 for face 5
--> FOAM Warning : 
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 202
    negative volume block : 2, probably defined inside-out


--> FOAM FATAL ERROR: 
Trying to specify a boundary face 4(2 6 13 9) on the face on cell 1 which is either an internal face or already belongs to some other patch.  This is face 0 of patch 5 named bluffBody.

    From function polyMesh::setTopology
(
    const cellShapeList& cellsAsShapes,
    const faceListList& boundaryFaces,
    const wordList& boundaryPatchNames,
    labelList& patchSizes,
    labelList& patchStarts,
    label& defaultPatchStart,
    label& nFaces,
    cellList& cells
)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 357.

FOAM aborting (FOAM_ABORT set)


#0  Foam::error::printStack(Foam::Ostream&) at ~/foam/foam-extend-4.0/src/OSspecific/POSIX/printStack.C:238
#1  Foam::error::abort() at ~/foam/foam-extend-4.0/src/foam/lnInclude/error.C:225
#2  Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/foam/foam-extend-4.0/src/foam/lnInclude/errorManip.H:86 (discriminator 4)
#3  Foam::polyMesh::setTopology(Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<int>&, Foam::List<int>&, int&, int&, Foam::List<Foam::cell>&) at ~/foam/foam-extend-4.0/src/foam/meshes/polyMesh/polyMeshFromShapeMesh.C:364 (discriminator 3)
#4  Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::PtrList<Foam::dictionary> const&, Foam::word const&, Foam::word const&, bool) at ~/foam/foam-extend-4.0/src/foam/meshes/polyMesh/polyMeshFromShapeMesh.C:868
#5  Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ~/foam/foam-extend-4.0/src/mesh/blockMesh/blockMesh/blockMeshTopology.C:546 (discriminator 4)
#6  Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) at ~/foam/foam-extend-4.0/src/mesh/blockMesh/blockMesh/blockMesh.C:39 (discriminator 2)
#7  
 at ~/foam/foam-extend-4.0/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C:159
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  
 at ??:?
Abort
Sure, thank you hjasak. I will try it out then and see.

Sent from my Redmi 4X using CFD Online Forum mobile app
cshsgy is offline   Reply With Quote

Reply

Tags
blockmesh, blockmeshdict, openfoam3.0.1


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Problem and doubts with blockMesh, snappyHexMesh and multiple geometry luca1992 OpenFOAM Meshing & Mesh Conversion 0 August 23, 2017 12:40
[blockMesh] BlockMesh problem ari92 OpenFOAM Meshing & Mesh Conversion 2 May 27, 2017 11:23
[blockMesh] blockMesh problem with wedge blocks gned OpenFOAM Meshing & Mesh Conversion 0 September 14, 2016 06:49
[blockMesh] Problem with blockMesh and my shape TneurolF OpenFOAM Meshing & Mesh Conversion 4 June 25, 2013 14:52
Blockmesh problem with more than one block sven82 OpenFOAM Pre-Processing 1 June 4, 2013 18:08


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