CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

mergePatchPairs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2020, 12:29
Default 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)
//
);
Attached Images
File Type: jpg blocks.JPG (29.8 KB, 7 views)
File Type: jpg blocks_faces.jpg (84.6 KB, 10 views)
nikhil108 is offline   Reply With Quote

Old   November 24, 2020, 23:37
Default
  #2
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 6
Rango is on a distinguished road
Hi Nick,

Quote:
Originally Posted by nikhil108 View Post
don't know why it's not working.
Can you please be more specific on this part? Do you get any error while running the application or it runs but does not create your desired result?

If I am not mistaken, this bug report discusses a similar issue: https://bugs.openfoam.org/view.php?id=347

Cheers
Rango is offline   Reply With Quote

Old   November 25, 2020, 17:14
Default
  #3
Member
 
nikhil108's Avatar
 
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 6
nikhil108 is on a distinguished road
It's not running, getting an error same as in the issue: https://bugs.openfoam.org/view.php?id=347. I am facing a similiar issue,
Thanks for pointing to the link, now it's running without errors. But still confused about the difference between facematching, mergePatchPairs, and stichMesh features. When i used mergePatchPairs feature to merge 2 meshes, i got cell errors when using snappy, but with stichMesh it seems working. Dont know the reason :\
nikhil108 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] mergePatchPairs master with few slaves piprus OpenFOAM Meshing & Mesh Conversion 4 May 24, 2024 15:24
[blockMesh] mergePatchPairs problem when migrating from OFext1.6 to OFext3.1 ma-tri-x OpenFOAM Meshing & Mesh Conversion 2 January 12, 2021 05:23
[mesh manipulation] mergePatchPairs after running blockMesh ashishmagar600 OpenFOAM Meshing & Mesh Conversion 2 March 8, 2019 05:15
[blockMesh] mergePatchPairs reducing a face to less than 3 points aow OpenFOAM Meshing & Mesh Conversion 2 June 1, 2018 18:37
[mesh manipulation] mergePatchPairs with multiple areas bjoern1 OpenFOAM Meshing & Mesh Conversion 1 October 1, 2015 08:07


All times are GMT -4. The time now is 13:01.