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

[snappyHexMesh] Interrupted Boundary Layer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 19, 2024, 12:00
Default Interrupted Boundary Layer
  #1
Member
 
Join Date: May 2024
Location: France
Posts: 35
Rep Power: 2
rocketLauncher is on a distinguished road
Hi all,

After a lot of experimenting, I am managing to get a rather good mesh with snappy. I am having some trouble with the boundary layer at certain points however. The BL will be constructed well and the start degrading before it's completely interrupted.

I attach some pictures to demonstrate the issue and my snappyHexMeshDict. Thank you in advance.



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

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       true;


geometry
{
    inlet1.stl
    {
	name	inlet1;
	type	triSurfaceMesh;
    }       

    inlet2.stl
    {
	name	inlet2;
	type	triSurfaceMesh;
    }    

    outlet.stl
    {
	name	outlet;
	type	triSurfaceMesh;
    }    

    symmetry_plane.stl
    {
	name	symmetry_plane;
	type	triSurfaceMesh;
    }    

    walls.stl
    {
	name	walls;
	type	triSurfaceMesh;
    }    
}

// Settings for the castellatedMesh generation.
castellatedMeshControls
{
    // Refinement parameters
    // ~~~~~~~~~~~~~~~~~~~~~

    maxLocalCells 500000;
    maxGlobalCells 6000000;
    minRefinementCells 10;
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 3;

    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    features
    (

       {
            file    "inlet1.eMesh";
            level   4;
       }

       {
            file    "inlet2.eMesh";
            level   4;
       }

       {
            file    "outlet.eMesh";
            level   4;
       }

       {
            file    "symmetry_plane.eMesh";
            level   4;
       }

       {
            file    "walls.eMesh";
            level   4;
       }
    );

    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~
     refinementSurfaces
    {
	inlet1
	{
		level	(4 4);
		patchInfo
		{
			type	patch;
		}
	}

	inlet2
	{
		level	(4 4);
		patchInfo
		{
			type	patch;
		}
	}

	outlet
	{
		level	(4 4);
		patchInfo
		{
			type	patch;
		}
	}

	symmetry_plane
	{
		level	(4 4);
		patchInfo
		{
			type	symmetry;
			inGroups (symmetry);
		}
	}

	walls
	{
		level	(5 5);
		patchInfo
		{
			type	wall;
			inGroups (walls);
		}
	}     
    }

    // Resolve sharp angles
    resolveFeatureAngle 30;
    //planarAngle 30;

    // Region-wise refinement
    // ~~~~~~~~~~~~~~~~~~~~~~
    refinementRegions
    {
        // Define any refinement regions here if needed
		
    };

    // Mesh selection
    // ~~~~~~~~~~~~~~
    locationInMesh (0.01937 0.01 0.023);
    allowFreeStandingZoneFaces true;
}

// Settings for the snapping.
snapControls
{
    nSmoothPatch 3;
    tolerance 4.0;
    nSolveIter 0;
    nRelaxIter 5;

    // Feature snapping
    nFeatureSnapIter 10;
    implicitFeatureSnap false;
    explicitFeatureSnap true;
    multiRegionFeatureSnap false;
}

// Settings for the layer addition.
addLayersControls
{
    relativeSizes true;

    layers
    {
        walls
        {
            nSurfaceLayers 10;
        }
    }

    expansionRatio 1.1;
    finalLayerThickness 0.1;
    minThickness 0.01;
    nGrow 0;
    featureAngle 5;
    slipFeatureAngle 5;
    nRelaxIter 3;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedialAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
}

// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minVol 1e-13;
    minTetQuality 1e-30;
    minArea -1;
    minTwist 0.02;
    minDeterminant 0.001;
    minFaceWeight 0.02;
    minVolRatio 0.01;
    minTriangleTwist -1;

    // Advanced
    nSmoothScale 4;
    errorReduction 0.75;
}

// Advanced

// Flags for optional output
debug 0;

// Merge tolerance. Is fraction of overall bounding box of initial mesh.
mergeTolerance 1e-6;

// ************************************************************************* //
Attached Images
File Type: png Screenshot 2024-06-19 165710.png (117.2 KB, 12 views)
rocketLauncher 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
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 18:38
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 11:00
Any formula for approximating the boundary layer thickness around a cylinder? bestniaz Main CFD Forum 0 October 24, 2015 03:00
Low Mixing time Problem Mavier CFX 5 April 29, 2013 01:00
errors Fahad Main CFD Forum 0 March 23, 2004 14:20


All times are GMT -4. The time now is 02:15.