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

[snappyHexMesh] SnapProblem in MultiRegion case

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Hr_kules

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2020, 16:46
Default SnapProblem in MultiRegion case
  #1
New Member
 
Javier Kunstmann
Join Date: Dec 2018
Posts: 3
Rep Power: 7
jav.kunst is on a distinguished road
Dear all,

I am trying to create a mesh for a conjugate heat transfer case and am unable to come up with a proper result. I have followed all the tutorials but I cannot reach an acceptable result.
First, I make it clear that I am using OpenFOAM 1912 and I use SALOME to condition STL files for high triangle density and well conditioning.
Second, the idea of generating this mesh is not to run chtMultiRegion solver on this same mesh, but to understand how snappyHexMesh works with this geometry that is not as basic as the one in the tutorial, but is less complex and therefore faster to analyze than the geometry that if I have to parse with chtMultiRegion solver.

The geometry I'm testing is a simple heat exchanger, please see attached geometry.png
The generation of the mesh is in the same way as the snappyMultiRegionHeater tutorial, I create an STL file in constant / triSurface / heat_exchanger.stl that contains in this case all the surfaces of the 3 media.
a part of the surfaceCheck output in heat_exchanger.stl

Region Size
------ ----
external 257693
inlet_external_fluid 3353
inlet_internal_fluid 3389
outlet_external_fluid 3575
outlet_internal_fluid 3577
shell_to_external_fluid 305629
shell_to_internal_fluid 114501
symmetry_external_fluid 166895
symmetry_internal_fluid 86793
symmetry_shell 213945

Well, already explained how I build the mesh, I explain the problems I have with the snap stage, as you can see in the photos, between some surfaces I get concavities, these concavities can be eliminated by activating ¨strictRegionSnap true; ¨, but when activating this function I get a bad mesh between regions.
I have tried with:
- implicit method, the result is worse
-activating ¨multiRegionFeatureSnap true; ¨, but the result is the same (I can't identify
when this function is useful)
-higher number of iterations in nSmoothPatch, nSmoothInternal, nSolveIter and
nFeatureSnapIter

if necessary I can share the case folder by GoogleDrive, I don't do it here because the stl is big

Please if anyone can help me I would be very grateful, I have a few weeks with this.

Javier

geometry.png

problem.jpg

system.zip
jav.kunst is offline   Reply With Quote

Old   May 26, 2020, 01:54
Default
  #2
New Member
 
Javier Kunstmann
Join Date: Dec 2018
Posts: 3
Rep Power: 7
jav.kunst is on a distinguished road
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//#includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg"

castellatedMesh true;   
snap            true;
addLayers       false;

geometry
{
    heat_exchanger.stl
    {
        type    triSurfaceMesh;
        name	heat_exchanger;

        regions 
        {
            external                        {name   external;}
            inlet_external_fluid            {name   inlet_external_fluid;}
            inlet_internal_fluid            {name   inlet_internal_fluid;}
            //shell_to_external_fluid         {name   shell_to_external_fluid;}
            //shell_to_internal_fluid         {name   shell_to_internal_fluid;}
            outlet_external_fluid           {name   outlet_external_fluid;}
            outlet_internal_fluid           {name   outlet_internal_fluid;}
            symmetry_external_fluid         {name   symmetry_external_fluid;}
            symmetry_internal_fluid         {name   symmetry_internal_fluid;}
            symmetry_shell                  {name   symmetry_shell;}

        }
    }
}

castellatedMeshControls
{
    maxLocalCells 8000000;
    maxGlobalCells 10000000;
    minRefinementCells 0;
    maxLoadUnbalance 0.1;//0.0;
    nCellsBetweenLevels 2; 
    features
    (
        { file "heat_exchanger.eMesh";  level 3;}	
    );

    refinementSurfaces
    {
        heat_exchanger
        {
            level   (1 3);			

            regions
            {																	
                external                        {level   (2 3); patchInfo	{type patch;}} 		
                inlet_external_fluid            {level   (2 3); patchInfo	{type patch;}} 		
                inlet_internal_fluid            {level   (2 3); patchInfo	{type patch;}} 			
                outlet_external_fluid           {level   (2 3); patchInfo	{type patch;}} 		
                outlet_internal_fluid           {level   (2 3); patchInfo	{type patch;}} 		
                symmetry_external_fluid         {level   (2 3); patchInfo	{type symmetry;}} 	
                symmetry_internal_fluid         {level   (2 3); patchInfo   {type symmetry;}}	                
                symmetry_shell                  {level   (2 3); patchInfo   {type symmetry;}}	
            }
        }
    }

	refinementRegions
    {}

    resolveFeatureAngle 5;																		
    planarAngle 5;																		
    //locationInMesh (0.00001 0.00001 0.00001); // Offset from (0 0 0) to avoid
    locationsInMesh 
    (
        ((0.01001 0.00001 0.00001) internal_fluid)
        ((0.06001 0.00001 0.00001) external_fluid)
        ((0.01001 0.02501 0.00001) shell)
    );
    allowFreeStandingZoneFaces true;
}

snapControls
{
    nSmoothPatch 12;

    nSmoothInternal $ nSmoothPatch;

    tolerance 4.0;

    nSolveIter 100;//30;

    nRelaxIter 5;
    	nFeatureSnapIter 20;
        nFaceSplitInterval 10; 
        implicitFeatureSnap false;
    	explicitFeatureSnap true;
    	multiRegionFeatureSnap false;/
          
    strictRegionSnap    false; 


}

addLayersControls
{

}

meshQualityControls
{
	#include "meshQualityDict"
	nSmoothScale 4;
	errorReduction 0.75;
}
writeFlags
(
    scalarLevels
    layerSets
    layerFields
);

mergeTolerance 1e-6;

// ************************************************************************* //
jav.kunst is offline   Reply With Quote

Old   March 19, 2023, 18:26
Default
  #3
New Member
 
Join Date: Jun 2013
Posts: 5
Rep Power: 12
Moopie is on a distinguished road
I'm having the same problem, did you ever find a solution to this?
Moopie is offline   Reply With Quote

Old   March 19, 2023, 18:40
Default
  #4
New Member
 
Javier Kunstmann
Join Date: Dec 2018
Posts: 3
Rep Power: 7
jav.kunst is on a distinguished road
Moppie
unfortunately no, i'm not using OF anymore, but if you find the solution it would be great if you share it here, i have some projects that i would like to simulate before doing some tests
jav.kunst is offline   Reply With Quote

Old   March 21, 2023, 08:39
Default
  #5
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
I have wasted countless hours with trying to mesh a multi region case in snappy hex mesh. I found it to be extremly frustrating and not really worth it.
Considering this i switched to gmsh. For simple geometries its a nice tool, the more complex the geometry, the more i switch to salome.

Bot meshes can be imported to openFoam.
Moopie likes this.
Hr_kules is offline   Reply With Quote

Reply


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
OF 4.0 multiregion case calculate yPlus pbnuclex OpenFOAM Post-Processing 6 July 16, 2020 04:27
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
[OpenFOAM] ParaView 4.10 and OpenFOAM 2.3.0 Multiregion and decomposed case romant ParaView 3 April 7, 2014 15:42
Basic hints for runing a multiregion case RuiVO OpenFOAM Pre-Processing 1 February 2, 2012 09:44
Transient case running with a super computer microfin FLUENT 0 March 31, 2009 11:20


All times are GMT -4. The time now is 19:51.