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

[blockMesh] blockMesh, mergePatchPairs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2020, 12:27
Question blockMesh, mergePatchPairs
  #1
Member
 
nikhil108's Avatar
 
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 6
nikhil108 is on a distinguished road
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)
//
);
nikhil108 is offline   Reply With Quote

Old   December 18, 2020, 01:38
Default
  #2
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
If the faces to be merged are conformal, i.e. all the points on both faces are overlapping, then you might want to try the Face Matching technique. See this great document at page 50, although I recommend studying the whole document as it has a lot of useful stuff: http://www.wolfdynamics.com/wiki/mes..._blockmesh.pdf

Cheers, Claudio
Ship Designer is offline   Reply With Quote

Reply

Tags
blockmesh, facematching, mergepatchpairs


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] blockMesh, mergePatchPairs nikhil108 OpenFOAM Meshing & Mesh Conversion 0 November 24, 2020 12:21
[blockMesh] blockMesh | MergePatchPairs | snappyHexMesh |Different number of cells in divisions pythag0ra5 OpenFOAM Meshing & Mesh Conversion 1 September 19, 2020 15:38
[mesh manipulation] mergePatchPairs after running blockMesh ashishmagar600 OpenFOAM Meshing & Mesh Conversion 2 March 8, 2019 05:15
[blockMesh] Error running blockMesh with mergePatchPairs on OF2.4.0 deepbandivadekar OpenFOAM Meshing & Mesh Conversion 1 November 25, 2017 15:50
[blockMesh] BlockMesh documentation User Guide clearance of mergePatchPairs proposals benru OpenFOAM Meshing & Mesh Conversion 0 June 9, 2008 03:22


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