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] mergePatchPairs master with few slaves (https://www.cfd-online.com/Forums/openfoam-meshing/73241-mergepatchpairs-master-few-slaves.html)

piprus March 2, 2010 17:18

mergePatchPairs master with few slaves
 
Hey people,

I encountered some small problem with the mergePatchPairs and I'm eager to know how to solve it. There is a following simple situation.

Let say we have 4 hexahedrals, one of them is a base and three others are connected on top of the first one, but they don't touch each other. So in other words, there is one face of the base (mainFace) and 3 faces of those 3 blocks (face1, face2, face3) which are standing on the base. So how should I define mergePatchPairs in order to get rid of interfaces between hexes/blocks?

According to the Manual, where it's written:
There are some additional recommendations to ensure successful merge procedures:
> where a patch to be merged shares a common edge with another patch to be merged, both should be declared as a master patch.
I supposed to do it in a following manner:
Code:

mergePatchPairs
(
    ( mainFace face1 )
    ( mainFace face2 )
    ( mainFace face3 )
);

Am I right?

So what's the problem? Why I'm getting again and again the same error:
Code:

--> FOAM FATAL ERROR:
face 277 already marked for removal

    From function polyTopoChange::removeFace(const label, const label)
    in file polyTopoChange/polyTopoChange/polyTopoChange.C at line 2807.

Sounds like my master patch disappers every time;(

Or maybe I'm wrong and it means that I suppose to cut my base at least into 3 pieces in order to connect 3 blocks? But, is it the only way?!

Maybe I should mention that I'm using OF 1.6.x.

piprus March 3, 2010 05:24

Ok, since I'm focused on removing interfaces from the common edge, I should care more about the "cutting tools". I mean the mergePatchPairs suppose to look like below:

Code:

mergePatchPairs
(
    ( face1 mainFace )
    ( face2 mainFace )
    ( face3 mainFace )
);

Now everything looks better from the mainFace point of view, since I want to keep it.

But there is still something wrong, because I got again the same error ;(

piprus March 3, 2010 09:08

Solved
 
Ok, since nobody helps me, I came up with a simple solution. Just follow my steps:
1) The easiest way to get rid of few interfaces from one face is to put all of the faces that suppose to be removed later on in one patch - doesn't really matter whether you have one or six or even more faces to remove - I will call this patch cuttingFaces.
2) Then you have to define a patch, let say mainFace, which should stay after all.
3) Since you've done it you have to now define mergePatchPairs like below
Code:

mergePatchPairs
(
    ( cuttingFaces mainFace )
);

And that's all :)

If you find some problems with it, it means likely that your grid is not enough dense.

unnikrsn November 8, 2012 09:32

Thanks for your tip..

It is very helpful.. :)


All times are GMT -4. The time now is 08:42.