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 multiple merging on same hex (https://www.cfd-online.com/Forums/openfoam-meshing/213073-blockmesh-multiple-merging-same-hex.html)

krzychu111 December 13, 2018 17:14

blockMesh multiple merging on same hex
 
1 Attachment(s)
Hi,


I'm working on mesh which should be merged from four different sub-parts and I'm using blockMesh to do it. I'm on step where I have four blocks (see numbers on the enclosed image). But when I try to merge four boundaries (four dotted lines) only first two merges work fine and on the third merge there is always error like this:


Code:

Creating merge patch pairs

Adding point and face zones
Creating attachPolyTopoChanger


--> FOAM FATAL ERROR:
Face 164393 reduced to less than 3 points.  Topological/cutting error A.
Old face: 2(74389 74570) new face: 2(74389 74570)

    From function void Foam::slidingInterface::coupleInterface(Foam::polyTopoChange&) const
    in file slidingInterface/coupleSlidingInterface.C at line 1461.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::slidingInterface::coupleInterface(Foam::polyTopoChange&) const at ??:?
#3  Foam::polyTopoChanger::topoChangeRequest() const at ??:?
#4  Foam::polyTopoChanger::changeMesh(bool, bool, bool, bool) at ??:?
#5  Foam::attachPolyTopoChanger::attach(bool) at ??:?
#6  ? in "/usr/bin/blockMesh"
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  ? in "/usr/bin/blockMesh"
Aborted (core dumped)


This happens always on the third merge even if I change the order. So I guess first two are changing something on the geometry and makes next two meshes impossible.


I'm using mergePatchPairs because I want to have different mesh sizes on merge faces.


Does anyone have any idea what should I do to succeed in merging these four patches?


Thanks,
Krzysztof

Antimony December 20, 2018 00:03

Hi,

There is a long-winded way to solve your problem.

1. Create the 4 meshes separately
2. Merge meshes 1 & 2 using mergeMesh. Let us call this mesh12
3. While this is happening, you can concurrently merge meshes 3 & 4 using mergeMesh as well. Let us call this mesh34
4. Use stitchMesh on mesh12 using the right patch of mesh 1 & left patch of mesh 2 are the master & slave patches.
5. After step 4, use createPatch to combine the top surfaces of mesh12 so that you have a single top patch (call top12). Similarly you can do for the bottom surfaces (call it bottom12).
6. Repeat 4 & 5 with mesh34. Call the respective patches top34 & bottom34.
7. Merge meshes mesh12 and mesh34. Call it mesh1234
8. Stitch mesh1234 using top12 and bottom34 as your master & slave patches.

End result you will have a single mesh.

Alternatively, since mergePatchPairs will work at least once, you could generate two of them together and then do a similar thing as above. So when you create your meshes, instead of creating 4 separate meshes, you could generate say mesh 1 & 2 together (and specify the merging patches in blockMeshDict itself) & do the same for mesh 3 & 4.

You then follow step 8 from above with the correct patch names.

Hope this helps.

Cheers,
Antimony


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