Commit 0ace34f6 authored by mattijs's avatar mattijs
Browse files

ENH: snappyHexMesh: additional parameter for layer truncation

parent 8a228e02
......@@ -310,6 +310,10 @@ addLayersControls
// make straight angle.
featureAngle 60;
//- At non-patched sides allow mesh to slip if extrusion direction makes
// angle larger than slipFeatureAngle.
slipFeatureAngle 30;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
......
......@@ -2800,7 +2800,7 @@ void Foam::autoLayerDriver::addLayers
layerParams.nSmoothNormals(),
layerParams.nSmoothSurfaceNormals(),
layerParams.minMedianAxisAngleCos(),
layerParams.featureAngle(),
layerParams.slipFeatureAngle(),
dispVec,
medialRatio,
......
......@@ -61,6 +61,12 @@ Foam::layerParameters::layerParameters
readScalar(dict.lookup("minThickness"))
),
featureAngle_(readScalar(dict.lookup("featureAngle"))),
slipFeatureAngle_
(
dict.found("slipFeatureAngle")
? readScalar(dict.lookup("slipFeatureAngle"))
: 0.5*featureAngle_
),
concaveAngle_
(
dict.lookupOrDefault("concaveAngle", defaultConcaveAngle)
......
......@@ -79,6 +79,8 @@ class layerParameters
scalar featureAngle_;
scalar slipFeatureAngle_;
scalar concaveAngle_;
label nGrow_;
......@@ -178,6 +180,13 @@ public:
return featureAngle_;
}
//- At non-patched sides allow mesh to slip if extrusion
// direction makes angle larger than slipFeatureAngle.
scalar slipFeatureAngle() const
{
return slipFeatureAngle_;
}
scalar concaveAngle() const
{
return concaveAngle_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment