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

[mesh manipulation] Is there a quick way to merge all internal faces (defaultFaces) for multiple blocks?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2020, 11:50
Question Is there a quick way to merge all internal faces (defaultFaces) for multiple blocks?
  #1
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 7
Ship Designer is on a distinguished road
Hello all,

I'm attempting to create a hexahedral domain with multiple blocks in order to obtain better control over cell density where it is really needed, see attached pictures. The blocks are defined in blockMesh and the boundary patches are created later on with createPatch, which works quite well and produces an error free mesh according to checkMesh. The tricky part is merging the internal boundaries between the blocks. Most of the patches have the same congruent area, but the faces don't match and need to be connected.

The methods I've tried so far have all one big disadvantage in common, that is that for each internal block, up to six patches need to be defined in blockMeshDict and then be merged one by one with the respective neighbour. For a domain with say 30 blocks, that's about a 150 internal patches or so without the external boundaries. It becomes clear that this becomes quickly unmanageable and time consuming.

If there would be a way to say "merge all internal faces that touch eachother", without having to define them one by one, that would simplify things a lot. At least createPatch removes all patches with no faces and so only the external boundaries remain, which is very good. Any ideas?

I first tried with mergePatchPairs () but it has limitations. It doesn't work in situations where a patch becomes both a master and a slave, even for subsequent patch pairs. It appears that it tries to merge all listed patches at once.

A workaround that works much better is by using stitchMesh -noFields -overwrite for every patch pair to merge with a shell script. At every call the mesh gets overwritten and so the mesh gets only one master and slave at a time. However, sometimes it still gives fatal errors with faces with less than 3 points or similar but I still have to investigate why that is, as this varies depending on block cell subdivision.

I've also tried attachMesh but it does nothing. It gives no errors but the initial regions created by blockMesh remain separate.

I'm grateful for any suggestions, thanks!
Attached Images
File Type: jpg Multi-Block Mesh Top with Hull Overlaid.jpg (65.5 KB, 45 views)
File Type: jpg Multi-Block Mesh Top with Hull Overlaid 2.jpg (114.3 KB, 39 views)
Ship Designer is offline   Reply With Quote

Reply

Tags
defaultfaces, grading, hex mesh, merge, multiple blocks


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
[snappyHexMesh] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 09:26
[snappyHexMesh] Layers not growing at all zonda OpenFOAM Meshing & Mesh Conversion 12 June 6, 2020 12:28
parallel run OpenFoam Srinath Reddy OpenFOAM Running, Solving & CFD 13 February 27, 2019 10:15
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) AndreP STAR-CCM+ 10 August 2, 2018 08:48
[Other] How to create an MRF zone ? aminem OpenFOAM Meshing & Mesh Conversion 2 December 8, 2014 11:45


All times are GMT -4. The time now is 18:22.