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

[snappyHexMesh] Surface layer issues.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2018, 04:53
Default Surface layer issues.
  #1
Member
 
Stevie_1200's Avatar
 
Steven Taggart
Join Date: Jan 2014
Location: Hull, UK
Posts: 50
Rep Power: 8
Stevie_1200 is on a distinguished road
Dear all,

I have been having some issues with the first layer of cells in my mesh. The first layer of cells along a flat surface collapse at one point and the second layer move in to become the first layer. I have been trying to resolve this issue but not having much luck, I would like to sort it before moving on to adding an inflation layer as it was found to make the problem worse.

I have included the sHM dictionary and also attached a screen short of the cells in question.

Many thanks.

Steven

/*--------------------------------*- 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; // make basic mesh ?
snap true; // decide to snap back to surface ?
addLayers false; // decide to add viscous layers ?


geometry // Load in STL files here
{
disc_front.stl {type triSurfaceMesh; name disc_front;}
disc_rear.stl {type triSurfaceMesh; name disc_rear;}
outlet.stl {type triSurfaceMesh; name outlet;}
inlet.stl {type triSurfaceMesh; name inlet;}
back.stl {type triSurfaceMesh; name back;}
front.stl {type triSurfaceMesh; name front;}
wall.stl {type triSurfaceMesh; name wall;}
nozzle_exit.stl {type triSurfaceMesh; name nozzle_exit;}
axis.stl {type triSurfaceMesh; name axis;}
refinementBox
{
type searchableBox;
min (0.00 -0.002 -0.01);
max (0.015 0.002 0.001);
}
};

castellatedMeshControls
{
maxLocalCells 5000000; //max cells per CPU core
maxGlobalCells 5000000; //max cells to use before mesh deletion step
minRefinementCells 0; //was 0 - zero means no bad cells are allowed during refinement stages
maxLoadUnbalance 0.10;
nCellsBetweenLevels 5; // expansion factor between each high & low refinement zone

// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command
(
{file "disc_front.eMesh"; level 0;}
{file "disc_rear.eMesh"; level 0;}
{file "inlet.eMesh"; level 0;}
{file "outlet.eMesh"; level 0;}
{file "back.eMesh"; level 0;}
{file "front.eMesh"; level 0;}
{file "wall.eMesh"; level 0;}
{file "nozzle_exit.eMesh"; level 0;}
{file "axis.eMesh"; level 0;}

);

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

refinementSurfaces // Surface-wise min and max refinement level
{
disc_front {level (3 3);}
disc_rear {level (3 3);}
inlet {level (1 2);}
outlet {level (1 2);}
back {level (1 2);}
front {level (1 2);}
wall {level (3 3);}
nozzle_exit {level (3 3);}
axis {level (0 0);}


}


resolveFeatureAngle 30; // Resolve sharp angles // Default 30

refinementRegions
{
refinementBox
{
mode inside;
levels ((1E15 3));
}
}


locationInMesh (0.002 0 -0.004); //to decide which side of mesh to keep **
allowFreeStandingZoneFaces true;
}


// Settings for the snapping.
snapControls
{
nSmoothPatch 3;
tolerance 2.0;
nSolveIter 130;
nRelaxIter 5;
nFeatureSnapIter 10; // default is 10

// New settings from openfoam 2.2 onwards for SHMesh

implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract
explicitFeatureSnap true; // default is true
multiRegionFeatureSnap false; // deafault is false - detects features between multiple surfaces

}



// Settings for the layer addition.
addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName
{
relativeSizes false; // was true
layers
{
disc_front
{
nSurfaceLayers 1;
}
disc_rear
{
nSurfaceLayers 1;
}
nozzle_exit
{
nSurfaceLayers 1;
}
wall
{
nSurfaceLayers 1;
}

}

expansionRatio 1.2;
finalLayerThickness 0.0001; //was 0.00016
minThickness 0.00005; //was 0.00008
nGrow 1; // was 1


// Advanced settings

featureAngle 150; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle.
nRelaxIter 20; //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh.
nSmoothSurfaceNormals 3; // Number of smoothing iterations of surface normals
nSmoothNormals 4; // Number of smoothing iterations of interior mesh movement direction
nSmoothThickness 10; // Smooth layer thickness over surface patches
maxFaceThicknessRatio 0.5; // Stop layer growth on highly warped cells
maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large
minMedianAxisAngle 130; // Angle used to pick up medial axis points
nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations
nLayerIter 50; // Overall max number of layer addition iterations
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
maxNonOrtho 60;
maxBoundarySkewness 2;
maxInternalSkewness 4;
maxConcave 150;
minFlatness 0.5;
minVol 1e-13;
minTetQuality 1e-9;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;

// Advanced

nSmoothScale 4;
errorReduction 0.75;
}

// Advanced

debug 0;


// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;


// ************************************************** *********************** //
Attached Images
File Type: jpg poor_boundary_mesh.jpg (84.1 KB, 22 views)
Stevie_1200 is offline   Reply With Quote

Reply

Tags
boundary cells, snappy hex mesh

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
[snappyHexMesh] Battling with SnappyHexMexh Nickul OpenFOAM Meshing & Mesh Conversion 2 July 20, 2017 10:32
[snappyHexMesh] Collapsing Layers Tim_Simon OpenFOAM Meshing & Mesh Conversion 5 August 2, 2015 22:51
[snappyHexMesh] crash sHM H25E OpenFOAM Meshing & Mesh Conversion 11 November 10, 2014 11:27
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 15:03
[snappyHexMesh] Snap Precision to a STL Surface malaboss OpenFOAM Meshing & Mesh Conversion 16 July 26, 2013 01:44


All times are GMT -4. The time now is 21:12.