CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] remove internal face automaticaly created and which don't have any physical meaning

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By Voulet
  • 1 Post By Antimony
  • 1 Post By Voulet

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2019, 08:31
Default remove internal face automaticaly created and which don't have any physical meaning
  #1
Member
 
Join Date: Jun 2019
Posts: 41
Rep Power: 6
Voulet is on a distinguished road
Hi all.

I'm trying to mesh a canal which contain an little obstacle (area with no mesh) here is a very rough sketch of how I mesh it with 10 blocks :

At the junctions betweens some groups of hex blocks (in purple), blockMesh is generating some faces with are put in a defaultface patch that I don't want: here is a picture of the mesh:
the horizontal red faces are my defaultFace patch ( the vertical red faces are a patch were I'll apply a heating boudary condition)



Why does blockMesh is doing this ? I've no duplicated nodes (i've checked with gmsh). Can someone give me some advices me to cope with this ? I've heard about stitchMesh and topoSet but i don't see how I can use them to remove theses face from my mesh.



Here is my blockMeshDict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    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
    (1. 0. 0.) //1
    (1. 0. 1.) //2
    (0. 0. 1.) //3
    (0. 2.5 0.) //4 
    (1. 2.5 0.) //5
    (1. 2.5 1.) //6
    (0. 2.5 1.) //7
    (0. 7.5 0.) //8
    (1. 7.5 0.) //9
    (1. 7.5 1.) //10
    (0. 7.5 1.) //11
    (0. 10. 0.) //12
    (1. 10. 0.) //13
    (1. 10. 1.) //14
    (0. 10. 1.) //15
    (0.6 4.5 0.)//16 boite chauffante face bas
    (0.75 4.5 0.)//17
    (0.75 4.5 1.)//18
    (0.6 4.5 1.)//19
    (0.6 5.5 0.)//20 boite chauffante haut
    (0.75 5.5 0.)//21
    (0.75 5.5 1.)//22
    (0.6 5.5 1.)//23
    (0. 4.5 0.)//24 limite basse boite chauffante pour bloc 2
    (1. 4.5 0.)//25
    (1. 4.5 1.)//26
    (0. 4.5 1.)//27
    (0. 5.5 0.)//28 limite haute boite chauffante pour bloc 3 et 4
    (1. 5.5 0.)//29
    (1. 5.5 1.)//30
    (0. 5.5 1.)//31
    (0.6 2.5 0.)//32 boite chauffante tout en bas
    (0.75 2.5 0.)//33
    (0.75 2.5 1.)//34
    (0.6 2.5 1.)//35
    (0.6 7.5 0.)//36 boite chauffante tout en haut
    (0.75 7.5 0.)//37
    (0.75 7.5 1.)//38
    (0.6 7.5 1.)//39
);

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

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 1 2 3)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (14 13 12 15)
        );
    }
    paroiAdiabatique 
    {
        type wall;
        faces
        (
            (7 4 0 3)
            (15 12 8 11)
            (9 13 14 10)
            (29 9 10 30)
            (25 29 30 26)
            (5 25 26 6)
            (1 5 6 2)
            (22 18 17 21)
            (21 22 23 20)
            (16 19 18 17)
        );
    }
   paroiChaude 
    {
    type wall;
    faces
    (
        (11 8 28 31)
        (31 28 24 27)
        (27 24 4 7)
        (20 23 19 16)
    );
    }
    frontAndBack
    {
        type empty;
        faces
        (
            (6 7 3 2)
            (19 27 7 35)
            (18 19 35 34)
            (26 18 34 6)
            (23 31 27 19)
            (30 22 18 26)
            (39 11 31 23)
            (38 39 23 22)
            (10 38 22 30)
            (14 15 11 10)
            (4 5 1 0)
            (24 16 32 4)
            (16 17 33 32)
            (17 25 5 33)
            (28 20 16 24)
            (21 29 25 17)
            (8 36 20 28)
            (36 37 21 20)
            (37 9 29 21)
            (12 13 9 8)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
        //(6 5 33 34) here and bellow planes corresponding
        //(34 33 32 35) to defaultFace
        //(35 32 4 7)
        //(10 9 37 38)
        //(38 37 36 39)
        //(39 36 8 11)
        //(9 8 11 10)
        //(5 4 7 6)
mohsenmechanic likes this.
Voulet is offline   Reply With Quote

Old   July 1, 2019, 06:28
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi Voulet,

It is a consequence of the way blocks 2,3 4 (on one side) and block 1 (on the other side) meet. To avoid it, what you can do is to split up block 1 into 3 blocks such that block 1a uses some of the same vertices as block 2, block 1b uses some of the same vertices as block 3 and block 1c uses some of the same vertices as block 4.

I think this is best illustrated when you look at this modified blockMeshDict.

Look particularly at what block 1 has been replaced by in the code below:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
 | =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    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
    (1. 0. 0.) //1
    (1. 0. 1.) //2
    (0. 0. 1.) //3
    (0. 2.5 0.) //4 
    (1. 2.5 0.) //5
    (1. 2.5 1.) //6
    (0. 2.5 1.) //7
    (0. 7.5 0.) //8
    (1. 7.5 0.) //9
    (1. 7.5 1.) //10
    (0. 7.5 1.) //11
    (0. 10. 0.) //12
    (1. 10. 0.) //13
    (1. 10. 1.) //14
    (0. 10. 1.) //15
    (0.6 4.5 0.)//16 boite chauffante face bas
    (0.75 4.5 0.)//17
    (0.75 4.5 1.)//18
    (0.6 4.5 1.)//19
    (0.6 5.5 0.)//20 boite chauffante haut
    (0.75 5.5 0.)//21
    (0.75 5.5 1.)//22
    (0.6 5.5 1.)//23
    (0. 4.5 0.)//24 limite basse boite chauffante pour bloc 2
    (1. 4.5 0.)//25
    (1. 4.5 1.)//26
    (0. 4.5 1.)//27
    (0. 5.5 0.)//28 limite haute boite chauffante pour bloc 3 et 4
    (1. 5.5 0.)//29
    (1. 5.5 1.)//30
    (0. 5.5 1.)//31
    (0.6 2.5 0.)//32 boite chauffante tout en bas
    (0.75 2.5 0.)//33
    (0.75 2.5 1.)//34
    (0.6 2.5 1.)//35
    (0.6 7.5 0.)//36 boite chauffante tout en haut
    (0.75 7.5 0.)//37
    (0.75 7.5 1.)//38
    (0.6 7.5 1.)//39
	
	
	
	(0.6 0 0) //40
	(0.75 0 0) //41
	(0.6 0 1) //42 
	(0.75 0 1) //43
);

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

boundary
(
    inlet
    {
        type patch;
        faces
        (
//            (0 1 2 3)
			  (0 40 42 3)
			  (40 41 43 42)
			  (41 1 2 43)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (14 13 12 15)
        );
    }
    paroiAdiabatique 
    {
        type wall;
        faces
        (
            (7 4 0 3)
            (15 12 8 11)
            (9 13 14 10)
            (29 9 10 30)
            (25 29 30 26)
            (5 25 26 6)
            (1 5 6 2)
            (22 18 17 21)
            (21 22 23 20)
            (16 19 18 17)
        );
    }
   paroiChaude 
    {
    type wall;
    faces
    (
        (11 8 28 31)
        (31 28 24 27)
        (27 24 4 7)
        (20 23 19 16)
    );
    }
    frontAndBack
    {
        type empty;
        faces
        (
 //           (6 7 3 2)
			(35 7 3 42)
			(34 35 42 43)
			(6 34 43 2)
 
            (19 27 7 35)
            (18 19 35 34)
            (26 18 34 6)
            (23 31 27 19)
            (30 22 18 26)
            (39 11 31 23)
            (38 39 23 22)
            (10 38 22 30)
            (14 15 11 10)

//            (4 5 1 0)
			(4 32 40 0)
			(32 33 41 40)
			(33 5 1 41)


            (24 16 32 4)
            (16 17 33 32)
            (17 25 5 33)
            (28 20 16 24)
            (21 29 25 17)
            (8 36 20 28)
            (36 37 21 20)
            (37 9 29 21)
            (12 13 9 8)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
        //(6 5 33 34) here and bellow planes corresponding
        //(34 33 32 35) to defaultFace
        //(35 32 4 7)
        //(10 9 37 38)
        //(38 37 36 39)
        //(39 36 8 11)
        //(9 8 11 10)
        //(5 4 7 6)
Hope this helps.

Cheers,
Antimony
mohsenmechanic likes this.
Antimony is offline   Reply With Quote

Old   July 1, 2019, 07:14
Default
  #3
Member
 
Join Date: Jun 2019
Posts: 41
Rep Power: 6
Voulet is on a distinguished road
Hello. Thanks for your answer and your mesh edit. I've perfecly understood what you meant. It works.
mohsenmechanic likes this.
Voulet is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



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