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

[snappyHexMesh] Deformed features arround the refined area

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AtoHM
  • 1 Post By AtoHM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2022, 18:47
Default Deformed features arround the refined area
  #1
New Member
 
Christian Pinzón
Join Date: Apr 2022
Posts: 6
Rep Power: 4
davcrisp is on a distinguished road
I am meshing a jet in crossflow domain, but in the plate zone snappyhexmesh make an unexplained grobe in the base arround the main channel (img1), and also in the corner borders in top an plate the meshing is incomplete (img2).

I have tried switching implicitFeatureSnap, explicitFeatureSnap, and incresing and decreasing tolerance, increasing different levels, as is explained in other posts, but the outcome is similar.



Could you give me any suggestion, thanks

sHM code:
Code:
geometry
{
    geome
   {
        type triSurfaceMesh;
        file "geome.stl";
  
    }

    inlet_channel
    {
        type triSurfaceMesh;
        file "inlet_channel.stl";
    }

    sides
   {
        type triSurfaceMesh;
        file "sides.stl";
    }
    out
    {
        type triSurfaceMesh;
        file "out.stl";
    }
    top
    {
        type triSurfaceMesh;
        file "top.stl";
    }
    channel
    {
        type triSurfaceMesh;
        file "channel.stl";
    }
    plate
    {
        type triSurfaceMesh;
        file "plate.stl";
    } 
   inlet
    {
        type triSurfaceMesh;
        file "inlet.stl";
    }
    
};

castellatedMeshControls
{
    maxLocalCells           2000000;
    maxGlobalCells          2000000;
    minRefinementCells      20;// Motorbike 10
    maxLoadUnbalance        0.10; //
    nCellsBetweenLevels     2; // buffer cells.
    resolveFeatureAngle    30;// 60?
    gapLevelIncrement       1;
 
    features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command
    (   
       /*{
            file "geome.eMesh"; 
            levels ((0.03 3));
        }*/
        
        {file "inlet.eMesh"; level 1;} 
        {file "out.eMesh"; level 1;} 
        {file "plate.eMesh"; level 3;} // level3
        {file "top.eMesh"; level 0;} 
        {file "sides.eMesh"; level 0;}  
        {file "inlet_channel.eMesh"; level 2;} 
        {file "channel.eMesh"; level 2;} 
    );

    refinementSurfaces // Surface-wise min and max refinement level
    {
	inlet {level (0 0);}
    	out {level (0 0);}
	plate {level (2 3);} //(3 3)
	channel {level (2 3);} 
	sides {level (0 0);} 
	top {level (0 0);} 
	inlet_channel {level (2 2);}
 }



   refinementRegions
    {
       
    channel
        {                             // refinement level 5 within 1.0 m
            mode distance;            // refinement level 3 within 2.0 m
            levels ((0.005 2)); // levels must be ordered nearest first
        }

    inlet_channel
        {
            mode distance;
            levels ((0.009 2));
        }
    
    }
    locationInMesh (1e-5 1e-5 1e-5); // Offset from (0 0 0) to avoid
    allowFreeStandingZoneFaces false;
}

snapControls
{
    implicitFeatureSnap         true;
    explicitFeatureSnap         false;
    nSmoothPatch                6;
    nSmoothInternal             $nSmoothPatch;
    tolerance                   2.0;
    nSolveIter                  90;
    nRelaxIter                  15;
    // Feature snapping
    //- Number of feature edge snapping iterations.
    //  Leave out altogether to disable.
    nFeatureSnapIter            10;
    detectBaffles               true;
    multiRegionFeatureSnap      false;
}
blockMeshDict file:

Code:
backgroundMesh
{
    xMin    -0.210;
    xMax     0.610;
    yMin    -0.120;
    yMax     0.130;
    zMin    -0.021;
    zMax     0.021;
    xCells  240;
    yCells  70;
    zCells  13;
  /*  xCells  200;
    yCells  60;
    zCells  10;*/
}

convertToMeters 1;

vertices
(
    ($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMin)
    ($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMin)
    ($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMin)
    ($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMin)

    ($:backgroundMesh.xMin $:backgroundMesh.yMin $:backgroundMesh.zMax)
    ($:backgroundMesh.xMax $:backgroundMesh.yMin $:backgroundMesh.zMax)
    ($:backgroundMesh.xMax $:backgroundMesh.yMax $:backgroundMesh.zMax)
    ($:backgroundMesh.xMin $:backgroundMesh.yMax $:backgroundMesh.zMax)
);

blocks
(
    hex (0 1 2 3 4 5 6 7)
    (
        $:backgroundMesh.xCells
        $:backgroundMesh.yCells
        $:backgroundMesh.zCells
    )
    simpleGrading (
   	(
   		(0.23 0.2 0.2)
   		(0.065 0.3 1)  
   		(0.705 0.5 5)
   	)		
      	(
      		(0.47 0.1 0.1)
      		(0.06 0.4 1)
      		(0.47 0.5 5)
      	) 
      		1
      	
      	)
      	
);

edges
(
);

boundary
(
//  Uncomment below to define patches in background mesh
/**/
    lados
    {
        type symmetry;
        faces
        (
            (0 3 7 4)
            (1 5 6 2)
        );
    }


    salida
    {
        type patch;
        faces
        (
            (0 1 2 3)
        );
    }

    arriba
    {
        type patch;
        faces
        (
            (3 7 6 2)
        );
    }

    entrada
    {
        type patch;
        faces
        (
            (4 7 6 5)
        );
    }


    dummy
    {
        type wall;
        faces
        (
            (0 4 5 1)
        );
    }

);
      

mergePatchPairs
(
);
Attached Images
File Type: jpg img1_grobe.jpg (83.9 KB, 18 views)
File Type: png imag2_cornererror.png (14.0 KB, 14 views)
File Type: png final_domain.png (16.0 KB, 17 views)
File Type: png blockMesh.png (21.1 KB, 14 views)
davcrisp is offline   Reply With Quote

Old   June 2, 2022, 01:11
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Snappy has a hard time working on cells with big aspect ratios coming from blockMesh. I am not aware of a general solution to this. Try decreasing the aspect ratios especially at boundaries to improve the snapping.
Also, its favorable to put the nodes you create in blockMesh in very close proximity to the final position defined by the boundary.
davcrisp likes this.
AtoHM is offline   Reply With Quote

Old   June 2, 2022, 15:34
Default
  #3
New Member
 
Christian Pinzón
Join Date: Apr 2022
Posts: 6
Rep Power: 4
davcrisp is on a distinguished road
Quote:
Originally Posted by AtoHM View Post
Snappy has a hard time working on cells with big aspect ratios coming from blockMesh. I am not aware of a general solution to this. Try decreasing the aspect ratios especially at boundaries to improve the snapping.
Also, its favorable to put the nodes you create in blockMesh in very close proximity to the final position defined by the boundary.
Thanks AtoHM, in your opinion, is not a good practice make a simplegrading in the blockMesh and then use snappyHexMesh??
davcrisp is offline   Reply With Quote

Old   June 3, 2022, 01:16
Default
  #4
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Hm, I assume it is not an issue of good or bad practise. In a situation like yours, I would definetly use grading as well, to save on computational resources where its not needed and improve resolution where its required.
You just have to deal with snappy not being able to work so well with the background mesh and you need to put more time into resolving this.
Usually, I use the ESI version of snappy, which allows you to insert anisotropic splits of the mesh, e.g. only in one direction, in contrast to the foundation version, where you can only refine to a certain level in all 3 directions. Making splits 1 direction at a time helps snappy to make cleaner transitions of levels, especially at the boundaries. But this requires some effort on your part to create refinement regions.
davcrisp likes this.
AtoHM 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
Calculating flow through an area i621148 CFX 17 April 10, 2019 16:45
Computing and setting reference area in journal Haukinger FLUENT 1 January 31, 2010 18:11
CFX Solver Memory Error mike CFX 1 March 19, 2008 07:22
Storing Surface Area of each cell in a file? Markus Alzon FLUENT 0 June 21, 2007 08:38
report surface area WITHOUT solit Ralf Schmidt FLUENT 1 June 1, 2007 10:23


All times are GMT -4. The time now is 05:37.