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

ancolli April 15, 2016 03:29

blockMesh merging
 
I am trying to merge 2 faces in openFoam 3.0.1 but i get the following error, my example is really easy.

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
(

(5 5 0)
(5 -5 0)
(-5 -5 0)
(-5 5 0)
(5 5 -30)
(5 -5 -30)
(-5 -5 -30)
(-5 5 -30)

(9 9 0)
(9 -9 0)
(-9 -9 0)
(-9 9 0)
(9 9 30)
(9 -9 30)
(-9 -9 30)
(-9 9 30)
);

    blocks
    (

    hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
    hex (8 9 10 11 12 13 14 15) (40 40 40) simpleGrading (1 1 1)
    );

    edges
    (
       

    );

    boundary
    (
        inlet
        {
            type patch;
            faces
            (
                (4 5 6 7)
            );
        }
        outlet
        {
            type patch;
            faces
            (
        (12 13 14 15)
            );
        }

    master
    {
    type patch;
            faces
            (
        (0 1 2 3)
            );
        }

    slave
    {
    type patch;
            faces
            (
(9 8 11 10)
            );
        }

        isolation
        {
            type wall;
            faces
            (
             
        (0 1 5 4)
        (2 1 5 6)
        (3 2 6 7)
        (3 0 4 7)

       
        (9 13 12 8)
        (8 12 15 11)
        (10 11 15 14)
        (10 14 13 9)
        );
        }
    );

mergePatchPairs
(
    (master slave)
);

Code:


/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  3.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 3.0.1-119cac7e8750
Exec  : blockMesh
Date  : Apr 14 2016
Time  : 20:22:06
Host  : "ancolli-Aspire-E5-773G"
PID    : 6153
Case  : /home/ancolli/OpenFOAM/ancolli-3.0.1/run/propios/RFB
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Creating block mesh from
    "/home/ancolli/OpenFOAM/ancolli-3.0.1/run/propios/RFB/system/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: -1620 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: -1620 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: -1620 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: -1620 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: -1620 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: -1620 for face 5
--> FOAM Warning :
    From function blockMesh::createTopology(IOdictionary&)
    in file blockMesh/blockMeshTopology.C at line 255
    negative volume block : 1, probably defined inside-out

Check topology

    Basic statistics
        Number of internal faces : 0
        Number of boundary faces : 12
        Number of defined boundary faces : 12
        Number of undefined boundary faces : 0
    Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 0.001
    Block 0 cell size :
        i : 0.0005 .. 0.0005
        j : 0.0005 .. 0.0005
        k : 0.0015 .. 0.0015

    Block 1 cell size :
        i : 0.00045 .. 0.00045
        j : 0.00045 .. 0.00045
        k : 0.00075 .. 0.00075

Creating merge patch pairs

Adding point and face zones
Creating attachPolyTopoChanger
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::face::ray(Foam::Vector<double> const&, Foam::Vector<double> const&, Foam::Field<Foam::Vector<double> > const&, Foam::intersection::algorithm, Foam::intersection::direction) const at ??:?
#4  Foam::slidingInterface::projectPoints() const at ??:?
#5  Foam::slidingInterface::changeTopology() const at ??:?
#6  Foam::polyTopoChanger::changeTopology() const at ??:?
#7  Foam::polyTopoChanger::changeMesh(bool, bool, bool, bool) at ??:?
#8  Foam::attachPolyTopoChanger::attach(bool) at ??:?
#9  ? at ??:?
#10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11  ? at ??:?
Violación de segmento (`core' generado)

can anyone help me?

Antimony April 18, 2016 04:44

Hi,

Have you tried correcting for the inside-out definition of the first block? The X3 direction of the block is oriented in the opposite direction of what you would get when you take the cross product of X1 & X2.

Cheers,
Antimony

wwzhao April 18, 2016 09:57

Hi, Alejandro

This is because the faces of patches must be in a specific order.

(From U-146)
Quote:

Each block face is defined by a list of 4 vertex numbers. The order in which the vertices are
given must be such that, looking from inside the block and starting with any vertex, the
face must be traversed in a clockwise direction to define the other vertices.
Here is a modified blockMeshDict that works (note that I modified the cell number in x- and y-direction of the second hex block from 40 to 36 for better mesh quality):

Code:

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

    (-5 -5 0)
    (5 -5 0)
    (5 5 0)
    (-5 5 0)

    (-9 -9 0)
    (9 -9 0)
    (9 9 0)
    (-9 9 0)
    (-9 -9 30)
    (9 -9 30)
    (9 9 30)
    (-9 9 30)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
    hex (8 9 10 11 12 13 14 15) (36 36 40) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 3 2 1)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (12 13 14 15)
        );
    }
    master
    {
        type patch;
        faces
        (
            (4 5 6 7)
        );
    }
    slave
    {
        type patch;
        faces
        (
            (8 11 10 9)
        );
    }
    isolation
    {
        type wall;
        faces
        (
            (0 1 5 4)
            (1 2 6 5)
            (2 3 7 6)
            (3 0 4 7)

            (8 9 13 12)
            (9 10 14 13)
            (10 11 15 14)
            (11 8 12 15)
        );
    }
);

mergePatchPairs
(
    (master slave)
);


Cheers,
Weiwen

ancolli April 18, 2016 12:29

thank u very much!!

nb977 May 13, 2016 18:11

merging problem
 
hi everybody ,

i had the same problem using mergePatchPairs .. but i corrected it thanks to your advice ! Thank you :)


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