From 47b86eec96d186de1dfd390e56e8c3e6d4ec5652 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 17 Dec 2015 09:03:57 +0000 Subject: [PATCH 1/3] BUG: execFlowFunctionObjects: missing -noRead Fixes #40 --- .../execFlowFunctionObjects/execFlowFunctionObjects.C | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C index a4e0e6ddd9..0680449a3e 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C @@ -290,6 +290,8 @@ void calc mesh ); + // Note: fvOptions not directly used but constructs fvOptions so + // e.g. porosity modelling is effective for use in forces fo. #include "createFvOptions.H" if (phi.dimensions() == dimVolume/dimTime) @@ -445,6 +447,11 @@ int main(int argc, char *argv[]) "noFlow", "suppress creating flow models" ); + argList::addBoolOption + ( + "noRead", + "do not read any field data" + ); #include "addDictOption.H" #include "setRootCase.H" From 0347bc5ae2177adf7f914a828c9ba1b8e0a7dbcd Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 17 Dec 2015 09:35:13 +0000 Subject: [PATCH 2/3] ENH: autoHexMesh: check for both locationInMesh and locationsInMesh. --- .../refinementParameters/refinementParameters.C | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C index 0a93e1e4a8..b1aea4e0d1 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/refinementParameters/refinementParameters.C @@ -75,6 +75,13 @@ Foam::refinementParameters::refinementParameters(const dictionary& dict) { locationsInMesh_.append(locationInMesh); zonesInMesh_.append("none"); // special name for no cellZone + + if (dict.found("locationsInMesh")) + { + FatalIOErrorInFunction(dict) + << "Cannot both specify 'locationInMesh' and 'locationsInMesh'" + << exit(FatalIOError); + } } List > pointsToZone; From 1beb9b7acb1ced1f0cd276afcf6155909e8b2ad0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 17 Dec 2015 12:16:34 +0000 Subject: [PATCH 3/3] BUG: autoHexMesh: allocation of zones. Base on cell zoning, not on surface --- .../meshRefinement/meshRefinementBaffles.C | 251 +++++++++++------- 1 file changed, 156 insertions(+), 95 deletions(-) diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index 7d350c4e68..d369f739ca 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -279,7 +279,6 @@ void Foam::meshRefinement::getIntersections } -// Determine patches for baffles on all intersected unnamed faces void Foam::meshRefinement::getBafflePatches ( const labelList& globalToMasterPatch, @@ -293,9 +292,16 @@ void Foam::meshRefinement::getBafflePatches labelList& neiPatch ) const { + // This determines the patches for the intersected faces to + // - remove the outside of the mesh + // - introduce baffles for (non-faceZone) intersections + // Any baffles for faceZones (faceType 'baffle'/'boundary') get introduced + // later + + // 1. Determine cell zones // ~~~~~~~~~~~~~~~~~~~~~~~ - // Note that this does not determine the surface that was intersected + // Note that this does not determine the surface+region that was intersected // so that is done in step 2 below. labelList cellToZone; @@ -312,50 +318,50 @@ void Foam::meshRefinement::getBafflePatches namedSurfaceIndex, posOrientation ); - - - // Some stats - if (debug) - { - label nZones = gMax(cellToZone)+1; - - label nUnvisited = 0; - label nBackgroundCells = 0; - labelList nZoneCells(nZones, 0); - forAll(cellToZone, cellI) - { - label zoneI = cellToZone[cellI]; - if (zoneI >= 0) - { - nZoneCells[zoneI]++; - } - else if (zoneI == -1) - { - nBackgroundCells++; - } - else if (zoneI == -2) - { - nUnvisited++; - } - else - { - FatalErrorIn("meshRefinement::getBafflePatches()") - << "problem" << exit(FatalError); - } - } - reduce(nUnvisited, sumOp