CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Problem with blockMesh and my shape (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/119645-problem-blockmesh-my-shape.html)

TneurolF June 20, 2013 18:33

Problem with blockMesh and my shape
 
Hello everybody,

I am trying to compute a flowing into a cone with icoFoam. I am trying to do my shape and my meshing, but I have one problem with blockMesh.

Here is the shape I wanna do:

http://imageshack.us/photo/my-images/545/e1pa.png/http://imageshack.us/a/img109/9508/or5.png

Red surface is fluid inlet, blue surfaces are fluid outlet. All the other surfaces are walls or empty.

So here is the blockMeshDict:

Code:

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

convertToMeters 0.1;

vertices
(
    (0 0 0) //0
    (0.1 0 0) //1
    (0.1 0.01 0) //2
    (0 0.01 0) //3
    (0.8464 -0.2 0) //4
    (0.8464 0.21 0) //5

    (0 0 0.01) //6
    (0.1 0 0.01) //7
    (0.1 0.01 0.01) //8
    (0 0.01 0.01) //9
    (0.8464 -0.2 0.01) //10
    (0.8464 0.21 0.01) //11

    (0.85 -0.2 0) //12
    (0.85 -0.1959 0) //13
    (0.8464 -0.1959 0) //14
    (0.85 -0.2 0.01) //15
    (0.85 -0.1959 0.01) //16
    (0.8464 -0.1959 0.01) //17

    (0.8464 0.2059 0) //18
    (0.85 0.2059 0) //19
    (0.85 0.21 0) //20
    (0.8464 0.2059 0.01) //21
    (0.85 0.2059 0.01) //22
    (0.85 0.21 0.01) //23


   
);

blocks
(
    hex (0 1 2 3 6 7 8 9) (100 100 1) simpleGrading (1 1 1)
    hex (1 4 5 2 7 10 11 8) (100 100 1) simpleGrading (1 1 1)
    hex (14 4 12 13 17 10 15 16) (1 1 1) simpleGrading (1 1 1)
    hex (5 18 19 20 11 21 22 23) (1 1 1) simpleGrading (1 1 1)


);

edges
(
);

boundary
(
    inlet
    {
        type wall;
        faces
        (
            (0 3 9 6)
        );
    }

    outlet
    {
        type wall;
        faces
        (
            (20 19 22 23)
            (13 12 15 16)
        );
    }

    upDown
    {
        type wall;
        faces
        (
            (3 2 8 9)
            (2 5 11 8)
            (5 20 23 11)
            (4 10 15 12)
            (1 7 10 4)
            (0 6 7 1)
        );
    }

    frontBack
    {
        type empty;
        faces
        (
            (0 1 2 3)
            (1 4 5 2)
            (4 12 13 14)
            (18 19 20 5)
            (6 9 8 7)
            (7 8 11 10)
            (10 17 16 15)
            (21 11 23 22)
        );
    }

    plate
    {
        type wall;
        faces
        (
        (22 19 18 21)
            (18 14 17 21)
            (17 14 13 16)


        );
    }


);

mergePatchPairs
(
);

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



And here is the error message from blockMesh
:

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0
Exec  : blockMesh
Date  : Jun 20 2013
Time  : 15:24:10
Host  : "poli2"
PID    : 29402
Case  : /home/florent/OpenFOAM/OpenFOAM-2.2.0/tutorials/incompressible/icoFoam/enlargementPlate
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Creating block mesh from
    "/home/florent/OpenFOAM/OpenFOAM-2.2.0/tutorials/incompressible/icoFoam/enlargementPlate/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology


--> FOAM FATAL ERROR:
face 1 in patch 4 does not have neighbour cell face: 4(18 14 17 21)

    From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 127.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::polyMesh::facePatchFaceCells(Foam::List<Foam::face> const&, Foam::List<Foam::List<int> > const&, Foam::List<Foam::List<Foam::face> > const&, int) const at ??:?
#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 ??:?
#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 ??:?
#5  Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ??:?
#6  Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) at ??:?
#7 
 at ??:?
#8  __libc_start_main in "/usr/lib/libc.so.6"
#9 
 at ??:?
Aborted (core dumped)

Could you please help me to solve the problem? Thank you a lot.

Florent.

nimasam June 22, 2013 08:33

there is no link access ;)
However read the error line carefully, face with following number is not true, check number again ;)
Quote:

--> FOAM FATAL ERROR: face 1 in patch 4 does not have neighbour cell face: 4(18 14 17 21)

colinB June 25, 2013 02:19

Dear Florent, Dear nimasam

indeed this is a rather trivial error message and easy to solve in blockMesh,
for usually when you get this some orders of your points are messed up.

But in this case I think it derives from an other source.
If Florent has built up the blockMeshDict file as he stated in the sketch,
he forgot to introduce 4 more blocks which have to be built in order to
"continue" the points 14 17 18 and 21.
In other words blockMesh doesn't allow edges to end on a plane surface.
All faces of one block have to end on a exact matching face from another
block, or have to limit the domain.

So in order to overcome this error you have to introduce two more blocks
in the middle part to connect the "outlet blocks" to the rest of the domain
and two more blocks in the beginning of the domain to avoid free standing
points in the middle part.

An alternative might be the usage of mergePatchPairs, which I think also
solves this problem, but I have to admit that I never used that option
and have no clue what it does. I'm only guessing.
So feel free to correct me on that part.

I hope I could contribute
regards
Colin

nimasam June 25, 2013 12:11

Quote:

An alternative might be the usage of mergePatchPairs,
yep, mergPatchPairs can be used, you need to define forexample patch1 (4 5 11 10)
and patch2 (4 14 17 10), then in mergePatchPairs section, you bring the name of this two patches name

TneurolF June 25, 2013 13:52

Thank you everybody! I finally did an easier shape and it now works.

Florent.


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