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

[snappyHexMesh] Mesh contains holes on interface of multiregion case

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2019, 09:14
Default Mesh contains holes on interface of multiregion case
  #1
New Member
 
Dries Allaerts
Join Date: Nov 2019
Posts: 4
Rep Power: 6
DriesAllaerts is on a distinguished road
Hi all,

I'm trying to use snappyHexMesh to create meshes for multiregion cases. I have a separate stl file for every region, and I start from a background mesh generated by blockMesh. I'm only using the castellatedMesh step, snap and addLayers is set to false. snappyHexMesh works fine when the interface between different regions is flat. When the interface is curved, however, some holes appear in the mesh on the interface (see MWE_fig2 for example). I think this problem is related to the fact that curved surfaces are triangulated in the stl files, and very small differences in triangulation are conceived by snappy as a hole in the geometry which does not need to be meshed.

I created a minimal working example to illustrate the issue. The example consists of two concentric cylinders corresponding to a fluid and a solid region (see MWE_fig1). Figure MWE_fig2 shows a close up of the mesh at the interface, showing that there are several holes in the mesh. Figure MWE_fig3 shows the interface patch solid_to_fluid in red, and the white line across the interface correspond to faces that are erroneously indentified as a boundary face with patchtype wall instead of a mappedWall between solid and fluid.

The main consequence of these holes is that part of the interface is converted into insulatedWalls, so the effective area through which heat is exchanged between fluid and solid is reduced. A secondary consequence is that some of the faces are assigned to the wrong region: the solid has a patch fluid_patch0 that originates from the fluid stl file, and the fluid has a patch solid_patch0 which originates from the solid stl file. I attached a log file with the output of blockMesh, surfaceFeatureExtract and splitMeshRegions.

I have tried several things to solve this issue but without succes. Increasing the original block mesh resolution does not solve the issue. Adding refinement levels does not solve the issue. The stl files are extracted from AutoDesk Inventor; increasing the resolution of the surface triangulation in the stl file reduces the amount of holes, though even at the highest resolution there are still holes in the mesh. Turning on the snapping phase closes the holes, but the faces corresponding to the deleted cells remain boundary faces with patch type wall, which means that the effective interface area is still reduced. I also tried nCellZoneErodeIter, handleSnapProblems, and increasing the mergeTolerance, but none of them has any effect. Setting gapLevelIncrement makes the problem worse.

Has anyone encountered similar issues and did you find a solution? Should this be reported as a bug in snappyHexMesh?

Thanks for looking into this case.
Dries Allaerts
Attached Images
File Type: jpg MWE_fig1.jpg (20.9 KB, 59 views)
File Type: jpg MWE_fig2.jpg (168.3 KB, 63 views)
File Type: jpg MWE_fig3.jpg (29.7 KB, 59 views)
Attached Files
File Type: gz MWE.tar.gz (22.3 KB, 5 views)
File Type: txt log.txt (24.4 KB, 3 views)
DriesAllaerts is offline   Reply With Quote

Old   December 15, 2019, 14:52
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,


try to activate the allowFreeStandingZoneFaces option in the snappyHexMeshDict file.


Code:
castellatedMeshControls                                                         
{                                                                               
    maxLocalCells 8000000;                                                      
    maxGlobalCells 2000000;                                                     
    minRefinementCells 0;                                                       
    maxLoadUnbalance 0.20;                                                      
    nCellsBetweenLevels 3;                                                      
                                                                                
    features                                                                    
    (                                                                           
    );                                                                          
                                                                                
    refinementSurfaces                                                          
    {                                                                           
    }                                                                           
                                                                                
    refinementRegions                                                           
    {                                                                           
    }                                                                           
                                                                                
    // Resolve sharp angles                                                     
    resolveFeatureAngle 30;                                                     
                                                                                
    locationInMesh (0.005 -0.1 0.1);                                            
                                                                                
    allowFreeStandingZoneFaces yes;                                             
}
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2019, 03:48
Default
  #3
New Member
 
Dries Allaerts
Join Date: Nov 2019
Posts: 4
Rep Power: 6
DriesAllaerts is on a distinguished road
Hi Tobias,

Thank you for your suggestion! I activated the freeStandingZoneFaces flag in my minimal working example , but unfortuantely it did not affect the mesh in any way. There are still holes on the interface between fluid and solid; and the fluid still has a boundary patch "solid_patch0" (not to be confused with the interface patch "fluid_to_solid"), and the solid still has a boundary patch "fluid_patch0".

Let me know if you think of other options that might solve this problem.

Thank you for your interest in the issue.

Dries
DriesAllaerts is offline   Reply With Quote

Old   December 17, 2019, 04:08
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,


with your hint about the additional patch, everything is clear. You two STL surfaces are not equal and thus, you get some small gaps in between the connecting triangulated surfaces. SnappyHexMesh realizes that and put a new region in. Therefore, you also get these new patches.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2019, 04:32
Default
  #5
New Member
 
Dries Allaerts
Join Date: Nov 2019
Posts: 4
Rep Power: 6
DriesAllaerts is on a distinguished road
Thanks Tobias, your explanation makes sense. My next question is then: How can I avoid this issue? The geometries are generated with AutoDesk Inventor, and they are saved as binary stl files at the highest resolution possible in Inventor. Whenever I have a geometry with a curved fluid-solid interface, I will face the same issue due to the surface triangulation. Is there a way to specify a surface tolerance with snappyHexMesh? Or is there another way to use snappyHexMesh to mesh multiRegion cases with curved interfaces?

Thanks
Dries
DriesAllaerts is offline   Reply With Quote

Old   December 17, 2019, 04:41
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Its up to you how you want to deal with that. I prefer using Salome meca. However, blender is also a good choice. It depends which software you like and which fits best for you. I cannot make a statement to that actually.



If snappyHexMesh is able to handle something with tolerances, I don't know. Another option would be:



- meshing region 1
- meshing region 2


within single meshing procedures.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2019, 04:43
Default
  #7
New Member
 
Dries Allaerts
Join Date: Nov 2019
Posts: 4
Rep Power: 6
DriesAllaerts is on a distinguished road
Okay, thanks for your help! I'll have a look at Salome or Blender.

Dries
DriesAllaerts is offline   Reply With Quote

Reply

Tags
multiregion meshing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 06:21


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