From e60cdeb72f39545076218f57484048303bb69d4e Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sun, 17 May 2015 18:30:11 +0100 Subject: [PATCH] Configuration settings of some dictionaries, e.g. snappyHexMeshDict for more convenient case setup --- .../fvSolution/relaxationFactors/steadyState | 30 +++++++ .../fvSolution/relaxationFactors/transient | 28 +++++++ .../mesh/generation/meshQualityDict.cfg | 59 +++++++++++++ .../mesh/generation/snappyHexMeshDict.cfg | 83 +++++++++++++++++++ .../manipulation/refineRegion/refineMeshDict | 40 +++++++++ .../manipulation/refineRegion/topoSetDict | 31 +++++++ .../surface/surfaceFeatureExtractDict.cfg | 33 ++++++++ 7 files changed, 304 insertions(+) create mode 100644 etc/caseDicts/general/fvSolution/relaxationFactors/steadyState create mode 100644 etc/caseDicts/general/fvSolution/relaxationFactors/transient create mode 100644 etc/caseDicts/mesh/generation/meshQualityDict.cfg create mode 100644 etc/caseDicts/mesh/generation/snappyHexMeshDict.cfg create mode 100644 etc/caseDicts/mesh/manipulation/refineRegion/refineMeshDict create mode 100644 etc/caseDicts/mesh/manipulation/refineRegion/topoSetDict create mode 100644 etc/caseDicts/surface/surfaceFeatureExtractDict.cfg diff --git a/etc/caseDicts/general/fvSolution/relaxationFactors/steadyState b/etc/caseDicts/general/fvSolution/relaxationFactors/steadyState new file mode 100644 index 00000000..634f2bda --- /dev/null +++ b/etc/caseDicts/general/fvSolution/relaxationFactors/steadyState @@ -0,0 +1,30 @@ +/*--------------------------------*- 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 steadyState; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +relaxationFactors +{ + fields + { + p 0.3; + } + equations + { + U 0.7; + ".*" 0.7; + } +} + +// ************************************************************************* // diff --git a/etc/caseDicts/general/fvSolution/relaxationFactors/transient b/etc/caseDicts/general/fvSolution/relaxationFactors/transient new file mode 100644 index 00000000..c8d531e7 --- /dev/null +++ b/etc/caseDicts/general/fvSolution/relaxationFactors/transient @@ -0,0 +1,28 @@ +/*--------------------------------*- 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 transient; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/generation/meshQualityDict.cfg b/etc/caseDicts/mesh/generation/meshQualityDict.cfg new file mode 100644 index 00000000..7c244e09 --- /dev/null +++ b/etc/caseDicts/mesh/generation/meshQualityDict.cfg @@ -0,0 +1,59 @@ +/*--------------------------------*- 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 meshQualityDict.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +maxNonOrtho 65; + +maxBoundarySkewness 20; + +maxInternalSkewness 4; + +maxConcave 80; + +// Minimum cell pyramid volume; case dependent +minVol 1e-13; + +// 1e-15 (small positive) to enable tracking +// -1e+30 (large negative) for best layer insertion +minTetQuality 1e-15; + +// if >0 : preserve single cells with all points on the surface if the +// resulting volume after snapping (by approximation) is larger than +// minVolCollapseRatio times old volume (i.e. not collapsed to flat cell). +// If <0 : delete always. +//minVolCollapseRatio 0.5; + +minArea -1; + +minTwist 0.02; + +minDeterminant 0.001; + +minFaceWeight 0.05; + +minVolRatio 0.01; + +minTriangleTwist -1; + +nSmoothScale 4; + +errorReduction 0.75; + +relaxed +{ + maxNonOrtho 75; +} + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/generation/snappyHexMeshDict.cfg b/etc/caseDicts/mesh/generation/snappyHexMeshDict.cfg new file mode 100644 index 00000000..71db4d40 --- /dev/null +++ b/etc/caseDicts/mesh/generation/snappyHexMeshDict.cfg @@ -0,0 +1,83 @@ +/*--------------------------------*- 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.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +castellatedMesh true; +snap true; +addLayers true; + +castellatedMeshControls +{ + maxLocalCells 100000; + maxGlobalCells 100000000; + minRefinementCells 10; + maxLoadUnbalance 0.10; + nCellsBetweenLevels 3; + resolveFeatureAngle 30; + allowFreeStandingZoneFaces true; + features + ( + ); +} + +snapControls +{ + nSmoothPatch 3; + tolerance 2.0; + nSolveIter 100; + nRelaxIter 5; + + nFeatureSnapIter 10; + + explicitFeatureSnap false; + multiRegionFeatureSnap false; + implicitFeatureSnap true; +} + +addLayersControls +{ + featureAngle 100; + slipFeatureAngle 30; + + nLayerIter 50; + nRelaxedIter 20; + nRelaxIter 5; + + nGrow 0; + + nSmoothSurfaceNormals 1; + nSmoothNormals 3; + nSmoothThickness 10; + maxFaceThicknessRatio 0.5; + maxThicknessToMedialRatio 0.3; + + minMedialAxisAngle 90; + nMedialAxisIter 10; + + nBufferCellsNoExtrude 0; + additionalReporting false; +// nSmoothDisplacement 0; +// detectExtrusionIsland false; +} + +meshQualityControls +{ + #include "${FOAM_CASE}/system/meshQualityDict" +} + +debug 0; +mergeTolerance 1e-6; + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/manipulation/refineRegion/refineMeshDict b/etc/caseDicts/mesh/manipulation/refineRegion/refineMeshDict new file mode 100644 index 00000000..8fa4ec52 --- /dev/null +++ b/etc/caseDicts/mesh/manipulation/refineRegion/refineMeshDict @@ -0,0 +1,40 @@ +/*--------------------------------*- 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 refineMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +set c0; + +coordinateSystem global; + +globalCoeffs +{ + tan1 ( 1 0 0 ); + tan2 ( 0 1 0 ); +} + +directions // comment out as required +( + tan1 + tan2 + normal +); + +useHexTopology no; + +geometricCut yes; + +writeMesh no; + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/manipulation/refineRegion/topoSetDict b/etc/caseDicts/mesh/manipulation/refineRegion/topoSetDict new file mode 100644 index 00000000..3367c305 --- /dev/null +++ b/etc/caseDicts/mesh/manipulation/refineRegion/topoSetDict @@ -0,0 +1,31 @@ +/*--------------------------------*- 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 topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (-1 -1 -1) (1 1 1); // Edit box bounds as required + } + } +); + +// ************************************************************************* // diff --git a/etc/caseDicts/surface/surfaceFeatureExtractDict.cfg b/etc/caseDicts/surface/surfaceFeatureExtractDict.cfg new file mode 100644 index 00000000..2930d184 --- /dev/null +++ b/etc/caseDicts/surface/surfaceFeatureExtractDict.cfg @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 surfaceFeatureExtractDict.cfg; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +extractionMethod extractFromSurface; + +extractFromSurfaceCoeffs +{ + includedAngle 150; + geometricTestOnly no; +} + +subsetFeatures +{ + nonManifoldEdges yes; + openEdges yes; +} + +writeObj yes; + +// ************************************************************************* //