mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: snappyHexMesh: minThickness > 1 caused truncation of layers
The start of the layer addition loop does a synchronisation of the wanted displacement. This also does a truncation of the displacement if it is < minThickness. At the first iteration the displacement was initialised to vector::one which might trigger the truncation logic (and then disable extrusion altogether). Instead we now initialise the displacement to vector::GREAT before entering the synchronisation.
This commit is contained in:
@ -3068,8 +3068,10 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Displacement for all pp.localPoints.
|
// Displacement for all pp.localPoints. Set to large value to
|
||||||
vectorField patchDisp(pp().nPoints(), vector::one);
|
// avoid truncation in syncPatchDisplacement because of
|
||||||
|
// minThickness.
|
||||||
|
vectorField patchDisp(pp().nPoints(), vector(GREAT, GREAT, GREAT));
|
||||||
labelList patchNLayers(pp().nPoints(), 0);
|
labelList patchNLayers(pp().nPoints(), 0);
|
||||||
label nIdealTotAddedCells = 0;
|
label nIdealTotAddedCells = 0;
|
||||||
List<extrudeMode> extrudeStatus(pp().nPoints(), EXTRUDE);
|
List<extrudeMode> extrudeStatus(pp().nPoints(), EXTRUDE);
|
||||||
@ -3086,6 +3088,8 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
nIdealTotAddedCells
|
nIdealTotAddedCells
|
||||||
);
|
);
|
||||||
// Make sure displacement is equal on both sides of coupled patches.
|
// Make sure displacement is equal on both sides of coupled patches.
|
||||||
|
// Note that we explicitly disable the minThickness truncation
|
||||||
|
// of the patchDisp here.
|
||||||
syncPatchDisplacement
|
syncPatchDisplacement
|
||||||
(
|
(
|
||||||
pp,
|
pp,
|
||||||
@ -3297,8 +3301,9 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
// Point-wise extrusion data
|
// Point-wise extrusion data
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Displacement for all pp.localPoints.
|
// Displacement for all pp.localPoints. Set to large value so does
|
||||||
vectorField patchDisp(pp().nPoints(), vector::one);
|
// not trigger the minThickness truncation (see syncPatchDisplacement below)
|
||||||
|
vectorField patchDisp(pp().nPoints(), vector(GREAT, GREAT, GREAT));
|
||||||
|
|
||||||
// Number of layers for all pp.localPoints. Note: only valid if
|
// Number of layers for all pp.localPoints. Note: only valid if
|
||||||
// extrudeStatus = EXTRUDE.
|
// extrudeStatus = EXTRUDE.
|
||||||
@ -3533,6 +3538,9 @@ void Foam::autoLayerDriver::addLayers
|
|||||||
|
|
||||||
|
|
||||||
// Make sure displacement is equal on both sides of coupled patches.
|
// Make sure displacement is equal on both sides of coupled patches.
|
||||||
|
// Note that this also does the patchDisp < minThickness truncation
|
||||||
|
// so for the first pass make sure the patchDisp is larger than
|
||||||
|
// that.
|
||||||
syncPatchDisplacement
|
syncPatchDisplacement
|
||||||
(
|
(
|
||||||
pp,
|
pp,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user