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 fails with Foam::error::printStack (https://www.cfd-online.com/Forums/openfoam-meshing/219971-blockmesh-fails-foam-error-printstack.html)

Illmatic August 18, 2019 11:46

blockMesh fails with Foam::error::printStack
 
Hi,

I am trying to generate a mesh using blockMesh. My blockMeshDict looks like this:

Code:

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

scale  0.001;

hVol 400;
lVol 600;
x1 150;
y1 210;

x2 150;
y2 150;

x3 210;
y3 210;

nBlock1XCells 3000;
nBlock1YCells 1200;
nBlock2XCells 7800;
nBlock2YCells 1200;
nBlock3XCells 3000;
nBlock3YCells 3800;
nBlock4XCells 1200;
nBlock4YCells 3800;
nBlock5XCells 7800;
nBlock5YCells 3800;
nBlock6XCells 3000;
nBlock6YCells 3000;
nBlock7XCells 7800;
nBlock7YCells 3000;

vertices
(
    (0 $y2 0)                        //0
    ($x2 $y2 0)                        //1
    ($x2 $y2 0)                        //2               
    ($lVol $y2 0)                        //3
    (0 $y1 0)                //4
    ($x1 $y1 0)                //5
    ($x3 $y3 0)                //6
    ($lVol $y3 0)                //7
    (0 $hVol 0)                        //8
    ($x1 $hVol 0)                //9
    ($x3 $hVol 0)                //10
    ($lVol $hVol 0)                        //11
    (0 $y2 0.5)                //12
    ($x2 $y2 0.5)                //13
    ($x2 $y2 0.5)                //14
    ($lVol $y2 0.5)                //15
    (0 $y1 0.5)                //16
    ($x1 $y1 0.5)        //17
    ($x3 $y3 0.5)        //18
    ($lVol $y3 0.5)                //19
    (0 $hVol 0.5)                //20
    ($x1 $hVol 0.5)                //21
    ($x3 $hVol 0.5)                //22
    ($lVol $hVol 0.5)                //23
        (0 0 0)                        //24 Part of floor patch
        (0 0 0.5)                //25 Part of floor patch
        ($x2 0 0)                        //26 Part of floor patch
        ($x2 0 0.5)                //27 Part of floor patch
        ($lVol 0 0)                        //28 Part of floor patch
        ($lVol 0 0.5)                //29 Part of floor patch
);

blocks
(
    hex (0 1 5 4 12 13 17 16) ($nBlock1XCells $nBlock1YCells 1) simpleGrading (1 1 1)
    hex (1 3 7 6 13 15 19 18) ($nBlock2XCells $nBlock2YCells 1) simpleGrading (1 1 1)
    hex (4 5 9 8 16 17 21 20) ($nBlock3XCells $nBlock3YCells 1) simpleGrading (1 1 1)
    hex (5 6 10 9 17 18 22 21) ($nBlock4XCells $nBlock4YCells 1) simpleGrading (1 1 1)
    hex (6 7 11 10 18 19 23 22) ($nBlock5XCells $nBlock5YCells 1) simpleGrading (1 1 1)
        hex (24 26 1 0 25 27 13 12) ($nBlock6XCells $nBlock6YCells 1) simpleGrading (1 1 1)
        hex (26 28 3 1 27 29 15 13) ($nBlock7XCells $nBlock7YCells 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
        inlet
        {
                type patch;
                faces
                (
                        (24 25 12 0)
                        (0 12 16 4)
                        (4 16 20 8)
                );
        }
       
        outlet
        {
                type patch;
                faces
                (
                        (28 29 15 3)
                        (3 15 19 7)
                        (7 19 23 11)
                );
        }
       
        triangle
        {
                type wall;
                faces
                (
                        (1 13 17 5)
                        (5 17 18 6)
                        (6 18 13 1)
                );
        }
       
        upperWall
        {
                type wall;
                faces
                (
                        (8 20 21 9)
                        (9 21 22 10)
                        (10 22 23 11)
                );
        }
       
        lowerWall
        {
                type wall;
                faces
                (
                        (24 25 27 26)
                        (26 27 28 29)
                );
        }
);

mergePatchPairs
(
);

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

Now when I try to create the blockMesh I get the following error message:

Code:

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

    Block 1 cell size :
        i : 5.76923e-05 .. 5.76923e-05
        j : 7.07107e-05 .. 7.07107e-05
        k : 0.0005 .. 0.0005

    Block 2 cell size :
        i : 5e-05 .. 5e-05
        j : 5e-05 .. 5e-05
        k : 0.0005 .. 0.0005

    Block 3 cell size :
        i : 5e-05 .. 5e-05
        j : 5e-05 .. 5e-05
        k : 0.0005 .. 0.0005

    Block 4 cell size :
        i : 5e-05 .. 5e-05
        j : 5e-05 .. 5e-05
        k : 0.0005 .. 0.0005

    Block 5 cell size :
        i : 5e-05 .. 5e-05
        j : 5e-05 .. 5e-05
        k : 0.0005 .. 0.0005

#0  Foam::error::printStack(Foam::Ostream&) addr2line failed
#1  Foam::sigSegv::sigHandler(int) addr2line failed
#2  ? addr2line failed
#3  Foam::blockMesh::createPoints() const addr2line failed
#4  Foam::blockMesh::points() const addr2line failed
#5  ?
#6  __libc_start_main addr2line failed
#7  ?
Segmentation fault (core dumped)

What is causing this this error and how can I resolve this?

mwaqas August 22, 2019 04:50

Hello,


Cań you please post the complete error message. This error message is not telling anything.


BR

Orgogozo September 17, 2019 09:47

2 Attachment(s)
Dear foamers,


I also met such a 'printStack error' while trying to build a mesh with OpenFOAM_v6 ; the same mesh was built without problem with OpenFOAM_v1806. You will find below the error message, and in attachment the associated blockMeshDict as well as the log of the blockMesh command execution.



Does anyone have a clue about this problem ?



Error message :


#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in "/usr/lib64/libc.so.6"
#3 __intel_avx_rep_memset at ??:?
#4 Foam::polyMesh::initMesh(Foam::List<Foam::cell>&) at ??:?
#5 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 ??:?
#6 ? at ??:?
#7 __libc_start_main in "/usr/lib64/libc.so.6"
#8 ? at ??:?
/var/spool/slurmd/job266413/slurm_script : ligne 15 : 36516 Erreur de segmentation blockMesh > logBlockMesh_v6_boundary

mwaqas September 18, 2019 10:55

1 Attachment(s)
Hello,


I used your blockMeshDict and it ran without any problem. I just reduced the number of elements. You can see the mesh in attachment.
Quote:

hex (0 1 2 3 4 5 6 7) (100 320 40) simpleGrading (1 1 0.00865240653108278)
hex (1 8 9 2 5 10 11 6) (40 320 40) simpleGrading (1 1 0.00865240653108278)
hex (8 12 13 9 10 14 15 11) (100 320 40) simpleGrading (1 1 0.00865240653108278)
The problem might be because of the memory of your system. It is looking like a very fine mesh


With your original grading, you would have 260 millions cells (do you really have that big machine). The current mesh (that I have attached below) is having 3 million cells.
As far as I remember, as a rule of thumb, 1.5G RAM is required for 1 million element.



PS: I used OFv1906 for meshing


BR

Orgogozo September 19, 2019 04:22

Dear mwaqas,


The problem should not be the memory of the used system : I made the run on a fat node with 1.5 TB RAM. Moreover, this exact blockMeshDict with ~260 millions of cells is succesfully used with OpenFOAM_v1806 on the same system, while it leads to the reported error when used with OpenFOAM_v6. Nevertheless, I made the test with OpenFOAM_v6 and a smaller mesh, and the blockMesh commands did work in that smaller case. So their is a mystery there that right now I cannot understand. I'll try to figure out what's going on with the administrators of the used supercomputer, but if you have ideas of what could explain this trouble please let me now !


Best regards,


Laurent Orgogozo

Orgogozo September 24, 2019 09:13

Dear Muhammad, dear foamers,


After verification with my colleagues from the CALMIP supercomputing center, it is likely that the encountered problem is related to a new bug with blockMesh in OpenFOAM_v6. I recall that this mesh is successfully built with OF_v1806, and lead to a 'printStack error' while trying to be built with OpenFOAM_v6. Nevertheless the mesh built with OF_v1806 is usable for computation with OF_v6. Still, if someone solve out this issue, please let me know!


Kind regards,


Laurent Orgogozo


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