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, mergePatchPairs (https://www.cfd-online.com/Forums/openfoam-meshing/231951-blockmesh-mergepatchpairs.html)

nikhil108 November 24, 2020 11:21

blockMesh, mergePatchPairs
 
2 Attachment(s)
Hallo foamers:),

I have 5 blocks, which have to be joined together and form 1 block. Only the faces exposed to the outside are supposed to be defined as patches. So, I want to merge faces that are in the middle of the domain. I tried to use mergePatchPairs for that, but unable to merge all patches. The following figures explain the problem more in detail. The yellow faces in the figure have to be merged (to internal faces) and blue faces have to defined as patches. blockMesh file is attached below. I used mergePatchPairs to merge faces, but it works for only any one of the blocks. for example, if I merge face from block 1 to face from block 2 then I cant merge the face from block 1 to face from block 3, don't know why it's not working. Is there any way to do this? Please someone shed some light on this.

cheers,
nick.

Code:

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

convertToMeters 1;

vertices
(

//block01

(-15  0.12  0.00)//0       
( 15  0.12  0.00)//1
( 15  20.0  0.00)
(-15  20.0  0.00)
(-15  0.12  8.00)//4       
( 15  0.12  8.00)//5
( 15  20.0  8.00)
(-15  20.0  8.00)

//block02

(-15  -0.40  0.00)//8       
(-1  -0.40  0.00)
(-1    0.12  0.00)
(-15  0.12  0.00)//11
(-15  -0.40  8.00)//12       
(-1  -0.40  8.00)
(-1    0.12  8.00)
(-15  0.12  8.00)//15


//block03

(-1  -0.40  0.00)       
(5.0  -0.40  0.00)
(5.0  0.12  0.00)
(-1    0.12  0.00)
(-1  -0.40  8.00)       
(5.0  -0.40  8.00)
(5.0  0.12  8.00)
(-1    0.12  8.00)

//block04

(5.0  -0.40  0.00)       
(15  -0.40  0.00)//25
(15    0.12  0.00)//26
(5.0  0.12  0.00)
(5.0  -0.40  8.00)       
(15  -0.40  8.00)//29
(15    0.12  8.00)//30
(5.0  0.12  8.00)

//block05

(-15  -20.0  0.00)       
( 15  -20.0  0.00)
( 15  -0.40  0.00)//34
(-15  -0.40  0.00)//35
(-15  -20.0  8.00)       
( 15  -20.0  8.00)
( 15  -0.40  8.00)//38
(-15  -0.40  8.00)//39



);

blocks  //(0 1 3 2 4 5 7 6)
(
  hex (0 1 2 3 4 5 6 7)        (60 60 20) simpleGrading (1 1 1) //block1
  hex (08 09 10 00 12 13 14 04) (60 60 20) simpleGrading (1 1 1) //block2
  hex (16 17 18 19 20 21 22 23) (60 60 20) simpleGrading (1 1 1) //block3
  hex (24 25 01 27 28 29 05 31) (60 60 20) simpleGrading (1 1 1) //block4
  hex (32 33 25 08 36 37 29 12) (60 60 20) simpleGrading (1 1 1) //block5

);

edges
(
);


boundary             
    (
        bt01
        {
                type        empty;
                faces ( (0 1 5 4) );
        }
        bt02
        {
                type        empty;
                faces ( (00 04 14 10) );
        }
        bt03
        {
                type        empty;
                faces ( (19 23 22 18) );
        }
        bt04
        {
                type        empty;
                faces ( (27 31 05 01) );
        }


        up05
        {
                type        empty;
                faces ( (08 12 29 25) );
        }
        up02
        {
                type        empty;
                faces ( (8 9 13 12) );
        }
        up03
        {
                type        empty;
                faces ( (16 17 21 20) );
        }
        up04
        {
                type        empty;
                faces ( (24 25 29 28) );
        }

        rt02
        {
                type        empty;
                faces ( (9 10 14 13) );
        }
        rt03
        {
                type        empty;
                faces ( (17 18 22 21) );
        }
        lt03
        {
                type        empty;
                faces ( (16 20 23 19) );
        }
        lt04
        {
                type        empty;
                faces ( (24 28 31 27) );
        }


    );


mergePatchPairs
(
(up05 up02)
(up05 up03)
(up05 up04)
//
(bt01 bt02)
(bt01 bt03)
(bt01 bt04)
//

//(rt02 lt03)
//(rt03 lt04)
//
);



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