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

[snappyHexMesh] non-orthogonality problem

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2021, 09:49
Default non-orthogonality problem
  #1
New Member
 
Tommaso Negosanti
Join Date: Oct 2021
Posts: 7
Rep Power: 4
tommynego95 is on a distinguished road
Hello all,

In the current study i'm following i need to mesh a complex body.
I decided to use snappyHexMesh since it has a good mesh capability and meshes with hexaedral elements.
The sHM process end with no problems exept the fact that i get a lot of non-orthogonals elements on my mesh, about 5000.
I don't get what i' m doing wrong
Here is the blockMeshDict file for the background mesh:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

//x [-250;100]
//y [0;170]
//z [0;11.273]
vertices
(
    (-300 0 0)
    (500 0 0)
    (500 300 0)
    (-300 300 0)
    (-300 0 11)
    (500 0 11)
    (500 300 11)
    (-300 300 11)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (80 30 11) simpleGrading (1 1 1) 

edges
();

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 3 7 4)
        );
    }
    
    outlet
    {
        type patch;
        faces
        (
            (1 2 6 5)
            (7 6 2 3)
        );
    }
    
    front_back
    {
        type empty;
        faces
        (
            (0 3 2 1)
            (5 6 7 4)
        );
    }
    
    symmetry
    {
    	type symmetryPlane;
    	faces
    	(
    	     (0 1 5 4)
    	);
    }
);


// ************************************************************************* //
The surfaceFeaturesDict
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      surfaceFeaturesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

wall
{
	surfaces ("wall.stl");

	includedAngle 90;
	geometricTestOnly       yes;
	writeObj	yes;
}
porous_domain
{
	surfaces ("porous_domain.stl");

	includedAngle 90; 
	geometricTestOnly       yes;
	writeObj	yes;
}


// ************************************************************************* //
and the snappyHexMeshDict

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  9
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap            true; 
addLayers       true; 
geometry
{
    wall
    {
        type closedTriSurfaceMesh;
        file "wall.stl";
    }

    porous_domain
    {
        type closedTriSurfaceMesh;
        file "porous_domain.stl";
    }
    
    refinementBox
    {
        type searchableBox;
        min (-0.3 0 0);
        max (0.25 0.2 0.011);
    }
};



// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    // Refinement parameters
    // ~~~~~~~~~~~~~~~~~~~~~

    maxLocalCells 100000000;

    maxGlobalCells 200000000;

    minRefinementCells 10;

    maxLoadUnbalance 0.10;

    nCellsBetweenLevels 2;



    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    features
    (
        {
            file "wall.eMesh";
            levels ((2 3)); 
        }
        
        {
            file "porous_domain.eMesh";
            levels ((2 2));
        }
    );
	


    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    refinementSurfaces
    {
        wall
        {

            level (0 0);
            patchInfo
            {
                type wall;
            }
        }
        
        porous_domain
        {
            level (2 2);
            
            faceZone porous_domain;
            cellZone porous_domain;
            cellZoneInside inside;
            
            boundary internal;
            
            patchInfo
            {
                type patch;
            }
        }
    }

    resolveFeatureAngle 30;


    // Region-wise refinement
    // ~~~~~~~~~~~~~~~~~~~~~~

    refinementRegions
    {
     refinementBox
        {
            mode    inside;
            level   1;
        }
    }


    // Mesh selection
    // ~~~~~~~~~~~~~~
    locationInMesh (-0.25 0.001 0.005); 

    allowFreeStandingZoneFaces true;
}



// Settings for the snapping.
snapControls
{

    nSmoothPatch 5; 

    tolerance 4.0;

    nSolveIter 100; 

    nRelaxIter 5;

    // Feature snapping
        nFeatureSnapIter 30; 

        implicitFeatureSnap false; 

        explicitFeatureSnap true;

        multiRegionFeatureSnap false;
}



// Settings for the layer addition.
addLayersControls
{

    relativeSizes false; 

    layers 
    {
        wall
        {
        	nSurfaceLayers 5;
        }
    }

    expansionRatio 1.2;

    finalLayerThickness 0.2;

    minThickness 0.1;

    nGrow 0;

    featureAngle 30;

    slipFeatureAngle 30;

    nRelaxIter 3;

    nSmoothSurfaceNormals 1;

    nSmoothNormals 3;

    nSmoothThickness 10;

    maxFaceThicknessRatio 0.5;

    maxThicknessToMedialRatio 0.3;

    minMedianAxisAngle 90;

    nBufferCellsNoExtrude 0;

    nLayerIter 50;
}


meshQualityControls
{
    #include "meshQualityDict"
}


debug 1; 


writeFlags
(
    scalarLevels
    layerSets
    layerFields   
);

mergeTolerance 1e-6;


// ************************************************************************* //
I also attach the .stl files so if anybody wants to help.
The .stl files are exported from a geometry i modeled in salome.

Last edited by tommynego95; November 11, 2021 at 04:46.
tommynego95 is offline   Reply With Quote

Reply

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
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 05:37
BuoyantBoussinesqSimpleFoam_Facing problem Mondal131211 OpenFOAM Running, Solving & CFD 1 April 10, 2019 20:41
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 06:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13


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