CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (https://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Internal Walls (https://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/81251-internal-walls.html)

balkrishna October 21, 2010 02:56

Internal Walls
 
I wish to generate a mesh for the geometry below. It is an air lift reactor :

https://sites.google.com/site/balkri...me/reactor.jpg

My blockMeshDict is as follows :
Code:

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

convertToMeters 0.01;

vertices
(
    (0 0 0)
    (9.7 0 0)
    (9.7 12 0)
    (0 12 0)
    (10.3 0 0)
    (10.3 12 0)
    (21.7 0 0)
    (21.7 12 0)
    (22.3 0 0)
    (22.3 12 0)
    (32 0 0)
    (32 12 0)
    (0 0 14)
    (9.7 0 14)
    (9.7 12 14)
    (0 12 14)
    (10.3 0 14)
    (10.3 12 14)
    (21.7 0 14)
    (21.7 12 14)
    (22.3 0 14)
    (22.3 12 14)
    (32 0 14)
    (32 12 14)
    (0 0 130)
    (9.7 0 130)
    (9.7 12 130)
    (0 12 130)
    (10.3 0 130)
    (10.3 12 130)
    (21.7 0 130)
    (21.7 12 130)
    (22.3 0 130)
    (22.3 12 130)
    (32 0 130)
    (32 12 130)
    (0 0 140)
    (9.7 0 140)
    (9.7 12 140)
    (0 12 140)
    (10.3 0 140)
    (10.3 12 140)
    (21.7 0 140)
    (21.7 12 140)
    (22.3 0 140)
    (22.3 12 140)
    (32 0 140)
    (32 12 140)
);

blocks
(
 hex (0 1 2 3 12 13 14 15) (10 10 10) simpleGrading (1 1 1)
 hex (1 4 5 2 13 16 17 14) (4 10 10) simpleGrading (1 1 1)
 hex (4 6 7 5 16 18 19 17) (10 10 10) simpleGrading (1 1 1)
 hex (6 8 9 7 18 20 21 19) (4 10 10) simpleGrading (1 1 1)
 hex (8 10 11 9 20 22 23 21) (10 10 10) simpleGrading (1 1 1)
 hex (12 13 14 15 24 25 26 27) (10 10 100) simpleGrading (1 1 1)
 hex (13 16 17 14 25 28 29 26) (4 10 100) simpleGrading (1 1 1)
 hex (16 18 19 17 28 30 31 29) (10 10 100) simpleGrading (1 1 1)
 hex (18 20 21 19 30 32 33 31) (4 10 100) simpleGrading (1 1 1)
 hex (20 22 23 21 32 34 35 33) (10 10 100) simpleGrading (1 1 1)
 hex (24 25 26 27 36 37 38 39) (10 10 10) simpleGrading (1 1 1)
 hex (25 28 29 26 37 40 41 38) (4 10 10) simpleGrading (1 1 1)
 hex (28 30 31 29 40 42 43 41) (10 10 10) simpleGrading (1 1 1)
 hex (30 32 33 31 42 44 45 43) (4 10 10) simpleGrading (1 1 1)
 hex (32 34 35 33 44 46 47 45) (10 10 10) simpleGrading (1 1 1)
  );

edges
(
);

patches
(
 patch sparger (
              (4 6 7 5)
              )

 patch outlet (
    (36 37 38 39)
    (37 40 41 38 )
    (40 42 43 41)
    (42 44 45 43)
    (44 46 47 45)
                      )


 wall walls
 (
    (0 1 2 3)
    (1 4 5 2)
    (6 8 9 7)
    (8 10 11 9)
    (0 3 15 12)
    (10 11 23 22 )
    (0 1 13 12)
    (3 2 14 15)
    (1 4 16 13)
    (2 5 17 14)
    (4 6 18 16)
    (5 7 19 17)
    (6 8 20 18)
    (7 9 21 19)
    (8 10 22 20)
    (9 11 23 21)
    (13 16 17 14)
    (18 20 21 19)
    (12 15 27 24)
    (13 14 26 25)
    (16 17 29 28)
    (18 19 31 30)
    (20 21 33 32)
    (22 23 35 34)
    (13 16 28 25)
    (12 13 25 24)
    (16 18 30 28)
    (15 14 26 27)
    (14 17 29 26)
    (17 19 31 29)
    (18 20 32 30)
    (19 21 33 31)
    (20 22 34 32)
    (21 23 35 33)
    (25 28 29 26)
    (30 32 33 31)
    (24 25 37 36)
    (24 27 39 36)
    (25 26 38 37)
    (25 28 40 37)
    (26 29 41 38)
    (28 30 42 40)
    (30 32 44 42)
    (31 33 45 43)
    (29 31 43 41)
    (33 35 47 45)
    (32 34 46 44)
    (34 35 47 46)
    )
);

mergePatchPairs
(
);

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

This gives the following error on running blockMesh :
Code:

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

    From function polyMesh::polyMesh
(
    const IOobject&,
    const Xfer<pointField>&,
    const cellShapeList& cellsAsShapes,
    const faceListList& boundaryFaces,
    const wordList& boundaryPatchTypes,
    const wordList& boundaryPatchNames,
    const word& defaultBoundaryPatchType
)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 483.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/home/ifmg/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/ifmg/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libOpenFOAM.so"
#2  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::List<Foam::word> const&, Foam::word const&, Foam::word const&, Foam::List<Foam::word> const&, bool) in "/home/ifmg/OpenFOAM/OpenFOAM-1.7.0/lib/linuxGccDPOpt/libOpenFOAM.so"
#3 
 in "/home/ifmg/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linuxGccDPOpt/blockMesh"
#4 
 in "/home/ifmg/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linuxGccDPOpt/blockMesh"
#5 
 in "/home/ifmg/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linuxGccDPOpt/blockMesh"
#6  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#7 
 in "/home/ifmg/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linuxGccDPOpt/blockMesh"
Aborted

How do i specify wall boundary condition for the internal walls . I checked the forums for the same but no topic could help me out . Do suggest me on how to overcome this error .

kumar July 21, 2011 18:14

HI balakrishna,
Did you manage to mesh your internal boundaries. I have a similar problem with same error and want to use blockMesh to solve thisproblem.

Give me suggestions to solve this problem.


regards
K.SUresh kumar

wyldckat July 21, 2011 18:54

Greetings to both of you!

Check this tutorial: multiphase/interDyMFoam/ras/damBreakWithObstacle

See Allrun and createObstacle.setSet.

For more about setSet: http://openfoamwiki.net/index.php/SetSet

Best regards,
Bruno

balkrishna July 22, 2011 00:22

Yes ..... this was a long time ago .... i managed to do the meshing and run the case too .... The key was in not meshing the baffles .... i.e. i commented the lines in red ....
Code:

blocks
(
 hex (0 1 2 3 12 13 14 15) (10 10 10) simpleGrading (1 1 1)
 hex (1 4 5 2 13 16 17 14) (4 10 10) simpleGrading (1 1 1)
 hex (4 6 7 5 16 18 19 17) (10 10 10) simpleGrading (1 1 1)
 hex (6 8 9 7 18 20 21 19) (4 10 10) simpleGrading (1 1 1)
 hex (8 10 11 9 20 22 23 21) (10 10 10) simpleGrading (1 1 1)
 hex (12 13 14 15 24 25 26 27) (10 10 100) simpleGrading (1 1 1)
// hex (13 16 17 14 25 28 29 26) (4 10 100) simpleGrading (1 1 1)
hex (16 18 19 17 28 30 31 29) (10 10 100) simpleGrading (1 1 1)
// hex (18 20 21 19 30 32 33 31) (4 10 100) simpleGrading (1 1 1)
hex (20 22 23 21 32 34 35 33) (10 10 100) simpleGrading (1 1 1)
 hex (24 25 26 27 36 37 38 39) (10 10 10) simpleGrading (1 1 1)
 hex (25 28 29 26 37 40 41 38) (4 10 10) simpleGrading (1 1 1)
 hex (28 30 31 29 40 42 43 41) (10 10 10) simpleGrading (1 1 1)
 hex (30 32 33 31 42 44 45 43) (4 10 10) simpleGrading (1 1 1)
 hex (32 34 35 33 44 46 47 45) (10 10 10) simpleGrading (1 1 1)
  );


kumar July 22, 2011 01:54

HI Bruno,
Thanks for pointing the right direction. This is what I want. I already started looking in to the tutorial.

I think it will help me solve the problem.


regards
K.SUresh kumar

CHiller February 20, 2017 12:21

Internal Patches
 
Hi, I want to create an internal patch using blockMesh. But while generating the mesh I get an error. Can someone tell me how to create internal patches, boundaries or baffles with blockMesh? :confused:

sketch of the case:
https://dl.dropboxusercontent.com/s/...9_HDR.jpg?dl=0

blockMeshDict:
Code:

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

convertToMeters 1;

vertices
(
        ( 0  0  0) //  0
        (10  0  0) //  1
        (10  1  0) //  2
        ( 0  1  0) //  3
        (10  2  0) //  4
        ( 0  2  0) //  5
        (10  3  0) //  6
        ( 0  3  0) //  7
       
        ( 0  0  0.1) //  8
        (10  0  0.1) //  9
        (10  1  0.1) // 10
        ( 0  1  0.1) // 11
        (10  2  0.1) // 12
        ( 0  2  0.1) // 13
        (10  3  0.1) // 14
        ( 0  3  0.1) // 15
);

blocks
(

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

edges
(
);

patches
(
        patch inernalPatch
        (
                ( 5  4 12 13)
                ( 3 11 10  2)
        )
);

boundary
(
);

mergePatchPairs
(
);

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

The output after running blockMesh:
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  4.x                                  |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
/*  Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt  *\
|  Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com  |
\*---------------------------------------------------------------------------*/
Build  : 4.x-ed69f631ce88
Exec  : C:/PROGRA~1/BLUECF~1/OpenFOAM-4.x/platforms/mingw_w64GccDPInt32Opt/bin/blockMesh.exe
Date  : Feb 20 2017
Time  : 17:10:20
Host  : "FENNEK"
PID    : 1300
Case  : C:/PROGRA~1/BLUECF~1/ofuser-of4/run/incompressible/porousSimpleFoam/pultrusion_0215
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
    "C:/PROGRA~1/BLUECF~1/ofuser-of4/run/incompressible/porousSimpleFoam/pultrusion_0215/system/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Reading patches section

Creating block mesh topology

Reading physicalType from existing boundary file

Default patch type set to empty


--> FOAM FATAL ERROR:
Trying to specify a boundary face 4(5 4 12 13) 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 0 named inernalPatch.

    From function void Foam::polyMesh::setTopology(const cellShapeList&, const faceListList&, const wordList&, Foam::labelList&, Foam::labelList&, Foam::label&, Foam::label&, Foam::cellList&)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 324.

FOAM aborting

We're sorry, but the application crashed and safe stack tracing isn't available in this current implementation of blueCFD-Core patches for OpenFOAM.

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


KaLium April 21, 2017 06:00

Why are you using blockMesh for a complex geometry?

I would recommend snappyHexMesh.

alexeym April 21, 2017 09:16

Hi all,

@CHiller

Your blocks were merged, you as blockMesh said, you are trying to create patch inside the mesh (and it worries blockMesh). You have several choices:

1. Use 4 additional points (though with identical coordinates) to avoid automatic block merging.
2. Use createBaffles utility to create "patch" inside a mesh.

@KaLium

Complex geometry?


All times are GMT -4. The time now is 07:32.