snappyHexMesh: Corrected use of layer featureAngle

The 'featureAngle' control defines the included angle between faces
above which layer extrusion is prevented. Its use within snappyHexMesh
was incorrect in that the cosine was not being taken before being
compared to dot products of face normals. This has now been corrected.

Existing 'featureAngle' settings may need changing to recover equivalent
behaviour. Any angle previously set to 58 degrees or above previously
resulted in no reduction of layer coverage. A large angle between 90 and
180 degrees is likely to be an appropriate replacement for cases such as
this. Angles previously set to 57 degrees and below can be equivalently
replaced by a value of (180/pi)*arccos(<angle>*(pi/180)).

Note that changing the feature angle also affects the slip feature
angle. The slip feature angle is taken to be half the feature angle if a
'slipFeatureAngle' is not specified.
This commit is contained in:
Will Bainbridge
2024-05-09 12:26:09 +01:00
parent cdef200385
commit 47fa9bc620
18 changed files with 74 additions and 23 deletions

View File

@ -234,7 +234,11 @@ addLayersControls
// When not to extrude surface. 0 is flat surface, 90 is when two faces
// are perpendicular
featureAngle 30;
featureAngle 60;
// At non-patched sides allow mesh to slip if extrusion direction makes
// angle larger than slipFeatureAngle. Default is 0.5*featureAngle.
slipFeatureAngle 15;
// Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.