From 82356c7d08fa21a842cc345c49be5ce11d5adbef Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 31 Jan 2019 08:52:09 +0000 Subject: [PATCH 1/3] tutorials: windAroundBuildings: Updated snappyHexMesh write flags --- .../simpleFoam/windAroundBuildings/system/snappyHexMeshDict | 1 - 1 file changed, 1 deletion(-) diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/snappyHexMeshDict index 63a25567d7..89622b7854 100644 --- a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/snappyHexMeshDict @@ -91,7 +91,6 @@ meshQualityControls writeFlags ( - noRefinement // scalarLevels // layerSets // layerFields From 0497d2a17073f632c550fbddfdc2d75980212a63 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Tue, 29 Jan 2019 10:20:58 +0000 Subject: [PATCH 2/3] snappyHexMesh: Per-patch face merging options Face merging in the layer addition phase can now be controlled at a per-patch level. By default, faces that are connected to the same cell and patch, and which do not differ in orientation by more than the planar angle, are merged if the patch they belong to is associated with meshed geometry. This has not changed, but it can now be overridden with a new "mergeFaces" keyword. This can be set in addLayersControls to control the default behaviour on all patches, and it can be overridden in the layer settings associated with each patch. For example: addLayersControls { mergeFaces true; // <-- Merge faces on all patches, not just those // associated with geometry layers { wall1 { nSurfaceLayers 2; } wall2 { nSurfaceLayers 2; mergeFaces false; // <-- Do not merge faces on this patch } } } In addition, the patch-association has been fixed so that faces are no longer merged on patches which are set not to merge, but are cell-connected to patches which are. This change makes it possible to guarantee that the surface mesh retains the same geometry before and after layer addition, and therefore add layers to coupled interfaces. --- .../polyTopoChange/combineFaces.C | 38 +++++++++++++++---- .../polyTopoChange/combineFaces.H | 15 +++++++- .../meshRefinement/meshRefinement.H | 2 +- .../meshRefinement/meshRefinementMerge.C | 33 ++-------------- .../layerParameters/layerParameters.C | 21 +++++++++- .../layerParameters/layerParameters.H | 21 +++++++++- .../snappyHexMeshDriver/snappyLayerDriver.C | 16 +++++++- 7 files changed, 102 insertions(+), 44 deletions(-) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C index 567db9ca58..01c4ff7665 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,6 +127,7 @@ bool Foam::combineFaces::validFace void Foam::combineFaces::regioniseFaces ( const scalar minCos, + const labelHashSet& patchIDs, const label celli, const labelList& cEdges, Map