snappyHexMeshConfig: use implicitFeatures by default
and make '-explicitFeatures' the option to use explicitFeatures. When implicitFeatures is used, a surfaceFeaturesDict file is not written out to the system directory
This commit is contained in:
@ -75,20 +75,20 @@ Description
|
||||
oriented along the z-axis along x = y = 0.
|
||||
|
||||
The snappyHexMesh configuration is generated automatically, applying a set
|
||||
of defaults to the main configuration parameters. By default, explicit
|
||||
feature capturing is configured, for which a surfaceFeaturesDict file is
|
||||
written for the user to generate the features files with the
|
||||
surfaceFeatures utility. Implicit feature capturing can alternatively be
|
||||
selected with the '-implicitFeatures' option. Refinement levels can be
|
||||
of defaults to the main configuration parameters. By default, implicit
|
||||
feature capturing is configured. Explicit feature capturing can
|
||||
alternatively be selected with the '-explicitFeatures' option, when an
|
||||
additional surfaceFeaturesDict file is written for the user to generate the
|
||||
features files with the surfaceFeatures utility. Refinement levels can be
|
||||
controlled with a range of options including: '-refinementLevel' for the
|
||||
baseline refinement level; '-refinementSurfaces' for levels on specific
|
||||
surfaces; '-refinementRegions' for levels inside specific surfaces;
|
||||
'-refinementBoxes' for quick, box-shaped refinement regions specified by
|
||||
min and max bounds; '-refinementDists' for distance-based refinement; and
|
||||
'-refinementBoxes' for quick, box-shaped refinement regions specified by min
|
||||
and max bounds; '-refinementDists' for distance-based refinement; and
|
||||
'-nCellsBetweenLevels' to control the transition between refinement
|
||||
levels. A '-layers' option specifies additional layers of cells at wall
|
||||
boundaries. The insidePoint parameter is set to '(0 0 0)' by default but
|
||||
can be overridden using the '-insidePoint' option.
|
||||
boundaries. The insidePoint parameter is set to '(0 0 0)' by default but can
|
||||
be overridden using the '-insidePoint' option.
|
||||
|
||||
Usage
|
||||
\b snappyHexMeshConfig [OPTIONS]
|
||||
@ -134,8 +134,8 @@ Usage
|
||||
- \par -clearBoundary,
|
||||
Do not set default patch entries, i.e. xMin, xMax, yMin, etc...
|
||||
|
||||
- \par -implicitFeatures,
|
||||
Use implicit feature capturing
|
||||
- \par -explicitFeatures,
|
||||
Use explicit feature capturing, default is implicit
|
||||
|
||||
- \par -layers \<int\>
|
||||
Specify <int> surface layers at wall boundaries, default 0
|
||||
@ -308,8 +308,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"implicitFeatures",
|
||||
"use implicit feature capturing"
|
||||
"explicitFeatures",
|
||||
"use explicit feature capturing"
|
||||
);
|
||||
|
||||
argList::addOption
|
||||
@ -569,7 +569,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
const bool implicitFeatures(args.optionFound("implicitFeatures"));
|
||||
const bool explicitFeatures(args.optionFound("explicitFeatures"));
|
||||
|
||||
const label layers(args.optionLookupOrDefault<label>("layers", 0));
|
||||
|
||||
@ -583,6 +583,8 @@ int main(int argc, char *argv[])
|
||||
args.optionLookupOrDefault<label>("nCellsBetweenLevels", 3)
|
||||
);
|
||||
|
||||
if (explicitFeatures)
|
||||
{
|
||||
surfaceFeaturesConfiguration surfaceFeaturesConfig
|
||||
(
|
||||
"surfaceFeaturesDict",
|
||||
@ -592,6 +594,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
surfaceFeaturesConfig.write();
|
||||
}
|
||||
|
||||
snappyHexMeshConfiguration snappyConfig
|
||||
(
|
||||
@ -604,7 +607,7 @@ int main(int argc, char *argv[])
|
||||
refinementRegions,
|
||||
refinementBoxes,
|
||||
refinementDists,
|
||||
implicitFeatures,
|
||||
explicitFeatures,
|
||||
layers,
|
||||
insidePoint,
|
||||
nCellsBetweenLevels
|
||||
|
||||
@ -133,7 +133,7 @@ void Foam::snappyHexMeshConfiguration::writeFeatures()
|
||||
{
|
||||
beginList(os_, "features");
|
||||
|
||||
if (!implicitFeatures_)
|
||||
if (explicitFeatures_)
|
||||
{
|
||||
forAll(surfaces_, i)
|
||||
{
|
||||
@ -422,9 +422,9 @@ void Foam::snappyHexMeshConfiguration::writeSnapControls()
|
||||
beginDict(os_, "snapControls");
|
||||
|
||||
os_ << indent << "explicitFeatureSnap "
|
||||
<< (implicitFeatures_ ? "off" : "on") << ";" << endl;
|
||||
<< (explicitFeatures_ ? "on" : "off") << ";" << endl;
|
||||
os_ << indent << "implicitFeatureSnap "
|
||||
<< (implicitFeatures_ ? "on" : "off") << ";" << endl;
|
||||
<< (explicitFeatures_ ? "off" : "on") << ";" << endl;
|
||||
|
||||
endDict(os_);
|
||||
}
|
||||
@ -497,7 +497,7 @@ Foam::snappyHexMeshConfiguration::snappyHexMeshConfiguration
|
||||
const List<Tuple2<word, label>>& refinementRegions,
|
||||
const List<Tuple3<vector, vector, label>>& refinementBoxes,
|
||||
const List<Tuple3<word, scalar, label>>& refinementDists,
|
||||
const bool implicitFeatures,
|
||||
const bool explicitFeatures,
|
||||
const label layers,
|
||||
const point& insidePoint,
|
||||
const label nCellsBetweenLevels
|
||||
@ -510,7 +510,7 @@ Foam::snappyHexMeshConfiguration::snappyHexMeshConfiguration
|
||||
refinementRegions_(refinementRegions),
|
||||
refinementBoxes_(refinementBoxes),
|
||||
refinementDists_(refinementDists),
|
||||
implicitFeatures_(implicitFeatures),
|
||||
explicitFeatures_(explicitFeatures),
|
||||
layers_(layers),
|
||||
insidePoint_(insidePoint),
|
||||
nCellsBetweenLevels_(nCellsBetweenLevels)
|
||||
|
||||
@ -80,8 +80,8 @@ class snappyHexMeshConfiguration
|
||||
//- Refinement distances with level of refinement
|
||||
const List<Tuple3<word, scalar, label>>& refinementDists_;
|
||||
|
||||
//- Using implicit feature capturing?
|
||||
const bool implicitFeatures_;
|
||||
//- Using explicit feature capturing?
|
||||
const bool explicitFeatures_;
|
||||
|
||||
//- Number of layers at wall patches, default 0
|
||||
const label layers_;
|
||||
@ -173,7 +173,7 @@ public:
|
||||
const List<Tuple2<word, label>>& refinementRegions,
|
||||
const List<Tuple3<vector, vector, label>>& refinementBoxes,
|
||||
const List<Tuple3<word, scalar, label>>& refinementDists,
|
||||
const bool implicitFeatures,
|
||||
const bool explicitFeatures,
|
||||
const label layers,
|
||||
const point& insidePoint,
|
||||
const label nCellsBetweenLevels
|
||||
|
||||
Reference in New Issue
Block a user