ENH: snappyHexMesh: initial version of directional refinement

This commit is contained in:
mattijs
2017-12-11 17:23:33 +00:00
parent 7fe700a8dc
commit 88fac3ed9f
9 changed files with 690 additions and 4 deletions

View File

@ -1082,7 +1082,29 @@ int main(int argc, char *argv[])
if (!limitDict.empty())
{
Info<< "Read refinement shells in = "
Info<< "Read limit shells in = "
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl;
}
// Optionally read directional refinement shells
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const dictionary dirRefDict
(
refineDict.subOrEmptyDict("directionalRefinementRegions")
);
if (!dirRefDict.empty())
{
Info<< "Reading directional refinement shells." << endl;
}
shellSurfaces dirShells(allGeometry, dirRefDict);
if (!dirRefDict.empty())
{
Info<< "Read directional refinement shells in = "
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl;
}
@ -1119,6 +1141,7 @@ int main(int argc, char *argv[])
surfaces, // for surface intersection refinement
features, // for feature edges/point based refinement
shells, // for volume (inside/outside) refinement
dirShells, // vol volume directional refinement
limitShells // limit of volume refinement
);
Info<< "Calculated surface intersections in = "

View File

@ -49,6 +49,14 @@ geometry
max (3.5 2 0.5);
}
// Shell for directional refinement
refinementBox
{
type searchableBox;
min (1.5 1 -0.5);
max (3.5 2 0.5);
}
sphere.stl
{
type triSurfaceMesh;
@ -278,6 +286,21 @@ castellatedMeshControls
}
directionalRefinementRegions
{
refinementBox // Closed surface
{
mode inside;
levelIncrement // Specification of additional refinement
(
(0 (1 0 0)) // For level 0 cells: add one level refinement in x
(1 (1 0 0)) // For level 1 cells: add one level refinement in x
);
}
}
// Optionally limit refinement in geometric region. This limits all
// refinement (from features, refinementSurfaces, refinementRegions)
// in a given geometric region. The syntax is exactly the same as for the