The templates include a stategy to simplify meshing with snappyHexMesh, particularly to help generate an initial mesh quickly that can subsequently be improved. The templates are setup to enable rapid initial simulations, typically with simpleFoam. The initial templates cover simple inflow-outflow and closed domains, including rotating geometry, and an example axisymmetric flow. For more details, consult the README file accompanying each template case. The cases are located in $FOAM_ETC/templates
105 lines
2.1 KiB
C++
105 lines
2.1 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
| ========= | |
|
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
| \\ / O peration | Version: dev |
|
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
|
| \\/ M anipulation | |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
object snappyHexMeshDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg"
|
|
|
|
castellatedMesh on;
|
|
snap off;
|
|
addLayers off;
|
|
|
|
geometry
|
|
{
|
|
CAD.obj
|
|
{
|
|
type triSurfaceMesh;
|
|
name CAD;
|
|
regions
|
|
{
|
|
<CADregionName> { name <patchName>; }
|
|
}
|
|
}
|
|
};
|
|
|
|
castellatedMeshControls
|
|
{
|
|
features
|
|
(
|
|
// { file "CAD.eMesh"; level 1; }
|
|
);
|
|
|
|
refinementSurfaces
|
|
{
|
|
CAD
|
|
{
|
|
level (2 2);
|
|
patchInfo { type wall; }
|
|
}
|
|
}
|
|
|
|
refinementRegions
|
|
{
|
|
CAD
|
|
{
|
|
mode inside;
|
|
levels ((1E15 2));
|
|
}
|
|
}
|
|
|
|
locationInMesh (1e-5 1e-5 1e-5); // Offset from (0 0 0) to avoid
|
|
// coinciding with face or edge
|
|
}
|
|
|
|
snapControls
|
|
{
|
|
// explicitFeatureSnap true;
|
|
// implicitFeatureSnap false;
|
|
}
|
|
|
|
addLayersControls
|
|
{
|
|
layers
|
|
{
|
|
"CAD.*"
|
|
{
|
|
nSurfaceLayers 2;
|
|
}
|
|
}
|
|
|
|
relativeSizes true; // false, usually with firstLayerThickness
|
|
expansionRatio 1.2;
|
|
finalLayerThickness 0.5;
|
|
minThickness 1e-3;
|
|
// firstLayerThickness 0.01;
|
|
|
|
// maxThicknessToMedialRatio 0.6;
|
|
}
|
|
|
|
meshQualityControls
|
|
{
|
|
// minTetQuality -1e+30;
|
|
}
|
|
|
|
writeFlags
|
|
(
|
|
scalarLevels
|
|
layerSets
|
|
layerFields
|
|
);
|
|
|
|
mergeTolerance 1e-6;
|
|
|
|
// ************************************************************************* //
|