From fd677b9f148c4002d06c6fde397dd7fd4d1bd0c9 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 1 Oct 2012 11:40:11 +0100 Subject: [PATCH 01/14] ENH: Tutorial file updates --- .../multiRegionHeater/system/controlDict | 16 ++++++++-------- .../oscillatingBox/system/controlDict | 8 ++++---- .../verticalChannel/system/controlDict | 6 +++--- .../verticalChannel/system/controlDict | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/controlDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/controlDict index 3c2b0204f2..ce425c2910 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/controlDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/controlDict @@ -52,16 +52,16 @@ functions type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; + enabled yes; outputControl outputTime; region topAir; - // Output to log&file (true) or to file only - log true; + // Output to log&file (yes) or to file only + log yes; // Output field values as well - valueOutput false; //true; + valueOutput no; // Type of source: patch/faceZone/sampledSurface source patch; @@ -85,16 +85,16 @@ functions type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; + enabled yes; outputControl outputTime; region topAir; - // Output to log&file (true) or to file only - log true; + // Output to log&file (yes) or to file only + log yes; // Output field values as well - valueOutput false; //true; + valueOutput no; // Type of source: patch/faceZone/sampledSurface source patch; diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict b/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict index 6a1045207a..5155b313d4 100644 --- a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict +++ b/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict @@ -62,7 +62,7 @@ functions pName p; UName U; rhoName rhoInf; - log true; + log yes; rhoInf 1000; CofR (0 0 0); } @@ -71,11 +71,11 @@ functions { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; + enabled yes; outputControl timeStep; outputInterval 1; - log true; - valueOutput false; + log yes; + valueOutput no; source faceZone; sourceName f0; operation areaAverage; diff --git a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/controlDict b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/controlDict index d8b6b24512..42ba5153d4 100644 --- a/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/controlDict +++ b/tutorials/lagrangian/LTSReactingParcelFoam/verticalChannel/system/controlDict @@ -52,10 +52,10 @@ functions { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; + enabled yes; outputControl outputTime; - log true; - valueOutput true; + log yes; + valueOutput no; source patch; sourceName outlet; operation weightedAverage; diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/controlDict b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/controlDict index 69e606e7fa..52d917a65f 100644 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/controlDict +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/system/controlDict @@ -57,10 +57,10 @@ functions { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); - enabled true; + enabled yes; outputControl outputTime; - log true; - valueOutput true; + log yes; + valueOutput no; source patch; sourceName outlet; operation weightedAverage; From fcc77aae2886676cbbe582b1057c4ece1cb68f83 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 1 Oct 2012 14:13:06 +0100 Subject: [PATCH 02/14] ENH: snappyHexMesh: allow sliding --- .../autoHexMeshDriver/autoLayerDriver.C | 43 +++++- .../autoHexMeshDriver/autoLayerDriver.H | 4 +- .../autoHexMeshDriver/autoLayerDriverShrink.C | 143 +++++++++++++----- 3 files changed, 149 insertions(+), 41 deletions(-) diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index 26b4fb0187..464fdd2b8f 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -710,7 +710,8 @@ void Foam::autoLayerDriver::setNumLayers const indirectPrimitivePatch& pp, pointField& patchDisp, labelList& patchNLayers, - List& extrudeStatus + List& extrudeStatus, + label& nAddedCells ) const { const fvMesh& mesh = meshRefiner_.mesh(); @@ -797,6 +798,24 @@ void Foam::autoLayerDriver::setNumLayers } } + + // Calculate number of cells to create + nAddedCells = 0; + forAll(pp.localFaces(), faceI) + { + const face& f = pp.localFaces()[faceI]; + + // Get max of extrusion per point + label nCells = 0; + forAll(f, fp) + { + nCells = max(nCells, patchNLayers[f[fp]]); + } + + nAddedCells += nCells; + } + reduce(nAddedCells, sumOp