CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

Problems with coarse/unsnapped cells in snappyHexMesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 29, 2014, 08:10
Cool Problems with coarse/unsnapped cells in snappyHexMesh
  #1
New Member
 
Alexander Coles
Join Date: Jul 2014
Posts: 2
Rep Power: 0
scareneb is on a distinguished road
Hi fellow SHM users, this is my first post on the forums so apologies for any lack in clarity in the description/set-up.

I have been trying to mesh a fairly simple wing geometry where a wing section alters from a standard NACA0012 to the same aerofoil with a 25 degree plain flap (see picture 1).

The wing is enclosed at both ends by the blockMesh which was causing problems with SHM but that seemed to have sorted itself when I increased the max cell parameters in SHM Dict. All good there...

Now, however, I am still having problems with very large cells forming on the faces which are normal to the aerofoil chord (see pictures 2&3), and also SHM has problems snapping at cells which are at the leading edges of both wing sections. I have tried adding refinement zones at two locations (the wing/flap split section and the leading edge of the flap).

Below is my SHM Dict file. I delete most of the commenting in the Dict's to make it a bit easier to modify, sorry if this makes things confusing.

Any help/tips on this issue would be greatly appreciated (I'm still new to OF)! Also, I have changed a lot of the "angle" parameters from 0 to 30 to 60 to 180 etc and this doesn't seem to solve the issue.. Total cell count is ~700,000.


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

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


geometry
{
EulerWing25.stl
{
type triSurfaceMesh;
name wing;
}

refinementBoxA
{
type searchableBox;
min (0.65 0.96 -0.15);
max (1.02 1.04 0.05);
}

refinementBoxB
{
type searchableBox;
min (0.96 0 -0.125);
max (1.02 0.99 -0.1);
}

};

// Initial mesh generation
castellatedMeshControls
{

// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
maxLocalCells 350000;
maxGlobalCells 450000;
minRefinementCells 10;
maxLoadUnbalance 0.10;
nCellsBetweenLevels 4;
features
(
);
refinementSurfaces
{
wing
{
level (8 9);
patchInfo
{
type wall;
}
}

}
resolveFeatureAngle 60;
refinementRegions
{
wing
{
mode distance;
levels ((0.01 5) (0.05 3));
}

refinementBoxA
{
mode inside;
levels ((1 12));
}

refinementBoxB
{
mode inside;
levels ((1 12));
}

}
locationInMesh (-1 0.6 1);
allowFreeStandingZoneFaces true;
}



// Settings for the snapping.
snapControls
{
nSmoothPatch 10;
tolerance 4;
nSolveIter 50;
nRelaxIter 10;
nFeatureSnapIter 15;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap false;
}


// Settings for the layer addition.
addLayersControls
{
relativeSizes false;
layers
{
wing
{
nSurfaceLayers 10;

}

}

expansionRatio 1.1;
finalLayerThickness 0.2;
minThickness 0.0005;
nGrow 1;
featureAngle 60;
nRelaxIter 3;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 130;
nBufferCellsNoExtrude 0;
nLayerIter 50;
}


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


relaxed
{
maxNonOrtho 75;
}

}

debug 0;
mergeTolerance 1E-6;


// ************************************************** *********************** //
Attached Images
File Type: jpg Screenshot from 2014-07-29 12:00:06.jpg (16.3 KB, 24 views)
File Type: jpg Screenshot from 2014-07-29 11:42:43.jpg (98.0 KB, 27 views)
File Type: jpg Screenshot from 2014-07-29 11:59:30.jpg (34.5 KB, 23 views)
scareneb is offline   Reply With Quote

Old   July 29, 2014, 11:26
Default
  #2
New Member
 
Icaro A. Accordi
Join Date: Oct 2010
Posts: 10
Rep Power: 6
icaroaccordi is on a distinguished road
My guess is that you are using shorten cells in span-wise direction. Probably you had decreased the size of the domain without changing the cell count in that direction. If you want a sharp corner you can use feature edges in the snapHexMeshDict after using the command surfaceFeatureExtract (you need a dictionary to do that). However is going to be a hell to get nice boundary layers in sharp corners. I hope that I would help you.
icaroaccordi is offline   Reply With Quote

Old   August 13, 2014, 08:13
Default
  #3
New Member
 
Alexander Coles
Join Date: Jul 2014
Posts: 2
Rep Power: 0
scareneb is on a distinguished road
Thanks for your suggestions Icaro! They did help, however, I have read that newer versions of OF do not require the surfaceFeatureExtractDict and the feature is now built in with the resolveFeatureAngle. I tried this with 90 degrees and the cells snapped perfectly!

Also, I was going a bit OTT on the refinement of surfaces and regions, and therefore the number of cells SHM could reach (defined by the maxGlobal/maxLocal cell parameters) was quickly used up & no additional cells were not added!

I have attached my new SHMDict and a few new images!

This SHMDict also works well with my smooth transition wing, of which I am looking to compare aerodynamic performance with! (3rd pic)



FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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


geometry
{
NACA0012.stl
{
type triSurfaceMesh;
name wing;
}

flap_22deg_25c.stl
{
type triSurfaceMesh;
name flap;
}

refinementBoxA
{
type searchableBox;
min (0.74 2.35 -0.12);
max (2.00 2.45 0.06);
}

// refinementBoxB
// {
// type searchableBox;
// min (0.96 0 -0.125);
// max (1.02 0.99 -0.1);
// }

};

// Initial mesh generation
castellatedMeshControls
{

// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
maxLocalCells 500000;
maxGlobalCells 1200000;
minRefinementCells 1;
maxLoadUnbalance 0.10;
nCellsBetweenLevels 4;
features
(
);
refinementSurfaces
{
wing
{
level (3 4);
patchInfo
{
type wall;
}
}

flap
{
level (3 4);
patchInfo
{
type wall;
}
}

}
resolveFeatureAngle 90;
refinementRegions
{
wing
{
mode distance;
levels ((0.1 4) (0.5 3));
}

flap
{
mode distance;
levels ((0.1 4) (0.5 3));
}

refinementBoxA
{
mode inside;
levels ((1 7));
}

// refinementBoxB
// {
// mode inside;
// levels ((1 12));
// }

}
locationInMesh (-1.01 0.62 1);
allowFreeStandingZoneFaces true;
}



// Settings for the snapping.
snapControls
{
nSmoothPatch 10;
tolerance 4;
nSolveIter 60;
nRelaxIter 10;
nFeatureSnapIter 15;
implicitFeatureSnap true;
explicitFeatureSnap false;
multiRegionFeatureSnap false;
}


// Settings for the layer addition.
addLayersControls
{
relativeSizes false;
layers
{
wing
{
nSurfaceLayers 10;

}

flap
{
nSurfaceLayers 10;

}

}

expansionRatio 1.1;
finalLayerThickness 0.2;
minThickness 0.0005;
nGrow 0;
featureAngle 60;
nRelaxIter 3;
nSmoothSurfaceNormals 3;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 60;
nBufferCellsNoExtrude 0;
nLayerIter 50;
}


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


relaxed
{
maxNonOrtho 75;
minVol 1e-13;
}

}

debug 0;
mergeTolerance 1E-6;



// ************************************************** *********************** //
Attached Images
File Type: jpg img1.jpg (85.8 KB, 16 views)
File Type: jpg img2.jpg (80.8 KB, 18 views)
File Type: jpg img3.jpg (12.7 KB, 16 views)
scareneb is offline   Reply With Quote

Reply

Tags
dict, openfoam, problem, shm, snappyhexmesh

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange cells created by SnappyHexMesh newToOpenFoam OpenFOAM Native Meshers: snappyHexMesh and Others 4 December 21, 2014 20:06
SnappyHexMesh for internal Flow vishwa OpenFOAM Native Meshers: snappyHexMesh and Others 23 August 6, 2014 04:50
[ICEM] error analysis despaired student ANSYS Meshing & Geometry 7 June 27, 2012 12:57
snappyHexMesh beginner problems sErik OpenFOAM Native Meshers: snappyHexMesh and Others 1 November 16, 2009 09:47
physical boundary error!! kris CD-adapco 2 August 3, 2005 01:32


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